pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Can't build "apcupsd" with "cgi" option disabled
On Thu, 16 Dec 2021, John D. Baker wrote:
> Please arrange that when options requiring X11 are _dis_abled, the package
> as a whole will not require X11.
In the case of "sysutils/apcupsd" the following patches seem to do what
is necessary:
+Index: sysutils/apcupsd/Makefile
+===================================================================
+RCS file: /cvsroot/pkgsrc/sysutils/apcupsd/Makefile,v
+retrieving revision 1.92
+diff -u -p -r1.92 Makefile
+--- sysutils/apcupsd/Makefile 19 Sep 2020 13:50:48 -0000 1.92
++++ sysutils/apcupsd/Makefile 16 Dec 2021 10:15:58 -0000
+@@ -9,7 +9,7 @@ HOMEPAGE= http://www.apcupsd.org/
+ COMMENT= UPS power management for APCC Products
+ LICENSE= gnu-gpl-v2
+
+-USE_TOOLS+= gmake msgfmt sh makedepend
++USE_TOOLS+= gmake msgfmt sh
+ USE_LANGUAGES= c c++
+
+ GNU_CONFIGURE= yes
+@@ -37,7 +37,6 @@ BUILD_DEFS+= VARBASE
+ #CONFIGURE_ARGS+= --with-upscable=${APCUPSD_UPS_TYPE}
+
+ CONFIGURE_ARGS+= --enable-net # enable NIS network driver
+-CONFIGURE_ARGS+= --enable-usb # enable USB network driver
+ CONFIGURE_ARGS+= --enable-snmp # enable SNMP driver
+ CONFIGURE_ARGS+= --with-lock-dir=${VARBASE}/spool/lock
+ # XXX is this supposed to be the full filename?
+@@ -111,5 +110,4 @@ post-install:
+ .endfor
+
+ .include "../../devel/gettext-lib/buildlink3.mk"
+-.include "../../mk/libusb.buildlink3.mk"
+ .include "../../mk/bsd.pkg.mk"
+Index: sysutils/apcupsd/options.mk
+===================================================================
+RCS file: /cvsroot/pkgsrc/sysutils/apcupsd/options.mk,v
+retrieving revision 1.3
+diff -u -p -r1.3 options.mk
+--- sysutils/apcupsd/options.mk 1 Aug 2011 14:54:51 -0000 1.3
++++ sysutils/apcupsd/options.mk 16 Dec 2021 10:16:34 -0000
+@@ -1,15 +1,21 @@
+ # $NetBSD: options.mk,v 1.3 2011/08/01 14:54:51 bouyer Exp $
+
+ PKG_OPTIONS_VAR= PKG_OPTIONS.apcupsd
+-PKG_SUPPORTED_OPTIONS= cgi
+-PKG_SUGGESTED_OPTIONS= cgi
++PKG_SUPPORTED_OPTIONS= cgi usb
++PKG_SUGGESTED_OPTIONS= cgi usb
+
+ .include "../../mk/bsd.options.mk"
+
+ PLIST_VARS+= cgi
+ .if !empty(PKG_OPTIONS:Mcgi)
++USE_TOOLS+= makedepend
+ . include "../../graphics/gd/buildlink3.mk"
+ CONFIGURE_ARGS+= --enable-cgi # include CGI support
+ CONFIGURE_ARGS+= --with-cgi-bin=${PREFIX}/libexec/cgi-bin
+ PLIST.cgi= yes
+ .endif
++
++.if !empty(PKG_OPTIONS:Musb)
++. include "../../mk/libusb.buildlink3.mk"
++CONFIGURE_ARGS+= --enable-usb # include USB support
++.endif
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]consolidated[flyspeck]net OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
Home |
Main Index |
Thread Index |
Old Index