Sat Apr 23 10:35:28 2011 UTC ()
Correct path to Python interpreter in all ".py" files to fix build
with revision 1.26 of "pkgsrc/mk/check/check-interpreter.mk".

Bump package revision because the binary package changed.


(tron)
diff -r1.3 -r1.4 pkgsrc/lang/python27/Makefile

cvs diff -r1.3 -r1.4 pkgsrc/lang/python27/Makefile (switch to unified diff)

--- pkgsrc/lang/python27/Makefile 2011/04/22 13:42:06 1.3
+++ pkgsrc/lang/python27/Makefile 2011/04/23 10:35:28 1.4
@@ -1,177 +1,175 @@ @@ -1,177 +1,175 @@
1# $NetBSD: Makefile,v 1.3 2011/04/22 13:42:06 obache Exp $ 1# $NetBSD: Makefile,v 1.4 2011/04/23 10:35:28 tron Exp $
2 2
3.include "dist.mk" 3.include "dist.mk"
4 4
5PKGNAME= python27-${PY_DISTVERSION} 5PKGNAME= python27-${PY_DISTVERSION}
6PKGREVISION= 2 6PKGREVISION= 3
7CATEGORIES= lang python 7CATEGORIES= lang python
8 8
9MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
10HOMEPAGE= http://www.python.org/ 10HOMEPAGE= http://www.python.org/
11COMMENT= Interpreted, interactive, object-oriented programming language 11COMMENT= Interpreted, interactive, object-oriented programming language
12LICENSE= python-software-foundation 12LICENSE= python-software-foundation
13 13
14PKG_DESTDIR_SUPPORT= user-destdir 14PKG_DESTDIR_SUPPORT= user-destdir
15 15
16CONFLICTS+= python-[0-9]* 16CONFLICTS+= python-[0-9]*
17 17
18GNU_CONFIGURE= yes 18GNU_CONFIGURE= yes
19CONFIGURE_ARGS+= --with-threads 19CONFIGURE_ARGS+= --with-threads
20CONFIGURE_ARGS+= --enable-shared 20CONFIGURE_ARGS+= --enable-shared
21CONFIGURE_ARGS+= OPT=${CFLAGS:Q} 21CONFIGURE_ARGS+= OPT=${CFLAGS:Q}
22CONFIGURE_ARGS+= --with-system-ffi 22CONFIGURE_ARGS+= --with-system-ffi
23CONFIGURE_ARGS+= --with-dbmliborder=ndbm:bdb 23CONFIGURE_ARGS+= --with-dbmliborder=ndbm:bdb
24 24
25LDFLAGS+= -L${WRKSRC} 25LDFLAGS+= -L${WRKSRC}
26 26
27# $RANDOM usage there is fine 27# $RANDOM usage there is fine
28CHECK_PORTABILITY_SKIP= Tools/faqwiz/move-faqwiz.sh 28CHECK_PORTABILITY_SKIP= Tools/faqwiz/move-faqwiz.sh
29 29
30USE_LANGUAGES= c c++ 30USE_LANGUAGES= c c++
31 31
32PTHREAD_OPTS+= require 32PTHREAD_OPTS+= require
33.include "../../mk/pthread.buildlink3.mk" 33.include "../../mk/pthread.buildlink3.mk"
34.if ${PTHREAD_TYPE} == "pth" 34.if ${PTHREAD_TYPE} == "pth"
35CONFIGURE_ARGS+= --with-pth 35CONFIGURE_ARGS+= --with-pth
36.endif 36.endif
37 37
38.include "../../mk/bsd.prefs.mk" 38.include "../../mk/bsd.prefs.mk"
39 39
40# fdatasync() 40# fdatasync()
41LIBS.SunOS+= -lrt 41LIBS.SunOS+= -lrt
42 42
43PY_VER_SUFFIX= 2.7 43PY_VER_SUFFIX= 2.7
44 44
45PLIST_SRC= ${.CURDIR}/../../lang/python27/PLIST.common 45PLIST_SRC= ${.CURDIR}/../../lang/python27/PLIST.common
46.if exists(${.CURDIR}/../../lang/python27/PLIST.${OPSYS}) 46.if exists(${.CURDIR}/../../lang/python27/PLIST.${OPSYS})
47PLIST_SRC+= ${.CURDIR}/../../lang/python27/PLIST.${OPSYS} 47PLIST_SRC+= ${.CURDIR}/../../lang/python27/PLIST.${OPSYS}
48.endif 48.endif
49PLIST_SRC+= ${.CURDIR}/../../lang/python27/PLIST.common_end 49PLIST_SRC+= ${.CURDIR}/../../lang/python27/PLIST.common_end
50 50
51.if ${OPSYS} == "NetBSD" 51.if ${OPSYS} == "NetBSD"
52PRIVILEGED_STAGES+= clean 52PRIVILEGED_STAGES+= clean
53# XXX work around a botched autoconf check which ignores libintl 53# XXX work around a botched autoconf check which ignores libintl
54CONFIGURE_ENV+= ac_cv_func_bind_textdomain_codeset=yes 54CONFIGURE_ENV+= ac_cv_func_bind_textdomain_codeset=yes
55.endif 55.endif
56 56
57.if ${OPSYS} == "Darwin" || ${OPSYS} == "Interix" 57.if ${OPSYS} == "Darwin" || ${OPSYS} == "Interix"
58PY_PLATNAME= ${LOWER_OPSYS} 58PY_PLATNAME= ${LOWER_OPSYS}
59USE_TOOLS+= gmake 59USE_TOOLS+= gmake
60.elif ${OPSYS} == "IRIX" 60.elif ${OPSYS} == "IRIX"
61PY_PLATNAME= ${LOWER_OPSYS:C/\..*//} 61PY_PLATNAME= ${LOWER_OPSYS:C/\..*//}
62.elif ${OPSYS} == "SunOS" 62.elif ${OPSYS} == "SunOS"
63PY_PLATNAME= sunos${OS_VERSION:C/\..*//} 63PY_PLATNAME= sunos${OS_VERSION:C/\..*//}
64.elif ${OPSYS} == "HPUX" 64.elif ${OPSYS} == "HPUX"
65PY_PLATNAME= hp-ux11 65PY_PLATNAME= hp-ux11
66.else 66.else
67PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//} 67PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//}
68.endif 68.endif
69PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q} 69PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q}
70 70
71.if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "amd64") || \ 71.if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "amd64") || \
72 (${MACHINE_ARCH} == "sparc64") || (${MACHINE_ARCH} == "x86_64") || \ 72 (${MACHINE_ARCH} == "sparc64") || (${MACHINE_ARCH} == "x86_64") || \
73 (defined(ABI) && ${ABI} == "64") 73 (defined(ABI) && ${ABI} == "64")
74IS_64BIT_PLATFORM?= yes 74IS_64BIT_PLATFORM?= yes
75.else 75.else
76IS_64BIT_PLATFORM?= no 76IS_64BIT_PLATFORM?= no
77.endif 77.endif
78 78
79# the dl module isn't built for 64 bit archs 79# the dl module isn't built for 64 bit archs
80PLIST_VARS+= dl 80PLIST_VARS+= dl
81.if empty(IS_64BIT_PLATFORM:M[yY][eE][sS]) 81.if empty(IS_64BIT_PLATFORM:M[yY][eE][sS])
82PLIST.dl= yes 82PLIST.dl= yes
83.endif 83.endif
84 84
85# builds additional modules if OpenSSL < 0.9.8 85# builds additional modules if OpenSSL < 0.9.8
86PLIST_VARS+= openssl097 86PLIST_VARS+= openssl097
87CHECK_BUILTIN.openssl:= no 87CHECK_BUILTIN.openssl:= no
88.include "../../security/openssl/builtin.mk" 88.include "../../security/openssl/builtin.mk"
89CHECK_BUILTIN.openssl:= yes 89CHECK_BUILTIN.openssl:= yes
90.if !empty(USE_BUILTIN.openssl:M[yY][eE][sS]) && \ 90.if !empty(USE_BUILTIN.openssl:M[yY][eE][sS]) && \
91 !empty(BUILTIN_PKG.openssl:Mopenssl-0.9.[67]*) 91 !empty(BUILTIN_PKG.openssl:Mopenssl-0.9.[67]*)
92PLIST.openssl097= yes 92PLIST.openssl097= yes
93.endif 93.endif
94 94
95# setup.py causes some modules to be built if the platform is *not* 64bit. 95# setup.py causes some modules to be built if the platform is *not* 64bit.
96PLIST_VARS+= extra-so 96PLIST_VARS+= extra-so
97.if !empty(IS_64BIT_PLATFORM:M[nN][oO]) 97.if !empty(IS_64BIT_PLATFORM:M[nN][oO])
98PLIST.extra-so= yes 98PLIST.extra-so= yes
99.endif 99.endif
100 100
101# Make sure python modules can link correctly 101# Make sure python modules can link correctly
102.if ${OPSYS} == "Darwin" 102.if ${OPSYS} == "Darwin"
103INSTALL_UNSTRIPPED= yes 103INSTALL_UNSTRIPPED= yes
104.endif 104.endif
105 105
106PLIST_VARS+= dll nis no-nis 106PLIST_VARS+= dll nis no-nis
107.if ${OPSYS} == "IRIX" 107.if ${OPSYS} == "IRIX"
108. if ${ABI} == "64" 108. if ${ABI} == "64"
109PLIST.no-nis= yes 109PLIST.no-nis= yes
110. else 110. else
111PLIST.nis= yes 111PLIST.nis= yes
112. endif 112. endif
113.else 113.else
114PLIST.dll= yes 114PLIST.dll= yes
115. if ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat) 115. if ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat)
116PLIST.nis= yes 116PLIST.nis= yes
117. else 117. else
118PLIST.no-nis= yes 118PLIST.no-nis= yes
119. endif 119. endif
120.endif 120.endif
121 121
122.include "../../mk/bdb.buildlink3.mk" 122.include "../../mk/bdb.buildlink3.mk"
123MAKE_ENV+= PY_BDB_TYPE=${BDB_TYPE} 123MAKE_ENV+= PY_BDB_TYPE=${BDB_TYPE}
124.if empty(BDB_LIBS) 124.if empty(BDB_LIBS)
125BUILDLINK_TRANSFORM+= rm:-ldb 125BUILDLINK_TRANSFORM+= rm:-ldb
126.endif 126.endif
127CFLAGS+= -DHAVE_DB_185_H 127CFLAGS+= -DHAVE_DB_185_H
128 128
129.if ${OPSYS} == "OSF1" 129.if ${OPSYS} == "OSF1"
130# configure complains about buggy getaddrinfo() 130# configure complains about buggy getaddrinfo()
131CONFIGURE_ARGS+= --disable-ipv6 131CONFIGURE_ARGS+= --disable-ipv6
132.endif 132.endif
133 133
134.if defined(BUILDLINK_TRANSFORM) 134.if defined(BUILDLINK_TRANSFORM)
135MAKE_ENV+= PY_BDB_TRANSFORM=${BUILDLINK_TRANSFORM:Q} 135MAKE_ENV+= PY_BDB_TRANSFORM=${BUILDLINK_TRANSFORM:Q}
136.endif 136.endif
137 137
138PLIST_SUBST+= PY_VER_SUFFIX=${PY_VER_SUFFIX:Q} 138PLIST_SUBST+= PY_VER_SUFFIX=${PY_VER_SUFFIX:Q}
139 139
140TEST_TARGET= test 140TEST_TARGET= test
141INSTALL_TARGET= altinstall 141INSTALL_TARGET= altinstall
142 142
143REPLACE_INTERPRETER+= py27 143REPLACE_INTERPRETER+= py27
144REPLACE.py27.old= .*python[^ ]* 144REPLACE.py27.old= .*python[^ ]*
145REPLACE.py27.new= ${PREFIX}/bin/python${PY_VER_SUFFIX} 145REPLACE.py27.new= ${PREFIX}/bin/python${PY_VER_SUFFIX}
146REPLACE_FILES.py27= Lib/cgi.py # explicitly demanded to be patched 146REPLACE_FILES.py27= Lib/*.py Lib/*/*.py Lib/*/*/*.py
147REPLACE_FILES.py27+= Lib/bsddb/dbshelve.py Lib/test/test_bz2.py 
148REPLACE_FILES.py27+= Lib/test/test_largefile.py Lib/test/test_optparse.py 
149 147
150SUBST_CLASSES+= findlib 148SUBST_CLASSES+= findlib
151SUBST_MESSAGE.findlib= Fixing find_library_file on Darwin. 149SUBST_MESSAGE.findlib= Fixing find_library_file on Darwin.
152SUBST_STAGE.findlib= pre-configure 150SUBST_STAGE.findlib= pre-configure
153SUBST_FILES.findlib= Lib/distutils/unixccompiler.py 151SUBST_FILES.findlib= Lib/distutils/unixccompiler.py
154SUBST_SED.findlib= -e 's,/usr/local,${PREFIX},' 152SUBST_SED.findlib= -e 's,/usr/local,${PREFIX},'
155 153
156post-extract: 154post-extract:
157 ${MV} ${WRKSRC}/Lib/smtpd.py ${WRKSRC}/Lib/smtpd${PY_VER_SUFFIX}.py 155 ${MV} ${WRKSRC}/Lib/smtpd.py ${WRKSRC}/Lib/smtpd${PY_VER_SUFFIX}.py
158 ${MV} ${WRKSRC}/Tools/scripts/pydoc ${WRKSRC}/Tools/scripts/pydoc${PY_VER_SUFFIX} 156 ${MV} ${WRKSRC}/Tools/scripts/pydoc ${WRKSRC}/Tools/scripts/pydoc${PY_VER_SUFFIX}
159 ${MV} ${WRKSRC}/Tools/scripts/2to3 ${WRKSRC}/Tools/scripts/2to3-${PY_VER_SUFFIX} 157 ${MV} ${WRKSRC}/Tools/scripts/2to3 ${WRKSRC}/Tools/scripts/2to3-${PY_VER_SUFFIX}
160 158
161.if ${OPSYS} == "HPUX" 159.if ${OPSYS} == "HPUX"
162post-install: 160post-install:
163 ${LN} -fs ${DESTDIR}${PREFIX}/lib/libpython2.7.sl \ 161 ${LN} -fs ${DESTDIR}${PREFIX}/lib/libpython2.7.sl \
164 ${DESTDIR}${PREFIX}/lib/libpython2.7.sl.1.0 162 ${DESTDIR}${PREFIX}/lib/libpython2.7.sl.1.0
165.endif 163.endif
166 164
167USE_GNU_READLINE= yes 165USE_GNU_READLINE= yes
168BUILDLINK_DEPMETHOD.readline= build 166BUILDLINK_DEPMETHOD.readline= build
169 167
170.include "../../archivers/bzip2/buildlink3.mk" 168.include "../../archivers/bzip2/buildlink3.mk"
171.include "../../devel/gettext-lib/buildlink3.mk" 169.include "../../devel/gettext-lib/buildlink3.mk"
172.include "../../devel/libffi/buildlink3.mk" 170.include "../../devel/libffi/buildlink3.mk"
173.include "../../devel/readline/buildlink3.mk" 171.include "../../devel/readline/buildlink3.mk"
174.include "../../devel/zlib/buildlink3.mk" 172.include "../../devel/zlib/buildlink3.mk"
175.include "../../security/openssl/buildlink3.mk" 173.include "../../security/openssl/buildlink3.mk"
176.include "../../mk/dlopen.buildlink3.mk" 174.include "../../mk/dlopen.buildlink3.mk"
177.include "../../mk/bsd.pkg.mk" 175.include "../../mk/bsd.pkg.mk"