Subject: pkg/17177: devel/SDL only supports pth threading
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jmmv@hispabsd.org>
List: netbsd-bugs
Date: 06/05/2002 18:22:49
>Number:         17177
>Category:       pkg
>Synopsis:       devel/SDL only supports pth threading
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 05 09:23:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Julio Merino
>Release:        NetBSD 1.6A
>Organization:
HispaBSD
>Environment:
	
	
System: NetBSD darkstar.local 1.6A NetBSD 1.6A (DARKSTAR) #0: Tue Jun 4 23:40:13 CEST 2002 jmmv@darkstar.local:/var/obj/DARKSTAR i386
Architecture: i386
Machine: i386
>Description:
	I've set PTHREAD_TYPE to pth-syscall in my mk.conf and many packages
	compile correctly. Though, devel/SDL doesn't (and it won't install
	because pth conflicts with pth-syscall, you know). The package we
	currently have only builds against pth, as it has it's name (well,
	the buildlink included) hardcoded inside.

	The following patch changes this package to use pthread.buildlink.mk
	so it can build properly using other pthread implementations (and
	supporting the 'native' type when it gets merged).
>How-To-Repeat:
	
>Fix:

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/SDL/Makefile,v
retrieving revision 1.31
diff -u -r1.31 Makefile
--- Makefile	2002/02/14 00:39:45	1.31
+++ Makefile	2002/06/05 16:15:43
@@ -11,7 +11,6 @@
 
 BUILD_DEPENDS+=		automake>=1.4:../../devel/automake
 BUILD_DEPENDS+=		nasm>=0.98:../../devel/nasm
-BUILDLINK_DEPENDS.pth=	pth>=1.4.0
 
 USE_BUILDLINK_ONLY=	YES
 
@@ -21,6 +20,8 @@
 USE_LIBTOOL=		YES
 LTCONFIG_OVERRIDE=	${WRKSRC}/ltconfig
 
+USE_PTHREAD=		native pth
+
 .include "../../mk/bsd.prefs.mk"
 
 .if ${OBJECT_FMT} == "ELF"
@@ -57,9 +58,9 @@
 	cd ${WRKSRC}/src/audio && ${CP} *.[ch] netbsd/
 
 .include "../../audio/esound/buildlink.mk"
-.include "../../devel/pth/buildlink.mk"
 .include "../../graphics/Mesa/buildlink.mk"
 .include "../../graphics/aalib-x11/buildlink.mk"
 .include "../../mk/ossaudio.buildlink.mk"
+.include "../../mk/pthread.buildlink.mk"
 .include "../../mk/x11.buildlink.mk"
 .include "../../mk/bsd.pkg.mk"
Index: buildlink.mk
===================================================================
RCS file: /cvsroot/pkgsrc/devel/SDL/buildlink.mk,v
retrieving revision 1.13
diff -u -r1.13 buildlink.mk
--- buildlink.mk	2002/01/31 13:53:41	1.13
+++ buildlink.mk	2002/06/05 16:15:44
@@ -26,6 +26,8 @@
 BUILDLINK_FILES.SDL+=	lib/libSDL.*
 BUILDLINK_FILES.SDL+=	lib/libSDLmain.*
 
+USE_PTHREAD=		native pth
+
 .include "../../mk/bsd.prefs.mk"
 
 REPLACE_BUILDLINK_SED+=	\
@@ -35,9 +37,9 @@
 .include "../../audio/nas/buildlink.mk"
 .endif
 .include "../../audio/esound/buildlink.mk"
-.include "../../devel/pth/buildlink.mk"
 .include "../../graphics/Mesa/buildlink.mk"
 .include "../../graphics/aalib-x11/buildlink.mk"
+.include "../../mk/pthread.buildlink.mk"
 
 BUILDLINK_TARGETS.SDL=		SDL-buildlink
 BUILDLINK_TARGETS.SDL+=		SDL-buildlink-config-wrapper
>Release-Note:
>Audit-Trail:
>Unformatted: