void-packages/srcpkgs/php8.3/patches/php-phar-cross.patch

30 lines
1.4 KiB
Diff

--- a/ext/phar/Makefile.frag 2020-04-13 12:18:23.998801926 +0200
+++ b/ext/phar/Makefile.frag 2020-04-13 12:20:58.031795293 +0200
@@ -8,12 +8,14 @@ $(srcdir)/phar_path_check.c: $(srcdir)/p
pharcmd: $(builddir)/phar.php $(builddir)/phar.phar
+PHAR_PHP ?= $(top_builddir)/$(SAPI_CLI_PATH)
+PHAR_PHP_MODULES ?= $(top_builddir)/modules
PHP_PHARCMD_SETTINGS = -n -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' -d phar.readonly=0
PHP_PHARCMD_EXECUTABLE = ` \
- if test -x "$(top_builddir)/$(SAPI_CLI_PATH)"; then \
- $(top_srcdir)/build/shtool echo -n -- "$(top_builddir)/$(SAPI_CLI_PATH) -n"; \
+ if test -x "$(PHAR_PHP)"; then \
+ $(top_srcdir)/build/shtool echo -n -- "$(PHAR_PHP) -n"; \
if test "x$(PHP_MODULES)" != "x"; then \
- $(top_srcdir)/build/shtool echo -n -- " -d extension_dir=$(top_builddir)/modules"; \
+ $(top_srcdir)/build/shtool echo -n -- " -d extension_dir=$(PHAR_PHP_MODULES)"; \
for i in bz2 zlib phar; do \
if test -f "$(top_builddir)/modules/$$i.la"; then \
. $(top_builddir)/modules/$$i.la; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \
@@ -21,7 +23,7 @@ PHP_PHARCMD_EXECUTABLE = ` \
done; \
fi; \
else \
- $(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; \
+ $(top_srcdir)/build/shtool echo -n -- "$(PHAR_PHP)"; \
fi;`
PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "$(INSTALL_ROOT)$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)";`