diff --git a/packages/o/openal-soft/xmake.lua b/packages/o/openal-soft/xmake.lua index 67ee3ee19..34b9043a6 100644 --- a/packages/o/openal-soft/xmake.lua +++ b/packages/o/openal-soft/xmake.lua @@ -18,6 +18,8 @@ package("openal-soft") add_extsources("pacman::openal") elseif is_plat("linux") then add_extsources("pacman::openal", "apt::libopenal-dev") + elseif is_plat("bsd") then + add_extsources("pkg::openal-soft") elseif is_plat("macosx") then add_extsources("brew::openal-soft") end @@ -31,6 +33,8 @@ package("openal-soft") add_syslinks("ole32", "shell32", "user32", "winmm", "kernel32") elseif is_plat("linux", "cross") then add_syslinks("dl", "pthread") + elseif is_plat("bsd", "cross") then + add_syslinks("pthread") elseif is_plat("android") then add_syslinks("dl", "OpenSLES") elseif is_plat("macosx", "iphoneos") then @@ -43,8 +47,8 @@ package("openal-soft") end end) - on_install("windows", "linux", "mingw", "macosx", "android", "iphoneos", "cross", function (package) - if is_plat("linux") and linuxos.name() == "fedora" then + on_install("windows", "linux", "mingw", "macosx", "android", "iphoneos", "cross", "bsd" , function (package) + if (package:is_plat("linux") and linuxos.name() == "fedora") or package:is_plat("bsd") then -- https://github.com/kcat/openal-soft/issues/864 io.replace("CMakeLists.txt", "if(HAVE_GCC_PROTECTED_VISIBILITY)", "if(0)", {plain = true}) end