summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/php/php_7.3.11.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-devtools/php/php_7.3.11.bb')
-rw-r--r--meta-oe/recipes-devtools/php/php_7.3.11.bb275
1 files changed, 275 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/php/php_7.3.11.bb b/meta-oe/recipes-devtools/php/php_7.3.11.bb
new file mode 100644
index 000000000..e7fb847fa
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php_7.3.11.bb
@@ -0,0 +1,275 @@
1SUMMARY = "A server-side, HTML-embedded scripting language"
2HOMEPAGE = "http://www.php.net"
3SECTION = "console/network"
4
5LICENSE = "PHP-3.0"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=fb07bfc51f6d5e0c30b65d9701233b2e"
7
8BBCLASSEXTEND = "native"
9DEPENDS = "zlib bzip2 libxml2 virtual/libiconv php-native lemon-native"
10DEPENDS_class-native = "zlib-native libxml2-native"
11
12PHP_MAJOR_VERSION = "${@d.getVar('PV').split('.')[0]}"
13
14SRC_URI = "http://php.net/distributions/php-${PV}.tar.bz2 \
15 file://0001-php-don-t-use-broken-wrapper-for-mkdir.patch \
16 file://0001-acinclude.m4-don-t-unset-cache-variables.patch \
17 file://0048-Use-pkg-config-for-FreeType2-detection.patch \
18 file://0001-Use-pkg-config-for-libxml2-detection.patch \
19 file://debian-php-fixheader.patch \
20 file://CVE-2019-6978.patch \
21 "
22
23SRC_URI_append_class-target = " \
24 file://iconv.patch \
25 file://imap-fix-autofoo.patch \
26 file://php_exec_native.patch \
27 file://php-fpm.conf \
28 file://php-fpm-apache.conf \
29 file://70_mod_php${PHP_MAJOR_VERSION}.conf \
30 file://php-fpm.service \
31 file://pear-makefile.patch \
32 file://phar-makefile.patch \
33 file://0001-opcache-config.m4-enable-opcache.patch \
34 file://xfail_two_bug_tests.patch \
35 "
36S = "${WORKDIR}/php-${PV}"
37SRC_URI[md5sum] = "21b710b4126d4d54714de9693a6c7b0d"
38SRC_URI[sha256sum] = "92d1ff4b13c7093635f1ec338a5e6891ca99b10e65fbcadd527e5bb84d11b5e7"
39
40inherit autotools pkgconfig pythonnative gettext
41
42# phpize is not scanned for absolute paths by default (but php-config is).
43#
44SSTATE_SCAN_FILES += "phpize"
45SSTATE_SCAN_FILES += "build-defs.h"
46
47PHP_LIBDIR = "${libdir}/php${PHP_MAJOR_VERSION}"
48
49# Common EXTRA_OECONF
50COMMON_EXTRA_OECONF = "--enable-sockets \
51 --enable-pcntl \
52 --enable-shared \
53 --disable-rpath \
54 --with-pic \
55 --libdir=${PHP_LIBDIR} \
56"
57EXTRA_OECONF = "--enable-mbstring \
58 --enable-wddx \
59 --enable-fpm \
60 --with-libdir=${baselib} \
61 --with-gettext=${STAGING_LIBDIR}/.. \
62 --with-zlib=${STAGING_LIBDIR}/.. \
63 --with-iconv=${STAGING_LIBDIR}/.. \
64 --with-bz2=${STAGING_DIR_TARGET}${exec_prefix} \
65 --with-config-file-path=${sysconfdir}/php/apache2-php${PHP_MAJOR_VERSION} \
66 ${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'ac_cv_c_bigendian_php=no', 'ac_cv_c_bigendian_php=yes', d)} \
67 ${@bb.utils.contains('PACKAGECONFIG', 'pam', '', 'ac_cv_lib_pam_pam_start=no', d)} \
68 ${COMMON_EXTRA_OECONF} \
69"
70
71EXTRA_OECONF_append_riscv64 = " --with-pcre-jit=no"
72EXTRA_OECONF_append_riscv32 = " --with-pcre-jit=no"
73
74CACHED_CONFIGUREVARS += "ac_cv_func_dlopen=no ac_cv_lib_dl_dlopen=yes"
75
76EXTRA_OECONF_class-native = " \
77 --with-zlib=${STAGING_LIBDIR_NATIVE}/.. \
78 --without-iconv \
79 ${COMMON_EXTRA_OECONF} \
80"
81
82PACKAGECONFIG ??= "mysql sqlite3 imap opcache openssl \
83 ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 pam', d)} \
84"
85PACKAGECONFIG_class-native = ""
86
87PACKAGECONFIG[zip] = "--enable-zip --with-libzip=${STAGING_EXECPREFIXDIR},,libzip"
88
89PACKAGECONFIG[mysql] = "--with-mysqli=mysqlnd \
90 --with-pdo-mysql=mysqlnd \
91 ,--without-mysqli --without-pdo-mysql \
92 ,mysql5"
93
94PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_LIBDIR}/.. \
95 --with-pdo-sqlite=${STAGING_LIBDIR}/.. \
96 ,--without-sqlite3 --without-pdo-sqlite \
97 ,sqlite3"
98PACKAGECONFIG[pgsql] = "--with-pgsql=${STAGING_DIR_TARGET}${exec_prefix},--without-pgsql,postgresql"
99PACKAGECONFIG[soap] = "--enable-libxml --enable-soap, --disable-soap, libxml2"
100PACKAGECONFIG[apache2] = "--with-apxs2=${STAGING_BINDIR_CROSS}/apxs,,apache2-native apache2"
101PACKAGECONFIG[pam] = ",,libpam"
102PACKAGECONFIG[imap] = "--with-imap=${STAGING_DIR_HOST} \
103 --with-imap-ssl=${STAGING_DIR_HOST} \
104 ,--without-imap --without-imap-ssl \
105 ,uw-imap"
106PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
107PACKAGECONFIG[opcache] = "--enable-opcache,--disable-opcache"
108PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl"
109PACKAGECONFIG[valgrind] = "--with-valgrind=${STAGING_DIR_TARGET}/usr,--with-valgrind=no,valgrind"
110
111export PHP_NATIVE_DIR = "${STAGING_BINDIR_NATIVE}"
112export PHP_PEAR_PHP_BIN = "${STAGING_BINDIR_NATIVE}/php"
113CFLAGS += " -D_GNU_SOURCE -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I${STAGING_INCDIR}/apache2"
114
115EXTRA_OEMAKE = "INSTALL_ROOT=${D}"
116
117acpaths = ""
118
119do_configure_prepend () {
120 rm -f ${S}/build/libtool.m4 ${S}/ltmain.sh ${S}/aclocal.m4
121 find ${S} -name config.m4 | xargs -n1 sed -i 's!APXS_HTTPD=.*!APXS_HTTPD=${STAGING_SBINDIR_NATIVE}/httpd!'
122}
123
124do_configure_append() {
125 # No, libtool, we really don't want rpath set...
126 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' ${HOST_SYS}-libtool
127 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' ${HOST_SYS}-libtool
128}
129
130do_install_append_class-native() {
131 rm -rf ${D}/${PHP_LIBDIR}/php/.registry
132 rm -rf ${D}/${PHP_LIBDIR}/php/.channels
133 rm -rf ${D}/${PHP_LIBDIR}/php/.[a-z]*
134}
135
136do_install_prepend() {
137 cat ${ACLOCALDIR}/libtool.m4 ${ACLOCALDIR}/lt~obsolete.m4 ${ACLOCALDIR}/ltoptions.m4 \
138 ${ACLOCALDIR}/ltsugar.m4 ${ACLOCALDIR}/ltversion.m4 > ${S}/build/libtool.m4
139}
140
141do_install_prepend_class-target() {
142 if ${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'true', 'false', d)}; then
143 # Install dummy config file so apxs doesn't fail
144 install -d ${D}${sysconfdir}/apache2
145 printf "\nLoadModule dummy_module modules/mod_dummy.so\n" > ${D}${sysconfdir}/apache2/httpd.conf
146 fi
147}
148
149# fixme
150do_install_append_class-target() {
151 install -d ${D}${sysconfdir}/
152 if [ -d ${RECIPE_SYSROOT_NATIVE}${sysconfdir} ];then
153 install -m 0644 ${RECIPE_SYSROOT_NATIVE}${sysconfdir}/pear.conf ${D}${sysconfdir}/
154 fi
155 rm -rf ${D}/${TMPDIR}
156 rm -rf ${D}/.registry
157 rm -rf ${D}/.channels
158 rm -rf ${D}/.[a-z]*
159 rm -rf ${D}/var
160 rm -f ${D}/${sysconfdir}/php-fpm.conf.default
161 sed -i 's:${STAGING_DIR_NATIVE}::g' ${D}${sysconfdir}/pear.conf
162 install -m 0644 ${WORKDIR}/php-fpm.conf ${D}/${sysconfdir}/php-fpm.conf
163 install -d ${D}/${sysconfdir}/apache2/conf.d
164 install -m 0644 ${WORKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf
165 install -d ${D}${sysconfdir}/init.d
166 sed -i 's:=/usr/sbin:=${sbindir}:g' ${B}/sapi/fpm/init.d.php-fpm
167 sed -i 's:=/etc:=${sysconfdir}:g' ${B}/sapi/fpm/init.d.php-fpm
168 sed -i 's:=/var:=${localstatedir}:g' ${B}/sapi/fpm/init.d.php-fpm
169 install -m 0755 ${B}/sapi/fpm/init.d.php-fpm ${D}${sysconfdir}/init.d/php-fpm
170 install -m 0644 ${WORKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf
171
172 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then
173 install -d ${D}${systemd_unitdir}/system
174 install -m 0644 ${WORKDIR}/php-fpm.service ${D}${systemd_unitdir}/system/
175 sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \
176 -e 's,@LOCALSTATEDIR@,${localstatedir},g' \
177 ${D}${systemd_unitdir}/system/php-fpm.service
178 fi
179
180 TMP=`dirname ${D}/${TMPDIR}`
181 while test ${TMP} != ${D}; do
182 if [ -d ${TMP} ]; then
183 rmdir ${TMP}
184 fi
185 TMP=`dirname ${TMP}`;
186 done
187
188 if ${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'true', 'false', d)}; then
189 install -d ${D}${sysconfdir}/apache2/modules.d
190 install -d ${D}${sysconfdir}/php/apache2-php${PHP_MAJOR_VERSION}
191 install -m 644 ${WORKDIR}/70_mod_php${PHP_MAJOR_VERSION}.conf ${D}${sysconfdir}/apache2/modules.d
192 sed -i s,lib/,${libexecdir}/, ${D}${sysconfdir}/apache2/modules.d/70_mod_php${PHP_MAJOR_VERSION}.conf
193 cat ${S}/php.ini-production | \
194 sed -e 's,extension_dir = \"\./\",extension_dir = \"/usr/lib/extensions\",' \
195 > ${D}${sysconfdir}/php/apache2-php${PHP_MAJOR_VERSION}/php.ini
196 rm -f ${D}${sysconfdir}/apache2/httpd.conf*
197 fi
198}
199
200SYSROOT_PREPROCESS_FUNCS += "php_sysroot_preprocess"
201
202php_sysroot_preprocess () {
203 install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
204 install -m 755 ${D}${bindir}/phpize ${SYSROOT_DESTDIR}${bindir_crossscripts}/
205 install -m 755 ${D}${bindir}/php-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/
206
207 sed -i 's!eval echo /!eval echo ${STAGING_DIR_HOST}/!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/phpize
208 sed -i 's!^include_dir=.*!include_dir=${STAGING_INCDIR}/php!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/php-config
209}
210
211MODPHP_PACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'apache2', '${PN}-modphp', '', d)}"
212
213PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-cgi ${PN}-fpm ${PN}-fpm-apache2 ${PN}-pear ${PN}-phar ${MODPHP_PACKAGE} ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}-opcache ${PN}"
214
215RDEPENDS_${PN} += "libgcc"
216RDEPENDS_${PN}-pear = "${PN}"
217RDEPENDS_${PN}-phar = "${PN}-cli"
218RDEPENDS_${PN}-cli = "${PN}"
219RDEPENDS_${PN}-modphp = "${PN} apache2"
220RDEPENDS_${PN}-opcache = "${PN}"
221
222INITSCRIPT_PACKAGES = "${PN}-fpm"
223inherit update-rc.d
224
225FILES_${PN}-dbg =+ "${bindir}/.debug \
226 ${libexecdir}/apache2/modules/.debug"
227FILES_${PN}-doc += "${PHP_LIBDIR}/php/doc"
228FILES_${PN}-cli = "${bindir}/php"
229FILES_${PN}-phar = "${bindir}/phar*"
230FILES_${PN}-cgi = "${bindir}/php-cgi"
231FILES_${PN}-fpm = "${sbindir}/php-fpm ${sysconfdir}/php-fpm.conf ${datadir}/fpm ${sysconfdir}/init.d/php-fpm ${systemd_unitdir}/system/php-fpm.service ${sysconfdir}/php-fpm.d/www.conf.default"
232FILES_${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf"
233CONFFILES_${PN}-fpm = "${sysconfdir}/php-fpm.conf"
234CONFFILES_${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf"
235INITSCRIPT_NAME_${PN}-fpm = "php-fpm"
236INITSCRIPT_PARAMS_${PN}-fpm = "defaults 60"
237FILES_${PN}-pear = "${bindir}/pear* ${bindir}/pecl ${PHP_LIBDIR}/php/PEAR \
238 ${PHP_LIBDIR}/php/PEAR*.php ${PHP_LIBDIR}/php/System.php \
239 ${PHP_LIBDIR}/php/peclcmd.php ${PHP_LIBDIR}/php/pearcmd.php \
240 ${PHP_LIBDIR}/php/.channels ${PHP_LIBDIR}/php/.channels/.alias \
241 ${PHP_LIBDIR}/php/.registry ${PHP_LIBDIR}/php/Archive/Tar.php \
242 ${PHP_LIBDIR}/php/Console/Getopt.php ${PHP_LIBDIR}/php/OS/Guess.php \
243 ${PHP_LIBDIR}/php/data/PEAR \
244 ${sysconfdir}/pear.conf"
245FILES_${PN}-dev = "${includedir}/php ${PHP_LIBDIR}/build ${bindir}/phpize \
246 ${bindir}/php-config ${PHP_LIBDIR}/php/.depdb \
247 ${PHP_LIBDIR}/php/.depdblock ${PHP_LIBDIR}/php/.filemap \
248 ${PHP_LIBDIR}/php/.lock ${PHP_LIBDIR}/php/test"
249FILES_${PN}-staticdev += "${PHP_LIBDIR}/extensions/*/*.a"
250FILES_${PN}-opcache = "${PHP_LIBDIR}/extensions/*/opcache${SOLIBSDEV}"
251FILES_${PN} = "${PHP_LIBDIR}/php"
252FILES_${PN} += "${bindir} ${libexecdir}/apache2"
253
254SUMMARY_${PN}-modphp = "PHP module for the Apache HTTP server"
255FILES_${PN}-modphp = "${libdir}/apache2 ${sysconfdir}"
256
257MODPHP_OLDPACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'modphp', '', d)}"
258RPROVIDES_${PN}-modphp = "${MODPHP_OLDPACKAGE}"
259RREPLACES_${PN}-modphp = "${MODPHP_OLDPACKAGE}"
260RCONFLICTS_${PN}-modphp = "${MODPHP_OLDPACKAGE}"
261
262do_install_append_class-native() {
263 create_wrapper ${D}${bindir}/php \
264 PHP_PEAR_SYSCONF_DIR=${sysconfdir}/
265}
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
275ARM_INSTRUCTION_SET = "arm"