aboutsummaryrefslogtreecommitdiffstats
path: root/textproc
diff options
context:
space:
mode:
authorale <ale@FreeBSD.org>2009-12-01 17:48:07 +0800
committerale <ale@FreeBSD.org>2009-12-01 17:48:07 +0800
commit84915d28c7a9d187022f4f695c4db7d803ac6182 (patch)
treea6b9ed606e78f23c2ef3fe9aa68c996ddfbe37b3 /textproc
parent1adc1d7af693e96a16b401f181d89db3e346c148 (diff)
downloadfreebsd-ports-gnome-84915d28c7a9d187022f4f695c4db7d803ac6182.tar.gz
freebsd-ports-gnome-84915d28c7a9d187022f4f695c4db7d803ac6182.tar.zst
freebsd-ports-gnome-84915d28c7a9d187022f4f695c4db7d803ac6182.zip
Build thread-safe library and do it in the right way to not break other ports.
Reviewed by: marcus Approved by: marcus
Diffstat (limited to 'textproc')
-rw-r--r--textproc/libxml2/Makefile11
-rw-r--r--textproc/libxml2/files/patch-configure17
-rw-r--r--textproc/libxml2/files/patch-threads.c22
3 files changed, 37 insertions, 13 deletions
diff --git a/textproc/libxml2/Makefile b/textproc/libxml2/Makefile
index af79c667b3c4..e80dfa2224e6 100644
--- a/textproc/libxml2/Makefile
+++ b/textproc/libxml2/Makefile
@@ -4,7 +4,6 @@
#
# $FreeBSD$
#
-# WITH_THREADS_BREAK enable pthread support (WILL BREAK OTHER PORTS!)
# WITHOUT_SCHEMA disable XML schema support
# WITH_MEM_DEBUG enable memory debugging (DEVELOPERS ONLY!)
# WITH_XMLLINT_HIST enable history for xmllint
@@ -13,7 +12,7 @@
PORTNAME= libxml2
PORTVERSION= 2.7.6
-PORTREVISION?= 0
+PORTREVISION?= 1
CATEGORIES?= textproc gnome
MASTER_SITES= ftp://fr.rpmfind.net/pub/libxml/ \
ftp://gd.tuwien.ac.at/pub/libxml/ \
@@ -31,7 +30,7 @@ USE_ICONV= yes
GNU_CONFIGURE= yes
USE_GNOME?= gnomehack gnometarget pkgconfig
USE_LDCONFIG= yes
-CONFIGURE_ARGS?= --with-iconv=${LOCALBASE} \
+CONFIGURE_ARGS?=--with-iconv=${LOCALBASE} \
--with-html-dir=${PREFIX}/share/doc \
--with-html-subdir=${PORTNAME} \
--without-python
@@ -43,12 +42,6 @@ MAN1= xml2-config.1 xmllint.1 xmlcatalog.1
MAN3= libxml.3
.endif
-.if defined(WITH_THREADS_BREAK)
-CONFIGURE_ARGS+= --with-threads=pthread
-.else
-CONFIGURE_ARGS+= --without-threads
-.endif
-
.if defined(WITHOUT_SCHEMA)
CONFIGURE_ARGS+= --without-schemas
.endif
diff --git a/textproc/libxml2/files/patch-configure b/textproc/libxml2/files/patch-configure
index f31e3fcda1d6..05ebdee18edd 100644
--- a/textproc/libxml2/files/patch-configure
+++ b/textproc/libxml2/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig 2009-10-10 14:33:03.000000000 -0400
-+++ configure 2009-10-10 14:33:44.000000000 -0400
-@@ -12149,7 +12149,7 @@ CC="$lt_save_CC"
+--- configure.orig 2009-10-06 18:31:12.000000000 +0200
++++ configure 2009-11-30 12:54:21.000000000 +0100
+@@ -12149,7 +12149,7 @@
VERSION_SCRIPT_FLAGS=
$(/usr/bin/ld --help 2>&1 | grep -- --version-script >/dev/null) && \
VERSION_SCRIPT_FLAGS=-Wl,--version-script=
@@ -9,7 +9,7 @@
VERSION_SCRIPT_FLAGS="-Wl,-M -Wl,"
if test -n "$VERSION_SCRIPT_FLAGS"; then
-@@ -19856,11 +19856,12 @@ fi
+@@ -19856,11 +19856,12 @@
fi
if test "$PYTHON_VERSION" != ""
then
@@ -23,3 +23,12 @@
else
if test -r $prefix/include/python$PYTHON_VERSION/Python.h
then
+@@ -20665,6 +20666,8 @@
+ fi
+ fi
+ ;;
++ *freebsd*) THREAD_LIBS=""
++ ;;
+ esac
+ if test "$WITH_THREADS" = "1" ; then
+ THREAD_CFLAGS="$THREAD_CFLAGS -D_REENTRANT"
diff --git a/textproc/libxml2/files/patch-threads.c b/textproc/libxml2/files/patch-threads.c
new file mode 100644
index 000000000000..a1ab0b3f27ec
--- /dev/null
+++ b/textproc/libxml2/files/patch-threads.c
@@ -0,0 +1,22 @@
+--- threads.c.orig 2009-11-30 12:43:34.000000000 +0100
++++ threads.c 2009-11-30 12:44:54.000000000 +0100
+@@ -26,6 +26,7 @@
+ #endif
+ #ifdef HAVE_PTHREAD_H
+ #include <pthread.h>
++#include <osreldate.h>
+ #elif defined HAVE_WIN32_THREADS
+ #include <windows.h>
+ #ifndef HAVE_COMPILER_TLS
+@@ -46,6 +47,11 @@
+
+ #ifdef HAVE_PTHREAD_H
+
++#if __FreeBSD_version < 700000
++int pthread_equal() __attribute__ ((weak));
++#define pthread_equal(a,b) ((pthread_equal) ? pthread_equal(a,b) : 1)
++#endif
++
+ static int libxml_is_threaded = -1;
+ #ifdef __GNUC__
+ #ifdef linux