pkgsrc-Changes archive

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

CVS commit: pkgsrc/sysutils/ups-nut



Module Name:    pkgsrc
Committed By:   martin
Date:           Fri May 16 16:55:21 UTC 2025

Modified Files:
        pkgsrc/sysutils/ups-nut: Makefile PLIST options.mk

Log Message:
Add a (default on) "python" option.


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 pkgsrc/sysutils/ups-nut/Makefile
cvs rdiff -u -r1.33 -r1.34 pkgsrc/sysutils/ups-nut/PLIST
cvs rdiff -u -r1.3 -r1.4 pkgsrc/sysutils/ups-nut/options.mk

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

Modified files:

Index: pkgsrc/sysutils/ups-nut/Makefile
diff -u pkgsrc/sysutils/ups-nut/Makefile:1.77 pkgsrc/sysutils/ups-nut/Makefile:1.78
--- pkgsrc/sysutils/ups-nut/Makefile:1.77       Thu Feb 13 19:18:36 2025
+++ pkgsrc/sysutils/ups-nut/Makefile    Fri May 16 16:55:21 2025
@@ -1,10 +1,12 @@
-# $NetBSD: Makefile,v 1.77 2025/02/13 19:18:36 gdt Exp $
+# $NetBSD: Makefile,v 1.78 2025/05/16 16:55:21 martin Exp $
 
 .include "Makefile.common"
 
 PKGNAME=               ups-${DISTNAME}
 COMMENT=               Network UPS Tools
 
+PLIST_VARS+=           python
+
 SUBST_CLASSES+=                man-so
 SUBST_MESSAGE.man-so=  Fixing manpage .so references.
 SUBST_STAGE.man-so=    pre-build
@@ -31,10 +33,6 @@ CONFIGURE_ARGS+=     --without-nut_monitor   #
 # https://github.com/networkupstools/nut/issues/1792 which upstream
 # declines to fix.
 CONFIGURE_ARGS+=       --without-python2
-# Force only our chosen python3 (same reason as above).
-CONFIGURE_ARGS+=       --with-python3=${PYTHONBIN}
-CONFIGURE_ARGS+=       --with-python=${PYTHONBIN}
-# \todo Move to split package.
 
 PKG_GROUPS_VARS+=      NUT_GROUP
 PKG_USERS_VARS+=       NUT_USER
@@ -94,5 +92,7 @@ post-install:
 
 # nut-scanner needs libltdl, but this is not documented
 .include "../../devel/libltdl/buildlink3.mk"
+.if !empty(PKG_OPTIONS:Mpython)
 .include "../../lang/python/extension.mk"
+.endif
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/sysutils/ups-nut/PLIST
diff -u pkgsrc/sysutils/ups-nut/PLIST:1.33 pkgsrc/sysutils/ups-nut/PLIST:1.34
--- pkgsrc/sysutils/ups-nut/PLIST:1.33  Wed Apr  3 17:42:53 2024
+++ pkgsrc/sysutils/ups-nut/PLIST       Fri May 16 16:55:21 2025
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.33 2024/04/03 17:42:53 gdt Exp $
+@comment $NetBSD: PLIST,v 1.34 2025/05/16 16:55:21 martin Exp $
 bin/nut-scanner
 bin/nutconf
 bin/upsc
@@ -23,8 +23,8 @@ lib/pkgconfig/libnutclient.pc
 lib/pkgconfig/libnutclientstub.pc
 lib/pkgconfig/libnutscan.pc
 lib/pkgconfig/libupsclient.pc
-${PYSITELIB}/PyNUT.py
-${PYSITELIB}/test_nutclient.py
+${PLIST.python}${PYSITELIB}/PyNUT.py
+${PLIST.python}${PYSITELIB}/test_nutclient.py
 libexec/nut/al175
 libexec/nut/apcsmart
 libexec/nut/apcsmart-old

Index: pkgsrc/sysutils/ups-nut/options.mk
diff -u pkgsrc/sysutils/ups-nut/options.mk:1.3 pkgsrc/sysutils/ups-nut/options.mk:1.4
--- pkgsrc/sysutils/ups-nut/options.mk:1.3      Thu Nov  9 21:02:48 2023
+++ pkgsrc/sysutils/ups-nut/options.mk  Fri May 16 16:55:21 2025
@@ -1,9 +1,10 @@
-# $NetBSD: options.mk,v 1.3 2023/11/09 21:02:48 gdt Exp $
+# $NetBSD: options.mk,v 1.4 2025/05/16 16:55:21 martin Exp $
 
 PKG_OPTIONS_VAR=               PKG_OPTIONS.ups-nut
+PKG_SUPPORTED_OPTIONS=         python
 PKG_OPTIONS_OPTIONAL_GROUPS=   ssl
 PKG_OPTIONS_GROUP.ssl=         nss openssl
-PKG_SUGGESTED_OPTIONS=         openssl
+PKG_SUGGESTED_OPTIONS=         python openssl
 
 .include "../../mk/bsd.options.mk"
 
@@ -16,3 +17,13 @@ CONFIGURE_ARGS+=     --with-ssl=openssl --wi
 .else
 CONFIGURE_ARGS+=       --without-ssl
 .endif
+
+.if !empty(PKG_OPTIONS:Mpython)
+# Force only our chosen python3 (see Makefile comment for --without-python2)
+CONFIGURE_ARGS+=       --with-python3=${PYTHONBIN}
+CONFIGURE_ARGS+=       --with-python=${PYTHONBIN}
+PLIST.python=          yes
+# \todo Move to split package.
+.else
+CONFIGURE_ARGS+=       --without-python3
+.endif



Home | Main Index | Thread Index | Old Index