From ed355bfb90b55e5d94e909881e698b2b7796e6b2 Mon Sep 17 00:00:00 2001 From: Louis Bailleau Date: Thu, 21 Jul 2022 15:41:05 +0200 Subject: [PATCH] dpp: update to v10.0.14 (#1359) --- .../dpp/patches/v10.0.14/static_export.patch | 45 +++++++++++++++++++ packages/d/dpp/xmake.lua | 11 ++++- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 packages/d/dpp/patches/v10.0.14/static_export.patch diff --git a/packages/d/dpp/patches/v10.0.14/static_export.patch b/packages/d/dpp/patches/v10.0.14/static_export.patch new file mode 100644 index 000000000..e4be6e86c --- /dev/null +++ b/packages/d/dpp/patches/v10.0.14/static_export.patch @@ -0,0 +1,45 @@ +diff --git a/include/dpp/export.h b/include/dpp/export.h +index f60605cb..ec7d2d55 100644 +--- a/include/dpp/export.h ++++ b/include/dpp/export.h +@@ -24,23 +24,28 @@ + // Investigate: MSVC doesn't like this + //static_assert(__cplusplus >= 201703L, "D++ Requires a C++17 compatible compiler. Please ensure that you have enabled C++17 in your compiler flags."); + +-#ifdef DPP_BUILD ++#ifndef DPP_STATIC + +- #ifdef _WIN32 +- #include +- #endif ++ #if DPP_BUILD ++ ++ #ifdef _WIN32 ++ #include ++ #endif + +- #ifdef _WIN32 +- #define DPP_EXPORT __declspec(dllexport) ++ #ifdef _WIN32 ++ #define DPP_EXPORT __declspec(dllexport) ++ #else ++ #define DPP_EXPORT ++ #endif + #else +- #define DPP_EXPORT ++ #ifdef _WIN32 ++ #define DPP_EXPORT __declspec(dllimport) ++ #else ++ #define DPP_EXPORT ++ #endif + #endif + #else +- #ifdef _WIN32 +- #define DPP_EXPORT __declspec(dllimport) +- #else +- #define DPP_EXPORT +- #endif ++ #define DPP_EXPORT + #endif + + #ifndef _WIN32 diff --git a/packages/d/dpp/xmake.lua b/packages/d/dpp/xmake.lua index 61e1bbcc2..5437aebd7 100644 --- a/packages/d/dpp/xmake.lua +++ b/packages/d/dpp/xmake.lua @@ -6,6 +6,11 @@ package("dpp") add_urls("https://github.com/brainboxdotcc/DPP/archive/refs/tags/$(version).tar.gz", "https://github.com/brainboxdotcc/DPP.git") + add_versions("v10.0.14", "5eb4cf3b4f4ba200d5f0d57929a1b96cc79e2398004afccc9d9c63aee865ca9d") + add_patches("v10.0.14", path.join(os.scriptdir(), "patches", "v10.0.10", "permission_include.patch"), "4fdf8e406c7f610453090253bf1640e42c47a06968f65a4a21d01104a2d04fd4") + add_patches("v10.0.14", path.join(os.scriptdir(), "patches", "v10.0.13", "cstring_include.patch"), "fd3af16877d46ba572f2aa33d80d36b44892a886fb3987953ac2e5fbd14263b9") + add_patches("v10.0.14", path.join(os.scriptdir(), "patches", "v10.0.14", "static_export.patch"), "2a5d47e09438e17b67d9fd73a943653ab8d1739f118f102ed44ae8d34c19da07") + add_versions("v10.0.13", "35dc9f5dc265d70047df67b13ae45f7345ed3f3b842b114fd89cacb3c83428ed") add_patches("v10.0.13", path.join(os.scriptdir(), "patches", "v10.0.8", "static_export.patch"), "d18487580faa9af21862bcff30ddfa5d5ab5cda6aa5f779bcc1787a96ca66447") add_patches("v10.0.13", path.join(os.scriptdir(), "patches", "v10.0.10", "permission_include.patch"), "4fdf8e406c7f610453090253bf1640e42c47a06968f65a4a21d01104a2d04fd4") @@ -27,7 +32,7 @@ package("dpp") add_versions("v10.0.8", "7a16d31841fc67fabcafbc33abb1a6b2ac472202df7e8c48542f77e089de08e3") add_patches("v10.0.8", path.join(os.scriptdir(), "patches", "v10.0.8", "static_export.patch"), "d18487580faa9af21862bcff30ddfa5d5ab5cda6aa5f779bcc1787a96ca66447") - add_deps("fmt", "nlohmann_json", "libsodium", "libopus", "openssl", "zlib") + add_deps("nlohmann_json", "libsodium", "libopus", "openssl", "zlib") if is_plat("linux", "macosx") then add_syslinks("pthread") @@ -37,6 +42,10 @@ package("dpp") if not package:config("shared") then package:add("defines", "DPP_STATIC") end + + if package:version():le("v10.0.13") then + package:add("deps", "fmt") + end end) on_install("windows", "linux", "macosx", "mingw", function (package)