瀏覽代碼

Add extsources to chipmunk and newton (#600)

ImperatorS79 4 年之前
父節點
當前提交
fbb76df709
共有 2 個文件被更改,包括 12 次插入2 次删除
  1. 6 2
      packages/c/chipmunk2d/xmake.lua
  2. 6 0
      packages/n/newtondynamics/xmake.lua

+ 6 - 2
packages/c/chipmunk2d/xmake.lua

@@ -11,8 +11,12 @@ package("chipmunk2d")
     add_versions("github:7.0.3", "87340c216bf97554dc552371bbdecf283f7c540e")
     add_patches("7.0.3", path.join(os.scriptdir(), "patches", "7.0.3", "android.patch"), "08e80020880e9bf3c61b48d41537d953e7bf6a63797eb8bcd6b78ba038b79d8f")
 
-    if is_host("linux") then
-        add_extsources("apt::libchipmunk-dev")
+    if is_plat("mingw") and is_subhost("msys") then
+        add_extsources("pacman::chipmunk")
+    elseif is_plat("linux") then
+        add_extsources("pacman::chipmunk", "apt::libchipmunk-dev")
+    elseif is_plat("macosx") then
+        add_extsources("brew::chipmunk")
     end
 
     add_deps("cmake")

+ 6 - 0
packages/n/newtondynamics/xmake.lua

@@ -6,6 +6,12 @@ package("newtondynamics")
     set_urls("https://github.com/MADEAPPS/newton-dynamics.git")
 
     add_versions("v3.14d", "e501c6d13e127a595c847d92b12ca3c7616a441d")
+    
+    if is_plat("mingw") and is_subhost("msys") then
+        add_extsources("pacman::newton-dynamics")
+    elseif is_plat("linux") then
+        add_extsources("pacman::newton-dynamics")
+    end
 
     if is_plat("linux", "android") then
         add_syslinks("dl", "pthread")