| @@ -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 | |
5 | PKGNAME= python26-${PY_DISTVERSION} | | 5 | PKGNAME= python26-${PY_DISTVERSION} |
6 | PKGREVISION= 8 | | 6 | PKGREVISION= 9 |
7 | CATEGORIES= lang python | | 7 | CATEGORIES= lang python |
8 | | | 8 | |
9 | MAINTAINER= pkgsrc-users@NetBSD.org | | 9 | MAINTAINER= pkgsrc-users@NetBSD.org |
10 | HOMEPAGE= http://www.python.org/ | | 10 | HOMEPAGE= http://www.python.org/ |
11 | COMMENT= Interpreted, interactive, object-oriented programming language | | 11 | COMMENT= Interpreted, interactive, object-oriented programming language |
12 | LICENSE= python-software-foundation | | 12 | LICENSE= python-software-foundation |
13 | | | 13 | |
14 | PKG_DESTDIR_SUPPORT= user-destdir | | 14 | PKG_DESTDIR_SUPPORT= user-destdir |
15 | | | 15 | |
16 | CONFLICTS+= python-[0-9]* | | 16 | CONFLICTS+= python-[0-9]* |
17 | | | 17 | |
18 | GNU_CONFIGURE= yes | | 18 | GNU_CONFIGURE= yes |
19 | CONFIGURE_ARGS+= --with-threads | | 19 | CONFIGURE_ARGS+= --with-threads |
20 | CONFIGURE_ARGS+= --enable-shared | | 20 | CONFIGURE_ARGS+= --enable-shared |
21 | CONFIGURE_ARGS+= OPT=${CFLAGS:Q} | | 21 | CONFIGURE_ARGS+= OPT=${CFLAGS:Q} |
22 | CONFIGURE_ARGS+= --with-system-ffi | | 22 | CONFIGURE_ARGS+= --with-system-ffi |
23 | | | 23 | |
24 | LDFLAGS+= -L${WRKSRC} | | 24 | LDFLAGS+= -L${WRKSRC} |
25 | | | 25 | |
26 | # $RANDOM usage there is fine | | 26 | # $RANDOM usage there is fine |
27 | CHECK_PORTABILITY_SKIP= Tools/faqwiz/move-faqwiz.sh | | 27 | CHECK_PORTABILITY_SKIP= Tools/faqwiz/move-faqwiz.sh |
28 | | | 28 | |
29 | USE_LANGUAGES= c c++ | | 29 | USE_LANGUAGES= c c++ |
30 | | | 30 | |
31 | PTHREAD_OPTS+= require | | 31 | PTHREAD_OPTS+= require |
32 | .include "../../mk/pthread.buildlink3.mk" | | 32 | .include "../../mk/pthread.buildlink3.mk" |
33 | .if ${PTHREAD_TYPE} == "pth" | | 33 | .if ${PTHREAD_TYPE} == "pth" |
34 | CONFIGURE_ARGS+= --with-pth | | 34 | CONFIGURE_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() |
40 | LIBS.SunOS+= -lrt | | 40 | LIBS.SunOS+= -lrt |
41 | | | 41 | |
42 | PY_VER_SUFFIX= 2.6 | | 42 | PY_VER_SUFFIX= 2.6 |
43 | | | 43 | |
44 | PLIST_SRC= ${.CURDIR}/../../lang/python26/PLIST.common | | 44 | PLIST_SRC= ${.CURDIR}/../../lang/python26/PLIST.common |
45 | .if exists(${.CURDIR}/../../lang/python26/PLIST.${OPSYS}) | | 45 | .if exists(${.CURDIR}/../../lang/python26/PLIST.${OPSYS}) |
46 | PLIST_SRC+= ${.CURDIR}/../../lang/python26/PLIST.${OPSYS} | | 46 | PLIST_SRC+= ${.CURDIR}/../../lang/python26/PLIST.${OPSYS} |
47 | .endif | | 47 | .endif |
48 | PLIST_SRC+= ${.CURDIR}/../../lang/python26/PLIST.common_end | | 48 | PLIST_SRC+= ${.CURDIR}/../../lang/python26/PLIST.common_end |
49 | | | 49 | |
50 | .if ${OPSYS} == "NetBSD" | | 50 | .if ${OPSYS} == "NetBSD" |
51 | PRIVILEGED_STAGES+= clean | | 51 | PRIVILEGED_STAGES+= clean |
52 | # XXX work around a botched autoconf check which ignores libintl | | 52 | # XXX work around a botched autoconf check which ignores libintl |
53 | CONFIGURE_ENV+= ac_cv_func_bind_textdomain_codeset=yes | | 53 | CONFIGURE_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" |
57 | PY_PLATNAME= ${LOWER_OPSYS} | | 57 | PY_PLATNAME= ${LOWER_OPSYS} |
58 | USE_TOOLS+= gmake | | 58 | USE_TOOLS+= gmake |
59 | .elif ${OPSYS} == "IRIX" | | 59 | .elif ${OPSYS} == "IRIX" |
60 | PY_PLATNAME= ${LOWER_OPSYS:C/\..*//} | | 60 | PY_PLATNAME= ${LOWER_OPSYS:C/\..*//} |
61 | .elif ${OPSYS} == "SunOS" | | 61 | .elif ${OPSYS} == "SunOS" |
62 | PY_PLATNAME= sunos${OS_VERSION:C/\..*//} | | 62 | PY_PLATNAME= sunos${OS_VERSION:C/\..*//} |
63 | .elif ${OPSYS} == "HPUX" | | 63 | .elif ${OPSYS} == "HPUX" |
64 | PY_PLATNAME= hp-ux11 | | 64 | PY_PLATNAME= hp-ux11 |
65 | .else | | 65 | .else |
66 | PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//} | | 66 | PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//} |
67 | .endif | | 67 | .endif |
68 | PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q} | | 68 | PLIST_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") |
73 | IS_64BIT_PLATFORM?= yes | | 73 | IS_64BIT_PLATFORM?= yes |
74 | .else | | 74 | .else |
75 | IS_64BIT_PLATFORM?= no | | 75 | IS_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 |
79 | PLIST_VARS+= dl | | 79 | PLIST_VARS+= dl |
80 | .if empty(IS_64BIT_PLATFORM:M[yY][eE][sS]) | | 80 | .if empty(IS_64BIT_PLATFORM:M[yY][eE][sS]) |
81 | PLIST.dl= yes | | 81 | PLIST.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 |
85 | PLIST_VARS+= openssl097 | | 85 | PLIST_VARS+= openssl097 |
86 | CHECK_BUILTIN.openssl:= no | | 86 | CHECK_BUILTIN.openssl:= no |
87 | .include "../../security/openssl/builtin.mk" | | 87 | .include "../../security/openssl/builtin.mk" |
88 | CHECK_BUILTIN.openssl:= yes | | 88 | CHECK_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]*) |
91 | PLIST.openssl097= yes | | 91 | PLIST.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. |
95 | PLIST_VARS+= extra-so | | 95 | PLIST_VARS+= extra-so |
96 | .if !empty(IS_64BIT_PLATFORM:M[nN][oO]) | | 96 | .if !empty(IS_64BIT_PLATFORM:M[nN][oO]) |
97 | PLIST.extra-so= yes | | 97 | PLIST.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" |
102 | INSTALL_UNSTRIPPED= yes | | 102 | INSTALL_UNSTRIPPED= yes |
103 | .endif | | 103 | .endif |
104 | | | 104 | |
105 | PLIST_VARS+= dll nis no-nis | | 105 | PLIST_VARS+= dll nis no-nis |
106 | .if ${OPSYS} == "IRIX" | | 106 | .if ${OPSYS} == "IRIX" |
107 | . if ${ABI} == "64" | | 107 | . if ${ABI} == "64" |
108 | PLIST.no-nis= yes | | 108 | PLIST.no-nis= yes |
109 | . else | | 109 | . else |
110 | PLIST.nis= yes | | 110 | PLIST.nis= yes |
111 | . endif | | 111 | . endif |
112 | .else | | 112 | .else |
113 | PLIST.dll= yes | | 113 | PLIST.dll= yes |
114 | . if ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat) | | 114 | . if ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat) |
115 | PLIST.nis= yes | | 115 | PLIST.nis= yes |
116 | . else | | 116 | . else |
117 | PLIST.no-nis= yes | | 117 | PLIST.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" |
122 | MAKE_ENV+= PY_BDB_TYPE=${BDB_TYPE} | | 122 | MAKE_ENV+= PY_BDB_TYPE=${BDB_TYPE} |
123 | .if empty(BDB_LIBS) | | 123 | .if empty(BDB_LIBS) |
124 | BUILDLINK_TRANSFORM+= rm:-ldb | | 124 | BUILDLINK_TRANSFORM+= rm:-ldb |
125 | .endif | | 125 | .endif |
126 | CFLAGS+= -DHAVE_DB_185_H | | 126 | CFLAGS+= -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() |
130 | CONFIGURE_ARGS+= --disable-ipv6 | | 130 | CONFIGURE_ARGS+= --disable-ipv6 |
131 | .endif | | 131 | .endif |
132 | | | 132 | |
133 | .if defined(BUILDLINK_TRANSFORM) | | 133 | .if defined(BUILDLINK_TRANSFORM) |
134 | MAKE_ENV+= PY_BDB_TRANSFORM=${BUILDLINK_TRANSFORM:Q} | | 134 | MAKE_ENV+= PY_BDB_TRANSFORM=${BUILDLINK_TRANSFORM:Q} |
135 | .endif | | 135 | .endif |
136 | | | 136 | |
137 | PLIST_SUBST+= PY_VER_SUFFIX=${PY_VER_SUFFIX:Q} | | 137 | PLIST_SUBST+= PY_VER_SUFFIX=${PY_VER_SUFFIX:Q} |
138 | | | 138 | |
139 | TEST_TARGET= test | | 139 | TEST_TARGET= test |
140 | INSTALL_TARGET= altinstall | | 140 | INSTALL_TARGET= altinstall |
141 | | | 141 | |
142 | REPLACE_INTERPRETER+= py26 | | 142 | REPLACE_INTERPRETER+= py26 |
143 | REPLACE.py26.old= .*python[^ ]* | | 143 | REPLACE.py26.old= .*python[^ ]* |
144 | REPLACE.py26.new= ${PREFIX}/bin/python${PY_VER_SUFFIX} | | 144 | REPLACE.py26.new= ${PREFIX}/bin/python${PY_VER_SUFFIX} |
145 | REPLACE_FILES.py26= Lib/cgi.py # explicitly demanded to be patched | | 145 | REPLACE_FILES.py26= Lib/*.py Lib/*/*.py Lib/*/*/*.py |
146 | REPLACE_FILES.py26+= Lib/bsddb/dbshelve.py Lib/test/test_bz2.py | | | |
147 | REPLACE_FILES.py26+= Lib/test/test_largefile.py Lib/test/test_optparse.py | | | |
148 | REPLACE_FILES.py26+= Lib/*.py | | | |
149 | REPLACE_FILES.py26+= Lib/test/*.py | | | |
150 | REPLACE_FILES.py26+= Lib/bsddb/test/test_dbtables.py | | | |
151 | REPLACE_FILES.py26+= Lib/encodings/rot_13.py | | | |
152 | REPLACE_FILES.py26+= Lib/idlelib/PyShell.py | | | |
153 | REPLACE_FILES.py26+= Lib/lib2to3/pgen2/token.py | | | |
154 | REPLACE_FILES.py26+= Lib/lib2to3/tests/pytree_idempotency.py | | | |
155 | | | 146 | |
156 | SUBST_CLASSES+= findlib | | 147 | SUBST_CLASSES+= findlib |
157 | SUBST_MESSAGE.findlib= Fixing find_library_file on Darwin. | | 148 | SUBST_MESSAGE.findlib= Fixing find_library_file on Darwin. |
158 | SUBST_STAGE.findlib= pre-configure | | 149 | SUBST_STAGE.findlib= pre-configure |
159 | SUBST_FILES.findlib= Lib/distutils/unixccompiler.py | | 150 | SUBST_FILES.findlib= Lib/distutils/unixccompiler.py |
160 | SUBST_SED.findlib= -e 's,/usr/local,${PREFIX},' | | 151 | SUBST_SED.findlib= -e 's,/usr/local,${PREFIX},' |
161 | | | 152 | |
162 | post-extract: | | 153 | post-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" |
168 | post-install: | | 159 | post-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 | |
173 | USE_GNU_READLINE= yes | | 164 | USE_GNU_READLINE= yes |
174 | BUILDLINK_DEPMETHOD.readline= build | | 165 | BUILDLINK_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" |