Bläddra i källkod

Add extsources to benchmark (#679)

* Add extsources to benchmark

* Add binutils extsources
ImperatorS79 3 år sedan
förälder
incheckning
d6ce795e91
2 ändrade filer med 16 tillägg och 0 borttagningar
  1. 8 0
      packages/b/benchmark/xmake.lua
  2. 8 0
      packages/b/binutils/xmake.lua

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

@@ -7,6 +7,14 @@ package("benchmark")
              "https://github.com/google/benchmark.git")
     add_versions("1.5.2", "dccbdab796baa1043f04982147e67bb6e118fe610da2c65f88912d73987e700c")
     add_versions("1.5.5", "3bff5f237c317ddfd8d5a9b96b3eede7c0802e799db520d38ce756a2a46a18a0")
+    
+    if is_plat("mingw") and is_subhost("msys") then
+        add_extsources("pacman::benchmark")
+    elseif is_plat("linux") then
+        add_extsources("pacman::benchmark", "apt::libbenchmark-dev")
+    elseif is_plat("macosx")then
+        add_extsources("brew::google-benchmark")
+    end
 
     if is_plat("linux") then
         add_syslinks("pthread")

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

@@ -9,6 +9,14 @@ package("binutils")
              "https://ftpmirror.gnu.org/binutils/binutils-$(version).tar.xz")
 
     add_versions("2.34", "f00b0e8803dc9bab1e2165bd568528135be734df3fabf8d0161828cd56028952")
+    
+    if is_plat("mingw") and is_subhost("msys") then
+        add_extsources("pacman::binutils")
+    elseif is_plat("linux") then
+        add_extsources("pacman::binutils", "apt::binutils")
+    elseif is_plat("macosx")then
+        add_extsources("brew::binutils")
+    end
 
     on_install("@linux", "@macosx", "@msys", function (package)
         local configs = {"--disable-debug",