1 |
commit: ef4b282b7f6609cd68aa9ce7b6e89333f0096b95 |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Dec 2 20:31:46 2017 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Dec 2 20:32:01 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef4b282b |
7 |
|
8 |
x11-misc/easystroke: Rename internal function abs() (bug #638922). |
9 |
|
10 |
Package-Manager: Portage-2.3.16, Repoman-2.3.6 |
11 |
|
12 |
x11-misc/easystroke/Manifest | 2 +- |
13 |
x11-misc/easystroke/easystroke-0.6.0-r3.ebuild | 68 ++++++++++++++++++++++ |
14 |
.../easystroke/files/easystroke-0.6.0-abs.patch | 45 ++++++++++++++ |
15 |
3 files changed, 114 insertions(+), 1 deletion(-) |
16 |
|
17 |
diff --git a/x11-misc/easystroke/Manifest b/x11-misc/easystroke/Manifest |
18 |
index 122843bfc16..86b94c17967 100644 |
19 |
--- a/x11-misc/easystroke/Manifest |
20 |
+++ b/x11-misc/easystroke/Manifest |
21 |
@@ -1 +1 @@ |
22 |
-DIST easystroke-0.6.0.tar.gz 121358 SHA256 f4c37adbc4dd405a24badb9e6be20d3223b4087ff9caed2c15ff71674051d0fd SHA512 a74cbdfd2b56e6b20d895297e80fb63f3d8ac938235ecf7067f984d087004af22a5ea0116ae20b948e238b02a06b14044a7025d65840f0c8d00542332387c921 WHIRLPOOL d1305449563d599c5159ebddb2fdc6c17f2e79d8a1ea5186cff9f6785545cb2941413fb498347da8801ac665e20f1aa252270bcc88e93d97111ae253924d7b18 |
23 |
+DIST easystroke-0.6.0.tar.gz 121358 BLAKE2B 9a4bec134f44620b10e1af9959ac4d82cb0a7ae8ea1e33ebfdafd2bb8367b7f431e48be4386803dc498b30f11a51b448570331d544fe089523ae710ffa8625ce SHA512 a74cbdfd2b56e6b20d895297e80fb63f3d8ac938235ecf7067f984d087004af22a5ea0116ae20b948e238b02a06b14044a7025d65840f0c8d00542332387c921 |
24 |
|
25 |
diff --git a/x11-misc/easystroke/easystroke-0.6.0-r3.ebuild b/x11-misc/easystroke/easystroke-0.6.0-r3.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..74b40179af2 |
28 |
--- /dev/null |
29 |
+++ b/x11-misc/easystroke/easystroke-0.6.0-r3.ebuild |
30 |
@@ -0,0 +1,68 @@ |
31 |
+# Copyright 1999-2017 Gentoo Foundation |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=6 |
35 |
+inherit eutils flag-o-matic toolchain-funcs |
36 |
+ |
37 |
+DESCRIPTION="a gesture-recognition application for X11" |
38 |
+HOMEPAGE="https://sourceforge.net/apps/trac/easystroke/" |
39 |
+SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${PV}/${P}.tar.gz" |
40 |
+ |
41 |
+LICENSE="ISC" |
42 |
+SLOT="0" |
43 |
+KEYWORDS="~amd64" |
44 |
+ |
45 |
+RDEPEND=" |
46 |
+ dev-cpp/gtkmm:3.0 |
47 |
+ dev-libs/boost:= |
48 |
+ dev-libs/dbus-glib |
49 |
+ dev-libs/glib:2 |
50 |
+ x11-base/xorg-server |
51 |
+ x11-libs/libX11 |
52 |
+ x11-libs/libXext |
53 |
+ x11-libs/libXfixes |
54 |
+ x11-libs/libXi |
55 |
+ x11-libs/libXtst |
56 |
+" |
57 |
+DEPEND=" |
58 |
+ ${RDEPEND} |
59 |
+ dev-util/intltool |
60 |
+ sys-devel/gettext |
61 |
+" |
62 |
+PATCHES=( |
63 |
+ "${FILESDIR}"/${P}-cellrendertextish.patch |
64 |
+ "${FILESDIR}"/${P}-desktop.patch |
65 |
+ "${FILESDIR}"/${P}-gentoo.patch |
66 |
+ "${FILESDIR}"/${P}-reinstate-signal-handlers.patch |
67 |
+ "${FILESDIR}"/${P}-buttons-scroll-send.patch |
68 |
+ "${FILESDIR}"/${P}-cxx11.patch |
69 |
+ "${FILESDIR}"/${P}-abs.patch |
70 |
+) |
71 |
+ |
72 |
+src_prepare() { |
73 |
+ default |
74 |
+ |
75 |
+ tc-export CC CXX PKG_CONFIG |
76 |
+ |
77 |
+ if ! [[ -z ${LINGUAS} ]]; then |
78 |
+ strip-linguas -i po/ |
79 |
+ |
80 |
+ local es_lingua lang |
81 |
+ for es_lingua in $( printf "%s\n" po/*.po ); do |
82 |
+ lang=${es_lingua/po\/} |
83 |
+ has ${lang/.po/} ${LINGUAS} || rm ${es_lingua} |
84 |
+ done |
85 |
+ fi |
86 |
+} |
87 |
+ |
88 |
+src_compile() { |
89 |
+ append-cxxflags -std=c++11 |
90 |
+ emake \ |
91 |
+ AOFLAGS='' \ |
92 |
+ LDFLAGS="${LDFLAGS}" \ |
93 |
+ PREFIX=/usr |
94 |
+} |
95 |
+ |
96 |
+src_install() { |
97 |
+ emake DESTDIR="${D}" PREFIX=/usr install |
98 |
+} |
99 |
|
100 |
diff --git a/x11-misc/easystroke/files/easystroke-0.6.0-abs.patch b/x11-misc/easystroke/files/easystroke-0.6.0-abs.patch |
101 |
new file mode 100644 |
102 |
index 00000000000..9b4ab63828d |
103 |
--- /dev/null |
104 |
+++ b/x11-misc/easystroke/files/easystroke-0.6.0-abs.patch |
105 |
@@ -0,0 +1,45 @@ |
106 |
+--- a/handler.cc |
107 |
++++ b/handler.cc |
108 |
+@@ -533,7 +533,7 @@ |
109 |
+ virtual Grabber::State grab_mode() { return parent->grab_mode(); } |
110 |
+ }; |
111 |
+ |
112 |
+-static inline float abs(float x) { return x > 0 ? x : -x; } |
113 |
++static inline float easystroke_abs(float x) { return x > 0 ? x : -x; } |
114 |
+ |
115 |
+ class AbstractScrollHandler : public Handler { |
116 |
+ bool have_x, have_y; |
117 |
+@@ -559,7 +559,7 @@ |
118 |
+ xstate->fake_click(b2); |
119 |
+ } |
120 |
+ static float curve(float v) { |
121 |
+- return v * exp(log(abs(v))/3); |
122 |
++ return v * exp(log(easystroke_abs(v))/3); |
123 |
+ } |
124 |
+ protected: |
125 |
+ void move_back() { |
126 |
+@@ -597,8 +597,8 @@ |
127 |
+ offset_x += factor * curve(dx/dt)*dt/20.0; |
128 |
+ offset_y += factor * curve(dy/dt)*dt/10.0; |
129 |
+ int b1 = 0, n1 = 0, b2 = 0, n2 = 0; |
130 |
+- if (abs(offset_x) > 1.0) { |
131 |
+- n1 = (int)floor(abs(offset_x)); |
132 |
++ if (easystroke_abs(offset_x) > 1.0) { |
133 |
++ n1 = (int)floor(easystroke_abs(offset_x)); |
134 |
+ if (offset_x > 0) { |
135 |
+ b1 = 7; |
136 |
+ offset_x -= n1; |
137 |
+@@ -607,10 +607,10 @@ |
138 |
+ offset_x += n1; |
139 |
+ } |
140 |
+ } |
141 |
+- if (abs(offset_y) > 1.0) { |
142 |
+- if (abs(offset_y) < 1.0) |
143 |
++ if (easystroke_abs(offset_y) > 1.0) { |
144 |
++ if (easystroke_abs(offset_y) < 1.0) |
145 |
+ return; |
146 |
+- n2 = (int)floor(abs(offset_y)); |
147 |
++ n2 = (int)floor(easystroke_abs(offset_y)); |
148 |
+ if (offset_y > 0) { |
149 |
+ b2 = 5; |
150 |
+ offset_y -= n2; |