nut: use Python 3.12

See: https://trac.macports.org/ticket/72549
This commit is contained in:
Renee Otten
2025-05-30 12:36:01 -04:00
parent a245ef6e5e
commit c4699f8fab
+15 -9
View File
@@ -9,7 +9,7 @@ legacysupport.newest_darwin_requires_legacy 10
github.setup networkupstools nut 2.8.2 v
github.tarball_from releases
revision 0
revision 1
homepage https://www.networkupstools.org/
@@ -29,6 +29,10 @@ checksums rmd160 b4de79fe2a4dfe331efe59a2ec356ab6962ceee2 \
sha256 e4b4b0cbe7dd39ba9097be7f7d787bb2fffbe35df64dff53b5fe393d659c597d \
size 5599935
# nut uses telnetlib.py which was removed in Python 3.13
set python_branch 3.12
set python_version [string map {. {}} ${python_branch}]
depends_build-append \
path:bin/pkg-config:pkgconfig
@@ -36,7 +40,8 @@ depends_lib-append port:libtool \
port:libusb-compat \
port:neon \
port:tcp_wrappers \
port:nss
port:nss \
port:python${python_version}
patchfiles dynamic_lookup-11.patch
@@ -49,7 +54,8 @@ add_users ${userName} group=${groupName}
set stateDir ${prefix}/var/db/ups
destroot.keepdirs ${destroot}${stateDir}
configure.args --disable-silent-rules \
configure.args-append \
--disable-silent-rules \
--with-serial=no \
--with-usb=auto \
--with-snmp=no \
@@ -61,7 +67,11 @@ configure.args --disable-silent-rules \
--with-statepath=${stateDir} \
--with-pidpath=${prefix}/var/run \
--with-hotplug-dir=${prefix}/etc/nut/hotplug \
--with-udev-dir=${prefix}/etc/nut/udev
--with-udev-dir=${prefix}/etc/nut/udev \
--without-python2 \
--with-python=${prefix}/bin/python${python_branch} \
--with-python3=${prefix}/bin/python${python_branch}
if {[getuid] == 0} {
configure.args-append \
--with-user=${userName} \
@@ -77,8 +87,4 @@ pre-destroot {
xinstall -d -m 0770 {*}${userargs} ${destroot}${stateDir}
}
## variant snmp {
## configure.args-append --with-snmp=yes
## configure.args-delete --with-snmp=no
## depends_lib-append port:net-snmp
## }
github.livecheck.regex {([0-9.]+)}