1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-13 07:34:50 +00:00

Simplify pthread + libtool workaround.

Improve upon r496818. Instead of setting both MAKE_ENV and patching ilmthread's
Makefile, just make sure PTHREAD_LIBS is set a configuration time. This is what
Debian does, and it achieves the same solution with fewer lines.

While here, add an explanation for why we need this.

PR:		236734
Approved by:	mandree (maintainer)
This commit is contained in:
Raphael Kubo da Costa 2019-03-25 13:00:23 +00:00
parent 8c335c39c4
commit e3bc0d6c63
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=496820

View File

@ -24,7 +24,10 @@ GNU_CONFIGURE= yes
# The configure script uses bash arrays
CONFIGURE_SHELL=${BASH_CMD}
CONFIGURE_ARGS= --disable-static
MAKE_ARGS+= PTHREAD_LIBS="-pthread -lpthread"
# libtool links C++ libraries with -nostdlib, which prevents -pthread from
# having an effect (at least with clang). Make sure we also pass -lpthread so
# we do link against libthr.so.
CONFIGURE_ENV+= PTHREAD_LIBS="-pthread -lpthread"
TEST_TARGET= check
PORTDOCS= AUTHORS ChangeLog README.md
@ -48,7 +51,6 @@ regression-test regression check:: test
post-configure:
${REINPLACE_CMD} -e 's/#define HAVE_UCONTEXT_H 1/#undef HAVE_UCONTEXT_H/' ${WRKSRC}/config/IlmBaseConfig.h
${REINPLACE_CMD} -e '/^libIlmThread_la_LIBADD/s/$$/ $$(PTHREAD_LIBS)/' ${WRKSRC}/IlmThread/Makefile
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libHalf.so.${VER}