pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/43845 ([PATCH] security/gnupg2 and security/dirmngr should not include pth/buildlink3.mk)



On Tuesday 7. of September 2010 11:00:24 Matthias Drochner wrote:
> rumcic%gmail.com@localhost said:
> > will have to look towards devel/pth to see if it really needs to
> > install  libpthread on systems where native version is available
>
> Might make sense, I did consider something similar too, for the pthread.h
> header installed by pth. It can lead to confusion for programs built
> outside the pkgsrc/bl3 framework.
>
> best regards
> Matthias
<snip>

With the following patch, gnupg2 and dirmngr still compile, but I don't end up 
with duplicate pthread stuff.
Should this be put in a new PR? And is "defined(PTHREAD_TYPE)" really needed? 

diff --git a/devel/pth/Makefile b/devel/pth/Makefile
index c94b116..5deb37c 100644
--- a/devel/pth/Makefile
+++ b/devel/pth/Makefile
@@ -19,7 +19,6 @@ MAKE_JOBS_SAFE=               no

 USE_LIBTOOL=           YES
 GNU_CONFIGURE=         YES
-CONFIGURE_ARGS+=       --enable-pthread
 CONFIGURE_ARGS+=       --with-fdsetsize=1024
 #CONFIGURE_ARGS+=      --enable-debug

@@ -39,6 +38,14 @@ CONFIGURE_ENV+=              ac_cv_check_nfdstype='unsigned 
int'
 CONFIGURE_ENV+=                ac_cv_typedef_nfds_t=no # in <poll.h>, but 
that's unused
 .endif

+PLIST_VARS+=           pthread
+
+.include "../../mk/pthread.buildlink3.mk"
+.if defined(PTHREAD_TYPE) && ${PTHREAD_TYPE} != "native"
+CONFIGURE_ARGS+=       --enable-pthread
+PLIST.pthread=         yes
+.endif
+
 INSTALLATION_DIRS=     share/doc/pth

 post-install:
diff --git a/devel/pth/PLIST b/devel/pth/PLIST
index 38e3669..71859ce 100644
--- a/devel/pth/PLIST
+++ b/devel/pth/PLIST
@@ -1,14 +1,14 @@
 @comment $NetBSD: PLIST,v 1.2 2004/09/22 08:09:29 jlam Exp $
 bin/pth-config
-bin/pthread-config
+${PLIST.pthread}bin/pthread-config
 include/pth.h
-include/pthread.h
+${PLIST.pthread}include/pthread.h
 lib/libpth.la
-lib/libpthread.la
+${PLIST.pthread}lib/libpthread.la
 man/man1/pth-config.1
-man/man1/pthread-config.1
+${PLIST.pthread}man/man1/pthread-config.1
 man/man3/pth.3
-man/man3/pthread.3
+${PLIST.pthread}man/man3/pthread.3
 share/aclocal/pth.m4
 share/doc/pth/ANNOUNCE
 share/doc/pth/AUTHORS

-- 
Regards,
Rumko

Attachment: signature.asc
Description: This is a digitally signed message part.



Home | Main Index | Thread Index | Old Index