svn commit: r496820 - head/graphics/ilmbase

Raphael Kubo da Costa rakuco at FreeBSD.org
Mon Mar 25 13:00:24 UTC 2019


Author: rakuco
Date: Mon Mar 25 13:00:23 2019
New Revision: 496820
URL: https://svnweb.freebsd.org/changeset/ports/496820

Log:
  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)

Modified:
  head/graphics/ilmbase/Makefile

Modified: head/graphics/ilmbase/Makefile
==============================================================================
--- head/graphics/ilmbase/Makefile	Mon Mar 25 12:49:25 2019	(r496819)
+++ head/graphics/ilmbase/Makefile	Mon Mar 25 13:00:23 2019	(r496820)
@@ -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}


More information about the svn-ports-all mailing list