Annotation of pkgsrc/lang/python27/Makefile, revision 1.44
1.44 ! adam 1: # $NetBSD: Makefile,v 1.43 2014/06/11 05:55:58 richard 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
1.25 sbd 21: CONFIGURE_ENV+= MKDIR_P=${MKDIR:Q}
1.1 obache 22:
1.31 obache 23: PKGCONFIG_OVERRIDE+= Misc/python.pc.in
24:
1.1 obache 25: LDFLAGS+= -L${WRKSRC}
26:
27: # $RANDOM usage there is fine
28: CHECK_PORTABILITY_SKIP= Tools/faqwiz/move-faqwiz.sh
29:
30: USE_LANGUAGES= c c++
31:
32: PTHREAD_OPTS+= require
33: .include "../../mk/pthread.buildlink3.mk"
34: .if ${PTHREAD_TYPE} == "pth"
35: CONFIGURE_ARGS+= --with-pth
36: .endif
37:
1.6 adam 38: .include "../../mk/compiler.mk"
39:
40: # Clang needs -fwrapv
41: .if !empty(PKGSRC_COMPILER:Mclang)
42: CFLAGS+= -fwrapv
43: .endif
44:
1.1 obache 45: .include "../../mk/bsd.prefs.mk"
46:
47: # fdatasync()
48: LIBS.SunOS+= -lrt
49:
50: PY_VER_SUFFIX= 2.7
51:
52: PLIST_SRC= ${.CURDIR}/../../lang/python27/PLIST.common
53: .if exists(${.CURDIR}/../../lang/python27/PLIST.${OPSYS})
54: PLIST_SRC+= ${.CURDIR}/../../lang/python27/PLIST.${OPSYS}
55: .endif
1.9 obache 56: PLIST_SRC+= ${.CURDIR}/../../lang/python27/PLIST.common_end
1.1 obache 57:
58: .if ${OPSYS} == "NetBSD"
1.23 adam 59: . if !defined(USE_DESTDIR) || empty(USE_DESTDIR:M[Yy][Ee][Ss])
1.1 obache 60: PRIVILEGED_STAGES+= clean
1.23 adam 61: . endif
1.1 obache 62: # XXX work around a botched autoconf check which ignores libintl
63: CONFIGURE_ENV+= ac_cv_func_bind_textdomain_codeset=yes
64: .endif
65:
1.24 obache 66: .if ${OPSYS} == "Cygwin" || ${OPSYS} == "Darwin" || ${OPSYS} == "Interix"
1.1 obache 67: PY_PLATNAME= ${LOWER_OPSYS}
68: USE_TOOLS+= gmake
69: .elif ${OPSYS} == "IRIX"
70: PY_PLATNAME= ${LOWER_OPSYS:C/\..*//}
71: .elif ${OPSYS} == "SunOS"
72: PY_PLATNAME= sunos${OS_VERSION:C/\..*//}
73: .elif ${OPSYS} == "HPUX"
74: PY_PLATNAME= hp-ux11
1.16 sbd 75: .elif ${OPSYS} == "Linux"
76: PY_PLATNAME= linux2
1.1 obache 77: .else
78: PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//}
79: .endif
80: PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q}
81:
82: .if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "amd64") || \
83: (${MACHINE_ARCH} == "sparc64") || (${MACHINE_ARCH} == "x86_64") || \
1.30 joerg 84: (${MACHINE_ARCH} == "powerpc64") || (defined(ABI) && ${ABI} == "64")
1.1 obache 85: IS_64BIT_PLATFORM?= yes
86: .else
87: IS_64BIT_PLATFORM?= no
88: .endif
89:
90: # the dl module isn't built for 64 bit archs
91: PLIST_VARS+= dl
92: .if empty(IS_64BIT_PLATFORM:M[yY][eE][sS])
93: PLIST.dl= yes
94: .endif
95:
96: # setup.py causes some modules to be built if the platform is *not* 64bit.
97: PLIST_VARS+= extra-so
98: .if !empty(IS_64BIT_PLATFORM:M[nN][oO])
99: PLIST.extra-so= yes
100: .endif
101:
102: # Make sure python modules can link correctly
103: .if ${OPSYS} == "Darwin"
104: INSTALL_UNSTRIPPED= yes
105: .endif
106:
1.33 jperkin 107: # For Xcode 5 we need to search the SDK path for headers, otherwise certain
108: # modules will not be built.
109: .if ${OPSYS} == "Darwin" && exists(${OSX_SDK_PATH}/usr/include)
110: CFLAGS+= -I${OSX_SDK_PATH}/usr/include
111: .endif
112:
1.1 obache 113: PLIST_VARS+= dll nis no-nis
114: .if ${OPSYS} == "IRIX"
115: . if ${ABI} == "64"
116: PLIST.no-nis= yes
117: . else
118: PLIST.nis= yes
119: . endif
120: .else
121: PLIST.dll= yes
1.7 bsiegert 122: . if ${OPSYS} == "MirBSD"
123: # neither nis nor no-nis
124: . elif ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat)
1.1 obache 125: PLIST.nis= yes
126: . else
127: PLIST.no-nis= yes
128: . endif
129: .endif
130:
131: .include "../../mk/bdb.buildlink3.mk"
132: MAKE_ENV+= PY_BDB_TYPE=${BDB_TYPE}
133: .if empty(BDB_LIBS)
134: BUILDLINK_TRANSFORM+= rm:-ldb
135: .endif
136: CFLAGS+= -DHAVE_DB_185_H
137:
138: .if ${OPSYS} == "OSF1"
139: # configure complains about buggy getaddrinfo()
140: CONFIGURE_ARGS+= --disable-ipv6
141: .endif
142:
143: .if defined(BUILDLINK_TRANSFORM)
144: MAKE_ENV+= PY_BDB_TRANSFORM=${BUILDLINK_TRANSFORM:Q}
145: .endif
146:
147: PLIST_SUBST+= PY_VER_SUFFIX=${PY_VER_SUFFIX:Q}
148:
149: TEST_TARGET= test
150: INSTALL_TARGET= altinstall
151:
152: REPLACE_INTERPRETER+= py27
153: REPLACE.py27.old= .*python[^ ]*
154: REPLACE.py27.new= ${PREFIX}/bin/python${PY_VER_SUFFIX}
1.4 tron 155: REPLACE_FILES.py27= Lib/*.py Lib/*/*.py Lib/*/*/*.py
1.29 ryoon 156: REPLACE_FILES.py27+= 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:
1.40 bsiegert 164: SUBST_CLASSES+= sslbase
165: SUBST_MESSAGE.sslbase= Fixing find-file for openssl with SSLBASE.
166: SUBST_STAGE.sslbase= pre-configure
167: SUBST_FILES.sslbase= setup.py
168: SUBST_VARS.sslbase= SSLBASE
169:
1.1 obache 170: post-extract:
1.37 obache 171: ${LN} -s ${WRKSRC}/Lib/smtpd.py ${WRKSRC}/Tools/scripts/smtpd${PY_VER_SUFFIX}.py
1.1 obache 172: ${MV} ${WRKSRC}/Tools/scripts/pydoc ${WRKSRC}/Tools/scripts/pydoc${PY_VER_SUFFIX}
173: ${MV} ${WRKSRC}/Tools/scripts/2to3 ${WRKSRC}/Tools/scripts/2to3-${PY_VER_SUFFIX}
174:
175: .if ${OPSYS} == "HPUX"
176: post-install:
177: ${LN} -fs ${DESTDIR}${PREFIX}/lib/libpython2.7.sl \
178: ${DESTDIR}${PREFIX}/lib/libpython2.7.sl.1.0
179: .endif
180:
181: BUILDLINK_DEPMETHOD.readline= build
182:
183: .include "../../archivers/bzip2/buildlink3.mk"
184: .include "../../devel/gettext-lib/buildlink3.mk"
185: .include "../../devel/libffi/buildlink3.mk"
186: .include "../../devel/readline/buildlink3.mk"
187: .include "../../devel/zlib/buildlink3.mk"
188: .include "../../security/openssl/buildlink3.mk"
189: .include "../../mk/dlopen.buildlink3.mk"
190: .include "../../mk/bsd.pkg.mk"
CVSweb <webmaster@jp.NetBSD.org>