diff options
| author | Tudor Florea <tudor.florea@enea.com> | 2015-10-08 22:51:41 +0200 |
|---|---|---|
| committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-08 22:51:41 +0200 |
| commit | 1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e (patch) | |
| tree | a21a5fc103bb3bd65ecd85ed22be5228fc54e447 /meta-oe/recipes-devtools/php/php_5.4.36.bb | |
| download | meta-openembedded-1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e.tar.gz | |
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-oe/recipes-devtools/php/php_5.4.36.bb')
| -rw-r--r-- | meta-oe/recipes-devtools/php/php_5.4.36.bb | 150 |
1 files changed, 150 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/php/php_5.4.36.bb b/meta-oe/recipes-devtools/php/php_5.4.36.bb new file mode 100644 index 0000000000..43c7736e43 --- /dev/null +++ b/meta-oe/recipes-devtools/php/php_5.4.36.bb | |||
| @@ -0,0 +1,150 @@ | |||
| 1 | DESCRIPTION = "A server-side, HTML-embedded scripting language. This package provides the CGI." | ||
| 2 | HOMEPAGE = "http://www.php.net" | ||
| 3 | SECTION = "console/network" | ||
| 4 | |||
| 5 | LICENSE = "PHP-3.0" | ||
| 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=cb564efdf78cce8ea6e4b5a4f7c05d97" | ||
| 7 | |||
| 8 | BBCLASSEXTEND = "native" | ||
| 9 | DEPENDS = "zlib libxml2 virtual/libiconv php-native lemon-native \ | ||
| 10 | libc-client openssl" | ||
| 11 | DEPENDS_virtclass-native = "zlib-native libxml2-native" | ||
| 12 | |||
| 13 | # The new PHP downloads server groups PHP releases by major version so find | ||
| 14 | # the major version of the PHP recipe. | ||
| 15 | PHP_MAJVER = "${@d.getVar('PV',1).split('.')[0]}" | ||
| 16 | |||
| 17 | SRC_URI = "http://php.net/distributions/php-${PV}.tar.bz2 \ | ||
| 18 | file://acinclude-xml2-config.patch \ | ||
| 19 | file://0001-php-don-t-use-broken-wrapper-for-mkdir.patch \ | ||
| 20 | file://0001-acinclude-use-pkgconfig-for-libxml2-config.patch \ | ||
| 21 | " | ||
| 22 | |||
| 23 | SRC_URI_append_class-target += " \ | ||
| 24 | file://iconv.patch \ | ||
| 25 | file://imap-fix-autofoo.patch \ | ||
| 26 | file://pear-makefile.patch \ | ||
| 27 | file://phar-makefile.patch \ | ||
| 28 | file://php_exec_native.patch \ | ||
| 29 | file://php-fpm.conf \ | ||
| 30 | file://php-fpm-apache.conf \ | ||
| 31 | " | ||
| 32 | |||
| 33 | SRC_URI[md5sum] = "70e223be4bb460e465b7a9d7cb5b9cac" | ||
| 34 | SRC_URI[sha256sum] = "b0951608c3e8afb978a624c7f79a889980210f5258f666c1d997bd6491e13241" | ||
| 35 | |||
| 36 | S = "${WORKDIR}/php-${PV}" | ||
| 37 | |||
| 38 | inherit autotools pkgconfig pythonnative gettext | ||
| 39 | |||
| 40 | SSTATE_SCAN_FILES += "build-defs.h" | ||
| 41 | |||
| 42 | # Common EXTRA_OECONF | ||
| 43 | COMMON_EXTRA_OECONF = "--enable-sockets --enable-pcntl --enable-shared" | ||
| 44 | EXTRA_OECONF = "--enable-mbstring \ | ||
| 45 | --enable-wddx \ | ||
| 46 | --enable-fpm \ | ||
| 47 | --with-imap=${STAGING_DIR_HOST} \ | ||
| 48 | --with-gettext=${STAGING_LIBDIR}/.. \ | ||
| 49 | --with-imap-ssl=${STAGING_DIR_HOST} \ | ||
| 50 | --with-zlib=${STAGING_LIBDIR}/.. \ | ||
| 51 | --with-iconv=${STAGING_LIBDIR}/.. \ | ||
| 52 | ${COMMON_EXTRA_OECONF} \ | ||
| 53 | " | ||
| 54 | EXTRA_OECONF_virtclass-native = " \ | ||
| 55 | --with-zlib=${STAGING_LIBDIR_NATIVE}/.. \ | ||
| 56 | --without-iconv \ | ||
| 57 | ${COMMON_EXTRA_OECONF} \ | ||
| 58 | " | ||
| 59 | |||
| 60 | PACKAGECONFIG ??= "mysql sqlite3" | ||
| 61 | PACKAGECONFIG_class-native = "" | ||
| 62 | |||
| 63 | PACKAGECONFIG[mysql] = "--with-mysql=${STAGING_DIR_TARGET}${prefix} \ | ||
| 64 | --with-mysqli=${STAGING_BINDIR_CROSS}/mysql_config \ | ||
| 65 | --with-pdo-mysql=${STAGING_BINDIR_CROSS}/mysql_config \ | ||
| 66 | , \ | ||
| 67 | ,mysql5" | ||
| 68 | |||
| 69 | PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_LIBDIR}/.. \ | ||
| 70 | --with-pdo-sqlite=${STAGING_LIBDIR}/.. \ | ||
| 71 | , \ | ||
| 72 | ,sqlite3" | ||
| 73 | |||
| 74 | export PHP_NATIVE_DIR = "${STAGING_BINDIR_NATIVE}" | ||
| 75 | export PHP_PEAR_PHP_BIN = "${STAGING_BINDIR_NATIVE}/php" | ||
| 76 | CFLAGS += " -D_GNU_SOURCE" | ||
| 77 | |||
| 78 | EXTRA_OEMAKE = "INSTALL_ROOT=${D}" | ||
| 79 | |||
| 80 | acpaths = "" | ||
| 81 | |||
| 82 | do_install_append_class-native() { | ||
| 83 | rm -rf ${D}/${libdir}/php/.registry | ||
| 84 | rm -rf ${D}/${libdir}/php/.channels | ||
| 85 | rm -rf ${D}/${libdir}/php/.[a-z]* | ||
| 86 | } | ||
| 87 | |||
| 88 | # fixme | ||
| 89 | do_install_append_class-target() { | ||
| 90 | install -d ${D}/${sysconfdir}/ | ||
| 91 | if [ -d ${D}/${STAGING_DIR_NATIVE}/${sysconfdir} ];then | ||
| 92 | mv ${D}/${STAGING_DIR_NATIVE}/${sysconfdir}/* ${D}/${sysconfdir}/ | ||
| 93 | fi | ||
| 94 | rm -rf ${D}/${TMPDIR} | ||
| 95 | rm -rf ${D}/.registry | ||
| 96 | rm -rf ${D}/.channels | ||
| 97 | rm -rf ${D}/.[a-z]* | ||
| 98 | rm -rf ${D}/var | ||
| 99 | rm -f ${D}/${sysconfdir}/php-fpm.conf.default | ||
| 100 | sed -i 's:${STAGING_DIR_NATIVE}::g' ${D}/${sysconfdir}/pear.conf | ||
| 101 | install -m 0644 ${WORKDIR}/php-fpm.conf ${D}/${sysconfdir}/php-fpm.conf | ||
| 102 | install -d ${D}/${sysconfdir}/apache2/conf.d | ||
| 103 | install -m 0644 ${WORKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf | ||
| 104 | install -d ${D}${sysconfdir}/init.d | ||
| 105 | sed -i 's:=/usr/sbin:=${sbindir}:g' ${B}/sapi/fpm/init.d.php-fpm | ||
| 106 | sed -i 's:=/etc:=${sysconfdir}:g' ${B}/sapi/fpm/init.d.php-fpm | ||
| 107 | sed -i 's:=/var:=${localstatedir}:g' ${B}/sapi/fpm/init.d.php-fpm | ||
| 108 | install -m 0755 ${B}/sapi/fpm/init.d.php-fpm ${D}${sysconfdir}/init.d/php-fpm | ||
| 109 | TMP=`dirname ${D}/${TMPDIR}` | ||
| 110 | while test ${TMP} != ${D}; do | ||
| 111 | rmdir ${TMP} | ||
| 112 | TMP=`dirname ${TMP}`; | ||
| 113 | done | ||
| 114 | } | ||
| 115 | |||
| 116 | PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-cgi ${PN}-fpm ${PN}-fpm-apache2 ${PN}-pear ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}" | ||
| 117 | |||
| 118 | RDEPENDS_${PN}-pear = "${PN}" | ||
| 119 | RDEPENDS_${PN}-cli = "${PN}" | ||
| 120 | RDEPENDS_${PN}-dev = "${PN}" | ||
| 121 | |||
| 122 | INITSCRIPT_PACKAGES = "${PN}-fpm" | ||
| 123 | inherit update-rc.d | ||
| 124 | |||
| 125 | FILES_${PN}-dbg =+ "${bindir}/.debug" | ||
| 126 | FILES_${PN}-doc += "${libdir}/php/doc" | ||
| 127 | FILES_${PN}-cli = "${bindir}/php" | ||
| 128 | FILES_${PN}-cgi = "${bindir}/php-cgi" | ||
| 129 | FILES_${PN}-fpm = "${sbindir}/php-fpm ${sysconfdir}/php-fpm.conf ${datadir}/fpm ${sysconfdir}/init.d/php-fpm" | ||
| 130 | FILES_${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf" | ||
| 131 | CONFFILES_${PN}-fpm = "${sysconfdir}/php-fpm.conf" | ||
| 132 | CONFFILES_${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf" | ||
| 133 | INITSCRIPT_NAME_${PN}-fpm = "php-fpm" | ||
| 134 | INITSCRIPT_PARAMS_${PN}-fpm = "defaults 60" | ||
| 135 | FILES_${PN}-pear = "${bindir}/pear* ${bindir}/pecl ${libdir}/php/PEAR \ | ||
| 136 | ${libdir}/php/PEAR.php ${libdir}/php/System.php \ | ||
| 137 | ${libdir}php/peclcmd.php ${libdir}/php/pearcmd.php \ | ||
| 138 | ${libdir}/php/.channels ${libdir}/php/.channels/.alias \ | ||
| 139 | ${libdir}/php/.channels\__uri.reg \ | ||
| 140 | ${libdir}/php/.channels\pear.php.net.reg \ | ||
| 141 | ${libdir}/php/.channels/pecl.php.net.reg \ | ||
| 142 | ${libdir}/php/.registry ${libdir}/php/Archive/Tar.php \ | ||
| 143 | ${libdir}/php/Console/Getopt.php ${libdir}/php/OS/Guess.php \ | ||
| 144 | ${sysconfdir}/pear.conf" | ||
| 145 | FILES_${PN}-dev = "${includedir}/php ${libdir}/build ${bindir}/phpize \ | ||
| 146 | ${bindir}/php-config ${libdir}/php/.depdb \ | ||
| 147 | ${libdir}/php/.depdblock ${libdir}/php/.filemap \ | ||
| 148 | ${libdir}/php/.lock ${libdir}/php/test" | ||
| 149 | FILES_${PN} = "${libdir}/php" | ||
| 150 | FILES_${PN} += "${bindir}" | ||
