contrib/transmission-gtk/miniupnp.patch

37 lines
1.1 KiB
Diff

From a72a93764e556da6b45d086162e8bc941277ab0d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C5=93ur?= <coeur@gmx.fr>
Date: Sat, 16 Mar 2024 07:19:51 +0800
Subject: [PATCH] deps: update miniupnp to 2.3.4 (miniupnpc 2.2.6) (#6459)
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -497,7 +497,13 @@ if(NOT USE_SYSTEM_NATPMP)
NATPMP_STATICLIB)
endif()
-tr_add_external_auto_library(MINIUPNPC miniupnpc miniupnpc
+if(WIN32)
+ # https://github.com/miniupnp/miniupnp/pull/304
+ set(TR_MINIUPNPC_LIBNAME libminiupnpc)
+else()
+ set(TR_MINIUPNPC_LIBNAME miniupnpc)
+endif()
+tr_add_external_auto_library(MINIUPNPC miniupnp/miniupnpc ${TR_MINIUPNPC_LIBNAME}
TARGET miniupnpc::libminiupnpc
CMAKE_ARGS
-DUPNPC_BUILD_STATIC=ON
@@ -508,9 +514,10 @@ if(NOT USE_SYSTEM_MINIUPNPC)
INTERFACE
MINIUPNP_STATICLIB)
- set(MINIUPNPC_VERSION 1.9)
- set(MINIUPNPC_API_VERSION 12)
+ set(MINIUPNPC_VERSION 2.2)
+ set(MINIUPNPC_API_VERSION 17)
endif()
+unset(TR_MINIUPNPC_LIBNAME)
target_compile_definitions(miniupnpc::libminiupnpc
INTERFACE