1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-21 20:38:45 +00:00
freebsd-ports/www/mod_python/Makefile
Philip M. Gollucci 335f8cb35d Mk/bsd.apache.mk can not sufficiently alter things before Mk/bsd.options.mk
in Mk/bsd.ports.mk due to ordering in Mk/bsd.port.mk.  This causes OPTIONSFILE
to be incorrectly set during some make phases as a result of the recent
PKGNAMEPREFIX for apache ports.

'Revert' some of the PKGNAMEPREFIX changes for apXX-.
   - Must be manually requested in tbe port Makefile either by
     a) AP_FAST_BUILD=yes
     b) PKGNAMEPREFIX=${APACHE_PKGNAMEPREFIX}
   - Going forward, we will only do this for ports where WITH_APACHE
       is NOT optional, but required.  mod_* ports are a good fit.

141 ports are mod_ ports
  80 of those use AP_FAST_BUILD and thus are auto hooked by this patch [a].
  61 remaining are then patched to mirror the other $lang frameworks [b].

PR:             ports/146956
Reported by:    Hans F. Nordhaug <Hans.F.Nordhaug@hiMolde.no>, several
Discussed with: pav, itectu on #bsdports
Tested by:      P6 TB run
Approved by:    portmgr (pav)
2010-05-25 20:17:37 +00:00

69 lines
1.7 KiB
Makefile

# 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.11
CATEGORIES= www python
MASTER_SITES= ${MASTER_SITE_APACHE_HTTPD}
MASTER_SITE_SUBDIR= modpython
PKGNAMEPREFIX= ${APACHE_PKGNAMEPREFIX}
EXTRACT_SUFX= .tgz
DIST_SUBDIR= python
MAINTAINER= apache@FreeBSD.org
COMMENT= Apache 1.3 module for integrating Python
.if defined(PACKAGE_BUILDING)
IGNORE= Requires python WITHOUT_THREADS
.endif
USE_APACHE= 13
NO_PACKAGE= Requires Python without threads support
USE_PYTHON= yes
PORTSCOUT= limit:^2
.include <bsd.port.pre.mk>
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --with-apxs=${APXS}
CONFIGURE_ENV= PYTHON_BIN=${PYTHON_CMD}
MAKE_ENV= PORTS_APXS=${APXS}
PLIST_SUB+= PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR:S/^${LOCALBASE}\///g}
pre-everything::
@${ECHO_MSG} ""
@${ECHO_MSG} "Note that this is for Apache 1.3 only, use www/mod_python 3 for Apache 2.x"
@${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>