aboutsummaryrefslogtreecommitdiffstats
path: root/devel/apr1
diff options
context:
space:
mode:
authorkuriyama <kuriyama@FreeBSD.org>2004-01-24 11:36:43 +0800
committerkuriyama <kuriyama@FreeBSD.org>2004-01-24 11:36:43 +0800
commitd9d6d8108f1047b965f6f19c6fd84a7c9516de94 (patch)
tree705aa16f8e7743a06ed25dac06b3117048b46af8 /devel/apr1
parentac8125fd679bf7f2a05556e9a0feffe269845e48 (diff)
downloadfreebsd-ports-gnome-d9d6d8108f1047b965f6f19c6fd84a7c9516de94.tar.gz
freebsd-ports-gnome-d9d6d8108f1047b965f6f19c6fd84a7c9516de94.tar.zst
freebsd-ports-gnome-d9d6d8108f1047b965f6f19c6fd84a7c9516de94.zip
Correct pthread detection.
Submitted by: Craig Rodrigues <rodrigc@crodrigues.org> (maintainer) Tested by: kuriyama (on 4-stable and 5-current)
Diffstat (limited to 'devel/apr1')
-rw-r--r--devel/apr1/Makefile7
-rw-r--r--devel/apr1/files/patch-apr_hints.m48
-rw-r--r--devel/apr1/files/patch-apr_threads.m440
3 files changed, 47 insertions, 8 deletions
diff --git a/devel/apr1/Makefile b/devel/apr1/Makefile
index 548f0a9d42a5..e79d464d98db 100644
--- a/devel/apr1/Makefile
+++ b/devel/apr1/Makefile
@@ -14,7 +14,7 @@
PORTNAME= apr
PORTVERSION= 0.9.4
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= devel
#MASTER_SITES= http://www.apache.org/dist/apr/
#DISTFILES= apr-${PORTVERSION}.tar.gz apr-util-${PORTVERSION}.tar.gz
@@ -35,10 +35,7 @@ USE_GMAKE= yes
USE_LIBTOOL_VER= 14
LIBTOOLFILES= # none
INSTALLS_SHLIB= yes
-CONFIGURE_ENV= CPPFLAGS="${PTHREAD_CFLAGS}" \
- LIBS="${PTHREAD_LIBS}" \
- CC="${CC}" CFLAGS="${CFLAGS}"
-
+GNU_CONFIGURE= yes
WRKSRC= ${WRKDIR}
APR_CONF_ENV= CC="${CC}" CFLAGS="${CFLAGS}" ${CONFIGURE_ENV} \
diff --git a/devel/apr1/files/patch-apr_hints.m4 b/devel/apr1/files/patch-apr_hints.m4
index 9e01ac75f936..0421617617bb 100644
--- a/devel/apr1/files/patch-apr_hints.m4
+++ b/devel/apr1/files/patch-apr_hints.m4
@@ -1,6 +1,6 @@
---- apr-0.9.4/build/apr_hints.m4.orig Mon Jun 2 11:52:28 2003
-+++ apr-0.9.4/build/apr_hints.m4 Sun Nov 9 18:15:30 2003
-@@ -130,14 +130,15 @@
+--- apr-0.9.4/build/apr_hints.m4.orig Tue Dec 23 08:26:10 2003
++++ apr-0.9.4/build/apr_hints.m4 Fri Jan 23 12:23:36 2004
+@@ -129,14 +129,17 @@
APR_ADDTO(CPPFLAGS, [-DNETBSD])
;;
*-freebsd*)
@@ -16,8 +16,10 @@
- APR_ADDTO(CPPFLAGS, [-D_REENTRANT -D_THREAD_SAFE])
+ if test $os_version -lt "500016"; then
+ ac_cv_pthreads_cflags="-D_THREAD_SAFE -D_REENTRANT"
++ ac_cv_pthreads_lib="none"
+ LIBS="$LIBS -pthread"
+ else
++ ac_cv_pthreads_cflags="none"
+ ac_cv_pthreads_lib="c_r"
+ fi
;;
diff --git a/devel/apr1/files/patch-apr_threads.m4 b/devel/apr1/files/patch-apr_threads.m4
new file mode 100644
index 000000000000..bda6cbb72f4e
--- /dev/null
+++ b/devel/apr1/files/patch-apr_threads.m4
@@ -0,0 +1,40 @@
+--- apr-0.9.4/build/apr_threads.m4.orig Sun Nov 16 08:42:33 2003
++++ apr-0.9.4/build/apr_threads.m4 Fri Jan 23 12:25:00 2004
+@@ -110,6 +110,7 @@
+
+ AC_CACHE_CHECK([for CFLAGS needed for pthreads], [apr_cv_pthreads_cflags],
+ [apr_ptc_cflags=$CFLAGS
++ if test "x$ac_cv_pthreads_cflags" = "x"; then
+ for flag in none -kthread -pthread -pthreads -mthreads -Kthread -threads; do
+ CFLAGS=$apr_ptc_cflags
+ test "x$flag" != "xnone" && CFLAGS="$CFLAGS $flag"
+@@ -118,6 +119,11 @@
+ break
+ ])
+ done
++ else
++ if test "$ac_cv_pthreads_cflags" != "none"; then
++ apr_cv_pthreads_cflags="$ac_cv_pthreads_cflags"
++ fi
++ fi
+ CFLAGS=$apr_ptc_cflags
+ ])
+
+@@ -136,6 +142,7 @@
+
+ AC_CACHE_CHECK([for LIBS needed for pthreads], [apr_cv_pthreads_lib], [
+ apr_ptc_libs=$LIBS
++ if test "x$ac_cv_pthreads_lib" = "x"; then
+ for lib in -lpthread -lpthreads -lc_r; do
+ LIBS="$apr_ptc_libs $lib"
+ APR_PTHREADS_TRY_RUN([
+@@ -143,6 +150,9 @@
+ break
+ ])
+ done
++ else
++ test "x$ac_cv_pthreads_lib" != "xnone" && apr_cv_pthreads_lib="-l$ac_cv_pthreads_lib"
++ fi
+ LIBS=$apr_ptc_libs
+ ])
+