summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2011-11-02 16:54:57 +0100
committerKoen Kooi <koen@dominion.thruhere.net>2011-11-03 15:02:20 +0100
commit120753e7437bc893462356ef153b67d38f7f696e (patch)
treee4e337cca6a8d989f038bb0533efd446afe272d6 /meta-oe
parentb2bed436b4f0e14c1df71a7edfd10b94099e93b7 (diff)
downloadmeta-openembedded-120753e7437bc893462356ef153b67d38f7f696e.tar.gz
php 5.3.6: import from OE classic
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-devtools/php/php.inc93
-rw-r--r--meta-oe/recipes-devtools/php/php/0001-php-don-t-use-broken-wrapper-for-mkdir.patch26
-rw-r--r--meta-oe/recipes-devtools/php/php/acinclude-xml2-config.patch18
-rw-r--r--meta-oe/recipes-devtools/php/php/iconv.patch27
-rw-r--r--meta-oe/recipes-devtools/php/php/imap-fix-autofoo.patch41
-rw-r--r--meta-oe/recipes-devtools/php/php/pear-makefile.patch13
-rw-r--r--meta-oe/recipes-devtools/php/php/phar-makefile.patch26
-rw-r--r--meta-oe/recipes-devtools/php/php/php-m4-divert.patch83
-rw-r--r--meta-oe/recipes-devtools/php/php/php_exec_native.patch11
-rw-r--r--meta-oe/recipes-devtools/php/php_5.3.6.bb19
10 files changed, 357 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/php/php.inc b/meta-oe/recipes-devtools/php/php.inc
new file mode 100644
index 000000000..7f2dc450f
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php.inc
@@ -0,0 +1,93 @@
1DESCRIPTION = "A server-side, HTML-embedded scripting language. This package provides the CGI."
2HOMEPAGE = "http://www.php.net"
3SECTION = "console/network"
4LICENSE = "PHP"
5BBCLASSEXTEND = "native"
6DEPENDS = "zlib libxml2 virtual/libiconv php-native lemon-native mysql5 \
7 libc-client openssl"
8DEPENDS_virtclass-native = "zlib-native libxml2-native"
9
10INC_PR = "r0"
11
12SRC_URI = "http://www.php.net/distributions/php-${PV}.tar.bz2"
13
14S = "${WORKDIR}/php-${PV}"
15
16inherit autotools pkgconfig
17
18# Common EXTRA_OECONF
19COMMON_EXTRA_OECONF = "--enable-sockets --enable-pcntl --enable-shared"
20EXTRA_OECONF = "--enable-mbstring --enable-discard-path --enable-wddx \
21 --enable-magic-quotes --enable-fastcgi \
22 --with-imap=${STAGING_DIR_HOST} \
23 --with-imap-ssl=${STAGING_DIR_HOST} \
24 --with-zlib --with-zlib-dir=${STAGING_LIBDIR}/.. \
25 --with-iconv=${STAGING_LIBDIR}/.. \
26 --with-libxml-dir=${STAGING_BINDIR_CROSS} \
27 --disable-embedded-mysqli \
28 --with-mysql="${STAGING_DIR_TARGET}${prefix}" \
29 --with-mysqli="${STAGING_BINDIR_CROSS}/mysql_config" \
30 --with-pdo-mysql="${STAGING_BINDIR_CROSS}/mysql_config" \
31 --without-pdo-sqlite ${COMMON_EXTRA_OECONF} \
32 "
33EXTRA_OECONF_virtclass-native = "--with-cgi --without-libpng --without-libjpeg \
34 --with-zlib --with-zlib-dir=${STAGING_LIBDIR_NATIVE}/.. \
35 --with-libxml-dir=${STAGING_BINDIR_NATIVE} \
36 ${COMMON_EXTRA_OECONF} \
37 "
38
39LIBS_virtclass-native = " -lxml2 "
40LIBS_pn-php =" -lpthread "
41export LIBS
42THREADS_pn-php = "pthread"
43export THREADS
44LD_LIBRARY_PATH_virtclass-native = "${STAGING_LIBDIR_NATIVE}"
45LD_LIBRARY_PATH_pn-php = "${STAGING_LIBDIR}"
46export LD_LIBRARY_PATH
47export PHP_NATIVE_DIR = "${STAGING_BINDIR_NATIVE}"
48export PHP_PEAR_PHP_BIN = "${STAGING_BINDIR_NATIVE}/php"
49CFLAGS += " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -D_GNU_SOURCE"
50
51acpaths = ""
52
53do_install () {
54 oe_runmake 'INSTALL_ROOT=${D}' install
55}
56
57# fixme
58do_install_append_pn-php() {
59 mv ${D}/${STAGING_DIR_NATIVE}/${sysconfdir} ${D}/${sysconfdir}
60 rm -rf ${D}/${STAGING_DIR_NATIVE}
61 rm -rf ${D}/.registry
62 rm -rf ${D}/.channels
63 rm -rf ${D}/.[a-z]*
64 sed -i 's:${STAGING_DIR_NATIVE}::g' ${D}/${sysconfdir}/pear.conf
65}
66
67PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-cgi ${PN}-pear ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}"
68
69RDEPENDS_${PN}-pear = "${PN}"
70RDEPENDS_${PN}-cli = "${PN}"
71RDEPENDS_${PN}-dev = "${PN}"
72
73
74FILES_${PN}-dbg =+ "${bindir}/.debug"
75FILES_${PN}-doc += "${libdir}/php/doc"
76FILES_${PN}-cli = "${bindir}/php"
77FILES_${PN}-cgi = "${bindir}/php-cgi"
78FILES_${PN}-pear = "${bindir}/pear* ${bindir}/pecl ${libdir}/php/PEAR \
79 ${libdir}/php/PEAR.php ${libdir}/php/System.php \
80 ${libdir}php/peclcmd.php ${libdir}/php/pearcmd.php \
81 ${libdir}/php/.channels ${libdir}/php/.channels/.alias \
82 ${libdir}/php/.channels\__uri.reg \
83 ${libdir}/php/.channels\pear.php.net.reg \
84 ${libdir}/php/.channels/pecl.php.net.reg \
85 ${libdir}/php/.registry ${libdir}/php/Archive/Tar.php \
86 ${libdir}/php/Console/Getopt.php ${libdir}/php/OS/Guess.php \
87 ${sysconfdir}/pear.conf"
88FILES_${PN}-dev = "${includedir}/php ${libdir}/build ${bindir}/phpize \
89 ${bindir}/php-config ${libdir}/php/.depdb \
90 ${libdir}/php/.depdblock ${libdir}/php/.filemap \
91 ${libdir}/php/.lock ${libdir}/php/test"
92FILES_${PN} = "${libdir}/php"
93FILES_${PN} += "${bindir}"
diff --git a/meta-oe/recipes-devtools/php/php/0001-php-don-t-use-broken-wrapper-for-mkdir.patch b/meta-oe/recipes-devtools/php/php/0001-php-don-t-use-broken-wrapper-for-mkdir.patch
new file mode 100644
index 000000000..1e16b860b
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/0001-php-don-t-use-broken-wrapper-for-mkdir.patch
@@ -0,0 +1,26 @@
1From 411ec4b31fdcc524f13fe5be80fd6769b7d16a5d Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Thu, 3 Nov 2011 14:27:15 +0100
4Subject: [PATCH] php: don't use broken wrapper for mkdir
5
6Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
7---
8
9Upstream-status: Inappropriate
10
11 Makefile.global | 2 +-
12 1 files changed, 1 insertions(+), 1 deletions(-)
13
14diff --git a/Makefile.global b/Makefile.global
15index 8dad0e4..abdb5d2 100644
16--- a/Makefile.global
17+++ b/Makefile.global
18@@ -1,4 +1,4 @@
19-mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
20+mkinstalldirs = mkdir -p
21 INSTALL = $(top_srcdir)/build/shtool install -c
22 INSTALL_DATA = $(INSTALL) -m 644
23
24--
251.7.2.5
26
diff --git a/meta-oe/recipes-devtools/php/php/acinclude-xml2-config.patch b/meta-oe/recipes-devtools/php/php/acinclude-xml2-config.patch
new file mode 100644
index 000000000..bf519d293
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/acinclude-xml2-config.patch
@@ -0,0 +1,18 @@
1--- /orig-acinclude.m4 2007-02-20 15:03:25.000000000 +0200
2+++ /acinclude.m4 2007-02-20 15:03:24.000000000 +0200
3@@ -2359,12 +2359,9 @@
4 AC_DEFUN([PHP_SETUP_LIBXML], [
5 AC_CACHE_CHECK([for xml2-config path], ac_cv_php_xml2_config_path,
6 [
7- for i in $PHP_LIBXML_DIR /usr/local /usr; do
8- if test -x "$i/bin/xml2-config"; then
9- ac_cv_php_xml2_config_path="$i/bin/xml2-config"
10- break
11- fi
12- done
13+
14+ ac_cv_php_xml2_config_path="$PHP_LIBXML_DIR/xml2-config"
15+
16 ])
17
18 if test -x "$ac_cv_php_xml2_config_path"; then
diff --git a/meta-oe/recipes-devtools/php/php/iconv.patch b/meta-oe/recipes-devtools/php/php/iconv.patch
new file mode 100644
index 000000000..66b39cc56
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/iconv.patch
@@ -0,0 +1,27 @@
1Index: php-5.2.13/acinclude.m4
2===================================================================
3--- php-5.2.13.orig/acinclude.m4
4+++ php-5.2.13/acinclude.m4
5@@ -2430,7 +2430,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
6 dnl
7 dnl Check libc first if no path is provided in --with-iconv
8 dnl
9- if test "$PHP_ICONV" = "yes"; then
10+ dnl must check against no, not against yes as PHP_ICONV can also include a path, which implies yes
11+ if test "$PHP_ICONV" != "no"; then
12 AC_CHECK_FUNC(iconv, [
13 found_iconv=yes
14 ],[
15Index: php-5.2.13/ext/iconv/config.m4
16===================================================================
17--- php-5.2.13.orig/ext/iconv/config.m4
18+++ php-5.2.13/ext/iconv/config.m4
19@@ -15,7 +15,7 @@ if test "$PHP_ICONV" != "no"; then
20
21 if test "$iconv_avail" != "no"; then
22 if test -z "$ICONV_DIR"; then
23- for i in /usr/local /usr; do
24+ for i in $PHP_ICONV /usr/local /usr; do
25 if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then
26 PHP_ICONV_PREFIX="$i"
27 break
diff --git a/meta-oe/recipes-devtools/php/php/imap-fix-autofoo.patch b/meta-oe/recipes-devtools/php/php/imap-fix-autofoo.patch
new file mode 100644
index 000000000..3695b7bc4
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/imap-fix-autofoo.patch
@@ -0,0 +1,41 @@
1Index: php-5.2.11/ext/imap/config.m4
2===================================================================
3--- php-5.2.11.orig/ext/imap/config.m4 2009-12-10 12:27:52.800974533 -0700
4+++ php-5.2.11/ext/imap/config.m4 2009-12-10 12:28:33.720976583 -0700
5@@ -103,7 +103,7 @@
6 PHP_NEW_EXTENSION(imap, php_imap.c, $ext_shared)
7 AC_DEFINE(HAVE_IMAP,1,[ ])
8
9- for i in $PHP_IMAP /usr/local /usr; do
10+ for i in $PHP_IMAP $PHP_IMAP/usr /usr/local /usr; do
11 IMAP_INC_CHK()
12 el[]IMAP_INC_CHK(/include/c-client)
13 el[]IMAP_INC_CHK(/include/imap)
14@@ -192,13 +192,7 @@
15 AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.)
16 fi
17
18- if test -r "$IMAP_DIR/c-client/c-client.a"; then
19- ln -s "$IMAP_DIR/c-client/c-client.a" "$IMAP_DIR/c-client/libc-client.a" >/dev/null 2>&1
20- elif test -r "$IMAP_DIR/$PHP_LIBDIR/c-client.a"; then
21- ln -s "$IMAP_DIR/$PHP_LIBDIR/c-client.a" "$IMAP_DIR/$PHP_LIBDIR/libc-client.a" >/dev/null 2>&1
22- fi
23-
24- for lib in c-client4 c-client imap; do
25+ for lib in /usr/lib c-client4 c-client imap; do
26 IMAP_LIB=$lib
27 IMAP_LIB_CHK($PHP_LIBDIR)
28 IMAP_LIB_CHK(c-client)
29Index: php-5.2.11/acinclude.m4
30===================================================================
31--- php-5.2.11.orig/acinclude.m4 2009-12-10 12:37:13.134722881 -0700
32+++ php-5.2.11/acinclude.m4 2009-12-10 12:37:39.342007053 -0700
33@@ -2338,7 +2338,7 @@
34 PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
35 fi
36
37- for i in $PHP_OPENSSL_DIR; do
38+ for i in $PHP_OPENSSL_DIR $PHP_OPENSSL_DIR/usr; do
39 if test -r $i/include/openssl/evp.h; then
40 OPENSSL_INCDIR=$i/include
41 fi
diff --git a/meta-oe/recipes-devtools/php/php/pear-makefile.patch b/meta-oe/recipes-devtools/php/php/pear-makefile.patch
new file mode 100644
index 000000000..1928b9896
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/pear-makefile.patch
@@ -0,0 +1,13 @@
1diff --git a/pear/Makefile.frag b/pear/Makefile.frag
2index 1f6f70e..b19a77c 100644
3--- a/pear/Makefile.frag
4+++ b/pear/Makefile.frag
5@@ -11,7 +11,7 @@ PEAR_PREFIX = -dp a${program_prefix}
6 PEAR_SUFFIX = -ds a$(program_suffix)
7
8 install-pear-installer: $(SAPI_CLI_PATH)
9- @$(top_builddir)/sapi/cli/php $(PEAR_INSTALL_FLAGS) pear/install-pear-nozlib.phar -d "$(peardir)" -b "$(bindir)" ${PEAR_PREFIX} ${PEAR_SUFFIX}
10+ @$(PHP_NATIVE_DIR)/php $(PEAR_INSTALL_FLAGS) $(builddir)/install-pear-nozlib.phar -d "$(peardir)" -b "$(bindir)" ${PEAR_PREFIX} ${PEAR_SUFFIX}
11
12 install-pear:
13 @echo "Installing PEAR environment: $(INSTALL_ROOT)$(peardir)/"
diff --git a/meta-oe/recipes-devtools/php/php/phar-makefile.patch b/meta-oe/recipes-devtools/php/php/phar-makefile.patch
new file mode 100644
index 000000000..6fde25127
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/phar-makefile.patch
@@ -0,0 +1,26 @@
1diff --git a/ext/phar/Makefile.frag b/ext/phar/Makefile.frag
2index fc93d1d..9a8cd65 100755
3--- a/ext/phar/Makefile.frag
4+++ b/ext/phar/Makefile.frag
5@@ -6,19 +6,8 @@ pharcmd: $(builddir)/phar.php $(builddir)/phar.phar
6
7 PHP_PHARCMD_SETTINGS = -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' -d phar.readonly=0 -d 'safe_mode=0'
8 PHP_PHARCMD_EXECUTABLE = ` \
9- if test -x "$(top_builddir)/$(SAPI_CLI_PATH)"; then \
10- $(top_srcdir)/build/shtool echo -n -- "$(top_builddir)/$(SAPI_CLI_PATH) -n"; \
11- if test "x$(PHP_MODULES)" != "x"; then \
12- $(top_srcdir)/build/shtool echo -n -- " -d extension_dir=$(top_builddir)/modules"; \
13- for i in bz2 zlib phar; do \
14- if test -f "$(top_builddir)/modules/$$i.la"; then \
15- . $(top_builddir)/modules/$$i.la; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \
16- fi; \
17- done; \
18- fi; \
19- else \
20- $(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; \
21- fi;`
22+ $(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; `
23+
24 PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "$(INSTALL_ROOT)$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)";`
25
26 $(builddir)/phar/phar.inc: $(srcdir)/phar/phar.inc
diff --git a/meta-oe/recipes-devtools/php/php/php-m4-divert.patch b/meta-oe/recipes-devtools/php/php/php-m4-divert.patch
new file mode 100644
index 000000000..dfc7b643e
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/php-m4-divert.patch
@@ -0,0 +1,83 @@
1Patch taken from
2
3http://cvs.pld-linux.org/cgi-bin/cvsweb/packages/php/php-m4-divert.patch?rev=1.1
4
5diff -ur php-5.2.10.org/configure.in php-5.2.10/configure.in
6--- php-5.2.10.org/configure.in 2009-06-17 14:22:41.000000000 +0200
7+++ php-5.2.10/configure.in 2009-08-18 12:16:25.317640253 +0200
8@@ -1,7 +1,7 @@
9 ## $Id: configure.in,v 1.579.2.52.2.139 2009/06/17 12:22:41 iliaa Exp $ -*- autoconf -*-
10 dnl ## Process this file with autoconf to produce a configure script.
11
12-divert(1)
13+divert(1001)
14
15 dnl ## Diversion 1 is the autoconf + automake setup phase. We also
16 dnl ## set the PHP version, deal with platform-specific compile
17@@ -263,7 +263,7 @@
18 sinclude(TSRM/tsrm.m4)
19
20
21-divert(2)
22+divert(1002)
23
24 dnl ## Diversion 2 is where we set PHP-specific options and come up
25 dnl ## with reasonable default values for them. We check for pthreads here
26@@ -302,7 +302,7 @@
27 PTHREADS_FLAGS
28 fi
29
30-divert(3)
31+divert(1003)
32
33 dnl ## In diversion 3 we check for compile-time options to the PHP
34 dnl ## core and how to deal with different system dependencies.
35@@ -661,7 +661,7 @@
36 PHP_CRYPT_R_STYLE
37 fi
38
39-divert(4)
40+divert(1004)
41
42 dnl ## In diversion 4 we check user-configurable general settings.
43
44@@ -902,7 +902,7 @@
45 AC_MSG_RESULT([using system default])
46 fi
47
48-divert(5)
49+divert(1005)
50
51 dnl ## In diversion 5 we check which extensions should be compiled.
52 dnl ## All of these are normally in the extension directories.
53diff -ur php-5.2.10.org/ext/standard/config.m4 php-5.2.10/ext/standard/config.m4
54--- php-5.2.10.org/ext/standard/config.m4 2007-07-11 13:56:03.000000000 +0200
55+++ php-5.2.10/ext/standard/config.m4 2009-08-18 12:16:25.317640253 +0200
56@@ -1,6 +1,6 @@
57 dnl $Id: config.m4,v 1.80.2.3.2.3 2007/07/11 11:56:03 jani Exp $ -*- autoconf -*-
58
59-divert(3)dnl
60+divert(1003)dnl
61
62 dnl
63 dnl Check if flush should be called explicitly after buffered io
64@@ -205,7 +205,7 @@
65 AC_CHECK_FUNCS(getcwd getwd asinh acosh atanh log1p hypot glob strfmon nice fpclass isinf isnan)
66 AC_FUNC_FNMATCH
67
68-divert(5)dnl
69+divert(1005)dnl
70
71 dnl
72 dnl Check for regex library type
73diff -ur php-5.2.10.org/scripts/phpize.m4 php-5.2.10/scripts/phpize.m4
74--- php-5.2.10.org/scripts/phpize.m4 2009-06-02 21:54:22.000000000 +0200
75+++ php-5.2.10/scripts/phpize.m4 2009-08-18 12:16:25.317640253 +0200
76@@ -1,6 +1,6 @@
77 dnl This file becomes configure.in for self-contained extensions.
78
79-divert(1)
80+divert(1001)
81
82 AC_PREREQ(2.13)
83 AC_INIT(config.m4)
diff --git a/meta-oe/recipes-devtools/php/php/php_exec_native.patch b/meta-oe/recipes-devtools/php/php/php_exec_native.patch
new file mode 100644
index 000000000..a563c9a5e
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/php_exec_native.patch
@@ -0,0 +1,11 @@
1--- php/configure.in.orig 2011-03-12 02:13:19.000000000 +0100
2+++ php/configure.in 2011-03-12 02:14:05.000000000 +0100
3@@ -1216,7 +1216,7 @@
4 PHP_INSTALL_CLI_TARGET="install-cli"
5 PHP_ADD_SOURCES(sapi/cli, php_cli.c php_cli_readline.c,, cli)
6 PHP_INSTALLED_SAPIS="cli $PHP_SAPI"
7- PHP_EXECUTABLE="\$(top_builddir)/\$(SAPI_CLI_PATH)"
8+ PHP_EXECUTABLE="${PHP_NATIVE_DIR}/php"
9 else
10 PHP_INSTALLED_SAPIS="$PHP_SAPI"
11 fi
diff --git a/meta-oe/recipes-devtools/php/php_5.3.6.bb b/meta-oe/recipes-devtools/php/php_5.3.6.bb
new file mode 100644
index 000000000..9524bd9ab
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php_5.3.6.bb
@@ -0,0 +1,19 @@
1require php.inc
2
3LIC_FILES_CHKSUM = "file://LICENSE;md5=cb564efdf78cce8ea6e4b5a4f7c05d97"
4
5PR = "${INC_PR}.0"
6
7SRC_URI += "file://acinclude-xml2-config.patch \
8 file://php-m4-divert.patch \
9 file://0001-php-don-t-use-broken-wrapper-for-mkdir.patch"
10
11SRC_URI_append_pn-php += "file://iconv.patch \
12 file://imap-fix-autofoo.patch \
13 file://pear-makefile.patch \
14 file://phar-makefile.patch \
15 file://php_exec_native.patch \
16 "
17
18SRC_URI[md5sum] = "2286f5a82a6e8397955a0025c1c2ad98"
19SRC_URI[sha256sum] = "30ae880f22e3ee93eccc9b80e3c58b0d6364d139bb4366dcc27f2fab658d3198"