From 8715fcd9ddd63a2e468ac9f22c3e25588c287ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Sun, 7 Jul 2024 04:23:43 +0200 Subject: [PATCH] libsodium: Fix static and shared build (#4591) Both libs were built --- packages/l/libsodium/xmake.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/l/libsodium/xmake.lua b/packages/l/libsodium/xmake.lua index caa768be683..436bf845dc4 100644 --- a/packages/l/libsodium/xmake.lua +++ b/packages/l/libsodium/xmake.lua @@ -21,7 +21,18 @@ package("libsodium") end if package:is_plat("linux", "macosx") then - import("package.tools.autoconf").install(package) + local configs = {} + if package:debug() then + table.insert(configs, "--enable-debug") + end + if package:config("shared") then + table.insert(configs, "--enable-static=no") + table.insert(configs, "--enable-shared=yes") + else + table.insert(configs, "--enable-static=yes") + table.insert(configs, "--enable-shared=no") + end + import("package.tools.autoconf").install(package, configs) else os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua") import("package.tools.xmake").install(package)