diff options
Diffstat (limited to 'meta-oe/recipes-devtools/php/php_8.2.18.bb')
-rw-r--r-- | meta-oe/recipes-devtools/php/php_8.2.18.bb | 299 |
1 files changed, 0 insertions, 299 deletions
diff --git a/meta-oe/recipes-devtools/php/php_8.2.18.bb b/meta-oe/recipes-devtools/php/php_8.2.18.bb deleted file mode 100644 index e662f6806e..0000000000 --- a/meta-oe/recipes-devtools/php/php_8.2.18.bb +++ /dev/null | |||
@@ -1,299 +0,0 @@ | |||
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=fd469cce1a919f0cc95bab7afb28d19d" | ||
7 | |||
8 | BBCLASSEXTEND = "native" | ||
9 | DEPENDS = "zlib bzip2 libxml2 virtual/libiconv php-native" | ||
10 | DEPENDS:append:libc-musl = " libucontext" | ||
11 | DEPENDS:class-native = "zlib-native libxml2-native" | ||
12 | |||
13 | PHP_MAJOR_VERSION = "${@d.getVar('PV').split('.')[0]}" | ||
14 | |||
15 | SRC_URI = "http://php.net/distributions/php-${PV}.tar.bz2 \ | ||
16 | file://0002-build-php.m4-don-t-unset-cache-variables.patch \ | ||
17 | file://0003-php-remove-host-specific-info-from-header-file.patch \ | ||
18 | file://0004-configure.ac-don-t-include-build-libtool.m4.patch \ | ||
19 | file://0006-ext-phar-Makefile.frag-Fix-phar-packaging.patch \ | ||
20 | file://0009-php-don-t-use-broken-wrapper-for-mkdir.patch \ | ||
21 | file://0010-iconv-fix-detection.patch \ | ||
22 | file://0001-Change-whether-to-inline-XXH3_hashLong_withSecret-to.patch \ | ||
23 | " | ||
24 | |||
25 | SRC_URI:append:class-target = " \ | ||
26 | file://0001-ext-opcache-config.m4-enable-opcache.patch \ | ||
27 | file://0005-pear-fix-Makefile.frag-for-Yocto.patch \ | ||
28 | file://0007-sapi-cli-config.m4-fix-build-directory.patch \ | ||
29 | file://0008-ext-imap-config.m4-fix-include-paths.patch \ | ||
30 | file://php-fpm.conf \ | ||
31 | file://php-fpm-apache.conf \ | ||
32 | file://70_mod_php${PHP_MAJOR_VERSION}.conf \ | ||
33 | file://php-fpm.service \ | ||
34 | " | ||
35 | |||
36 | S = "${WORKDIR}/php-${PV}" | ||
37 | SRC_URI[sha256sum] = "ca0b07c254200320f518ac5b3df540a9cf14d866f3c93edc3013b52e06fac796" | ||
38 | |||
39 | CVE_STATUS_GROUPS += "CVE_STATUS_PHP" | ||
40 | CVE_STATUS_PHP[status] = "fixed-version: The name of this product is exactly the same as github.com/emlog/emlog. CVE can be safely ignored." | ||
41 | CVE_STATUS_PHP = " \ | ||
42 | CVE-2007-2728 \ | ||
43 | CVE-2007-3205 \ | ||
44 | CVE-2007-4596 \ | ||
45 | " | ||
46 | |||
47 | inherit autotools pkgconfig python3native gettext multilib_header multilib_script systemd | ||
48 | |||
49 | # phpize is not scanned for absolute paths by default (but php-config is). | ||
50 | # | ||
51 | SSTATE_SCAN_FILES += "phpize" | ||
52 | SSTATE_SCAN_FILES += "build-defs.h" | ||
53 | |||
54 | PHP_LIBDIR = "${libdir}/php${PHP_MAJOR_VERSION}" | ||
55 | |||
56 | # Common EXTRA_OECONF | ||
57 | COMMON_EXTRA_OECONF = "--enable-sockets \ | ||
58 | --enable-pcntl \ | ||
59 | --enable-shared \ | ||
60 | --disable-rpath \ | ||
61 | --with-pic \ | ||
62 | --libdir=${PHP_LIBDIR} \ | ||
63 | " | ||
64 | EXTRA_OECONF = "--enable-mbstring \ | ||
65 | --enable-fpm \ | ||
66 | --with-libdir=${baselib} \ | ||
67 | --with-gettext=${STAGING_LIBDIR}/.. \ | ||
68 | --with-zlib=${STAGING_LIBDIR}/.. \ | ||
69 | --with-iconv=${STAGING_LIBDIR}/.. \ | ||
70 | --with-bz2=${STAGING_DIR_TARGET}${exec_prefix} \ | ||
71 | --with-config-file-path=${sysconfdir}/php/apache2-php${PHP_MAJOR_VERSION} \ | ||
72 | ${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'ac_cv_c_bigendian_php=no', 'ac_cv_c_bigendian_php=yes', d)} \ | ||
73 | ${@bb.utils.contains('PACKAGECONFIG', 'pam', '', 'ac_cv_lib_pam_pam_start=no', d)} \ | ||
74 | ${COMMON_EXTRA_OECONF} \ | ||
75 | " | ||
76 | |||
77 | EXTRA_OECONF:append:riscv64 = " --with-pcre-jit=no" | ||
78 | EXTRA_OECONF:append:riscv32 = " --with-pcre-jit=no" | ||
79 | # Needs fibers assembly implemented for rv32 | ||
80 | # for example rv64 implementation is below | ||
81 | # see https://github.com/php/php-src/commit/70b02d75f2abe3a292d49c4a4e9e4f850c2fee68 | ||
82 | EXTRA_OECONF:append:riscv32:libc-musl = " --disable-fiber-asm" | ||
83 | |||
84 | CACHED_CONFIGUREVARS += "ac_cv_func_dlopen=no ac_cv_lib_dl_dlopen=yes" | ||
85 | |||
86 | EXTRA_OECONF:class-native = " \ | ||
87 | --with-zlib=${STAGING_LIBDIR_NATIVE}/.. \ | ||
88 | --without-iconv \ | ||
89 | ${COMMON_EXTRA_OECONF} \ | ||
90 | " | ||
91 | |||
92 | PACKAGECONFIG ??= "mysql sqlite3 imap opcache openssl \ | ||
93 | ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 pam', d)} \ | ||
94 | " | ||
95 | PACKAGECONFIG:class-native = "" | ||
96 | |||
97 | PACKAGECONFIG[zip] = "--with-zip --with-zlib-dir=${STAGING_EXECPREFIXDIR},,libzip" | ||
98 | |||
99 | PACKAGECONFIG[mysql] = "--with-mysqli=mysqlnd \ | ||
100 | --with-pdo-mysql=mysqlnd \ | ||
101 | ,--without-mysqli --without-pdo-mysql \ | ||
102 | ,mysql5" | ||
103 | |||
104 | PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_LIBDIR}/.. \ | ||
105 | --with-pdo-sqlite=${STAGING_LIBDIR}/.. \ | ||
106 | ,--without-sqlite3 --without-pdo-sqlite \ | ||
107 | ,sqlite3" | ||
108 | PACKAGECONFIG[pgsql] = "--with-pgsql=${STAGING_DIR_TARGET}${exec_prefix},--without-pgsql,postgresql" | ||
109 | PACKAGECONFIG[soap] = "--enable-soap, --disable-soap, libxml2" | ||
110 | PACKAGECONFIG[apache2] = "--with-apxs2=${STAGING_BINDIR_CROSS}/apxs,,apache2-native apache2" | ||
111 | PACKAGECONFIG[pam] = ",,libpam" | ||
112 | PACKAGECONFIG[imap] = "--with-imap=${STAGING_DIR_HOST} \ | ||
113 | --with-imap-ssl=${STAGING_DIR_HOST} \ | ||
114 | ,--without-imap --without-imap-ssl \ | ||
115 | ,uw-imap" | ||
116 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," | ||
117 | PACKAGECONFIG[opcache] = "--enable-opcache,--disable-opcache" | ||
118 | PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl" | ||
119 | PACKAGECONFIG[valgrind] = "--with-valgrind=${STAGING_DIR_TARGET}/usr,--with-valgrind=no,valgrind" | ||
120 | PACKAGECONFIG[mbregex] = "--enable-mbregex, --disable-mbregex, oniguruma" | ||
121 | PACKAGECONFIG[mbstring] = "--enable-mbstring,," | ||
122 | |||
123 | export HOSTCC = "${BUILD_CC}" | ||
124 | export PHP_NATIVE_DIR = "${STAGING_BINDIR_NATIVE}" | ||
125 | export PHP_PEAR_PHP_BIN = "${STAGING_BINDIR_NATIVE}/php" | ||
126 | CFLAGS += " -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I${STAGING_INCDIR}/apache2" | ||
127 | |||
128 | # Adding these flags enables dynamic library support, which is disabled by | ||
129 | # default when cross compiling | ||
130 | # See https://bugs.php.net/bug.php?id=60109 | ||
131 | CFLAGS += " -DHAVE_LIBDL " | ||
132 | LDFLAGS += " -ldl " | ||
133 | LDFLAGS:append:libc-musl = " -lucontext " | ||
134 | LDFLAGS:append:riscv64 = " -latomic" | ||
135 | |||
136 | EXTRA_OEMAKE = "INSTALL_ROOT=${D}" | ||
137 | |||
138 | acpaths = "" | ||
139 | |||
140 | do_configure:prepend () { | ||
141 | rm -f ${S}/build/libtool.m4 ${S}/ltmain.sh ${S}/aclocal.m4 | ||
142 | find ${S} -name config.m4 | xargs -n1 sed -i 's!APXS_HTTPD=.*!APXS_HTTPD=${STAGING_SBINDIR_NATIVE}/httpd!' | ||
143 | } | ||
144 | |||
145 | do_configure:append() { | ||
146 | # No, libtool, we really don't want rpath set... | ||
147 | sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool | ||
148 | sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool | ||
149 | sed -i -e's@${RECIPE_SYSROOT}@@g' \ | ||
150 | -e's@-ffile-prefix-map=[^ ]*[ ]*@@g' \ | ||
151 | -e's@-fdebug-prefix-map=[^ ]*[ ]*@@g' \ | ||
152 | -e's@-ffile-prefix-map=[^ ]*[ ]*@@g' \ | ||
153 | -e's@-fmacro-prefix-map=[^ ]*[ ]*@@g' \ | ||
154 | ${B}/main/build-defs.h \ | ||
155 | ${B}/scripts/php-config | ||
156 | } | ||
157 | |||
158 | do_install:append:class-native() { | ||
159 | rm -rf ${D}/${PHP_LIBDIR}/php/.registry | ||
160 | rm -rf ${D}/${PHP_LIBDIR}/php/.channels | ||
161 | rm -rf ${D}/${PHP_LIBDIR}/php/.[a-z]* | ||
162 | } | ||
163 | |||
164 | do_install:prepend() { | ||
165 | cat ${ACLOCALDIR}/libtool.m4 ${ACLOCALDIR}/lt~obsolete.m4 ${ACLOCALDIR}/ltoptions.m4 \ | ||
166 | ${ACLOCALDIR}/ltsugar.m4 ${ACLOCALDIR}/ltversion.m4 > ${S}/build/libtool.m4 | ||
167 | } | ||
168 | |||
169 | do_install:prepend:class-target() { | ||
170 | if ${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'true', 'false', d)}; then | ||
171 | # Install dummy config file so apxs doesn't fail | ||
172 | install -d ${D}${sysconfdir}/apache2 | ||
173 | printf "\nLoadModule dummy_module modules/mod_dummy.so\n" > ${D}${sysconfdir}/apache2/httpd.conf | ||
174 | fi | ||
175 | } | ||
176 | |||
177 | # fixme | ||
178 | do_install:append:class-target() { | ||
179 | install -d ${D}${sysconfdir}/ | ||
180 | rm -rf ${D}/.registry | ||
181 | rm -rf ${D}/.channels | ||
182 | rm -rf ${D}/.[a-z]* | ||
183 | rm -rf ${D}/var | ||
184 | rm -f ${D}/${sysconfdir}/php-fpm.conf.default | ||
185 | install -m 0644 ${UNPACKDIR}/php-fpm.conf ${D}/${sysconfdir}/php-fpm.conf | ||
186 | install -d ${D}/${sysconfdir}/apache2/conf.d | ||
187 | install -m 0644 ${UNPACKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf | ||
188 | install -d ${D}${sysconfdir}/init.d | ||
189 | sed -i 's:=/usr/sbin:=${sbindir}:g' ${B}/sapi/fpm/init.d.php-fpm | ||
190 | sed -i 's:=/etc:=${sysconfdir}:g' ${B}/sapi/fpm/init.d.php-fpm | ||
191 | sed -i 's:=/var:=${localstatedir}:g' ${B}/sapi/fpm/init.d.php-fpm | ||
192 | install -m 0755 ${B}/sapi/fpm/init.d.php-fpm ${D}${sysconfdir}/init.d/php-fpm | ||
193 | install -m 0644 ${UNPACKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf | ||
194 | |||
195 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then | ||
196 | install -d ${D}${systemd_system_unitdir} | ||
197 | install -m 0644 ${UNPACKDIR}/php-fpm.service ${D}${systemd_system_unitdir}/php-fpm.service | ||
198 | sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${systemd_system_unitdir}/php-fpm.service | ||
199 | sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_system_unitdir}/php-fpm.service | ||
200 | sed -i -e 's,@BINDIR@,${bindir},g' ${D}${systemd_system_unitdir}/php-fpm.service | ||
201 | fi | ||
202 | |||
203 | if ${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'true', 'false', d)}; then | ||
204 | install -d ${D}${sysconfdir}/apache2/modules.d | ||
205 | install -d ${D}${sysconfdir}/php/apache2-php${PHP_MAJOR_VERSION} | ||
206 | install -m 644 ${UNPACKDIR}/70_mod_php${PHP_MAJOR_VERSION}.conf ${D}${sysconfdir}/apache2/modules.d | ||
207 | sed -i s,lib/,${libexecdir}/, ${D}${sysconfdir}/apache2/modules.d/70_mod_php${PHP_MAJOR_VERSION}.conf | ||
208 | cat ${S}/php.ini-production | \ | ||
209 | sed -e 's,extension_dir = \"\./\",extension_dir = \"/usr/lib/extensions\",' \ | ||
210 | > ${D}${sysconfdir}/php/apache2-php${PHP_MAJOR_VERSION}/php.ini | ||
211 | rm -f ${D}${sysconfdir}/apache2/httpd.conf* | ||
212 | fi | ||
213 | } | ||
214 | |||
215 | MULTILIB_SCRIPTS += "${PN}:${bindir}/php-config \ | ||
216 | ${PN}:${bindir}/phpize \ | ||
217 | " | ||
218 | |||
219 | do_install:append () { | ||
220 | oe_multilib_header php/main/build-defs.h php/main/php_config.h | ||
221 | } | ||
222 | |||
223 | SYSROOT_PREPROCESS_FUNCS += "php_sysroot_preprocess" | ||
224 | |||
225 | php_sysroot_preprocess () { | ||
226 | install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/ | ||
227 | install -m 755 ${D}${bindir}/phpize ${SYSROOT_DESTDIR}${bindir_crossscripts}/ | ||
228 | install -m 755 ${D}${bindir}/php-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/ | ||
229 | |||
230 | sed -i 's!eval echo /!eval echo ${STAGING_DIR_HOST}/!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/phpize | ||
231 | sed -i 's!^include_dir=.*!include_dir=${STAGING_INCDIR}/php!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/php-config | ||
232 | } | ||
233 | |||
234 | MODPHP_PACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'apache2', '${PN}-modphp', '', d)}" | ||
235 | |||
236 | PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-phpdbg ${PN}-cgi ${PN}-fpm ${PN}-fpm-apache2 ${PN}-pear ${PN}-phar ${MODPHP_PACKAGE} ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}-opcache ${PN}" | ||
237 | |||
238 | RDEPENDS:${PN} += "libgcc" | ||
239 | RDEPENDS:${PN}-pear = "${PN}" | ||
240 | RDEPENDS:${PN}-phar = "${PN}-cli" | ||
241 | RDEPENDS:${PN}-cli = "${PN}" | ||
242 | RDEPENDS:${PN}-modphp = "${PN} apache2" | ||
243 | RDEPENDS:${PN}-opcache = "${PN}" | ||
244 | |||
245 | ALLOW_EMPTY:${PN} = "1" | ||
246 | |||
247 | INITSCRIPT_PACKAGES = "${PN}-fpm" | ||
248 | inherit update-rc.d | ||
249 | |||
250 | # WARNING: lib32-php-8.0.12-r0 do_package_qa: QA Issue: lib32-php: ELF binary /usr/libexec/apache2/modules/libphp.so has relocations in .text [textrel] | ||
251 | #WARNING: lib32-php-8.0.12-r0 do_package_qa: QA Issue: lib32-php-opcache: ELF binary /usr/lib/php8/extensions/no-debug-zts-20200930/opcache.so has relocations in .text [textrel] | ||
252 | INSANE_SKIP:${PN}:append:x86 = " textrel" | ||
253 | INSANE_SKIP:${PN}-opcache:append:x86 = " textrel" | ||
254 | |||
255 | FILES:${PN}-dbg =+ "${bindir}/.debug \ | ||
256 | ${libexecdir}/apache2/modules/.debug" | ||
257 | FILES:${PN}-doc += "${PHP_LIBDIR}/php/doc" | ||
258 | FILES:${PN}-cli = "${bindir}/php" | ||
259 | FILES:${PN}-phpdbg = "${bindir}/phpdbg" | ||
260 | FILES:${PN}-phar = "${bindir}/phar*" | ||
261 | FILES:${PN}-cgi = "${bindir}/php-cgi" | ||
262 | FILES:${PN}-fpm = "${sbindir}/php-fpm ${sysconfdir}/php-fpm.conf ${datadir}/fpm ${sysconfdir}/init.d/php-fpm ${sysconfdir}/php-fpm.d/www.conf.default" | ||
263 | FILES:${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf" | ||
264 | CONFFILES:${PN}-fpm = "${sysconfdir}/php-fpm.conf" | ||
265 | CONFFILES:${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf" | ||
266 | INITSCRIPT_NAME:${PN}-fpm = "php-fpm" | ||
267 | INITSCRIPT_PARAMS:${PN}-fpm = "defaults 60" | ||
268 | FILES:${PN}-pear = "${bindir}/pear* ${bindir}/pecl ${PHP_LIBDIR}/php/PEAR \ | ||
269 | ${PHP_LIBDIR}/php/PEAR*.php ${PHP_LIBDIR}/php/System.php \ | ||
270 | ${PHP_LIBDIR}/php/peclcmd.php ${PHP_LIBDIR}/php/pearcmd.php \ | ||
271 | ${PHP_LIBDIR}/php/.channels ${PHP_LIBDIR}/php/.channels/.alias \ | ||
272 | ${PHP_LIBDIR}/php/.registry ${PHP_LIBDIR}/php/Archive/Tar.php \ | ||
273 | ${PHP_LIBDIR}/php/Console/Getopt.php ${PHP_LIBDIR}/php/OS/Guess.php \ | ||
274 | ${PHP_LIBDIR}/php/data/PEAR \ | ||
275 | ${sysconfdir}/pear.conf" | ||
276 | FILES:${PN}-dev = "${includedir}/php ${PHP_LIBDIR}/build ${bindir}/phpize \ | ||
277 | ${bindir}/php-config ${PHP_LIBDIR}/php/.depdb \ | ||
278 | ${PHP_LIBDIR}/php/.depdblock ${PHP_LIBDIR}/php/.filemap \ | ||
279 | ${PHP_LIBDIR}/php/.lock ${PHP_LIBDIR}/php/test" | ||
280 | FILES:${PN}-staticdev += "${PHP_LIBDIR}/extensions/*/*.a" | ||
281 | FILES:${PN}-opcache = "${PHP_LIBDIR}/extensions/*/opcache${SOLIBSDEV}" | ||
282 | FILES:${PN} = "${PHP_LIBDIR}/php" | ||
283 | FILES:${PN} += "${bindir} ${libexecdir}/apache2" | ||
284 | |||
285 | SUMMARY:${PN}-modphp = "PHP module for the Apache HTTP server" | ||
286 | FILES:${PN}-modphp = "${libdir}/apache2 ${sysconfdir}" | ||
287 | |||
288 | MODPHP_OLDPACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'modphp', '', d)}" | ||
289 | RPROVIDES:${PN}-modphp = "${MODPHP_OLDPACKAGE}" | ||
290 | RREPLACES:${PN}-modphp = "${MODPHP_OLDPACKAGE}" | ||
291 | RCONFLICTS:${PN}-modphp = "${MODPHP_OLDPACKAGE}" | ||
292 | |||
293 | SYSTEMD_SERVICE:${PN}-fpm = "php-fpm.service" | ||
294 | SYSTEMD_PACKAGES += "${PN}-fpm" | ||
295 | |||
296 | do_install:append:class-native() { | ||
297 | create_wrapper ${D}${bindir}/php \ | ||
298 | PHP_PEAR_SYSCONF_DIR=${sysconfdir}/ | ||
299 | } | ||