Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Mar 2019 13:00:23 +0000 (UTC)
From:      Raphael Kubo da Costa <rakuco@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r496820 - head/graphics/ilmbase
Message-ID:  <201903251300.x2PD0NkY009171@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903251300.x2PD0NkY009171>