diff options
5 files changed, 182 insertions, 0 deletions
diff --git a/meta-webserver/recipes-php/modphp/files/70_mod_php5.conf b/meta-webserver/recipes-php/modphp/files/70_mod_php5.conf new file mode 100644 index 000000000..1de6fb11a --- /dev/null +++ b/meta-webserver/recipes-php/modphp/files/70_mod_php5.conf | |||
@@ -0,0 +1,12 @@ | |||
1 | # vim: ft=apache sw=4 ts=4 | ||
2 | <IfDefine PHP5> | ||
3 | # Load the module first | ||
4 | <IfModule !sapi_apache2.c> | ||
5 | LoadModule php5_module lib/apache2/modules/libphp5.so | ||
6 | </IfModule> | ||
7 | |||
8 | # Set it to handle the files | ||
9 | AddHandler php5-script .php .phtml .php3 .php4 .php5 | ||
10 | AddType application/x-httpd-php-source .phps | ||
11 | DirectoryIndex index.html index.html.var index.php index.phtml | ||
12 | </IfDefine> | ||
diff --git a/meta-webserver/recipes-php/modphp/files/configure.patch b/meta-webserver/recipes-php/modphp/files/configure.patch new file mode 100644 index 000000000..c5334c706 --- /dev/null +++ b/meta-webserver/recipes-php/modphp/files/configure.patch | |||
@@ -0,0 +1,11 @@ | |||
1 | --- php-5.1.6/configure.old 2006-09-12 07:54:14.000000000 -0700 | ||
2 | +++ php-5.1.6/configure 2006-09-12 07:54:37.000000000 -0700 | ||
3 | @@ -14715,8 +14715,6 @@ | ||
4 | |||
5 | |||
6 | |||
7 | - unset ac_cv_func_dlopen | ||
8 | - unset ac_cv_func___dlopen | ||
9 | unset found | ||
10 | |||
11 | echo $ac_n "checking for dlopen""... $ac_c" 1>&6 | ||
diff --git a/meta-webserver/recipes-php/modphp/files/pthread-check.patch b/meta-webserver/recipes-php/modphp/files/pthread-check.patch new file mode 100644 index 000000000..1388b2b0b --- /dev/null +++ b/meta-webserver/recipes-php/modphp/files/pthread-check.patch | |||
@@ -0,0 +1,64 @@ | |||
1 | Hack configure script so it does not disable pthread support when cross-compiling | ||
2 | |||
3 | Upstream-Status: Inapproprate [config] | ||
4 | |||
5 | Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
6 | |||
7 | diff --git a/configure b/configure | ||
8 | index 03d8f95..6794d45 100755 | ||
9 | --- a/configure | ||
10 | +++ b/configure | ||
11 | @@ -3506,7 +3506,7 @@ fi | ||
12 | |||
13 | if test "$cross_compiling" = yes; then | ||
14 | |||
15 | - pthreads_working=no | ||
16 | + pthreads_working=yes | ||
17 | case $host_alias in | ||
18 | *netware*) | ||
19 | pthreads_working=yes | ||
20 | @@ -3566,7 +3566,7 @@ else | ||
21 | |||
22 | if test "$cross_compiling" = yes; then | ||
23 | |||
24 | - pthreads_working=no | ||
25 | + pthreads_working=yes | ||
26 | case $host_alias in | ||
27 | *netware*) | ||
28 | pthreads_working=yes | ||
29 | @@ -3636,7 +3636,7 @@ if test "$pthreads_working" != "yes"; then | ||
30 | |||
31 | if test "$cross_compiling" = yes; then | ||
32 | |||
33 | - pthreads_working=no | ||
34 | + pthreads_working=yes | ||
35 | case $host_alias in | ||
36 | *netware*) | ||
37 | pthreads_working=yes | ||
38 | @@ -106833,7 +106833,7 @@ fi | ||
39 | |||
40 | if test "$cross_compiling" = yes; then | ||
41 | |||
42 | - pthreads_working=no | ||
43 | + pthreads_working=yes | ||
44 | case $host_alias in | ||
45 | *netware*) | ||
46 | pthreads_working=yes | ||
47 | @@ -106893,7 +106893,7 @@ else | ||
48 | |||
49 | if test "$cross_compiling" = yes; then | ||
50 | |||
51 | - pthreads_working=no | ||
52 | + pthreads_working=yes | ||
53 | case $host_alias in | ||
54 | *netware*) | ||
55 | pthreads_working=yes | ||
56 | @@ -106963,7 +106963,7 @@ if test "$pthreads_working" != "yes"; then | ||
57 | |||
58 | if test "$cross_compiling" = yes; then | ||
59 | |||
60 | - pthreads_working=no | ||
61 | + pthreads_working=yes | ||
62 | case $host_alias in | ||
63 | *netware*) | ||
64 | pthreads_working=yes | ||
diff --git a/meta-webserver/recipes-php/modphp/modphp5.inc b/meta-webserver/recipes-php/modphp/modphp5.inc new file mode 100644 index 000000000..82b5ce1a6 --- /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 | |||
diff --git a/meta-webserver/recipes-php/modphp/modphp_5.3.14.bb b/meta-webserver/recipes-php/modphp/modphp_5.3.14.bb new file mode 100644 index 000000000..b6a51267b --- /dev/null +++ b/meta-webserver/recipes-php/modphp/modphp_5.3.14.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | include modphp5.inc | ||
2 | PR = "r0" | ||
3 | |||
4 | SRC_URI[md5sum] = "7caac4f71e2f21426c11ac153e538392" | ||
5 | SRC_URI[sha256sum] = "c8075b6e83c5db0d26cc8426a7456856421089a76c963813b1fcac3ced041cb3" | ||