public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-power/nut/, sys-power/nut/files/
Date: Wed,  4 Aug 2021 23:17:57 +0000 (UTC)	[thread overview]
Message-ID: <1628119068.a56c59f4e9869ff686227c848b4402a281974fb9.sam@gentoo> (raw)

commit:     a56c59f4e9869ff686227c848b4402a281974fb9
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue May  4 14:16:41 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Aug  4 23:17:48 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a56c59f4

sys-power/nut: Fix for slibtool

Thanks-to: orbea <orbea <AT> riseup.net>
Upstream: https://github.com/networkupstools/nut/commit/5d98d55
Upstream: https://github.com/networkupstools/nut/commit/a0328e3
Closes: https://bugs.gentoo.org/778584
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/20689
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-power/nut/files/nut-2.7.2-no-libdummy.patch | 13 ------
 sys-power/nut/files/nut-2.7.4-nut-scanner.patch | 35 ++++++++++++++
 sys-power/nut/files/nut-2.7.4-slibtool.patch    | 61 +++++++++++++++++++++++++
 sys-power/nut/nut-2.7.4-r7.ebuild               |  3 +-
 4 files changed, 98 insertions(+), 14 deletions(-)

diff --git a/sys-power/nut/files/nut-2.7.2-no-libdummy.patch b/sys-power/nut/files/nut-2.7.2-no-libdummy.patch
deleted file mode 100644
index ca0d8be028f..00000000000
--- a/sys-power/nut/files/nut-2.7.2-no-libdummy.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/drivers/Makefile.am b/drivers/Makefile.am
-index 99614ca..42b3611 100644
---- a/drivers/Makefile.am
-+++ b/drivers/Makefile.am
-@@ -267,5 +267,6 @@ dist_noinst_HEADERS = apc-mib.h apc-hid.h baytech-mib.h bcmxcp.h    \
-
- # Define a dummy library so that Automake builds rules for the
- # corresponding object files.  This library is not actually built,
--EXTRA_LIBRARIES = libdummy.a
--libdummy_a_SOURCES = main.c dstate.c serial.c
-+EXTRA_LIBRARIES =
-+#EXTRA_LIBRARIES = libdummy.a
-+#libdummy_a_SOURCES = main.c dstate.c serial.c

diff --git a/sys-power/nut/files/nut-2.7.4-nut-scanner.patch b/sys-power/nut/files/nut-2.7.4-nut-scanner.patch
new file mode 100644
index 00000000000..c846e3a782c
--- /dev/null
+++ b/sys-power/nut/files/nut-2.7.4-nut-scanner.patch
@@ -0,0 +1,35 @@
+From 5d98d5536699222bc93c58c1e6f6df43dc9bfcff Mon Sep 17 00:00:00 2001
+From: Arnaud Quette <arnaud.quette@free.fr>
+Date: Thu, 10 Mar 2016 14:41:40 +0100
+Subject: [PATCH] Fix nut-scanner compilation in some environments
+
+Following the commits 5187dab (common: add some string-related functions) and
+e767df5 (common: consolidate some string-related functions), the build rules of
+nut-scanner were not updated to also use str.c. Since the libcommon.la
+dependency was still there, some environments managed to build cleanly, while
+other are failing.  Update build dependencies to fix this situation
+---
+ tools/nut-scanner/Makefile.am | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tools/nut-scanner/Makefile.am b/tools/nut-scanner/Makefile.am
+index 558cb23b8f..db85c68287 100644
+--- a/tools/nut-scanner/Makefile.am
++++ b/tools/nut-scanner/Makefile.am
+@@ -14,14 +14,14 @@ libnutscan_la_SOURCES = scan_nut.c scan_ipmi.c \
+ 			scan_avahi.c scan_eaton_serial.c nutscan-serial.c \
+ 			../../drivers/serial.c \
+ 			../../drivers/bcmxcp_ser.c \
+-			../../common/common.c
++			../../common/common.c ../../common/str.c
+ libnutscan_la_LIBADD = $(NETLIBS) $(LIBLTDL_LIBS)
+ libnutscan_la_LDFLAGS = $(SERLIBS) -version-info 1:0:0
+ libnutscan_la_CFLAGS = -I$(top_srcdir)/clients -I$(top_srcdir)/include $(LIBLTDL_CFLAGS) -I$(top_srcdir)/drivers
+ 
+ nut_scanner_SOURCES = nut-scanner.c
+ nut_scanner_CFLAGS = -I$(top_srcdir)/clients -I$(top_srcdir)/include
+-nut_scanner_LDADD = libnutscan.la ../../common/libcommon.la
++nut_scanner_LDADD = libnutscan.la
+ 
+ if WITH_SSL
+   libnutscan_la_CFLAGS += $(LIBSSL_CFLAGS)

diff --git a/sys-power/nut/files/nut-2.7.4-slibtool.patch b/sys-power/nut/files/nut-2.7.4-slibtool.patch
new file mode 100644
index 00000000000..ddcebdc2ec4
--- /dev/null
+++ b/sys-power/nut/files/nut-2.7.4-slibtool.patch
@@ -0,0 +1,61 @@
+From a0328e384ad3fb230c2276c8b6dd9f2c47ac07fb Mon Sep 17 00:00:00 2001
+From: orbea <orbea@riseup.net>
+Date: Sat, 27 Mar 2021 15:18:17 -0700
+Subject: [PATCH] drivers: Fix undefined references with slibtool.
+
+Signed-off-by: orbea <orbea@riseup.net>
+---
+ drivers/Makefile.am | 15 +++++++++------
+ 1 file changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/Makefile.am b/drivers/Makefile.am
+index 40746364e3..3c2277cfc0 100644
+--- a/drivers/Makefile.am
++++ b/drivers/Makefile.am
+@@ -4,8 +4,8 @@
+ # (libtool version of the static lib, in order to access LTLIBOBJS)
+ #FIXME: SERLIBS is only useful for LDADD_DRIVERS_SERIAL not for LDADD_COMMON
+ LDADD_COMMON = ../common/libcommon.la ../common/libparseconf.la
+-LDADD_DRIVERS = $(LDADD_COMMON) main.o dstate.o
+-LDADD_DRIVERS_SERIAL = $(LDADD_DRIVERS) $(SERLIBS) serial.o
++LDADD_DRIVERS = libdummy.la $(LDADD_COMMON)
++LDADD_DRIVERS_SERIAL = libdummy_serial.la $(LDADD_DRIVERS) $(SERLIBS)
+ 
+ # most targets are drivers, so make this the default
+ LDADD = $(LDADD_DRIVERS_SERIAL)
+@@ -109,6 +109,7 @@ bcmxcp_LDADD = $(LDADD) -lm
+ belkin_SOURCES = belkin.c
+ belkinunv_SOURCES = belkinunv.c
+ bestfcom_SOURCES = bestfcom.c
++bestfortress_SOURCES = bestfortress.c
+ bestuferrups_SOURCES = bestuferrups.c
+ bestups_SOURCES = bestups.c
+ blazer_ser_SOURCES = blazer.c blazer_ser.c
+@@ -198,7 +199,6 @@ richcomm_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS)
+ riello_usb_SOURCES = riello.c riello_usb.c libusb.c usb-common.c
+ riello_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) -lm
+ 
+-
+ # HID-over-serial
+ mge_shut_SOURCES = usbhid-ups.c libshut.c libhid.c hidparser.c mge-hid.c
+ # per-target CFLAGS are necessary here
+@@ -253,7 +253,7 @@ nutdrv_qx_LDADD = $(LDADD_DRIVERS) -lm
+ nutdrv_qx_CFLAGS = $(AM_CFLAGS)
+ if WITH_SERIAL
+ nutdrv_qx_CFLAGS += -DQX_SERIAL
+-nutdrv_qx_LDADD += $(SERLIBS) serial.o
++nutdrv_qx_LDADD += libdummy_serial.la $(SERLIBS)
+ endif
+ if WITH_USB
+ nutdrv_qx_CFLAGS += -DQX_USB
+@@ -291,5 +291,8 @@ dist_noinst_HEADERS = apc-mib.h apc-hid.h baytech-mib.h bcmxcp.h bcmxcp_ser.h	\
+ 
+ # Define a dummy library so that Automake builds rules for the
+ # corresponding object files.  This library is not actually built,
+-EXTRA_LIBRARIES = libdummy.a
+-libdummy_a_SOURCES = main.c dstate.c serial.c
++EXTRA_LTLIBRARIES = libdummy.la libdummy_serial.la
++libdummy_la_SOURCES = main.c dstate.c
++libdummy_la_LDFLAGS = -no-undefined -static
++libdummy_serial_la_SOURCES = serial.c
++libdummy_serial_la_LDFLAGS = -no-undefined -static

diff --git a/sys-power/nut/nut-2.7.4-r7.ebuild b/sys-power/nut/nut-2.7.4-r7.ebuild
index fe89715a5ff..d1fe21dbae5 100644
--- a/sys-power/nut/nut-2.7.4-r7.ebuild
+++ b/sys-power/nut/nut-2.7.4-r7.ebuild
@@ -83,11 +83,12 @@ NUT_PRIVATE_FILES="/etc/nut/{upsd.conf,upsd.users,upsmon.conf}"
 NUT_CGI_FILES="/etc/nut/{{hosts,upsset}.conf,upsstats{,-single}.html}"
 
 PATCHES=(
-	"${FILESDIR}"/${PN}-2.7.2-no-libdummy.patch
 	"${FILESDIR}"/${PN}-2.7.1-snmpusb-order.patch
 	"${FILESDIR}"/${PN}-2.6.2-lowspeed-buffer-size.patch
 	"${FILESDIR}"/nut-openssl-1.1-support.patch
 	"${FILESDIR}"/nut-2.7.4-py3.patch
+	"${FILESDIR}"/nut-2.7.4-nut-scanner.patch
+	"${FILESDIR}"/nut-2.7.4-slibtool.patch
 )
 
 src_prepare() {


             reply	other threads:[~2021-08-04 23:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04 23:17 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-08-04 21:23 [gentoo-commits] repo/gentoo:master commit in: sys-power/nut/, sys-power/nut/files/ Matthew Thode
2018-10-27 22:10 Andreas Sturmlechner
2018-10-27 19:02 Andreas Sturmlechner
2016-11-08 18:33 Robin H. Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1628119068.a56c59f4e9869ff686227c848b4402a281974fb9.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox