aboutsummaryrefslogtreecommitdiff
path: root/www/mod_python/Makefile
blob: c97719fb0b80df119fd4768a2c14e7a2eff6d586 (plain) (blame)
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
# New ports collection makefile for:	mod_python
# Date created:				28 August 2000
# Whom:					Hye-Shik Chang <perky@python.or.kr>
#
# $FreeBSD$
#

PORTNAME=	mod_python
PORTVERSION=	2.7.8
CATEGORIES=	www python
MASTER_SITES=	${MASTER_SITE_APACHE_HTTPD}
MASTER_SITE_SUBDIR=	modpython
EXTRACT_SUFX=	.tgz
DIST_SUBDIR=	python

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Apache module for integrating Python

USE_APACHE=	yes
NO_PACKAGE=	"Requires Python without threads support"
USE_PYTHON=	yes

.include <bsd.port.pre.mk>

GNU_CONFIGURE=	yes
CONFIGURE_ARGS+=	--with-apxs=${APXS}
CONFIGURE_ENV=	PYTHON_BIN=${PYTHON_CMD}
PLIST_SUB+=	PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR:S/^${LOCALBASE}\///g}

STRIP_CMD?=	strip

pre-everything::
	@${ECHO_MSG} ""
	@${ECHO_MSG} "You may use the following build option:"
	@${ECHO_MSG} ""
	@${ECHO_MSG} "  WANT_EAPI=yes  build as apache EAPI module (for apache13-modssl)"
	@${ECHO_MSG} ""

pre-patch:
.if defined(WANT_EAPI)
	cd ${WRKSRC} && ${PATCH} -p2 -s < ${PATCHDIR}/optpatch-WANT_EAPI
.endif

post-configure:
	@${SH} ${PKGREQ}.threads ${PYTHON_CMD}
.if defined(OPTIONAL_LIBS)
	${SED} 's/^\(LIBS=.*\)/\1 ${OPTIONAL_LIBS}/' ${WRKSRC}/src/Makefile \
		> ${WRKSRC}/src/Makefile.tmp && \
		${MV} -f ${WRKSRC}/src/Makefile.tmp ${WRKSRC}/src/Makefile
.endif

post-build:
.if !defined(DONT_STRIP) && exists(${STRIP_CMD})
	${STRIP_CMD} ${WRKSRC}/src/mod_python.so
.endif

post-install:
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>