All of lore.kernel.org
 help / color / mirror / Atom feed
From: Baruch Siach <baruch@tkos.co.il>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] bandwidthd: fix static build
Date: Thu,  2 Oct 2014 09:49:27 +0300	[thread overview]
Message-ID: <7d38491011008b60f8ad91ec0261af046d453685.1412232567.git.baruch@tkos.co.il> (raw)

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

             reply	other threads:[~2014-10-02  6:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-02  6:49 Baruch Siach [this message]
     [not found] ` <542CFECE.9020103@gmail.com>
2014-10-02  7:52   ` [Buildroot] [PATCH] bandwidthd: fix static build 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7d38491011008b60f8ad91ec0261af046d453685.1412232567.git.baruch@tkos.co.il \
    --to=baruch@tkos.co.il \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.