浏览代码

Update moltenvk to 1.2.7 (#3344)

* Update moltenvk to 1.2.7

* Update xmake.lua
Jérôme Leclercq 1 年之前
父节点
当前提交
0c14a70b23
共有 1 个文件被更改,包括 14 次插入12 次删除
  1. 14 12
      packages/m/moltenvk/xmake.lua

+ 14 - 12
packages/m/moltenvk/xmake.lua

@@ -1,14 +1,15 @@
 package("moltenvk")
 package("moltenvk")
-
     set_homepage("https://github.com/KhronosGroup/MoltenVK")
     set_homepage("https://github.com/KhronosGroup/MoltenVK")
     set_description("MoltenVK is a Vulkan Portability implementation.")
     set_description("MoltenVK is a Vulkan Portability implementation.")
     set_license("Apache-2.0")
     set_license("Apache-2.0")
 
 
-    add_urls("https://github.com/KhronosGroup/MoltenVK/archive/v$(version).tar.gz")
-    add_versions("1.1.0", "0538fa1c23ddae495c7f82ccd0db90790a90b7017a258ca7575fbae8021f3058")
-    add_versions("1.1.4", "f9bba6d3bf3648e7685c247cb6d126d62508af614bc549cedd5859a7da64967e")
-    add_versions("1.1.5", "2cdcb8dbf2acdcd8cbe70b109dadc05a901038c84970afbe4863e5e23f33deae")
-    add_versions("1.2.0", "6e7af2dad0530b2b404480dbe437ca4670c6615cc2ec6cf6a20ed04d9d75e0bd")
+    add_urls("https://github.com/KhronosGroup/MoltenVK/archive/refs/tags/$(version).tar.gz",
+             "https://github.com/KhronosGroup/MoltenVK.git")
+    add_versions("v1.2.7", "3166edcfdca886b4be1a24a3c140f11f9a9e8e49878ea999e3580dfbf9fe4bec")
+    add_versions("v1.2.0", "6e7af2dad0530b2b404480dbe437ca4670c6615cc2ec6cf6a20ed04d9d75e0bd")
+    add_versions("v1.1.5", "2cdcb8dbf2acdcd8cbe70b109dadc05a901038c84970afbe4863e5e23f33deae")
+    add_versions("v1.1.4", "f9bba6d3bf3648e7685c247cb6d126d62508af614bc549cedd5859a7da64967e")
+    add_versions("v1.1.0", "0538fa1c23ddae495c7f82ccd0db90790a90b7017a258ca7575fbae8021f3058")
 
 
     if is_plat("macosx") then
     if is_plat("macosx") then
         add_extsources("brew::molten-vk")
         add_extsources("brew::molten-vk")
@@ -24,19 +25,20 @@ package("moltenvk")
         end
         end
     end)
     end)
 
 
-    on_install("macosx", function (package)
-        local configs = {"--macos"}
+    on_install("macosx", "iphoneos", function (package)
+        local plat = package:is_plat("iphoneos") and "iOS" or "macOS"
+        local configs = {"--" .. plat:lower()}
         if package:debug() then
         if package:debug() then
             table.insert(configs, "--debug")
             table.insert(configs, "--debug")
         end
         end
         os.vrunv("./fetchDependencies", configs)
         os.vrunv("./fetchDependencies", configs)
         local conf = package:debug() and "Debug" or "Release"
         local conf = package:debug() and "Debug" or "Release"
-        os.vrun("xcodebuild build -quiet -project MoltenVKPackaging.xcodeproj -scheme \"MoltenVK Package (macOS only)\" -configuration \"" .. conf)
+        os.vrun("xcodebuild build -quiet -project MoltenVKPackaging.xcodeproj -scheme \"MoltenVK Package (" ..plat .. " only)\" -configuration \"" .. conf)
         os.mv("Package/" .. conf .. "/MoltenVK/include", package:installdir())
         os.mv("Package/" .. conf .. "/MoltenVK/include", package:installdir())
-        os.mv("Package/" .. conf .. "/MoltenVK/dylib/macOS/*", package:installdir("lib"))
-        os.mv("Package/" .. conf .. "/MoltenVK/MoltenVK.xcframework/macos-*/*.a", package:installdir("lib"))
+        os.mv("Package/" .. conf .. "/MoltenVK/dylib/" ..plat .. "/*", package:installdir("lib"))
+        os.mv("Package/" .. conf .. "/MoltenVK/MoltenVK.xcframework/" .. plat:lower() .. "-*/*.a", package:installdir("lib"))
         os.mv("Package/" .. conf .. "/MoltenVKShaderConverter/Tools/*", package:installdir("bin"))
         os.mv("Package/" .. conf .. "/MoltenVKShaderConverter/Tools/*", package:installdir("bin"))
-        os.mv("Package/" .. conf .. "/MoltenVKShaderConverter/MoltenVKShaderConverter.xcframework/macos-*/*.a", package:installdir("lib"))
+        os.mv("Package/" .. conf .. "/MoltenVKShaderConverter/MoltenVKShaderConverter.xcframework/" .. plat:lower() .. "-*/*.a", package:installdir("lib"))
         os.mv("Package/" .. conf .. "/MoltenVKShaderConverter/include/*.h", package:installdir("include"))
         os.mv("Package/" .. conf .. "/MoltenVKShaderConverter/include/*.h", package:installdir("include"))
         package:addenv("PATH", "bin")
         package:addenv("PATH", "bin")
     end)
     end)