Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Nov 2006 23:17:02 +0900
From:      Norikatsu Shigemura <nork@FreeBSD.org>
To:        gnome@FreeBSD.org
Cc:        Norikatsu Shigemura <nork@FreeBSD.org>
Subject:   devel/nspr: PTHREAD_LIBS clean
Message-ID:  <20061127231702.fabededd.nork@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
Hi gnome developpers!

	I found a problem that devel/nspr doesn't reflect PTHREAD_LIBS=ANY
	(like -lthr).  Please check following patch.

	P.S. now I'm make-test-ing... :-)

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/devel/nspr/Makefile,v
retrieving revision 1.28
diff -u -r1.28 Makefile
--- Makefile	23 Nov 2006 03:43:22 -0000	1.28
+++ Makefile	27 Nov 2006 14:06:15 -0000
@@ -30,8 +30,9 @@
 
 .include <bsd.port.pre.mk>
 
-.if ${OSVERSION} < 601104
 post-patch:
+	@${REINPLACE_CMD} -e 's,-lpthread,${PTHREAD_LIBS},g' ${WRKSRC}/${CONFIGURE_SCRIPT}
+.if ${OSVERSION} < 601104
 	@${REINPLACE_CMD} -e 's|pthread_cond_wait|_pthread_cond_wait|g' \
 	    	${WRKSRC}/../pr/src/md/unix/pthreads_user.c \
 		${WRKSRC}/../pr/src/pthreads/ptsynch.c
@@ -51,7 +52,7 @@
 .endfor
 
 prtests:
-	${GMAKE} -C ${WRKSRC}/pr/tests
+	env PTHREAD_LIBS="${PTHREAD_LIBS}" ${GMAKE} -C ${WRKSRC}/pr/tests
 	${LN} -sf libmy.so.1 ${WRKSRC}/pr/tests/dll/libmy.so
 	cd ${WRKSRC}/pr/tests && ../../../pr/tests/runtests.sh
 
Index: files/patch-..::configure
===================================================================
RCS file: /home/ncvs/ports/devel/nspr/files/patch-..::configure,v
retrieving revision 1.4
diff -u -r1.4 patch-..::configure
--- files/patch-..::configure	28 Aug 2005 07:57:55 -0000	1.4
+++ files/patch-..::configure	27 Nov 2006 13:53:59 -0000
@@ -1,6 +1,6 @@
---- ../configure.orig	Thu Aug  4 21:32:00 2005
-+++ ../configure	Thu Aug  4 21:35:41 2005
-@@ -3379,16 +3379,21 @@
+--- ../configure.orig	Tue Nov 14 10:37:41 2006
++++ ../configure	Mon Nov 27 22:52:52 2006
+@@ -3466,16 +3466,21 @@
  #define HAVE_SOCKLEN_T 1
  EOF
  
@@ -24,7 +24,19 @@
      MDCPUCFG_H=_freebsd.cfg
      PR_MD_CSRCS=freebsd.c
      ;;
-@@ -5729,6 +5734,7 @@
+@@ -5467,11 +5472,6 @@
+ #define _THREAD_SAFE 1
+ EOF
+ 
+-	    	    if test "$ac_cv_have_dash_pthread" = "yes"; then
+-	        _PTHREAD_LDFLAGS="-pthread"
+-	    else
+-	        _PTHREAD_LDFLAGS="-lc_r"
+-	    fi
+ 	    ;;
+     *-netbsd*)
+ 	    if test "$ac_cv_have_dash_pthread" = "yes"; then
+@@ -5864,6 +5864,7 @@
  config/nsprincl.mk
  config/nsprincl.sh
  config/nspr-config
Index: files/patch-pr::tests::Makefile
===================================================================
RCS file: files/patch-pr::tests::Makefile
diff -N files/patch-pr::tests::Makefile
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-pr::tests::Makefile	27 Nov 2006 14:04:37 -0000
@@ -0,0 +1,11 @@
+--- pr/tests/Makefile.orig	Mon Nov 27 22:54:47 2006
++++ pr/tests/Makefile	Mon Nov 27 23:03:59 2006
+@@ -419,7 +419,7 @@
+ 
+ ifeq ($(OS_ARCH),FreeBSD)
+ ifeq ($(USE_PTHREADS),1)
+-LDOPTS += -pthread
++LDOPTS += ${PTHREAD_LIBS}
+ endif
+ LDOPTS += -Xlinker -R $(ABSOLUTE_LIB_DIR)
+ endif



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