| @@ -1,185 +1,183 @@ | | | @@ -1,185 +1,183 @@ |
1 | # $NetBSD: Makefile,v 1.19 2010/01/26 12:15:26 tron Exp $ | | 1 | # $NetBSD: Makefile,v 1.20 2010/02/11 21:13:07 tnn Exp $ |
2 | | | 2 | |
3 | DISTNAME= Python-2.6.4 | | 3 | DISTNAME= Python-2.6.4 |
4 | PKGNAME= ${DISTNAME:S/Python/python26/} | | 4 | PKGNAME= ${DISTNAME:S/Python/python26/} |
5 | PKGREVISION= 4 | | 5 | PKGREVISION= 4 |
6 | CATEGORIES= lang python | | 6 | CATEGORIES= lang python |
7 | MASTER_SITES= http://www.python.org/ftp/python/2.6.4/ | | 7 | MASTER_SITES= http://www.python.org/ftp/python/2.6.4/ |
8 | EXTRACT_SUFX= .tar.bz2 | | 8 | EXTRACT_SUFX= .tar.bz2 |
9 | | | 9 | |
10 | MAINTAINER= pkgsrc-users@NetBSD.org | | 10 | MAINTAINER= pkgsrc-users@NetBSD.org |
11 | HOMEPAGE= http://www.python.org/ | | 11 | HOMEPAGE= http://www.python.org/ |
12 | COMMENT= Interpreted, interactive, object-oriented programming language | | 12 | COMMENT= Interpreted, interactive, object-oriented programming language |
13 | LICENSE= python-software-foundation | | 13 | LICENSE= python-software-foundation |
14 | | | 14 | |
15 | PKG_DESTDIR_SUPPORT= user-destdir | | 15 | PKG_DESTDIR_SUPPORT= user-destdir |
16 | | | 16 | |
17 | # Remember to update pkgsrc/lang/python/srcdist.mk when version changes | | 17 | # Remember to update pkgsrc/lang/python/srcdist.mk when version changes |
18 | | | 18 | |
19 | CONFLICTS+= python-[0-9]* | | 19 | CONFLICTS+= python-[0-9]* |
20 | | | 20 | |
21 | GNU_CONFIGURE= yes | | 21 | GNU_CONFIGURE= yes |
22 | CONFIGURE_ARGS+= --with-threads | | 22 | CONFIGURE_ARGS+= --with-threads |
23 | CONFIGURE_ARGS+= --enable-shared | | 23 | CONFIGURE_ARGS+= --enable-shared |
24 | CONFIGURE_ARGS+= OPT=${CFLAGS:Q} | | 24 | CONFIGURE_ARGS+= OPT=${CFLAGS:Q} |
25 | CONFIGURE_ARGS+= --with-system-ffi | | 25 | CONFIGURE_ARGS+= --with-system-ffi |
26 | | | 26 | |
27 | LDFLAGS+= -L${WRKSRC} | | 27 | LDFLAGS+= -L${WRKSRC} |
28 | | | 28 | |
29 | # $RANDOM usage there is fine | | 29 | # $RANDOM usage there is fine |
30 | CHECK_PORTABILITY_SKIP= Tools/faqwiz/move-faqwiz.sh | | 30 | CHECK_PORTABILITY_SKIP= Tools/faqwiz/move-faqwiz.sh |
31 | | | 31 | |
32 | USE_LANGUAGES= c c++ | | 32 | USE_LANGUAGES= c c++ |
33 | | | 33 | |
34 | PTHREAD_OPTS+= require | | 34 | PTHREAD_OPTS+= require |
35 | .include "../../mk/pthread.buildlink3.mk" | | 35 | .include "../../mk/pthread.buildlink3.mk" |
36 | .if ${PTHREAD_TYPE} == "pth" | | 36 | .if ${PTHREAD_TYPE} == "pth" |
37 | CONFIGURE_ARGS+= --with-pth | | 37 | CONFIGURE_ARGS+= --with-pth |
38 | .endif | | 38 | .endif |
39 | | | 39 | |
40 | .include "../../mk/bsd.prefs.mk" | | 40 | .include "../../mk/bsd.prefs.mk" |
41 | | | 41 | |
42 | # fdatasync() | | 42 | # fdatasync() |
43 | LIBS.SunOS+= -lrt | | 43 | LIBS.SunOS+= -lrt |
44 | | | 44 | |
45 | PY_VER_SUFFIX= 2.6 | | 45 | PY_VER_SUFFIX= 2.6 |
46 | | | 46 | |
47 | PLIST_SRC= ${.CURDIR}/../../lang/python26/PLIST.common | | 47 | PLIST_SRC= ${.CURDIR}/../../lang/python26/PLIST.common |
48 | .if exists(${.CURDIR}/../../lang/python26/PLIST.${OPSYS}) | | 48 | .if exists(${.CURDIR}/../../lang/python26/PLIST.${OPSYS}) |
49 | PLIST_SRC+= ${.CURDIR}/../../lang/python26/PLIST.${OPSYS} | | 49 | PLIST_SRC+= ${.CURDIR}/../../lang/python26/PLIST.${OPSYS} |
50 | .endif | | 50 | .endif |
51 | PLIST_SRC+= ${.CURDIR}/../../lang/python26/PLIST.common_end | | 51 | PLIST_SRC+= ${.CURDIR}/../../lang/python26/PLIST.common_end |
52 | | | 52 | |
53 | .if ${OPSYS} == "NetBSD" | | 53 | .if ${OPSYS} == "NetBSD" |
54 | PRIVILEGED_STAGES+= clean | | 54 | PRIVILEGED_STAGES+= clean |
55 | .endif | | 55 | .endif |
56 | | | 56 | |
57 | .if ${OPSYS} == "Darwin" || ${OPSYS} == "Interix" | | 57 | .if ${OPSYS} == "Darwin" || ${OPSYS} == "Interix" |
58 | PY_PLATNAME= ${LOWER_OPSYS} | | 58 | PY_PLATNAME= ${LOWER_OPSYS} |
59 | USE_TOOLS+= gmake | | 59 | USE_TOOLS+= gmake |
60 | .elif ${OPSYS} == "IRIX" | | 60 | .elif ${OPSYS} == "IRIX" |
61 | PY_PLATNAME= ${LOWER_OPSYS:C/\..*//} | | 61 | PY_PLATNAME= ${LOWER_OPSYS:C/\..*//} |
62 | .elif ${OPSYS} == "SunOS" | | 62 | .elif ${OPSYS} == "SunOS" |
63 | PY_PLATNAME= sunos${OS_VERSION:C/\..*//} | | 63 | PY_PLATNAME= sunos${OS_VERSION:C/\..*//} |
64 | .elif ${OPSYS} == "HPUX" | | 64 | .elif ${OPSYS} == "HPUX" |
65 | PY_PLATNAME= hp-ux11 | | 65 | PY_PLATNAME= hp-ux11 |
66 | .else | | 66 | .else |
67 | PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//} | | 67 | PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//} |
68 | .endif | | 68 | .endif |
69 | PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q} | | 69 | PLIST_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") |
74 | IS_64BIT_PLATFORM?= yes | | 74 | IS_64BIT_PLATFORM?= yes |
75 | .else | | 75 | .else |
76 | IS_64BIT_PLATFORM?= no | | 76 | IS_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 |
80 | PLIST_VARS+= dl | | 80 | PLIST_VARS+= dl |
81 | .if empty(IS_64BIT_PLATFORM:M[yY][eE][sS]) | | 81 | .if empty(IS_64BIT_PLATFORM:M[yY][eE][sS]) |
82 | PLIST.dl= yes | | 82 | PLIST.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 |
86 | PLIST_VARS+= openssl097 | | 86 | PLIST_VARS+= openssl097 |
87 | CHECK_BUILTIN.openssl:= no | | 87 | CHECK_BUILTIN.openssl:= no |
88 | .include "../../security/openssl/builtin.mk" | | 88 | .include "../../security/openssl/builtin.mk" |
89 | CHECK_BUILTIN.openssl:= yes | | 89 | CHECK_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]*) |
92 | PLIST.openssl097= yes | | 92 | PLIST.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. |
96 | PLIST_VARS+= extra-so | | 96 | PLIST_VARS+= extra-so |
97 | .if !empty(IS_64BIT_PLATFORM:M[nN][oO]) | | 97 | .if !empty(IS_64BIT_PLATFORM:M[nN][oO]) |
98 | PLIST.extra-so= yes | | 98 | PLIST.extra-so= yes |
99 | .endif | | 99 | .endif |
100 | | | 100 | |
101 | # ossaudiodev is only available on x86 for the following platforms | | 101 | # ossaudiodev is only available on x86 for the following platforms |
102 | PLIST_VARS+= oss | | 102 | PLIST_VARS+= oss |
103 | .if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") && \ | | 103 | .if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") && \ |
104 | (${PY_PLATNAME} == "linux2" || ${OPSYS} == "FreeBSD") | | 104 | (${PY_PLATNAME} == "linux2" || ${OPSYS} == "FreeBSD") |
105 | PLIST.oss= yes | | 105 | PLIST.oss= yes |
106 | .endif | | 106 | .endif |
107 | | | 107 | |
108 | # Make sure python modules can link correctly | | 108 | # Make sure python modules can link correctly |
109 | .if ${OPSYS} == "Darwin" | | 109 | .if ${OPSYS} == "Darwin" |
110 | INSTALL_UNSTRIPPED= yes | | 110 | INSTALL_UNSTRIPPED= yes |
111 | | | 111 | |
112 | PLIST_VARS+= nav | | 112 | PLIST_VARS+= nav |
113 | . if !defined(ABI) || ${ABI} != "64" | | 113 | . if !defined(ABI) || ${ABI} != "64" |
114 | PLIST.nav= yes | | 114 | PLIST.nav= yes |
115 | . endif | | 115 | . endif |
116 | .endif | | 116 | .endif |
117 | | | 117 | |
118 | PLIST_VARS+= bsddb dll nis no-nis | | 118 | PLIST_VARS+= bsddb dll nis no-nis |
119 | .if ${OPSYS} == "IRIX" | | 119 | .if ${OPSYS} == "IRIX" |
120 | . if ${ABI} == "64" | | 120 | . if ${ABI} == "64" |
121 | PLIST.no-nis= yes | | 121 | PLIST.no-nis= yes |
122 | . else | | 122 | . else |
123 | PLIST.nis= yes | | 123 | PLIST.nis= yes |
124 | . endif | | 124 | . endif |
125 | .else | | 125 | .else |
126 | . include "../../mk/bdb.buildlink3.mk" | | 126 | . include "../../mk/bdb.buildlink3.mk" |
127 | MAKE_ENV+= PY_BDB_TYPE=${BDB_TYPE} | | 127 | MAKE_ENV+= PY_BDB_TYPE=${BDB_TYPE} |
128 | MAKE_ENV+= PY_BDB_INCDIRS=${BUILDLINK_INCDIRS.${BDB_TYPE}:S,^,${BDBBASE}/,:Q} | | | |
129 | MAKE_ENV+= PY_BDB_LIBDIRS=${BDBBASE}/lib | | | |
130 | .if empty(BDB_LIBS) | | 128 | .if empty(BDB_LIBS) |
131 | BUILDLINK_TRANSFORM+= rm:-ldb | | 129 | BUILDLINK_TRANSFORM+= rm:-ldb |
132 | .endif | | 130 | .endif |
133 | CFLAGS+= -DHAVE_DB_185_H | | 131 | CFLAGS+= -DHAVE_DB_185_H |
134 | PLIST.bsddb= yes | | 132 | PLIST.bsddb= yes |
135 | PLIST.dll= yes | | 133 | PLIST.dll= yes |
136 | . if ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat) | | 134 | . if ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat) |
137 | PLIST.nis= yes | | 135 | PLIST.nis= yes |
138 | . else | | 136 | . else |
139 | PLIST.no-nis= yes | | 137 | PLIST.no-nis= yes |
140 | . endif | | 138 | . endif |
141 | .endif | | 139 | .endif |
142 | | | 140 | |
143 | .if ${OPSYS} == "OSF1" | | 141 | .if ${OPSYS} == "OSF1" |
144 | # configure complains about buggy getaddrinfo() | | 142 | # configure complains about buggy getaddrinfo() |
145 | CONFIGURE_ARGS+= --disable-ipv6 | | 143 | CONFIGURE_ARGS+= --disable-ipv6 |
146 | .endif | | 144 | .endif |
147 | | | 145 | |
148 | .if defined(BUILDLINK_TRANSFORM) | | 146 | .if defined(BUILDLINK_TRANSFORM) |
149 | MAKE_ENV+= PY_BDB_TRANSFORM=${BUILDLINK_TRANSFORM:Q} | | 147 | MAKE_ENV+= PY_BDB_TRANSFORM=${BUILDLINK_TRANSFORM:Q} |
150 | .endif | | 148 | .endif |
151 | | | 149 | |
152 | PLIST_SUBST+= PY_VER_SUFFIX=${PY_VER_SUFFIX:Q} | | 150 | PLIST_SUBST+= PY_VER_SUFFIX=${PY_VER_SUFFIX:Q} |
153 | | | 151 | |
154 | TEST_TARGET= test | | 152 | TEST_TARGET= test |
155 | INSTALL_TARGET= altinstall | | 153 | INSTALL_TARGET= altinstall |
156 | | | 154 | |
157 | REPLACE_INTERPRETER+= py26 | | 155 | REPLACE_INTERPRETER+= py26 |
158 | REPLACE.py26.old= .*python[^ ]* | | 156 | REPLACE.py26.old= .*python[^ ]* |
159 | REPLACE.py26.new= ${PREFIX}/bin/python${PY_VER_SUFFIX} | | 157 | REPLACE.py26.new= ${PREFIX}/bin/python${PY_VER_SUFFIX} |
160 | REPLACE_FILES.py26= Lib/cgi.py # explicitly demanded to be patched | | 158 | REPLACE_FILES.py26= Lib/cgi.py # explicitly demanded to be patched |
161 | REPLACE_FILES.py26+= Lib/bsddb/dbshelve.py Lib/test/test_bz2.py | | 159 | REPLACE_FILES.py26+= Lib/bsddb/dbshelve.py Lib/test/test_bz2.py |
162 | REPLACE_FILES.py26+= Lib/test/test_largefile.py Lib/test/test_optparse.py | | 160 | REPLACE_FILES.py26+= Lib/test/test_largefile.py Lib/test/test_optparse.py |
163 | | | 161 | |
164 | post-extract: | | 162 | post-extract: |
165 | ${MV} ${WRKSRC}/Lib/smtpd.py ${WRKSRC}/Lib/smtpd${PY_VER_SUFFIX}.py | | 163 | ${MV} ${WRKSRC}/Lib/smtpd.py ${WRKSRC}/Lib/smtpd${PY_VER_SUFFIX}.py |
166 | ${MV} ${WRKSRC}/Tools/scripts/pydoc ${WRKSRC}/Tools/scripts/pydoc${PY_VER_SUFFIX} | | 164 | ${MV} ${WRKSRC}/Tools/scripts/pydoc ${WRKSRC}/Tools/scripts/pydoc${PY_VER_SUFFIX} |
167 | | | 165 | |
168 | .if ${OPSYS} == "HPUX" | | 166 | .if ${OPSYS} == "HPUX" |
169 | post-install: | | 167 | post-install: |
170 | ${LN} -fs ${DESTDIR}${PREFIX}/lib/libpython2.6.sl \ | | 168 | ${LN} -fs ${DESTDIR}${PREFIX}/lib/libpython2.6.sl \ |
171 | ${DESTDIR}${PREFIX}/lib/libpython2.6.sl.1.0 | | 169 | ${DESTDIR}${PREFIX}/lib/libpython2.6.sl.1.0 |
172 | .endif | | 170 | .endif |
173 | | | 171 | |
174 | USE_GNU_READLINE= yes | | 172 | USE_GNU_READLINE= yes |
175 | BUILDLINK_DEPMETHOD.readline= build | | 173 | BUILDLINK_DEPMETHOD.readline= build |
176 | | | 174 | |
177 | .include "../../archivers/bzip2/buildlink3.mk" | | 175 | .include "../../archivers/bzip2/buildlink3.mk" |
178 | .include "../../devel/gettext-lib/buildlink3.mk" | | 176 | .include "../../devel/gettext-lib/buildlink3.mk" |
179 | .include "../../devel/libffi/buildlink3.mk" | | 177 | .include "../../devel/libffi/buildlink3.mk" |
180 | .include "../../devel/readline/buildlink3.mk" | | 178 | .include "../../devel/readline/buildlink3.mk" |
181 | .include "../../devel/zlib/buildlink3.mk" | | 179 | .include "../../devel/zlib/buildlink3.mk" |
182 | .include "../../security/openssl/buildlink3.mk" | | 180 | .include "../../security/openssl/buildlink3.mk" |
183 | .include "../../mk/dlopen.buildlink3.mk" | | 181 | .include "../../mk/dlopen.buildlink3.mk" |
184 | .include "../../mk/oss.buildlink3.mk" | | 182 | .include "../../mk/oss.buildlink3.mk" |
185 | .include "../../mk/bsd.pkg.mk" | | 183 | .include "../../mk/bsd.pkg.mk" |