pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

OpenIPMI: Make perl, python and swig optional.



Module Name:	pkgsrc-wip
Committed By:	Juraj Lutter <otis%NetBSD.org@localhost>
Pushed By:	otis
Date:		Thu Oct 8 14:14:42 2020 +0000
Changeset:	46ea05376a355d5bf99748fefa3b75ab4e4e5e8c

Modified Files:
	OpenIPMI/Makefile
	OpenIPMI/PLIST
Added Files:
	OpenIPMI/options.mk

Log Message:
OpenIPMI: Make perl, python and swig optional.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=46ea05376a355d5bf99748fefa3b75ab4e4e5e8c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 OpenIPMI/Makefile   |  9 +++------
 OpenIPMI/PLIST      |  2 ++
 OpenIPMI/options.mk | 35 +++++++++++++++++++++++++++++++++++
 3 files changed, 40 insertions(+), 6 deletions(-)

diffs:
diff --git a/OpenIPMI/Makefile b/OpenIPMI/Makefile
index f173fffd74..8ab8cbc3b3 100644
--- a/OpenIPMI/Makefile
+++ b/OpenIPMI/Makefile
@@ -13,10 +13,6 @@ GNU_CONFIGURE=	yes
 USE_LIBTOOL=	yes
 USE_TOOLS+=	gmake perl pkg-config
 
-CONFIGURE_ARGS+=	--with-python=${PREFIX}/bin/python${PYVERSSUFFIX}
-CONFIGURE_ARGS+=	--with-perl=no
-CONFIGURE_ARGS+=	--with-swig=no
-
 PKGCONFIG_OVERRIDE+=	OpenIPMI.pc.in
 PKGCONFIG_OVERRIDE+=	OpenIPMIcmdlang.pc.in
 PKGCONFIG_OVERRIDE+=	OpenIPMIglib.pc.in
@@ -32,14 +28,15 @@ EGFILES=		lan.conf ipmisim1.emu
 
 INSTALLATION_DIRS=	share/examples/OpenIPMI
 
+.include "../../mk/bsd.prefs.mk"
 post-install:
 .for file in ${EGFILES}
 	${MV} ${DESTDIR}${PREFIX}/etc/ipmi/${file} ${DESTDIR}${EGDIR}/${file}
 .endfor
 
+.include "options.mk"
+
 .include "../../devel/popt/buildlink3.mk"
-.include "../../lang/python/pyversion.mk"
-#.include "../../lang/perl5/buildlink3.mk"
 .include "../../mk/curses.buildlink3.mk"
 .include "../../mk/readline.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/OpenIPMI/PLIST b/OpenIPMI/PLIST
index bd2d7aa27c..e2ac178631 100644
--- a/OpenIPMI/PLIST
+++ b/OpenIPMI/PLIST
@@ -93,3 +93,5 @@ man/man7/ipmi_cmdlang.7
 man/man7/openipmi_conparms.7
 share/examples/OpenIPMI/ipmisim1.emu
 share/examples/OpenIPMI/lan.conf
+@pkgdir man/man8
+@pkgdir etc/ipmi
diff --git a/OpenIPMI/options.mk b/OpenIPMI/options.mk
new file mode 100644
index 0000000000..018d880fee
--- /dev/null
+++ b/OpenIPMI/options.mk
@@ -0,0 +1,35 @@
+# $NetBSD$
+
+PKG_OPTIONS_VAR=		PKG_OPTIONS.OpenIPMI
+PKG_SUPPORTED_OPTIONS=		perl python snmp swig
+PKG_SUGGESTED_OPTIONS=		perl python snmp swig
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mperl)
+CONFIGURE_ARGS+=	--with-perl=${PERl5}
+.include "../../lang/perl5/buildlink3.mk"
+.else
+CONFIGURE_ARGS+=	--with-perl=no
+.endif
+
+.if !empty(PKG_OPTIONS:Mpython)
+CONFIGURE_ARGS+=	--with-python=${PYTHONBIN}
+.include "../../lang/python/pyversion.mk"
+.else
+CONFIGURE_ARGS+=	--with-python=no
+.endif
+
+.if !empty(PKG_OPTIONS:Msnmp)
+CONFIGURE_ARGS+=	--with-ucdsnmp=${PREFIX}
+.include "../../net/net-snmp/buildlink3.mk"
+.else
+CONFIGURE_ARGS+=	--with-ucdsnmp=no
+.endif
+
+.if !empty(PKG_OPTIONS:Mswig)
+CONFIGURE_ARGS+=	--with-swig=${PREFIX}/bin/swig3.0
+.include "../../devel/swig3/buildlink3.mk"
+.else
+CONFIGURE_ARGS+=	--with-swig=no
+.endif


Home | Main Index | Thread Index | Old Index