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