Auto-update dispenso to v1.2.0 (#3661)

* Update dispenso to v1.2.0

* remove /WX

* patch namespace

---------

Co-authored-by: star9029 <hengxings783@gmail.com>
pull/3669/head
ruki 8 months ago committed by GitHub
parent 4e72de271c
commit 934e01a034
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 22
      packages/d/dispenso/patches/1.2.0/namespace.patch
  2. 4
      packages/d/dispenso/xmake.lua

@ -0,0 +1,22 @@
diff --git a/dispenso/detail/quanta.cpp b/dispenso/detail/quanta.cpp
index fbab069..a587e86 100644
--- a/dispenso/detail/quanta.cpp
+++ b/dispenso/detail/quanta.cpp
@@ -5,12 +5,15 @@
* LICENSE file in the root directory of this source tree.
*/
+#ifdef _WIN32
+#include <Windows.h>
+#include <timeapi.h>
+#endif
+
#include <dispenso/detail/quanta.h>
namespace dispenso {
#ifdef _WIN32
-#include <Windows.h>
-#include <timeapi.h>
namespace {
struct OsQuantaSetter {

@ -6,8 +6,11 @@ package("dispenso")
add_urls("https://github.com/facebookincubator/dispenso/archive/refs/tags/$(version).tar.gz", add_urls("https://github.com/facebookincubator/dispenso/archive/refs/tags/$(version).tar.gz",
"https://github.com/facebookincubator/dispenso.git") "https://github.com/facebookincubator/dispenso.git")
add_versions("v1.2.0", "a44d9cf2f9234f5cbdbe4050fd26e63f3266b64955731651adf04dbb7f6b31df")
add_versions("v1.1.0", "581f95c16cd479692bc89448d0648f6ce24162454308c544c4d35bf5e9efe5c8") add_versions("v1.1.0", "581f95c16cd479692bc89448d0648f6ce24162454308c544c4d35bf5e9efe5c8")
add_patches(">=1.2.0", "patches/1.2.0/namespace.patch", "a0c00cad221f05f9624a28c2e22f6e419b21b9832281cb875283bf89847b50f1")
if is_plat("linux", "bsd") then if is_plat("linux", "bsd") then
add_syslinks("pthread") add_syslinks("pthread")
elseif is_plat("windows", "mingw") then elseif is_plat("windows", "mingw") then
@ -24,6 +27,7 @@ package("dispenso")
table.insert(configs, "-DDISPENSO_SHARED_LIB=" .. (package:config("shared") and "ON" or "OFF")) table.insert(configs, "-DDISPENSO_SHARED_LIB=" .. (package:config("shared") and "ON" or "OFF"))
io.replace("dispenso/CMakeLists.txt", "-Werror", "", {plain = true}) io.replace("dispenso/CMakeLists.txt", "-Werror", "", {plain = true})
io.replace("dispenso/CMakeLists.txt", "/WX", "", {plain = true})
io.replace("dispenso/CMakeLists.txt", "Synchronization", "Synchronization winmm", {plain = true}) io.replace("dispenso/CMakeLists.txt", "Synchronization", "Synchronization winmm", {plain = true})
import("package.tools.cmake").install(package, configs) import("package.tools.cmake").install(package, configs)

Loading…
Cancel
Save