make this python2.4 friendly by allowing mk.conf to overwritte the

desired python version; maintainer and sturm@ ok.
This commit is contained in:
fgsch 2005-10-11 03:59:24 +00:00
parent 086dc2b0cd
commit aa8a0c7e86
3 changed files with 21 additions and 7 deletions

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.3 2005/07/23 17:08:13 sturm Exp $
# $OpenBSD: Makefile,v 1.4 2005/10/11 03:59:24 fgsch Exp $
SHARED_ONLY= Yes
COMMENT= "fast, powerful, and language-neutral HTML template system"
DISTNAME= clearsilver-0.9.14
PKGNAME= ${DISTNAME}p1
PKGNAME= ${DISTNAME}p2
CATEGORIES= www net
HOMEPAGE= http://www.clearsilver.net/
@ -32,9 +32,11 @@ FLAVORS+= python
FLAVOR?=
.if ${FLAVOR:L:Mpython}
CONFIGURE_ARGS+= --with-python=${LOCALBASE}/bin/python
BUILD_DEPENDS+= :python-2.3*:lang/python/2.3
RUN_DEPENDS+= :python-2.3*:lang/python/2.3
MODPY_VERSION?= 2.3
CONFIGURE_ARGS+= --with-python=${LOCALBASE}/bin/python${MODPY_VERSION}
BUILD_DEPENDS+= :python-${MODPY_VERSION}*:lang/python/${MODPY_VERSION}
RUN_DEPENDS+= :python-${MODPY_VERSION}*:lang/python/${MODPY_VERSION}
SUBST_VARS= MODPY_VERSION
.else
CONFIGURE_ARGS+= --disable-python
.endif

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-configure,v 1.1 2005/10/11 03:59:24 fgsch Exp $
--- configure.orig Sun Oct 2 18:35:07 2005
+++ configure Sun Oct 2 18:35:47 2005
@@ -3084,7 +3084,7 @@ echo "configure:3048: checking for pytho
PYTHON=$python_bin
PYTHON_INC="-I$python_inc"
PYTHON_LIB=$python_lib
- PYTHON_SITE=`$python_bin -c "import site; print site.sitedirs[0]"`
+ PYTHON_SITE=`$python_bin -c "import sys; print [path for path in sys.path if path.find('site-packages') != -1][0]"`
BUILD_WRAPPERS="$BUILD_WRAPPERS python"
fi
fi

View File

@ -1,2 +1,2 @@
@comment $OpenBSD: PFRAG.python,v 1.1 2005/07/23 17:08:13 sturm Exp $
lib/python2.3/site-packages/neo_cgi.so
@comment $OpenBSD: PFRAG.python,v 1.2 2005/10/11 03:59:24 fgsch Exp $
lib/python${MODPY_VERSION}/site-packages/neo_cgi.so