summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/php/php_5.4.14.bb
diff options
context:
space:
mode:
authorKoen Kooi <koen.kooi@linaro.org>2014-10-06 11:54:59 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2014-10-10 12:47:34 +0200
commit26043cbe2d9add3ab1f6464e647d04f0e077aede (patch)
tree4bd0ad0b815867f78a0d2f785e70dd15bcbfa2df /meta-oe/recipes-devtools/php/php_5.4.14.bb
parent3f0c898617248f18facd949b8ffdb39e5abbd21f (diff)
downloadmeta-openembedded-26043cbe2d9add3ab1f6464e647d04f0e077aede.tar.gz
php 5.4.14: merge .inc and .bb
There's only one version of the recipe in the repo and the split makes it harder to debug and fix problems. Also fix target overrides and style issues. Signed-off-by: Koen Kooi <koen.kooi@linaro.org> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools/php/php_5.4.14.bb')
-rw-r--r--meta-oe/recipes-devtools/php/php_5.4.14.bb146
1 files changed, 138 insertions, 8 deletions
diff --git a/meta-oe/recipes-devtools/php/php_5.4.14.bb b/meta-oe/recipes-devtools/php/php_5.4.14.bb
index 3c9d3c0e8..98a8cdc6a 100644
--- a/meta-oe/recipes-devtools/php/php_5.4.14.bb
+++ b/meta-oe/recipes-devtools/php/php_5.4.14.bb
@@ -1,15 +1,29 @@
1require php.inc 1DESCRIPTION = "A server-side, HTML-embedded scripting language. This package provides the CGI."
2HOMEPAGE = "http://www.php.net"
3SECTION = "console/network"
2 4
5LICENSE = "PHP-3.0"
3LIC_FILES_CHKSUM = "file://LICENSE;md5=cb564efdf78cce8ea6e4b5a4f7c05d97" 6LIC_FILES_CHKSUM = "file://LICENSE;md5=cb564efdf78cce8ea6e4b5a4f7c05d97"
4 7
5PR = "${INC_PR}.0" 8BBCLASSEXTEND = "native"
9DEPENDS = "zlib libxml2 virtual/libiconv php-native lemon-native \
10 libc-client openssl"
11DEPENDS_virtclass-native = "zlib-native libxml2-native"
6 12
7SRC_URI += "file://acinclude-xml2-config.patch \ 13PR = "r6"
8 file://0001-php-don-t-use-broken-wrapper-for-mkdir.patch \
9 file://0001-acinclude-use-pkgconfig-for-libxml2-config.patch \
10 "
11 14
12SRC_URI_append_pn-php += "file://iconv.patch \ 15# The new PHP downloads server groups PHP releases by major version so find
16# the major version of the PHP recipe.
17PHP_MAJVER = "${@d.getVar('PV',1).split('.')[0]}"
18
19SRC_URI = "http://museum.php.net/php${PHP_MAJVER}/php-${PV}.tar.bz2 \
20 file://acinclude-xml2-config.patch \
21 file://0001-php-don-t-use-broken-wrapper-for-mkdir.patch \
22 file://0001-acinclude-use-pkgconfig-for-libxml2-config.patch \
23 "
24
25SRC_URI_append_class-target += " \
26 file://iconv.patch \
13 file://imap-fix-autofoo.patch \ 27 file://imap-fix-autofoo.patch \
14 file://pear-makefile.patch \ 28 file://pear-makefile.patch \
15 file://phar-makefile.patch \ 29 file://phar-makefile.patch \
@@ -17,7 +31,123 @@ SRC_URI_append_pn-php += "file://iconv.patch \
17 file://fix-fpm-cross-compile.patch \ 31 file://fix-fpm-cross-compile.patch \
18 file://php-fpm.conf \ 32 file://php-fpm.conf \
19 file://php-fpm-apache.conf \ 33 file://php-fpm-apache.conf \
20" 34 "
21 35
22SRC_URI[md5sum] = "cfdc044be2c582991a1fe0967898fa38" 36SRC_URI[md5sum] = "cfdc044be2c582991a1fe0967898fa38"
23SRC_URI[sha256sum] = "5450f3843bc651eb3fb00601f0cce1930aaaf65c7c966c02fe4a46f9c81be20a" 37SRC_URI[sha256sum] = "5450f3843bc651eb3fb00601f0cce1930aaaf65c7c966c02fe4a46f9c81be20a"
38
39S = "${WORKDIR}/php-${PV}"
40
41inherit autotools pkgconfig pythonnative gettext
42
43SSTATE_SCAN_FILES += "build-defs.h"
44
45# Common EXTRA_OECONF
46COMMON_EXTRA_OECONF = "--enable-sockets --enable-pcntl --enable-shared"
47EXTRA_OECONF = "--enable-mbstring \
48 --enable-wddx \
49 --enable-fpm \
50 --with-imap=${STAGING_DIR_HOST} \
51 --with-gettext=${STAGING_LIBDIR}/.. \
52 --with-imap-ssl=${STAGING_DIR_HOST} \
53 --with-zlib=${STAGING_LIBDIR}/.. \
54 --with-iconv=${STAGING_LIBDIR}/.. \
55 ${COMMON_EXTRA_OECONF} \
56"
57EXTRA_OECONF_virtclass-native = " \
58 --with-zlib=${STAGING_LIBDIR_NATIVE}/.. \
59 --without-iconv \
60 ${COMMON_EXTRA_OECONF} \
61"
62
63PACKAGECONFIG ??= "mysql sqlite3"
64PACKAGECONFIG_class-native = ""
65
66PACKAGECONFIG[mysql] = "--with-mysql=${STAGING_DIR_TARGET}${prefix} \
67 --with-mysqli=${STAGING_BINDIR_CROSS}/mysql_config \
68 --with-pdo-mysql=${STAGING_BINDIR_CROSS}/mysql_config \
69 , \
70 ,mysql5"
71
72PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_LIBDIR}/.. \
73 --with-pdo-sqlite=${STAGING_LIBDIR}/.. \
74 , \
75 ,sqlite3"
76
77export PHP_NATIVE_DIR = "${STAGING_BINDIR_NATIVE}"
78export PHP_PEAR_PHP_BIN = "${STAGING_BINDIR_NATIVE}/php"
79CFLAGS += " -D_GNU_SOURCE"
80
81EXTRA_OEMAKE = "INSTALL_ROOT=${D}"
82
83acpaths = ""
84
85do_install_append_class-native() {
86 rm -rf ${D}/${libdir}/php/.registry
87 rm -rf ${D}/${libdir}/php/.channels
88 rm -rf ${D}/${libdir}/php/.[a-z]*
89}
90
91# fixme
92do_install_append_class-target() {
93 install -d ${D}/${sysconfdir}/
94 if [ -d ${D}/${STAGING_DIR_NATIVE}/${sysconfdir} ];then
95 mv ${D}/${STAGING_DIR_NATIVE}/${sysconfdir}/* ${D}/${sysconfdir}/
96 fi
97 rm -rf ${D}/${TMPDIR}
98 rm -rf ${D}/.registry
99 rm -rf ${D}/.channels
100 rm -rf ${D}/.[a-z]*
101 rm -rf ${D}/var
102 rm -f ${D}/${sysconfdir}/php-fpm.conf.default
103 sed -i 's:${STAGING_DIR_NATIVE}::g' ${D}/${sysconfdir}/pear.conf
104 install -m 0644 ${WORKDIR}/php-fpm.conf ${D}/${sysconfdir}/php-fpm.conf
105 install -d ${D}/${sysconfdir}/apache2/conf.d
106 install -m 0644 ${WORKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf
107 install -d ${D}${sysconfdir}/init.d
108 sed -i 's:=/usr/sbin:=${sbindir}:g' ${B}/sapi/fpm/init.d.php-fpm
109 sed -i 's:=/etc:=${sysconfdir}:g' ${B}/sapi/fpm/init.d.php-fpm
110 sed -i 's:=/var:=${localstatedir}:g' ${B}/sapi/fpm/init.d.php-fpm
111 install -m 0755 ${B}/sapi/fpm/init.d.php-fpm ${D}${sysconfdir}/init.d/php-fpm
112 TMP=`dirname ${D}/${TMPDIR}`
113 while test ${TMP} != ${D}; do
114 rmdir ${TMP}
115 TMP=`dirname ${TMP}`;
116 done
117}
118
119PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-cgi ${PN}-fpm ${PN}-fpm-apache2 ${PN}-pear ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}"
120
121RDEPENDS_${PN}-pear = "${PN}"
122RDEPENDS_${PN}-cli = "${PN}"
123RDEPENDS_${PN}-dev = "${PN}"
124
125INITSCRIPT_PACKAGES = "${PN}-fpm"
126inherit update-rc.d
127
128FILES_${PN}-dbg =+ "${bindir}/.debug"
129FILES_${PN}-doc += "${libdir}/php/doc"
130FILES_${PN}-cli = "${bindir}/php"
131FILES_${PN}-cgi = "${bindir}/php-cgi"
132FILES_${PN}-fpm = "${sbindir}/php-fpm ${sysconfdir}/php-fpm.conf ${datadir}/fpm ${sysconfdir}/init.d/php-fpm"
133FILES_${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf"
134CONFFILES_${PN}-fpm = "${sysconfdir}/php-fpm.conf"
135CONFFILES_${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf"
136INITSCRIPT_NAME_${PN}-fpm = "php-fpm"
137INITSCRIPT_PARAMS_${PN}-fpm = "defaults 60"
138FILES_${PN}-pear = "${bindir}/pear* ${bindir}/pecl ${libdir}/php/PEAR \
139 ${libdir}/php/PEAR.php ${libdir}/php/System.php \
140 ${libdir}php/peclcmd.php ${libdir}/php/pearcmd.php \
141 ${libdir}/php/.channels ${libdir}/php/.channels/.alias \
142 ${libdir}/php/.channels\__uri.reg \
143 ${libdir}/php/.channels\pear.php.net.reg \
144 ${libdir}/php/.channels/pecl.php.net.reg \
145 ${libdir}/php/.registry ${libdir}/php/Archive/Tar.php \
146 ${libdir}/php/Console/Getopt.php ${libdir}/php/OS/Guess.php \
147 ${sysconfdir}/pear.conf"
148FILES_${PN}-dev = "${includedir}/php ${libdir}/build ${bindir}/phpize \
149 ${bindir}/php-config ${libdir}/php/.depdb \
150 ${libdir}/php/.depdblock ${libdir}/php/.filemap \
151 ${libdir}/php/.lock ${libdir}/php/test"
152FILES_${PN} = "${libdir}/php"
153FILES_${PN} += "${bindir}"