Browse Source

update flatbuffers, openssl and libfabric (#1800)

* update flatbuffers

* update openssl

* update libfabric

* add patches
Hoildkv 2 years ago
parent
commit
9383e50317

+ 8 - 5
packages/f/flatbuffers/xmake.lua

@@ -2,17 +2,20 @@ package("flatbuffers")
 
     set_homepage("http://google.github.io/flatbuffers/")
     set_description("FlatBuffers is a cross platform serialization library architected for maximum memory efficiency.")
+    set_license("Apache-2.0")
 
-    add_urls("https://github.com/google/flatbuffers/archive/v$(version).zip")
-    add_versions("1.12.0", "4b8b21adbfe8a74b90604161afcf87c125a26b86c99327e7a04525080606536c")
-    add_versions("2.0.0", "ffd68aebdfb300c9e82582ea38bf4aa9ce65c77344c94d5047f3be754cc756ea")
+    add_urls("https://github.com/google/flatbuffers/archive/$(version).zip",
+             "https://github.com/google/flatbuffers.git")
+    add_versions("v1.12.0", "4b8b21adbfe8a74b90604161afcf87c125a26b86c99327e7a04525080606536c")
+    add_versions("v2.0.0", "ffd68aebdfb300c9e82582ea38bf4aa9ce65c77344c94d5047f3be754cc756ea")
+    add_versions("v23.1.21", "48597d6a6f8ca67a02ae8d8494b3bfc9136eb93da60a538d5bfc024f7c564f97")
 
     add_deps("cmake")
     on_install("windows", "linux", "macosx", "mingw", "android", "iphoneos", function(package)
         local configs = {"-DFLATBUFFERS_BUILD_TESTS=OFF"}
         table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
         table.insert(configs, "-DFLATBUFFERS_BUILD_SHAREDLIB=" .. (package:config("shared") and "ON" or "OFF"))
-        if is_plat("android", "iphoneos") then
+        if package:is_cross() then
             table.insert(configs, "-DFLATBUFFERS_BUILD_FLATC=OFF")
             table.insert(configs, "-DFLATBUFFERS_BUILD_FLATHASH=OFF")
         end
@@ -21,7 +24,7 @@ package("flatbuffers")
     end)
 
     on_test(function(package)
-        if is_plat("windows", "linux", "macosx", "mingw@windows") then
+        if not package:is_cross() then
             os.vrun("flatc --version")
         end
         assert(package:check_cxxsnippets({test = [[

+ 2 - 1
packages/l/libfabric/xmake.lua

@@ -6,9 +6,10 @@ package("libfabric")
 
     add_urls("https://github.com/ofiwg/libfabric/releases/download/v$(version)/libfabric-$(version).tar.bz2")
     add_versions("1.13.0", "0c68264ae18de5c31857724c754023351614330bd61a50b40cef2b5e8f63ab28")
+    add_versions("1.17.0", "579c0f5ef636c0c72f4d3d6bd4da91a5aed9ac3ac4ea387404c45dbbdee4745d")
 
     if is_plat("linux") then
-        add_syslinks("pthread", "dl", "rt")
+        add_syslinks("pthread", "dl", "rt", "atomic")
         add_extsources("apt::libfabric-dev", "pacman::libfabric")
     end
 

+ 12 - 0
packages/o/openssl/patches/1.1.1t.diff

@@ -0,0 +1,12 @@
+diff --git a/crypto/bn/rsa_sup_mul.c b/crypto/bn/rsa_sup_mul.c
+--- a/crypto/bn/rsa_sup_mul.c
++++ b/crypto/bn/rsa_sup_mul.c
+@@ -109,7 +109,7 @@ static ossl_inline void _mul_limb(limb_t *hi, limb_t *lo, limb_t a, limb_t b)
+     *hi = t >> LIMB_BIT_SIZE;
+     *lo = (limb_t)t;
+ }
+-#elif (BN_BYTES == 8) && (defined _MSC_VER)
++#elif (BN_BYTES == 8) && (defined _MSC_VER) && (defined(_M_AMD64) || defined(_M_X64))
+ /* https://learn.microsoft.com/en-us/cpp/intrinsics/umul128?view=msvc-170 */
+ #pragma intrinsic(_umul128)
+ static ossl_inline void _mul_limb(limb_t *hi, limb_t *lo, limb_t a, limb_t b)

+ 2 - 0
packages/o/openssl/xmake.lua

@@ -6,6 +6,8 @@ package("openssl")
     add_urls("https://github.com/openssl/openssl/archive/refs/tags/OpenSSL_$(version).zip", {version = function (version)
         return version:gsub("^(%d+)%.(%d+)%.(%d+)-?(%a*)$", "%1_%2_%3%4")
     end, excludes = "*/fuzz/*"})
+    add_versions("1.1.1-t", "9422774f3ce0f9cb4db5d862efbf43b4fcc096b37b4ac7157e7c5172113a8a22")
+    add_patches("1.1.1-t", path.join(os.scriptdir(), "patches", "1.1.1t.diff"), "8009edde46e5577213212ec68f8a40451ceb514fddd892240b1465213b7d2d11")
     add_versions("1.1.1-s", "aa76dc0488bc67f5c964d085e37a0f5f452e45c68967816a336fa00f537f5cc5")
     add_versions("1.1.1-r", "20af2fac5dff04e71c2f2d6729ee84befbea741e3aaeba18a1a541e04f3f1997")
     add_versions("1.1.1-q", "df86e6adcff1c91a85cef139dd061ea40b7e49005e8be16522cf4864bfcf5eb8")