summaryrefslogtreecommitdiffstats
path: root/phpy-pkgconfig.patch
diff options
context:
space:
mode:
Diffstat (limited to 'phpy-pkgconfig.patch')
-rw-r--r--phpy-pkgconfig.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/phpy-pkgconfig.patch b/phpy-pkgconfig.patch
new file mode 100644
index 0000000..2c9e7a3
--- /dev/null
+++ b/phpy-pkgconfig.patch
@@ -0,0 +1,19 @@
+diff -up phpy-1.0.8/config.m4.old phpy-1.0.8/config.m4
+--- phpy-1.0.8/config.m4.old 2024-09-06 06:58:54.678666785 +0200
++++ phpy-1.0.8/config.m4 2024-09-06 06:59:02.749976475 +0200
+@@ -68,9 +68,12 @@ if test "$PHP_PHPY" != "no"; then
+ PHP_EVAL_LIBLINE($PYTHON_LIBS, PHPY_SHARED_LIBADD)
+ PHP_EVAL_INCLINE($PYTHON_CFLAGS)
+ else
+- PHP_PYTHON_CONFIG="python3-config"
+- GET_PYTHON_INCLUDES()
+- GET_PYTHON_LDFLAGS()
++ dnl modern version use python3-embed, old (<= 3.6) use python3
++ PKG_CHECK_MODULES([PYTHON], [python3-embed],,
++ [PKG_CHECK_MODULES([PYTHON], [python3])]
++ )
++ PHP_EVAL_LIBLINE($PYTHON_LIBS, PHPY_SHARED_LIBADD)
++ PHP_EVAL_INCLINE($PYTHON_CFLAGS)
+ fi
+
+ PHP_REQUIRE_CXX()