Selaa lähdekoodia

Add extsources for boost, cgal, cmake, eigen, gmp, lua, mpfr, sol2 (#607)

ImperatorS79 4 vuotta sitten
vanhempi
commit
5d7f549e98

+ 8 - 0
packages/b/boost/xmake.lua

@@ -15,6 +15,14 @@ package("boost")
     add_versions("1.73.0", "4eb3b8d442b426dc35346235c8733b5ae35ba431690e38c6a8263dce9fcbb402")
     add_versions("1.72.0", "59c9b274bc451cf91a9ba1dd2c7fdcaf5d60b1b3aa83f2c9fa143417cc660722")
     add_versions("1.70.0", "430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778")
+    
+    if is_plat("mingw") and is_subhost("msys") then
+        add_extsources("pacman::boost")
+    elseif is_host("linux") then
+        add_extsources("pacman::boost", "apt::libboost-all-dev")
+    elseif is_host("macosx") then
+        add_extsources("brew::boost")
+    end
 
     add_patches("1.75.0", path.join(os.scriptdir(), "patches", "1.75.0", "warning.patch"), "43ff97d338c78b5c3596877eed1adc39d59a000cf651d0bcc678cf6cd6d4ae2e")
 

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

@@ -10,6 +10,14 @@ package("cgal")
     add_versions("5.3", "49ccfb6b72a78d03ab026c6502099ba9358cf604d9d1f51c33e90b314635fe35")
 
     add_configs("header_only", {description = "Use header only version.", default = true, type = "boolean"})
+    
+    if is_plat("mingw") and is_subhost("msys") then
+        add_extsources("pacman::cgal")
+    elseif is_host("linux") then
+        add_extsources("pacman::cgal", "apt::libcgal-dev")
+    elseif is_host("macosx") then
+        add_extsources("brew::cgal")
+    end
 
     add_deps("cmake")
     add_deps("boost", "eigen")

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

@@ -55,6 +55,14 @@ package("cmake")
         add_versions("3.18.4", "597c61358e6a92ecbfad42a9b5321ddd801fc7e7eca08441307c9138382d4f77")
         add_versions("3.21.0", "4a42d56449a51f4d3809ab4d3b61fd4a96a469e56266e896ce1009b5768bd2ab")
     end
+    
+    if is_plat("mingw") and is_subhost("msys") then
+        add_extsources("pacman::cmake")
+    elseif is_host("linux") then
+        add_extsources("pacman::cmake", "apt::cmake")
+    elseif is_host("macosx") then
+        add_extsources("brew::cmake")
+    end
 
     on_install("@macosx", function (package)
         os.cp("CMake.app/Contents/bin", package:installdir())

+ 8 - 0
packages/e/eigen/xmake.lua

@@ -11,6 +11,14 @@ package("eigen")
     add_versions("3.3.8", "0215c6593c4ee9f1f7f28238c4e8995584ebf3b556e9dbf933d84feb98d5b9ef")
     add_versions("3.3.9", "0fa5cafe78f66d2b501b43016858070d52ba47bd9b1016b0165a7b8e04675677")
     add_versions("3.4.0", "b4c198460eba6f28d34894e3a5710998818515104d6e74e5cc331ce31e46e626")
+    
+    if is_plat("mingw") and is_subhost("msys") then
+        add_extsources("pacman::eigen3")
+    elseif is_host("linux") then
+        add_extsources("pacman::eigen", "apt::libeigen3-dev")
+    elseif is_host("macosx") then
+        add_extsources("brew::eigen")
+    end
 
     add_deps("cmake")
     add_includedirs("include")

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

@@ -7,8 +7,13 @@ package("gmp")
     add_urls("https://gmplib.org/download/gmp/gmp-$(version).tar.xz")
     add_versions("6.2.1", "fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2")
 
-    if is_plat("linux") then
-        add_extsources("apt::libgmp-dev")
+    
+    if is_plat("mingw") and is_subhost("msys") then
+        add_extsources("pacman::gmp")
+    elseif is_host("linux") then
+        add_extsources("pacman::gmp", "apt::libgmp-dev")
+    elseif is_host("macosx") then
+        add_extsources("brew::gmp")
     end
 
     add_deps("m4")

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

@@ -14,6 +14,14 @@ package("lua")
     add_versions("v5.2.3", "13c2fb97961381f7d06d5b5cea55b743c163800896fd5c5e2356201d3619002d")
     add_versions("v5.1.1", "c5daeed0a75d8e4dd2328b7c7a69888247868154acbda69110e97d4a6e17d1f0")
     add_versions("v5.1.5", "2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333")
+    
+    if is_plat("mingw") and is_subhost("msys") then
+        add_extsources("pacman::lua", "pacman::lua51")
+    elseif is_host("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
+        add_extsources("brew::lua", "brew::[email protected]")
+    end
 
     add_includedirs("include/lua")
     if not is_plat("windows", "mingw") then

+ 8 - 0
packages/m/mpfr/xmake.lua

@@ -6,6 +6,14 @@ package("mpfr")
 
     add_urls("https://www.mpfr.org/mpfr-current/mpfr-$(version).tar.gz")
     add_versions("4.1.0", "3127fe813218f3a1f0adf4e8899de23df33b4cf4b4b3831a5314f78e65ffa2d6")
+    
+    if is_plat("mingw") and is_subhost("msys") then
+        add_extsources("pacman::mpfr")
+    elseif is_host("linux") then
+        add_extsources("pacman::mpfr", "apt::libmpfr-dev")
+    elseif is_host("macosx") then
+        add_extsources("brew::mpfr")
+    end
 
     add_deps("gmp")
     on_install("macosx", "linux", function (package)

+ 6 - 0
packages/s/sol2/xmake.lua

@@ -12,6 +12,12 @@ package("sol2")
     add_versions("v3.2.1", "b10f88dc1246f74a10348faef7d2c06e2784693307df74dcd87c4641cf6a6828")
 
     add_configs("includes_lua", {description = "Should this package includes the Lua package (set to false if you're shipping a custom Lua)", default = true, type = "boolean"})
+    
+    if is_plat("mingw") and is_subhost("msys") then
+        add_extsources("pacman::sol2")
+    elseif is_host("linux") then
+        add_extsources("pacman::sol2")
+    end
 
     add_deps("cmake")