From patchwork Thu Jun 19 06:54:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Koen Kooi X-Patchwork-Id: 32165 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f72.google.com (mail-yh0-f72.google.com [209.85.213.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DC8112100C for ; Thu, 19 Jun 2014 06:54:48 +0000 (UTC) Received: by mail-yh0-f72.google.com with SMTP id f10sf6583534yha.7 for ; Wed, 18 Jun 2014 23:54:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:cc:subject:precedence:reply-to:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=BwLqEPJJZkqtUVZZpUMjDSjNW/XzoefotwxT3zprGY0=; b=j0tOmgo7C5VDe/iie8XWcDmtB6nWW6jO4DpTKr3Hhkep9HRlTNn7zTTGtagFQBqSN6 w3RWFvrxBC0W9nn2WyLKlw3udmU+3P62aZj1mRGWgDeKr3U1eibB3cmpzN1Ohh0+v6D5 jL339EaNd8r08Td/sJfaKCgRdGDDtfKzQb09TdVECelJ1ieMc0PrmXKXhLpxcmBBsyD3 0b84IzuEfpFiyBOycUK81CZMAIA/NTkddFH1m5Cq1iRsg5lDtYo+aUS43fVSYmske5pU j5JZbxHMMEoPbiw/vacFUn0fFXlZdTjt+fTsyh+6/tbVnr3tiYtw4g2Rq99OHJUlU6ts vKOQ== X-Gm-Message-State: ALoCoQmGtYxZvbzDBavMz9+6axOtU2LrzxIE9+AEf63t37YfjTZjYlN4uY5Ywkq7H5HxnmldjqPp X-Received: by 10.236.197.226 with SMTP id t62mr1369668yhn.50.1403160888572; Wed, 18 Jun 2014 23:54:48 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.38.111 with SMTP id s102ls475915qgs.20.gmail; Wed, 18 Jun 2014 23:54:48 -0700 (PDT) X-Received: by 10.58.246.132 with SMTP id xw4mr2545989vec.2.1403160888435; Wed, 18 Jun 2014 23:54:48 -0700 (PDT) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx.google.com with ESMTPS id yx7si1248928vdb.9.2014.06.18.23.54.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Jun 2014 23:54:48 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.180 as permitted sender) client-ip=209.85.128.180; Received: by mail-ve0-f180.google.com with SMTP id jw12so1911373veb.11 for ; Wed, 18 Jun 2014 23:54:48 -0700 (PDT) X-Received: by 10.58.230.101 with SMTP id sx5mr2524155vec.10.1403160888322; Wed, 18 Jun 2014 23:54:48 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp341260vcb; Wed, 18 Jun 2014 23:54:47 -0700 (PDT) X-Received: by 10.68.125.228 with SMTP id mt4mr3233416pbb.55.1403160887512; Wed, 18 Jun 2014 23:54:47 -0700 (PDT) Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id rm10si4761258pab.197.2014.06.18.23.54.46 for ; Wed, 18 Jun 2014 23:54:47 -0700 (PDT) Received-SPF: none (google.com: openembedded-devel-bounces@lists.openembedded.org does not designate permitted sender hosts) client-ip=140.211.169.62; Received: from mail.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 76BFF6FE7F; Thu, 19 Jun 2014 06:54:37 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-wg0-f46.google.com (mail-wg0-f46.google.com [74.125.82.46]) by mail.openembedded.org (Postfix) with ESMTP id 459C96FD1F for ; Thu, 19 Jun 2014 06:54:30 +0000 (UTC) Received: by mail-wg0-f46.google.com with SMTP id y10so1836341wgg.5 for ; Wed, 18 Jun 2014 23:54:31 -0700 (PDT) X-Received: by 10.180.90.141 with SMTP id bw13mr3565079wib.23.1403160871602; Wed, 18 Jun 2014 23:54:31 -0700 (PDT) Received: from localhost ([2001:610:612:0:2ad2:44ff:fe4b:bc17]) by mx.google.com with ESMTPSA id lo18sm8739214wic.1.2014.06.18.23.54.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Jun 2014 23:54:30 -0700 (PDT) From: Koen Kooi To: openembedded-devel@lists.openembedded.org Date: Thu, 19 Jun 2014 08:54:28 +0200 Message-Id: <1403160868-25473-1-git-send-email-koen.kooi@linaro.org> X-Mailer: git-send-email 1.9.3 Cc: Koen Kooi Subject: [oe] [meta-oe][PATCHv3] php 5.4.14: use pkg-config for libxml2 detection X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: openembedded-devel@lists.openembedded.org List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: koen.kooi@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.180 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Signed-off-by: Koen Kooi --- Changes since v3: * swapped fi/$i lines This finally fixes the build! meta-oe/recipes-devtools/php/php.inc | 2 - ...cinclude-use-pkgconfig-for-libxml2-config.patch | 90 ++++++++++++++++++++++ meta-oe/recipes-devtools/php/php_5.4.14.bb | 4 +- 3 files changed, 93 insertions(+), 3 deletions(-) create mode 100644 meta-oe/recipes-devtools/php/php/0001-acinclude-use-pkgconfig-for-libxml2-config.patch diff --git a/meta-oe/recipes-devtools/php/php.inc b/meta-oe/recipes-devtools/php/php.inc index b1bf79c..030c090 100644 --- a/meta-oe/recipes-devtools/php/php.inc +++ b/meta-oe/recipes-devtools/php/php.inc @@ -31,12 +31,10 @@ EXTRA_OECONF = "--enable-mbstring \ --with-imap-ssl=${STAGING_DIR_HOST} \ --with-zlib=${STAGING_LIBDIR}/.. \ --with-iconv=${STAGING_LIBDIR}/.. \ - --with-libxml-dir=${STAGING_BINDIR_CROSS} \ ${COMMON_EXTRA_OECONF} \ " EXTRA_OECONF_virtclass-native = " \ --with-zlib=${STAGING_LIBDIR_NATIVE}/.. \ - --with-libxml-dir=${STAGING_BINDIR_NATIVE} \ ${COMMON_EXTRA_OECONF} \ " diff --git a/meta-oe/recipes-devtools/php/php/0001-acinclude-use-pkgconfig-for-libxml2-config.patch b/meta-oe/recipes-devtools/php/php/0001-acinclude-use-pkgconfig-for-libxml2-config.patch new file mode 100644 index 0000000..823007e --- /dev/null +++ b/meta-oe/recipes-devtools/php/php/0001-acinclude-use-pkgconfig-for-libxml2-config.patch @@ -0,0 +1,90 @@ +From 0ff5d4adc9f5950d66738272b3ba88ef74f69117 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Tue, 17 Jun 2014 09:53:00 +0200 +Subject: [PATCH] acinclude: use pkgconfig for libxml2 config + +Signed-off-by: Koen Kooi +Upstream-Status: pending +--- + acinclude.m4 | 63 ++++++++++++++++++++++-------------------------------------- + 1 file changed, 23 insertions(+), 40 deletions(-) + +diff --git a/acinclude.m4 b/acinclude.m4 +index 9c7a305..211dbd3 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -2529,48 +2529,31 @@ dnl + dnl Common setup macro for libxml + dnl + AC_DEFUN([PHP_SETUP_LIBXML], [ +-AC_CACHE_CHECK([for xml2-config path], ac_cv_php_xml2_config_path, +-[ +- +- ac_cv_php_xml2_config_path="$PHP_LIBXML_DIR/xml2-config" +- ++PKG_CHECK_MODULES([LIBXML], [libxml-2.0 > 2.6.11], [ ++ PHP_EVAL_LIBLINE($LIBXML_LIBS, $1) ++ PHP_EVAL_INCLINE($LIBXML_CFLAGS) ++ ++ dnl Check that build works with given libs ++ AC_CACHE_CHECK(whether libxml build works, php_cv_libxml_build_works, [ ++ PHP_TEST_BUILD(xmlInitParser, ++ [ ++ php_cv_libxml_build_works=yes ++ AC_MSG_RESULT(yes) ++ ], [ ++ AC_MSG_RESULT(no) ++ AC_MSG_ERROR([build test failed. Please check the config.log for details.]) ++ ], [ ++ [$]$1 ++ ]) ++ ]) ++ if test "$php_cv_libxml_build_works" = "yes"; then ++ AC_DEFINE(HAVE_LIBXML, 1, [ ]) ++ fi ++ $2 ++], [ ++ AC_MSG_ERROR([$LIBXML_PKG_ERRORS]) + ]) + +- if test -x "$ac_cv_php_xml2_config_path"; then +- XML2_CONFIG="$ac_cv_php_xml2_config_path" +- libxml_full_version=`$XML2_CONFIG --version` +- ac_IFS=$IFS +- IFS="." +- set $libxml_full_version +- IFS=$ac_IFS +- LIBXML_VERSION=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3` +- if test "$LIBXML_VERSION" -ge "2006011"; then +- LIBXML_LIBS=`$XML2_CONFIG --libs` +- LIBXML_INCS=`$XML2_CONFIG --cflags` +- PHP_EVAL_LIBLINE($LIBXML_LIBS, $1) +- PHP_EVAL_INCLINE($LIBXML_INCS) +- +- dnl Check that build works with given libs +- AC_CACHE_CHECK(whether libxml build works, php_cv_libxml_build_works, [ +- PHP_TEST_BUILD(xmlInitParser, +- [ +- php_cv_libxml_build_works=yes +- ], [ +- AC_MSG_RESULT(no) +- AC_MSG_ERROR([build test failed. Please check the config.log for details.]) +- ], [ +- [$]$1 +- ]) +- ]) +- if test "$php_cv_libxml_build_works" = "yes"; then +- AC_DEFINE(HAVE_LIBXML, 1, [ ]) +- fi +- $2 +- else +- AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.]) +- fi +-ifelse([$3],[],,[else $3]) +- fi + ]) + + dnl ------------------------------------------------------------------------- +-- +1.9.3 + diff --git a/meta-oe/recipes-devtools/php/php_5.4.14.bb b/meta-oe/recipes-devtools/php/php_5.4.14.bb index 4e0efb1..3c9d3c0 100644 --- a/meta-oe/recipes-devtools/php/php_5.4.14.bb +++ b/meta-oe/recipes-devtools/php/php_5.4.14.bb @@ -5,7 +5,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=cb564efdf78cce8ea6e4b5a4f7c05d97" PR = "${INC_PR}.0" SRC_URI += "file://acinclude-xml2-config.patch \ - file://0001-php-don-t-use-broken-wrapper-for-mkdir.patch" + file://0001-php-don-t-use-broken-wrapper-for-mkdir.patch \ + file://0001-acinclude-use-pkgconfig-for-libxml2-config.patch \ + " SRC_URI_append_pn-php += "file://iconv.patch \ file://imap-fix-autofoo.patch \