diff options
author | Roy Li <rongqing.li@windriver.com> | 2015-08-20 16:29:35 +0800 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2015-08-31 20:07:59 +0200 |
commit | 7f478ed5cb7f8ab22b8c96a2d9d20e60ae230a09 (patch) | |
tree | ec286cf17843346ea0b1199916363ab4c6926ccb /meta-oe | |
parent | cb7fdc16d9eb43c1620aabab4f1f938ad27e9337 (diff) | |
download | meta-openembedded-7f478ed5cb7f8ab22b8c96a2d9d20e60ae230a09.tar.gz |
php: create recipe for 5.6.12
The difference between 5.6.x and 5.5.x is in http://php.net/migration56
Most improvements in PHP 5.6.x have no impact on existing code.
There are a few incompatibilities and new features that should be
considered, and code should be tested before switching PHP versions
in production environments.
Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r-- | meta-oe/recipes-devtools/php/php-5.6.12/change-AC_TRY_RUN-to-AC_TRY_LINK.patch | 56 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/php/php.inc | 271 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/php/php_5.5.26.bb | 273 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/php/php_5.6.12.bb | 5 |
4 files changed, 333 insertions, 272 deletions
diff --git a/meta-oe/recipes-devtools/php/php-5.6.12/change-AC_TRY_RUN-to-AC_TRY_LINK.patch b/meta-oe/recipes-devtools/php/php-5.6.12/change-AC_TRY_RUN-to-AC_TRY_LINK.patch new file mode 100644 index 000000000..39c334f39 --- /dev/null +++ b/meta-oe/recipes-devtools/php/php-5.6.12/change-AC_TRY_RUN-to-AC_TRY_LINK.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | [PATCH] config.m4: change AC_TRY_RUN to AC_TRY_LINK | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | AC_TRY_RUN is not suitable for cross-compile | ||
6 | |||
7 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
8 | --- | ||
9 | ext/fileinfo/config.m4 | 31 ++++++------------------------- | ||
10 | 1 file changed, 6 insertions(+), 25 deletions(-) | ||
11 | |||
12 | diff --git a/ext/fileinfo/config.m4 b/ext/fileinfo/config.m4 | ||
13 | index 7e98d62..8a8ea0e 100644 | ||
14 | --- a/ext/fileinfo/config.m4 | ||
15 | +++ b/ext/fileinfo/config.m4 | ||
16 | @@ -14,31 +14,12 @@ if test "$PHP_FILEINFO" != "no"; then | ||
17 | libmagic/readcdf.c libmagic/softmagic.c" | ||
18 | |||
19 | AC_MSG_CHECKING([for strcasestr]) | ||
20 | - AC_TRY_RUN([ | ||
21 | -#include <string.h> | ||
22 | -#include <strings.h> | ||
23 | -#include <stdlib.h> | ||
24 | - | ||
25 | -int main(void) | ||
26 | -{ | ||
27 | - char *s0, *s1, *ret; | ||
28 | - | ||
29 | - s0 = (char *) malloc(42); | ||
30 | - s1 = (char *) malloc(8); | ||
31 | - | ||
32 | - memset(s0, 'X', 42); | ||
33 | - s0[24] = 'Y'; | ||
34 | - s0[26] = 'Z'; | ||
35 | - s0[41] = '\0'; | ||
36 | - memset(s1, 'x', 8); | ||
37 | - s1[0] = 'y'; | ||
38 | - s1[2] = 'Z'; | ||
39 | - s1[7] = '\0'; | ||
40 | - | ||
41 | - ret = strcasestr(s0, s1); | ||
42 | - | ||
43 | - return !(NULL != ret); | ||
44 | -} | ||
45 | + AC_TRY_COMPILE([ | ||
46 | + #include <string.h> | ||
47 | + #include <strings.h> | ||
48 | + #include <stdlib.h> | ||
49 | + ],[ | ||
50 | + strcasestr(NULL, NULL); | ||
51 | ],[ | ||
52 | dnl using the platform implementation | ||
53 | AC_MSG_RESULT(yes) | ||
54 | -- | ||
55 | 1.9.1 | ||
56 | |||
diff --git a/meta-oe/recipes-devtools/php/php.inc b/meta-oe/recipes-devtools/php/php.inc new file mode 100644 index 000000000..67d2362ab --- /dev/null +++ b/meta-oe/recipes-devtools/php/php.inc | |||
@@ -0,0 +1,271 @@ | |||
1 | SUMMARY = "A server-side, HTML-embedded scripting language" | ||
2 | HOMEPAGE = "http://www.php.net" | ||
3 | SECTION = "console/network" | ||
4 | |||
5 | LICENSE = "PHP-3.0" | ||
6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=464ca70af214d2407f6b7d4458158afd" | ||
7 | |||
8 | BBCLASSEXTEND = "native" | ||
9 | DEPENDS = "zlib bzip2 libxml2 virtual/libiconv php-native lemon-native \ | ||
10 | openssl libmcrypt" | ||
11 | DEPENDS_class-native = "zlib-native libxml2-native" | ||
12 | |||
13 | SRC_URI = "http://php.net/distributions/php-${PV}.tar.bz2 \ | ||
14 | file://acinclude-xml2-config.patch \ | ||
15 | file://0001-php-don-t-use-broken-wrapper-for-mkdir.patch \ | ||
16 | file://0001-acinclude-use-pkgconfig-for-libxml2-config.patch \ | ||
17 | " | ||
18 | |||
19 | SRC_URI_append_class-target += " \ | ||
20 | file://iconv.patch \ | ||
21 | file://imap-fix-autofoo.patch \ | ||
22 | file://pear-makefile.patch \ | ||
23 | file://phar-makefile.patch \ | ||
24 | file://php_exec_native.patch \ | ||
25 | file://php-fpm.conf \ | ||
26 | file://php-fpm-apache.conf \ | ||
27 | file://configure.patch \ | ||
28 | file://pthread-check-threads-m4.patch \ | ||
29 | file://70_mod_php5.conf \ | ||
30 | file://php-fpm.service \ | ||
31 | " | ||
32 | S = "${WORKDIR}/php-${PV}" | ||
33 | |||
34 | inherit autotools pkgconfig pythonnative gettext | ||
35 | |||
36 | # phpize is not scanned for absolute paths by default (but php-config is). | ||
37 | # | ||
38 | SSTATE_SCAN_FILES += "phpize" | ||
39 | SSTATE_SCAN_FILES += "build-defs.h" | ||
40 | |||
41 | PHP_LIBDIR = "${libdir}/php5" | ||
42 | |||
43 | # Common EXTRA_OECONF | ||
44 | COMMON_EXTRA_OECONF = "--enable-sockets \ | ||
45 | --enable-pcntl \ | ||
46 | --enable-shared \ | ||
47 | --disable-opcache \ | ||
48 | --disable-rpath \ | ||
49 | --with-pic \ | ||
50 | --libdir=${PHP_LIBDIR} \ | ||
51 | " | ||
52 | EXTRA_OECONF = "--enable-mbstring \ | ||
53 | --enable-wddx \ | ||
54 | --enable-fpm \ | ||
55 | --enable-zip \ | ||
56 | --with-libdir=${baselib} \ | ||
57 | --with-gettext=${STAGING_LIBDIR}/.. \ | ||
58 | --with-zlib=${STAGING_LIBDIR}/.. \ | ||
59 | --with-iconv=${STAGING_LIBDIR}/.. \ | ||
60 | --with-mcrypt=${STAGING_DIR_TARGET}${exec_prefix} \ | ||
61 | --with-bz2=${STAGING_DIR_TARGET}${exec_prefix} \ | ||
62 | --with-config-file-path=${sysconfdir}/php/apache2-php5 \ | ||
63 | ${@base_conditional('SITEINFO_ENDIANNESS', 'le', 'ac_cv_c_bigendian_php=no', 'ac_cv_c_bigendian_php=yes', d)} \ | ||
64 | ${@bb.utils.contains('PACKAGECONFIG', 'pam', '', 'ac_cv_lib_pam_pam_start=no', d)} \ | ||
65 | ${COMMON_EXTRA_OECONF} \ | ||
66 | " | ||
67 | EXTRA_OECONF_class-native = " \ | ||
68 | --with-zlib=${STAGING_LIBDIR_NATIVE}/.. \ | ||
69 | --without-iconv \ | ||
70 | ${COMMON_EXTRA_OECONF} \ | ||
71 | " | ||
72 | |||
73 | PACKAGECONFIG ??= "mysql sqlite3 imap \ | ||
74 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" | ||
75 | PACKAGECONFIG_class-native = "" | ||
76 | |||
77 | PACKAGECONFIG[mysql] = "--with-mysql=${STAGING_DIR_TARGET}${prefix} \ | ||
78 | --with-mysqli=${STAGING_BINDIR_CROSS}/mysql_config \ | ||
79 | --with-pdo-mysql=${STAGING_BINDIR_CROSS}/mysql_config \ | ||
80 | ,--without-mysql --without-mysqli --without-pdo-mysql \ | ||
81 | ,mysql5" | ||
82 | |||
83 | PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_LIBDIR}/.. \ | ||
84 | --with-pdo-sqlite=${STAGING_LIBDIR}/.. \ | ||
85 | , \ | ||
86 | ,sqlite3" | ||
87 | PACKAGECONFIG[pgsql] = "--with-pgsql=${STAGING_DIR_TARGET}${exec_prefix},--without-pgsql,postgresql" | ||
88 | PACKAGECONFIG[soap] = "--enable-libxml --enable-soap, --disable-soap, libxml2" | ||
89 | PACKAGECONFIG[apache2] = "--with-apxs2=${STAGING_BINDIR_CROSS}/apxs,,apache2-native apache2" | ||
90 | PACKAGECONFIG[pam] = ",,libpam" | ||
91 | PACKAGECONFIG[imap] = "--with-imap=${STAGING_DIR_HOST} \ | ||
92 | --with-imap-ssl=${STAGING_DIR_HOST} \ | ||
93 | ,--without-imap --without-imap-ssl \ | ||
94 | ,uw-imap" | ||
95 | |||
96 | |||
97 | export PHP_NATIVE_DIR = "${STAGING_BINDIR_NATIVE}" | ||
98 | export PHP_PEAR_PHP_BIN = "${STAGING_BINDIR_NATIVE}/php" | ||
99 | CFLAGS += " -D_GNU_SOURCE -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I${STAGING_INCDIR}/apache2" | ||
100 | CFLAGS_append_aarch64 = " -O2" | ||
101 | |||
102 | EXTRA_OEMAKE = "INSTALL_ROOT=${D}" | ||
103 | |||
104 | acpaths = "" | ||
105 | |||
106 | do_configure_prepend () { | ||
107 | rm -f ${S}/build/libtool.m4 ${S}/ltmain.sh ${S}/aclocal.m4 | ||
108 | find ${S} -name config.m4 | xargs -n1 sed -i 's!APXS_HTTPD=.*!APXS_HTTPD=${STAGING_BINDIR_NATIVE}/httpd!' | ||
109 | } | ||
110 | |||
111 | do_configure_append() { | ||
112 | # No, libtool, we really don't want rpath set... | ||
113 | sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' ${HOST_SYS}-libtool | ||
114 | sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' ${HOST_SYS}-libtool | ||
115 | } | ||
116 | |||
117 | do_install_append_class-native() { | ||
118 | rm -rf ${D}/${PHP_LIBDIR}/php/.registry | ||
119 | rm -rf ${D}/${PHP_LIBDIR}/php/.channels | ||
120 | rm -rf ${D}/${PHP_LIBDIR}/php/.[a-z]* | ||
121 | } | ||
122 | |||
123 | do_install_prepend() { | ||
124 | cat aclocal-copy/libtool.m4 aclocal-copy/lt~obsolete.m4 aclocal-copy/ltoptions.m4 \ | ||
125 | aclocal-copy/ltsugar.m4 aclocal-copy/ltversion.m4 > ${S}/build/libtool.m4 | ||
126 | } | ||
127 | |||
128 | do_install_prepend_class-target() { | ||
129 | if ${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'true', 'false', d)}; then | ||
130 | # Install dummy config file so apxs doesn't fail | ||
131 | install -d ${D}${sysconfdir}/apache2 | ||
132 | printf "\nLoadModule dummy_module modules/mod_dummy.so\n" > ${D}${sysconfdir}/apache2/httpd.conf | ||
133 | fi | ||
134 | } | ||
135 | |||
136 | # fixme | ||
137 | do_install_append_class-target() { | ||
138 | install -d ${D}/${sysconfdir}/ | ||
139 | if [ -d ${D}/${STAGING_DIR_NATIVE}/${sysconfdir} ];then | ||
140 | mv ${D}/${STAGING_DIR_NATIVE}/${sysconfdir}/* ${D}/${sysconfdir}/ | ||
141 | fi | ||
142 | rm -rf ${D}/${TMPDIR} | ||
143 | rm -rf ${D}/.registry | ||
144 | rm -rf ${D}/.channels | ||
145 | rm -rf ${D}/.[a-z]* | ||
146 | rm -rf ${D}/var | ||
147 | rm -f ${D}/${sysconfdir}/php-fpm.conf.default | ||
148 | sed -i 's:${STAGING_DIR_NATIVE}::g' ${D}/${sysconfdir}/pear.conf | ||
149 | install -m 0644 ${WORKDIR}/php-fpm.conf ${D}/${sysconfdir}/php-fpm.conf | ||
150 | install -d ${D}/${sysconfdir}/apache2/conf.d | ||
151 | install -m 0644 ${WORKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf | ||
152 | install -d ${D}${sysconfdir}/init.d | ||
153 | sed -i 's:=/usr/sbin:=${sbindir}:g' ${B}/sapi/fpm/init.d.php-fpm | ||
154 | sed -i 's:=/etc:=${sysconfdir}:g' ${B}/sapi/fpm/init.d.php-fpm | ||
155 | sed -i 's:=/var:=${localstatedir}:g' ${B}/sapi/fpm/init.d.php-fpm | ||
156 | install -m 0755 ${B}/sapi/fpm/init.d.php-fpm ${D}${sysconfdir}/init.d/php-fpm | ||
157 | install -m 0644 ${WORKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf | ||
158 | |||
159 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then | ||
160 | install -d ${D}${systemd_unitdir}/system | ||
161 | install -m 0644 ${WORKDIR}/php-fpm.service ${D}${systemd_unitdir}/system/ | ||
162 | sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \ | ||
163 | -e 's,@LOCALSTATEDIR@,${localstatedir},g' \ | ||
164 | ${D}${systemd_unitdir}/system/php-fpm.service | ||
165 | fi | ||
166 | |||
167 | TMP=`dirname ${D}/${TMPDIR}` | ||
168 | while test ${TMP} != ${D}; do | ||
169 | rmdir ${TMP} | ||
170 | TMP=`dirname ${TMP}`; | ||
171 | done | ||
172 | |||
173 | if ${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'true', 'false', d)}; then | ||
174 | install -d ${D}${libdir}/apache2/modules | ||
175 | install -d ${D}${sysconfdir}/apache2/modules.d | ||
176 | install -d ${D}${sysconfdir}/php/apache2-php5 | ||
177 | install -m 755 libs/libphp5.so ${D}${libdir}/apache2/modules | ||
178 | install -m 644 ${WORKDIR}/70_mod_php5.conf ${D}${sysconfdir}/apache2/modules.d | ||
179 | sed -i s,lib/,${libdir}/, ${D}${sysconfdir}/apache2/modules.d/70_mod_php5.conf | ||
180 | cat ${S}/php.ini-production | \ | ||
181 | sed -e 's,extension_dir = \"\./\",extension_dir = \"/usr/lib/extensions\",' \ | ||
182 | > ${D}${sysconfdir}/php/apache2-php5/php.ini | ||
183 | rm -f ${D}${sysconfdir}/apache2/httpd.conf* | ||
184 | fi | ||
185 | } | ||
186 | |||
187 | SYSROOT_PREPROCESS_FUNCS += "php_sysroot_preprocess" | ||
188 | |||
189 | php_sysroot_preprocess () { | ||
190 | install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/ | ||
191 | install -m 755 ${D}${bindir}/phpize ${SYSROOT_DESTDIR}${bindir_crossscripts}/ | ||
192 | install -m 755 ${D}${bindir}/php-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/ | ||
193 | |||
194 | sed -i 's!eval echo /!eval echo ${STAGING_DIR_HOST}/!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/phpize | ||
195 | sed -i 's!^include_dir=.*!include_dir=${STAGING_INCDIR}/php!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/php-config | ||
196 | } | ||
197 | |||
198 | MODPHP_PACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'apache2', '${PN}-modphp', '', d)}" | ||
199 | |||
200 | PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-cgi ${PN}-fpm ${PN}-fpm-apache2 ${PN}-pear ${PN}-phar ${MODPHP_PACKAGE} ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}" | ||
201 | |||
202 | RDEPENDS_${PN}-pear = "${PN}" | ||
203 | RDEPENDS_${PN}-phar = "${PN}-cli" | ||
204 | RDEPENDS_${PN}-cli = "${PN}" | ||
205 | RDEPENDS_${PN}-modphp = "${PN} apache2" | ||
206 | RDEPENDS_${PN}-dev = "${PN}" | ||
207 | |||
208 | INITSCRIPT_PACKAGES = "${PN}-fpm" | ||
209 | inherit update-rc.d | ||
210 | |||
211 | FILES_${PN}-dbg =+ "${bindir}/.debug \ | ||
212 | ${libdir}/apache2/modules/.debug" | ||
213 | FILES_${PN}-doc += "${PHP_LIBDIR}/php/doc" | ||
214 | FILES_${PN}-cli = "${bindir}/php" | ||
215 | FILES_${PN}-phar = "${bindir}/phar*" | ||
216 | FILES_${PN}-cgi = "${bindir}/php-cgi" | ||
217 | FILES_${PN}-fpm = "${sbindir}/php-fpm ${sysconfdir}/php-fpm.conf ${datadir}/fpm ${sysconfdir}/init.d/php-fpm ${systemd_unitdir}/system/php-fpm.service" | ||
218 | FILES_${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf" | ||
219 | CONFFILES_${PN}-fpm = "${sysconfdir}/php-fpm.conf" | ||
220 | CONFFILES_${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf" | ||
221 | INITSCRIPT_NAME_${PN}-fpm = "php-fpm" | ||
222 | INITSCRIPT_PARAMS_${PN}-fpm = "defaults 60" | ||
223 | FILES_${PN}-pear = "${bindir}/pear* ${bindir}/pecl ${PHP_LIBDIR}/php/PEAR \ | ||
224 | ${PHP_LIBDIR}/php/PEAR*.php ${PHP_LIBDIR}/php/System.php \ | ||
225 | ${PHP_LIBDIR}/php/peclcmd.php ${PHP_LIBDIR}/php/pearcmd.php \ | ||
226 | ${PHP_LIBDIR}/php/.channels ${PHP_LIBDIR}/php/.channels/.alias \ | ||
227 | ${PHP_LIBDIR}/php/.registry ${PHP_LIBDIR}/php/Archive/Tar.php \ | ||
228 | ${PHP_LIBDIR}/php/Console/Getopt.php ${PHP_LIBDIR}/php/OS/Guess.php \ | ||
229 | ${PHP_LIBDIR}/php/data/PEAR \ | ||
230 | ${sysconfdir}/pear.conf" | ||
231 | FILES_${PN}-dev = "${includedir}/php ${PHP_LIBDIR}/build ${bindir}/phpize \ | ||
232 | ${bindir}/php-config ${PHP_LIBDIR}/php/.depdb \ | ||
233 | ${PHP_LIBDIR}/php/.depdblock ${PHP_LIBDIR}/php/.filemap \ | ||
234 | ${PHP_LIBDIR}/php/.lock ${PHP_LIBDIR}/php/test" | ||
235 | FILES_${PN} = "${PHP_LIBDIR}/php" | ||
236 | FILES_${PN} += "${bindir}" | ||
237 | |||
238 | SUMMARY_${PN}-modphp = "PHP module for the Apache HTTP server" | ||
239 | FILES_${PN}-modphp = "${libdir}/apache2 ${sysconfdir}" | ||
240 | |||
241 | MODPHP_OLDPACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'modphp', '', d)}" | ||
242 | RPROVIDES_${PN}-modphp = "${MODPHP_OLDPACKAGE}" | ||
243 | RREPLACES_${PN}-modphp = "${MODPHP_OLDPACKAGE}" | ||
244 | RCONFLICTS_${PN}-modphp = "${MODPHP_OLDPACKAGE}" | ||
245 | |||
246 | do_install_append_class-native() { | ||
247 | create_wrapper ${D}${bindir}/php \ | ||
248 | PHP_PEAR_SYSCONF_DIR=${sysconfdir}/ | ||
249 | } | ||
250 | |||
251 | SSTATEPOSTINSTFUNCS_append_class-native = " php_sstate_postinst " | ||
252 | |||
253 | php_sstate_postinst() { | ||
254 | if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ] | ||
255 | then | ||
256 | head -n1 ${sysconfdir}/pear.conf > ${sysconfdir}/pear.tmp.conf | ||
257 | for p in `tail -n1 ${sysconfdir}/pear.conf | sed -s 's/;/ /g'`; do | ||
258 | echo $p | awk -F: 'BEGIN {OFS = ":"; ORS = ";"}{if(NF==3){print $1, length($3)-2*match($3, /^"/), $3} else {print $0}}'; | ||
259 | done >> ${sysconfdir}/pear.tmp.conf | ||
260 | mv -f ${sysconfdir}/pear.tmp.conf ${sysconfdir}/pear.conf | ||
261 | fi | ||
262 | } | ||
263 | |||
264 | # Fails to build with thumb-1 (qemuarm) | ||
265 | # | {standard input}: Assembler messages: | ||
266 | # | {standard input}:3719: Error: selected processor does not support Thumb mode `smull r0,r2,r9,r3' | ||
267 | # | {standard input}:3720: Error: unshifted register required -- `sub r2,r2,r0,asr#31' | ||
268 | # | {standard input}:3796: Error: selected processor does not support Thumb mode `smull r0,r2,r3,r3' | ||
269 | # | {standard input}:3797: Error: unshifted register required -- `sub r2,r2,r0,asr#31' | ||
270 | # | make: *** [ext/standard/math.lo] Error 1 | ||
271 | ARM_INSTRUCTION_SET = "arm" | ||
diff --git a/meta-oe/recipes-devtools/php/php_5.5.26.bb b/meta-oe/recipes-devtools/php/php_5.5.26.bb index 85fdccb47..deaf14510 100644 --- a/meta-oe/recipes-devtools/php/php_5.5.26.bb +++ b/meta-oe/recipes-devtools/php/php_5.5.26.bb | |||
@@ -1,275 +1,4 @@ | |||
1 | SUMMARY = "A server-side, HTML-embedded scripting language" | 1 | require php.inc |
2 | HOMEPAGE = "http://www.php.net" | ||
3 | SECTION = "console/network" | ||
4 | |||
5 | LICENSE = "PHP-3.0" | ||
6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=464ca70af214d2407f6b7d4458158afd" | ||
7 | |||
8 | BBCLASSEXTEND = "native" | ||
9 | DEPENDS = "zlib bzip2 libxml2 virtual/libiconv php-native lemon-native \ | ||
10 | openssl libmcrypt" | ||
11 | DEPENDS_class-native = "zlib-native libxml2-native" | ||
12 | |||
13 | SRC_URI = "http://php.net/distributions/php-${PV}.tar.bz2 \ | ||
14 | file://acinclude-xml2-config.patch \ | ||
15 | file://0001-php-don-t-use-broken-wrapper-for-mkdir.patch \ | ||
16 | file://0001-acinclude-use-pkgconfig-for-libxml2-config.patch \ | ||
17 | " | ||
18 | |||
19 | SRC_URI_append_class-target += " \ | ||
20 | file://iconv.patch \ | ||
21 | file://imap-fix-autofoo.patch \ | ||
22 | file://pear-makefile.patch \ | ||
23 | file://phar-makefile.patch \ | ||
24 | file://php_exec_native.patch \ | ||
25 | file://php-fpm.conf \ | ||
26 | file://php-fpm-apache.conf \ | ||
27 | file://configure.patch \ | ||
28 | file://pthread-check-threads-m4.patch \ | ||
29 | file://70_mod_php5.conf \ | ||
30 | file://php-fpm.service \ | ||
31 | " | ||
32 | 2 | ||
33 | SRC_URI[md5sum] = "383a4b35327809afd2822e1e5efc8ee1" | 3 | SRC_URI[md5sum] = "383a4b35327809afd2822e1e5efc8ee1" |
34 | SRC_URI[sha256sum] = "816afffdb03ff4c542bc172a2f77f9c69b817df82d60cce05c1b4f578c2c926e" | 4 | SRC_URI[sha256sum] = "816afffdb03ff4c542bc172a2f77f9c69b817df82d60cce05c1b4f578c2c926e" |
35 | |||
36 | S = "${WORKDIR}/php-${PV}" | ||
37 | |||
38 | inherit autotools pkgconfig pythonnative gettext | ||
39 | |||
40 | # phpize is not scanned for absolute paths by default (but php-config is). | ||
41 | # | ||
42 | SSTATE_SCAN_FILES += "phpize" | ||
43 | SSTATE_SCAN_FILES += "build-defs.h" | ||
44 | |||
45 | PHP_LIBDIR = "${libdir}/php5" | ||
46 | |||
47 | # Common EXTRA_OECONF | ||
48 | COMMON_EXTRA_OECONF = "--enable-sockets \ | ||
49 | --enable-pcntl \ | ||
50 | --enable-shared \ | ||
51 | --disable-opcache \ | ||
52 | --disable-rpath \ | ||
53 | --with-pic \ | ||
54 | --libdir=${PHP_LIBDIR} \ | ||
55 | " | ||
56 | EXTRA_OECONF = "--enable-mbstring \ | ||
57 | --enable-wddx \ | ||
58 | --enable-fpm \ | ||
59 | --enable-zip \ | ||
60 | --with-libdir=${baselib} \ | ||
61 | --with-gettext=${STAGING_LIBDIR}/.. \ | ||
62 | --with-zlib=${STAGING_LIBDIR}/.. \ | ||
63 | --with-iconv=${STAGING_LIBDIR}/.. \ | ||
64 | --with-mcrypt=${STAGING_DIR_TARGET}${exec_prefix} \ | ||
65 | --with-bz2=${STAGING_DIR_TARGET}${exec_prefix} \ | ||
66 | --with-config-file-path=${sysconfdir}/php/apache2-php5 \ | ||
67 | ${@base_conditional('SITEINFO_ENDIANNESS', 'le', 'ac_cv_c_bigendian_php=no', 'ac_cv_c_bigendian_php=yes', d)} \ | ||
68 | ${@bb.utils.contains('PACKAGECONFIG', 'pam', '', 'ac_cv_lib_pam_pam_start=no', d)} \ | ||
69 | ${COMMON_EXTRA_OECONF} \ | ||
70 | " | ||
71 | EXTRA_OECONF_class-native = " \ | ||
72 | --with-zlib=${STAGING_LIBDIR_NATIVE}/.. \ | ||
73 | --without-iconv \ | ||
74 | ${COMMON_EXTRA_OECONF} \ | ||
75 | " | ||
76 | |||
77 | PACKAGECONFIG ??= "mysql sqlite3 imap \ | ||
78 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" | ||
79 | PACKAGECONFIG_class-native = "" | ||
80 | |||
81 | PACKAGECONFIG[mysql] = "--with-mysql=${STAGING_DIR_TARGET}${prefix} \ | ||
82 | --with-mysqli=${STAGING_BINDIR_CROSS}/mysql_config \ | ||
83 | --with-pdo-mysql=${STAGING_BINDIR_CROSS}/mysql_config \ | ||
84 | ,--without-mysql --without-mysqli --without-pdo-mysql \ | ||
85 | ,mysql5" | ||
86 | |||
87 | PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_LIBDIR}/.. \ | ||
88 | --with-pdo-sqlite=${STAGING_LIBDIR}/.. \ | ||
89 | , \ | ||
90 | ,sqlite3" | ||
91 | PACKAGECONFIG[pgsql] = "--with-pgsql=${STAGING_DIR_TARGET}${exec_prefix},--without-pgsql,postgresql" | ||
92 | PACKAGECONFIG[soap] = "--enable-libxml --enable-soap, --disable-soap, libxml2" | ||
93 | PACKAGECONFIG[apache2] = "--with-apxs2=${STAGING_BINDIR_CROSS}/apxs,,apache2-native apache2" | ||
94 | PACKAGECONFIG[pam] = ",,libpam" | ||
95 | PACKAGECONFIG[imap] = "--with-imap=${STAGING_DIR_HOST} \ | ||
96 | --with-imap-ssl=${STAGING_DIR_HOST} \ | ||
97 | ,--without-imap --without-imap-ssl \ | ||
98 | ,uw-imap" | ||
99 | |||
100 | |||
101 | export PHP_NATIVE_DIR = "${STAGING_BINDIR_NATIVE}" | ||
102 | export PHP_PEAR_PHP_BIN = "${STAGING_BINDIR_NATIVE}/php" | ||
103 | CFLAGS += " -D_GNU_SOURCE -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I${STAGING_INCDIR}/apache2" | ||
104 | CFLAGS_append_aarch64 = " -O2" | ||
105 | |||
106 | EXTRA_OEMAKE = "INSTALL_ROOT=${D}" | ||
107 | |||
108 | acpaths = "" | ||
109 | |||
110 | do_configure_prepend () { | ||
111 | rm -f ${S}/build/libtool.m4 ${S}/ltmain.sh ${S}/aclocal.m4 | ||
112 | find ${S} -name config.m4 | xargs -n1 sed -i 's!APXS_HTTPD=.*!APXS_HTTPD=${STAGING_BINDIR_NATIVE}/httpd!' | ||
113 | } | ||
114 | |||
115 | do_configure_append() { | ||
116 | # No, libtool, we really don't want rpath set... | ||
117 | sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' ${HOST_SYS}-libtool | ||
118 | sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' ${HOST_SYS}-libtool | ||
119 | } | ||
120 | |||
121 | do_install_append_class-native() { | ||
122 | rm -rf ${D}/${PHP_LIBDIR}/php/.registry | ||
123 | rm -rf ${D}/${PHP_LIBDIR}/php/.channels | ||
124 | rm -rf ${D}/${PHP_LIBDIR}/php/.[a-z]* | ||
125 | } | ||
126 | |||
127 | do_install_prepend() { | ||
128 | cat aclocal-copy/libtool.m4 aclocal-copy/lt~obsolete.m4 aclocal-copy/ltoptions.m4 \ | ||
129 | aclocal-copy/ltsugar.m4 aclocal-copy/ltversion.m4 > ${S}/build/libtool.m4 | ||
130 | } | ||
131 | |||
132 | do_install_prepend_class-target() { | ||
133 | if ${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'true', 'false', d)}; then | ||
134 | # Install dummy config file so apxs doesn't fail | ||
135 | install -d ${D}${sysconfdir}/apache2 | ||
136 | printf "\nLoadModule dummy_module modules/mod_dummy.so\n" > ${D}${sysconfdir}/apache2/httpd.conf | ||
137 | fi | ||
138 | } | ||
139 | |||
140 | # fixme | ||
141 | do_install_append_class-target() { | ||
142 | install -d ${D}/${sysconfdir}/ | ||
143 | if [ -d ${D}/${STAGING_DIR_NATIVE}/${sysconfdir} ];then | ||
144 | mv ${D}/${STAGING_DIR_NATIVE}/${sysconfdir}/* ${D}/${sysconfdir}/ | ||
145 | fi | ||
146 | rm -rf ${D}/${TMPDIR} | ||
147 | rm -rf ${D}/.registry | ||
148 | rm -rf ${D}/.channels | ||
149 | rm -rf ${D}/.[a-z]* | ||
150 | rm -rf ${D}/var | ||
151 | rm -f ${D}/${sysconfdir}/php-fpm.conf.default | ||
152 | sed -i 's:${STAGING_DIR_NATIVE}::g' ${D}/${sysconfdir}/pear.conf | ||
153 | install -m 0644 ${WORKDIR}/php-fpm.conf ${D}/${sysconfdir}/php-fpm.conf | ||
154 | install -d ${D}/${sysconfdir}/apache2/conf.d | ||
155 | install -m 0644 ${WORKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf | ||
156 | install -d ${D}${sysconfdir}/init.d | ||
157 | sed -i 's:=/usr/sbin:=${sbindir}:g' ${B}/sapi/fpm/init.d.php-fpm | ||
158 | sed -i 's:=/etc:=${sysconfdir}:g' ${B}/sapi/fpm/init.d.php-fpm | ||
159 | sed -i 's:=/var:=${localstatedir}:g' ${B}/sapi/fpm/init.d.php-fpm | ||
160 | install -m 0755 ${B}/sapi/fpm/init.d.php-fpm ${D}${sysconfdir}/init.d/php-fpm | ||
161 | install -m 0644 ${WORKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf | ||
162 | |||
163 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then | ||
164 | install -d ${D}${systemd_unitdir}/system | ||
165 | install -m 0644 ${WORKDIR}/php-fpm.service ${D}${systemd_unitdir}/system/ | ||
166 | sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \ | ||
167 | -e 's,@LOCALSTATEDIR@,${localstatedir},g' \ | ||
168 | ${D}${systemd_unitdir}/system/php-fpm.service | ||
169 | fi | ||
170 | |||
171 | TMP=`dirname ${D}/${TMPDIR}` | ||
172 | while test ${TMP} != ${D}; do | ||
173 | rmdir ${TMP} | ||
174 | TMP=`dirname ${TMP}`; | ||
175 | done | ||
176 | |||
177 | if ${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'true', 'false', d)}; then | ||
178 | install -d ${D}${libdir}/apache2/modules | ||
179 | install -d ${D}${sysconfdir}/apache2/modules.d | ||
180 | install -d ${D}${sysconfdir}/php/apache2-php5 | ||
181 | install -m 755 libs/libphp5.so ${D}${libdir}/apache2/modules | ||
182 | install -m 644 ${WORKDIR}/70_mod_php5.conf ${D}${sysconfdir}/apache2/modules.d | ||
183 | sed -i s,lib/,${libdir}/, ${D}${sysconfdir}/apache2/modules.d/70_mod_php5.conf | ||
184 | cat ${S}/php.ini-production | \ | ||
185 | sed -e 's,extension_dir = \"\./\",extension_dir = \"/usr/lib/extensions\",' \ | ||
186 | > ${D}${sysconfdir}/php/apache2-php5/php.ini | ||
187 | rm -f ${D}${sysconfdir}/apache2/httpd.conf* | ||
188 | fi | ||
189 | } | ||
190 | |||
191 | SYSROOT_PREPROCESS_FUNCS += "php_sysroot_preprocess" | ||
192 | |||
193 | php_sysroot_preprocess () { | ||
194 | install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/ | ||
195 | install -m 755 ${D}${bindir}/phpize ${SYSROOT_DESTDIR}${bindir_crossscripts}/ | ||
196 | install -m 755 ${D}${bindir}/php-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/ | ||
197 | |||
198 | sed -i 's!eval echo /!eval echo ${STAGING_DIR_HOST}/!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/phpize | ||
199 | sed -i 's!^include_dir=.*!include_dir=${STAGING_INCDIR}/php!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/php-config | ||
200 | } | ||
201 | |||
202 | MODPHP_PACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'apache2', '${PN}-modphp', '', d)}" | ||
203 | |||
204 | PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-cgi ${PN}-fpm ${PN}-fpm-apache2 ${PN}-pear ${PN}-phar ${MODPHP_PACKAGE} ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}" | ||
205 | |||
206 | RDEPENDS_${PN}-pear = "${PN}" | ||
207 | RDEPENDS_${PN}-phar = "${PN}-cli" | ||
208 | RDEPENDS_${PN}-cli = "${PN}" | ||
209 | RDEPENDS_${PN}-modphp = "${PN} apache2" | ||
210 | RDEPENDS_${PN}-dev = "${PN}" | ||
211 | |||
212 | INITSCRIPT_PACKAGES = "${PN}-fpm" | ||
213 | inherit update-rc.d | ||
214 | |||
215 | FILES_${PN}-dbg =+ "${bindir}/.debug \ | ||
216 | ${libdir}/apache2/modules/.debug" | ||
217 | FILES_${PN}-doc += "${PHP_LIBDIR}/php/doc" | ||
218 | FILES_${PN}-cli = "${bindir}/php" | ||
219 | FILES_${PN}-phar = "${bindir}/phar*" | ||
220 | FILES_${PN}-cgi = "${bindir}/php-cgi" | ||
221 | FILES_${PN}-fpm = "${sbindir}/php-fpm ${sysconfdir}/php-fpm.conf ${datadir}/fpm ${sysconfdir}/init.d/php-fpm ${systemd_unitdir}/system/php-fpm.service" | ||
222 | FILES_${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf" | ||
223 | CONFFILES_${PN}-fpm = "${sysconfdir}/php-fpm.conf" | ||
224 | CONFFILES_${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf" | ||
225 | INITSCRIPT_NAME_${PN}-fpm = "php-fpm" | ||
226 | INITSCRIPT_PARAMS_${PN}-fpm = "defaults 60" | ||
227 | FILES_${PN}-pear = "${bindir}/pear* ${bindir}/pecl ${PHP_LIBDIR}/php/PEAR \ | ||
228 | ${PHP_LIBDIR}/php/PEAR*.php ${PHP_LIBDIR}/php/System.php \ | ||
229 | ${PHP_LIBDIR}/php/peclcmd.php ${PHP_LIBDIR}/php/pearcmd.php \ | ||
230 | ${PHP_LIBDIR}/php/.channels ${PHP_LIBDIR}/php/.channels/.alias \ | ||
231 | ${PHP_LIBDIR}/php/.registry ${PHP_LIBDIR}/php/Archive/Tar.php \ | ||
232 | ${PHP_LIBDIR}/php/Console/Getopt.php ${PHP_LIBDIR}/php/OS/Guess.php \ | ||
233 | ${PHP_LIBDIR}/php/data/PEAR \ | ||
234 | ${sysconfdir}/pear.conf" | ||
235 | FILES_${PN}-dev = "${includedir}/php ${PHP_LIBDIR}/build ${bindir}/phpize \ | ||
236 | ${bindir}/php-config ${PHP_LIBDIR}/php/.depdb \ | ||
237 | ${PHP_LIBDIR}/php/.depdblock ${PHP_LIBDIR}/php/.filemap \ | ||
238 | ${PHP_LIBDIR}/php/.lock ${PHP_LIBDIR}/php/test" | ||
239 | FILES_${PN} = "${PHP_LIBDIR}/php" | ||
240 | FILES_${PN} += "${bindir}" | ||
241 | |||
242 | SUMMARY_${PN}-modphp = "PHP module for the Apache HTTP server" | ||
243 | FILES_${PN}-modphp = "${libdir}/apache2 ${sysconfdir}" | ||
244 | |||
245 | MODPHP_OLDPACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'modphp', '', d)}" | ||
246 | RPROVIDES_${PN}-modphp = "${MODPHP_OLDPACKAGE}" | ||
247 | RREPLACES_${PN}-modphp = "${MODPHP_OLDPACKAGE}" | ||
248 | RCONFLICTS_${PN}-modphp = "${MODPHP_OLDPACKAGE}" | ||
249 | |||
250 | do_install_append_class-native() { | ||
251 | create_wrapper ${D}${bindir}/php \ | ||
252 | PHP_PEAR_SYSCONF_DIR=${sysconfdir}/ | ||
253 | } | ||
254 | |||
255 | SSTATEPOSTINSTFUNCS_append_class-native = " php_sstate_postinst " | ||
256 | |||
257 | php_sstate_postinst() { | ||
258 | if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ] | ||
259 | then | ||
260 | head -n1 ${sysconfdir}/pear.conf > ${sysconfdir}/pear.tmp.conf | ||
261 | for p in `tail -n1 ${sysconfdir}/pear.conf | sed -s 's/;/ /g'`; do | ||
262 | echo $p | awk -F: 'BEGIN {OFS = ":"; ORS = ";"}{if(NF==3){print $1, length($3)-2*match($3, /^"/), $3} else {print $0}}'; | ||
263 | done >> ${sysconfdir}/pear.tmp.conf | ||
264 | mv -f ${sysconfdir}/pear.tmp.conf ${sysconfdir}/pear.conf | ||
265 | fi | ||
266 | } | ||
267 | |||
268 | # Fails to build with thumb-1 (qemuarm) | ||
269 | # | {standard input}: Assembler messages: | ||
270 | # | {standard input}:3719: Error: selected processor does not support Thumb mode `smull r0,r2,r9,r3' | ||
271 | # | {standard input}:3720: Error: unshifted register required -- `sub r2,r2,r0,asr#31' | ||
272 | # | {standard input}:3796: Error: selected processor does not support Thumb mode `smull r0,r2,r3,r3' | ||
273 | # | {standard input}:3797: Error: unshifted register required -- `sub r2,r2,r0,asr#31' | ||
274 | # | make: *** [ext/standard/math.lo] Error 1 | ||
275 | ARM_INSTRUCTION_SET = "arm" | ||
diff --git a/meta-oe/recipes-devtools/php/php_5.6.12.bb b/meta-oe/recipes-devtools/php/php_5.6.12.bb new file mode 100644 index 000000000..ba78c3225 --- /dev/null +++ b/meta-oe/recipes-devtools/php/php_5.6.12.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | require php.inc | ||
2 | |||
3 | SRC_URI += "file://change-AC_TRY_RUN-to-AC_TRY_LINK.patch" | ||
4 | SRC_URI[md5sum] = "4578dee9d979114610a444bee263ed9b" | ||
5 | SRC_URI[sha256sum] = "6f27104272af7b2a996f85e4100fac627630fbdaf39d7bd263f16cf529c8853a" | ||