Auto-update rocksdb to v9.2.1 (#4148)

* Update rocksdb to v9.2.1

* fix cross build

* disable cross compilation with mingw

---------

Co-authored-by: star9029 <hengxings783@gmail.com>
pull/4527/head^2
ruki 7 months ago committed by GitHub
parent 12301519c4
commit 5c68549871
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 20
      packages/r/rocksdb/xmake.lua

@ -1,15 +1,16 @@
package("rocksdb")
set_homepage("http://rocksdb.org")
set_description("A library that provides an embeddable, persistent key-value store for fast storage.")
set_license("Apache-2.0")
add_urls("https://github.com/facebook/rocksdb/archive/refs/tags/$(version).tar.gz",
"https://github.com/facebook/rocksdb.git")
add_versions("v9.2.1", "bb20fd9a07624e0dc1849a8e65833e5421960184f9c469d508b58ed8f40a780f")
add_versions("v9.1.1", "54ca90dd782a988cd3ebc3e0e9ba9b4efd563d7eb78c5e690c2403f1b7d4a87a")
add_versions("v9.0.0", "013aac178aa12837cbfa3b1e20e9e91ff87962ab7fdd044fd820e859f8964f9b")
add_versions("v7.10.2", "4619ae7308cd3d11cdd36f0bfad3fb03a1ad399ca333f192b77b6b95b08e2f78")
add_deps("cmake")
add_configs("jemalloc", {description = "Build with JeMalloc.", default = false, type = "boolean"})
add_configs("liburing", {description = "Build with liburing.", default = false, type = "boolean"})
add_configs("snappy", {description = "Build with snappy.", default = false, type = "boolean"})
@ -25,6 +26,14 @@ package("rocksdb")
add_syslinks("shlwapi", "rpcrt4")
end
add_deps("cmake")
if on_check then
on_check("mingw", function (package)
assert(not package:is_cross(), "package(rocksdb/mingw): cross compilation only support <= v9.1.1")
end)
end
on_load(function (package)
for name, enabled in pairs(package:configs()) do
if (name ~= "rtti") and (not package:extraconf("configs", name, "builtin")) then
@ -35,7 +44,7 @@ package("rocksdb")
end
end)
on_install("linux", "windows|arm", "windows|x64", "macosx", "mingw|x86_64", function (package)
on_install("linux", "windows|arm64", "windows|x64", "macosx", "mingw|x86_64", function (package)
local configs = {
"-DWITH_ALL_TESTS=OFF",
"-DWITH_TESTS=OFF",
@ -43,8 +52,9 @@ package("rocksdb")
"-DWITH_CORE_TOOLS=OFF",
"-DWITH_TOOLS=OFF",
"-DFAIL_ON_WARNINGS=OFF",
"-DROCKSDB_INSTALL_ON_WINDOWS=ON"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
"-DROCKSDB_INSTALL_ON_WINDOWS=ON",
}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
table.insert(configs, "-DROCKSDB_BUILD_SHARED=" .. (package:config("shared") and "ON" or "OFF"))
for name, enabled in pairs(package:configs()) do
if name == "rtti" then

Loading…
Cancel
Save