Patchwork [meta-webserver,3/6] modphp: add from OE-Classic

login
register
mail settings
Submitter Paul Eggleton
Date Oct. 1, 2012, 4:14 p.m.
Message ID <f4fa3e7556b5456ed8f9e5450669ab108bd08325.1349107616.git.paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/37561/
State Superseded
Headers show

Comments

Paul Eggleton - Oct. 1, 2012, 4:14 p.m.
No modifications in this commit (apart from not copying some unneeded
files).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 .../recipes-php/modphp/files/70_mod_php5.conf      |   12 ++++
 .../recipes-php/modphp/files/configure.patch       |   11 ++++
 meta-webserver/recipes-php/modphp/modphp5.inc      |   66 ++++++++++++++++++++
 meta-webserver/recipes-php/modphp/modphp_5.1.6.bb  |    5 ++
 4 files changed, 94 insertions(+)
 create mode 100644 meta-webserver/recipes-php/modphp/files/70_mod_php5.conf
 create mode 100644 meta-webserver/recipes-php/modphp/files/configure.patch
 create mode 100644 meta-webserver/recipes-php/modphp/modphp5.inc
 create mode 100644 meta-webserver/recipes-php/modphp/modphp_5.1.6.bb
Koen Kooi - Oct. 3, 2012, 10:20 a.m.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 01-10-12 18:14, Paul Eggleton schreef:
> No modifications in this commit (apart from not copying some unneeded 
> files).
> 
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> --- 
> .../recipes-php/modphp/files/70_mod_php5.conf      |   12 ++++ 
> .../recipes-php/modphp/files/configure.patch       |   11 ++++ 
> meta-webserver/recipes-php/modphp/modphp5.inc      |   66
> ++++++++++++++++++++ meta-webserver/recipes-php/modphp/modphp_5.1.6.bb  |
> 5 ++ 4 files changed, 94 insertions(+) create mode 100644
> meta-webserver/recipes-php/modphp/files/70_mod_php5.conf create mode
> 100644 meta-webserver/recipes-php/modphp/files/configure.patch create
> mode 100644 meta-webserver/recipes-php/modphp/modphp5.inc create mode
> 100644 meta-webserver/recipes-php/modphp/modphp_5.1.6.bb

> +++ b/meta-webserver/recipes-php/modphp/modphp5.inc @@ -0,0 +1,66 @@ 
> +SECTION = "console/network" +DESCRIPTION = "A server-side, HTML-embedded
> scripting language. This package provides the apache php module." 
> +LICENSE = "PHP" +RDEPENDS_${PN} = "apache2"

That one goes below do_installed

> +DEPENDS = "apache2-native apache2 zlib" + +#SRC_URI =
> "http://de3.php.net/distributions/php-${PV}.tar.bz2 \

remove that one

> +SRC_URI = "http://museum.php.net/php5/php-${PV}.tar.bz2 \ +
> file://configure.patch \ +	  " + +S = "${WORKDIR}/php-${PV}" + +inherit
> autotools + +FILES_${PN} = "${libdir}/apache2 /etc"

$sysconfdir

> +FILES_${PN}-dbg += "${libdir}/apache2/modules/.debug"

and move below do_install

> + +CFLAGS += " -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED
> -I${STAGING_INCDIR_NATIVE}/apache2" + +EXTRA_OECONF =
> "--with-apxs2=${STAGING_BINDIR_NATIVE}/apxs \ +
> --without-mysql \ +		--enable-force-cgi-redirect \ +		--disable-cgi \ +
> --disable-cli \ +		--disable-pdo \ +		--without-pear \ +		--without-iconv
> \ +		--disable-ipv6 \ +		--disable-xml \ +		--disable-xmlreader \ +
> --disable-xmlwriter \ +		--disable-simplexml \ +		--disable-libxml \ +
> --disable-dom \ +                --with-zlib
> --with-zlib-dir=${STAGING_DIR}${layout_exec_prefix}/.. \ +
> --with-config-file-path=/etc/php/apache2-php5"

whitespace errors

> +#		--with-libxml-dir=${STAGING_DIR_NATIVE}${layout_exec_prefix} \

remove

> + +# to get postgres support, add it to the DEPENDS above +# and
> uncomment this line.  similar for mysql +#EXTRA_OECONF += "
> --with-pgsql=${STAGING_DIR_HOST}${layout_exec_prefix}"

That is a PACKAGECONFIG change

> + +acpaths = "" + +# +# override the autotools do_configure, which runs
> autoconf, +# which breaks everything... +# +do_configure() { +	export
> PHP_LIBXML_DIR=${STAGING_DIR_NATIVE}${layout_exec_prefix} +	oe_runconf 
> +} + +# +do_install  () { +	install -d ${D}/usr/lib/apache2/modules +
> install -d ${D}/etc/apache2/modules.d +	install -d
> ${D}/etc/php/apache2-php5 +	install -m 755  libs/libphp5.so
> ${D}/usr/lib/apache2/modules +	install -m 644
> ${FILESDIR}/70_mod_php5.conf ${D}/etc/apache2/modules.d +	cat
> ${S}/php.ini-dist | \ +		sed -e 's,extension_dir = \"\./\",extension_dir
> = \"/usr/lib/extensions\",' \ +		> ${D}/etc/php/apache2-php5/php.ini +} 
> diff --git a/meta-webserver/recipes-php/modphp/modphp_5.1.6.bb
> b/meta-webserver/recipes-php/modphp/modphp_5.1.6.bb new file mode 100644 
> index 0000000..a75a742 --- /dev/null +++
> b/meta-webserver/recipes-php/modphp/modphp_5.1.6.bb @@ -0,0 +1,5 @@ 
> +include modphp5.inc +PR ='r3'

Double quotes are preferred, but I'm tempted to just say "drop the PR entirely"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFQbBFgMkyGM64RGpERAjzhAKCFrTB4bqQDEswgWaZVJbvNNnmL5ACcDNWE
idJglUy51wBG+1VggE9KRnM=
=rykS
-----END PGP SIGNATURE-----
Paul Eggleton - Oct. 3, 2012, 11:28 a.m.
On Wednesday 03 October 2012 12:20:16 Koen Kooi wrote:
> Op 01-10-12 18:14, Paul Eggleton schreef:
> > No modifications in this commit (apart from not copying some unneeded
> > files).

Again, this is the OE-Classic version prior to updating/fixing.

> > +RDEPENDS_${PN} = "apache2"
> 
> That one goes below do_installed

Fixed in the branch.

> > +DEPENDS = "apache2-native apache2 zlib" + +#SRC_URI =
> > "http://de3.php.net/distributions/php-${PV}.tar.bz2 \
> 
> remove that one

Already removed in the patch following.
 
> > +SRC_URI = "http://museum.php.net/php5/php-${PV}.tar.bz2 \ +
> > file://configure.patch \ +	  " + +S = "${WORKDIR}/php-${PV}" + +inherit
> > autotools + +FILES_${PN} = "${libdir}/apache2 /etc"
> 
> $sysconfdir

Already fixed in the patch following.

> > +FILES_${PN}-dbg += "${libdir}/apache2/modules/.debug"
> 
> and move below do_install

Already fixed in the patch following. 

> > + +CFLAGS += " -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED
> > -I${STAGING_INCDIR_NATIVE}/apache2" + +EXTRA_OECONF =
> > "--with-apxs2=${STAGING_BINDIR_NATIVE}/apxs \ +
> > --without-mysql \ +		--enable-force-cgi-redirect \ +		--disable-cgi 
\ +
> > --disable-cli \ +		--disable-pdo \ +		--without-pear \ +		--
without-iconv
> > \ +		--disable-ipv6 \ +		--disable-xml \ +		--disable-xmlreader \ +
> > --disable-xmlwriter \ +		--disable-simplexml \ +		--disable-libxml 
\ +
> > --disable-dom \ +                --with-zlib
> > --with-zlib-dir=${STAGING_DIR}${layout_exec_prefix}/.. \ +
> > --with-config-file-path=/etc/php/apache2-php5"
> 
> whitespace errors

Already fixed in the patch following. (Did you look at those patches?)
 
> > +#		--with-libxml-dir=${STAGING_DIR_NATIVE}${layout_exec_prefix} \
> 
> remove

OK, I'll give you that one. Fixed in the branch.

> > + +# to get postgres support, add it to the DEPENDS above +# and
> > uncomment this line.  similar for mysql +#EXTRA_OECONF += "
> > --with-pgsql=${STAGING_DIR_HOST}${layout_exec_prefix}"
> 
> That is a PACKAGECONFIG change

We can make that enhancement at a later date, until then the comment is 
helpful.

> > diff --git a/meta-webserver/recipes-php/modphp/modphp_5.1.6.bb
> > b/meta-webserver/recipes-php/modphp/modphp_5.1.6.bb new file mode 100644
> > index 0000000..a75a742 --- /dev/null +++
> > b/meta-webserver/recipes-php/modphp/modphp_5.1.6.bb @@ -0,0 +1,5 @@
> > +include modphp5.inc 
> > +PR ='r3'
> 
> Double quotes are preferred, but I'm tempted to just say "drop the PR
> entirely"

I've already set it to "r0" using double quotes in the patch following.

Cheers,
Paul
Koen Kooi - Oct. 3, 2012, 11:44 a.m.
Op 3 okt. 2012, om 13:28 heeft Paul Eggleton <paul.eggleton@linux.intel.com> het volgende geschreven:

> On Wednesday 03 October 2012 12:20:16 Koen Kooi wrote:
>> 
> 
> Already fixed in the patch following. (Did you look at those patches?)

Not at the time of the email, I went patch-by-patch.

Patch

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 0000000..1de6fb1
--- /dev/null
+++ b/meta-webserver/recipes-php/modphp/files/70_mod_php5.conf
@@ -0,0 +1,12 @@ 
+# vim: ft=apache sw=4 ts=4
+<IfDefine PHP5>
+	# Load the module first
+	<IfModule !sapi_apache2.c>
+		LoadModule php5_module    lib/apache2/modules/libphp5.so
+	</IfModule>
+
+	# Set it to handle the files
+	AddHandler php5-script .php .phtml .php3 .php4 .php5
+	AddType application/x-httpd-php-source .phps
+	DirectoryIndex index.html index.html.var index.php index.phtml
+</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 0000000..c5334c7
--- /dev/null
+++ b/meta-webserver/recipes-php/modphp/files/configure.patch
@@ -0,0 +1,11 @@ 
+--- php-5.1.6/configure.old	2006-09-12 07:54:14.000000000 -0700
++++ php-5.1.6/configure	2006-09-12 07:54:37.000000000 -0700
+@@ -14715,8 +14715,6 @@
+ 
+ 
+ 
+-  unset ac_cv_func_dlopen
+-  unset ac_cv_func___dlopen
+   unset found
+   
+   echo $ac_n "checking for dlopen""... $ac_c" 1>&6
diff --git a/meta-webserver/recipes-php/modphp/modphp5.inc b/meta-webserver/recipes-php/modphp/modphp5.inc
new file mode 100644
index 0000000..9158c08
--- /dev/null
+++ b/meta-webserver/recipes-php/modphp/modphp5.inc
@@ -0,0 +1,66 @@ 
+SECTION = "console/network"
+DESCRIPTION = "A server-side, HTML-embedded scripting language. This package provides the apache php module."
+LICENSE = "PHP"
+RDEPENDS_${PN} = "apache2"
+DEPENDS = "apache2-native apache2 zlib"
+
+#SRC_URI = "http://de3.php.net/distributions/php-${PV}.tar.bz2 \
+SRC_URI = "http://museum.php.net/php5/php-${PV}.tar.bz2 \
+	   file://configure.patch \
+	  "
+
+S = "${WORKDIR}/php-${PV}"
+
+inherit autotools
+
+FILES_${PN} = "${libdir}/apache2 /etc"
+FILES_${PN}-dbg += "${libdir}/apache2/modules/.debug"
+
+CFLAGS += " -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I${STAGING_INCDIR_NATIVE}/apache2"
+
+EXTRA_OECONF = "--with-apxs2=${STAGING_BINDIR_NATIVE}/apxs \
+                --without-mysql \
+		--enable-force-cgi-redirect \
+		--disable-cgi \
+		--disable-cli \
+		--disable-pdo \
+		--without-pear \
+		--without-iconv \
+		--disable-ipv6 \
+		--disable-xml \
+		--disable-xmlreader \
+		--disable-xmlwriter \
+		--disable-simplexml \
+		--disable-libxml \
+		--disable-dom \
+                --with-zlib --with-zlib-dir=${STAGING_DIR}${layout_exec_prefix}/.. \
+                --with-config-file-path=/etc/php/apache2-php5"
+
+#		--with-libxml-dir=${STAGING_DIR_NATIVE}${layout_exec_prefix} \
+
+# to get postgres support, add it to the DEPENDS above
+# and uncomment this line.  similar for mysql
+#EXTRA_OECONF += " --with-pgsql=${STAGING_DIR_HOST}${layout_exec_prefix}"
+
+acpaths = ""
+
+#
+# override the autotools do_configure, which runs autoconf,
+# which breaks everything...
+#
+do_configure() {
+	export PHP_LIBXML_DIR=${STAGING_DIR_NATIVE}${layout_exec_prefix} 
+	oe_runconf
+}
+
+#
+do_install  () {
+	install -d ${D}/usr/lib/apache2/modules 
+	install -d ${D}/etc/apache2/modules.d 
+	install -d ${D}/etc/php/apache2-php5
+	install -m 755  libs/libphp5.so ${D}/usr/lib/apache2/modules
+	install -m 644  ${FILESDIR}/70_mod_php5.conf ${D}/etc/apache2/modules.d
+	cat ${S}/php.ini-dist | \
+		sed -e 's,extension_dir = \"\./\",extension_dir = \"/usr/lib/extensions\",' \
+		> ${D}/etc/php/apache2-php5/php.ini
+}
diff --git a/meta-webserver/recipes-php/modphp/modphp_5.1.6.bb b/meta-webserver/recipes-php/modphp/modphp_5.1.6.bb
new file mode 100644
index 0000000..a75a742
--- /dev/null
+++ b/meta-webserver/recipes-php/modphp/modphp_5.1.6.bb
@@ -0,0 +1,5 @@ 
+include modphp5.inc
+PR ='r3'
+
+SRC_URI[md5sum] = "08e423aa314369d4392a36b3f7246afc"
+SRC_URI[sha256sum] = "3e9510ce715f28b7e6b803fcdadb73b37c83792c0b5e1e9bcb066ab972649996"