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
This commit is contained in:
Olaf Hering 2017-08-18 10:52:29 +00:00 committed by Git OBS Bridge
parent db330d874f
commit 028ce6a592
3 changed files with 28 additions and 0 deletions

View File

@ -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

View File

@ -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

17
use-pkg-config-gdlib.diff Normal file
View File

@ -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