1 |
commit: 405b8247f89a09745eb2d17ece349a1631bdcf5a |
2 |
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org> |
3 |
AuthorDate: Thu Aug 15 18:25:08 2019 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Aug 16 17:02:24 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=405b8247 |
7 |
|
8 |
app-i18n/libchewing: Fix building with USE="test" and sys-libs/ncurses[tinfo]. |
9 |
|
10 |
Fixes: https://bugs.gentoo.org/690272 |
11 |
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org> |
12 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
13 |
|
14 |
...chewing-0.5.1-autoconf-archive-2019.01.06.patch | 809 +++++++++++++++++++++ |
15 |
app-i18n/libchewing/libchewing-0.5.1.ebuild | 22 +- |
16 |
app-i18n/libchewing/libchewing-9999.ebuild | 22 +- |
17 |
3 files changed, 841 insertions(+), 12 deletions(-) |
18 |
|
19 |
diff --git a/app-i18n/libchewing/files/libchewing-0.5.1-autoconf-archive-2019.01.06.patch b/app-i18n/libchewing/files/libchewing-0.5.1-autoconf-archive-2019.01.06.patch |
20 |
new file mode 100644 |
21 |
index 00000000000..5db3d0a23ab |
22 |
--- /dev/null |
23 |
+++ b/app-i18n/libchewing/files/libchewing-0.5.1-autoconf-archive-2019.01.06.patch |
24 |
@@ -0,0 +1,809 @@ |
25 |
+https://github.com/chewing/libchewing/issues/308 |
26 |
+ |
27 |
+--- /m4/ax_pthread.m4 |
28 |
++++ /m4/ax_pthread.m4 |
29 |
+@@ -1,5 +1,5 @@ |
30 |
+ # =========================================================================== |
31 |
+-# http://www.gnu.org/software/autoconf-archive/ax_pthread.html |
32 |
++# https://www.gnu.org/software/autoconf-archive/ax_pthread.html |
33 |
+ # =========================================================================== |
34 |
+ # |
35 |
+ # SYNOPSIS |
36 |
+@@ -19,10 +19,10 @@ |
37 |
+ # is necessary on AIX to use the special cc_r compiler alias.) |
38 |
+ # |
39 |
+ # NOTE: You are assumed to not only compile your program with these flags, |
40 |
+-# but also link it with them as well. e.g. you should link with |
41 |
++# but also to link with them as well. For example, you might link with |
42 |
+ # $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS |
43 |
+ # |
44 |
+-# If you are only building threads programs, you may wish to use these |
45 |
++# If you are only building threaded programs, you may wish to use these |
46 |
+ # variables in your default LIBS, CFLAGS, and CC: |
47 |
+ # |
48 |
+ # LIBS="$PTHREAD_LIBS $LIBS" |
49 |
+@@ -30,8 +30,8 @@ |
50 |
+ # CC="$PTHREAD_CC" |
51 |
+ # |
52 |
+ # In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant |
53 |
+-# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name |
54 |
+-# (e.g. PTHREAD_CREATE_UNDETACHED on AIX). |
55 |
++# has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to |
56 |
++# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). |
57 |
+ # |
58 |
+ # Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the |
59 |
+ # PTHREAD_PRIO_INHERIT symbol is defined when compiling with |
60 |
+@@ -67,7 +67,7 @@ |
61 |
+ # Public License for more details. |
62 |
+ # |
63 |
+ # You should have received a copy of the GNU General Public License along |
64 |
+-# with this program. If not, see <http://www.gnu.org/licenses/>. |
65 |
++# with this program. If not, see <https://www.gnu.org/licenses/>. |
66 |
+ # |
67 |
+ # As a special exception, the respective Autoconf Macro's copyright owner |
68 |
+ # gives unlimited permission to copy, distribute and modify the configure |
69 |
+@@ -82,35 +82,40 @@ |
70 |
+ # modified version of the Autoconf Macro, you may extend this special |
71 |
+ # exception to the GPL to apply to your modified version as well. |
72 |
+ |
73 |
+-#serial 20 |
74 |
++#serial 24 |
75 |
+ |
76 |
+ AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) |
77 |
+ AC_DEFUN([AX_PTHREAD], [ |
78 |
+ AC_REQUIRE([AC_CANONICAL_HOST]) |
79 |
++AC_REQUIRE([AC_PROG_CC]) |
80 |
++AC_REQUIRE([AC_PROG_SED]) |
81 |
+ AC_LANG_PUSH([C]) |
82 |
+ ax_pthread_ok=no |
83 |
+ |
84 |
+ # We used to check for pthread.h first, but this fails if pthread.h |
85 |
+-# requires special compiler flags (e.g. on True64 or Sequent). |
86 |
++# requires special compiler flags (e.g. on Tru64 or Sequent). |
87 |
+ # It gets checked for in the link test anyway. |
88 |
+ |
89 |
+ # First of all, check if the user has set any of the PTHREAD_LIBS, |
90 |
+ # etcetera environment variables, and if threads linking works using |
91 |
+ # them: |
92 |
+-if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then |
93 |
+- save_CFLAGS="$CFLAGS" |
94 |
++if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then |
95 |
++ ax_pthread_save_CC="$CC" |
96 |
++ ax_pthread_save_CFLAGS="$CFLAGS" |
97 |
++ ax_pthread_save_LIBS="$LIBS" |
98 |
++ AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"]) |
99 |
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
100 |
+- save_LIBS="$LIBS" |
101 |
+ LIBS="$PTHREAD_LIBS $LIBS" |
102 |
+- AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) |
103 |
+- AC_TRY_LINK_FUNC(pthread_join, ax_pthread_ok=yes) |
104 |
+- AC_MSG_RESULT($ax_pthread_ok) |
105 |
+- if test x"$ax_pthread_ok" = xno; then |
106 |
++ AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS]) |
107 |
++ AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes]) |
108 |
++ AC_MSG_RESULT([$ax_pthread_ok]) |
109 |
++ if test "x$ax_pthread_ok" = "xno"; then |
110 |
+ PTHREAD_LIBS="" |
111 |
+ PTHREAD_CFLAGS="" |
112 |
+ fi |
113 |
+- LIBS="$save_LIBS" |
114 |
+- CFLAGS="$save_CFLAGS" |
115 |
++ CC="$ax_pthread_save_CC" |
116 |
++ CFLAGS="$ax_pthread_save_CFLAGS" |
117 |
++ LIBS="$ax_pthread_save_LIBS" |
118 |
+ fi |
119 |
+ |
120 |
+ # We must check for the threads library under a number of different |
121 |
+@@ -123,7 +128,7 @@ |
122 |
+ # which indicates that we try without any flags at all, and "pthread-config" |
123 |
+ # which is a program returning the flags for the Pth emulation library. |
124 |
+ |
125 |
+-ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" |
126 |
++ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" |
127 |
+ |
128 |
+ # The ordering *is* (sometimes) important. Some notes on the |
129 |
+ # individual items follow: |
130 |
+@@ -132,68 +137,225 @@ |
131 |
+ # none: in case threads are in libc; should be tried before -Kthread and |
132 |
+ # other compiler flags to prevent continual compiler warnings |
133 |
+ # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) |
134 |
+-# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) |
135 |
+-# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) |
136 |
+-# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) |
137 |
+-# -pthreads: Solaris/gcc |
138 |
+-# -mthreads: Mingw32/gcc, Lynx/gcc |
139 |
++# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 |
140 |
++# (Note: HP C rejects this with "bad form for `-t' option") |
141 |
++# -pthreads: Solaris/gcc (Note: HP C also rejects) |
142 |
+ # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it |
143 |
+-# doesn't hurt to check since this sometimes defines pthreads too; |
144 |
+-# also defines -D_REENTRANT) |
145 |
+-# ... -mt is also the pthreads flag for HP/aCC |
146 |
++# doesn't hurt to check since this sometimes defines pthreads and |
147 |
++# -D_REENTRANT too), HP C (must be checked before -lpthread, which |
148 |
++# is present but should not be used directly; and before -mthreads, |
149 |
++# because the compiler interprets this as "-mt" + "-hreads") |
150 |
++# -mthreads: Mingw32/gcc, Lynx/gcc |
151 |
+ # pthread: Linux, etcetera |
152 |
+ # --thread-safe: KAI C++ |
153 |
+ # pthread-config: use pthread-config program (for GNU Pth library) |
154 |
+ |
155 |
+-case ${host_os} in |
156 |
++case $host_os in |
157 |
++ |
158 |
++ freebsd*) |
159 |
++ |
160 |
++ # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) |
161 |
++ # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) |
162 |
++ |
163 |
++ ax_pthread_flags="-kthread lthread $ax_pthread_flags" |
164 |
++ ;; |
165 |
++ |
166 |
++ hpux*) |
167 |
++ |
168 |
++ # From the cc(1) man page: "[-mt] Sets various -D flags to enable |
169 |
++ # multi-threading and also sets -lpthread." |
170 |
++ |
171 |
++ ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" |
172 |
++ ;; |
173 |
++ |
174 |
++ openedition*) |
175 |
++ |
176 |
++ # IBM z/OS requires a feature-test macro to be defined in order to |
177 |
++ # enable POSIX threads at all, so give the user a hint if this is |
178 |
++ # not set. (We don't define these ourselves, as they can affect |
179 |
++ # other portions of the system API in unpredictable ways.) |
180 |
++ |
181 |
++ AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING], |
182 |
++ [ |
183 |
++# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) |
184 |
++ AX_PTHREAD_ZOS_MISSING |
185 |
++# endif |
186 |
++ ], |
187 |
++ [AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])]) |
188 |
++ ;; |
189 |
++ |
190 |
+ solaris*) |
191 |
+ |
192 |
+ # On Solaris (at least, for some versions), libc contains stubbed |
193 |
+ # (non-functional) versions of the pthreads routines, so link-based |
194 |
+- # tests will erroneously succeed. (We need to link with -pthreads/-mt/ |
195 |
+- # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather |
196 |
+- # a function called by this macro, so we could check for that, but |
197 |
+- # who knows whether they'll stub that too in a future libc.) So, |
198 |
+- # we'll just look for -pthreads and -lpthread first: |
199 |
++ # tests will erroneously succeed. (N.B.: The stubs are missing |
200 |
++ # pthread_cleanup_push, or rather a function called by this macro, |
201 |
++ # so we could check for that, but who knows whether they'll stub |
202 |
++ # that too in a future libc.) So we'll check first for the |
203 |
++ # standard Solaris way of linking pthreads (-mt -lpthread). |
204 |
++ |
205 |
++ ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags" |
206 |
++ ;; |
207 |
++esac |
208 |
++ |
209 |
++# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) |
210 |
+ |
211 |
+- ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" |
212 |
++AS_IF([test "x$GCC" = "xyes"], |
213 |
++ [ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"]) |
214 |
++ |
215 |
++# The presence of a feature test macro requesting re-entrant function |
216 |
++# definitions is, on some systems, a strong hint that pthreads support is |
217 |
++# correctly enabled |
218 |
++ |
219 |
++case $host_os in |
220 |
++ darwin* | hpux* | linux* | osf* | solaris*) |
221 |
++ ax_pthread_check_macro="_REENTRANT" |
222 |
+ ;; |
223 |
+ |
224 |
+- darwin*) |
225 |
+- ax_pthread_flags="-pthread $ax_pthread_flags" |
226 |
++ aix*) |
227 |
++ ax_pthread_check_macro="_THREAD_SAFE" |
228 |
++ ;; |
229 |
++ |
230 |
++ *) |
231 |
++ ax_pthread_check_macro="--" |
232 |
+ ;; |
233 |
+ esac |
234 |
++AS_IF([test "x$ax_pthread_check_macro" = "x--"], |
235 |
++ [ax_pthread_check_cond=0], |
236 |
++ [ax_pthread_check_cond="!defined($ax_pthread_check_macro)"]) |
237 |
++ |
238 |
++# Are we compiling with Clang? |
239 |
++ |
240 |
++AC_CACHE_CHECK([whether $CC is Clang], |
241 |
++ [ax_cv_PTHREAD_CLANG], |
242 |
++ [ax_cv_PTHREAD_CLANG=no |
243 |
++ # Note that Autoconf sets GCC=yes for Clang as well as GCC |
244 |
++ if test "x$GCC" = "xyes"; then |
245 |
++ AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG], |
246 |
++ [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ |
247 |
++# if defined(__clang__) && defined(__llvm__) |
248 |
++ AX_PTHREAD_CC_IS_CLANG |
249 |
++# endif |
250 |
++ ], |
251 |
++ [ax_cv_PTHREAD_CLANG=yes]) |
252 |
++ fi |
253 |
++ ]) |
254 |
++ax_pthread_clang="$ax_cv_PTHREAD_CLANG" |
255 |
++ |
256 |
++ax_pthread_clang_warning=no |
257 |
++ |
258 |
++# Clang needs special handling, because older versions handle the -pthread |
259 |
++# option in a rather... idiosyncratic way |
260 |
++ |
261 |
++if test "x$ax_pthread_clang" = "xyes"; then |
262 |
++ |
263 |
++ # Clang takes -pthread; it has never supported any other flag |
264 |
++ |
265 |
++ # (Note 1: This will need to be revisited if a system that Clang |
266 |
++ # supports has POSIX threads in a separate library. This tends not |
267 |
++ # to be the way of modern systems, but it's conceivable.) |
268 |
++ |
269 |
++ # (Note 2: On some systems, notably Darwin, -pthread is not needed |
270 |
++ # to get POSIX threads support; the API is always present and |
271 |
++ # active. We could reasonably leave PTHREAD_CFLAGS empty. But |
272 |
++ # -pthread does define _REENTRANT, and while the Darwin headers |
273 |
++ # ignore this macro, third-party headers might not.) |
274 |
++ |
275 |
++ PTHREAD_CFLAGS="-pthread" |
276 |
++ PTHREAD_LIBS= |
277 |
++ |
278 |
++ ax_pthread_ok=yes |
279 |
++ |
280 |
++ # However, older versions of Clang make a point of warning the user |
281 |
++ # that, in an invocation where only linking and no compilation is |
282 |
++ # taking place, the -pthread option has no effect ("argument unused |
283 |
++ # during compilation"). They expect -pthread to be passed in only |
284 |
++ # when source code is being compiled. |
285 |
++ # |
286 |
++ # Problem is, this is at odds with the way Automake and most other |
287 |
++ # C build frameworks function, which is that the same flags used in |
288 |
++ # compilation (CFLAGS) are also used in linking. Many systems |
289 |
++ # supported by AX_PTHREAD require exactly this for POSIX threads |
290 |
++ # support, and in fact it is often not straightforward to specify a |
291 |
++ # flag that is used only in the compilation phase and not in |
292 |
++ # linking. Such a scenario is extremely rare in practice. |
293 |
++ # |
294 |
++ # Even though use of the -pthread flag in linking would only print |
295 |
++ # a warning, this can be a nuisance for well-run software projects |
296 |
++ # that build with -Werror. So if the active version of Clang has |
297 |
++ # this misfeature, we search for an option to squash it. |
298 |
++ |
299 |
++ AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread], |
300 |
++ [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG], |
301 |
++ [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown |
302 |
++ # Create an alternate version of $ac_link that compiles and |
303 |
++ # links in two steps (.c -> .o, .o -> exe) instead of one |
304 |
++ # (.c -> exe), because the warning occurs only in the second |
305 |
++ # step |
306 |
++ ax_pthread_save_ac_link="$ac_link" |
307 |
++ ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' |
308 |
++ ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"` |
309 |
++ ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" |
310 |
++ ax_pthread_save_CFLAGS="$CFLAGS" |
311 |
++ for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do |
312 |
++ AS_IF([test "x$ax_pthread_try" = "xunknown"], [break]) |
313 |
++ CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" |
314 |
++ ac_link="$ax_pthread_save_ac_link" |
315 |
++ AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], |
316 |
++ [ac_link="$ax_pthread_2step_ac_link" |
317 |
++ AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], |
318 |
++ [break]) |
319 |
++ ]) |
320 |
++ done |
321 |
++ ac_link="$ax_pthread_save_ac_link" |
322 |
++ CFLAGS="$ax_pthread_save_CFLAGS" |
323 |
++ AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no]) |
324 |
++ ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" |
325 |
++ ]) |
326 |
++ |
327 |
++ case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in |
328 |
++ no | unknown) ;; |
329 |
++ *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; |
330 |
++ esac |
331 |
++ |
332 |
++fi # $ax_pthread_clang = yes |
333 |
+ |
334 |
+-if test x"$ax_pthread_ok" = xno; then |
335 |
+-for flag in $ax_pthread_flags; do |
336 |
++if test "x$ax_pthread_ok" = "xno"; then |
337 |
++for ax_pthread_try_flag in $ax_pthread_flags; do |
338 |
+ |
339 |
+- case $flag in |
340 |
++ case $ax_pthread_try_flag in |
341 |
+ none) |
342 |
+ AC_MSG_CHECKING([whether pthreads work without any flags]) |
343 |
+ ;; |
344 |
+ |
345 |
++ -mt,pthread) |
346 |
++ AC_MSG_CHECKING([whether pthreads work with -mt -lpthread]) |
347 |
++ PTHREAD_CFLAGS="-mt" |
348 |
++ PTHREAD_LIBS="-lpthread" |
349 |
++ ;; |
350 |
++ |
351 |
+ -*) |
352 |
+- AC_MSG_CHECKING([whether pthreads work with $flag]) |
353 |
+- PTHREAD_CFLAGS="$flag" |
354 |
++ AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag]) |
355 |
++ PTHREAD_CFLAGS="$ax_pthread_try_flag" |
356 |
+ ;; |
357 |
+ |
358 |
+ pthread-config) |
359 |
+- AC_CHECK_PROG(ax_pthread_config, pthread-config, yes, no) |
360 |
+- if test x"$ax_pthread_config" = xno; then continue; fi |
361 |
++ AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no]) |
362 |
++ AS_IF([test "x$ax_pthread_config" = "xno"], [continue]) |
363 |
+ PTHREAD_CFLAGS="`pthread-config --cflags`" |
364 |
+ PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" |
365 |
+ ;; |
366 |
+ |
367 |
+ *) |
368 |
+- AC_MSG_CHECKING([for the pthreads library -l$flag]) |
369 |
+- PTHREAD_LIBS="-l$flag" |
370 |
++ AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag]) |
371 |
++ PTHREAD_LIBS="-l$ax_pthread_try_flag" |
372 |
+ ;; |
373 |
+ esac |
374 |
+ |
375 |
+- save_LIBS="$LIBS" |
376 |
+- save_CFLAGS="$CFLAGS" |
377 |
+- LIBS="$PTHREAD_LIBS $LIBS" |
378 |
++ ax_pthread_save_CFLAGS="$CFLAGS" |
379 |
++ ax_pthread_save_LIBS="$LIBS" |
380 |
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
381 |
++ LIBS="$PTHREAD_LIBS $LIBS" |
382 |
+ |
383 |
+ # Check for various functions. We must include pthread.h, |
384 |
+ # since some functions may be macros. (On the Sequent, we |
385 |
+@@ -204,7 +366,11 @@ |
386 |
+ # pthread_cleanup_push because it is one of the few pthread |
387 |
+ # functions on Solaris that doesn't have a non-functional libc stub. |
388 |
+ # We try pthread_create on general principles. |
389 |
++ |
390 |
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h> |
391 |
++# if $ax_pthread_check_cond |
392 |
++# error "$ax_pthread_check_macro must be defined" |
393 |
++# endif |
394 |
+ static void routine(void *a) { a = 0; } |
395 |
+ static void *start_routine(void *a) { return a; }], |
396 |
+ [pthread_t th; pthread_attr_t attr; |
397 |
+@@ -213,16 +379,14 @@ |
398 |
+ pthread_attr_init(&attr); |
399 |
+ pthread_cleanup_push(routine, 0); |
400 |
+ pthread_cleanup_pop(0) /* ; */])], |
401 |
+- [ax_pthread_ok=yes], |
402 |
+- []) |
403 |
++ [ax_pthread_ok=yes], |
404 |
++ []) |
405 |
+ |
406 |
+- LIBS="$save_LIBS" |
407 |
+- CFLAGS="$save_CFLAGS" |
408 |
++ CFLAGS="$ax_pthread_save_CFLAGS" |
409 |
++ LIBS="$ax_pthread_save_LIBS" |
410 |
+ |
411 |
+- AC_MSG_RESULT($ax_pthread_ok) |
412 |
+- if test "x$ax_pthread_ok" = xyes; then |
413 |
+- break; |
414 |
+- fi |
415 |
++ AC_MSG_RESULT([$ax_pthread_ok]) |
416 |
++ AS_IF([test "x$ax_pthread_ok" = "xyes"], [break]) |
417 |
+ |
418 |
+ PTHREAD_LIBS="" |
419 |
+ PTHREAD_CFLAGS="" |
420 |
+@@ -230,70 +394,74 @@ |
421 |
+ fi |
422 |
+ |
423 |
+ # Various other checks: |
424 |
+-if test "x$ax_pthread_ok" = xyes; then |
425 |
+- save_LIBS="$LIBS" |
426 |
+- LIBS="$PTHREAD_LIBS $LIBS" |
427 |
+- save_CFLAGS="$CFLAGS" |
428 |
++if test "x$ax_pthread_ok" = "xyes"; then |
429 |
++ ax_pthread_save_CFLAGS="$CFLAGS" |
430 |
++ ax_pthread_save_LIBS="$LIBS" |
431 |
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
432 |
++ LIBS="$PTHREAD_LIBS $LIBS" |
433 |
+ |
434 |
+ # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. |
435 |
+- AC_MSG_CHECKING([for joinable pthread attribute]) |
436 |
+- attr_name=unknown |
437 |
+- for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do |
438 |
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>], |
439 |
+- [int attr = $attr; return attr /* ; */])], |
440 |
+- [attr_name=$attr; break], |
441 |
+- []) |
442 |
+- done |
443 |
+- AC_MSG_RESULT($attr_name) |
444 |
+- if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then |
445 |
+- AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name, |
446 |
+- [Define to necessary symbol if this constant |
447 |
+- uses a non-standard name on your system.]) |
448 |
+- fi |
449 |
+- |
450 |
+- AC_MSG_CHECKING([if more special flags are required for pthreads]) |
451 |
+- flag=no |
452 |
+- case ${host_os} in |
453 |
+- aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; |
454 |
+- osf* | hpux*) flag="-D_REENTRANT";; |
455 |
+- solaris*) |
456 |
+- if test "$GCC" = "yes"; then |
457 |
+- flag="-D_REENTRANT" |
458 |
+- else |
459 |
+- flag="-mt -D_REENTRANT" |
460 |
+- fi |
461 |
+- ;; |
462 |
+- esac |
463 |
+- AC_MSG_RESULT(${flag}) |
464 |
+- if test "x$flag" != xno; then |
465 |
+- PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" |
466 |
+- fi |
467 |
++ AC_CACHE_CHECK([for joinable pthread attribute], |
468 |
++ [ax_cv_PTHREAD_JOINABLE_ATTR], |
469 |
++ [ax_cv_PTHREAD_JOINABLE_ATTR=unknown |
470 |
++ for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do |
471 |
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>], |
472 |
++ [int attr = $ax_pthread_attr; return attr /* ; */])], |
473 |
++ [ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break], |
474 |
++ []) |
475 |
++ done |
476 |
++ ]) |
477 |
++ AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ |
478 |
++ test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ |
479 |
++ test "x$ax_pthread_joinable_attr_defined" != "xyes"], |
480 |
++ [AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], |
481 |
++ [$ax_cv_PTHREAD_JOINABLE_ATTR], |
482 |
++ [Define to necessary symbol if this constant |
483 |
++ uses a non-standard name on your system.]) |
484 |
++ ax_pthread_joinable_attr_defined=yes |
485 |
++ ]) |
486 |
++ |
487 |
++ AC_CACHE_CHECK([whether more special flags are required for pthreads], |
488 |
++ [ax_cv_PTHREAD_SPECIAL_FLAGS], |
489 |
++ [ax_cv_PTHREAD_SPECIAL_FLAGS=no |
490 |
++ case $host_os in |
491 |
++ solaris*) |
492 |
++ ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" |
493 |
++ ;; |
494 |
++ esac |
495 |
++ ]) |
496 |
++ AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ |
497 |
++ test "x$ax_pthread_special_flags_added" != "xyes"], |
498 |
++ [PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" |
499 |
++ ax_pthread_special_flags_added=yes]) |
500 |
+ |
501 |
+ AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], |
502 |
+- ax_cv_PTHREAD_PRIO_INHERIT, [ |
503 |
+- AC_LINK_IFELSE([ |
504 |
+- AC_LANG_PROGRAM([[#include <pthread.h>]], [[int i = PTHREAD_PRIO_INHERIT;]])], |
505 |
+- [ax_cv_PTHREAD_PRIO_INHERIT=yes], |
506 |
+- [ax_cv_PTHREAD_PRIO_INHERIT=no]) |
507 |
++ [ax_cv_PTHREAD_PRIO_INHERIT], |
508 |
++ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]], |
509 |
++ [[int i = PTHREAD_PRIO_INHERIT;]])], |
510 |
++ [ax_cv_PTHREAD_PRIO_INHERIT=yes], |
511 |
++ [ax_cv_PTHREAD_PRIO_INHERIT=no]) |
512 |
+ ]) |
513 |
+- AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"], |
514 |
+- AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], 1, [Have PTHREAD_PRIO_INHERIT.])) |
515 |
++ AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ |
516 |
++ test "x$ax_pthread_prio_inherit_defined" != "xyes"], |
517 |
++ [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.]) |
518 |
++ ax_pthread_prio_inherit_defined=yes |
519 |
++ ]) |
520 |
+ |
521 |
+- LIBS="$save_LIBS" |
522 |
+- CFLAGS="$save_CFLAGS" |
523 |
++ CFLAGS="$ax_pthread_save_CFLAGS" |
524 |
++ LIBS="$ax_pthread_save_LIBS" |
525 |
+ |
526 |
+ # More AIX lossage: compile with *_r variant |
527 |
+- if test "x$GCC" != xyes; then |
528 |
++ if test "x$GCC" != "xyes"; then |
529 |
+ case $host_os in |
530 |
+ aix*) |
531 |
+ AS_CASE(["x/$CC"], |
532 |
+- [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], |
533 |
+- [#handle absolute path differently from PATH based program lookup |
534 |
+- AS_CASE(["x$CC"], |
535 |
+- [x/*], |
536 |
+- [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])], |
537 |
+- [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])]) |
538 |
++ [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], |
539 |
++ [#handle absolute path differently from PATH based program lookup |
540 |
++ AS_CASE(["x$CC"], |
541 |
++ [x/*], |
542 |
++ [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])], |
543 |
++ [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])]) |
544 |
+ ;; |
545 |
+ esac |
546 |
+ fi |
547 |
+@@ -301,13 +469,13 @@ |
548 |
+ |
549 |
+ test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" |
550 |
+ |
551 |
+-AC_SUBST(PTHREAD_LIBS) |
552 |
+-AC_SUBST(PTHREAD_CFLAGS) |
553 |
+-AC_SUBST(PTHREAD_CC) |
554 |
++AC_SUBST([PTHREAD_LIBS]) |
555 |
++AC_SUBST([PTHREAD_CFLAGS]) |
556 |
++AC_SUBST([PTHREAD_CC]) |
557 |
+ |
558 |
+ # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: |
559 |
+-if test x"$ax_pthread_ok" = xyes; then |
560 |
+- ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) |
561 |
++if test "x$ax_pthread_ok" = "xyes"; then |
562 |
++ ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1]) |
563 |
+ : |
564 |
+ else |
565 |
+ ax_pthread_ok=no |
566 |
+--- /m4/ax_with_curses.m4 |
567 |
++++ /m4/ax_with_curses.m4 |
568 |
+@@ -1,5 +1,5 @@ |
569 |
+ # =========================================================================== |
570 |
+-# http://www.gnu.org/software/autoconf-archive/ax_with_curses.html |
571 |
++# https://www.gnu.org/software/autoconf-archive/ax_with_curses.html |
572 |
+ # =========================================================================== |
573 |
+ # |
574 |
+ # SYNOPSIS |
575 |
+@@ -12,7 +12,9 @@ |
576 |
+ # present, along with the associated header file. The NcursesW |
577 |
+ # (wide-character) library is searched for first, followed by Ncurses, |
578 |
+ # then the system-default plain Curses. The first library found is the |
579 |
+-# one returned. |
580 |
++# one returned. Finding libraries will first be attempted by using |
581 |
++# pkg-config, and should the pkg-config files not be available, will |
582 |
++# fallback to combinations of known flags itself. |
583 |
+ # |
584 |
+ # The following options are understood: --with-ncursesw, --with-ncurses, |
585 |
+ # --without-ncursesw, --without-ncurses. The "--with" options force the |
586 |
+@@ -52,23 +54,29 @@ |
587 |
+ # |
588 |
+ # (These preprocessor symbols are discussed later in this document.) |
589 |
+ # |
590 |
+-# The following output variable is defined by this macro; it is precious |
591 |
+-# and may be overridden on the ./configure command line: |
592 |
++# The following output variables are defined by this macro; they are |
593 |
++# precious and may be overridden on the ./configure command line: |
594 |
+ # |
595 |
+-# CURSES_LIB - library to add to xxx_LDADD |
596 |
++# CURSES_LIBS - library to add to xxx_LDADD |
597 |
++# CURSES_CFLAGS - include paths to add to xxx_CPPFLAGS |
598 |
+ # |
599 |
+-# The library listed in CURSES_LIB is NOT added to LIBS by default. You |
600 |
+-# need to add CURSES_LIB to the appropriate xxx_LDADD line in your |
601 |
+-# Makefile.am. For example: |
602 |
+-# |
603 |
+-# prog_LDADD = @CURSES_LIB@ |
604 |
+-# |
605 |
+-# If CURSES_LIB is set on the configure command line (such as by running |
606 |
+-# "./configure CURSES_LIB=-lmycurses"), then the only header searched for |
607 |
+-# is <curses.h>. The user may use the CPPFLAGS precious variable to |
608 |
+-# override the standard #include search path. If the user needs to |
609 |
+-# specify an alternative path for a library (such as for a non-standard |
610 |
+-# NcurseW), the user should use the LDFLAGS variable. |
611 |
++# In previous versions of this macro, the flags CURSES_LIB and |
612 |
++# CURSES_CPPFLAGS were defined. These have been renamed, in keeping with |
613 |
++# AX_WITH_CURSES's close bigger brother, PKG_CHECK_MODULES, which should |
614 |
++# eventually supersede the use of AX_WITH_CURSES. Neither the library |
615 |
++# listed in CURSES_LIBS, nor the flags in CURSES_CFLAGS are added to LIBS, |
616 |
++# respectively CPPFLAGS, by default. You need to add both to the |
617 |
++# appropriate xxx_LDADD/xxx_CPPFLAGS line in your Makefile.am. For |
618 |
++# example: |
619 |
++# |
620 |
++# prog_LDADD = @CURSES_LIBS@ |
621 |
++# prog_CPPFLAGS = @CURSES_CFLAGS@ |
622 |
++# |
623 |
++# If CURSES_LIBS is set on the configure command line (such as by running |
624 |
++# "./configure CURSES_LIBS=-lmycurses"), then the only header searched for |
625 |
++# is <curses.h>. If the user needs to specify an alternative path for a |
626 |
++# library (such as for a non-standard NcurseW), the user should use the |
627 |
++# LDFLAGS variable. |
628 |
+ # |
629 |
+ # The following shell variables may be defined by this macro: |
630 |
+ # |
631 |
+@@ -88,7 +96,7 @@ |
632 |
+ # |
633 |
+ # AX_WITH_CURSES |
634 |
+ # if test "x$ax_cv_ncursesw" != xyes && test "x$ax_cv_ncurses" != xyes; then |
635 |
+-# AX_MSG_ERROR([requires either NcursesW or Ncurses library]) |
636 |
++# AC_MSG_ERROR([requires either NcursesW or Ncurses library]) |
637 |
+ # fi |
638 |
+ # |
639 |
+ # If any Curses library will do (but one must be present and must support |
640 |
+@@ -167,7 +175,7 @@ |
641 |
+ # Public License for more details. |
642 |
+ # |
643 |
+ # You should have received a copy of the GNU General Public License along |
644 |
+-# with this program. If not, see <http://www.gnu.org/licenses/>. |
645 |
++# with this program. If not, see <https://www.gnu.org/licenses/>. |
646 |
+ # |
647 |
+ # As a special exception, the respective Autoconf Macro's copyright owner |
648 |
+ # gives unlimited permission to copy, distribute and modify the configure |
649 |
+@@ -182,11 +190,66 @@ |
650 |
+ # modified version of the Autoconf Macro, you may extend this special |
651 |
+ # exception to the GPL to apply to your modified version as well. |
652 |
+ |
653 |
+-#serial 13 |
654 |
++#serial 18 |
655 |
++ |
656 |
++# internal function to factorize common code that is used by both ncurses |
657 |
++# and ncursesw |
658 |
++AC_DEFUN([_FIND_CURSES_FLAGS], [ |
659 |
++ AC_MSG_CHECKING([for $1 via pkg-config]) |
660 |
++ |
661 |
++ AX_REQUIRE_DEFINED([PKG_CHECK_EXISTS]) |
662 |
++ _PKG_CONFIG([_ax_cv_$1_libs], [libs], [$1]) |
663 |
++ _PKG_CONFIG([_ax_cv_$1_cppflags], [cflags], [$1]) |
664 |
++ |
665 |
++ AS_IF([test "x$pkg_failed" = "xyes" || test "x$pkg_failed" = "xuntried"],[ |
666 |
++ AC_MSG_RESULT([no]) |
667 |
++ # No suitable .pc file found, have to find flags via fallback |
668 |
++ AC_CACHE_CHECK([for $1 via fallback], [ax_cv_$1], [ |
669 |
++ AS_ECHO() |
670 |
++ pkg_cv__ax_cv_$1_libs="-l$1" |
671 |
++ pkg_cv__ax_cv_$1_cppflags="-D_GNU_SOURCE $CURSES_CFLAGS" |
672 |
++ LIBS="$ax_saved_LIBS $pkg_cv__ax_cv_$1_libs" |
673 |
++ CPPFLAGS="$ax_saved_CPPFLAGS $pkg_cv__ax_cv_$1_cppflags" |
674 |
++ |
675 |
++ AC_MSG_CHECKING([for initscr() with $pkg_cv__ax_cv_$1_libs]) |
676 |
++ AC_LINK_IFELSE([AC_LANG_CALL([], [initscr])], |
677 |
++ [ |
678 |
++ AC_MSG_RESULT([yes]) |
679 |
++ AC_MSG_CHECKING([for nodelay() with $pkg_cv__ax_cv_$1_libs]) |
680 |
++ AC_LINK_IFELSE([AC_LANG_CALL([], [nodelay])],[ |
681 |
++ ax_cv_$1=yes |
682 |
++ ],[ |
683 |
++ AC_MSG_RESULT([no]) |
684 |
++ m4_if( |
685 |
++ [$1],[ncursesw],[pkg_cv__ax_cv_$1_libs="$pkg_cv__ax_cv_$1_libs -ltinfow"], |
686 |
++ [$1],[ncurses],[pkg_cv__ax_cv_$1_libs="$pkg_cv__ax_cv_$1_libs -ltinfo"] |
687 |
++ ) |
688 |
++ LIBS="$ax_saved_LIBS $pkg_cv__ax_cv_$1_libs" |
689 |
++ |
690 |
++ AC_MSG_CHECKING([for nodelay() with $pkg_cv__ax_cv_$1_libs]) |
691 |
++ AC_LINK_IFELSE([AC_LANG_CALL([], [nodelay])],[ |
692 |
++ ax_cv_$1=yes |
693 |
++ ],[ |
694 |
++ ax_cv_$1=no |
695 |
++ ]) |
696 |
++ ]) |
697 |
++ ],[ |
698 |
++ ax_cv_$1=no |
699 |
++ ]) |
700 |
++ ]) |
701 |
++ ],[ |
702 |
++ AC_MSG_RESULT([yes]) |
703 |
++ # Found .pc file, using its information |
704 |
++ LIBS="$ax_saved_LIBS $pkg_cv__ax_cv_$1_libs" |
705 |
++ CPPFLAGS="$ax_saved_CPPFLAGS $pkg_cv__ax_cv_$1_cppflags" |
706 |
++ ax_cv_$1=yes |
707 |
++ ]) |
708 |
++]) |
709 |
+ |
710 |
+ AU_ALIAS([MP_WITH_CURSES], [AX_WITH_CURSES]) |
711 |
+ AC_DEFUN([AX_WITH_CURSES], [ |
712 |
+- AC_ARG_VAR([CURSES_LIB], [linker library for Curses, e.g. -lcurses]) |
713 |
++ AC_ARG_VAR([CURSES_LIBS], [linker library for Curses, e.g. -lcurses]) |
714 |
++ AC_ARG_VAR([CURSES_CFLAGS], [preprocessor flags for Curses, e.g. -I/usr/include/ncursesw]) |
715 |
+ AC_ARG_WITH([ncurses], [AS_HELP_STRING([--with-ncurses], |
716 |
+ [force the use of Ncurses or NcursesW])], |
717 |
+ [], [with_ncurses=check]) |
718 |
+@@ -195,20 +258,17 @@ |
719 |
+ [], [with_ncursesw=check]) |
720 |
+ |
721 |
+ ax_saved_LIBS=$LIBS |
722 |
++ ax_saved_CPPFLAGS=$CPPFLAGS |
723 |
++ |
724 |
+ AS_IF([test "x$with_ncurses" = xyes || test "x$with_ncursesw" = xyes], |
725 |
+ [ax_with_plaincurses=no], [ax_with_plaincurses=check]) |
726 |
+ |
727 |
+ ax_cv_curses_which=no |
728 |
+ |
729 |
+ # Test for NcursesW |
730 |
++ AS_IF([test "x$CURSES_LIBS" = x && test "x$with_ncursesw" != xno], [ |
731 |
++ _FIND_CURSES_FLAGS([ncursesw]) |
732 |
+ |
733 |
+- AS_IF([test "x$CURSES_LIB" = x && test "x$with_ncursesw" != xno], [ |
734 |
+- LIBS="$ax_saved_LIBS -lncursesw" |
735 |
+- |
736 |
+- AC_CACHE_CHECK([for NcursesW wide-character library], [ax_cv_ncursesw], [ |
737 |
+- AC_LINK_IFELSE([AC_LANG_CALL([], [initscr])], |
738 |
+- [ax_cv_ncursesw=yes], [ax_cv_ncursesw=no]) |
739 |
+- ]) |
740 |
+ AS_IF([test "x$ax_cv_ncursesw" = xno && test "x$with_ncursesw" = xyes], [ |
741 |
+ AC_MSG_ERROR([--with-ncursesw specified but could not find NcursesW library]) |
742 |
+ ]) |
743 |
+@@ -216,7 +276,8 @@ |
744 |
+ AS_IF([test "x$ax_cv_ncursesw" = xyes], [ |
745 |
+ ax_cv_curses=yes |
746 |
+ ax_cv_curses_which=ncursesw |
747 |
+- CURSES_LIB="-lncursesw" |
748 |
++ CURSES_LIBS="$pkg_cv__ax_cv_ncursesw_libs" |
749 |
++ CURSES_CFLAGS="$pkg_cv__ax_cv_ncursesw_cppflags" |
750 |
+ AC_DEFINE([HAVE_NCURSESW], [1], [Define to 1 if the NcursesW library is present]) |
751 |
+ AC_DEFINE([HAVE_CURSES], [1], [Define to 1 if a SysV or X/Open compatible Curses library is present]) |
752 |
+ |
753 |
+@@ -318,16 +379,13 @@ |
754 |
+ ]) |
755 |
+ ]) |
756 |
+ ]) |
757 |
++ unset pkg_cv__ax_cv_ncursesw_libs |
758 |
++ unset pkg_cv__ax_cv_ncursesw_cppflags |
759 |
+ |
760 |
+ # Test for Ncurses |
761 |
++ AS_IF([test "x$CURSES_LIBS" = x && test "x$with_ncurses" != xno && test "x$ax_cv_curses_which" = xno], [ |
762 |
++ _FIND_CURSES_FLAGS([ncurses]) |
763 |
+ |
764 |
+- AS_IF([test "x$CURSES_LIB" = x && test "x$with_ncurses" != xno && test "x$ax_cv_curses_which" = xno], [ |
765 |
+- LIBS="$ax_saved_LIBS -lncurses" |
766 |
+- |
767 |
+- AC_CACHE_CHECK([for Ncurses library], [ax_cv_ncurses], [ |
768 |
+- AC_LINK_IFELSE([AC_LANG_CALL([], [initscr])], |
769 |
+- [ax_cv_ncurses=yes], [ax_cv_ncurses=no]) |
770 |
+- ]) |
771 |
+ AS_IF([test "x$ax_cv_ncurses" = xno && test "x$with_ncurses" = xyes], [ |
772 |
+ AC_MSG_ERROR([--with-ncurses specified but could not find Ncurses library]) |
773 |
+ ]) |
774 |
+@@ -335,7 +393,8 @@ |
775 |
+ AS_IF([test "x$ax_cv_ncurses" = xyes], [ |
776 |
+ ax_cv_curses=yes |
777 |
+ ax_cv_curses_which=ncurses |
778 |
+- CURSES_LIB="-lncurses" |
779 |
++ CURSES_LIBS="$pkg_cv__ax_cv_ncurses_libs" |
780 |
++ CURSES_CFLAGS="$pkg_cv__ax_cv_ncurses_cppflags" |
781 |
+ AC_DEFINE([HAVE_NCURSES], [1], [Define to 1 if the Ncurses library is present]) |
782 |
+ AC_DEFINE([HAVE_CURSES], [1], [Define to 1 if a SysV or X/Open compatible Curses library is present]) |
783 |
+ |
784 |
+@@ -390,12 +449,13 @@ |
785 |
+ ]) |
786 |
+ ]) |
787 |
+ ]) |
788 |
++ unset pkg_cv__ax_cv_ncurses_libs |
789 |
++ unset pkg_cv__ax_cv_ncurses_cppflags |
790 |
+ |
791 |
+- # Test for plain Curses (or if CURSES_LIB was set by user) |
792 |
+- |
793 |
++ # Test for plain Curses (or if CURSES_LIBS was set by user) |
794 |
+ AS_IF([test "x$with_plaincurses" != xno && test "x$ax_cv_curses_which" = xno], [ |
795 |
+- AS_IF([test "x$CURSES_LIB" != x], [ |
796 |
+- LIBS="$ax_saved_LIBS $CURSES_LIB" |
797 |
++ AS_IF([test "x$CURSES_LIBS" != x], [ |
798 |
++ LIBS="$ax_saved_LIBS $CURSES_LIBS" |
799 |
+ ], [ |
800 |
+ LIBS="$ax_saved_LIBS -lcurses" |
801 |
+ ]) |
802 |
+@@ -408,8 +468,8 @@ |
803 |
+ AS_IF([test "x$ax_cv_plaincurses" = xyes], [ |
804 |
+ ax_cv_curses=yes |
805 |
+ ax_cv_curses_which=plaincurses |
806 |
+- AS_IF([test "x$CURSES_LIB" = x], [ |
807 |
+- CURSES_LIB="-lcurses" |
808 |
++ AS_IF([test "x$CURSES_LIBS" = x], [ |
809 |
++ CURSES_LIBS="-lcurses" |
810 |
+ ]) |
811 |
+ AC_DEFINE([HAVE_CURSES], [1], [Define to 1 if a SysV or X/Open compatible Curses library is present]) |
812 |
+ |
813 |
+@@ -515,4 +575,8 @@ |
814 |
+ AS_IF([test "x$ax_cv_curses_obsolete" != xyes], [ax_cv_curses_obsolete=no]) |
815 |
+ |
816 |
+ LIBS=$ax_saved_LIBS |
817 |
++ CPPFLAGS=$ax_saved_CPPFLAGS |
818 |
++ |
819 |
++ unset ax_saved_LIBS |
820 |
++ unset ax_saved_CPPFLAGS |
821 |
+ ])dnl |
822 |
+--- /test/Makefile.am |
823 |
++++ /test/Makefile.am |
824 |
+@@ -65,7 +65,8 @@ |
825 |
+ if ENABLE_TEXT_UI |
826 |
+ TEXT_UI_BIN=genkeystroke |
827 |
+ genkeystroke_SOURCES = genkeystroke.c |
828 |
+-genkeystroke_LDADD = $(LDADD) @CURSES_LIB@ |
829 |
++genkeystroke_CPPFLAGS = $(AM_CPPFLAGS) @CURSES_CFLAGS@ |
830 |
++genkeystroke_LDADD = $(LDADD) @CURSES_LIBS@ |
831 |
+ else |
832 |
+ TEXT_UI_BIN= |
833 |
+ endif |
834 |
|
835 |
diff --git a/app-i18n/libchewing/libchewing-0.5.1.ebuild b/app-i18n/libchewing/libchewing-0.5.1.ebuild |
836 |
index 4a2f116c20e..1c78e61d60e 100644 |
837 |
--- a/app-i18n/libchewing/libchewing-0.5.1.ebuild |
838 |
+++ b/app-i18n/libchewing/libchewing-0.5.1.ebuild |
839 |
@@ -3,8 +3,11 @@ |
840 |
|
841 |
EAPI="7" |
842 |
|
843 |
+inherit autotools |
844 |
+ |
845 |
if [[ "${PV}" == "9999" ]]; then |
846 |
- inherit autotools git-r3 |
847 |
+# inherit autotools git-r3 |
848 |
+ inherit git-r3 |
849 |
|
850 |
EGIT_REPO_URI="https://github.com/chewing/libchewing" |
851 |
fi |
852 |
@@ -27,12 +30,17 @@ RDEPEND="dev-db/sqlite:3" |
853 |
DEPEND="${RDEPEND} |
854 |
test? ( sys-libs/ncurses[unicode] )" |
855 |
|
856 |
+PATCHES=( |
857 |
+ "${FILESDIR}/${PN}-0.5.1-autoconf-archive-2019.01.06.patch" |
858 |
+) |
859 |
+ |
860 |
src_prepare() { |
861 |
default |
862 |
+ eautoreconf |
863 |
|
864 |
- if [[ "${PV}" == "9999" ]]; then |
865 |
- eautoreconf |
866 |
- fi |
867 |
+# if [[ "${PV}" == "9999" ]]; then |
868 |
+# eautoreconf |
869 |
+# fi |
870 |
} |
871 |
|
872 |
src_configure() { |
873 |
@@ -48,6 +56,8 @@ src_test() { |
874 |
|
875 |
src_install() { |
876 |
default |
877 |
- find "${D}" -name "*.la" -delete || die |
878 |
- use static-libs || find "${D}" -name "*.a" -delete || die |
879 |
+ find "${D}" -name "*.la" -type f -delete || die |
880 |
+ if ! use static-libs; then |
881 |
+ find "${D}" -name "*.a" -type f -delete || die |
882 |
+ fi |
883 |
} |
884 |
|
885 |
diff --git a/app-i18n/libchewing/libchewing-9999.ebuild b/app-i18n/libchewing/libchewing-9999.ebuild |
886 |
index 9353fc5f3dd..e059c2147b1 100644 |
887 |
--- a/app-i18n/libchewing/libchewing-9999.ebuild |
888 |
+++ b/app-i18n/libchewing/libchewing-9999.ebuild |
889 |
@@ -3,8 +3,11 @@ |
890 |
|
891 |
EAPI="7" |
892 |
|
893 |
+inherit autotools |
894 |
+ |
895 |
if [[ "${PV}" == "9999" ]]; then |
896 |
- inherit autotools git-r3 |
897 |
+# inherit autotools git-r3 |
898 |
+ inherit git-r3 |
899 |
|
900 |
EGIT_REPO_URI="https://github.com/chewing/libchewing" |
901 |
fi |
902 |
@@ -27,12 +30,17 @@ RDEPEND="dev-db/sqlite:3" |
903 |
DEPEND="${RDEPEND} |
904 |
test? ( sys-libs/ncurses[unicode] )" |
905 |
|
906 |
+PATCHES=( |
907 |
+ "${FILESDIR}/${PN}-0.5.1-autoconf-archive-2019.01.06.patch" |
908 |
+) |
909 |
+ |
910 |
src_prepare() { |
911 |
default |
912 |
+ eautoreconf |
913 |
|
914 |
- if [[ "${PV}" == "9999" ]]; then |
915 |
- eautoreconf |
916 |
- fi |
917 |
+# if [[ "${PV}" == "9999" ]]; then |
918 |
+# eautoreconf |
919 |
+# fi |
920 |
} |
921 |
|
922 |
src_configure() { |
923 |
@@ -48,6 +56,8 @@ src_test() { |
924 |
|
925 |
src_install() { |
926 |
default |
927 |
- find "${D}" -name "*.la" -delete || die |
928 |
- use static-libs || find "${D}" -name "*.a" -delete || die |
929 |
+ find "${D}" -name "*.la" -type f -delete || die |
930 |
+ if ! use static-libs; then |
931 |
+ find "${D}" -name "*.a" -type f -delete || die |
932 |
+ fi |
933 |
} |