aboutsummaryrefslogtreecommitdiff
path: root/depends
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2022-08-31 12:23:38 +0100
committerfanquake <fanquake@gmail.com>2022-09-22 14:24:52 +0100
commit8e2d93ff0fee36baf7fe88662c83f5b4f40f0add (patch)
tree62bcfe8d7aa1207954fd9be92ca8f6f2d843c367 /depends
parent2b2c970627f7b343dd07428bd73a146f175e3af9 (diff)
build: fix cflags passing for mingw miniupnpc
Cherry-pick of a patch upstreamed to miniupnpc, see here: https://github.com/miniupnp/miniupnp/pull/619.
Diffstat (limited to 'depends')
-rw-r--r--depends/packages/miniupnpc.mk5
-rw-r--r--depends/patches/miniupnpc/respect_mingw_cflags.patch23
2 files changed, 26 insertions, 2 deletions
diff --git a/depends/packages/miniupnpc.mk b/depends/packages/miniupnpc.mk
index 99f5b0a8db..dc9ffaac74 100644
--- a/depends/packages/miniupnpc.mk
+++ b/depends/packages/miniupnpc.mk
@@ -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 respect_mingw_cflags.patch
define $(package)_set_vars
$(package)_build_opts=CC="$($(package)_cc)"
@@ -13,7 +13,8 @@ $(package)_build_env+=CFLAGS="$($(package)_cflags) $($(package)_cppflags)" AR="$
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)/respect_mingw_cflags.patch
endef
define $(package)_build_cmds
diff --git a/depends/patches/miniupnpc/respect_mingw_cflags.patch b/depends/patches/miniupnpc/respect_mingw_cflags.patch
new file mode 100644
index 0000000000..a44580ddab
--- /dev/null
+++ b/depends/patches/miniupnpc/respect_mingw_cflags.patch
@@ -0,0 +1,23 @@
+commit fec515a7ac9991a0ee91068fda046b54b191155e
+Author: fanquake <fanquake@gmail.com>
+Date: Wed Jul 27 15:52:37 2022 +0100
+
+ build: respect CFLAGS in makefile.mingw
+
+ Similar to the other Makefile.
+
+ Cherry-pick of https://github.com/miniupnp/miniupnp/pull/619.
+
+diff --git a/Makefile.mingw b/Makefile.mingw
+index 2bff7bd..88430d2 100644
+--- a/Makefile.mingw
++++ b/Makefile.mingw
+@@ -19,7 +19,7 @@ else
+ RM = rm -f
+ endif
+ #CFLAGS = -Wall -g -DDEBUG -D_WIN32_WINNT=0X501
+-CFLAGS = -Wall -W -Wstrict-prototypes -Os -DNDEBUG -D_WIN32_WINNT=0X501
++CFLAGS ?= -Wall -W -Wstrict-prototypes -Os -DNDEBUG -D_WIN32_WINNT=0X501
+ LDLIBS = -lws2_32 -liphlpapi
+ # -lwsock32
+ # -liphlpapi is needed for GetBestRoute() and GetIpAddrTable()