From 2c735d81a83ba94c43473d5bede462ecfc336def Mon Sep 17 00:00:00 2001 From: gdt Date: Wed, 27 Feb 2013 15:59:07 +0000 Subject: Conditionally include a file in PLIST. In python 2.6 (and presumably earlier), but not in 2.7, twisted creates a file _initgroups.so. --- net/py-twisted/Makefile | 11 ++++++++++- net/py-twisted/PLIST | 3 ++- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'net') diff --git a/net/py-twisted/Makefile b/net/py-twisted/Makefile index 5fea9fb67a0..e3fcaf78e01 100644 --- a/net/py-twisted/Makefile +++ b/net/py-twisted/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.19 2013/02/22 19:35:30 jperkin Exp $ +# $NetBSD: Makefile,v 1.20 2013/02/27 15:59:07 gdt Exp $ PKGNAME= ${PYPKGPREFIX}-twisted-${TWISTED_VERSION} +PKGREVISION= 1 COMMENT= Framework for writing networked applications .include "../../net/py-twisted/Makefile.common" @@ -35,4 +36,12 @@ CHECK_FILES_SKIP+= ${PREFIX}/${PYSITELIB}/twisted/plugins/dropin.cache # egg.mk restricts the Python version list .include "../../lang/python/egg.mk" .include "../../lang/python/application.mk" + +# With python 2.6, twisted builds an additional object. +# XXX Guess that 2.5 does this too. +PLIST_VARS+= initgroups +.if ${PYPKGPREFIX} == "py26" || ${PYPKGPREFIX} == "py25" +PLIST.initgroups= YES +.endif + .include "../../mk/bsd.pkg.mk" diff --git a/net/py-twisted/PLIST b/net/py-twisted/PLIST index 39002d29539..ab02777b9cd 100644 --- a/net/py-twisted/PLIST +++ b/net/py-twisted/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.10 2013/02/17 14:53:13 gdt Exp $ +@comment $NetBSD: PLIST,v 1.11 2013/02/27 15:59:07 gdt Exp $ bin/cftp bin/ckeygen bin/conch @@ -1252,6 +1252,7 @@ ${PYSITELIB}/twisted/python/__init__.pyo ${PYSITELIB}/twisted/python/_epoll.c ${PYSITELIB}/twisted/python/_epoll.pyx ${PYSITELIB}/twisted/python/_initgroups.c +${PLIST.initgroups}${PYSITELIB}/twisted/python/_initgroups.so ${PYSITELIB}/twisted/python/_inotify.py ${PYSITELIB}/twisted/python/_inotify.pyc ${PYSITELIB}/twisted/python/_inotify.pyo -- cgit v1.2.3