[Buildroot] [PATCH] bandwidthd: fix static build
Baruch Siach
baruch at tkos.co.il
Thu Oct 2 06:49:27 UTC 2014
Build against libpng requires -lz when built statically. Patch configure.ac to
get the needed information from pkg-config.
This patch can not be directly upstreamed as it conflicts with upstream
changes, but a proper fix would be based on the same idea.
Fixes:
http://autobuild.buildroot.net/results/e49/e496cc4315c06de61379222d3e842d4cd05b2f71/
Cc: Nathaniel Roach <nroach44 at gmail.com>
Signed-off-by: Baruch Siach <baruch at tkos.co.il>
---
...ac-fix-libpng-check-when-built-statically.patch | 29 ++++++++++++++++++++++
package/bandwidthd/bandwidthd.mk | 2 +-
2 files changed, 30 insertions(+), 1 deletion(-)
create mode 100644 package/bandwidthd/0001-configure.ac-fix-libpng-check-when-built-statically.patch
diff --git a/package/bandwidthd/0001-configure.ac-fix-libpng-check-when-built-statically.patch b/package/bandwidthd/0001-configure.ac-fix-libpng-check-when-built-statically.patch
new file mode 100644
index 000000000000..f444ba70d513
--- /dev/null
+++ b/package/bandwidthd/0001-configure.ac-fix-libpng-check-when-built-statically.patch
@@ -0,0 +1,29 @@
+From 97998f008f5d900619194d80051dee1be68e4ace Mon Sep 17 00:00:00 2001
+Message-Id: <97998f008f5d900619194d80051dee1be68e4ace.1412231990.git.baruch at tkos.co.il>
+From: Baruch Siach <baruch at tkos.co.il>
+Date: Thu, 2 Oct 2014 09:12:28 +0300
+Subject: [PATCH] configure.ac: fix libpng check when built statically
+
+Find libpng library dependencies using pkg-config.
+
+Signed-off-by: Baruch Siach <baruch at tkos.co.il>
+---
+ configure.ac | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 3a2d0ba97bdf..9c2fa83cc93c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -30,6 +30,8 @@ AC_CHECK_LIB(m, pow)
+ AC_CHECK_LIB(iconv, libiconv_open)
+
+ # Required Libraries
++PKG_CHECK_MODULES([libpng], libpng)
++LIBS="$LIBS $libpng_LIBS"
+ AC_CHECK_LIB(png, png_read_info, ,[AC_MSG_ERROR([Bandwidthd requires but cannot libpng])])
+ AC_CHECK_LIB(gd, gdImageCreate, ,[AC_MSG_ERROR([Bandwidthd requires but cannot find libgd])])
+ AC_CHECK_LIB(pcap, pcap_open_live, ,
+--
+2.1.0
+
diff --git a/package/bandwidthd/bandwidthd.mk b/package/bandwidthd/bandwidthd.mk
index 3e11d6abb1e5..0b03b0b70278 100644
--- a/package/bandwidthd/bandwidthd.mk
+++ b/package/bandwidthd/bandwidthd.mk
@@ -11,7 +11,7 @@ BANDWIDTHD_SITE = $(call github,nroach44,bandwidthd,$(BANDWIDTHD_VERSION))
# download" by upstream.
BANDWIDTHD_LICENSE = GPL
-BANDWIDTHD_DEPENDENCIES = gd libpng libpcap
+BANDWIDTHD_DEPENDENCIES = gd libpng libpcap host-pkgconf
BANDWIDTHD_AUTORECONF = YES
--
2.1.0
More information about the buildroot
mailing list