summaryrefslogtreecommitdiff
path: root/packages/php
diff options
context:
space:
mode:
authorStelios Koroneos <skoroneos@digital-opsis.com>2007-03-19 08:43:53 +0000
committerStelios Koroneos <skoroneos@digital-opsis.com>2007-03-19 08:43:53 +0000
commit567e456cf4ddb785f896102eeb985bf93f71e0e9 (patch)
tree0402f005b5a17adac8befe138c21f757dab37ace /packages/php
parent635e2ce5b2939363ff57ab92f7ea8017ad649055 (diff)
packages/php/php_5.2.0.bb : Make-over of the php 5.2.0 package.
It builds PEAR and mysql support by default Provides seperate packages for each php function i.e php-pear, php-cli etc instead of a monolithic (and big) php package. Additional functionality (GD support, other databases) can be enabled easily. Closes bug #1992
Diffstat (limited to 'packages/php')
-rw-r--r--packages/php/php-5.2.0/.mtn2git_empty0
-rw-r--r--packages/php/php-5.2.0/acinclude-xml2-config.patch18
-rw-r--r--packages/php/php-5.2.0/autotools.patch95
-rw-r--r--packages/php/php-5.2.0/pear-makefile.patch11
-rw-r--r--packages/php/php_5.2.0.bb75
5 files changed, 184 insertions, 15 deletions
diff --git a/packages/php/php-5.2.0/.mtn2git_empty b/packages/php/php-5.2.0/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/php/php-5.2.0/.mtn2git_empty
diff --git a/packages/php/php-5.2.0/acinclude-xml2-config.patch b/packages/php/php-5.2.0/acinclude-xml2-config.patch
new file mode 100644
index 0000000000..bf519d2934
--- /dev/null
+++ b/packages/php/php-5.2.0/acinclude-xml2-config.patch
@@ -0,0 +1,18 @@
+--- /orig-acinclude.m4 2007-02-20 15:03:25.000000000 +0200
++++ /acinclude.m4 2007-02-20 15:03:24.000000000 +0200
+@@ -2359,12 +2359,9 @@
+ AC_DEFUN([PHP_SETUP_LIBXML], [
+ AC_CACHE_CHECK([for xml2-config path], ac_cv_php_xml2_config_path,
+ [
+- for i in $PHP_LIBXML_DIR /usr/local /usr; do
+- if test -x "$i/bin/xml2-config"; then
+- ac_cv_php_xml2_config_path="$i/bin/xml2-config"
+- break
+- fi
+- done
++
++ ac_cv_php_xml2_config_path="$PHP_LIBXML_DIR/xml2-config"
++
+ ])
+
+ if test -x "$ac_cv_php_xml2_config_path"; then
diff --git a/packages/php/php-5.2.0/autotools.patch b/packages/php/php-5.2.0/autotools.patch
new file mode 100644
index 0000000000..9f1289fd11
--- /dev/null
+++ b/packages/php/php-5.2.0/autotools.patch
@@ -0,0 +1,95 @@
+diff -u'rNF^function' php-5.1.4~/acinclude.m4 php-5.1.4/acinclude.m4
+--- php-5.1.4~/acinclude.m4 2006-04-10 08:17:36.000000000 -0400
++++ php-5.1.4/acinclude.m4 2006-08-16 22:32:58.000000000 -0400
+@@ -818,10 +818,10 @@
+ OVERALL_TARGET=[]ifelse($1,,php,$1)
+ php_c_pre='$(LIBTOOL) --mode=compile $(CC)'
+ php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
+- php_c_post=
++ php_c_post=' && echo "[#] Generated by PHP badness - GNU libtool" > $[@] && echo "pic_object=none" >> $[@] && echo "non_pic_object=$[@]" | sed -e "s,=.*/,=,; s,\.lo,\.o,g" >> $[@]'
+ php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
+ php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
+- php_cxx_post=
++ php_cxx_post=' && echo "[#] Generated by PHP badness - GNU libtool" > $[@] && echo "pic_object=none" >> $[@] && echo "non_pic_object=$[@]" | sed -e "s,=.*/,=,; s,\.lo,\.o,g" >> $[@]'
+ php_lo=lo
+
+ case $with_pic in
+@@ -1670,6 +1670,7 @@
+ have_fopen_cookie=yes
+
+ dnl even newer glibcs have a different seeker definition...
++AC_CACHE_CHECK([if cookie io functions use off64_t], php_cv_lib_cookie_io_functions_use_off64_t,
+ AC_TRY_RUN([
+ #define _GNU_SOURCE
+ #include <stdio.h>
+@@ -1702,10 +1703,11 @@
+ cookie_io_functions_use_off64_t=yes
+ ], [
+ cookie_io_functions_use_off64_t=no
+-], [
+- cookie_io_functions_use_off64_t=no
+-])
+-
++],
++[ php_cv_lib_cookie_io_functions_use_off64_t=yes ],
++[ php_cv_lib_cookie_io_functions_use_off64_t=no ] ))
++
++
+ else
+
+ dnl older glibc versions (up to 2.1.2 ?)
+diff -u'rNF^function' php-5.1.4~/configure.in php-5.1.4/configure.in
+--- php-5.1.4~/configure.in 2006-05-03 19:30:02.000000000 -0400
++++ php-5.1.4/configure.in 2006-08-16 20:39:19.000000000 -0400
+@@ -209,6 +209,7 @@
+
+ sinclude(Zend/Zend.m4)
+ sinclude(TSRM/tsrm.m4)
++sinclude(TSRM/threads.m4)
+
+
+ divert(2)
+@@ -255,11 +255,6 @@
+ PTHREADS_FLAGS
+ fi
+
+-if test "$PHP_ENABLE_FASTCGI" = "yes"; then
+- PHP_CONFIGURE_PART(Running FastCGI checks)
+- sinclude(sapi/cgi/libfcgi/acinclude.m4)
+- sinclude(sapi/cgi/libfcgi/libfcgi.m4)
+-fi
+
+ divert(3)
+
+diff -u'rNF^function' php-5.1.4~/scripts/phpize.m4 php-5.1.4/scripts/phpize.m4
+--- php-5.1.4~/scripts/phpize.m4 2006-04-10 08:16:17.000000000 -0400
++++ php-5.1.4/scripts/phpize.m4 2006-08-16 20:39:19.000000000 -0400
+@@ -3,7 +3,6 @@
+ divert(1)
+
+ AC_PREREQ(2.13)
+-AC_INIT(config.m4)
+
+ PHP_CONFIG_NICE(config.nice)
+
+@@ -69,8 +68,6 @@
+ PHP_PROG_RE2C
+ PHP_PROG_AWK
+
+-sinclude(config.m4)
+-
+ enable_static=no
+ enable_shared=yes
+
+diff -u'rNF^function' php-5.1.4~/TSRM/threads.m4 php-5.1.4/TSRM/threads.m4
+--- php-5.1.4~/TSRM/threads.m4 2005-04-27 09:22:18.000000000 -0400
++++ php-5.1.4/TSRM/threads.m4 2006-08-16 20:39:19.000000000 -0400
+@@ -86,7 +86,7 @@
+ pthreads_working=no
+ ], [
+ dnl For cross compiling running this test is of no use. NetWare supports pthreads
+- pthreads_working=no
++ pthreads_working=yes
+ case $host_alias in
+ *netware*)
+ pthreads_working=yes
diff --git a/packages/php/php-5.2.0/pear-makefile.patch b/packages/php/php-5.2.0/pear-makefile.patch
new file mode 100644
index 0000000000..26de98a48f
--- /dev/null
+++ b/packages/php/php-5.2.0/pear-makefile.patch
@@ -0,0 +1,11 @@
+--- /pear/orig-Makefile.frag 2007-03-16 12:18:33.000000000 +0200
++++ /pear/Makefile.frag 2007-03-16 12:35:48.000000000 +0200
+@@ -6,7 +6,7 @@
+ PEAR_INSTALL_FLAGS = -n -dshort_open_tag=0 -dsafe_mode=0 -dopen_basedir= -derror_reporting=E_ALL -dmemory_limit=-1 -ddetect_unicode=0
+
+ install-pear-installer: $(SAPI_CLI_PATH)
+- @$(top_builddir)/sapi/cli/php $(PEAR_INSTALL_FLAGS) $(builddir)/install-pear-nozlib.phar -d "$(peardir)" -b "$(bindir)"
++ @$(PHP_NATIVE_DIR)/php $(PEAR_INSTALL_FLAGS) $(builddir)/install-pear-nozlib.phar -d "$(peardir)" -b "$(bindir)"
+
+ install-pear:
+ @echo "Installing PEAR environment: $(INSTALL_ROOT)$(peardir)/"
diff --git a/packages/php/php_5.2.0.bb b/packages/php/php_5.2.0.bb
index 3b24fbec40..a4674f08ef 100644
--- a/packages/php/php_5.2.0.bb
+++ b/packages/php/php_5.2.0.bb
@@ -1,12 +1,15 @@
SECTION = "console/network"
DESCRIPTION = "A server-side, HTML-embedded scripting language. This package provides the CGI."
LICENSE = "PHP"
-DEPENDS = "zlib libxml2 mysql libiconv"
+DEPENDS = "zlib libxml2 mysql libiconv php-native"
+
SRC_URI = "http://us2.php.net/distributions/php-${PV}.tar.bz2\
+ file://autotools.patch;patch=1 \
+ file://acinclude-xml2-config.patch;patch=1 \
+ file://pear-makefile.patch;patch=1 \
"
-
S = "${WORKDIR}/php-${PV}"
-PR = "r0"
+PR = "r1"
inherit autotools
@@ -14,28 +17,29 @@ export THREADS="pthread"
export LIBS=" -lpthread "
CFLAGS += " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED"
-
EXTRA_OECONF = " --without-iconv \
--enable-discard-path \
--enable-sockets \
--enable-memory-limit \
--enable-wddx \
- --with-zlib"
+ --enable-embedded-mysqli \
+ --enable-magic-quotes \
+ --with-zlib \
+ --with-mysql="${STAGING_DIR}/${TARGET_SYS}" \
+ --with-mysqli="${STAGING_BINDIR_NATIVE}/mysql_config" \
+"
-EXTRA_OECONF += " --without-pear --with-libxml-dir=${STAGING_BINDIR} "
-export LD_LIBRARY_PATH = "${STAGING_LIBDIR}"
-# Uncomment the following two lines, and comment the above to enable PEAR
-#EXTRA_OECONF += " --with-pear-php-cli=${STAGING_BINDIR_NATIVE}/php"
-#DEPENDS += " php-native"
-acpaths = ""
-do_configure () {
- autoreconf
-ac_cv_php_xml2_config_path=${STAGING_BINDIR_CROSS}/xml2-config oe_runconf
-}
+# Uncomment the following two lines, and comment the above to enable PEAR
+EXTRA_OECONF += " --with-pear-php-cli=${STAGING_BINDIR} --with-libxml-dir=${STAGING_BINDIR}"
+
+export LD_LIBRARY_PATH = "${STAGING_LIBDIR}"
+export PHP_NATIVE_DIR="${STAGING_BINDIR_NATIVE}"
+export PHP_PEAR_PHP_BIN="/usr/bin/php"
+acpaths = ""
do_configure_append() {
find ${S} -type f | xargs sed -i 's:I/usr/include:I${STAGING_INCDIR}:g'
@@ -45,3 +49,44 @@ do_install () {
oe_runmake 'INSTALL_ROOT=${D}' install
}
+
+
+PACKAGES = "${PN}-dbg \
+ ${PN}-cli \
+ ${PN}-pear \
+ ${PN}-dev \
+ ${PN} \
+"
+
+
+FILES_${PN}-dbg ="/usr/bin/.debug"
+
+FILES_${PN}-cli ="/usr/bin/php"
+
+FILES_${PN}-pear ="/usr/bin/pear* /usr/bin/pecl \
+ /usr/lib/php/PEAR \
+ /usr/lib/php/PEAR.php \
+ /usr/lib/php/System.php /usr/lib/php/peclcmd.php /usr/lib/php/pearcmd.php \
+ /usr/lib/php/.channels /usr/lib/php/.channels/.alias \
+ /usr/lib/php/.channels\__uri.reg \
+ /usr/lib/php/.channels\pear.php.net.reg /usr/lib/php/.channels/pecl.php.net.reg \
+ /usr/lib/php/.registry \
+ /usr/lib/php/Archive/Tar.php \
+ /usr/lib/php/Console/Getopt.php /usr/lib/php/OS/Guess.php \
+ /usr/lib/php/.depdb /usr/lib/php/.depdblock /usr/lib/php/.filemap \
+ /usr/lib/php/.lock"
+
+
+FILES_${PN}-dev ="/usr/include/php /usr/include/build \
+ /usr/bin/phpize /usr/bin/php-config"
+
+FILES_${PN} ="/usr/lib/php"
+FILES_${PN} +="/usr/bin"
+
+
+
+RDEPENDS_${PN}-pear =${PN}
+RDEPENDS_${PN}-cli =${PN}
+RDEPENDS_${PN}-dev =${PN}
+
+