mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-09-03 17:16:22 +00:00
Error: Transaction test error:
file /usr/bin/php-config conflicts between attempted installs of php-dev-8.2.7-r0.core2_64 and lib32-php-dev-8.2.7-r0.i686
file /usr/bin/phpize conflicts between attempted installs of php-dev-8.2.7-r0.core2_64 and lib32-php-dev-8.2.7-r0.i686
file /usr/include/php/main/build-defs.h conflicts between attempted installs of php-dev-8.2.7-r0.core2_64 and lib32-php-dev-8.2.7-r0.i686
file /usr/include/php/main/php_config.h conflicts between attempted installs of php-dev-8.2.7-r0.core2_64 and lib32-php-dev-8.2.7-r0.i686
The differences of php-config are as follows:
@@ -8,16 +8,16 @@
vernum="80207"
include_dir="/usr/include/php"
includes="-I$include_dir -I$include_dir/main -I$include_dir/TSRM -I$include_dir/Zend -I$include_dir/ext -I$include_dir/ext/date/lib"
-ldflags=" -L/usr/lib64"
+ldflags=" -L/usr/lib"
libs="-lcrypt -lc-client -lrt -lcrypt -lpam -lbz2 -lrt -lm -ldl -lxml2 -lssl -lcrypto -lsqlite3 -lz -lxml2 -lssl -lcrypto -lsqlite3 -lxml2 -lxml2 -lxml2 -lxml2 -lz -lssl -lcrypto -lcrypt "
-extension_dir='/usr/lib64/php8/extensions/no-debug-non-zts-20220829'
+extension_dir='/usr/lib/php8/extensions/no-debug-non-zts-20220829'
man_dir=`eval echo /usr/share/man`
program_prefix=""
program_suffix=""
exe_extension=""
php_cli_binary=NONE
php_cgi_binary=NONE
-configure_options=" '--build=x86_64-linux' '--host=x86_64-poky-linux' '--target=x86_64-poky-linux' '--prefix=/usr' '--exec_prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--libexecdir=/usr/libexec' '--datadir=/usr/share' '--sysconfdir=/etc' '--sharedstatedir=/com' '--localstatedir=/var' '--libdir=/usr/lib64' '--includedir=/usr/include' '--oldincludedir=/usr/include' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--disable-silent-rules' '--disable-dependency-tracking' '--with-libtool-sysroot=' '--enable-mbstring' '--enable-fpm' '--with-libdir=lib64' '--with-gettext=/usr/lib64/..' '--with-zlib=/usr/lib64/..' '--with-iconv=/usr/lib64/..' '--with-bz2=/usr' '--with-config-file-path=/etc/php/apache2-php8' 'ac_cv_c_bigendian_php=no' '--enable-sockets' '--enable-pcntl' '--enable-shared' '--disable-rpath' '--with-pic' '--libdir=/usr/lib64/php8' '--disable-static' '--with-imap=' '--with-imap-ssl=' '--disable-ipv6' '--disable-mbregex' '--with-mysqli=mysqlnd' '--with-pdo-mysql=m
ysqlnd' '--enable-opcache' '--with-openssl' '--without-pgsql' '--disable-soap' '--with-sqlite3=/usr/lib64/..' '--with-pdo-sqlite=/usr/lib64/..' '--with-valgrind=no' '--enable-nls' 'build_alias=x86_64-linux' 'host_alias=x86_64-poky-linux' 'target_alias=x86_64-poky-linux' 'PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/share/pkgconfig://usr/share/pkgconfig' 'PKG_CONFIG_LIBDIR=/usr/lib64/pkgconfig' 'CC=x86_64-poky-linux-gcc -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=' 'CFLAGS= -O2 -pipe -g -feliminate-unused-debug-types -fcanon-prefix-map -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I/usr/include/apache2 -DHAVE_LIBDL ' 'LDFLAGS=-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fcanon-prefix-map -Wl,-z,relro,-z,now -ldl ' 'CPPFLAGS=' 'CPP=x86_64-poky-linux-gcc -E --sysroot= -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong
-O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security' 'CXX=x86_64-poky-linux-g++ -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=' 'CXXFLAGS= -O2 -pipe -g -feliminate-unused-debug-types -fcanon-prefix-map -fvisibility-inlines-hidden'"
+configure_options=" '--build=x86_64-linux' '--host=i686-pokymllib32-linux' '--target=i686-pokymllib32-linux' '--prefix=/usr' '--exec_prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--libexecdir=/usr/libexec' '--datadir=/usr/share' '--sysconfdir=/etc' '--sharedstatedir=/com' '--localstatedir=/var' '--libdir=/usr/lib' '--includedir=/usr/include' '--oldincludedir=/usr/include' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--disable-silent-rules' '--disable-dependency-tracking' '--with-libtool-sysroot=' '--enable-mbstring' '--enable-fpm' '--with-libdir=lib' '--with-gettext=/usr/lib/..' '--with-zlib=/usr/lib/..' '--with-iconv=/usr/lib/..' '--with-bz2=/usr' '--with-config-file-path=/etc/php/apache2-php8' 'ac_cv_c_bigendian_php=no' '--enable-sockets' '--enable-pcntl' '--enable-shared' '--disable-rpath' '--with-pic' '--libdir=/usr/lib/php8' '--disable-static' '--with-imap=' '--with-imap-ssl=' '--disable-ipv6' '--disable-mbregex' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mys
qlnd' '--enable-opcache' '--with-openssl' '--without-pgsql' '--disable-soap' '--with-sqlite3=/usr/lib/..' '--with-pdo-sqlite=/usr/lib/..' '--with-valgrind=no' '--enable-nls' 'build_alias=x86_64-linux' 'host_alias=i686-pokymllib32-linux' 'target_alias=i686-pokymllib32-linux' 'PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/share/pkgconfig:/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/i686-pokymllib32-linux/lib32-php/8.2.7-r0/recipe-sysroot//usr/share/pkgconfig' 'PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig' 'CC=i686-pokymllib32-linux-gcc -m32 -march=i686 -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 --sysroot=' 'CFLAGS= -O2 -pipe -g -feliminate-unused-debug-types -fcanon-prefix-map -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I/usr/include/apache2 -DHAVE_LIBDL ' 'LDFLAGS=-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fcanon-prefix-map -Wl,-z,relro,-z,now -ldl ' 'CPPFLAGS
=' 'CPP=i686-pokymllib32-linux-gcc -E --sysroot= -m32 -march=i686 -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64' 'CXX=i686-pokymllib32-linux-g++ -m32 -march=i686 -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 --sysroot=' 'CXXFLAGS= -O2 -pipe -g -feliminate-unused-debug-types -fcanon-prefix-map -fvisibility-inlines-hidden'"
The differences of phpize are as follows:
@@ -4,7 +4,7 @@
prefix='/usr'
datarootdir='/usr/php'
exec_prefix="`eval echo /usr`"
-phpdir="`eval echo /usr/lib64/php8`/build"
+phpdir="`eval echo /usr/lib/php8`/build"
includedir="`eval echo /usr/include`/php"
builddir="`pwd`"
SED="sed"
The differences of build-defs.h are as follows:
@@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/
-#define CONFIGURE_COMMAND " '../php-8.2.7/configure' '--build=x86_64-linux' '--host=x86_64-poky-linux' '--target=x86_64-poky-linux' '--prefix=/usr' '--exec_prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--libexecdir=/usr/libexec' '--datadir=/usr/share' '--sysconfdir=/etc' '--sharedstatedir=/com' '--localstatedir=/var' '--libdir=/usr/lib64' '--includedir=/usr/include' '--oldincludedir=/usr/include' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--disable-silent-rules' '--disable-dependency-tracking' '--with-libtool-sysroot=' '--enable-mbstring' '--enable-fpm' '--with-libdir=lib64' '--with-gettext=/usr/lib64/..' '--with-zlib=/usr/lib64/..' '--with-iconv=/usr/lib64/..' '--with-bz2=/usr' '--with-config-file-path=/etc/php/apache2-php8' 'ac_cv_c_bigendian_php=no' '--enable-sockets' '--enable-pcntl' '--enable-shared' '--disable-rpath' '--with-pic' '--libdir=/usr/lib64/php8' '--disable-static' '--with-imap=' '--with-imap-ssl=' '--disable-ipv6' '--disable-mbregex' '--with-m
ysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--enable-opcache' '--with-openssl' '--without-pgsql' '--disable-soap' '--with-sqlite3=/usr/lib64/..' '--with-pdo-sqlite=/usr/lib64/..' '--with-valgrind=no' '--enable-nls' 'build_alias=x86_64-linux' 'host_alias=x86_64-poky-linux' 'target_alias=x86_64-poky-linux' 'PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/share/pkgconfig://usr/share/pkgconfig' 'PKG_CONFIG_LIBDIR=/usr/lib64/pkgconfig' 'CC=x86_64-poky-linux-gcc -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=' 'CFLAGS= -O2 -pipe -g -feliminate-unused-debug-types -fcanon-prefix-map -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I/usr/include/apache2 -DHAVE_LIBDL ' 'LDFLAGS=-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fcanon-prefix-map -Wl,-z,relro,-z,now -ldl ' 'CPPFLAGS=' 'CPP=x86_64-poky-linux-gcc -E --sysroot= -m64 -march=core2 -mtune=core2 -msse3 -mf
pmath=sse -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security' 'CXX=x86_64-poky-linux-g++ -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=' 'CXXFLAGS= -O2 -pipe -g -feliminate-unused-debug-types -fcanon-prefix-map -fvisibility-inlines-hidden'"
+#define CONFIGURE_COMMAND " '../php-8.2.7/configure' '--build=x86_64-linux' '--host=i686-pokymllib32-linux' '--target=i686-pokymllib32-linux' '--prefix=/usr' '--exec_prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--libexecdir=/usr/libexec' '--datadir=/usr/share' '--sysconfdir=/etc' '--sharedstatedir=/com' '--localstatedir=/var' '--libdir=/usr/lib' '--includedir=/usr/include' '--oldincludedir=/usr/include' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--disable-silent-rules' '--disable-dependency-tracking' '--with-libtool-sysroot=' '--enable-mbstring' '--enable-fpm' '--with-libdir=lib' '--with-gettext=/usr/lib/..' '--with-zlib=/usr/lib/..' '--with-iconv=/usr/lib/..' '--with-bz2=/usr' '--with-config-file-path=/etc/php/apache2-php8' 'ac_cv_c_bigendian_php=no' '--enable-sockets' '--enable-pcntl' '--enable-shared' '--disable-rpath' '--with-pic' '--libdir=/usr/lib/php8' '--disable-static' '--with-imap=' '--with-imap-ssl=' '--disable-ipv6' '--disable-mbregex' '--with-mys
qli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--enable-opcache' '--with-openssl' '--without-pgsql' '--disable-soap' '--with-sqlite3=/usr/lib/..' '--with-pdo-sqlite=/usr/lib/..' '--with-valgrind=no' '--enable-nls' 'build_alias=x86_64-linux' 'host_alias=i686-pokymllib32-linux' 'target_alias=i686-pokymllib32-linux' 'PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/share/pkgconfig:/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/i686-pokymllib32-linux/lib32-php/8.2.7-r0/recipe-sysroot//usr/share/pkgconfig' 'PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig' 'CC=i686-pokymllib32-linux-gcc -m32 -march=i686 -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 --sysroot=' 'CFLAGS= -O2 -pipe -g -feliminate-unused-debug-types -fcanon-prefix-map -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I/usr/include/apache2 -DHAVE_LIBDL ' 'LDFLAGS=-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fcanon-prefix-map -W
l,-z,relro,-z,now -ldl ' 'CPPFLAGS=' 'CPP=i686-pokymllib32-linux-gcc -E --sysroot= -m32 -march=i686 -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64' 'CXX=i686-pokymllib32-linux-g++ -m32 -march=i686 -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 --sysroot=' 'CXXFLAGS= -O2 -pipe -g -feliminate-unused-debug-types -fcanon-prefix-map -fvisibility-inlines-hidden'"
#define PHP_ODBC_CFLAGS ""
#define PHP_ODBC_LFLAGS ""
#define PHP_ODBC_LIBS ""
@@ -24,12 +24,12 @@
#define PHP_PROG_SENDMAIL "/usr/sbin/sendmail"
#define PEAR_INSTALLDIR ""
#define PHP_INCLUDE_PATH ".:"
-#define PHP_EXTENSION_DIR "/usr/lib64/php8/extensions/no-debug-non-zts-20220829"
+#define PHP_EXTENSION_DIR "/usr/lib/php8/extensions/no-debug-non-zts-20220829"
#define PHP_PREFIX "/usr"
#define PHP_BINDIR "/usr/bin"
#define PHP_SBINDIR "/usr/sbin"
#define PHP_MANDIR "/usr/share/man"
-#define PHP_LIBDIR "/usr/lib64/php8"
+#define PHP_LIBDIR "/usr/lib/php8"
#define PHP_DATADIR "/usr/share"
#define PHP_SYSCONFDIR "/etc"
#define PHP_LOCALSTATEDIR "/var"
The differences of php_config.h are as follows:
@@ -2064,7 +2064,7 @@
/* #undef SIZEOF_INTMAX_T */
/* The size of `long', as computed by sizeof. */
-#define SIZEOF_LONG 8
+#define SIZEOF_LONG 4
/* The size of `long long', as computed by sizeof. */
#define SIZEOF_LONG_LONG 8
@@ -2079,7 +2079,7 @@
#define SIZEOF_SHORT 2
/* The size of `size_t', as computed by sizeof. */
-#define SIZEOF_SIZE_T 8
+#define SIZEOF_SIZE_T 4
/* Size of ssize_t */
#define SIZEOF_SSIZE_T 8
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
295 lines
13 KiB
BlitzBasic
295 lines
13 KiB
BlitzBasic
SUMMARY = "A server-side, HTML-embedded scripting language"
|
|
HOMEPAGE = "http://www.php.net"
|
|
SECTION = "console/network"
|
|
|
|
LICENSE = "PHP-3.0"
|
|
LIC_FILES_CHKSUM = "file://LICENSE;md5=5ebd5be8e2a89f634486445bd164bef0"
|
|
|
|
BBCLASSEXTEND = "native"
|
|
DEPENDS = "zlib bzip2 libxml2 virtual/libiconv php-native lemon-native"
|
|
DEPENDS:append:libc-musl = " libucontext"
|
|
DEPENDS:class-native = "zlib-native libxml2-native"
|
|
|
|
PHP_MAJOR_VERSION = "${@d.getVar('PV').split('.')[0]}"
|
|
|
|
SRC_URI = "http://php.net/distributions/php-${PV}.tar.bz2 \
|
|
file://0002-build-php.m4-don-t-unset-cache-variables.patch \
|
|
file://0003-php-remove-host-specific-info-from-header-file.patch \
|
|
file://0004-configure.ac-don-t-include-build-libtool.m4.patch \
|
|
file://0006-ext-phar-Makefile.frag-Fix-phar-packaging.patch \
|
|
file://0009-php-don-t-use-broken-wrapper-for-mkdir.patch \
|
|
file://0010-iconv-fix-detection.patch \
|
|
file://0001-Change-whether-to-inline-XXH3_hashLong_withSecret-to.patch \
|
|
"
|
|
|
|
SRC_URI:append:class-target = " \
|
|
file://0001-ext-opcache-config.m4-enable-opcache.patch \
|
|
file://0005-pear-fix-Makefile.frag-for-Yocto.patch \
|
|
file://0007-sapi-cli-config.m4-fix-build-directory.patch \
|
|
file://0008-ext-imap-config.m4-fix-include-paths.patch \
|
|
file://php-fpm.conf \
|
|
file://php-fpm-apache.conf \
|
|
file://70_mod_php${PHP_MAJOR_VERSION}.conf \
|
|
file://php-fpm.service \
|
|
"
|
|
|
|
S = "${WORKDIR}/php-${PV}"
|
|
SRC_URI[sha256sum] = "5bfb2a35c67921bdcadd5c90cb290ad7537d24da113a5e8bc2d646b02de7488f"
|
|
|
|
CVE_CHECK_IGNORE += "\
|
|
CVE-2007-2728 \
|
|
CVE-2007-3205 \
|
|
CVE-2007-4596 \
|
|
"
|
|
|
|
inherit autotools pkgconfig python3native gettext multilib_header multilib_script
|
|
|
|
# phpize is not scanned for absolute paths by default (but php-config is).
|
|
#
|
|
SSTATE_SCAN_FILES += "phpize"
|
|
SSTATE_SCAN_FILES += "build-defs.h"
|
|
|
|
PHP_LIBDIR = "${libdir}/php${PHP_MAJOR_VERSION}"
|
|
|
|
# Common EXTRA_OECONF
|
|
COMMON_EXTRA_OECONF = "--enable-sockets \
|
|
--enable-pcntl \
|
|
--enable-shared \
|
|
--disable-rpath \
|
|
--with-pic \
|
|
--libdir=${PHP_LIBDIR} \
|
|
"
|
|
EXTRA_OECONF = "--enable-mbstring \
|
|
--enable-fpm \
|
|
--with-libdir=${baselib} \
|
|
--with-gettext=${STAGING_LIBDIR}/.. \
|
|
--with-zlib=${STAGING_LIBDIR}/.. \
|
|
--with-iconv=${STAGING_LIBDIR}/.. \
|
|
--with-bz2=${STAGING_DIR_TARGET}${exec_prefix} \
|
|
--with-config-file-path=${sysconfdir}/php/apache2-php${PHP_MAJOR_VERSION} \
|
|
${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'ac_cv_c_bigendian_php=no', 'ac_cv_c_bigendian_php=yes', d)} \
|
|
${@bb.utils.contains('PACKAGECONFIG', 'pam', '', 'ac_cv_lib_pam_pam_start=no', d)} \
|
|
${COMMON_EXTRA_OECONF} \
|
|
"
|
|
|
|
EXTRA_OECONF:append:riscv64 = " --with-pcre-jit=no"
|
|
EXTRA_OECONF:append:riscv32 = " --with-pcre-jit=no"
|
|
# Needs fibers assembly implemented for rv32
|
|
# for example rv64 implementation is below
|
|
# see https://github.com/php/php-src/commit/70b02d75f2abe3a292d49c4a4e9e4f850c2fee68
|
|
EXTRA_OECONF:append:riscv32:libc-musl = " --disable-fiber-asm"
|
|
|
|
CACHED_CONFIGUREVARS += "ac_cv_func_dlopen=no ac_cv_lib_dl_dlopen=yes"
|
|
|
|
EXTRA_OECONF:class-native = " \
|
|
--with-zlib=${STAGING_LIBDIR_NATIVE}/.. \
|
|
--without-iconv \
|
|
${COMMON_EXTRA_OECONF} \
|
|
"
|
|
|
|
PACKAGECONFIG ??= "mysql sqlite3 imap opcache openssl \
|
|
${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 pam', d)} \
|
|
"
|
|
PACKAGECONFIG:class-native = ""
|
|
|
|
PACKAGECONFIG[zip] = "--with-zip --with-zlib-dir=${STAGING_EXECPREFIXDIR},,libzip"
|
|
|
|
PACKAGECONFIG[mysql] = "--with-mysqli=mysqlnd \
|
|
--with-pdo-mysql=mysqlnd \
|
|
,--without-mysqli --without-pdo-mysql \
|
|
,mysql5"
|
|
|
|
PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_LIBDIR}/.. \
|
|
--with-pdo-sqlite=${STAGING_LIBDIR}/.. \
|
|
,--without-sqlite3 --without-pdo-sqlite \
|
|
,sqlite3"
|
|
PACKAGECONFIG[pgsql] = "--with-pgsql=${STAGING_DIR_TARGET}${exec_prefix},--without-pgsql,postgresql"
|
|
PACKAGECONFIG[soap] = "--enable-soap, --disable-soap, libxml2"
|
|
PACKAGECONFIG[apache2] = "--with-apxs2=${STAGING_BINDIR_CROSS}/apxs,,apache2-native apache2"
|
|
PACKAGECONFIG[pam] = ",,libpam"
|
|
PACKAGECONFIG[imap] = "--with-imap=${STAGING_DIR_HOST} \
|
|
--with-imap-ssl=${STAGING_DIR_HOST} \
|
|
,--without-imap --without-imap-ssl \
|
|
,uw-imap"
|
|
PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
|
|
PACKAGECONFIG[opcache] = "--enable-opcache,--disable-opcache"
|
|
PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl"
|
|
PACKAGECONFIG[valgrind] = "--with-valgrind=${STAGING_DIR_TARGET}/usr,--with-valgrind=no,valgrind"
|
|
PACKAGECONFIG[mbregex] = "--enable-mbregex, --disable-mbregex, oniguruma"
|
|
PACKAGECONFIG[mbstring] = "--enable-mbstring,,"
|
|
|
|
export HOSTCC = "${BUILD_CC}"
|
|
export PHP_NATIVE_DIR = "${STAGING_BINDIR_NATIVE}"
|
|
export PHP_PEAR_PHP_BIN = "${STAGING_BINDIR_NATIVE}/php"
|
|
CFLAGS += " -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I${STAGING_INCDIR}/apache2"
|
|
|
|
# Adding these flags enables dynamic library support, which is disabled by
|
|
# default when cross compiling
|
|
# See https://bugs.php.net/bug.php?id=60109
|
|
CFLAGS += " -DHAVE_LIBDL "
|
|
LDFLAGS += " -ldl "
|
|
LDFLAGS:append:libc-musl = " -lucontext "
|
|
LDFLAGS:append:riscv64 = " -latomic"
|
|
|
|
EXTRA_OEMAKE = "INSTALL_ROOT=${D}"
|
|
|
|
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_SBINDIR_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' libtool
|
|
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
|
sed -i -e's@${RECIPE_SYSROOT}@@g' \
|
|
-e's@-ffile-prefix-map=[^ ]*[ ]*@@g' \
|
|
-e's@-fdebug-prefix-map=[^ ]*[ ]*@@g' \
|
|
-e's@-ffile-prefix-map=[^ ]*[ ]*@@g' \
|
|
-e's@-fmacro-prefix-map=[^ ]*[ ]*@@g' \
|
|
${B}/main/build-defs.h \
|
|
${B}/scripts/php-config
|
|
}
|
|
|
|
do_install:append:class-native() {
|
|
rm -rf ${D}/${PHP_LIBDIR}/php/.registry
|
|
rm -rf ${D}/${PHP_LIBDIR}/php/.channels
|
|
rm -rf ${D}/${PHP_LIBDIR}/php/.[a-z]*
|
|
}
|
|
|
|
do_install:prepend() {
|
|
cat ${ACLOCALDIR}/libtool.m4 ${ACLOCALDIR}/lt~obsolete.m4 ${ACLOCALDIR}/ltoptions.m4 \
|
|
${ACLOCALDIR}/ltsugar.m4 ${ACLOCALDIR}/ltversion.m4 > ${S}/build/libtool.m4
|
|
}
|
|
|
|
do_install:prepend:class-target() {
|
|
if ${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'true', 'false', d)}; then
|
|
# Install dummy config file so apxs doesn't fail
|
|
install -d ${D}${sysconfdir}/apache2
|
|
printf "\nLoadModule dummy_module modules/mod_dummy.so\n" > ${D}${sysconfdir}/apache2/httpd.conf
|
|
fi
|
|
}
|
|
|
|
# fixme
|
|
do_install:append:class-target() {
|
|
install -d ${D}${sysconfdir}/
|
|
rm -rf ${D}/.registry
|
|
rm -rf ${D}/.channels
|
|
rm -rf ${D}/.[a-z]*
|
|
rm -rf ${D}/var
|
|
rm -f ${D}/${sysconfdir}/php-fpm.conf.default
|
|
install -m 0644 ${WORKDIR}/php-fpm.conf ${D}/${sysconfdir}/php-fpm.conf
|
|
install -d ${D}/${sysconfdir}/apache2/conf.d
|
|
install -m 0644 ${WORKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf
|
|
install -d ${D}${sysconfdir}/init.d
|
|
sed -i 's:=/usr/sbin:=${sbindir}:g' ${B}/sapi/fpm/init.d.php-fpm
|
|
sed -i 's:=/etc:=${sysconfdir}:g' ${B}/sapi/fpm/init.d.php-fpm
|
|
sed -i 's:=/var:=${localstatedir}:g' ${B}/sapi/fpm/init.d.php-fpm
|
|
install -m 0755 ${B}/sapi/fpm/init.d.php-fpm ${D}${sysconfdir}/init.d/php-fpm
|
|
install -m 0644 ${WORKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf
|
|
|
|
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then
|
|
install -d ${D}${systemd_unitdir}/system
|
|
install -m 0644 ${WORKDIR}/php-fpm.service ${D}${systemd_unitdir}/system/
|
|
sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \
|
|
-e 's,@LOCALSTATEDIR@,${localstatedir},g' \
|
|
${D}${systemd_unitdir}/system/php-fpm.service
|
|
fi
|
|
|
|
if ${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'true', 'false', d)}; then
|
|
install -d ${D}${sysconfdir}/apache2/modules.d
|
|
install -d ${D}${sysconfdir}/php/apache2-php${PHP_MAJOR_VERSION}
|
|
install -m 644 ${WORKDIR}/70_mod_php${PHP_MAJOR_VERSION}.conf ${D}${sysconfdir}/apache2/modules.d
|
|
sed -i s,lib/,${libexecdir}/, ${D}${sysconfdir}/apache2/modules.d/70_mod_php${PHP_MAJOR_VERSION}.conf
|
|
cat ${S}/php.ini-production | \
|
|
sed -e 's,extension_dir = \"\./\",extension_dir = \"/usr/lib/extensions\",' \
|
|
> ${D}${sysconfdir}/php/apache2-php${PHP_MAJOR_VERSION}/php.ini
|
|
rm -f ${D}${sysconfdir}/apache2/httpd.conf*
|
|
fi
|
|
}
|
|
|
|
MULTILIB_SCRIPTS += "${PN}:${bindir}/php-config \
|
|
${PN}:${bindir}/phpize \
|
|
"
|
|
|
|
do_install:append () {
|
|
oe_multilib_header php/main/build-defs.h php/main/php_config.h
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
MODPHP_PACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'apache2', '${PN}-modphp', '', d)}"
|
|
|
|
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}"
|
|
|
|
RDEPENDS:${PN} += "libgcc"
|
|
RDEPENDS:${PN}-pear = "${PN}"
|
|
RDEPENDS:${PN}-phar = "${PN}-cli"
|
|
RDEPENDS:${PN}-cli = "${PN}"
|
|
RDEPENDS:${PN}-modphp = "${PN} apache2"
|
|
RDEPENDS:${PN}-opcache = "${PN}"
|
|
|
|
ALLOW_EMPTY:${PN} = "1"
|
|
|
|
INITSCRIPT_PACKAGES = "${PN}-fpm"
|
|
inherit update-rc.d
|
|
|
|
# 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]
|
|
#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]
|
|
INSANE_SKIP:${PN}:append:x86 = " textrel"
|
|
INSANE_SKIP:${PN}-opcache:append:x86 = " textrel"
|
|
|
|
FILES:${PN}-dbg =+ "${bindir}/.debug \
|
|
${libexecdir}/apache2/modules/.debug"
|
|
FILES:${PN}-doc += "${PHP_LIBDIR}/php/doc"
|
|
FILES:${PN}-cli = "${bindir}/php"
|
|
FILES:${PN}-phpdbg = "${bindir}/phpdbg"
|
|
FILES:${PN}-phar = "${bindir}/phar*"
|
|
FILES:${PN}-cgi = "${bindir}/php-cgi"
|
|
FILES:${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"
|
|
FILES:${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf"
|
|
CONFFILES:${PN}-fpm = "${sysconfdir}/php-fpm.conf"
|
|
CONFFILES:${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf"
|
|
INITSCRIPT_NAME:${PN}-fpm = "php-fpm"
|
|
INITSCRIPT_PARAMS:${PN}-fpm = "defaults 60"
|
|
FILES:${PN}-pear = "${bindir}/pear* ${bindir}/pecl ${PHP_LIBDIR}/php/PEAR \
|
|
${PHP_LIBDIR}/php/PEAR*.php ${PHP_LIBDIR}/php/System.php \
|
|
${PHP_LIBDIR}/php/peclcmd.php ${PHP_LIBDIR}/php/pearcmd.php \
|
|
${PHP_LIBDIR}/php/.channels ${PHP_LIBDIR}/php/.channels/.alias \
|
|
${PHP_LIBDIR}/php/.registry ${PHP_LIBDIR}/php/Archive/Tar.php \
|
|
${PHP_LIBDIR}/php/Console/Getopt.php ${PHP_LIBDIR}/php/OS/Guess.php \
|
|
${PHP_LIBDIR}/php/data/PEAR \
|
|
${sysconfdir}/pear.conf"
|
|
FILES:${PN}-dev = "${includedir}/php ${PHP_LIBDIR}/build ${bindir}/phpize \
|
|
${bindir}/php-config ${PHP_LIBDIR}/php/.depdb \
|
|
${PHP_LIBDIR}/php/.depdblock ${PHP_LIBDIR}/php/.filemap \
|
|
${PHP_LIBDIR}/php/.lock ${PHP_LIBDIR}/php/test"
|
|
FILES:${PN}-staticdev += "${PHP_LIBDIR}/extensions/*/*.a"
|
|
FILES:${PN}-opcache = "${PHP_LIBDIR}/extensions/*/opcache${SOLIBSDEV}"
|
|
FILES:${PN} = "${PHP_LIBDIR}/php"
|
|
FILES:${PN} += "${bindir} ${libexecdir}/apache2"
|
|
|
|
SUMMARY:${PN}-modphp = "PHP module for the Apache HTTP server"
|
|
FILES:${PN}-modphp = "${libdir}/apache2 ${sysconfdir}"
|
|
|
|
MODPHP_OLDPACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'modphp', '', d)}"
|
|
RPROVIDES:${PN}-modphp = "${MODPHP_OLDPACKAGE}"
|
|
RREPLACES:${PN}-modphp = "${MODPHP_OLDPACKAGE}"
|
|
RCONFLICTS:${PN}-modphp = "${MODPHP_OLDPACKAGE}"
|
|
|
|
do_install:append:class-native() {
|
|
create_wrapper ${D}${bindir}/php \
|
|
PHP_PEAR_SYSCONF_DIR=${sysconfdir}/
|
|
}
|