Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Jun 2001 13:48:36 +0200 (CEST)
From:      Espen Skoglund <esk@ira.uka.de>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/27931: devel/pth vs. native pthreads conflict fix
Message-ID:  <200106071148.f57BmaJ87816@i30nb2.ira.uka.de>

next in thread | raw e-mail | index | archive | help

>Number:         27931
>Category:       ports
>Synopsis:       devel/pth vs. native pthreads conflict fix
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 07 04:50:02 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Espen Skoglund
>Release:        FreeBSD 4.2-STABLE i386
>Organization:
Karlsruhe University
>Environment:


>Description:

As noted in ports/25224 there was a confllict with pth and native
pthreads.  I also had the same problem with XMMS back in January
(ports/24510) and contacted the pth maintainer to get this fixed.
Nothing happened for months, however, and I forgot about it.
Beeing reminded of it now I'm submitting the patch myself:

  - Put include files under ${PREFIX}/include/pth
  - Rename libthread.* to libpthread-pth.*
  - Make `pthread-config --libs' produce the correct output

I also fixed some libtool problems with the port.

I have sent mail to the maintainers of ports depending on pth to
verify that the changes are ok (seems that only graphics/landscape
and net/jabber depends on it).

The devel/pth-devel port seems to be outdated with respect to
devel/pth now.  I'm not entirely sure what to do with it.

>How-To-Repeat:


>Fix:

diff -ruN pth.orig/Makefile pth/Makefile
--- pth.orig/Makefile	Thu Jun  7 13:04:06 2001
+++ pth/Makefile	Thu Jun  7 12:46:47 2001
@@ -15,8 +15,8 @@
 MAINTAINER=	ports@FreeBSD.org
 
 INSTALLS_SHLIB=	yes
-HAS_CONFIGURE=	yes
-CONFIGURE_ARGS=	--prefix=${PREFIX} \
+USE_LIBTOOL=	yes
+CONFIGURE_ARGS=	--includedir=${PREFIX}/include/pth \
 		--enable-pthread \
 		--enable-syscall-soft \
 		--enable-optimize \
@@ -24,6 +24,16 @@
 
 MAN1=		pth-config.1 pthread-config.1
 MAN3=		pth.3 pthread.3
+
+pre-patch:
+	@${PERL} -pi -e 's,\$$srcdir/(ltconfig|ltmain.sh),\$$ac_aux_dir/\1,g' \
+		${WRKSRC}/configure
+
+post-configure:
+	@${PERL} -pi -e 's,libpthread,libpthread-pth,g; \
+		s,\$$\(SHTOOL\) (install),\1,g' ${WRKSRC}/Makefile
+	@${PERL} -pi -e 's,-lpthread,-lpthread-pth,g' \
+		${WRKSRC}/pthread-config ${WRKSRC}/pthread.3
 
 post-build:
 	@${ECHO_MSG} "===>  Use 'make test' to run a quick test suite."
diff -ruN pth.orig/pkg-plist pth/pkg-plist
--- pth.orig/pkg-plist	Thu Jun  7 13:01:35 2001
+++ pth/pkg-plist	Thu Jun  7 12:59:11 2001
@@ -1,13 +1,12 @@
 bin/pth-config
 bin/pthread-config
-include/pth.h
-include/pthread.h
+include/pth/pth.h
+include/pth/pthread.h
 lib/libpth.a
-lib/libpth.la
 lib/libpth.so
 lib/libpth.so.14
-lib/libpthread.a
-lib/libpthread.la
-lib/libpthread.so
-lib/libpthread.so.14
+lib/libpthread-pth.a
+lib/libpthread-pth.so
+lib/libpthread-pth.so.14
 share/aclocal/pth.m4
+@dirrm include/pth
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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