瀏覽代碼

Auto-update enkits to v1.11 (#3298)

* Update enkits to v1.11

* fix initializer_list

---------

Co-authored-by: star9029 <[email protected]>
ruki 1 年之前
父節點
當前提交
0961175290
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      packages/e/enkits/xmake.lua

+ 7 - 1
packages/e/enkits/xmake.lua

@@ -1,11 +1,12 @@
 package("enkits")
 package("enkits")
-
     set_homepage("https://github.com/dougbinks/enkiTS")
     set_homepage("https://github.com/dougbinks/enkiTS")
     set_description("A permissively licensed C and C++ Task Scheduler for creating parallel programs.")
     set_description("A permissively licensed C and C++ Task Scheduler for creating parallel programs.")
     set_license("zlib")
     set_license("zlib")
 
 
     add_urls("https://github.com/dougbinks/enkiTS/archive/refs/tags/$(version).tar.gz",
     add_urls("https://github.com/dougbinks/enkiTS/archive/refs/tags/$(version).tar.gz",
              "https://github.com/dougbinks/enkiTS.git")
              "https://github.com/dougbinks/enkiTS.git")
+
+    add_versions("v1.11", "b57a782a6a68146169d29d180d3553bfecb9f1a0e87a5159082331920e7d297e")
     add_versions("v1.10", "578f285fc7c2744bf831548f35b855c6ab06c0d541d08c9cc50b6b72a250811a")
     add_versions("v1.10", "578f285fc7c2744bf831548f35b855c6ab06c0d541d08c9cc50b6b72a250811a")
 
 
     add_deps("cmake")
     add_deps("cmake")
@@ -14,6 +15,7 @@ package("enkits")
     if is_plat("linux") then
     if is_plat("linux") then
         add_syslinks("pthread", "rt")
         add_syslinks("pthread", "rt")
     end
     end
+
     on_load("windows", function (package)
     on_load("windows", function (package)
         if package:config("shared") then
         if package:config("shared") then
             package:add("defines", "ENKITS_DLL")
             package:add("defines", "ENKITS_DLL")
@@ -21,6 +23,10 @@ package("enkits")
     end)
     end)
 
 
     on_install("windows", "macosx", "linux", function (package)
     on_install("windows", "macosx", "linux", function (package)
+        if package:is_plat("linux") then
+            io.replace("src/TaskScheduler.h", "#include <functional>", "#include <functional>\n#include <initializer_list>\n", {plain = true})
+        end
+
         local configs = {"-DENKITS_BUILD_EXAMPLES=OFF", "-DENKITS_INSTALL=ON"}
         local configs = {"-DENKITS_BUILD_EXAMPLES=OFF", "-DENKITS_INSTALL=ON"}
         table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
         table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
         table.insert(configs, "-DENKITS_BUILD_SHARED=" .. (package:config("shared") and "ON" or "OFF"))
         table.insert(configs, "-DENKITS_BUILD_SHARED=" .. (package:config("shared") and "ON" or "OFF"))