1 |
commit: a3243c15b2f6545ca4b8204b43c720eb4fa9460d |
2 |
Author: Fredric Johansson <fredric.miscmail <AT> gmail <DOT> com> |
3 |
AuthorDate: Sun Jan 18 05:00:41 2015 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 2 11:56:58 2015 +0000 |
6 |
URL: http://sources.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=a3243c15 |
7 |
|
8 |
dev-libs/libgamin: fixed to build on musl, patch from Alpine linux |
9 |
|
10 |
--- |
11 |
.../libgamin-0.1.10-G_CONST_RETURN-removal.patch | 67 ++++++++++ |
12 |
.../files/libgamin-0.1.10-armel-features.patch | 47 +++++++ |
13 |
.../files/libgamin-0.1.10-compilewarnings.patch | 22 ++++ |
14 |
.../files/libgamin-0.1.10-crosscompile-fix.patch | 38 ++++++ |
15 |
.../libgamin/files/libgamin-0.1.10-deadlock.patch | 65 ++++++++++ |
16 |
...amin-0.1.10-disable_python_static_library.patch | 13 ++ |
17 |
.../files/libgamin-0.1.10-fix-pthread-mutex.patch | 11 ++ |
18 |
.../files/libgamin-0.1.10-noinst-lib.patch | 76 +++++++++++ |
19 |
dev-libs/libgamin/libgamin-0.1.10-r99.ebuild | 142 +++++++++++++++++++++ |
20 |
dev-libs/libgamin/metadata.xml | 8 ++ |
21 |
10 files changed, 489 insertions(+) |
22 |
|
23 |
diff --git a/dev-libs/libgamin/files/libgamin-0.1.10-G_CONST_RETURN-removal.patch b/dev-libs/libgamin/files/libgamin-0.1.10-G_CONST_RETURN-removal.patch |
24 |
new file mode 100644 |
25 |
index 0000000..087312f |
26 |
--- /dev/null |
27 |
+++ b/dev-libs/libgamin/files/libgamin-0.1.10-G_CONST_RETURN-removal.patch |
28 |
@@ -0,0 +1,67 @@ |
29 |
+From 2a9d32734a2e5125ae77de6c75789e1c6ee24dbe Mon Sep 17 00:00:00 2001 |
30 |
+From: Maciej Piechotka <uzytkownik2@×××××.com> |
31 |
+Date: Tue, 13 Sep 2011 09:47:05 +0200 |
32 |
+Subject: [PATCH] Fix compilation of recent glib removing G_CONST_RETURN |
33 |
+ |
34 |
+--- |
35 |
+ server/gam_node.c | 2 +- |
36 |
+ server/gam_node.h | 2 +- |
37 |
+ server/gam_subscription.c | 2 +- |
38 |
+ server/gam_subscription.h | 2 +- |
39 |
+ 4 files changed, 4 insertions(+), 4 deletions(-) |
40 |
+ |
41 |
+diff --git a/server/gam_node.c b/server/gam_node.c |
42 |
+index 02358ba..d0302d2 100644 |
43 |
+--- a/server/gam_node.c |
44 |
++++ b/server/gam_node.c |
45 |
+@@ -122,7 +122,7 @@ gam_node_set_is_dir(GamNode * node, gboolean is_dir) |
46 |
+ * it has finished with the string. If it must keep it longer, it |
47 |
+ * should makes its own copy. The returned string must not be freed. |
48 |
+ */ |
49 |
+-G_CONST_RETURN char * |
50 |
++const char * |
51 |
+ gam_node_get_path(GamNode * node) |
52 |
+ { |
53 |
+ g_assert(node); |
54 |
+diff --git a/server/gam_node.h b/server/gam_node.h |
55 |
+index 02c8692..83349a8 100644 |
56 |
+--- a/server/gam_node.h |
57 |
++++ b/server/gam_node.h |
58 |
+@@ -58,7 +58,7 @@ gboolean gam_node_is_dir (GamNode *node); |
59 |
+ void gam_node_set_is_dir (GamNode *node, |
60 |
+ gboolean is_dir); |
61 |
+ |
62 |
+-G_CONST_RETURN char *gam_node_get_path (GamNode *node); |
63 |
++const char *gam_node_get_path (GamNode *node); |
64 |
+ |
65 |
+ GList *gam_node_get_subscriptions (GamNode *node); |
66 |
+ |
67 |
+diff --git a/server/gam_subscription.c b/server/gam_subscription.c |
68 |
+index dfa3273..4675b34 100644 |
69 |
+--- a/server/gam_subscription.c |
70 |
++++ b/server/gam_subscription.c |
71 |
+@@ -141,7 +141,7 @@ gam_subscription_pathlen(GamSubscription * sub) |
72 |
+ * @param sub the GamSubscription |
73 |
+ * @returns The path being monitored. It should not be freed. |
74 |
+ */ |
75 |
+-G_CONST_RETURN char * |
76 |
++const char * |
77 |
+ gam_subscription_get_path(GamSubscription * sub) |
78 |
+ { |
79 |
+ if (sub == NULL) |
80 |
+diff --git a/server/gam_subscription.h b/server/gam_subscription.h |
81 |
+index d894fbe..e6b4e15 100644 |
82 |
+--- a/server/gam_subscription.h |
83 |
++++ b/server/gam_subscription.h |
84 |
+@@ -21,7 +21,7 @@ int gam_subscription_pathlen (GamSubscription *sub); |
85 |
+ |
86 |
+ int gam_subscription_get_reqno (GamSubscription *sub); |
87 |
+ |
88 |
+-G_CONST_RETURN char *gam_subscription_get_path (GamSubscription *sub); |
89 |
++const char *gam_subscription_get_path (GamSubscription *sub); |
90 |
+ |
91 |
+ GamListener *gam_subscription_get_listener (GamSubscription *sub); |
92 |
+ |
93 |
+-- |
94 |
+1.7.6.1 |
95 |
+ |
96 |
|
97 |
diff --git a/dev-libs/libgamin/files/libgamin-0.1.10-armel-features.patch b/dev-libs/libgamin/files/libgamin-0.1.10-armel-features.patch |
98 |
new file mode 100644 |
99 |
index 0000000..fdfcbd7 |
100 |
--- /dev/null |
101 |
+++ b/dev-libs/libgamin/files/libgamin-0.1.10-armel-features.patch |
102 |
@@ -0,0 +1,47 @@ |
103 |
+From 05dcfcd69848e119c6a30d363bc41e896029f8af Mon Sep 17 00:00:00 2001 |
104 |
+From: Sebastian Dröge <slomo@××××××.org> |
105 |
+Date: Tue, 15 Dec 2009 12:24:25 +0000 |
106 |
+Subject: Bug 588338 - Enable linux specific features on armel |
107 |
+ |
108 |
+--- |
109 |
+diff --git a/configure.in b/configure.in |
110 |
+index b0bbaec..e4b684e 100644 |
111 |
+--- a/configure.in |
112 |
++++ b/configure.in |
113 |
+@@ -176,7 +176,7 @@ fi |
114 |
+ |
115 |
+ dnl check what OS we're on |
116 |
+ #AM_CONDITIONAL(HAVE_LINUX, test x$target_os = xlinux-gnu) |
117 |
+-if test x$target_os = xlinux-gnu; then |
118 |
++if test x$target_os = xlinux-gnu -o x$target_os = xlinux-gnueabi; then |
119 |
+ AC_DEFINE([HAVE_LINUX],[],[Whether we are using linux or not]) |
120 |
+ fi |
121 |
+ |
122 |
+@@ -223,7 +223,7 @@ fi |
123 |
+ dnl check if inotify backend is enabled |
124 |
+ AM_CONDITIONAL(ENABLE_INOTIFY, test x$inotify = xtrue) |
125 |
+ |
126 |
+-if test x$os = xlinux-gnu; then |
127 |
++if test x$os = xlinux-gnu -o x$os = xlinux-gnueabi; then |
128 |
+ AC_ARG_ENABLE(dnotify, |
129 |
+ AC_HELP_STRING([--disable-dnotify], [Disable the DNotify backend]), |
130 |
+ [dnotify="${enableval}"], [dnotify=true]) |
131 |
+@@ -297,10 +297,12 @@ else |
132 |
+ fi |
133 |
+ |
134 |
+ dnl Use weak symbols on linux/gcc to avoid imposing libpthreads to apps |
135 |
+-if test x$os = xlinux-gnu -a x$WITH_THREADS = x1 ; then |
136 |
+- if test "${CC}" = "gcc" ; then |
137 |
+- echo Use weak symbols ! |
138 |
+- THREAD_LIBS= |
139 |
++if test x$os = xlinux-gnu -o x$os = xlinux-gnueabi ; then |
140 |
++ if test x$WITH_THREADS = x1 ; then |
141 |
++ if test "${CC}" = "gcc" ; then |
142 |
++ echo Use weak symbols ! |
143 |
++ THREAD_LIBS= |
144 |
++ fi |
145 |
+ fi |
146 |
+ fi |
147 |
+ AC_SUBST(THREAD_LIBS) |
148 |
+-- |
149 |
+cgit v0.9.0.2 |
150 |
|
151 |
diff --git a/dev-libs/libgamin/files/libgamin-0.1.10-compilewarnings.patch b/dev-libs/libgamin/files/libgamin-0.1.10-compilewarnings.patch |
152 |
new file mode 100644 |
153 |
index 0000000..d3e0931 |
154 |
--- /dev/null |
155 |
+++ b/dev-libs/libgamin/files/libgamin-0.1.10-compilewarnings.patch |
156 |
@@ -0,0 +1,22 @@ |
157 |
+--- gamin-0.1.9/lib/gam_error.h.1 2007-08-15 01:09:13.000000000 +0200 |
158 |
++++ gamin-0.1.9/lib/gam_error.h 2007-08-15 01:09:27.000000000 +0200 |
159 |
+@@ -47,6 +47,9 @@ |
160 |
+ |
161 |
+ int gam_errno(void); |
162 |
+ |
163 |
++void gam_error_init(void); |
164 |
++void gam_error_check(void); |
165 |
++ |
166 |
+ #ifdef GAM_DEBUG_ENABLED |
167 |
+ |
168 |
+ #ifdef GAMIN_DEBUG_API |
169 |
+@@ -70,9 +73,6 @@ |
170 |
+ const char* format, ...); |
171 |
+ #define GAM_DEBUG if (gam_debug_active) gam_debug |
172 |
+ |
173 |
+-void gam_error_init(void); |
174 |
+-void gam_error_check(void); |
175 |
+- |
176 |
+ #else |
177 |
+ /* |
178 |
+ * no debug, redefine the macro empty content |
179 |
|
180 |
diff --git a/dev-libs/libgamin/files/libgamin-0.1.10-crosscompile-fix.patch b/dev-libs/libgamin/files/libgamin-0.1.10-crosscompile-fix.patch |
181 |
new file mode 100644 |
182 |
index 0000000..ce3a15b |
183 |
--- /dev/null |
184 |
+++ b/dev-libs/libgamin/files/libgamin-0.1.10-crosscompile-fix.patch |
185 |
@@ -0,0 +1,38 @@ |
186 |
+--- configure.in.orig 2009-04-26 23:00:43.445135823 +0300 |
187 |
++++ configure.in 2009-04-26 23:25:04.042489243 +0300 |
188 |
+@@ -389,8 +389,7 @@ |
189 |
+ |
190 |
+ AC_MSG_CHECKING(abstract socket namespace) |
191 |
+ AC_LANG_PUSH(C) |
192 |
+-AC_RUN_IFELSE([AC_LANG_PROGRAM( |
193 |
+-[[ |
194 |
++AC_TRY_RUN([ |
195 |
+ #include <sys/types.h> |
196 |
+ #include <stdlib.h> |
197 |
+ #include <string.h> |
198 |
+@@ -398,8 +397,8 @@ |
199 |
+ #include <sys/socket.h> |
200 |
+ #include <sys/un.h> |
201 |
+ #include <errno.h> |
202 |
+-]], |
203 |
+-[[ |
204 |
++ |
205 |
++int main() { |
206 |
+ int listen_fd; |
207 |
+ struct sockaddr_un addr; |
208 |
+ |
209 |
+@@ -424,9 +423,11 @@ |
210 |
+ } |
211 |
+ else |
212 |
+ exit (0); |
213 |
+-]])], |
214 |
+- [have_abstract_sockets=yes], |
215 |
+- [have_abstract_sockets=no]) |
216 |
++} |
217 |
++], |
218 |
++have_abstract_sockets=yes, |
219 |
++have_abstract_sockets=no, |
220 |
++have_abstract_sockets=no) |
221 |
+ AC_LANG_POP(C) |
222 |
+ AC_MSG_RESULT($have_abstract_sockets) |
223 |
+ |
224 |
|
225 |
diff --git a/dev-libs/libgamin/files/libgamin-0.1.10-deadlock.patch b/dev-libs/libgamin/files/libgamin-0.1.10-deadlock.patch |
226 |
new file mode 100644 |
227 |
index 0000000..9f2b2a5 |
228 |
--- /dev/null |
229 |
+++ b/dev-libs/libgamin/files/libgamin-0.1.10-deadlock.patch |
230 |
@@ -0,0 +1,65 @@ |
231 |
+From cc14440eface093548cb3bc7814da11d9a99d283 Mon Sep 17 00:00:00 2001 |
232 |
+From: Anssi Hannula <anssi@××××××.org> |
233 |
+Date: Wed, 4 Jan 2012 00:23:55 +0200 |
234 |
+Subject: [PATCH] fix possible server deadlock in ih_sub_cancel |
235 |
+ |
236 |
+ih_sub_foreach() calls ih_sub_cancel() while inotify_lock is locked. |
237 |
+However, ih_sub_cancel() locks it again, and locking GMutex recursively |
238 |
+causes undefined behaviour. |
239 |
+ |
240 |
+Fix that by removing locking from ih_sub_cancel() as ih_sub_foreach() |
241 |
+is its only user. Also make the function static so that it won't |
242 |
+accidentally get used by other files without locking (inotify-helper.h |
243 |
+is an internal server header). |
244 |
+ |
245 |
+This should fix the intermittent deadlocks I've been experiencing |
246 |
+causing KDE applications to no longer start, and probably also |
247 |
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=542361 |
248 |
+--- |
249 |
+ server/inotify-helper.c | 7 ++----- |
250 |
+ server/inotify-helper.h | 1 - |
251 |
+ 2 files changed, 2 insertions(+), 6 deletions(-) |
252 |
+ |
253 |
+diff --git a/server/inotify-helper.c b/server/inotify-helper.c |
254 |
+index d77203e..0789fa4 100644 |
255 |
+--- a/server/inotify-helper.c |
256 |
++++ b/server/inotify-helper.c |
257 |
+@@ -123,13 +123,11 @@ ih_sub_add (ih_sub_t * sub) |
258 |
+ |
259 |
+ /** |
260 |
+ * Cancels a subscription which was being monitored. |
261 |
++ * inotify_lock must be held when calling. |
262 |
+ */ |
263 |
+-gboolean |
264 |
++static gboolean |
265 |
+ ih_sub_cancel (ih_sub_t * sub) |
266 |
+ { |
267 |
+- G_LOCK(inotify_lock); |
268 |
+- |
269 |
+- |
270 |
+ if (!sub->cancelled) |
271 |
+ { |
272 |
+ IH_W("cancelling %s\n", sub->pathname); |
273 |
+@@ -140,7 +138,6 @@ ih_sub_cancel (ih_sub_t * sub) |
274 |
+ sub_list = g_list_remove (sub_list, sub); |
275 |
+ } |
276 |
+ |
277 |
+- G_UNLOCK(inotify_lock); |
278 |
+ return TRUE; |
279 |
+ } |
280 |
+ |
281 |
+diff --git a/server/inotify-helper.h b/server/inotify-helper.h |
282 |
+index 5d3b6d0..d36b5fd 100644 |
283 |
+--- a/server/inotify-helper.h |
284 |
++++ b/server/inotify-helper.h |
285 |
+@@ -34,7 +34,6 @@ gboolean ih_startup (event_callback_t ecb, |
286 |
+ found_callback_t fcb); |
287 |
+ gboolean ih_running (void); |
288 |
+ gboolean ih_sub_add (ih_sub_t *sub); |
289 |
+-gboolean ih_sub_cancel (ih_sub_t *sub); |
290 |
+ |
291 |
+ /* Return FALSE from 'f' if the subscription should be cancelled */ |
292 |
+ void ih_sub_foreach (void *callerdata, gboolean (*f)(ih_sub_t *sub, void *callerdata)); |
293 |
+-- |
294 |
+1.7.7.2 |
295 |
+ |
296 |
|
297 |
diff --git a/dev-libs/libgamin/files/libgamin-0.1.10-disable_python_static_library.patch b/dev-libs/libgamin/files/libgamin-0.1.10-disable_python_static_library.patch |
298 |
new file mode 100644 |
299 |
index 0000000..562fc07 |
300 |
--- /dev/null |
301 |
+++ b/dev-libs/libgamin/files/libgamin-0.1.10-disable_python_static_library.patch |
302 |
@@ -0,0 +1,13 @@ |
303 |
+--- python/Makefile.am |
304 |
++++ python/Makefile.am |
305 |
+@@ -10,8 +10,9 @@ |
306 |
+ python_LTLIBRARIES = _gamin.la |
307 |
+ |
308 |
+ _gamin_la_SOURCES = gamin.c |
309 |
++_gamin_la_CFLAGS = -shared |
310 |
+ _gamin_la_LIBADD = $(top_builddir)/libgamin/libgamin-1.la |
311 |
+-_gamin_la_LDFLAGS = -module -avoid-version |
312 |
++_gamin_la_LDFLAGS = -module -avoid-version -shared |
313 |
+ |
314 |
+ python_PYTHON = gamin.py |
315 |
+ |
316 |
|
317 |
diff --git a/dev-libs/libgamin/files/libgamin-0.1.10-fix-pthread-mutex.patch b/dev-libs/libgamin/files/libgamin-0.1.10-fix-pthread-mutex.patch |
318 |
new file mode 100644 |
319 |
index 0000000..c8c5b00 |
320 |
--- /dev/null |
321 |
+++ b/dev-libs/libgamin/files/libgamin-0.1.10-fix-pthread-mutex.patch |
322 |
@@ -0,0 +1,11 @@ |
323 |
+--- gamin-0.1.10.orig/libgamin/gam_data.c |
324 |
++++ gamin-0.1.10/libgamin/gam_data.c |
325 |
+@@ -470,7 +470,7 @@ |
326 |
+ } |
327 |
+ if (is_threaded > 0) { |
328 |
+ pthread_mutexattr_init(&attr); |
329 |
+-#if defined(linux) || defined(PTHREAD_MUTEX_RECURSIVE_NP) |
330 |
++#if defined(linux) && defined(PTHREAD_MUTEX_RECURSIVE_NP) |
331 |
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP); |
332 |
+ #else |
333 |
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); |
334 |
|
335 |
diff --git a/dev-libs/libgamin/files/libgamin-0.1.10-noinst-lib.patch b/dev-libs/libgamin/files/libgamin-0.1.10-noinst-lib.patch |
336 |
new file mode 100644 |
337 |
index 0000000..1f2fcff |
338 |
--- /dev/null |
339 |
+++ b/dev-libs/libgamin/files/libgamin-0.1.10-noinst-lib.patch |
340 |
@@ -0,0 +1,76 @@ |
341 |
+From e68aacc084d65fd0780991265444061b24422bd0 Mon Sep 17 00:00:00 2001 |
342 |
+From: Remi Cardona <remi@g.o> |
343 |
+Date: Mon, 20 Oct 2008 19:17:36 +0200 |
344 |
+Subject: [PATCH] make libgamin_shared a "noinst" libtool helper lib |
345 |
+ |
346 |
+--- |
347 |
+ lib/Makefile.am | 4 ++-- |
348 |
+ libgamin/Makefile.am | 15 ++------------- |
349 |
+ server/Makefile.am | 2 +- |
350 |
+ 3 files changed, 5 insertions(+), 16 deletions(-) |
351 |
+ |
352 |
+diff --git a/lib/Makefile.am b/lib/Makefile.am |
353 |
+index 3e2289c..af2152a 100644 |
354 |
+--- a/lib/Makefile.am |
355 |
++++ b/lib/Makefile.am |
356 |
+@@ -7,9 +7,9 @@ if GAMIN_DEBUG |
357 |
+ INCLUDES += -DGAM_DEBUG_ENABLED |
358 |
+ endif |
359 |
+ |
360 |
+-lib_LIBRARIES = libgamin_shared.a |
361 |
++noinst_LTLIBRARIES = libgamin_shared.la |
362 |
+ |
363 |
+-libgamin_shared_a_SOURCES = \ |
364 |
++libgamin_shared_la_SOURCES = \ |
365 |
+ gam_event.c \ |
366 |
+ gam_event.h \ |
367 |
+ gam_error.c \ |
368 |
+diff --git a/libgamin/Makefile.am b/libgamin/Makefile.am |
369 |
+index 35aa740..14fc06b 100644 |
370 |
+--- a/libgamin/Makefile.am |
371 |
++++ b/libgamin/Makefile.am |
372 |
+@@ -25,19 +25,9 @@ libgamin_1_la_SOURCES = \ |
373 |
+ gam_data.h \ |
374 |
+ gam_fork.c \ |
375 |
+ gam_fork.h \ |
376 |
+- gam_protocol.h \ |
377 |
+- gam_error.c \ |
378 |
+- gam_event.c |
379 |
++ gam_protocol.h |
380 |
+ |
381 |
+-gam_error.c: $(top_srcdir)/lib/gam_error.c |
382 |
+- @(cp $(top_srcdir)/lib/gam_error.c gam_error.c) |
383 |
+- |
384 |
+-gam_event.c: $(top_srcdir)/lib/gam_event.c |
385 |
+- @(cp $(top_srcdir)/lib/gam_event.c gam_event.c) |
386 |
+- |
387 |
+-CLEANFILES=gam_error.c gam_event.c |
388 |
+- |
389 |
+-libgamin_1_la_LIBADD = |
390 |
++libgamin_1_la_LIBADD = $(top_builddir)/lib/libgamin_shared.la |
391 |
+ |
392 |
+ libgamin_1_la_LDFLAGS = -Wl,--version-script=$(srcdir)/gamin_sym.version \ |
393 |
+ -version-info @GAMIN_VERSION_INFO@ @THREAD_LIBS@ |
394 |
+@@ -54,6 +44,5 @@ noinst_PROGRAMS= gamin |
395 |
+ |
396 |
+ gamin_SOURCES = gamin.c |
397 |
+ gamin_LDFLAGS = |
398 |
+-gamin_DEPENDENCIES = $(DEPS) libgamin-1.la |
399 |
+ gamin_LDADD= $(LDADDS) libgamin-1.la |
400 |
+ |
401 |
+diff --git a/server/Makefile.am b/server/Makefile.am |
402 |
+index 37aed8b..6aa5e02 100644 |
403 |
+--- a/server/Makefile.am |
404 |
++++ b/server/Makefile.am |
405 |
+@@ -80,7 +80,7 @@ endif |
406 |
+ |
407 |
+ gam_server_LDFLAGS = |
408 |
+ gam_server_DEPENDENCIES = $(DEPS) |
409 |
+-gam_server_LDADD= $(top_builddir)/lib/libgamin_shared.a $(LDADDS) $(DAEMON_LIBS) |
410 |
++gam_server_LDADD= $(top_builddir)/lib/libgamin_shared.la $(LDADDS) $(DAEMON_LIBS) |
411 |
+ |
412 |
+ if ENABLE_HURD_MACH_NOTIFY |
413 |
+ gam_server_LDADD += -lports -lthreads |
414 |
+-- |
415 |
+1.6.0.2 |
416 |
+ |
417 |
|
418 |
diff --git a/dev-libs/libgamin/libgamin-0.1.10-r99.ebuild b/dev-libs/libgamin/libgamin-0.1.10-r99.ebuild |
419 |
new file mode 100644 |
420 |
index 0000000..176ddde |
421 |
--- /dev/null |
422 |
+++ b/dev-libs/libgamin/libgamin-0.1.10-r99.ebuild |
423 |
@@ -0,0 +1,142 @@ |
424 |
+# Copyright 1999-2014 Gentoo Foundation |
425 |
+# Distributed under the terms of the GNU General Public License v2 |
426 |
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libgamin/libgamin-0.1.10-r5.ebuild,v 1.12 2014/12/06 16:40:07 ago Exp $ |
427 |
+ |
428 |
+EAPI="5" |
429 |
+ |
430 |
+PYTHON_COMPAT=( python{2_6,2_7} ) |
431 |
+GNOME_ORG_MODULE="gamin" |
432 |
+GNOME_TARBALL_SUFFIX="bz2" |
433 |
+ |
434 |
+inherit autotools eutils flag-o-matic libtool python-r1 gnome.org multilib-minimal |
435 |
+ |
436 |
+DESCRIPTION="Library providing the FAM File Alteration Monitor API" |
437 |
+HOMEPAGE="http://www.gnome.org/~veillard/gamin/" |
438 |
+SRC_URI="${SRC_URI} |
439 |
+ mirror://gentoo/gamin-0.1.9-freebsd.patch.bz2 |
440 |
+ http://dev.gentoo.org/~grobian/patches/libgamin-0.1.10-opensolaris.patch.bz2 |
441 |
+ http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz" # pkg.m4 for eautoreconf |
442 |
+ |
443 |
+LICENSE="LGPL-2" |
444 |
+SLOT="0" |
445 |
+KEYWORDS="amd64 arm ~mips ppc x86" |
446 |
+IUSE="debug kernel_linux python static-libs" |
447 |
+ |
448 |
+RESTRICT="test" # needs gam-server |
449 |
+ |
450 |
+RDEPEND="!app-admin/fam |
451 |
+ !<app-admin/gamin-0.1.10" |
452 |
+DEPEND="${RDEPEND}" |
453 |
+ |
454 |
+src_prepare() { |
455 |
+ mv "${WORKDIR}"/pkg-config-*/pkg.m4 "${WORKDIR}"/ || die |
456 |
+ |
457 |
+ # Fix QA warnings, bug #257281, upstream #466791 |
458 |
+ epatch "${FILESDIR}"/${PN}-0.1.10-compilewarnings.patch |
459 |
+ |
460 |
+ if [[ ${CHOST} != *-solaris* ]] ; then |
461 |
+ # Fix compile warnings; bug #188923 |
462 |
+ epatch "${DISTDIR}"/gamin-0.1.9-freebsd.patch.bz2 |
463 |
+ else |
464 |
+ # (Open)Solaris necessary patches (changes configure.in), unfortunately |
465 |
+ # conflicts with freebsd patch and breaks some linux installs so it must |
466 |
+ # only be applied if on solaris. |
467 |
+ epatch "${DISTDIR}"/${P}-opensolaris.patch.bz2 |
468 |
+ fi |
469 |
+ |
470 |
+ # Fix collision problem due to intermediate library, upstream bug #530635 |
471 |
+ epatch "${FILESDIR}"/${PN}-0.1.10-noinst-lib.patch |
472 |
+ |
473 |
+ # Fix compilation with latest glib, bug #382783 |
474 |
+ epatch "${FILESDIR}/${PN}-0.1.10-G_CONST_RETURN-removal.patch" |
475 |
+ |
476 |
+ # Fix crosscompilation issues, bug #267604 |
477 |
+ epatch "${FILESDIR}/${PN}-0.1.10-crosscompile-fix.patch" |
478 |
+ |
479 |
+ # Enable linux specific features on armel, upstream bug #588338 |
480 |
+ epatch "${FILESDIR}/${P}-armel-features.patch" |
481 |
+ |
482 |
+ # Fix possible server deadlock in ih_sub_cancel, upstream bug #667230 |
483 |
+ epatch "${FILESDIR}/${PN}-0.1.10-deadlock.patch" |
484 |
+ |
485 |
+ # Drop DEPRECATED flags |
486 |
+ sed -i -e 's:-DG_DISABLE_DEPRECATED:$(NULL):g' server/Makefile.am || die |
487 |
+ |
488 |
+ # Build only shared version of Python module. |
489 |
+ epatch "${FILESDIR}"/${PN}-0.1.10-disable_python_static_library.patch |
490 |
+ |
491 |
+ # Fix build on musl |
492 |
+ epatch "${FILESDIR}"/${PN}-0.1.10-fix-pthread-mutex.patch |
493 |
+ |
494 |
+ sed -i \ |
495 |
+ -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' \ |
496 |
+ -e 's:AM_PROG_CC_STDC:AC_PROG_CC:' \ |
497 |
+ configure.in || die #466962 |
498 |
+ |
499 |
+ # autoconf is required as the user-cflags patch modifies configure.in |
500 |
+ # however, elibtoolize is also required, so when the above patch is |
501 |
+ # removed, replace the following call with a call to elibtoolize |
502 |
+ AT_M4DIR="${WORKDIR}" eautoreconf |
503 |
+} |
504 |
+ |
505 |
+multilib_src_configure() { |
506 |
+ local myconf=( |
507 |
+ $(use_enable static-libs static) |
508 |
+ --disable-debug |
509 |
+ --disable-server |
510 |
+ $(use_enable kernel_linux inotify) |
511 |
+ $(use_enable debug debug-api) |
512 |
+ --without-python |
513 |
+ ) |
514 |
+ local ECONF_SOURCE=${S} |
515 |
+ |
516 |
+ econf "${myconf[@]}" |
517 |
+ if multilib_is_native_abi && use python; then |
518 |
+ python_configure() { |
519 |
+ mkdir -p "${BUILD_DIR}" || die |
520 |
+ cd "${BUILD_DIR}" || die |
521 |
+ econf "${myconf[@]}" --with-python |
522 |
+ } |
523 |
+ |
524 |
+ python_parallel_foreach_impl python_configure |
525 |
+ fi |
526 |
+} |
527 |
+ |
528 |
+multilib_src_compile() { |
529 |
+ default |
530 |
+ |
531 |
+ if multilib_is_native_abi && use python; then |
532 |
+ local native_builddir=${BUILD_DIR} |
533 |
+ |
534 |
+ python_compile() { |
535 |
+ emake -C "${BUILD_DIR}"/python \ |
536 |
+ VPATH="${native_builddir}/python:${S}/python" \ |
537 |
+ _gamin_la_LIBADD="${native_builddir}/libgamin/libgamin-1.la" |
538 |
+ } |
539 |
+ |
540 |
+ python_foreach_impl python_compile |
541 |
+ fi |
542 |
+} |
543 |
+ |
544 |
+multilib_src_install() { |
545 |
+ emake DESTDIR="${D}" install |
546 |
+ |
547 |
+ if multilib_is_native_abi && use python; then |
548 |
+ local native_builddir=${BUILD_DIR} |
549 |
+ |
550 |
+ python_install() { |
551 |
+ emake -C "${BUILD_DIR}"/python \ |
552 |
+ DESTDIR="${D}" install \ |
553 |
+ VPATH="${native_builddir}/python:${S}/python" |
554 |
+ } |
555 |
+ |
556 |
+ python_foreach_impl python_install |
557 |
+ fi |
558 |
+} |
559 |
+ |
560 |
+multilib_src_install_all() { |
561 |
+ dodoc AUTHORS ChangeLog README TODO NEWS doc/*txt |
562 |
+ dohtml doc/* |
563 |
+ |
564 |
+ prune_libtool_files --all |
565 |
+} |
566 |
|
567 |
diff --git a/dev-libs/libgamin/metadata.xml b/dev-libs/libgamin/metadata.xml |
568 |
new file mode 100644 |
569 |
index 0000000..8c86806 |
570 |
--- /dev/null |
571 |
+++ b/dev-libs/libgamin/metadata.xml |
572 |
@@ -0,0 +1,8 @@ |
573 |
+<?xml version="1.0" encoding="UTF-8"?> |
574 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
575 |
+<pkgmetadata> |
576 |
+<herd>freedesktop</herd> |
577 |
+<maintainer> |
578 |
+<email>freedesktop-bugs@g.o</email> |
579 |
+</maintainer> |
580 |
+</pkgmetadata> |