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