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