Sfoglia il codice sorgente

librdkafka: fix & clean up (#7863)

* librdkafka: fix & clean up

* skip curl unsupported platforms
apocelipes 1 mese fa
parent
commit
8a0df86bd6
1 ha cambiato i file con 9 aggiunte e 7 eliminazioni
  1. 9 7
      packages/l/librdkafka/xmake.lua

+ 9 - 7
packages/l/librdkafka/xmake.lua

@@ -1,22 +1,24 @@
 package("librdkafka")
-    set_homepage("https://github.com/edenhill/librdkafka")
+    set_homepage("https://docs.confluent.io/platform/current/clients/librdkafka/html/index.html")
     set_description("The Apache Kafka C/C++ library")
+    set_license("BSD-2-Clause")
 
-    add_urls("https://github.com/edenhill/librdkafka/archive/refs/tags/$(version).tar.gz",
-             "https://github.com/edenhill/librdkafka.git")
+    add_urls("https://github.com/confluentinc/librdkafka/archive/refs/tags/$(version).tar.gz",
+             "https://github.com/confluentinc/librdkafka.git")
     add_versions("v1.6.2", "b9be26c632265a7db2fdd5ab439f2583d14be08ab44dc2e33138323af60c39db")
     add_versions("v1.8.2-POST2", "d556d07cb88ea689e28c8e058ec3265ab333c9fc5e8f4ac0b7509bb5ae0e9f25")
+    add_versions("v2.11.0", "592a823dc7c09ad4ded1bc8f700da6d4e0c88ffaf267815c6f25e7450b9395ca")
 
     if is_plat("windows", "mingw") then
         -- Do not build static library for window.
         add_configs("shared", {description = "Build shared library.", default = true, type = "boolean", readonly = true})
-        add_configs("vs_runtime", {description = "Set vs compiler runtime.", default = "MD", readonly = true})
+        add_configs("runtimes", {description = "Set vs compiler runtime.", default = "MD", readonly = true})
     end
 
     -- lz4_ext means using external lz4 library instead of librdkafka's bundled one.
     -- When lz4_ext is disabled, we still need to link with external lz4 library.
-    local config_default = {lz4_ext = true}
-    local configdeps = {lz4_ext = "lz4", sasl = "cyrus-sasl", ssl = "openssl", zlib = "zlib", zstd = "zstd"}
+    local config_default = {lz4_ext = true, curl = true}
+    local configdeps = {lz4_ext = "lz4", sasl = "cyrus-sasl", ssl = "openssl", zlib = "zlib", zstd = "zstd", curl = "libcurl"}
     for config, dep in pairs(configdeps) do
         add_configs(config, {description = "Enable " .. config .. " support.", default = config_default[config] or false, type = "boolean"})
     end
@@ -40,7 +42,7 @@ package("librdkafka")
         end
     end)
 
-    on_install(function (package)
+    on_install("!wasm and !bsd", function (package)
         local configs = {
             "-DRDKAFKA_BUILD_EXAMPLES=OFF",
             "-DRDKAFKA_BUILD_TESTS=OFF",