summaryrefslogtreecommitdiff
path: root/textproc
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2012-04-03 09:08:33 +0000
committerobache <obache@pkgsrc.org>2012-04-03 09:08:33 +0000
commit14d3d60f3c80aad5db22748c63843cb1da518d0a (patch)
tree346e21e9b0224ad805331c33f50ef5d197a7a84b /textproc
parent321ac800bb4bfb480a5f9de7c164a796ebdb020d (diff)
downloadpkgsrc-14d3d60f3c80aad5db22748c63843cb1da518d0a.tar.gz
Change behavior of libpthread handling
* Disable linkage with pthread for FreeBSD/DragonFly/NetBSD, they have pthread_* () stubs in libc (it result in same as the previous behavior). * but NetBSD<4.99.36 does not have pthread_equal() stub in libc, so define weak reference to it. * Treat OpenBSD and MirBSD same as Linux to avoid linkage with libpthread. * Others will be linked with pthread, fixes PR 46254. tested NetBSD-5.1.2, and confirmed fixed on NetBSD-4.0.1 and OpenBSD-5.0. Bump PKGREVISION.
Diffstat (limited to 'textproc')
-rw-r--r--textproc/libxml2/Makefile8
-rw-r--r--textproc/libxml2/distinfo7
-rw-r--r--textproc/libxml2/patches/patch-aa11
-rw-r--r--textproc/libxml2/patches/patch-ab24
-rw-r--r--textproc/libxml2/patches/patch-threads.c37
5 files changed, 66 insertions, 21 deletions
diff --git a/textproc/libxml2/Makefile b/textproc/libxml2/Makefile
index 1c2a2d46b03..da3bcfe36fa 100644
--- a/textproc/libxml2/Makefile
+++ b/textproc/libxml2/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.114 2012/03/09 12:12:27 drochner Exp $
+# $NetBSD: Makefile,v 1.115 2012/04/03 09:08:33 obache Exp $
DISTNAME= libxml2-2.7.8
-PKGREVISION= 8
+PKGREVISION= 9
CATEGORIES= textproc
MASTER_SITES= ftp://xmlsoft.org/libxml2/ \
http://xmlsoft.org/sources/
@@ -43,10 +43,6 @@ SUBST_FILES.cat= catalog.c xmlcatalog.c
SUBST_SED.cat= -e "s,@@SGML_DEFAULT_CATALOG@@,${SGML_DEFAULT_CATALOG},g"
SUBST_SED.cat+= -e "s,@@XML_DEFAULT_CATALOG@@,${XML_DEFAULT_CATALOG},g"
-# XXX make sure the library is not linked against libpthread
-post-install:
- test -z "`ldd ${DESTDIR}${PREFIX}/lib/libxml2.so | grep pthread`"
-
.include "../../mk/pthread.buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../converters/libiconv/buildlink3.mk"
diff --git a/textproc/libxml2/distinfo b/textproc/libxml2/distinfo
index ff118c570f9..032e6781739 100644
--- a/textproc/libxml2/distinfo
+++ b/textproc/libxml2/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.89 2012/03/09 12:12:27 drochner Exp $
+$NetBSD: distinfo,v 1.90 2012/04/03 09:08:33 obache Exp $
SHA1 (libxml2-2.7.8.tar.gz) = 859dd535edbb851cc15b64740ee06551a7a17d40
RMD160 (libxml2-2.7.8.tar.gz) = 30709622cfe3e2175e73d6701b7e19a25ab5ac47
@@ -6,8 +6,8 @@ Size (libxml2-2.7.8.tar.gz) = 4881808 bytes
SHA1 (patch-CVE-2012-0841-aa) = b5fcb53c69ab808aafbaa81e9a4bef3f69057ff8
SHA1 (patch-CVE-2012-0841-ab) = 2fd0d1a610bc517c4062f5ba30ec546d153eb5a1
SHA1 (patch-CVE-2012-0841-ac) = 3ee79a6ecaf498ae0db4f64a10e22cc3e515e1e3
-SHA1 (patch-aa) = 965bfc2226828b5161a4541cf73f5b5ef9a7e88e
-SHA1 (patch-ab) = d8dfd5bd9632d32c7e32e35e4d4735e510fc438f
+SHA1 (patch-aa) = 9e19e9218d2e209bf49e9491842c8097005eba65
+SHA1 (patch-ab) = 375946d5aaedd9594b41336941440d5071c392dc
SHA1 (patch-ac) = 264c75cf9fff5319105b971c122cdf5fc103c04e
SHA1 (patch-ad) = cd45da492b02cce9983c46762839f68b8b1e0177
SHA1 (patch-ae) = b8d8e0275cab3caafd98275ac22b63951fc4b5fd
@@ -18,4 +18,5 @@ SHA1 (patch-al) = 45f984fef5cf5d04c46e940867707897396a9c9f
SHA1 (patch-am) = ae7ab69b7bba2271d2d996161cc8b9956d0b06fa
SHA1 (patch-include_libxml_xpath.h) = 3fc74551a7843668cf9ffee19b1f20ccb674e153
SHA1 (patch-testapi.c) = 63a0a34c8ca98d9214c4d3391e97d9a9ca4569f8
+SHA1 (patch-threads.c) = f686b5b3af1d09da8edb95b311780ae69071bcb2
SHA1 (patch-xpointer.c) = fa720fd515bab3f99bb11bf56320b3ad8e5fb211
diff --git a/textproc/libxml2/patches/patch-aa b/textproc/libxml2/patches/patch-aa
index a91cd6a09cd..a205a1b1b0c 100644
--- a/textproc/libxml2/patches/patch-aa
+++ b/textproc/libxml2/patches/patch-aa
@@ -1,16 +1,7 @@
-$NetBSD: patch-aa,v 1.24 2012/02/22 11:10:18 drochner Exp $
+$NetBSD: patch-aa,v 1.25 2012/04/03 09:08:33 obache Exp $
--- Makefile.in.orig 2010-11-04 17:28:16.000000000 +0000
+++ Makefile.in
-@@ -569,7 +569,7 @@ DIST_SUBDIRS = include . doc example pyt
- INCLUDES = -I$(top_builddir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@
- bin_SCRIPTS = xml2-config
- lib_LTLIBRARIES = libxml2.la
--libxml2_la_LIBADD = @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) @M_LIBS@ @WIN32_EXTRA_LIBADD@
-+libxml2_la_LIBADD = @Z_LIBS@ $(ICONV_LIBS) @M_LIBS@ @WIN32_EXTRA_LIBADD@
- @USE_VERSION_SCRIPT_FALSE@LIBXML2_VERSION_SCRIPT =
- @USE_VERSION_SCRIPT_TRUE@LIBXML2_VERSION_SCRIPT = $(VERSION_SCRIPT_FLAGS)$(srcdir)/libxml2.syms
- libxml2_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ \
@@ -714,7 +714,7 @@ pkgconfig_DATA = libxml-2.0.pc
#
BASE_DIR = $(datadir)/doc
diff --git a/textproc/libxml2/patches/patch-ab b/textproc/libxml2/patches/patch-ab
index 835abff30fe..78e09db984d 100644
--- a/textproc/libxml2/patches/patch-ab
+++ b/textproc/libxml2/patches/patch-ab
@@ -1,4 +1,4 @@
-$NetBSD: patch-ab,v 1.22 2012/02/22 11:10:18 drochner Exp $
+$NetBSD: patch-ab,v 1.23 2012/04/03 09:08:33 obache Exp $
--- configure.orig 2010-11-04 17:28:14.000000000 +0000
+++ configure
@@ -46,7 +46,27 @@ $NetBSD: patch-ab,v 1.22 2012/02/22 11:10:18 drochner Exp $
$as_echo "#define HAVE_LIBPTHREAD /**/" >>confdefs.h
-@@ -14582,10 +14582,10 @@ $as_echo "#define snprintf _snprintf" >>
+@@ -13879,7 +13879,7 @@ fi
+ *beos*) WITH_THREADS="1"
+ THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_BEOS_THREADS"
+ ;;
+- *linux*)
++ *linux* | *openbsd* | *mirbsd*)
+ if test "${GCC}" = "yes" ; then
+ GCC_VERSION=`${CC} --version | head -1 | awk '{print $3}'`
+ GCC_MAJOR=`echo ${GCC_VERSION} | sed 's+\..*++'`
+@@ -13901,6 +13901,10 @@ fi
+ fi
+ fi
+ ;;
++ *freebsd* | *netbsd* | *dragonfly*)
++ THREAD_LIBS=""
++ BASE_THREAD_LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}"
++ ;;
+ esac
+ if test "$WITH_THREADS" = "1" ; then
+ THREAD_CFLAGS="$THREAD_CFLAGS -D_REENTRANT"
+@@ -14582,10 +14586,10 @@ $as_echo "#define snprintf _snprintf" >>
$as_echo "#define vsnprintf _vsnprintf" >>confdefs.h
diff --git a/textproc/libxml2/patches/patch-threads.c b/textproc/libxml2/patches/patch-threads.c
new file mode 100644
index 00000000000..41274d1ca63
--- /dev/null
+++ b/textproc/libxml2/patches/patch-threads.c
@@ -0,0 +1,37 @@
+$NetBSD: patch-threads.c,v 1.1 2012/04/03 09:08:33 obache Exp $
+
+* Treat OpenBSD and MirBSD sam as Linux to avoid linked with libpthreead.
+* NetBSD<4.99.36 lack of pthread_equal() stub function in libc.
+
+--- threads.c.orig 2010-10-15 17:28:30.000000000 +0000
++++ threads.c
+@@ -42,13 +42,17 @@
+ #include <note.h>
+ #endif
+
++#if defined(__NetBSD__)
++#include <sys/param.h>
++#endif
++
+ /* #define DEBUG_THREADS */
+
+ #ifdef HAVE_PTHREAD_H
+
+ static int libxml_is_threaded = -1;
+ #ifdef __GNUC__
+-#ifdef linux
++#if defined(linux) || defined(__OpenBSD__) || defined(__MirBSD__)
+ #if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3)
+ extern int pthread_once (pthread_once_t *__once_control,
+ void (*__init_routine) (void))
+@@ -90,6 +94,10 @@ extern int pthread_cond_signal ()
+ #endif
+ #endif /* linux */
+ #endif /* __GNUC__ */
++#if defined(__NetBSD__) && __NetBSD_Version__ < 499003600
++extern int pthread_equal ()
++ __attribute((weak));
++#endif /* NetBSD-4 */
+ #endif /* HAVE_PTHREAD_H */
+
+ /*