Skip to content

Commit

Permalink
depends: fix miniupnpc compilation for arm64-darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
div72 committed Sep 23, 2024
1 parent 8bdb351 commit e12ca58
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
5 changes: 3 additions & 2 deletions depends/packages/miniupnpc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $(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
$(package)_patches=dont_leak_info.patch no_libtool.patch

define $(package)_set_vars
$(package)_build_opts=CC="$($(package)_cc)"
Expand All @@ -16,7 +16,8 @@ define $(package)_set_vars
endef

define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/dont_leak_info.patch
patch -p1 < $($(package)_patch_dir)/dont_leak_info.patch && \
patch -p1 < $($(package)_patch_dir)/no_libtool.patch
endef

define $(package)_build_cmds
Expand Down
15 changes: 15 additions & 0 deletions depends/patches/miniupnpc/no_libtool.patch
Original file line number Diff line number Diff line change
@@ -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)))

0 comments on commit e12ca58

Please sign in to comment.