Subject: sysutils/bacula python support
To: None <pkgsrc-users@NetBSD.org>
From: Rumko <rumcic@gmail.com>
List: pkgsrc-users
Date: 02/12/2007 00:41:19
--nextPart1221110.Qnc2omXxRz
Content-Type: multipart/mixed;
  boundary="Boundary-01=_gm6zFR3bet9xRnT"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

--Boundary-01=_gm6zFR3bet9xRnT
Content-Type: text/plain;
  charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

The dvd-handler needs python, so I created this patch to add python support=
=2E=20
Can someone look over it and if it's good enough also commit it?

--Boundary-01=_gm6zFR3bet9xRnT
Content-Type: text/x-diff;
  charset="utf-8";
  name="bacula.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="bacula.patch"

=2D-- options.mk.orig	2006-02-03 09:18:45.000000000 +0100
+++ options.mk	2007-02-12 00:36:02.000000000 +0100
@@ -4,6 +4,7 @@
 PKG_OPTIONS_REQUIRED_GROUPS=3D	database
 PKG_OPTIONS_GROUP.database=3D	catalog-sqlite catalog-sqlite3 catalog-pgsql=
 catalog-mysql
 PKG_SUGGESTED_OPTIONS=3D		catalog-sqlite
+PKG_SUPPORTED_OPTIONS=3D		python
=20
 .include "../../mk/bsd.options.mk"
=20
@@ -24,3 +25,14 @@
 CONFIGURE_ARGS+=3D	--with-mysql=3D${PREFIX:Q}
 BACULA_DB=3D		mysql
 .endif
+
+.if !empty(PKG_OPTIONS:Mpython)
+CONFIGURE_ARGS+=3D	--with-python=3D${LOCALBASE}/${PYINC}
+.  include "../../lang/python/application.mk"
+.  include "${PYPKGSRCDIR}/buildlink3.mk"
+SUBST_CLASSES+=3D		python
+SUBST_MESSAGE.python=3D	Fixing Python command name.
+SUBST_STAGE.python=3D	post-configure
+SUBST_FILES.python=3D	scripts/dvd-handler
+SUBST_SED.python=3D	-e '1s,^\#!.*,\#! ${PYTHONBIN},'
+.endif

--Boundary-01=_gm6zFR3bet9xRnT--

--nextPart1221110.Qnc2omXxRz
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (DragonFly)

iD8DBQBFz6mhxV3ce2RZW70RAiy/AJ973Rsy55QMiI5bUJk2y+r2yL2mqgCg4uMC
F8A2bVf4pdzRc4DGFGYqUVo=
=l6Jw
-----END PGP SIGNATURE-----

--nextPart1221110.Qnc2omXxRz--