Parcourir la source

dpp: update to v10.0.15 (#1362)

Louis Bailleau il y a 3 ans
Parent
commit
af9f191883
1 fichiers modifiés avec 16 ajouts et 1 suppressions
  1. 16 1
      packages/d/dpp/xmake.lua

+ 16 - 1
packages/d/dpp/xmake.lua

@@ -5,6 +5,14 @@ package("dpp")
 
     add_urls("https://github.com/brainboxdotcc/DPP/archive/refs/tags/$(version).tar.gz",
              "https://github.com/brainboxdotcc/DPP.git")
+ 
+    -- NOTE !
+    -- Keep all versions with the same major number. If D++ switch to a new major version,
+    -- keep only the latest previous versions.
+    -- i.e. if D++ switch to v11.x.x, keep only the latest v10.x.x and delete the rest.
+
+    add_versions("v10.0.15", "5370e7fa3e76ed78b87dc4d9c01cc5a5f1a5789ebf1d3d0e8deff05cb665c539")
+    add_patches("v10.0.15", path.join(os.scriptdir(), "patches", "v10.0.14", "static_export.patch"), "2a5d47e09438e17b67d9fd73a943653ab8d1739f118f102ed44ae8d34c19da07")
 
     add_versions("v10.0.14", "5eb4cf3b4f4ba200d5f0d57929a1b96cc79e2398004afccc9d9c63aee865ca9d")
     add_patches("v10.0.14", path.join(os.scriptdir(), "patches", "v10.0.10", "permission_include.patch"), "4fdf8e406c7f610453090253bf1640e42c47a06968f65a4a21d01104a2d04fd4")
@@ -54,8 +62,15 @@ package("dpp")
             io.replace(file, "#include <dpp/fmt/", "#include <fmt/", {plain = true})
             io.replace(file, "#include <dpp/nlohmann/", "#include <nlohmann/", {plain = true})
         end
+
+	for _, file in ipairs(os.files("src/**.cpp")) do
+		io.replace(file, "#include <nlohmann/json_fwd.hpp>", "#include <nlohmann/json.hpp>", {plain = true})
+	end
+
+	if package:version():le("v10.0.14") then
+                os.rmdir("include/dpp/fmt")
+	end
         io.replace("include/dpp/restrequest.h", "#include <nlohmann/json_fwd.hpp>", "#include <nlohmann/json.hpp>", {plain = true})
-        os.rmdir("include/dpp/fmt")
         os.rmdir("include/dpp/nlohmann")
 
         os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua")