void-packages/srcpkgs/php/patches/php-phpize-sysroot-support.patch
Đoàn Trần Công Danh 49cb564d14 srcpkgs/p*: convert patches to -Np1
* par is kept at -Np0

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

28 lines
839 B
Diff

--- a/scripts/phpize.m4 2020-03-17 11:40:21.000000000 +0100
+++ b/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`