summaryrefslogtreecommitdiff
path: root/sys-power/nut/files
diff options
context:
space:
mode:
Diffstat (limited to 'sys-power/nut/files')
-rw-r--r--sys-power/nut/files/nut-2.7.2-no-libdummy.patch13
-rw-r--r--sys-power/nut/files/nut-2.7.4-nut-scanner.patch35
-rw-r--r--sys-power/nut/files/nut-2.7.4-slibtool.patch61
3 files changed, 96 insertions, 13 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 ca0d8be028f5..000000000000
--- 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 000000000000..c846e3a782cd
--- /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 000000000000..ddcebdc2ec4f
--- /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