From patchwork Mon Oct 6 09:54:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Koen Kooi X-Patchwork-Id: 38359 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7080720350 for ; Mon, 6 Oct 2014 09:56:43 +0000 (UTC) Received: by mail-wg0-f71.google.com with SMTP id y10sf2537290wgg.2 for ; Mon, 06 Oct 2014 02:56:42 -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=T+2XPPXAyUwvbUyjP1XnIcaNzEE0HPL0IVgsfT2/5Jc=; b=AD32efv7qKPRsUDlTtEpaQVVoTQ7sA/AccLpOz2cuJNj4HErchRU0nKmQ4vOEavTQX KxzgsZrjE32o1PhayOGsEdiL0y94XIZ55eJXlnrCFpMkcAwekO091zFJ0j4EcZT8N0GW hzIS0DqaTWfgAj6H4x1jMrj6VxEuEJ1z8tmBhtYeESl//fW96O93W8O7hAbOjSZW/ysa OggJ85W3xAH0XhjB1HdUQRymtJRqwVbEV7U+wkPZZggIOyaaCdyXsN7bJFjjbeMkbDzr sjuABF5mn7kbpegZtfx7h7WbUk3/yDZ+DdVz6+GOZG1z/W5fK/mntfu2EBwajacjWI/V /CHQ== X-Gm-Message-State: ALoCoQncrJ2ixutgMGjknxehUucVGlD8kyv8Wg+cyXMuWQloqt8ZxbDHg4rqudKoPfa/TkKVHE+l X-Received: by 10.194.57.237 with SMTP id l13mr3235wjq.7.1412589402593; Mon, 06 Oct 2014 02:56:42 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.66 with SMTP id o2ls565692laj.8.gmail; Mon, 06 Oct 2014 02:56:42 -0700 (PDT) X-Received: by 10.152.6.40 with SMTP id x8mr23587261lax.18.1412589402359; Mon, 06 Oct 2014 02:56:42 -0700 (PDT) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx.google.com with ESMTPS id qy3si23233730lbb.3.2014.10.06.02.56.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 06 Oct 2014 02:56:42 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by mail-la0-f54.google.com with SMTP id gm9so3927049lab.41 for ; Mon, 06 Oct 2014 02:56:42 -0700 (PDT) X-Received: by 10.152.204.231 with SMTP id lb7mr23761404lac.44.1412589402135; Mon, 06 Oct 2014 02:56:42 -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.112.130.169 with SMTP id of9csp154303lbb; Mon, 6 Oct 2014 02:56:41 -0700 (PDT) X-Received: by 10.70.96.74 with SMTP id dq10mr191867pdb.165.1412589400076; Mon, 06 Oct 2014 02:56:40 -0700 (PDT) Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id f8si10271957pdj.126.2014.10.06.02.56.39 for ; Mon, 06 Oct 2014 02:56:40 -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 659D5717C1; Mon, 6 Oct 2014 09:56:37 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-wg0-f44.google.com (mail-wg0-f44.google.com [74.125.82.44]) by mail.openembedded.org (Postfix) with ESMTP id DA5AB601A8 for ; Mon, 6 Oct 2014 09:55:13 +0000 (UTC) Received: by mail-wg0-f44.google.com with SMTP id y10so6029312wgg.27 for ; Mon, 06 Oct 2014 02:55:14 -0700 (PDT) X-Received: by 10.180.84.98 with SMTP id x2mr18023918wiy.18.1412589314289; Mon, 06 Oct 2014 02:55:14 -0700 (PDT) Received: from localhost ([2001:610:612:0:2ad2:44ff:fe4b:bc17]) by mx.google.com with ESMTPSA id q2sm10758030wiy.23.2014.10.06.02.55.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Oct 2014 02:55:13 -0700 (PDT) From: Koen Kooi To: openembedded-devel@lists.openembedded.org Date: Mon, 6 Oct 2014 11:54:59 +0200 Message-Id: <1412589301-6669-1-git-send-email-koen.kooi@linaro.org> X-Mailer: git-send-email 1.9.3 Cc: Koen Kooi Subject: [oe] [meta-oe][PATCH 1/3] php 5.4.14: merge .inc and .bb 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.215.54 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 There's only one version of the recipe in the repo and the split makes it harder to debug and fix problems. Also fix target overrides and style issues. Signed-off-by: Koen Kooi --- meta-oe/recipes-devtools/php/php.inc | 132 -------------------------- meta-oe/recipes-devtools/php/php_5.4.14.bb | 146 +++++++++++++++++++++++++++-- 2 files changed, 138 insertions(+), 140 deletions(-) delete mode 100644 meta-oe/recipes-devtools/php/php.inc diff --git a/meta-oe/recipes-devtools/php/php.inc b/meta-oe/recipes-devtools/php/php.inc deleted file mode 100644 index 6bdae78..0000000 --- a/meta-oe/recipes-devtools/php/php.inc +++ /dev/null @@ -1,132 +0,0 @@ -DESCRIPTION = "A server-side, HTML-embedded scripting language. This package provides the CGI." -HOMEPAGE = "http://www.php.net" -SECTION = "console/network" -LICENSE = "PHP-3.0" -BBCLASSEXTEND = "native" -DEPENDS = "zlib libxml2 virtual/libiconv php-native lemon-native \ - libc-client openssl" -DEPENDS_virtclass-native = "zlib-native libxml2-native" - -INC_PR = "r5" - -# The new PHP downloads server groups PHP releases by major version so find -# the major version of the PHP recipe. -PHP_MAJVER = "${@d.getVar('PV',1).split('.')[0]}" - -SRC_URI = "http://museum.php.net/php${PHP_MAJVER}/php-${PV}.tar.bz2" - -S = "${WORKDIR}/php-${PV}" - -inherit autotools pkgconfig pythonnative gettext - -SSTATE_SCAN_FILES += "build-defs.h" - -# Common EXTRA_OECONF -COMMON_EXTRA_OECONF = "--enable-sockets --enable-pcntl --enable-shared" -EXTRA_OECONF = "--enable-mbstring \ - --enable-wddx \ - --enable-fpm \ - --with-imap=${STAGING_DIR_HOST} \ - --with-gettext=${STAGING_LIBDIR}/.. \ - --with-imap-ssl=${STAGING_DIR_HOST} \ - --with-zlib=${STAGING_LIBDIR}/.. \ - --with-iconv=${STAGING_LIBDIR}/.. \ - ${COMMON_EXTRA_OECONF} \ -" -EXTRA_OECONF_virtclass-native = " \ - --with-zlib=${STAGING_LIBDIR_NATIVE}/.. \ - --without-iconv \ - ${COMMON_EXTRA_OECONF} \ -" - -PACKAGECONFIG ??= "mysql sqlite3" -PACKAGECONFIG_class-native = "" - -PACKAGECONFIG[mysql] = "--with-mysql=${STAGING_DIR_TARGET}${prefix} \ - --with-mysqli=${STAGING_BINDIR_CROSS}/mysql_config \ - --with-pdo-mysql=${STAGING_BINDIR_CROSS}/mysql_config \ - , \ - ,mysql5" - -PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_LIBDIR}/.. \ - --with-pdo-sqlite=${STAGING_LIBDIR}/.. \ - , \ - ,sqlite3" - -export PHP_NATIVE_DIR = "${STAGING_BINDIR_NATIVE}" -export PHP_PEAR_PHP_BIN = "${STAGING_BINDIR_NATIVE}/php" -CFLAGS += " -D_GNU_SOURCE" - -EXTRA_OEMAKE = "INSTALL_ROOT=${D}" - -acpaths = "" - -do_install_append_pn-php-native() { - rm -rf ${D}/${libdir}/php/.registry - rm -rf ${D}/${libdir}/php/.channels - rm -rf ${D}/${libdir}/php/.[a-z]* -} - -# fixme -do_install_append_pn-php() { - install -d ${D}/${sysconfdir}/ - if [ -d ${D}/${STAGING_DIR_NATIVE}/${sysconfdir} ];then - mv ${D}/${STAGING_DIR_NATIVE}/${sysconfdir}/* ${D}/${sysconfdir}/ - fi - rm -rf ${D}/${TMPDIR} - rm -rf ${D}/.registry - rm -rf ${D}/.channels - rm -rf ${D}/.[a-z]* - rm -rf ${D}/var - rm -f ${D}/${sysconfdir}/php-fpm.conf.default - sed -i 's:${STAGING_DIR_NATIVE}::g' ${D}/${sysconfdir}/pear.conf - install -m 0644 ${WORKDIR}/php-fpm.conf ${D}/${sysconfdir}/php-fpm.conf - install -d ${D}/${sysconfdir}/apache2/conf.d - install -m 0644 ${WORKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf - install -d ${D}${sysconfdir}/init.d - sed -i 's:=/usr/sbin:=${sbindir}:g' ${B}/sapi/fpm/init.d.php-fpm - sed -i 's:=/etc:=${sysconfdir}:g' ${B}/sapi/fpm/init.d.php-fpm - sed -i 's:=/var:=${localstatedir}:g' ${B}/sapi/fpm/init.d.php-fpm - install -m 0755 ${B}/sapi/fpm/init.d.php-fpm ${D}${sysconfdir}/init.d/php-fpm - TMP=`dirname ${D}/${TMPDIR}` - while test ${TMP} != ${D}; do - rmdir ${TMP} - TMP=`dirname ${TMP}`; - done -} - -PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-cgi ${PN}-fpm ${PN}-fpm-apache2 ${PN}-pear ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}" - -RDEPENDS_${PN}-pear = "${PN}" -RDEPENDS_${PN}-cli = "${PN}" -RDEPENDS_${PN}-dev = "${PN}" - -INITSCRIPT_PACKAGES = "${PN}-fpm" -inherit update-rc.d - -FILES_${PN}-dbg =+ "${bindir}/.debug" -FILES_${PN}-doc += "${libdir}/php/doc" -FILES_${PN}-cli = "${bindir}/php" -FILES_${PN}-cgi = "${bindir}/php-cgi" -FILES_${PN}-fpm = "${sbindir}/php-fpm ${sysconfdir}/php-fpm.conf ${datadir}/fpm ${sysconfdir}/init.d/php-fpm" -FILES_${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf" -CONFFILES_${PN}-fpm = "${sysconfdir}/php-fpm.conf" -CONFFILES_${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf" -INITSCRIPT_NAME_${PN}-fpm = "php-fpm" -INITSCRIPT_PARAMS_${PN}-fpm = "defaults 60" -FILES_${PN}-pear = "${bindir}/pear* ${bindir}/pecl ${libdir}/php/PEAR \ - ${libdir}/php/PEAR.php ${libdir}/php/System.php \ - ${libdir}php/peclcmd.php ${libdir}/php/pearcmd.php \ - ${libdir}/php/.channels ${libdir}/php/.channels/.alias \ - ${libdir}/php/.channels\__uri.reg \ - ${libdir}/php/.channels\pear.php.net.reg \ - ${libdir}/php/.channels/pecl.php.net.reg \ - ${libdir}/php/.registry ${libdir}/php/Archive/Tar.php \ - ${libdir}/php/Console/Getopt.php ${libdir}/php/OS/Guess.php \ - ${sysconfdir}/pear.conf" -FILES_${PN}-dev = "${includedir}/php ${libdir}/build ${bindir}/phpize \ - ${bindir}/php-config ${libdir}/php/.depdb \ - ${libdir}/php/.depdblock ${libdir}/php/.filemap \ - ${libdir}/php/.lock ${libdir}/php/test" -FILES_${PN} = "${libdir}/php" -FILES_${PN} += "${bindir}" 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 3c9d3c0..98a8cdc 100644 --- a/meta-oe/recipes-devtools/php/php_5.4.14.bb +++ b/meta-oe/recipes-devtools/php/php_5.4.14.bb @@ -1,15 +1,29 @@ -require php.inc +DESCRIPTION = "A server-side, HTML-embedded scripting language. This package provides the CGI." +HOMEPAGE = "http://www.php.net" +SECTION = "console/network" +LICENSE = "PHP-3.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=cb564efdf78cce8ea6e4b5a4f7c05d97" -PR = "${INC_PR}.0" +BBCLASSEXTEND = "native" +DEPENDS = "zlib libxml2 virtual/libiconv php-native lemon-native \ + libc-client openssl" +DEPENDS_virtclass-native = "zlib-native libxml2-native" -SRC_URI += "file://acinclude-xml2-config.patch \ - file://0001-php-don-t-use-broken-wrapper-for-mkdir.patch \ - file://0001-acinclude-use-pkgconfig-for-libxml2-config.patch \ - " +PR = "r6" -SRC_URI_append_pn-php += "file://iconv.patch \ +# The new PHP downloads server groups PHP releases by major version so find +# the major version of the PHP recipe. +PHP_MAJVER = "${@d.getVar('PV',1).split('.')[0]}" + +SRC_URI = "http://museum.php.net/php${PHP_MAJVER}/php-${PV}.tar.bz2 \ + file://acinclude-xml2-config.patch \ + file://0001-php-don-t-use-broken-wrapper-for-mkdir.patch \ + file://0001-acinclude-use-pkgconfig-for-libxml2-config.patch \ + " + +SRC_URI_append_class-target += " \ + file://iconv.patch \ file://imap-fix-autofoo.patch \ file://pear-makefile.patch \ file://phar-makefile.patch \ @@ -17,7 +31,123 @@ SRC_URI_append_pn-php += "file://iconv.patch \ file://fix-fpm-cross-compile.patch \ file://php-fpm.conf \ file://php-fpm-apache.conf \ -" + " SRC_URI[md5sum] = "cfdc044be2c582991a1fe0967898fa38" SRC_URI[sha256sum] = "5450f3843bc651eb3fb00601f0cce1930aaaf65c7c966c02fe4a46f9c81be20a" + +S = "${WORKDIR}/php-${PV}" + +inherit autotools pkgconfig pythonnative gettext + +SSTATE_SCAN_FILES += "build-defs.h" + +# Common EXTRA_OECONF +COMMON_EXTRA_OECONF = "--enable-sockets --enable-pcntl --enable-shared" +EXTRA_OECONF = "--enable-mbstring \ + --enable-wddx \ + --enable-fpm \ + --with-imap=${STAGING_DIR_HOST} \ + --with-gettext=${STAGING_LIBDIR}/.. \ + --with-imap-ssl=${STAGING_DIR_HOST} \ + --with-zlib=${STAGING_LIBDIR}/.. \ + --with-iconv=${STAGING_LIBDIR}/.. \ + ${COMMON_EXTRA_OECONF} \ +" +EXTRA_OECONF_virtclass-native = " \ + --with-zlib=${STAGING_LIBDIR_NATIVE}/.. \ + --without-iconv \ + ${COMMON_EXTRA_OECONF} \ +" + +PACKAGECONFIG ??= "mysql sqlite3" +PACKAGECONFIG_class-native = "" + +PACKAGECONFIG[mysql] = "--with-mysql=${STAGING_DIR_TARGET}${prefix} \ + --with-mysqli=${STAGING_BINDIR_CROSS}/mysql_config \ + --with-pdo-mysql=${STAGING_BINDIR_CROSS}/mysql_config \ + , \ + ,mysql5" + +PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_LIBDIR}/.. \ + --with-pdo-sqlite=${STAGING_LIBDIR}/.. \ + , \ + ,sqlite3" + +export PHP_NATIVE_DIR = "${STAGING_BINDIR_NATIVE}" +export PHP_PEAR_PHP_BIN = "${STAGING_BINDIR_NATIVE}/php" +CFLAGS += " -D_GNU_SOURCE" + +EXTRA_OEMAKE = "INSTALL_ROOT=${D}" + +acpaths = "" + +do_install_append_class-native() { + rm -rf ${D}/${libdir}/php/.registry + rm -rf ${D}/${libdir}/php/.channels + rm -rf ${D}/${libdir}/php/.[a-z]* +} + +# fixme +do_install_append_class-target() { + install -d ${D}/${sysconfdir}/ + if [ -d ${D}/${STAGING_DIR_NATIVE}/${sysconfdir} ];then + mv ${D}/${STAGING_DIR_NATIVE}/${sysconfdir}/* ${D}/${sysconfdir}/ + fi + rm -rf ${D}/${TMPDIR} + rm -rf ${D}/.registry + rm -rf ${D}/.channels + rm -rf ${D}/.[a-z]* + rm -rf ${D}/var + rm -f ${D}/${sysconfdir}/php-fpm.conf.default + sed -i 's:${STAGING_DIR_NATIVE}::g' ${D}/${sysconfdir}/pear.conf + install -m 0644 ${WORKDIR}/php-fpm.conf ${D}/${sysconfdir}/php-fpm.conf + install -d ${D}/${sysconfdir}/apache2/conf.d + install -m 0644 ${WORKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf + install -d ${D}${sysconfdir}/init.d + sed -i 's:=/usr/sbin:=${sbindir}:g' ${B}/sapi/fpm/init.d.php-fpm + sed -i 's:=/etc:=${sysconfdir}:g' ${B}/sapi/fpm/init.d.php-fpm + sed -i 's:=/var:=${localstatedir}:g' ${B}/sapi/fpm/init.d.php-fpm + install -m 0755 ${B}/sapi/fpm/init.d.php-fpm ${D}${sysconfdir}/init.d/php-fpm + TMP=`dirname ${D}/${TMPDIR}` + while test ${TMP} != ${D}; do + rmdir ${TMP} + TMP=`dirname ${TMP}`; + done +} + +PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-cgi ${PN}-fpm ${PN}-fpm-apache2 ${PN}-pear ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}" + +RDEPENDS_${PN}-pear = "${PN}" +RDEPENDS_${PN}-cli = "${PN}" +RDEPENDS_${PN}-dev = "${PN}" + +INITSCRIPT_PACKAGES = "${PN}-fpm" +inherit update-rc.d + +FILES_${PN}-dbg =+ "${bindir}/.debug" +FILES_${PN}-doc += "${libdir}/php/doc" +FILES_${PN}-cli = "${bindir}/php" +FILES_${PN}-cgi = "${bindir}/php-cgi" +FILES_${PN}-fpm = "${sbindir}/php-fpm ${sysconfdir}/php-fpm.conf ${datadir}/fpm ${sysconfdir}/init.d/php-fpm" +FILES_${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf" +CONFFILES_${PN}-fpm = "${sysconfdir}/php-fpm.conf" +CONFFILES_${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf" +INITSCRIPT_NAME_${PN}-fpm = "php-fpm" +INITSCRIPT_PARAMS_${PN}-fpm = "defaults 60" +FILES_${PN}-pear = "${bindir}/pear* ${bindir}/pecl ${libdir}/php/PEAR \ + ${libdir}/php/PEAR.php ${libdir}/php/System.php \ + ${libdir}php/peclcmd.php ${libdir}/php/pearcmd.php \ + ${libdir}/php/.channels ${libdir}/php/.channels/.alias \ + ${libdir}/php/.channels\__uri.reg \ + ${libdir}/php/.channels\pear.php.net.reg \ + ${libdir}/php/.channels/pecl.php.net.reg \ + ${libdir}/php/.registry ${libdir}/php/Archive/Tar.php \ + ${libdir}/php/Console/Getopt.php ${libdir}/php/OS/Guess.php \ + ${sysconfdir}/pear.conf" +FILES_${PN}-dev = "${includedir}/php ${libdir}/build ${bindir}/phpize \ + ${bindir}/php-config ${libdir}/php/.depdb \ + ${libdir}/php/.depdblock ${libdir}/php/.filemap \ + ${libdir}/php/.lock ${libdir}/php/test" +FILES_${PN} = "${libdir}/php" +FILES_${PN} += "${bindir}"