diff options
author | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 03:20:04 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 03:20:04 +0200 |
commit | 1b8dfe266937a37a4c642f96ceb2347bf4c00a17 (patch) | |
tree | 0c6aab146bb3c82efd9c7846a9a4e70dcb0ec84f /meta-webserver/recipes-php/modphp/modphp5.inc | |
download | meta-openembedded-daisy-140929.tar.gz |
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-webserver/recipes-php/modphp/modphp5.inc')
-rw-r--r-- | meta-webserver/recipes-php/modphp/modphp5.inc | 104 |
1 files changed, 104 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..a1d550de30 --- /dev/null +++ b/meta-webserver/recipes-php/modphp/modphp5.inc | |||
@@ -0,0 +1,104 @@ | |||
1 | SECTION = "console/network" | ||
2 | DESCRIPTION = "A server-side, HTML-embedded scripting language. This package provides the apache php module." | ||
3 | LICENSE = "PHP-3.0" | ||
4 | INC_PR = "r1" | ||
5 | DEPENDS = "apache2-native apache2 zlib bzip2 libmcrypt" | ||
6 | |||
7 | SRC_URI = "http://www.php.net/distributions/php-${PV}.tar.bz2 \ | ||
8 | file://configure.patch \ | ||
9 | file://pthread-check-threads-m4.patch \ | ||
10 | file://70_mod_php5.conf \ | ||
11 | " | ||
12 | |||
13 | S = "${WORKDIR}/php-${PV}" | ||
14 | |||
15 | LIC_FILES_CHKSUM = "file://LICENSE;md5=5bb09683f8f09b15b7076f4b4c31d61f" | ||
16 | |||
17 | inherit autotools | ||
18 | |||
19 | CFLAGS += " -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I${STAGING_INCDIR}/apache2" | ||
20 | |||
21 | EXTRA_OECONF = "--with-apxs2=${STAGING_BINDIR_CROSS}/apxs \ | ||
22 | --with-pic \ | ||
23 | --enable-maintainer-zts \ | ||
24 | --without-mysql \ | ||
25 | --disable-cgi \ | ||
26 | --disable-cli \ | ||
27 | --disable-pdo \ | ||
28 | --without-pear \ | ||
29 | --without-iconv \ | ||
30 | --disable-ipv6 \ | ||
31 | --disable-xml \ | ||
32 | --disable-xmlreader \ | ||
33 | --disable-xmlwriter \ | ||
34 | --disable-simplexml \ | ||
35 | --disable-libxml \ | ||
36 | --disable-dom \ | ||
37 | --disable-rpath \ | ||
38 | --libdir=${libdir}/php5 \ | ||
39 | --with-zlib --with-zlib-dir=${STAGING_DIR_TARGET}${exec_prefix} \ | ||
40 | --with-bz2=${STAGING_DIR_TARGET}${exec_prefix} \ | ||
41 | --with-mcrypt=${STAGING_DIR_TARGET}${exec_prefix} \ | ||
42 | --enable-zip \ | ||
43 | --enable-mbstring \ | ||
44 | --with-config-file-path=${sysconfdir}/php/apache2-php5 \ | ||
45 | ${@base_conditional('SITEINFO_ENDIANNESS', 'le', 'ac_cv_c_bigendian_php=no', 'ac_cv_c_bigendian_php=yes', d)}" | ||
46 | |||
47 | PACKAGECONFIG ??= "mysql" | ||
48 | PACKAGECONFIG[mysql] = "--with-mysqli=${STAGING_BINDIR_CROSS}/mysql_config,--without-mysqli,mysql5" | ||
49 | PACKAGECONFIG[pgsql] = "--with-pgsql=${STAGING_DIR_TARGET}${exec_prefix},--without-pgsql,mysql5" | ||
50 | |||
51 | acpaths = "" | ||
52 | |||
53 | do_configure_prepend () { | ||
54 | rm -f ${S}/build/libtool.m4 ${S}/ltmain.sh ${S}/aclocal.m4 | ||
55 | find ${S} -name config.m4 | xargs -n1 sed -i 's!APXS_HTTPD=.*!APXS_HTTPD=${STAGING_BINDIR_NATIVE}/httpd!' | ||
56 | } | ||
57 | |||
58 | do_configure_append() { | ||
59 | # No libtool, we really don't want rpath set... | ||
60 | sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' ${HOST_SYS}-libtool | ||
61 | sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' ${HOST_SYS}-libtool | ||
62 | } | ||
63 | |||
64 | do_install () { | ||
65 | install -d ${D}${libdir}/apache2/modules | ||
66 | install -d ${D}${sysconfdir}/apache2/modules.d | ||
67 | install -d ${D}${sysconfdir}/php/apache2-php5 | ||
68 | install -m 755 libs/libphp5.so ${D}${libdir}/apache2/modules | ||
69 | install -m 644 ${WORKDIR}/70_mod_php5.conf ${D}${sysconfdir}/apache2/modules.d | ||
70 | sed -i s,lib/,${libdir}/, ${D}${sysconfdir}/apache2/modules.d/70_mod_php5.conf | ||
71 | cat ${S}/php.ini-production | \ | ||
72 | sed -e 's,extension_dir = \"\./\",extension_dir = \"/usr/lib/extensions\",' \ | ||
73 | > ${D}${sysconfdir}/php/apache2-php5/php.ini | ||
74 | |||
75 | install -d ${D}${bindir} | ||
76 | install -m 755 scripts/phpize ${D}${bindir} | ||
77 | install -m 755 scripts/php-config ${D}${bindir} | ||
78 | cat aclocal-copy/libtool.m4 aclocal-copy/lt~obsolete.m4 aclocal-copy/ltoptions.m4 \ | ||
79 | aclocal-copy/ltsugar.m4 aclocal-copy/ltversion.m4 > ${S}/build/libtool.m4 | ||
80 | |||
81 | oe_runmake install-build install-headers INSTALL_ROOT=${D} | ||
82 | } | ||
83 | |||
84 | SYSROOT_PREPROCESS_FUNCS += "php_sysroot_preprocess" | ||
85 | |||
86 | php_sysroot_preprocess () { | ||
87 | install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/ | ||
88 | install -m 755 ${D}${bindir}/phpize ${SYSROOT_DESTDIR}${bindir_crossscripts}/ | ||
89 | install -m 755 ${D}${bindir}/php-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/ | ||
90 | |||
91 | sed -i 's!eval echo /!eval echo ${STAGING_DIR_HOST}/!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/phpize | ||
92 | sed -i 's!^include_dir=.*!include_dir=${STAGING_INCDIR}/php!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/php-config | ||
93 | } | ||
94 | |||
95 | # phpize is not scanned for absolute paths by default (but php-config is). | ||
96 | # | ||
97 | SSTATE_SCAN_FILES += "phpize" | ||
98 | |||
99 | RDEPENDS_${PN} = "apache2" | ||
100 | |||
101 | FILES_${PN} = "${libdir}/apache2 ${sysconfdir}" | ||
102 | FILES_${PN}-dev += "${bindir}/phpize ${bindir}/php-config ${libdir}/php5" | ||
103 | FILES_${PN}-dbg += "${libdir}/apache2/modules/.debug" | ||
104 | |||