public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: x11-misc/easystroke/, x11-misc/easystroke/files/
@ 2015-12-31 11:33 Pacho Ramos
  0 siblings, 0 replies; 2+ messages in thread
From: Pacho Ramos @ 2015-12-31 11:33 UTC (permalink / raw
  To: gentoo-commits

commit:     632f38845a2fb3d05467baf7dadd6107f3ce75b8
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 31 11:33:40 2015 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Thu Dec 31 11:33:50 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=632f3884

x11-misc/easystroke: Fix building with latest glibmm/libsigc++ with ArchLinux patch (#569606)

Package-Manager: portage-2.2.26

 x11-misc/easystroke/easystroke-0.6.0-r2.ebuild     | 65 ++++++++++++++++++++++
 .../easystroke/files/easystroke-0.6.0-cxx11.patch  | 18 ++++++
 2 files changed, 83 insertions(+)

diff --git a/x11-misc/easystroke/easystroke-0.6.0-r2.ebuild b/x11-misc/easystroke/easystroke-0.6.0-r2.ebuild
new file mode 100644
index 0000000..ef52536
--- /dev/null
+++ b/x11-misc/easystroke/easystroke-0.6.0-r2.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="a gesture-recognition application for X11"
+HOMEPAGE="http://sourceforge.net/apps/trac/easystroke/"
+SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+	dev-cpp/gtkmm:3.0
+	dev-libs/boost
+	dev-libs/dbus-glib
+	dev-libs/glib:2
+	x11-base/xorg-server
+	x11-libs/libX11
+	x11-libs/libXext
+	x11-libs/libXfixes
+	x11-libs/libXi
+	x11-libs/libXtst
+"
+DEPEND="
+	${RDEPEND}
+	dev-util/intltool
+	sys-devel/gettext
+"
+
+src_prepare() {
+	epatch "${FILESDIR}"/${P}-cellrendertextish.patch
+	epatch "${FILESDIR}"/${P}-desktop.patch
+	epatch "${FILESDIR}"/${P}-gentoo.patch
+	epatch "${FILESDIR}"/${P}-reinstate-signal-handlers.patch
+	epatch "${FILESDIR}"/${P}-buttons-scroll-send.patch
+	epatch "${FILESDIR}"/${P}-cxx11.patch
+
+	tc-export CC CXX PKG_CONFIG
+
+	if ! [[ -z ${LINGUAS} ]]; then
+		strip-linguas -i po/
+
+		local es_lingua lang
+		for es_lingua in $( printf "%s\n" po/*.po ); do
+			lang=${es_lingua/po\/}
+			has ${lang/.po/} ${LINGUAS} || rm ${es_lingua}
+		done
+	fi
+}
+
+src_compile() {
+	append-cxxflags -std=c++11
+	emake \
+		AOFLAGS='' \
+		LDFLAGS="${LDFLAGS}" \
+		PREFIX=/usr
+}
+
+src_install() {
+	emake DESTDIR="${D}" PREFIX=/usr install
+}

diff --git a/x11-misc/easystroke/files/easystroke-0.6.0-cxx11.patch b/x11-misc/easystroke/files/easystroke-0.6.0-cxx11.patch
new file mode 100644
index 0000000..b628d1b
--- /dev/null
+++ b/x11-misc/easystroke/files/easystroke-0.6.0-cxx11.patch
@@ -0,0 +1,18 @@
+diff -uprb easystroke-0.6.0.orig/actions.cc easystroke-0.6.0/actions.cc
+--- easystroke-0.6.0.orig/actions.cc	2013-03-27 17:52:38.000000000 +0200
++++ easystroke-0.6.0/actions.cc	2015-12-07 22:07:17.720041171 +0200
+@@ -51,10 +51,11 @@ void TreeViewMulti::on_drag_begin(const
+ 	context->set_icon(pb, pb->get_width(), pb->get_height());
+ }
+ 
+-bool negate(bool b) { return !b; }
+-
+ TreeViewMulti::TreeViewMulti() : Gtk::TreeView(), pending(false) {
+-	get_selection()->set_select_function(sigc::group(&negate, sigc::ref(pending)));
++	get_selection()->set_select_function(
++		[this](Glib::RefPtr<Gtk::TreeModel> const&, Gtk::TreeModel::Path const&, bool) {
++			return !pending;
++		});
+ }
+ 
+ enum Type { COMMAND, KEY, TEXT, SCROLL, IGNORE, BUTTON, MISC };


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: x11-misc/easystroke/, x11-misc/easystroke/files/
@ 2017-12-02 20:32 Jeroen Roovers
  0 siblings, 0 replies; 2+ messages in thread
From: Jeroen Roovers @ 2017-12-02 20:32 UTC (permalink / raw
  To: gentoo-commits

commit:     ef4b282b7f6609cd68aa9ce7b6e89333f0096b95
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sat Dec  2 20:31:46 2017 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sat Dec  2 20:32:01 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef4b282b

x11-misc/easystroke: Rename internal function abs() (bug #638922).

Package-Manager: Portage-2.3.16, Repoman-2.3.6

 x11-misc/easystroke/Manifest                       |  2 +-
 x11-misc/easystroke/easystroke-0.6.0-r3.ebuild     | 68 ++++++++++++++++++++++
 .../easystroke/files/easystroke-0.6.0-abs.patch    | 45 ++++++++++++++
 3 files changed, 114 insertions(+), 1 deletion(-)

diff --git a/x11-misc/easystroke/Manifest b/x11-misc/easystroke/Manifest
index 122843bfc16..86b94c17967 100644
--- a/x11-misc/easystroke/Manifest
+++ b/x11-misc/easystroke/Manifest
@@ -1 +1 @@
-DIST easystroke-0.6.0.tar.gz 121358 SHA256 f4c37adbc4dd405a24badb9e6be20d3223b4087ff9caed2c15ff71674051d0fd SHA512 a74cbdfd2b56e6b20d895297e80fb63f3d8ac938235ecf7067f984d087004af22a5ea0116ae20b948e238b02a06b14044a7025d65840f0c8d00542332387c921 WHIRLPOOL d1305449563d599c5159ebddb2fdc6c17f2e79d8a1ea5186cff9f6785545cb2941413fb498347da8801ac665e20f1aa252270bcc88e93d97111ae253924d7b18
+DIST easystroke-0.6.0.tar.gz 121358 BLAKE2B 9a4bec134f44620b10e1af9959ac4d82cb0a7ae8ea1e33ebfdafd2bb8367b7f431e48be4386803dc498b30f11a51b448570331d544fe089523ae710ffa8625ce SHA512 a74cbdfd2b56e6b20d895297e80fb63f3d8ac938235ecf7067f984d087004af22a5ea0116ae20b948e238b02a06b14044a7025d65840f0c8d00542332387c921

diff --git a/x11-misc/easystroke/easystroke-0.6.0-r3.ebuild b/x11-misc/easystroke/easystroke-0.6.0-r3.ebuild
new file mode 100644
index 00000000000..74b40179af2
--- /dev/null
+++ b/x11-misc/easystroke/easystroke-0.6.0-r3.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="a gesture-recognition application for X11"
+HOMEPAGE="https://sourceforge.net/apps/trac/easystroke/"
+SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+	dev-cpp/gtkmm:3.0
+	dev-libs/boost:=
+	dev-libs/dbus-glib
+	dev-libs/glib:2
+	x11-base/xorg-server
+	x11-libs/libX11
+	x11-libs/libXext
+	x11-libs/libXfixes
+	x11-libs/libXi
+	x11-libs/libXtst
+"
+DEPEND="
+	${RDEPEND}
+	dev-util/intltool
+	sys-devel/gettext
+"
+PATCHES=(
+	"${FILESDIR}"/${P}-cellrendertextish.patch
+	"${FILESDIR}"/${P}-desktop.patch
+	"${FILESDIR}"/${P}-gentoo.patch
+	"${FILESDIR}"/${P}-reinstate-signal-handlers.patch
+	"${FILESDIR}"/${P}-buttons-scroll-send.patch
+	"${FILESDIR}"/${P}-cxx11.patch
+	"${FILESDIR}"/${P}-abs.patch
+)
+
+src_prepare() {
+	default
+
+	tc-export CC CXX PKG_CONFIG
+
+	if ! [[ -z ${LINGUAS} ]]; then
+		strip-linguas -i po/
+
+		local es_lingua lang
+		for es_lingua in $( printf "%s\n" po/*.po ); do
+			lang=${es_lingua/po\/}
+			has ${lang/.po/} ${LINGUAS} || rm ${es_lingua}
+		done
+	fi
+}
+
+src_compile() {
+	append-cxxflags -std=c++11
+	emake \
+		AOFLAGS='' \
+		LDFLAGS="${LDFLAGS}" \
+		PREFIX=/usr
+}
+
+src_install() {
+	emake DESTDIR="${D}" PREFIX=/usr install
+}

diff --git a/x11-misc/easystroke/files/easystroke-0.6.0-abs.patch b/x11-misc/easystroke/files/easystroke-0.6.0-abs.patch
new file mode 100644
index 00000000000..9b4ab63828d
--- /dev/null
+++ b/x11-misc/easystroke/files/easystroke-0.6.0-abs.patch
@@ -0,0 +1,45 @@
+--- a/handler.cc
++++ b/handler.cc
+@@ -533,7 +533,7 @@
+ 	virtual Grabber::State grab_mode() { return parent->grab_mode(); }
+ };
+ 
+-static inline float abs(float x) { return x > 0 ? x : -x; }
++static inline float easystroke_abs(float x) { return x > 0 ? x : -x; }
+ 
+ class AbstractScrollHandler : public Handler {
+ 	bool have_x, have_y;
+@@ -559,7 +559,7 @@
+ 			xstate->fake_click(b2);
+ 	}
+ 	static float curve(float v) {
+-		return v * exp(log(abs(v))/3);
++		return v * exp(log(easystroke_abs(v))/3);
+ 	}
+ protected:
+ 	void move_back() {
+@@ -597,8 +597,8 @@
+ 		offset_x += factor * curve(dx/dt)*dt/20.0;
+ 		offset_y += factor * curve(dy/dt)*dt/10.0;
+ 		int b1 = 0, n1 = 0, b2 = 0, n2 = 0;
+-		if (abs(offset_x) > 1.0) {
+-			n1 = (int)floor(abs(offset_x));
++		if (easystroke_abs(offset_x) > 1.0) {
++			n1 = (int)floor(easystroke_abs(offset_x));
+ 			if (offset_x > 0) {
+ 				b1 = 7;
+ 				offset_x -= n1;
+@@ -607,10 +607,10 @@
+ 				offset_x += n1;
+ 			}
+ 		}
+-		if (abs(offset_y) > 1.0) {
+-			if (abs(offset_y) < 1.0)
++		if (easystroke_abs(offset_y) > 1.0) {
++			if (easystroke_abs(offset_y) < 1.0)
+ 				return;
+-			n2 = (int)floor(abs(offset_y));
++			n2 = (int)floor(easystroke_abs(offset_y));
+ 			if (offset_y > 0) {
+ 				b2 = 5;
+ 				offset_y -= n2;


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-02 20:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-02 20:32 [gentoo-commits] repo/gentoo:master commit in: x11-misc/easystroke/, x11-misc/easystroke/files/ Jeroen Roovers
  -- strict thread matches above, loose matches on Subject: below --
2015-12-31 11:33 Pacho Ramos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox