From 1b8dfe266937a37a4c642f96ceb2347bf4c00a17 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Fri, 10 Oct 2014 03:20:04 +0200 Subject: initial commit for Enea Linux 4.0-140929 Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea --- .../recipes-php/modphp/files/70_mod_php5.conf | 12 +++ .../recipes-php/modphp/files/configure.patch | 11 +++ .../modphp/files/pthread-check-threads-m4.patch | 30 ++++++ meta-webserver/recipes-php/modphp/modphp5.inc | 104 +++++++++++++++++++++ meta-webserver/recipes-php/modphp/modphp_5.5.10.bb | 7 ++ .../recipes-php/phpmyadmin/phpmyadmin/apache.conf | 42 +++++++++ .../recipes-php/phpmyadmin/phpmyadmin_4.1.9.bb | 31 ++++++ meta-webserver/recipes-php/xdebug/xdebug_2.2.3.bb | 35 +++++++ 8 files changed, 272 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/files/pthread-check-threads-m4.patch create mode 100644 meta-webserver/recipes-php/modphp/modphp5.inc create mode 100644 meta-webserver/recipes-php/modphp/modphp_5.5.10.bb create mode 100644 meta-webserver/recipes-php/phpmyadmin/phpmyadmin/apache.conf create mode 100644 meta-webserver/recipes-php/phpmyadmin/phpmyadmin_4.1.9.bb create mode 100644 meta-webserver/recipes-php/xdebug/xdebug_2.2.3.bb (limited to 'meta-webserver/recipes-php') 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 0000000000..1de6fb11ac --- /dev/null +++ b/meta-webserver/recipes-php/modphp/files/70_mod_php5.conf @@ -0,0 +1,12 @@ +# vim: ft=apache sw=4 ts=4 + + # Load the module first + + LoadModule php5_module lib/apache2/modules/libphp5.so + + + # 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 + 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 0000000000..c5334c706e --- /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/files/pthread-check-threads-m4.patch b/meta-webserver/recipes-php/modphp/files/pthread-check-threads-m4.patch new file mode 100644 index 0000000000..0c564cd88e --- /dev/null +++ b/meta-webserver/recipes-php/modphp/files/pthread-check-threads-m4.patch @@ -0,0 +1,30 @@ +From d8067ceacbf54e79c9c6b68675332c09eaa0b55d Mon Sep 17 00:00:00 2001 +From: Jackie Huang +Date: Mon, 8 Apr 2013 14:29:51 +0800 +Subject: [PATCH] pthread-check + +Enable pthreads support when cross-compiling + +Upstream-Status: Inapproprate [config] + +Signed-off-by: Jackie Huang +--- + TSRM/threads.m4 | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/TSRM/threads.m4 b/TSRM/threads.m4 +index 38494ce..15d9454 100644 +--- a/TSRM/threads.m4 ++++ b/TSRM/threads.m4 +@@ -86,7 +86,7 @@ int main() { + 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 +-- +1.7.4.1 + diff --git a/meta-webserver/recipes-php/modphp/modphp5.inc b/meta-webserver/recipes-php/modphp/modphp5.inc new file mode 100644 index 0000000000..a1d550de30 --- /dev/null +++ b/meta-webserver/recipes-php/modphp/modphp5.inc @@ -0,0 +1,104 @@ +SECTION = "console/network" +DESCRIPTION = "A server-side, HTML-embedded scripting language. This package provides the apache php module." +LICENSE = "PHP-3.0" +INC_PR = "r1" +DEPENDS = "apache2-native apache2 zlib bzip2 libmcrypt" + +SRC_URI = "http://www.php.net/distributions/php-${PV}.tar.bz2 \ + file://configure.patch \ + file://pthread-check-threads-m4.patch \ + file://70_mod_php5.conf \ +" + +S = "${WORKDIR}/php-${PV}" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=5bb09683f8f09b15b7076f4b4c31d61f" + +inherit autotools + +CFLAGS += " -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I${STAGING_INCDIR}/apache2" + +EXTRA_OECONF = "--with-apxs2=${STAGING_BINDIR_CROSS}/apxs \ + --with-pic \ + --enable-maintainer-zts \ + --without-mysql \ + --disable-cgi \ + --disable-cli \ + --disable-pdo \ + --without-pear \ + --without-iconv \ + --disable-ipv6 \ + --disable-xml \ + --disable-xmlreader \ + --disable-xmlwriter \ + --disable-simplexml \ + --disable-libxml \ + --disable-dom \ + --disable-rpath \ + --libdir=${libdir}/php5 \ + --with-zlib --with-zlib-dir=${STAGING_DIR_TARGET}${exec_prefix} \ + --with-bz2=${STAGING_DIR_TARGET}${exec_prefix} \ + --with-mcrypt=${STAGING_DIR_TARGET}${exec_prefix} \ + --enable-zip \ + --enable-mbstring \ + --with-config-file-path=${sysconfdir}/php/apache2-php5 \ + ${@base_conditional('SITEINFO_ENDIANNESS', 'le', 'ac_cv_c_bigendian_php=no', 'ac_cv_c_bigendian_php=yes', d)}" + +PACKAGECONFIG ??= "mysql" +PACKAGECONFIG[mysql] = "--with-mysqli=${STAGING_BINDIR_CROSS}/mysql_config,--without-mysqli,mysql5" +PACKAGECONFIG[pgsql] = "--with-pgsql=${STAGING_DIR_TARGET}${exec_prefix},--without-pgsql,mysql5" + +acpaths = "" + +do_configure_prepend () { + rm -f ${S}/build/libtool.m4 ${S}/ltmain.sh ${S}/aclocal.m4 + find ${S} -name config.m4 | xargs -n1 sed -i 's!APXS_HTTPD=.*!APXS_HTTPD=${STAGING_BINDIR_NATIVE}/httpd!' +} + +do_configure_append() { + # No libtool, we really don't want rpath set... + sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' ${HOST_SYS}-libtool + sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' ${HOST_SYS}-libtool +} + +do_install () { + install -d ${D}${libdir}/apache2/modules + install -d ${D}${sysconfdir}/apache2/modules.d + install -d ${D}${sysconfdir}/php/apache2-php5 + install -m 755 libs/libphp5.so ${D}${libdir}/apache2/modules + install -m 644 ${WORKDIR}/70_mod_php5.conf ${D}${sysconfdir}/apache2/modules.d + sed -i s,lib/,${libdir}/, ${D}${sysconfdir}/apache2/modules.d/70_mod_php5.conf + cat ${S}/php.ini-production | \ + sed -e 's,extension_dir = \"\./\",extension_dir = \"/usr/lib/extensions\",' \ + > ${D}${sysconfdir}/php/apache2-php5/php.ini + + install -d ${D}${bindir} + install -m 755 scripts/phpize ${D}${bindir} + install -m 755 scripts/php-config ${D}${bindir} + cat aclocal-copy/libtool.m4 aclocal-copy/lt~obsolete.m4 aclocal-copy/ltoptions.m4 \ + aclocal-copy/ltsugar.m4 aclocal-copy/ltversion.m4 > ${S}/build/libtool.m4 + + oe_runmake install-build install-headers INSTALL_ROOT=${D} +} + +SYSROOT_PREPROCESS_FUNCS += "php_sysroot_preprocess" + +php_sysroot_preprocess () { + install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/ + install -m 755 ${D}${bindir}/phpize ${SYSROOT_DESTDIR}${bindir_crossscripts}/ + install -m 755 ${D}${bindir}/php-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/ + + sed -i 's!eval echo /!eval echo ${STAGING_DIR_HOST}/!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/phpize + sed -i 's!^include_dir=.*!include_dir=${STAGING_INCDIR}/php!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/php-config +} + +# phpize is not scanned for absolute paths by default (but php-config is). +# +SSTATE_SCAN_FILES += "phpize" + +RDEPENDS_${PN} = "apache2" + +FILES_${PN} = "${libdir}/apache2 ${sysconfdir}" +FILES_${PN}-dev += "${bindir}/phpize ${bindir}/php-config ${libdir}/php5" +FILES_${PN}-dbg += "${libdir}/apache2/modules/.debug" + 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 0000000000..fcdb11e9a0 --- /dev/null +++ b/meta-webserver/recipes-php/modphp/modphp_5.5.10.bb @@ -0,0 +1,7 @@ +include modphp5.inc + +EXTRA_OECONF += "--disable-opcache" + +SRC_URI[md5sum] = "d608230c7890b6a0cc5b92e66e866226" +SRC_URI[sha256sum] = "bb34e61f8e6f56c612867bfe85d144d5045cd5e44497539bc126a4e8c6795419" + 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 0000000000..94cbd865c6 --- /dev/null +++ b/meta-webserver/recipes-php/phpmyadmin/phpmyadmin/apache.conf @@ -0,0 +1,42 @@ +# phpMyAdmin default Apache configuration + +Alias /phpmyadmin /usr/share/phpmyadmin + + + Options FollowSymLinks + DirectoryIndex index.php + Require all granted + + + AddType application/x-httpd-php .php + + php_flag magic_quotes_gpc Off + php_flag track_vars On + php_flag register_globals Off + php_admin_flag allow_url_fopen Off + php_value include_path . + php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp + php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/ + + + +# Authorize for setup + + + AuthType Basic + AuthName "phpMyAdmin Setup" + AuthUserFile /etc/phpmyadmin/htpasswd.setup + + Require valid-user + + +# Disallow web access to directories that don't need it + + Order Deny,Allow + Deny from All + + + Order Deny,Allow + Deny from All + + 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 0000000000..cd158891dd --- /dev/null +++ b/meta-webserver/recipes-php/phpmyadmin/phpmyadmin_4.1.9.bb @@ -0,0 +1,31 @@ +SUMMARY = "Web-based MySQL administration interface" +HOMEPAGE = "http://www.phpmyadmin.net" +# Main code is GPLv2, libraries/tcpdf is under LGPLv3, js/jquery is under MIT +LICENSE = "GPLv2 & LGPLv3 & MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=eb723b61539feef013de476e68b5c50a \ + file://libraries/tcpdf/LICENSE.TXT;md5=5c87b66a5358ebcc495b03e0afcd342c" + +SRC_URI = "${SOURCEFORGE_MIRROR}/phpmyadmin/phpMyAdmin/${PV}/phpMyAdmin-${PV}-all-languages.tar.xz \ + file://apache.conf" + +SRC_URI[md5sum] = "420c836228ceab8df5557c92e56021d7" +SRC_URI[sha256sum] = "efc5bd669324cd094cc1912afee9c91fd052fe9f226f767f7ec7b31a1796ce2c" + +S = "${WORKDIR}/phpMyAdmin-${PV}-all-languages" + +inherit allarch + +do_install() { + install -d ${D}${datadir}/${BPN} + cp -a * ${D}${datadir}/${BPN} + + install -d ${D}${sysconfdir}/apache2/conf.d + install -m 0644 ${WORKDIR}/apache.conf ${D}${sysconfdir}/apache2/conf.d/phpmyadmin.conf + + # Remove a few scripts that explicitly require bash (!) + rm -f ${D}${datadir}/phpmyadmin/libraries/transformations/*.sh +} + +FILES_${PN} = "${datadir}/${BPN} \ + ${sysconfdir}/apache2/conf.d" + 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 0000000000..3c4d8e4024 --- /dev/null +++ b/meta-webserver/recipes-php/xdebug/xdebug_2.2.3.bb @@ -0,0 +1,35 @@ +SUMMARY = "Debugging and profiling extension for PHP" +LICENSE = "Xdebug" +LIC_FILES_CHKSUM = "file://LICENSE;md5=34df3a274aa12b795417c65634c07f16" + +DEPENDS = "modphp" + + +SRC_URI = "http://xdebug.org/files/xdebug-${PV}.tgz" + +SRC_URI[md5sum] = "e49cec9861b45dc0b36eae33bf8a14fa" +SRC_URI[sha256sum] = "b351872da46ed8378dff90a87673f5ec1e0bdd94324558ebc898e1d115e9d71c" + +inherit autotools + +EXTRA_OECONF += "--enable-xdebug -with-php-config=${STAGING_BINDIR_CROSS}/php-config" + +do_configure() { + cd ${S} + ${STAGING_BINDIR_CROSS}/phpize + cd ${B} + + # Running autoreconf as autotools_do_configure would do here + # breaks the libtool configuration resulting in a failure later + # in do_compile. It's possible this may be fixable, however the + # easiest course of action for the moment is to avoid doing that. + oe_runconf +} + +do_install() { + oe_runmake install INSTALL_ROOT=${D} +} + +FILES_${PN} += "${libdir}/php5/extensions/*/*.so" +FILES_${PN}-dbg += "${libdir}/php5/extensions/*/.debug" + -- cgit v1.2.3-54-g00ecf