summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2018-11-25 13:08:42 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2018-11-25 13:13:56 +0000
commit8f7accb422905ad75fac88b548a933715e23a3ac (patch)
tree06780afb6a3e49a396fa40f9fa9d2697e26cd43a /app-misc/golly
parentapp-editors/jupp: Version bump. (diff)
downloadgentoo-8f7accb422905ad75fac88b548a933715e23a3ac.tar.gz
gentoo-8f7accb422905ad75fac88b548a933715e23a3ac.tar.bz2
gentoo-8f7accb422905ad75fac88b548a933715e23a3ac.zip
app-misc/golly: bump up to 3.2, bug #661360
Also applied mouse patches provided by Hooloovo0 \o/ Reported-by: Hooloovo0 Closes: https://bugs.gentoo.org/661360 Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'app-misc/golly')
-rw-r--r--app-misc/golly/Manifest1
-rw-r--r--app-misc/golly/files/golly-3.2-mouse-1.patch63
-rw-r--r--app-misc/golly/files/golly-3.2-mouse-2.patch45
-rw-r--r--app-misc/golly/golly-3.2.ebuild59
4 files changed, 168 insertions, 0 deletions
diff --git a/app-misc/golly/Manifest b/app-misc/golly/Manifest
index d6b3eaf28ced..2b935b9a5fa4 100644
--- a/app-misc/golly/Manifest
+++ b/app-misc/golly/Manifest
@@ -1,2 +1,3 @@
DIST golly-2.7-src.tar.gz 3881882 BLAKE2B 1989ff56049b7a182cbca35e33ac287c279ebac69acc5d07ac5122e8ccffef978a2e063c0587813d177a6311c854c6d52c2e80a5919107f9c6b17947a5e5f1ab SHA512 084919f508b471cc0937d50307410c3f48281e7328e3b9d20e634b9ddfe5909e3b9a000da5a9845a2ba7e45a733fee39e2e6d55902c9af110b5f2d7ea8654d77
DIST golly-2.8-src.tar.gz 4087191 BLAKE2B 4029b9bd30624cf2253dc5524c998f7e50648d39bc8dccf23b5c6b586989a641dde17b9fe35f16043d0f0d4a60da46729b31a9715b5d07950d610ea41a93a7a5 SHA512 bd86f685d180687814a44aa51edf4952a5af9024abb76d6b30faf1229edc86a1ba4e1f2c13f249f604d483fbde1a6db05150263450935b5bb073c155ad166a53
+DIST golly-3.2-src.tar.gz 5261483 BLAKE2B c9a1c09c71bafcb624eab91c7b86d671bd0cec23041d5ada91972c363242a4bc0c55d699f45e9b732dd00d4f030818a51f9c1e4ccafed298e230d912d4d22235 SHA512 bff5bbe75c0914bfcd416101894f8be1fd644c147fb90e0ad2cf87b4472c132c5d50be1829345fae59038e3d2e106ac417c5bc3cbc5c7d3a32a03c241b7a8eca
diff --git a/app-misc/golly/files/golly-3.2-mouse-1.patch b/app-misc/golly/files/golly-3.2-mouse-1.patch
new file mode 100644
index 000000000000..ab4fc703f507
--- /dev/null
+++ b/app-misc/golly/files/golly-3.2-mouse-1.patch
@@ -0,0 +1,63 @@
+From e22d1534d486a7b46612ca6f6cd693b8fa4635d2 Mon Sep 17 00:00:00 2001
+From: Chris Rowett <rowett@yahoo.com>
+Date: Tue, 10 Jul 2018 23:22:20 +0100
+Subject: [PATCH] bugfix: do not process other mouse buttons until current
+ button released
+
+---
+ gui-wx/wxview.cpp | 15 +++++++++++++++
+ gui-wx/wxview.h | 2 ++
+ 2 files changed, 17 insertions(+)
+
+--- a/gui-wx/wxview.cpp
++++ b/gui-wx/wxview.cpp
+@@ -2801,6 +2801,13 @@ void PatternView::OnMouseDown(wxMouseEvent& event)
+ int button = event.GetButton();
+ int modifiers = GetMouseModifiers(event);
+
++ // ignore if a mouse button is already down
++ if (mouseisdown) return;
++
++ // flag that a mouse button is down
++ mouseisdown = true;
++ whichbuttondown = button;
++
+ if (waitingforclick && button == wxMOUSE_BTN_LEFT) {
+ // save paste location
+ pastex = x;
+@@ -2870,6 +2877,13 @@ void PatternView::OnMouseDown(wxMouseEvent& event)
+
+ void PatternView::OnMouseUp(wxMouseEvent& event)
+ {
++ // if the button released was not the first held down then ignore
++ int button = event.GetButton();
++ if (button != whichbuttondown) return;
++
++ // same button released so process
++ mouseisdown = false;
++
+ if (drawingcells || selectingcells || movingview || clickedcontrol > NO_CONTROL) {
+ StopDraggingMouse();
+ } else if (mainptr->draw_pending) {
+@@ -3273,6 +3287,7 @@ PatternView::PatternView(wxWindow* parent, wxCoord x, wxCoord y, int wd, int ht,
+ selectingcells = false; // not selecting cells
+ movingview = false; // not moving view
+ waitingforclick = false; // not waiting for user to click
++ mouseisdown = false; // mouse button is not down
+ nopattupdate = false; // enable pattern updates
+ showcontrols = false; // not showing translucent controls
+ oldcursor = NULL; // for toggling cursor via shift key
+--- a/gui-wx/wxview.h
++++ b/gui-wx/wxview.h
+@@ -102,6 +102,8 @@ public:
+ bool movingview; // moving view due to dragging mouse?
+ bool nopattupdate; // disable pattern updates?
+ bool showcontrols; // draw translucent controls?
++ bool mouseisdown; // mouse button held down?
++ int whichbuttondown; // which mouse button is down
+ wxRect controlsrect; // location of translucent controls
+ wxRect pasterect; // area to be pasted
+ wxCursor* oldcursor; // non-NULL if shift key has toggled cursor
+--
+2.19.2
+
diff --git a/app-misc/golly/files/golly-3.2-mouse-2.patch b/app-misc/golly/files/golly-3.2-mouse-2.patch
new file mode 100644
index 000000000000..b2655ba6212b
--- /dev/null
+++ b/app-misc/golly/files/golly-3.2-mouse-2.patch
@@ -0,0 +1,45 @@
+From 746f5f6f0c29867ac97516d00fdf58d3496a6687 Mon Sep 17 00:00:00 2001
+From: Chris Rowett <rowett@yahoo.com>
+Date: Wed, 11 Jul 2018 12:44:22 +0100
+Subject: [PATCH] bugfix: clear mousedown flag in mousecapturelost event
+ handler
+
+---
+ gui-wx/wxview.cpp | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+--- a/gui-wx/wxview.cpp
++++ b/gui-wx/wxview.cpp
+@@ -81,9 +81,7 @@ EVT_MIDDLE_DCLICK ( PatternView::OnMouseDown)
+ EVT_LEFT_UP ( PatternView::OnMouseUp)
+ EVT_RIGHT_UP ( PatternView::OnMouseUp)
+ EVT_MIDDLE_UP ( PatternView::OnMouseUp)
+-#if wxCHECK_VERSION(2, 8, 0)
+ EVT_MOUSE_CAPTURE_LOST ( PatternView::OnMouseCaptureLost)
+-#endif
+ EVT_MOTION ( PatternView::OnMouseMotion)
+ EVT_ENTER_WINDOW ( PatternView::OnMouseEnter)
+ EVT_LEAVE_WINDOW ( PatternView::OnMouseExit)
+@@ -2901,18 +2899,15 @@ void PatternView::OnMouseUp(wxMouseEvent& event)
+
+ // -----------------------------------------------------------------------------
+
+-#if wxCHECK_VERSION(2, 8, 0)
+-
+ // mouse capture can be lost on Windows before mouse-up event
+ void PatternView::OnMouseCaptureLost(wxMouseCaptureLostEvent& WXUNUSED(event))
+ {
++ mouseisdown = false;
+ if (drawingcells || selectingcells || movingview || clickedcontrol > NO_CONTROL) {
+ StopDraggingMouse();
+ }
+ }
+
+-#endif
+-
+ // -----------------------------------------------------------------------------
+
+ void PatternView::OnMouseMotion(wxMouseEvent& event)
+--
+2.19.2
+
diff --git a/app-misc/golly/golly-3.2.ebuild b/app-misc/golly/golly-3.2.ebuild
new file mode 100644
index 000000000000..6000a64174e4
--- /dev/null
+++ b/app-misc/golly/golly-3.2.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+WX_GTK_VER=3.0
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils flag-o-matic python-single-r1 gnome2-utils wxwidgets
+
+DESCRIPTION="simulator for Conway's Game of Life and other cellular automata"
+HOMEPAGE="http://golly.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="tiff"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="virtual/opengl
+ sys-libs/zlib
+ x11-libs/wxGTK:${WX_GTK_VER}[X,opengl,tiff?]"
+RDEPEND="${DEPEND}
+ ${PYTHON_DEPS}"
+
+S=${WORKDIR}/${P}-src
+
+PATCHES=(
+ "${FILESDIR}"/${P}-mouse-1.patch
+ "${FILESDIR}"/${P}-mouse-2.patch
+)
+
+pkg_setup() {
+ setup-wxwidgets
+}
+
+src_configure() {
+ ECONF_SOURCE=gui-wx/configure econf \
+ --with-wxshared
+}
+
+src_install() {
+ emake docdir= DESTDIR="${D}" install
+ dodoc docs/ReadMe.html
+ newicon --size 32 gui-wx/icons/appicon.xpm ${PN}.xpm
+ make_desktop_entry ${PN} "Golly" ${PN} "Science"
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}