diff options
author | swills <swills@FreeBSD.org> | 2012-09-25 22:55:49 +0800 |
---|---|---|
committer | swills <swills@FreeBSD.org> | 2012-09-25 22:55:49 +0800 |
commit | 464a34f0649742e2622b64ce53fbfee88ebce184 (patch) | |
tree | a93863872a10d968cdea5b73ccdc7426b84aff6f /textproc | |
parent | d542163381dcdfc9e40e665ce917d02e9643d0ac (diff) | |
download | freebsd-ports-gnome-464a34f0649742e2622b64ce53fbfee88ebce184.tar.gz freebsd-ports-gnome-464a34f0649742e2622b64ce53fbfee88ebce184.tar.zst freebsd-ports-gnome-464a34f0649742e2622b64ce53fbfee88ebce184.zip |
- Build with -pthread and include -pthread in xml2-config --libs output when threads are enabled
PR: ports/171353
Discussed with: marcus, kwm
Approved by: marcus
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/libxml2/Makefile | 11 | ||||
-rw-r--r-- | textproc/libxml2/files/extra-patch-threads | 11 |
2 files changed, 21 insertions, 1 deletions
diff --git a/textproc/libxml2/Makefile b/textproc/libxml2/Makefile index 9b4f11b399f0..4945f6259e5f 100644 --- a/textproc/libxml2/Makefile +++ b/textproc/libxml2/Makefile @@ -13,7 +13,7 @@ PORTNAME= libxml2 PORTVERSION= 2.7.8 -PORTREVISION?= 3 +PORTREVISION?= 4 CATEGORIES?= textproc gnome MASTER_SITES= ftp://gd.tuwien.ac.at/pub/libxml/ \ ftp://xmlsoft.org/libxml2/ @@ -54,6 +54,11 @@ CONFIGURE_ARGS+= --without-schemas .if defined(WITHOUT_THREADS) CONFIGURE_ARGS+= --without-threads +.else +CPPFLAGS+= ${PTHREAD_CFLAGS} +CFLAGS+= ${PTHREAD_CFLAGS} +LDFLAGS+= ${PTHREAD_LIBS} +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-threads .endif .if defined(WITH_MEM_DEBUG) @@ -69,6 +74,10 @@ CONFIGURE_ARGS+= --with-thread-alloc .endif post-patch: +.if !defined(WITHOUT_THREADS) + @${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|' \ + ${WRKSRC}/xml2-config.in +.endif .for d in . doc doc/devhelp doc/examples @${REINPLACE_CMD} -e '/^install-data-am:/ s|install-data-local||' \ ${WRKSRC}/${d}/Makefile.in diff --git a/textproc/libxml2/files/extra-patch-threads b/textproc/libxml2/files/extra-patch-threads new file mode 100644 index 000000000000..d7f46b142367 --- /dev/null +++ b/textproc/libxml2/files/extra-patch-threads @@ -0,0 +1,11 @@ +--- xml2-config.in.orig 2012-09-08 17:23:54.000000000 +0000 ++++ xml2-config.in 2012-09-08 17:26:22.000000000 +0000 +@@ -91,7 +91,7 @@ + echo @XML_LIBDIR@ @XML_LIBS@ + fi + else +- echo @XML_LIBDIR@ @XML_LIBS@ @WIN32_EXTRA_LIBADD@ ++ echo @XML_LIBDIR@ @XML_LIBS@ @WIN32_EXTRA_LIBADD@ %%PTHREAD_LIBS%% + fi + ;; + |