php: Modify phpize.m4 to create configure with sysroot support

This commit is contained in:
Remi Pommarel 2020-04-15 12:57:46 +02:00 committed by Piraty
parent 2b057821b0
commit 04df2e3a8c
2 changed files with 29 additions and 1 deletions

View file

@ -0,0 +1,28 @@
--- scripts/phpize.m4 2020-03-17 11:40:21.000000000 +0100
+++ scripts/phpize.m4 2020-04-15 12:27:36.400466387 +0200
@@ -44,6 +44,12 @@ PHP_ARG_WITH([libdir],
[lib],
[no])
+PHP_ARG_WITH([sysroot],,
+ [AS_HELP_STRING([--with-sysroot=NAME],
+ [System sysroot])],
+ [no],
+ [no])
+
PHP_RUNPATH_SWITCH
PHP_SHLIB_SUFFIX_NAMES
@@ -58,7 +64,11 @@ dnl For BC.
PHP_CONFIG=$PHP_PHP_CONFIG
prefix=`$PHP_CONFIG --prefix 2>/dev/null`
phpincludedir=`$PHP_CONFIG --include-dir 2>/dev/null`
-INCLUDES=`$PHP_CONFIG --includes 2>/dev/null`
+if test "x$PHP_SYSROOT" = xno; then :
+ INCLUDES=`$PHP_CONFIG --includes 2>/dev/null`
+else
+ INCLUDES=`$PHP_CONFIG --includes 2>/dev/null | sed "s#-I#-I$PHP_SYSROOT#g"`
+fi
EXTENSION_DIR=`$PHP_CONFIG --extension-dir 2>/dev/null`
PHP_EXECUTABLE=`$PHP_CONFIG --php-binary 2>/dev/null`

View file

@ -1,7 +1,7 @@
# Template file for 'php' # Template file for 'php'
pkgname=php pkgname=php
version=7.4.4 version=7.4.4
revision=2 revision=3
hostmakedepends="bison pkg-config apache-devel" hostmakedepends="bison pkg-config apache-devel"
makedepends="apache-devel enchant-devel freetds-devel freetype-devel gdbm-devel makedepends="apache-devel enchant-devel freetds-devel freetype-devel gdbm-devel
gmp-devel libcurl-devel libjpeg-turbo-devel libmysqlclient-devel gmp-devel libcurl-devel libjpeg-turbo-devel libmysqlclient-devel