Patchwork [meta-oe] php: add sqlite3 and mysql PACKAGECONFIG options

login
register
mail settings
Submitter ml@communistcode.co.uk
Date April 17, 2013, 2:10 p.m.
Message ID <1366207839-3620-2-git-send-email-ml@communistcode.co.uk>
Download mbox | patch
Permalink /patch/48443/
State Superseded
Headers show

Comments

ml@communistcode.co.uk - April 17, 2013, 2:10 p.m.
From: Jack Mitchell <jack.mitchell@dbbroadcast.co.uk>

Signed-off-by: Jack Mitchell <jack.mitchell@dbbroadcast.co.uk>
---
 meta-oe/recipes-devtools/php/php.inc | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

Patch

diff --git a/meta-oe/recipes-devtools/php/php.inc b/meta-oe/recipes-devtools/php/php.inc
index 225c3d7..39ddc33 100644
--- a/meta-oe/recipes-devtools/php/php.inc
+++ b/meta-oe/recipes-devtools/php/php.inc
@@ -3,11 +3,11 @@  HOMEPAGE = "http://www.php.net"
 SECTION = "console/network"
 LICENSE = "PHP-3.0"
 BBCLASSEXTEND = "native"
-DEPENDS = "zlib libxml2 virtual/libiconv php-native lemon-native mysql5 \
+DEPENDS = "zlib libxml2 virtual/libiconv php-native lemon-native \
            libc-client openssl sqlite3"
 DEPENDS_virtclass-native = "zlib-native libxml2-native"
 
-INC_PR = "r4"
+INC_PR = "r5"
 
 SRC_URI = "http://www.php.net/distributions/php-${PV}.tar.bz2"
 
@@ -27,12 +27,7 @@  EXTRA_OECONF = "--enable-mbstring --enable-discard-path --enable-wddx \
                 --with-zlib --with-zlib-dir=${STAGING_LIBDIR}/.. \
                 --with-iconv=${STAGING_LIBDIR}/.. \
                 --with-libxml-dir=${STAGING_BINDIR_CROSS} \
-                --disable-embedded-mysqli \
-                --with-mysql="${STAGING_DIR_TARGET}${prefix}" \
-                --with-mysqli="${STAGING_BINDIR_CROSS}/mysql_config" \
-        --with-sqlite3=${STAGING_LIBDIR}/.. --enable-sqlite-utf8 \
-                --with-pdo-mysql="${STAGING_BINDIR_CROSS}/mysql_config" \
-                --with-pdo-sqlite=${STAGING_LIBDIR}/.. ${COMMON_EXTRA_OECONF} \
+                ${COMMON_EXTRA_OECONF} \
 "
 EXTRA_OECONF_virtclass-native = "--with-cgi --without-libpng --without-libjpeg \
                 --with-zlib --with-zlib-dir=${STAGING_LIBDIR_NATIVE}/.. \
@@ -40,6 +35,21 @@  EXTRA_OECONF_virtclass-native = "--with-cgi --without-libpng --without-libjpeg \
                 ${COMMON_EXTRA_OECONF} \
 "
 
+PACKAGECONFIG ??= "mysql sqlite3"
+
+PACKAGECONFIG[mysql] = "--with-mysql=\"${STAGING_DIR_TARGET}${prefix}\" \
+                        --with-mysqli=\"${STAGING_BINDIR_CROSS}/mysql_config\" \
+                        --with-pdo-mysql=\"${STAGING_BINDIR_CROSS}/mysql_config\" \
+                        --disable-embedded-mysqli \
+                        , \
+                        ,mysql5"
+
+PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_LIBDIR}/.. \
+                        --enable-sqlite-utf8 \
+                        --with-pdo-sqlite=${STAGING_LIBDIR}/.. \
+                        , \
+                        ,sqlite3"
+
 LIBS_virtclass-native = " -lxml2 "
 LIBS_pn-php =" -lpthread "
 export LIBS