diff options
| author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2012-07-17 11:31:54 +0100 |
|---|---|---|
| committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2012-10-03 14:36:40 +0100 |
| commit | 418650c55d05724af398dc5fe1185b47bf788135 (patch) | |
| tree | 91df4cc563705266a7d590d38ac4dbd376114f84 /meta-webserver/recipes-php/modphp/modphp5.inc | |
| parent | 25ba859ab6ca18fb0391802a39300c408ab13420 (diff) | |
| download | meta-openembedded-418650c55d05724af398dc5fe1185b47bf788135.tar.gz | |
modphp: add from OE-Classic, update to 5.3.14 and fix
* Use working SRC_URI
* Fix to use correct headers and apxs script for cross-compiling
* Enable threading
* Install headers and scripts for building extension modules
* Use proper variables instead of /etc, /usr/lib etc.
* Fix rpath QA issues
* Add LIC_FILES_CHKSUM
* Put apache config file into SRC_URI instead of referring to it using
FILESDIR
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'meta-webserver/recipes-php/modphp/modphp5.inc')
| -rw-r--r-- | meta-webserver/recipes-php/modphp/modphp5.inc | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/meta-webserver/recipes-php/modphp/modphp5.inc b/meta-webserver/recipes-php/modphp/modphp5.inc new file mode 100644 index 0000000000..82b5ce1a64 --- /dev/null +++ b/meta-webserver/recipes-php/modphp/modphp5.inc | |||
| @@ -0,0 +1,90 @@ | |||
| 1 | SECTION = "console/network" | ||
| 2 | DESCRIPTION = "A server-side, HTML-embedded scripting language. This package provides the apache php module." | ||
| 3 | LICENSE = "PHP" | ||
| 4 | DEPENDS = "apache2-native apache2 zlib" | ||
| 5 | |||
| 6 | SRC_URI = "http://www.php.net/distributions/php-${PV}.tar.bz2 \ | ||
| 7 | file://configure.patch \ | ||
| 8 | file://pthread-check.patch \ | ||
| 9 | file://70_mod_php5.conf \ | ||
| 10 | " | ||
| 11 | |||
| 12 | S = "${WORKDIR}/php-${PV}" | ||
| 13 | |||
| 14 | LIC_FILES_CHKSUM = "file://LICENSE;md5=cb564efdf78cce8ea6e4b5a4f7c05d97" | ||
| 15 | |||
| 16 | inherit autotools | ||
| 17 | |||
| 18 | CFLAGS += " -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I${STAGING_INCDIR}/apache2" | ||
| 19 | |||
| 20 | EXTRA_OECONF = "--with-apxs2=${STAGING_BINDIR_CROSS}/apxs \ | ||
| 21 | --enable-maintainer-zts \ | ||
| 22 | --without-mysql \ | ||
| 23 | --enable-force-cgi-redirect \ | ||
| 24 | --disable-cgi \ | ||
| 25 | --disable-cli \ | ||
| 26 | --disable-pdo \ | ||
| 27 | --without-pear \ | ||
| 28 | --without-iconv \ | ||
| 29 | --disable-ipv6 \ | ||
| 30 | --disable-xml \ | ||
| 31 | --disable-xmlreader \ | ||
| 32 | --disable-xmlwriter \ | ||
| 33 | --disable-simplexml \ | ||
| 34 | --disable-libxml \ | ||
| 35 | --disable-dom \ | ||
| 36 | --disable-rpath \ | ||
| 37 | --libdir=${libdir}/php5 \ | ||
| 38 | --with-zlib --with-zlib-dir=${STAGING_DIR_TARGET}${exec_prefix} \ | ||
| 39 | --with-config-file-path=${sysconfdir}/php/apache2-php5" | ||
| 40 | |||
| 41 | # to get postgres support, add it to the DEPENDS above | ||
| 42 | # and uncomment this line. similar for mysql | ||
| 43 | #EXTRA_OECONF += " --with-pgsql=${STAGING_DIR_HOST}${layout_exec_prefix}" | ||
| 44 | |||
| 45 | acpaths = "" | ||
| 46 | |||
| 47 | # | ||
| 48 | # override the autotools do_configure, which runs autoconf, | ||
| 49 | # which breaks everything... | ||
| 50 | # | ||
| 51 | do_configure() { | ||
| 52 | find . -name config.m4 -o -name configure | xargs -n1 sed -i 's!APXS_HTTPD=.*!APXS_HTTPD=${STAGING_BINDIR_NATIVE}/httpd!' | ||
| 53 | export PHP_LIBXML_DIR=${STAGING_DIR_NATIVE}${layout_exec_prefix} | ||
| 54 | oe_runconf | ||
| 55 | } | ||
| 56 | |||
| 57 | do_install () { | ||
| 58 | install -d ${D}${libdir}/apache2/modules | ||
| 59 | install -d ${D}${sysconfdir}/apache2/modules.d | ||
| 60 | install -d ${D}${sysconfdir}/php/apache2-php5 | ||
| 61 | install -m 755 libs/libphp5.so ${D}${libdir}/apache2/modules | ||
| 62 | install -m 644 ${WORKDIR}/70_mod_php5.conf ${D}${sysconfdir}/apache2/modules.d | ||
| 63 | cat ${S}/php.ini-dist | \ | ||
| 64 | sed -e 's,extension_dir = \"\./\",extension_dir = \"/usr/lib/extensions\",' \ | ||
| 65 | > ${D}${sysconfdir}/php/apache2-php5/php.ini | ||
| 66 | |||
| 67 | install -d ${D}${bindir} | ||
| 68 | install -m 755 scripts/phpize ${D}${bindir} | ||
| 69 | install -m 755 scripts/php-config ${D}${bindir} | ||
| 70 | |||
| 71 | oe_runmake install-build install-headers INSTALL_ROOT=${D} | ||
| 72 | } | ||
| 73 | |||
| 74 | SYSROOT_PREPROCESS_FUNCS += "php_sysroot_preprocess" | ||
| 75 | |||
| 76 | php_sysroot_preprocess () { | ||
| 77 | install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/ | ||
| 78 | install -m 755 ${D}${bindir}/phpize ${SYSROOT_DESTDIR}${bindir_crossscripts}/ | ||
| 79 | install -m 755 ${D}${bindir}/php-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/ | ||
| 80 | |||
| 81 | sed -i 's!eval echo /!eval echo ${STAGING_DIR_HOST}/!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/phpize | ||
| 82 | sed -i 's!^include_dir=.*!include_dir=${STAGING_INCDIR}/php!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/php-config | ||
| 83 | } | ||
| 84 | |||
| 85 | RDEPENDS_${PN} = "apache2" | ||
| 86 | |||
| 87 | FILES_${PN} = "${libdir}/apache2 ${sysconfdir}" | ||
| 88 | FILES_${PN}-dev += "${bindir}/phpize ${bindir}/php-config ${libdir}/php5" | ||
| 89 | FILES_${PN}-dbg += "${libdir}/apache2/modules/.debug" | ||
| 90 | |||
