summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schweizer <genstef@gentoo.org>2006-10-22 20:20:38 +0000
committerStefan Schweizer <genstef@gentoo.org>2006-10-22 20:20:38 +0000
commit8ce51f6242d6a27bbffbc271ada9c04efac57c7f (patch)
tree3277fe37d0b042f1987f6199e3fbe5a3a025652c /app-text/djvu/files
parentFixed multilib problem. (diff)
downloadhistorical-8ce51f6242d6a27bbffbc271ada9c04efac57c7f.tar.gz
historical-8ce51f6242d6a27bbffbc271ada9c04efac57c7f.tar.bz2
historical-8ce51f6242d6a27bbffbc271ada9c04efac57c7f.zip
Add as-needed patch thanks to TGL <degrenier@easyconnect.fr> in bug 132473
Package-Manager: portage-2.1.2_pre3-r6
Diffstat (limited to 'app-text/djvu/files')
-rw-r--r--app-text/djvu/files/djvulibre-3.5.17-pthread-flag.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/app-text/djvu/files/djvulibre-3.5.17-pthread-flag.patch b/app-text/djvu/files/djvulibre-3.5.17-pthread-flag.patch
new file mode 100644
index 000000000000..58dfd8f764d4
--- /dev/null
+++ b/app-text/djvu/files/djvulibre-3.5.17-pthread-flag.patch
@@ -0,0 +1,54 @@
+--- config/acinclude.m4.orig 2006-05-08 15:05:41.000000000 +0200
++++ config/acinclude.m4 2006-05-08 15:22:15.000000000 +0200
+@@ -332,7 +332,9 @@
+ fi
+ # Create a list of thread flags to try. Items starting with a "-" are
+ # C compiler flags, and other items are library names, except for "none"
+-# which indicates that we try without any flags at all.
++# which indicates that we try without any flags at all. Also, combinations
++# of items (for instance, both a compiler flag and a library name) can be
++# specified using a colon separator.
+ acx_pthread_flags="pthreads none -Kthread -kthread lthread
+ -pthread -pthreads -mthreads pthread
+ --thread-safe -mt"
+@@ -364,12 +366,40 @@
+ acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
+ ;;
+ esac
++case "${host_os}-${GCC}" in
++ *linux*-yes)
++ # On Linux/GCC, libtool uses -nostdlib for linking, which cancel part
++ # of the -pthread flag effect (libpthread is not automatically linked).
++ # So we'll try to link with both -pthread and -lpthread first:
++ acx_pthread_flags="-pthread:pthread $acx_pthread_flags"
++ ;;
++esac
+ if test x"$acx_pthread_ok" = xno; then
+ for flag in $acx_pthread_flags; do
+ case $flag in
+ none)
+ AC_MSG_CHECKING([whether pthreads work without any flags])
+ ;;
++ *:*)
++ PTHREAD_CFLAGS=""
++ PTHREAD_LIBS=""
++ message="whether pthreads work with"
++ while test x"$flag" != x; do
++ subflag=`echo $flag | cut -d: -f1`
++ case $subflag in
++ -*)
++ PTHREAD_CFLAGS="$PTHREAD_CFLAGS $subflag"
++ message="$message $subflag"
++ ;;
++ *)
++ PTHREAD_LIBS="$PTHREAD_LIBS -l$subflag"
++ message="$message -l$subflag"
++ ;;
++ esac
++ flag=`echo $flag | cut -s -d: -f2-`
++ done
++ AC_MSG_CHECKING([$message])
++ ;;
+ -*)
+ AC_MSG_CHECKING([whether pthreads work with $flag])
+ PTHREAD_CFLAGS="$flag"