summaryrefslogtreecommitdiff
path: root/lang/python20/Makefile
blob: 57376bea551422cb997420e1688d64deee652b58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# $NetBSD: Makefile,v 1.30 2006/04/13 02:26:54 joerg Exp $
#

DISTNAME=	Python-2.0.1
PKGNAME=	python20-2.0.1
PKGREVISION=	12
CATEGORIES=	lang python
MASTER_SITES=	ftp://ftp.python.org/pub/python/2.0.1/
EXTRACT_SUFX=	.tgz

MAINTAINER=	tsarna@NetBSD.org
HOMEPAGE=	http://www.python.org/
COMMENT=	Interpreted, interactive, object-oriented programming language

CONFLICTS+=	python-[0-9]*
CONFLICTS+=	python-2.0.*

PLIST_SRC=	${WRKDIR}/.PLIST_SRC

WRKSRC=		${WRKDIR}/Python-2.0.1
DIST_SUBDIR=	python

USE_LANGUAGES=	c c++
GNU_CONFIGURE=	yes
CONFIGURE_ARGS+=	--without-threads
INSTALL_TARGET=	altinstall

# Make sure having environment variable OPT doesn't affect the
# installed module-building Makefile
MAKE_ENV+=	'OPT=${CFLAGS}'
CONFIGURE_ENV+=	'OPT=${CFLAGS}'
SCRIPTS_ENV+=	'OPT=${CFLAGS}'

SSLFLAGS=	-DUSE_SSL -I${BUILDLINK_PREFIX.openssl}/include/openssl \
		-L${BUILDLINK_PREFIX.openssl}/lib \
		${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.openssl}/lib -lssl -lcrypto
FIX_RPATH+=	SSLFLAGS

# Handle the module setup file:
#   - disable a few broken modules on 64 bit platforms (nothing important)

.include "../../mk/bsd.prefs.mk"

.if ${OPSYS} == "SunOS"
ZOULARIS?=	${PREFIX}/bsd
MODADD=		-I${ZOULARIS}/include -L${ZOULARIS}/lib ${COMPILER_RPATH_FLAG}${ZOULARIS}/lib
FIX_RPATH+=	MODADD
.endif

post-install:
	${CAT} ${PKGDIR}/PLIST.pre >${PLIST_SRC}
	(cd ${PREFIX}; ${FIND} lib/python2.0 -type f -print | \
		${GREP} -v site-packages >>${PLIST_SRC})
	${ECHO} lib/python2.0/site-packages/README >>${PLIST_SRC}
	(cd ${PREFIX}; ${FIND} include/python2.0 -type f -print \
		>>${PLIST_SRC})
	(cd ${PREFIX}; ${FIND} -d include/python2.0 -type d -print | \
		${SED} -e "s/^/@dirrm /" >>${PLIST_SRC})
	(cd ${PREFIX}; ${FIND} -d lib/python2.0 -type d -print | \
		${GREP} -v site-packages | \
		${GREP} -vx lib/python2.0 | \
		${SED} -e "s/^/@dirrm /" >>${PLIST_SRC})
	${ECHO} "@dirrm lib/python2.0/site-packages" >>${PLIST_SRC}
	${ECHO} "@dirrm lib/python2.0" >>${PLIST_SRC}
	# Reinstall Python binary to get it stripped
	${RM} ${PREFIX}/bin/python2.0
	${INSTALL_PROGRAM} ${WRKSRC}/python ${PREFIX}/bin/python2.0

.include "../../devel/zlib/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../mk/bdb.buildlink3.mk"
.include "../../mk/dlopen.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"