Sat Apr 23 10:39:01 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.37 -r1.38 pkgsrc/lang/python26/Makefile

cvs diff -r1.37 -r1.38 pkgsrc/lang/python26/Attic/Makefile (switch to unified diff)

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