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 | |
download | meta-openembedded-1b8dfe266937a37a4c642f96ceb2347bf4c00a17.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')
8 files changed, 272 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-threads-m4.patch b/meta-webserver/recipes-php/modphp/files/pthread-check-threads-m4.patch new file mode 100644 index 000000000..0c564cd88 --- /dev/null +++ b/meta-webserver/recipes-php/modphp/files/pthread-check-threads-m4.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From d8067ceacbf54e79c9c6b68675332c09eaa0b55d Mon Sep 17 00:00:00 2001 | ||
2 | From: Jackie Huang <jackie.huang@windriver.com> | ||
3 | Date: Mon, 8 Apr 2013 14:29:51 +0800 | ||
4 | Subject: [PATCH] pthread-check | ||
5 | |||
6 | Enable pthreads support when cross-compiling | ||
7 | |||
8 | Upstream-Status: Inapproprate [config] | ||
9 | |||
10 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
11 | --- | ||
12 | TSRM/threads.m4 | 2 +- | ||
13 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
14 | |||
15 | diff --git a/TSRM/threads.m4 b/TSRM/threads.m4 | ||
16 | index 38494ce..15d9454 100644 | ||
17 | --- a/TSRM/threads.m4 | ||
18 | +++ b/TSRM/threads.m4 | ||
19 | @@ -86,7 +86,7 @@ int main() { | ||
20 | pthreads_working=no | ||
21 | ], [ | ||
22 | dnl For cross compiling running this test is of no use. NetWare supports pthreads | ||
23 | - pthreads_working=no | ||
24 | + pthreads_working=yes | ||
25 | case $host_alias in | ||
26 | *netware*) | ||
27 | pthreads_working=yes | ||
28 | -- | ||
29 | 1.7.4.1 | ||
30 | |||
diff --git a/meta-webserver/recipes-php/modphp/modphp5.inc b/meta-webserver/recipes-php/modphp/modphp5.inc new file mode 100644 index 000000000..a1d550de3 --- /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 | |||
diff --git a/meta-webserver/recipes-php/modphp/modphp_5.5.10.bb b/meta-webserver/recipes-php/modphp/modphp_5.5.10.bb new file mode 100644 index 000000000..fcdb11e9a --- /dev/null +++ b/meta-webserver/recipes-php/modphp/modphp_5.5.10.bb | |||
@@ -0,0 +1,7 @@ | |||
1 | include modphp5.inc | ||
2 | |||
3 | EXTRA_OECONF += "--disable-opcache" | ||
4 | |||
5 | SRC_URI[md5sum] = "d608230c7890b6a0cc5b92e66e866226" | ||
6 | SRC_URI[sha256sum] = "bb34e61f8e6f56c612867bfe85d144d5045cd5e44497539bc126a4e8c6795419" | ||
7 | |||
diff --git a/meta-webserver/recipes-php/phpmyadmin/phpmyadmin/apache.conf b/meta-webserver/recipes-php/phpmyadmin/phpmyadmin/apache.conf new file mode 100644 index 000000000..94cbd865c --- /dev/null +++ b/meta-webserver/recipes-php/phpmyadmin/phpmyadmin/apache.conf | |||
@@ -0,0 +1,42 @@ | |||
1 | # phpMyAdmin default Apache configuration | ||
2 | |||
3 | Alias /phpmyadmin /usr/share/phpmyadmin | ||
4 | |||
5 | <Directory /usr/share/phpmyadmin> | ||
6 | Options FollowSymLinks | ||
7 | DirectoryIndex index.php | ||
8 | Require all granted | ||
9 | |||
10 | <IfModule mod_php5.c> | ||
11 | AddType application/x-httpd-php .php | ||
12 | |||
13 | php_flag magic_quotes_gpc Off | ||
14 | php_flag track_vars On | ||
15 | php_flag register_globals Off | ||
16 | php_admin_flag allow_url_fopen Off | ||
17 | php_value include_path . | ||
18 | php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp | ||
19 | php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/ | ||
20 | </IfModule> | ||
21 | </Directory> | ||
22 | |||
23 | # Authorize for setup | ||
24 | <Directory /usr/share/phpmyadmin/setup> | ||
25 | <IfModule mod_authn_file.c> | ||
26 | AuthType Basic | ||
27 | AuthName "phpMyAdmin Setup" | ||
28 | AuthUserFile /etc/phpmyadmin/htpasswd.setup | ||
29 | </IfModule> | ||
30 | Require valid-user | ||
31 | </Directory> | ||
32 | |||
33 | # Disallow web access to directories that don't need it | ||
34 | <Directory /usr/share/phpmyadmin/libraries> | ||
35 | Order Deny,Allow | ||
36 | Deny from All | ||
37 | </Directory> | ||
38 | <Directory /usr/share/phpmyadmin/setup/lib> | ||
39 | Order Deny,Allow | ||
40 | Deny from All | ||
41 | </Directory> | ||
42 | |||
diff --git a/meta-webserver/recipes-php/phpmyadmin/phpmyadmin_4.1.9.bb b/meta-webserver/recipes-php/phpmyadmin/phpmyadmin_4.1.9.bb new file mode 100644 index 000000000..cd158891d --- /dev/null +++ b/meta-webserver/recipes-php/phpmyadmin/phpmyadmin_4.1.9.bb | |||
@@ -0,0 +1,31 @@ | |||
1 | SUMMARY = "Web-based MySQL administration interface" | ||
2 | HOMEPAGE = "http://www.phpmyadmin.net" | ||
3 | # Main code is GPLv2, libraries/tcpdf is under LGPLv3, js/jquery is under MIT | ||
4 | LICENSE = "GPLv2 & LGPLv3 & MIT" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=eb723b61539feef013de476e68b5c50a \ | ||
6 | file://libraries/tcpdf/LICENSE.TXT;md5=5c87b66a5358ebcc495b03e0afcd342c" | ||
7 | |||
8 | SRC_URI = "${SOURCEFORGE_MIRROR}/phpmyadmin/phpMyAdmin/${PV}/phpMyAdmin-${PV}-all-languages.tar.xz \ | ||
9 | file://apache.conf" | ||
10 | |||
11 | SRC_URI[md5sum] = "420c836228ceab8df5557c92e56021d7" | ||
12 | SRC_URI[sha256sum] = "efc5bd669324cd094cc1912afee9c91fd052fe9f226f767f7ec7b31a1796ce2c" | ||
13 | |||
14 | S = "${WORKDIR}/phpMyAdmin-${PV}-all-languages" | ||
15 | |||
16 | inherit allarch | ||
17 | |||
18 | do_install() { | ||
19 | install -d ${D}${datadir}/${BPN} | ||
20 | cp -a * ${D}${datadir}/${BPN} | ||
21 | |||
22 | install -d ${D}${sysconfdir}/apache2/conf.d | ||
23 | install -m 0644 ${WORKDIR}/apache.conf ${D}${sysconfdir}/apache2/conf.d/phpmyadmin.conf | ||
24 | |||
25 | # Remove a few scripts that explicitly require bash (!) | ||
26 | rm -f ${D}${datadir}/phpmyadmin/libraries/transformations/*.sh | ||
27 | } | ||
28 | |||
29 | FILES_${PN} = "${datadir}/${BPN} \ | ||
30 | ${sysconfdir}/apache2/conf.d" | ||
31 | |||
diff --git a/meta-webserver/recipes-php/xdebug/xdebug_2.2.3.bb b/meta-webserver/recipes-php/xdebug/xdebug_2.2.3.bb new file mode 100644 index 000000000..3c4d8e402 --- /dev/null +++ b/meta-webserver/recipes-php/xdebug/xdebug_2.2.3.bb | |||
@@ -0,0 +1,35 @@ | |||
1 | SUMMARY = "Debugging and profiling extension for PHP" | ||
2 | LICENSE = "Xdebug" | ||
3 | LIC_FILES_CHKSUM = "file://LICENSE;md5=34df3a274aa12b795417c65634c07f16" | ||
4 | |||
5 | DEPENDS = "modphp" | ||
6 | |||
7 | |||
8 | SRC_URI = "http://xdebug.org/files/xdebug-${PV}.tgz" | ||
9 | |||
10 | SRC_URI[md5sum] = "e49cec9861b45dc0b36eae33bf8a14fa" | ||
11 | SRC_URI[sha256sum] = "b351872da46ed8378dff90a87673f5ec1e0bdd94324558ebc898e1d115e9d71c" | ||
12 | |||
13 | inherit autotools | ||
14 | |||
15 | EXTRA_OECONF += "--enable-xdebug -with-php-config=${STAGING_BINDIR_CROSS}/php-config" | ||
16 | |||
17 | do_configure() { | ||
18 | cd ${S} | ||
19 | ${STAGING_BINDIR_CROSS}/phpize | ||
20 | cd ${B} | ||
21 | |||
22 | # Running autoreconf as autotools_do_configure would do here | ||
23 | # breaks the libtool configuration resulting in a failure later | ||
24 | # in do_compile. It's possible this may be fixable, however the | ||
25 | # easiest course of action for the moment is to avoid doing that. | ||
26 | oe_runconf | ||
27 | } | ||
28 | |||
29 | do_install() { | ||
30 | oe_runmake install INSTALL_ROOT=${D} | ||
31 | } | ||
32 | |||
33 | FILES_${PN} += "${libdir}/php5/extensions/*/*.so" | ||
34 | FILES_${PN}-dbg += "${libdir}/php5/extensions/*/.debug" | ||
35 | |||