summaryrefslogtreecommitdiffstats
path: root/ip2proxy-bundledlib.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-10-22 11:21:34 +0200
committerRemi Collet <remi@remirepo.net>2020-10-22 11:21:34 +0200
commit2d5ce2e9f2d8f923a865c68f062c9b303a24dfd5 (patch)
tree442988c61f07e42c90bd09453b1f98c512fdc517 /ip2proxy-bundledlib.patch
new package
Diffstat (limited to 'ip2proxy-bundledlib.patch')
-rw-r--r--ip2proxy-bundledlib.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/ip2proxy-bundledlib.patch b/ip2proxy-bundledlib.patch
new file mode 100644
index 0000000..6f53f26
--- /dev/null
+++ b/ip2proxy-bundledlib.patch
@@ -0,0 +1,27 @@
+diff -up ./config.m4.rpm ./config.m4
+--- ./config.m4.rpm 2020-10-22 10:42:41.698002764 +0200
++++ ./config.m4 2020-10-22 10:53:11.200722296 +0200
+@@ -8,6 +8,16 @@ dnl Make sure that the comment is aligne
+
+ if test "$PHP_IP2PROXY" != "no"; then
+
++ if [ test -r $PHP_IP2PROXY/IP2Proxy.c ]; then
++ # use bunbled library
++ PHP_ADD_INCLUDE($PHP_IP2PROXY)
++ PHP_ADD_BUILD_DIR($PHP_IP2PROXY)
++
++ PHP_ADD_LIBRARY(rt, 1, IP2PROXY_SHARED_LIBADD)
++
++ PHP_SUBST(IP2PROXY_SHARED_LIBADD)
++ PHP_NEW_EXTENSION(ip2proxy, ip2proxy.c $PHP_IP2PROXY/IP2Proxy.c, $ext_shared)
++ else
+ # --with-ip2proxy -> check with-path
+ SEARCH_PATH="/usr/local /usr /opt/local"
+ SEARCH_FOR="/include/IP2Proxy.h"
+@@ -63,5 +73,6 @@ if test "$PHP_IP2PROXY" != "no"; then
+ PHP_SUBST(IP2PROXY_SHARED_LIBADD)
+
+ PHP_NEW_EXTENSION(ip2proxy, ip2proxy.c, $ext_shared)
++ fi
+ fi
+