From 4b6499752e7723ee0a61eadd794413c7705cc3e7 Mon Sep 17 00:00:00 2001 From: Remi Pommarel Date: Fri, 10 Sep 2021 00:30:34 +0200 Subject: [PATCH] php: Support opcache cross compilation Opcache extension configuration tries to detect some shared memory function by compiling and executing test programs at compile time. This cannot work when cross compiling. To workaround that add proper defines to use those functions anyway if we are cross compiling. That fixes the following error when using opcache extension on arm: Fatal Error Unable to allocate shared memory segment of 134217728 bytes --- srcpkgs/php/template | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/srcpkgs/php/template b/srcpkgs/php/template index a1390b7e1ec2..927bbf8504f8 100644 --- a/srcpkgs/php/template +++ b/srcpkgs/php/template @@ -1,7 +1,7 @@ # Template file for 'php' pkgname=php version=7.4.14 -revision=5 +revision=6 hostmakedepends="bison pkg-config apache-devel" makedepends="apache-devel enchant-devel freetds-devel freetype-devel gdbm-devel gmp-devel libcurl-devel libjpeg-turbo-devel libmariadbclient-devel @@ -23,7 +23,14 @@ replaces="php-mcrypt<7.2.0" if [ -n "$CROSS_BUILD" ]; then # php-pear needs php to build hostmakedepends+=" php" - CFLAGS+=" -DHAVE_LIBDL -DHAVE_DLOPEN -DHAVE_DLSYM" + CFLAGS+=" -DHAVE_LIBDL + -DHAVE_DLOPEN + -DHAVE_DLSYM + -DHAVE_SHM_IPC + -DHAVE_SHM_MMAP_ANON + -DHAVE_SHM_MMAP_ZERO + -DHAVE_SHM_MMAP_POSIX + -DHAVE_SHM_MMAP_FILE" fi do_build() {