summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorghen <ghen>2007-02-15 09:08:05 +0000
committerghen <ghen>2007-02-15 09:08:05 +0000
commit103c0a644d7c9ea77de3c40d6f4f20458a611373 (patch)
tree0f1d03b879a7d4170a89abd6a8033278a0dee8f9
parentd4cdc4008be1cb9421e1846b03a374281a4fa25c (diff)
downloadpkgsrc-103c0a644d7c9ea77de3c40d6f4f20458a611373.tar.gz
Add a "python" option to enable the python dependency and fix the interpreter
path in the dvd-handler script. From Rumko on pkgsrc-users.
-rw-r--r--sysutils/bacula/options.mk16
1 files changed, 15 insertions, 1 deletions
diff --git a/sysutils/bacula/options.mk b/sysutils/bacula/options.mk
index 4fb1f4280d2..14f6ff0865e 100644
--- a/sysutils/bacula/options.mk
+++ b/sysutils/bacula/options.mk
@@ -1,6 +1,7 @@
-# $NetBSD: options.mk,v 1.9 2006/02/03 08:18:45 ghen Exp $
+# $NetBSD: options.mk,v 1.10 2007/02/15 09:08:05 ghen Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.bacula
+PKG_SUPPORTED_OPTIONS= python
PKG_OPTIONS_REQUIRED_GROUPS= database
PKG_OPTIONS_GROUP.database= catalog-sqlite catalog-sqlite3 catalog-pgsql catalog-mysql
PKG_SUGGESTED_OPTIONS= catalog-sqlite
@@ -24,3 +25,16 @@ BACULA_DB= postgresql
CONFIGURE_ARGS+= --with-mysql=${PREFIX:Q}
BACULA_DB= mysql
.endif
+
+.if !empty(PKG_OPTIONS:Mpython)
+CONFIGURE_ARGS+= --with-python=${LOCALBASE}/${PYINC}
+. include "../../lang/python/application.mk"
+. include "${PYPKGSRCDIR}/buildlink3.mk"
+# we can't use REPLACE_INTERPRETER here because ./configure fills in the
+# python path and the replace-interpreter stage happens before that.
+SUBST_CLASSES+= python
+SUBST_MESSAGE.python= Fixing Python interpreter path.
+SUBST_STAGE.python= post-configure
+SUBST_FILES.python= scripts/dvd-handler
+SUBST_SED.python= -e '1s,^\#!.*,\#! ${PYTHONBIN},'
+.endif