1 |
commit: 3f0f2ae04e2fe912dc273b385dd59c99ac47c56e |
2 |
Author: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jan 4 12:47:08 2016 +0000 |
4 |
Commit: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 4 12:56:48 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f0f2ae0 |
7 |
|
8 |
x11-plugins/wminet: eapi bump, fix compilation with gcc 5, bug #569686 |
9 |
|
10 |
Package-Manager: portage-2.2.26 |
11 |
|
12 |
x11-plugins/wminet/files/wminet-3.0.0-list.patch | 300 +++++++++++++++++++++++ |
13 |
x11-plugins/wminet/wminet-3.0.0-r1.ebuild | 36 +++ |
14 |
2 files changed, 336 insertions(+) |
15 |
|
16 |
diff --git a/x11-plugins/wminet/files/wminet-3.0.0-list.patch b/x11-plugins/wminet/files/wminet-3.0.0-list.patch |
17 |
new file mode 100644 |
18 |
index 0000000..9b94f51 |
19 |
--- /dev/null |
20 |
+++ b/x11-plugins/wminet/files/wminet-3.0.0-list.patch |
21 |
@@ -0,0 +1,300 @@ |
22 |
+diff -Naur wminet-3.0.0.orig/src/list.c wminet-3.0.0/src/list.c |
23 |
+--- wminet-3.0.0.orig/src/list.c 2001-11-24 12:03:32.000000000 +0100 |
24 |
++++ wminet-3.0.0/src/list.c 2016-01-04 13:45:02.137642820 +0100 |
25 |
+@@ -38,7 +38,7 @@ |
26 |
+ |
27 |
+ /* Return a cons cell produced from (head . tail) */ |
28 |
+ |
29 |
+-INLINE LinkedList* |
30 |
++LinkedList* |
31 |
+ list_cons(void* head, LinkedList* tail) |
32 |
+ { |
33 |
+ LinkedList* cell; |
34 |
+@@ -51,7 +51,7 @@ |
35 |
+ |
36 |
+ /* Return the length of a list, list_length(NULL) returns zero */ |
37 |
+ |
38 |
+-INLINE int |
39 |
++int |
40 |
+ list_length(LinkedList* list) |
41 |
+ { |
42 |
+ int i = 0; |
43 |
+@@ -66,7 +66,7 @@ |
44 |
+ /* Return the Nth element of LIST, where N count from zero. If N |
45 |
+ larger than the list length, NULL is returned */ |
46 |
+ |
47 |
+-INLINE void* |
48 |
++void* |
49 |
+ list_nth(int index, LinkedList* list) |
50 |
+ { |
51 |
+ while(index-- != 0) |
52 |
+@@ -81,7 +81,7 @@ |
53 |
+ |
54 |
+ /* Remove the element at the head by replacing it by its successor */ |
55 |
+ |
56 |
+-INLINE void |
57 |
++void |
58 |
+ list_remove_head(LinkedList** list) |
59 |
+ { |
60 |
+ if (!*list) return; |
61 |
+@@ -101,7 +101,7 @@ |
62 |
+ |
63 |
+ /* Remove the element with `car' set to ELEMENT */ |
64 |
+ /* |
65 |
+-INLINE void |
66 |
++void |
67 |
+ list_remove_elem(LinkedList** list, void* elem) |
68 |
+ { |
69 |
+ while (*list) |
70 |
+@@ -112,7 +112,7 @@ |
71 |
+ } |
72 |
+ }*/ |
73 |
+ |
74 |
+-INLINE LinkedList * |
75 |
++LinkedList * |
76 |
+ list_remove_elem(LinkedList* list, void* elem) |
77 |
+ { |
78 |
+ LinkedList *tmp; |
79 |
+@@ -132,7 +132,7 @@ |
80 |
+ |
81 |
+ /* Return element that has ELEM as car */ |
82 |
+ |
83 |
+-INLINE LinkedList* |
84 |
++LinkedList* |
85 |
+ list_find(LinkedList* list, void* elem) |
86 |
+ { |
87 |
+ while(list) |
88 |
+@@ -146,7 +146,7 @@ |
89 |
+ |
90 |
+ /* Free list (backwards recursive) */ |
91 |
+ |
92 |
+-INLINE void |
93 |
++void |
94 |
+ list_free(LinkedList* list) |
95 |
+ { |
96 |
+ if(list) |
97 |
+@@ -158,7 +158,7 @@ |
98 |
+ |
99 |
+ /* Map FUNCTION over all elements in LIST */ |
100 |
+ |
101 |
+-INLINE void |
102 |
++void |
103 |
+ list_mapcar(LinkedList* list, void(*function)(void*)) |
104 |
+ { |
105 |
+ while(list) |
106 |
+diff -Naur wminet-3.0.0.orig/src/list.c.orig wminet-3.0.0/src/list.c.orig |
107 |
+--- wminet-3.0.0.orig/src/list.c.orig 1970-01-01 01:00:00.000000000 +0100 |
108 |
++++ wminet-3.0.0/src/list.c.orig 2001-11-24 12:03:32.000000000 +0100 |
109 |
+@@ -0,0 +1,169 @@ |
110 |
++/* Generic single linked list to keep various information |
111 |
++ Copyright (C) 1993, 1994 Free Software Foundation, Inc. |
112 |
++ |
113 |
++ |
114 |
++Author: Kresten Krab Thorup |
115 |
++ |
116 |
++Many modifications by Alfredo K. Kojima |
117 |
++ |
118 |
++ |
119 |
++This file is part of GNU CC. |
120 |
++ |
121 |
++GNU CC is free software; you can redistribute it and/or modify |
122 |
++it under the terms of the GNU General Public License as published by |
123 |
++the Free Software Foundation; either version 2, or (at your option) |
124 |
++any later version. |
125 |
++ |
126 |
++GNU CC is distributed in the hope that it will be useful, |
127 |
++but WITHOUT ANY WARRANTY; without even the implied warranty of |
128 |
++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
129 |
++GNU General Public License for more details. |
130 |
++ |
131 |
++You should have received a copy of the GNU General Public License |
132 |
++along with GNU CC; see the file COPYING. If not, write to |
133 |
++the Free Software Foundation, 59 Temple Place - Suite 330, |
134 |
++Boston, MA 02111-1307, USA. */ |
135 |
++ |
136 |
++/* As a special exception, if you link this library with files compiled with |
137 |
++ GCC to produce an executable, this does not cause the resulting executable |
138 |
++ to be covered by the GNU General Public License. This exception does not |
139 |
++ however invalidate any other reasons why the executable file might be |
140 |
++ covered by the GNU General Public License. */ |
141 |
++ |
142 |
++#include "list.h" |
143 |
++#ifdef HAVE_SYS_TYPES_H |
144 |
++# include <sys/types.h> |
145 |
++#endif |
146 |
++#include <stdlib.h> |
147 |
++ |
148 |
++/* Return a cons cell produced from (head . tail) */ |
149 |
++ |
150 |
++INLINE LinkedList* |
151 |
++list_cons(void* head, LinkedList* tail) |
152 |
++{ |
153 |
++ LinkedList* cell; |
154 |
++ |
155 |
++ cell = (LinkedList*)malloc(sizeof(LinkedList)); |
156 |
++ cell->head = head; |
157 |
++ cell->tail = tail; |
158 |
++ return cell; |
159 |
++} |
160 |
++ |
161 |
++/* Return the length of a list, list_length(NULL) returns zero */ |
162 |
++ |
163 |
++INLINE int |
164 |
++list_length(LinkedList* list) |
165 |
++{ |
166 |
++ int i = 0; |
167 |
++ while(list) |
168 |
++ { |
169 |
++ i += 1; |
170 |
++ list = list->tail; |
171 |
++ } |
172 |
++ return i; |
173 |
++} |
174 |
++ |
175 |
++/* Return the Nth element of LIST, where N count from zero. If N |
176 |
++ larger than the list length, NULL is returned */ |
177 |
++ |
178 |
++INLINE void* |
179 |
++list_nth(int index, LinkedList* list) |
180 |
++{ |
181 |
++ while(index-- != 0) |
182 |
++ { |
183 |
++ if(list->tail) |
184 |
++ list = list->tail; |
185 |
++ else |
186 |
++ return 0; |
187 |
++ } |
188 |
++ return list->head; |
189 |
++} |
190 |
++ |
191 |
++/* Remove the element at the head by replacing it by its successor */ |
192 |
++ |
193 |
++INLINE void |
194 |
++list_remove_head(LinkedList** list) |
195 |
++{ |
196 |
++ if (!*list) return; |
197 |
++ if ((*list)->tail) |
198 |
++ { |
199 |
++ LinkedList* tail = (*list)->tail; /* fetch next */ |
200 |
++ *(*list) = *tail; /* copy next to list head */ |
201 |
++ free(tail); /* free next */ |
202 |
++ } |
203 |
++ else /* only one element in list */ |
204 |
++ { |
205 |
++ free(*list); |
206 |
++ (*list) = 0; |
207 |
++ } |
208 |
++} |
209 |
++ |
210 |
++ |
211 |
++/* Remove the element with `car' set to ELEMENT */ |
212 |
++/* |
213 |
++INLINE void |
214 |
++list_remove_elem(LinkedList** list, void* elem) |
215 |
++{ |
216 |
++ while (*list) |
217 |
++ { |
218 |
++ if ((*list)->head == elem) |
219 |
++ list_remove_head(list); |
220 |
++ *list = (*list ? (*list)->tail : NULL); |
221 |
++ } |
222 |
++}*/ |
223 |
++ |
224 |
++INLINE LinkedList * |
225 |
++list_remove_elem(LinkedList* list, void* elem) |
226 |
++{ |
227 |
++ LinkedList *tmp; |
228 |
++ |
229 |
++ if (list) { |
230 |
++ if (list->head == elem) { |
231 |
++ tmp = list->tail; |
232 |
++ free(list); |
233 |
++ return tmp; |
234 |
++ } |
235 |
++ list->tail = list_remove_elem(list->tail, elem); |
236 |
++ return list; |
237 |
++ } |
238 |
++ return NULL; |
239 |
++} |
240 |
++ |
241 |
++ |
242 |
++/* Return element that has ELEM as car */ |
243 |
++ |
244 |
++INLINE LinkedList* |
245 |
++list_find(LinkedList* list, void* elem) |
246 |
++{ |
247 |
++ while(list) |
248 |
++ { |
249 |
++ if (list->head == elem) |
250 |
++ return list; |
251 |
++ list = list->tail; |
252 |
++ } |
253 |
++ return NULL; |
254 |
++} |
255 |
++ |
256 |
++/* Free list (backwards recursive) */ |
257 |
++ |
258 |
++INLINE void |
259 |
++list_free(LinkedList* list) |
260 |
++{ |
261 |
++ if(list) |
262 |
++ { |
263 |
++ list_free(list->tail); |
264 |
++ free(list); |
265 |
++ } |
266 |
++} |
267 |
++ |
268 |
++/* Map FUNCTION over all elements in LIST */ |
269 |
++ |
270 |
++INLINE void |
271 |
++list_mapcar(LinkedList* list, void(*function)(void*)) |
272 |
++{ |
273 |
++ while(list) |
274 |
++ { |
275 |
++ (*function)(list->head); |
276 |
++ list = list->tail; |
277 |
++ } |
278 |
++} |
279 |
+diff -Naur wminet-3.0.0.orig/src/list.h wminet-3.0.0/src/list.h |
280 |
+--- wminet-3.0.0.orig/src/list.h 2001-11-24 12:03:32.000000000 +0100 |
281 |
++++ wminet-3.0.0/src/list.h 2016-01-04 13:45:02.137642820 +0100 |
282 |
+@@ -29,31 +29,25 @@ |
283 |
+ #ifndef __LIST_H_ |
284 |
+ #define __LIST_H_ |
285 |
+ |
286 |
+-#if defined(__GNUC__) && !defined(__STRICT_ANSI__) |
287 |
+-# define INLINE inline |
288 |
+-#else |
289 |
+-# define INLINE |
290 |
+-#endif |
291 |
+- |
292 |
+ typedef struct LinkedList { |
293 |
+ void *head; |
294 |
+ struct LinkedList *tail; |
295 |
+ } LinkedList; |
296 |
+ |
297 |
+-INLINE LinkedList* list_cons(void* head, LinkedList* tail); |
298 |
++LinkedList* list_cons(void* head, LinkedList* tail); |
299 |
+ |
300 |
+-INLINE int list_length(LinkedList* list); |
301 |
++int list_length(LinkedList* list); |
302 |
+ |
303 |
+-INLINE void* list_nth(int index, LinkedList* list); |
304 |
++void* list_nth(int index, LinkedList* list); |
305 |
+ |
306 |
+-INLINE void list_remove_head(LinkedList** list); |
307 |
++void list_remove_head(LinkedList** list); |
308 |
+ |
309 |
+-INLINE LinkedList *list_remove_elem(LinkedList* list, void* elem); |
310 |
++LinkedList *list_remove_elem(LinkedList* list, void* elem); |
311 |
+ |
312 |
+-INLINE void list_mapcar(LinkedList* list, void(*function)(void*)); |
313 |
++void list_mapcar(LinkedList* list, void(*function)(void*)); |
314 |
+ |
315 |
+-INLINE LinkedList*list_find(LinkedList* list, void* elem); |
316 |
++LinkedList*list_find(LinkedList* list, void* elem); |
317 |
+ |
318 |
+-INLINE void list_free(LinkedList* list); |
319 |
++void list_free(LinkedList* list); |
320 |
+ |
321 |
+ #endif |
322 |
|
323 |
diff --git a/x11-plugins/wminet/wminet-3.0.0-r1.ebuild b/x11-plugins/wminet/wminet-3.0.0-r1.ebuild |
324 |
new file mode 100644 |
325 |
index 0000000..0a95346 |
326 |
--- /dev/null |
327 |
+++ b/x11-plugins/wminet/wminet-3.0.0-r1.ebuild |
328 |
@@ -0,0 +1,36 @@ |
329 |
+# Copyright 1999-2016 Gentoo Foundation |
330 |
+# Distributed under the terms of the GNU General Public License v2 |
331 |
+# $Id$ |
332 |
+ |
333 |
+EAPI=5 |
334 |
+inherit eutils toolchain-funcs |
335 |
+ |
336 |
+DESCRIPTION="dockapp for monitoring internet connections to and from your computer" |
337 |
+HOMEPAGE="http://www.swanson.ukfsn.org/#wminet" |
338 |
+SRC_URI="http://www.swanson.ukfsn.org/wmdock/${P}.tar.gz" |
339 |
+ |
340 |
+LICENSE="GPL-2" |
341 |
+SLOT="0" |
342 |
+KEYWORDS="~amd64 ~ppc ~sparc ~x86" |
343 |
+IUSE="" |
344 |
+ |
345 |
+RDEPEND="x11-libs/libX11 |
346 |
+ x11-libs/libXext |
347 |
+ x11-libs/libXpm" |
348 |
+DEPEND="${RDEPEND} |
349 |
+ x11-proto/xextproto" |
350 |
+ |
351 |
+src_prepare() { |
352 |
+ epatch "${FILESDIR}"/${P}-list.patch |
353 |
+ |
354 |
+ tc-export CC |
355 |
+} |
356 |
+ |
357 |
+src_compile() { |
358 |
+ emake LDFLAGS="${LDFLAGS}" |
359 |
+} |
360 |
+ |
361 |
+src_install() { |
362 |
+ emake DESTDIR="${D}" install |
363 |
+ dodoc AUTHORS ChangeLog NEWS README wminetrc |
364 |
+} |