From 028ce6a59292b1a1b9f02089650472d6bae69530cbe12fd89cc66abefe59c43c Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Fri, 18 Aug 2017 10:52:29 +0000 Subject: [PATCH] Accepting request 517509 from home:alarrosa:branches:hardware - Add use-pkg-config-gdlib.diff to fix a build failure due to the configure scripts using gdlib-config (which is deprecated) to obtain the CFLAGS/LDFLAGS/LIBS to use when building with gd. With the patch, nut now uses pkg-config which returns the right values OBS-URL: https://build.opensuse.org/request/show/517509 OBS-URL: https://build.opensuse.org/package/show/hardware/nut?expand=0&rev=64 --- nut.changes | 8 ++++++++ nut.spec | 3 +++ use-pkg-config-gdlib.diff | 17 +++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 use-pkg-config-gdlib.diff diff --git a/nut.changes b/nut.changes index 6f12070..6327cc2 100644 --- a/nut.changes +++ b/nut.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Aug 18 08:21:49 UTC 2017 - alarrosa@suse.com + +- Add use-pkg-config-gdlib.diff to fix a build failure due to the + configure scripts using gdlib-config (which is deprecated) to + obtain the CFLAGS/LDFLAGS/LIBS to use when building with gd. With + the patch, nut now uses pkg-config which returns the right values + ------------------------------------------------------------------- Tue May 9 09:06:52 UTC 2017 - jengelh@inai.de diff --git a/nut.spec b/nut.spec index bf5958c..2bbc6e7 100644 --- a/nut.spec +++ b/nut.spec @@ -78,6 +78,8 @@ Patch7: nut-systemd-dirs.patch Patch8: nut-doc-fixed-date.patch # PATCH-FIX-UPSTREAM nut-doc-cables.patch sbrabec@suse.cz -- Build HTML documentation of cables. Patch9: nut-doc-cables.patch +# PATCH-FIX-UPSTREAM use-pkg-config-gdlib.diff alarrosa@suse.com -- Use pkg-config to obtain CFLAGS and LDFLAGS to use when building with gd +Patch10: use-pkg-config-gdlib.diff BuildRequires: apache2-devel BuildRequires: avahi-devel BuildRequires: dbus-1-glib-devel @@ -304,6 +306,7 @@ mv upsd-early-powerdown.init upsd-early-powerdown %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 sed -i s/@now@/`date -r ChangeLog +%%Y-%%m-%%d`/g docs/docinfo.xml.in sed -i "s/@UPSD_USER@/%{USER}/g" upsd.init diff --git a/use-pkg-config-gdlib.diff b/use-pkg-config-gdlib.diff new file mode 100644 index 0000000..9d7b4ae --- /dev/null +++ b/use-pkg-config-gdlib.diff @@ -0,0 +1,17 @@ +Index: nut-2.7.4/m4/nut_check_libgd.m4 +=================================================================== +--- nut-2.7.4.orig/m4/nut_check_libgd.m4 ++++ nut-2.7.4/m4/nut_check_libgd.m4 +@@ -34,9 +34,9 @@ if test -z "${nut_have_libgd_seen}"; the + AC_MSG_WARN([[If gd detection fails, upgrade gd or use --with-gd-includes and --with-gd-libs]]) + ;; + *) +- CFLAGS="`gdlib-config --includes 2>/dev/null`" +- LDFLAGS="`gdlib-config --ldflags 2>/dev/null`" +- LIBS="`gdlib-config --libs 2>/dev/null`" ++ CFLAGS="`pkg-config gdlib --cflags 2>/dev/null`" ++ LDFLAGS="`pkg-config gdlib --libs 2>/dev/null`" ++ LIBS="" + ;; + esac +