Преглед на файлове

Add extsources to assimp, catch2, libflac (#613)

* Add extsources to assimp, catch2, libflac

* Change is_host to is_plat

* fix is_host -> is_plat
ImperatorS79 преди 4 години
родител
ревизия
bfb45eecd6

+ 5 - 3
packages/a/assimp/xmake.lua

@@ -12,9 +12,11 @@ package("assimp")
         add_extsources("pkgconfig::assimp")
     end
 
-    if is_host("linux") then
-        add_extsources("apt::libassimp-dev")
-    elseif is_host("macosx") then
+    if is_plat("mingw") and is_subhost("msys") then
+        add_extsources("pacman::assimp")
+    elseif is_plat("linux") then
+        add_extsources("pacman::assimp", "apt::libassimp-dev")
+    elseif is_plat("macosx") then
         add_extsources("brew::assimp")
     end
 

+ 2 - 2
packages/b/boost/xmake.lua

@@ -18,9 +18,9 @@ package("boost")
     
     if is_plat("mingw") and is_subhost("msys") then
         add_extsources("pacman::boost")
-    elseif is_host("linux") then
+    elseif is_plat("linux") then
         add_extsources("pacman::boost", "apt::libboost-all-dev")
-    elseif is_host("macosx") then
+    elseif is_plat("macosx") then
         add_extsources("brew::boost")
     end
 

+ 8 - 0
packages/c/catch2/xmake.lua

@@ -10,6 +10,14 @@ package("catch2")
     add_versions("2.13.6", "39d50f5d1819cdf2908066664d57c2cde4a4000c364ad3376ea099735c896ff4")
     add_versions("2.13.5", "728679b056dc1248cc79b3a1999ff7453f76422c68417563fc47a0ac2aaeeaef")
     add_versions("2.9.2", "dc486300de22b0d36ddba1705abb07b9e5780639d824ba172ddf7062b2a1bf8f")
+    
+    if is_plat("mingw") and is_subhost("msys") then
+        add_extsources("pacman::catch")
+    elseif is_plat("linux") then
+        add_extsources("pacman::catch2-git", "apt::catch2")
+    elseif is_plat("macosx") then
+        add_extsources("brew::catch2")
+    end
 
     on_install(function (package)
         os.cp("single_include/catch2", package:installdir("include"))

+ 2 - 2
packages/c/cgal/xmake.lua

@@ -13,9 +13,9 @@ package("cgal")
     
     if is_plat("mingw") and is_subhost("msys") then
         add_extsources("pacman::cgal")
-    elseif is_host("linux") then
+    elseif is_plat("linux") then
         add_extsources("pacman::cgal", "apt::libcgal-dev")
-    elseif is_host("macosx") then
+    elseif is_plat("macosx") then
         add_extsources("brew::cgal")
     end
 

+ 2 - 2
packages/c/cmake/xmake.lua

@@ -58,9 +58,9 @@ package("cmake")
     
     if is_plat("mingw") and is_subhost("msys") then
         add_extsources("pacman::cmake")
-    elseif is_host("linux") then
+    elseif is_plat("linux") then
         add_extsources("pacman::cmake", "apt::cmake")
-    elseif is_host("macosx") then
+    elseif is_plat("macosx") then
         add_extsources("brew::cmake")
     end
 

+ 2 - 2
packages/e/eigen/xmake.lua

@@ -14,9 +14,9 @@ package("eigen")
     
     if is_plat("mingw") and is_subhost("msys") then
         add_extsources("pacman::eigen3")
-    elseif is_host("linux") then
+    elseif is_plat("linux") then
         add_extsources("pacman::eigen", "apt::libeigen3-dev")
-    elseif is_host("macosx") then
+    elseif is_plat("macosx") then
         add_extsources("brew::eigen")
     end
 

+ 2 - 2
packages/f/freetype/xmake.lua

@@ -16,9 +16,9 @@ package("freetype")
 
     if is_plat("mingw") and is_subhost("msys") then
         add_extsources("pacman::freetype")
-    elseif is_host("linux") then
+    elseif is_plat("linux") then
         add_extsources("pacman::freetype2", "apt::libfreetype-dev")
-    elseif is_host("macosx") then
+    elseif is_plat("macosx") then
         add_extsources("brew::freetype")
     end
 

+ 2 - 2
packages/g/gmp/xmake.lua

@@ -10,9 +10,9 @@ package("gmp")
     
     if is_plat("mingw") and is_subhost("msys") then
         add_extsources("pacman::gmp")
-    elseif is_host("linux") then
+    elseif is_plat("linux") then
         add_extsources("pacman::gmp", "apt::libgmp-dev")
-    elseif is_host("macosx") then
+    elseif is_plat("macosx") then
         add_extsources("brew::gmp")
     end
 

+ 8 - 0
packages/l/libflac/xmake.lua

@@ -9,6 +9,14 @@ package("libflac")
 
     add_versions("1.3.3", "668cdeab898a7dd43cf84739f7e1f3ed6b35ece2ef9968a5c7079fe9adfe1689")
     add_patches("1.3.3", path.join(os.scriptdir(), "patches", "1.3.3", "cmake.patch"), "49baa40ab70d63e74cfc3f0cc2f13824545a618ceaeffdd51d3333d90b37fd32")
+    
+    if is_plat("mingw") and is_subhost("msys") then
+        add_extsources("pacman::flac")
+    elseif is_plat("linux") then
+        add_extsources("pacman::flac", "apt::libflac++-dev", "apt::libflac-dev")
+    elseif is_plat("macosx") then
+        add_extsources("brew::flac")
+    end
 
     add_deps("cmake", "libogg")
 

+ 2 - 2
packages/l/libvorbis/xmake.lua

@@ -15,9 +15,9 @@ package("libvorbis")
     
     if is_plat("mingw") and is_subhost("msys") then
         add_extsources("pacman::libvorbis")
-    elseif is_host("linux") then
+    elseif is_plat("linux") then
         add_extsources("pacman::libvorbis", "apt::libvorbis-dev")
-    elseif is_host("macosx") then
+    elseif is_plat("macosx") then
         add_extsources("brew::libvorbis")
     end
 

+ 2 - 2
packages/l/lua/xmake.lua

@@ -17,9 +17,9 @@ package("lua")
     
     if is_plat("mingw") and is_subhost("msys") then
         add_extsources("pacman::lua", "pacman::lua51")
-    elseif is_host("linux") then
+    elseif is_plat("linux") then
         add_extsources("pacman::lua", "pacman::lua51", "pacman::lua52", "pacman::lua53", "apt::liblua5.1-0-dev", "apt::liblua5.2-dev", "apt::liblua5.3-dev", "apt::liblua5.4-dev")
-    elseif is_host("macosx") then
+    elseif is_plat("macosx") then
         add_extsources("brew::lua", "brew::[email protected]")
     end
 

+ 2 - 2
packages/m/mpfr/xmake.lua

@@ -9,9 +9,9 @@ package("mpfr")
     
     if is_plat("mingw") and is_subhost("msys") then
         add_extsources("pacman::mpfr")
-    elseif is_host("linux") then
+    elseif is_plat("linux") then
         add_extsources("pacman::mpfr", "apt::libmpfr-dev")
-    elseif is_host("macosx") then
+    elseif is_plat("macosx") then
         add_extsources("brew::mpfr")
     end
 

+ 2 - 2
packages/o/openal-soft/xmake.lua

@@ -13,9 +13,9 @@ package("openal-soft")
     
     if is_plat("mingw") and is_subhost("msys") then
         add_extsources("pacman::openal")
-    elseif is_host("linux") then
+    elseif is_plat("linux") then
         add_extsources("pacman::openal", "apt::libopenal-dev")
-    elseif is_host("macosx") then
+    elseif is_plat("macosx") then
         add_extsources("brew::openal-soft")
     end
     

+ 1 - 1
packages/s/sol2/xmake.lua

@@ -15,7 +15,7 @@ package("sol2")
     
     if is_plat("mingw") and is_subhost("msys") then
         add_extsources("pacman::sol2")
-    elseif is_host("linux") then
+    elseif is_plat("linux") then
         add_extsources("pacman::sol2")
     end
 

+ 1 - 1
packages/s/stb/xmake.lua

@@ -9,7 +9,7 @@ package("stb")
     
     if is_plat("mingw") and is_subhost("msys") then
         add_extsources("pacman::stb")
-    elseif is_host("linux") then
+    elseif is_plat("linux") then
         add_extsources("pacman::stb", "apt::libstb-dev")
     end