소스 검색

Update all of plflib packages (#3742)

* Update all of plflib

* Update to fixed version of `plf::stack`

* Add `plf::hive`

* Add plf meta-package

* Revert "Add `plf::hive`"

This reverts commit 755d2b00ef22423d8edcc249bc2c69645dabab27.

* Remove `plf_nanotimer` for now.

* Forgot to remove a reference to `nanotimer`.

* Update and rename xmake.lua to xmake.lua

---------

Co-authored-by: ruki <[email protected]>
Conscat 1 년 전
부모
커밋
3e11c12073

+ 1 - 1
packages/p/plf_colony/xmake.lua

@@ -5,7 +5,7 @@ package("plf_colony")
     set_license("zlib")
 
     add_urls("https://github.com/mattreecebentley/plf_colony.git")
-    add_versions("2023.08.25", "394c787ecf5a541b66d08b90f22cebc954f0599c")
+    add_versions("v7.41", "abb0aa6525a3dae56aacf50899517f47e7036016")
 
     on_install(function (package)
         os.cp("plf_colony.h", package:installdir("include"))

+ 23 - 0
packages/p/plf_indiesort/xmake.lua

@@ -0,0 +1,23 @@
+package("plf_indiesort")
+    set_kind("library", {headeronly = true})
+    set_homepage("https://plflib.org/indiesort.htm")
+    set_description("A sort wrapper enabling both use of random-access sorting on non-random access containers, and increased performance for the sorting of large types.")
+    set_license("zlib")
+
+    add_urls("https://github.com/mattreecebentley/plf_indiesort.git")
+    add_versions("v1.41", "fce3d54ed1a43e9e7008703f79c4f4d2e5259176")
+
+    on_install(function (package)
+        os.cp("plf_indiesort.h", package:installdir("include"))
+    end)
+
+    on_test(function (package)
+        assert(package:check_cxxsnippets({test = [[
+            #include <vector>
+            #include <plf_indiesort.h>
+            void test() {
+                std::vector<int> vec;
+                plf::indiesort(vec);
+            }
+        ]]}, {configs = {languages = "c++17"}}))
+    end)

+ 21 - 0
packages/p/plf_list/xmake.lua

@@ -0,0 +1,21 @@
+package("plf_list")
+    set_kind("library", {headeronly = true})
+    set_homepage("https://plflib.org/list.htm")
+    set_description("A data container replicating std::list functionality but with (on average) 333% faster insertion, 81% faster erasure and 16% faster iteration.")
+    set_license("zlib")
+
+    add_urls("https://github.com/mattreecebentley/plf_list.git")
+    add_versions("2.73", "b5bbcec628b149c57c56887e6ba0a55caf61fc95")
+
+    on_install(function (package)
+        os.cp("plf_list.h", package:installdir("include"))
+    end)
+
+    on_test(function (package)
+        assert(package:check_cxxsnippets({test = [[
+            #include <plf_list.h>
+            void test() {
+                plf::list<int> i_list;
+            }
+        ]]}, {configs = {languages = "c++17"}}))
+    end)

+ 21 - 0
packages/p/plf_queue/xmake.lua

@@ -0,0 +1,21 @@
+package("plf_queue")
+    set_kind("library", {headeronly = true})
+    set_homepage("https://plflib.org/queue.htm")
+    set_description("A data container replicating std::queue functionality but with better performance than standard library containers in a queue context.")
+    set_license("zlib")
+
+    add_urls("https://github.com/mattreecebentley/plf_queue.git")
+    add_versions("v2.0.3", "9d3eeb0822c815388b9df06065010fa48c0a042c")
+
+    on_install(function (package)
+        os.cp("plf_queue.h", package:installdir("include"))
+    end)
+
+    on_test(function (package)
+        assert(package:check_cxxsnippets({test = [[
+            #include <plf_queue.h>
+            void test() {
+                plf::queue<int> i_queue;
+            }
+        ]]}, {configs = {languages = "c++17"}}))
+    end)

+ 21 - 0
packages/p/plf_rand/xmake.lua

@@ -0,0 +1,21 @@
+package("plf_rand")
+    set_kind("library", {headeronly = true})
+    set_homepage("https://plflib.org/rand.htm")
+    set_description("A replacement for rand()/srand() that's ~700% faster with (typically) better statistical distribution. An adaptation of PCG with fallback to xorshift for C++98/03.")
+    set_license("zlib")
+
+    add_urls("https://github.com/mattreecebentley/plf_rand.git")
+    add_versions("v1.05", "764684817b0208b9f18b4b3d18f4f8d8f33fa1f0")
+
+    on_install(function (package)
+        os.cp("plf_rand.h", package:installdir("include"))
+    end)
+
+    on_test(function (package)
+        assert(package:check_cxxsnippets({test = [[
+            #include <plf_rand.h>
+            void test() {
+                plf::rand();
+            }
+        ]]}, {configs = {languages = "c++11"}}))
+    end)

+ 23 - 0
packages/p/plf_reorderase/xmake.lua

@@ -0,0 +1,23 @@
+package("plf_reorderase")
+    set_kind("library", {headeronly = true})
+    set_homepage("https://plflib.org/reorderase.htm")
+    set_description("A faster method for singular erasures, ranged erasures, and erase_if-style erasures for vector/deque/static_vector when element order is not important.")
+    set_license("zlib")
+
+    add_urls("https://github.com/mattreecebentley/plf_reorderase.git")
+    add_versions("v1.11", "34728e5dca312e3263addd5394235a33def4a3f4")
+
+    on_install(function (package)
+        os.cp("plf_reorderase.h", package:installdir("include"))
+    end)
+
+    on_test(function (package)
+        assert(package:check_cxxsnippets({test = [[
+            #include <vector>
+            #include <plf_reorderase.h>
+            void test() {
+                std::vector<int> vec{1};
+                plf::reorderase_all(vec, 1);
+            }
+        ]]}, {configs = {languages = "c++17"}}))
+    end)

+ 21 - 0
packages/p/plf_stack/xmake.lua

@@ -0,0 +1,21 @@
+package("plf_stack")
+    set_kind("library", {headeronly = true})
+    set_homepage("https://plflib.org/stack.htm")
+    set_description("A data container replicating std::stack functionality but with better performance than standard library containers in a stack context.")
+    set_license("zlib")
+
+    add_urls("https://github.com/mattreecebentley/plf_stack.git")
+    add_versions("v2.03", "ec248e8eb98667ffc9cc1415f7750a774a2fc359")
+
+    on_install(function (package)
+        os.cp("plf_stack.h", package:installdir("include"))
+    end)
+
+    on_test(function (package)
+        assert(package:check_cxxsnippets({test = [[
+            #include <plf_stack.h>
+            void test() {
+                plf::stack<int> i_stack;
+            }
+        ]]}, {configs = {languages = "c++17"}}))
+    end)

+ 17 - 0
packages/p/plflibs/xmake.lua

@@ -0,0 +1,17 @@
+package("plflibs")
+    set_kind("library", {headeronly = true})
+    set_homepage("https://plflib.org")
+    set_description("Meta-package for all plf libraries.")
+    set_license("zlib")
+
+    add_deps("plf_colony", "plf_indiesort", "plf_list", "plf_queue", "plf_rand", "plf_reorderase", "plf_stack")
+
+    on_install(function (package)
+        package:add("deps", "plf_colony")
+        package:add("deps", "plf_indiesort")
+        package:add("deps", "plf_list")
+        package:add("deps", "plf_queue")
+        package:add("deps", "plf_rand")
+        package:add("deps", "plf_reorderase")
+        package:add("deps", "plf_stack")
+    end)