All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] bandwidthd: fix static build
@ 2014-10-02  6:49 Baruch Siach
       [not found] ` <542CFECE.9020103@gmail.com>
  0 siblings, 1 reply; 11+ messages in thread
From: Baruch Siach @ 2014-10-02  6:49 UTC (permalink / raw)
  To: buildroot

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@gmail.com>
Signed-off-by: Baruch Siach <baruch@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@tkos.co.il>
+From: Baruch Siach <baruch@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@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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-10-05 13:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-02  6:49 [Buildroot] [PATCH] bandwidthd: fix static build Baruch Siach
     [not found] ` <542CFECE.9020103@gmail.com>
2014-10-02  7:52   ` Baruch Siach
2014-10-02  7:56     ` Nathaniel Roach
2014-10-02  7:58       ` Baruch Siach
2014-10-02  8:24         ` Nathaniel Roach
2014-10-02  8:33           ` Baruch Siach
2014-10-03  6:35             ` Nathaniel Roach
2014-10-05  4:50               ` Baruch Siach
2014-10-05 12:40                 ` Thomas Petazzoni
2014-10-05 13:01                   ` Nathaniel Roach
2014-10-05 13:12                     ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.