diff options
author | Remi Collet <remi@remirepo.net> | 2024-10-21 09:58:41 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2024-10-21 09:58:41 +0200 |
commit | 4632977d7e8b903a45ef697e9c9255401a7a7b21 (patch) | |
tree | 8212c9172f0a469091e0aed5a349f9a982315df5 /awscrt-build.patch | |
parent | f817d1867fa9ee67445fd90357d7723ecfd3f3b9 (diff) |
fix out of sources tree using patch from
https://github.com/awslabs/aws-crt-php/pull/117
Diffstat (limited to 'awscrt-build.patch')
-rw-r--r-- | awscrt-build.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/awscrt-build.patch b/awscrt-build.patch new file mode 100644 index 0000000..208e2e2 --- /dev/null +++ b/awscrt-build.patch @@ -0,0 +1,45 @@ +diff -up ./config.m4.old ./config.m4 +--- ./config.m4.old 2024-10-21 08:45:48.099506102 +0200 ++++ ./config.m4 2024-10-21 08:46:42.647663062 +0200 +@@ -26,5 +26,6 @@ if test "$PHP_AWSCRT" != "no"; then + # Sources for the PHP extension itself + AWSCRT_SOURCES=ext/awscrt.c + PHP_NEW_EXTENSION(awscrt, $AWSCRT_SOURCES, $ext_shared) ++ PHP_ADD_BUILD_DIR($ext_builddir/ext) + PHP_ADD_MAKEFILE_FRAGMENT + fi +diff -up ./Makefile.frag.old ./Makefile.frag +--- ./Makefile.frag.old 2024-10-21 08:45:58.170904348 +0200 ++++ ./Makefile.frag 2024-10-21 09:29:21.845818243 +0200 +@@ -1,7 +1,7 @@ + + INT_DIR=$(builddir)/build/install + CMAKE_BUILD_DIR=$(builddir)/cmake_build +-GENERATE_STUBS=$(shell expr `php --version | head -1 | cut -f 2 -d' '` \>= 7.1) ++GENERATE_STUBS=$(shell expr `$(PHP_EXECUTABLE) --version | head -1 | cut -f 2 -d' '` \>= 7.1) + + CMAKE = cmake3 + ifeq (, $(shell which cmake3)) +@@ -58,17 +58,18 @@ extension: $(builddir)/ext/awscrt.lo + # Force the crt object target to depend on the CRT static library + $(builddir)/ext/awscrt.lo: $(builddir)/ext/awscrt.c + +-$(builddir)/ext/awscrt.c: $(CMAKE_BUILD_DIR)/aws-crt-ffi-static/libaws-crt-ffi.a $(builddir)/ext/api.h $(builddir)/ext/awscrt_arginfo.h ++$(builddir)/ext/awscrt.c: $(CMAKE_BUILD_DIR)/aws-crt-ffi-static/libaws-crt-ffi.a $(srcdir)/ext/api.h $(srcdir)/ext/awscrt_arginfo.h + +-$(builddir)/ext/awscrt_arginfo.h: $(srcdir)/ext/awscrt.stub.php $(srcdir)/gen_stub.php ++$(srcdir)/ext/awscrt_arginfo.h: $(srcdir)/ext/awscrt.stub.php $(srcdir)/gen_stub.php + ifeq ($(GENERATE_STUBS),1) + # generate awscrt_arginfo.h +- mkdir -p $(builddir)/ext && php $(srcdir)/gen_stub.php --minimal-arginfo $(srcdir)/ext/awscrt.stub.php ++ $(PHP_EXECUTABLE) $(srcdir)/gen_stub.php --minimal-arginfo $(srcdir)/ext/awscrt.stub.php + endif + + # transform/install api.h from FFI lib + $(srcdir)/ext/api.h: $(srcdir)/crt/aws-crt-ffi/src/api.h +- php $(srcdir)/gen_api.php $(srcdir)/crt/aws-crt-ffi/src/api.h > $(srcdir)/ext/api.h ++ # generate api.h ++ $(PHP_EXECUTABLE) $(srcdir)/gen_api.php $(srcdir)/crt/aws-crt-ffi/src/api.h > $(srcdir)/ext/api.h + + # install api.h to ext/ as well + $(builddir)/ext/api.h : $(srcdir)/ext/api.h |