diff --git a/packages/o/openssl/xmake.lua b/packages/o/openssl/xmake.lua index d67f4823e..26d88d871 100644 --- a/packages/o/openssl/xmake.lua +++ b/packages/o/openssl/xmake.lua @@ -3,7 +3,7 @@ package("openssl") set_homepage("https://www.openssl.org/") set_description("A robust, commercial-grade, and full-featured toolkit for TLS and SSL.") - add_urls("https://github.com/openssl/openssl/archive/OpenSSL_$(version).zip", {version = function (version) + add_urls("https://github.com/openssl/openssl/archive/refs/tags/OpenSSL_$(version).zip", {version = function (version) return version:gsub("%.", "_") end, excludes = "*/fuzz/*"}) add_versions("1.1.1m", "dab2287910427d82674618d512ba2571401539ca6ed12ab3c3143a0db9fad542") diff --git a/packages/q/qt5network/xmake.lua b/packages/q/qt5network/xmake.lua new file mode 100644 index 000000000..127e27909 --- /dev/null +++ b/packages/q/qt5network/xmake.lua @@ -0,0 +1,41 @@ +package("qt5network") + set_base("qt5lib") + set_kind("library") + + on_load(function (package) + package:add("deps", "qt5core", {debug = package:is_debug(), version = package:version_str()}) + package:data_set("libname", "Network") + + if package:is_plat("linux") then + -- we need system openssl with evp-kdf + -- @see https://github.com/xmake-io/xmake-repo/pull/1057#issuecomment-1069006866 + if linuxos.name() == "fedora" then + package:add("deps", "openssl", {system = true}) + else + package:add("deps", "openssl") + end + elseif package:is_plat("iphoneos") then + package:data_set("frameworks", {"GSS", "IOKit", "Security", "SystemConfiguration"}) + end + + package:base():script("load")(package) + package:set("kind", "library") + end) + + on_test(function (package) + local cxflags + if not package:is_plat("windows") then + cxflags = "-fPIC" + end + assert(package:check_cxxsnippets({test = [[ + int test(int argc, char** argv) { + QCoreApplication app(argc, argv); + + QByteArray datagram = "Hello from xmake!"; + QUdpSocket udpSocket; + udpSocket.writeDatagram(datagram, QHostAddress::Broadcast, 45454); + + return app.exec(); + } + ]]}, {configs = {languages = "c++14", cxflags = cxflags}, includes = {"QCoreApplication", "QByteArray", "QUdpSocket"}})) + end)