Browse Source

openal-soft: support bsd (#4331)

* openal-soft: support bsd

* Update xmake.lua

---------

Co-authored-by: Jérôme Leclercq <[email protected]>
M 1 năm trước cách đây
mục cha
commit
fa4b02ef31
1 tập tin đã thay đổi với 6 bổ sung2 xóa
  1. 6 2
      packages/o/openal-soft/xmake.lua

+ 6 - 2
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