aboutsummaryrefslogtreecommitdiff
path: root/depends
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2024-01-23 21:19:16 +0000
committerCory Fields <cory-nospam-@coryfields.com>2024-01-26 19:12:45 +0000
commit3ef6563495428d605409089b2267e18f2bf491f9 (patch)
tree46ef5a0dcb93a805f53181a50650ce780725a97c /depends
parent874c8bdb9e3c932f95bc9be60cb93a85a11ef480 (diff)
depends: use ar rather than libtool for miniupnpc/libnatpmp
Diffstat (limited to 'depends')
-rw-r--r--depends/packages/libnatpmp.mk6
-rw-r--r--depends/packages/miniupnpc.mk6
-rw-r--r--depends/patches/libnatpmp/no_libtool.patch15
-rw-r--r--depends/patches/miniupnpc/no_libtool.patch15
4 files changed, 38 insertions, 4 deletions
diff --git a/depends/packages/libnatpmp.mk b/depends/packages/libnatpmp.mk
index 2eddc76d9c..caa809ec0b 100644
--- a/depends/packages/libnatpmp.mk
+++ b/depends/packages/libnatpmp.mk
@@ -3,14 +3,18 @@ $(package)_version=07004b97cf691774efebe70404cf22201e4d330d
$(package)_download_path=https://github.com/miniupnp/libnatpmp/archive
$(package)_file_name=$($(package)_version).tar.gz
$(package)_sha256_hash=9321953ceb39d07c25463e266e50d0ae7b64676bb3a986d932b18881ed94f1fb
+$(package)_patches=no_libtool.patch
define $(package)_set_vars
$(package)_build_opts=CC="$($(package)_cc)"
$(package)_build_opts_mingw32=CPPFLAGS=-DNATPMP_STATICLIB
- $(package)_build_opts_darwin=LIBTOOL="$($(package)_libtool)"
$(package)_build_env+=CFLAGS="$($(package)_cflags) $($(package)_cppflags)" AR="$($(package)_ar)"
endef
+define $(package)_preprocess_cmds
+ patch -p1 < $($(package)_patch_dir)/no_libtool.patch
+endef
+
define $(package)_build_cmds
$(MAKE) libnatpmp.a $($(package)_build_opts)
endef
diff --git a/depends/packages/miniupnpc.mk b/depends/packages/miniupnpc.mk
index 7ad2529e47..5698a7cbb1 100644
--- a/depends/packages/miniupnpc.mk
+++ b/depends/packages/miniupnpc.mk
@@ -3,20 +3,20 @@ $(package)_version=2.2.2
$(package)_download_path=https://miniupnp.tuxfamily.org/files/
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=888fb0976ba61518276fe1eda988589c700a3f2a69d71089260d75562afd3687
-$(package)_patches=dont_leak_info.patch respect_mingw_cflags.patch
+$(package)_patches=dont_leak_info.patch respect_mingw_cflags.patch no_libtool.patch
# Next time this package is updated, ensure that _WIN32_WINNT is still properly set.
# See discussion in https://github.com/bitcoin/bitcoin/pull/25964.
define $(package)_set_vars
$(package)_build_opts=CC="$($(package)_cc)"
-$(package)_build_opts_darwin=LIBTOOL="$($(package)_libtool)"
$(package)_build_opts_mingw32=-f Makefile.mingw CFLAGS="$($(package)_cflags) -D_WIN32_WINNT=0x0601"
$(package)_build_env+=CFLAGS="$($(package)_cflags) $($(package)_cppflags)" AR="$($(package)_ar)"
endef
define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/dont_leak_info.patch && \
- patch -p1 < $($(package)_patch_dir)/respect_mingw_cflags.patch
+ patch -p1 < $($(package)_patch_dir)/respect_mingw_cflags.patch && \
+ patch -p1 < $($(package)_patch_dir)/no_libtool.patch
endef
define $(package)_build_cmds
diff --git a/depends/patches/libnatpmp/no_libtool.patch b/depends/patches/libnatpmp/no_libtool.patch
new file mode 100644
index 0000000000..2b9f01f6eb
--- /dev/null
+++ b/depends/patches/libnatpmp/no_libtool.patch
@@ -0,0 +1,15 @@
+diff -ruN libnatpmp-07004b97cf691774efebe70404cf22201e4d330d/Makefile libnatpmp-07004b97cf691774efebe70404cf22201e4d330d.new/Makefile
+--- libnatpmp-07004b97cf691774efebe70404cf22201e4d330d/Makefile 2022-07-05 07:49:50.000000000 +0000
++++ libnatpmp-07004b97cf691774efebe70404cf22201e4d330d.new/Makefile 2024-01-23 20:59:35.674821779 +0000
+@@ -197,11 +197,7 @@
+ $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
+
+ $(STATICLIB): $(LIBOBJS)
+-ifneq (, $(findstring darwin, $(OS)))
+- $(LIBTOOL) -static -o $@ $?
+-else
+ $(AR) crs $@ $?
+-endif
+
+ $(SHAREDLIB): $(LIBOBJS)
+ ifneq (, $(findstring darwin, $(OS)))
diff --git a/depends/patches/miniupnpc/no_libtool.patch b/depends/patches/miniupnpc/no_libtool.patch
new file mode 100644
index 0000000000..bb7d4a87ef
--- /dev/null
+++ b/depends/patches/miniupnpc/no_libtool.patch
@@ -0,0 +1,15 @@
+diff -ruN miniupnpc-2.2.2/Makefile miniupnpc-2.2.2.new/Makefile
+--- miniupnpc-2.2.2/Makefile 2020-11-27 18:25:02.000000000 +0000
++++ miniupnpc-2.2.2.new/Makefile 2024-01-23 20:58:08.387188527 +0000
+@@ -298,11 +298,7 @@
+ makedepend -Y -- $(CFLAGS) -- $(SRCS) 2>/dev/null
+
+ $(LIBRARY): $(LIBOBJS)
+-ifneq (, $(findstring darwin, $(OS)))
+- $(LIBTOOL) -static -o $@ $?
+-else
+ $(AR) crs $@ $?
+-endif
+
+ $(SHAREDLIBRARY): $(LIBOBJS)
+ ifneq (, $(findstring darwin, $(OS)))