From aedeaead48bede468b91811aa85bb76e05663a39 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Thu, 1 Sep 2016 14:42:57 +0200 Subject: [PATCH 1/9] php: new recipe This is a deliberately minimal recipe that disables all features that can be disabled. It builds and passes packageqa. Next, we'll add in features one by one, guarded by suitable USE flags, many of which will default to on. --- recipes/php/php.inc | 27 +++++++++++++++++++++++++++ recipes/php/php_5.5.38.oe | 1 + recipes/php/php_5.5.38.oe.sig | 1 + 3 files changed, 29 insertions(+) create mode 100644 recipes/php/php.inc create mode 100644 recipes/php/php_5.5.38.oe create mode 100644 recipes/php/php_5.5.38.oe.sig diff --git a/recipes/php/php.inc b/recipes/php/php.inc new file mode 100644 index 000000000..0f39329da --- /dev/null +++ b/recipes/php/php.inc @@ -0,0 +1,27 @@ +DESCRIPTION = "PHP is a popular general-purpose scripting language that is especially suited to web development." +LICENSE = "PHP-3.01" +HOMEPAGE = "http://php.net" + +COMPATIBLE_HOST_ARCHS = ".*linux" +RECIPE_TYPES = "native machine" + +inherit autotools c c++ pkgconfig + +SRC_URI = "http://in1.php.net/distributions/php-${PV}.tar.xz" + +PHP_LIBDIR = "${libdir}/php5" + +DEPENDS += "libc libm libcrypt" +DEPENDS_${PN} += "libc libm libcrypt" +RDEPENDS_${PN} += "libc libm libcrypt" + + +EXTRA_OECONF = " \ + --libdir=${PHP_LIBDIR} \ + --with-libdir=${base_libdir} \ + --disable-all \ +" + +EXTRA_OEMAKE = "INSTALL_ROOT=${D}" + +FILES_${PN}-dev += "${PHP_LIBDIR}/build" diff --git a/recipes/php/php_5.5.38.oe b/recipes/php/php_5.5.38.oe new file mode 100644 index 000000000..bd5441968 --- /dev/null +++ b/recipes/php/php_5.5.38.oe @@ -0,0 +1 @@ +require ${PN}.inc diff --git a/recipes/php/php_5.5.38.oe.sig b/recipes/php/php_5.5.38.oe.sig new file mode 100644 index 000000000..b001874b2 --- /dev/null +++ b/recipes/php/php_5.5.38.oe.sig @@ -0,0 +1 @@ +bc037253dab2b1ee51f8e7584bf3a6691b418c1e php-5.5.38.tar.xz From 7f85a70a1fe26782c4ac2b121127a4c735338566 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Thu, 1 Sep 2016 15:09:42 +0200 Subject: [PATCH 2/9] php: add openssl use flag, default on --- recipes/php/php.inc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/recipes/php/php.inc b/recipes/php/php.inc index 0f39329da..30f5d0d85 100644 --- a/recipes/php/php.inc +++ b/recipes/php/php.inc @@ -25,3 +25,14 @@ EXTRA_OECONF = " \ EXTRA_OEMAKE = "INSTALL_ROOT=${D}" FILES_${PN}-dev += "${PHP_LIBDIR}/build" + +RECIPE_FLAGS += "php_ssl" +DEFAULT_USE_php_ssl = True +EXTRA_OECONF_SSL = "--without-openssl" +EXTRA_OECONF_SSL:USE_php_ssl = "--with-openssl" +EXTRA_OECONF += "${EXTRA_OECONF_SSL}" +DEPENDS_SSL = "" +DEPENDS_SSL:USE_php_ssl = "libssl libcrypto" +DEPENDS += "${DEPENDS_SSL}" +DEPENDS_${PN} += "${DEPENDS_SSL}" +RDEPENDS_${PN} += "${DEPENDS_SSL}" From 9ef0ef014dccb068572a0897823cb1b785868d03 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Thu, 1 Sep 2016 15:17:15 +0200 Subject: [PATCH 3/9] php: add use flag for socket support, default on --- recipes/php/php.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/recipes/php/php.inc b/recipes/php/php.inc index 30f5d0d85..75e198dce 100644 --- a/recipes/php/php.inc +++ b/recipes/php/php.inc @@ -36,3 +36,9 @@ DEPENDS_SSL:USE_php_ssl = "libssl libcrypto" DEPENDS += "${DEPENDS_SSL}" DEPENDS_${PN} += "${DEPENDS_SSL}" RDEPENDS_${PN} += "${DEPENDS_SSL}" + +RECIPE_FLAGS += "php_sockets" +DEFAULT_USE_php_sockets = True +EXTRA_OECONF_SOCKETS = "--disable-sockets" +EXTRA_OECONF_SOCKETS:USE_php_sockets = "--enable-sockets" +EXTRA_OECONF += "${EXTRA_OECONF_SOCKETS}" From 2fb69506e29fbb01e3179037c1111da67e025315 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Thu, 1 Sep 2016 15:17:34 +0200 Subject: [PATCH 4/9] php: add use flag for session support, default on --- recipes/php/php.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/recipes/php/php.inc b/recipes/php/php.inc index 75e198dce..162d9e893 100644 --- a/recipes/php/php.inc +++ b/recipes/php/php.inc @@ -42,3 +42,9 @@ DEFAULT_USE_php_sockets = True EXTRA_OECONF_SOCKETS = "--disable-sockets" EXTRA_OECONF_SOCKETS:USE_php_sockets = "--enable-sockets" EXTRA_OECONF += "${EXTRA_OECONF_SOCKETS}" + +RECIPE_FLAGS += "php_session" +DEFAULT_USE_php_session = True +EXTRA_OECONF_SESSION = "--disable-session" +EXTRA_OECONF_SESSION:USE_php_session = "--enable-session" +EXTRA_OECONF += "${EXTRA_OECONF_SESSION}" From a2c86f84992d7c09862bd8f4c1ff13a91eb5c22d Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Thu, 1 Sep 2016 15:27:13 +0200 Subject: [PATCH 5/9] php: enable json support This doesn't come with any extra external dependencies, so might as well be enabled unconditionally. --- recipes/php/php.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/php/php.inc b/recipes/php/php.inc index 162d9e893..f4186c881 100644 --- a/recipes/php/php.inc +++ b/recipes/php/php.inc @@ -20,6 +20,7 @@ EXTRA_OECONF = " \ --libdir=${PHP_LIBDIR} \ --with-libdir=${base_libdir} \ --disable-all \ + --enable-json \ " EXTRA_OEMAKE = "INSTALL_ROOT=${D}" From 4920989960bdef7fe67d70c852e8dadfd8b8a776 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Thu, 1 Sep 2016 15:55:59 +0200 Subject: [PATCH 6/9] php: use system pcre by default php comes bundled with a copy of pcre, but in the interest of keeping the rootfs small and allowing use of a newer pcre without messing the php recipe, create a use flag that allows us to use the system's version. --- recipes/php/php.inc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/recipes/php/php.inc b/recipes/php/php.inc index f4186c881..6934b3059 100644 --- a/recipes/php/php.inc +++ b/recipes/php/php.inc @@ -49,3 +49,14 @@ DEFAULT_USE_php_session = True EXTRA_OECONF_SESSION = "--disable-session" EXTRA_OECONF_SESSION:USE_php_session = "--enable-session" EXTRA_OECONF += "${EXTRA_OECONF_SESSION}" + +RECIPE_FLAGS += "php_system_pcre" +DEFAULT_USE_php_system_pcre = True +EXTRA_OECONF_SYSTEM_PCRE = "" +EXTRA_OECONF_SYSTEM_PCRE:USE_php_system_pcre = "--with-pcre-regex=${TARGET_SYSROOT}${target_prefix}" +EXTRA_OECONF += "${EXTRA_OECONF_SYSTEM_PCRE}" +DEPENDS_SYSTEM_PCRE = "" +DEPENDS_SYSTEM_PCRE:USE_php_system_pcre = "libpcre" +DEPENDS += "${DEPENDS_SYSTEM_PCRE}" +DEPENDS_${PN} += "${DEPENDS_SYSTEM_PCRE}" +RDEPENDS_${PN} += "${DEPENDS_SYSTEM_PCRE}" From 4506e2ae0b218ada4d0e9ff16539f08ad7cd2813 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Thu, 1 Sep 2016 16:12:36 +0200 Subject: [PATCH 7/9] php: add zlib support --- recipes/php/php.inc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/recipes/php/php.inc b/recipes/php/php.inc index 6934b3059..767624b46 100644 --- a/recipes/php/php.inc +++ b/recipes/php/php.inc @@ -60,3 +60,14 @@ DEPENDS_SYSTEM_PCRE:USE_php_system_pcre = "libpcre" DEPENDS += "${DEPENDS_SYSTEM_PCRE}" DEPENDS_${PN} += "${DEPENDS_SYSTEM_PCRE}" RDEPENDS_${PN} += "${DEPENDS_SYSTEM_PCRE}" + +RECIPE_FLAGS += "php_zlib" +DEFAULT_USE_php_zlib = True +EXTRA_OECONF_ZLIB = "" +EXTRA_OECONF_ZLIB:USE_php_zlib = "--with-zlib=${TARGET_SYSROOT}${target_prefix}" +EXTRA_OECONF += "${EXTRA_OECONF_ZLIB}" +DEPENDS_ZLIB = "" +DEPENDS_ZLIB:USE_php_zlib = "libz" +DEPENDS += "${DEPENDS_ZLIB}" +DEPENDS_${PN} += "${DEPENDS_ZLIB}" +RDEPENDS_${PN} += "${DEPENDS_ZLIB}" From 088e12f6a3c3ff39647dbf1bd8123f6080d14fb8 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Thu, 1 Sep 2016 16:19:42 +0200 Subject: [PATCH 8/9] php: enable calendar functions This extension has no external dependencies and is rather lightweight, so enable it by default. --- recipes/php/php.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/php/php.inc b/recipes/php/php.inc index 767624b46..26b1c5e28 100644 --- a/recipes/php/php.inc +++ b/recipes/php/php.inc @@ -21,6 +21,7 @@ EXTRA_OECONF = " \ --with-libdir=${base_libdir} \ --disable-all \ --enable-json \ + --enable-calendar \ " EXTRA_OEMAKE = "INSTALL_ROOT=${D}" From 86b793afefa1bc8216ab037196d6c146983733ea Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Fri, 2 Sep 2016 12:37:12 +0200 Subject: [PATCH 9/9] php: add xml use flag --- recipes/php/php.inc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/recipes/php/php.inc b/recipes/php/php.inc index 26b1c5e28..b37a1fa95 100644 --- a/recipes/php/php.inc +++ b/recipes/php/php.inc @@ -72,3 +72,14 @@ DEPENDS_ZLIB:USE_php_zlib = "libz" DEPENDS += "${DEPENDS_ZLIB}" DEPENDS_${PN} += "${DEPENDS_ZLIB}" RDEPENDS_${PN} += "${DEPENDS_ZLIB}" + +RECIPE_FLAGS += "php_xml" +DEFAULT_USE_php_xml = True +EXTRA_OECONF_XML = "" +EXTRA_OECONF_XML:USE_php_xml = "--enable-libxml --with-libxml-dir=${TARGET_SYSROOT}${target_prefix}" +EXTRA_OECONF += "${EXTRA_OECONF_XML}" +DEPENDS_XML = "" +DEPENDS_XML:USE_php_xml = "libxml2" +DEPENDS += "${DEPENDS_XML}" +DEPENDS_${PN} += "${DEPENDS_XML}" +RDEPENDS_${PN} += "${DEPENDS_XML}"