From patchwork Fri Jan 18 01:43:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Christian de Rivaz X-Patchwork-Id: 213430 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 781CC2C007C for ; Fri, 18 Jan 2013 13:11:14 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B96418CB0E; Fri, 18 Jan 2013 02:11:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0zhMpbZGAmxc; Fri, 18 Jan 2013 02:11:10 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 80BD78C904; Fri, 18 Jan 2013 02:11:10 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 58D3B8F753 for ; Fri, 18 Jan 2013 02:11:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A65068C935 for ; Fri, 18 Jan 2013 02:11:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 94osvx8pYPri for ; Fri, 18 Jan 2013 02:11:06 +0000 (UTC) X-Greylist: delayed 00:27:19 by SQLgrey-1.7.6 Received: from mail.eclis.ch (www.eclis.ch [217.162.2.166]) by whitealder.osuosl.org (Postfix) with ESMTP id 2FED38C902 for ; Fri, 18 Jan 2013 02:11:06 +0000 (UTC) Received: from localhost.localdomain (unknown [213.221.150.139]) by mail.eclis.ch (Postfix) with ESMTP id 7C55564406F; Fri, 18 Jan 2013 02:43:44 +0100 (CET) From: Jean-Christian de Rivaz To: buildroot@busybox.net Date: Fri, 18 Jan 2013 02:43:39 +0100 Message-Id: <1358473419-13477-1-git-send-email-jc@eclis.ch> X-Mailer: git-send-email 1.7.2.5 Subject: [Buildroot] [PATCH] Use the libpng-config from staging instead of the one from the host. X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net The gd package configure call 'libpng-config' to get the compiler flags required to use the libpng. The configure correctly allow to specify the path of the staging libpng-config by using the ac_cv_path_LIBPNG_CONFIG but the configure.ac call simply 'libpng-config' instead of the specified one. The configure.ac is now modified to call the specified libpng_config. In buildroot gd.mk, specify the staging libpng-config and to a empty string the libpng12-config to prevent to use the -lpng12 flag or the host setting. Signed-off-by: Jean-Christian de Rivaz --- package/gd/gd-libpng-config.patch | 22 ++++++++++++++++++++++ package/gd/gd.mk | 2 ++ 2 files changed, 24 insertions(+), 0 deletions(-) create mode 100644 package/gd/gd-libpng-config.patch diff --git a/package/gd/gd-libpng-config.patch b/package/gd/gd-libpng-config.patch new file mode 100644 index 0000000..655da78 --- /dev/null +++ b/package/gd/gd-libpng-config.patch @@ -0,0 +1,22 @@ +diff -ruN a/configure.ac b/configure.ac +--- a/configure.ac 2013-01-18 02:00:59.000000000 +0100 ++++ b/configure.ac 2013-01-18 02:01:44.000000000 +0100 +@@ -353,14 +353,14 @@ + AC_PATH_PROG([LIBPNG12_CONFIG], [libpng12-config]) + AC_PATH_PROG([LIBPNG_CONFIG], [libpng-config]) + if test -n "$LIBPNG12_CONFIG"; then +- libpng_CPPFLAGS=`libpng12-config --cflags` ++ libpng_CPPFLAGS=`$LIBPNG12_CONFIG --cflags` + # should be --ldopts, but it's currently broken +- libpng_LDFLAGS=`libpng12-config --ldflags` ++ libpng_LDFLAGS=`$LIBPNG12_CONFIG --ldflags` + libpng_LDFLAGS=`echo " $libpng_LDFLAGS" | sed 's/ -l[[^ ]][[^ ]]*//g'` + elif test -n "$LIBPNG_CONFIG"; then +- libpng_CPPFLAGS=`libpng-config --cflags` ++ libpng_CPPFLAGS=`$LIBPNG_CONFIG --cflags` + # should be --ldopts, but it's currently broken +- libpng_LDFLAGS=`libpng-config --ldflags` ++ libpng_LDFLAGS=`$LIBPNG_CONFIG --ldflags` + libpng_LDFLAGS=`echo " $libpng_LDFLAGS" | sed 's/ -l[[^ ]][[^ ]]*//g'` + elif test -d "$withval"; then + libpng_CPPFLAGS="-I$withval/include" diff --git a/package/gd/gd.mk b/package/gd/gd.mk index 972d8dd..96abf9e 100644 --- a/package/gd/gd.mk +++ b/package/gd/gd.mk @@ -33,6 +33,8 @@ endif ifeq ($(BR2_PACKAGE_LIBPNG),y) GD_DEPENDENCIES += libpng GD_CONF_OPT += --with-png +GD_CONF_ENV += ac_cv_path_LIBPNG12_CONFIG="" +GD_CONF_ENV += ac_cv_path_LIBPNG_CONFIG=$(STAGING_DIR)/usr/bin/libpng-config endif ifeq ($(BR2_PACKAGE_XLIB_LIBXPM),y)