add mpfr and moltenvk (#192)

* add mpfr

* switch python dependent to binary

* add moltenvk
pull/196/head
Hoildkv 4 years ago committed by GitHub
parent 568a0f57c5
commit f47299b730
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      packages/g/glslang/xmake.lua
  2. 3
      packages/l/libxcb/xmake.lua
  3. 29
      packages/m/moltenvk/xmake.lua
  4. 25
      packages/m/mpfr/xmake.lua
  5. 3
      packages/s/spirv-tools/xmake.lua
  6. 2
      packages/x/xcb-proto/xmake.lua

@ -7,7 +7,8 @@ package("glslang")
add_urls("https://github.com/KhronosGroup/glslang.git")
add_versions("1.2.154+1", "bacaef3237c515e40d1a24722be48c0a0b30f75f")
add_deps("cmake", "spirv-tools", "python 3.x")
add_deps("cmake", "python 3.x", {kind = "binary"})
add_deps("spirv-tools")
if is_plat("linux") then
add_syslinks("pthread")
end

@ -8,7 +8,8 @@ package("libxcb")
add_versions("1.14", "2c7fcddd1da34d9b238c9caeda20d3bd7486456fc50b3cc6567185dbd5b0ad02")
if is_plat("macosx", "linux") then
add_deps("pkg-config", "python 3.x", "xcb-proto", "libpthread-stubs", "libxau", "libxdmcp")
add_deps("pkg-config", "python 3.x", {kind = "binary"})
add_deps("xcb-proto", "libpthread-stubs", "libxau", "libxdmcp")
end
on_install("macosx", "linux", function (package)

@ -0,0 +1,29 @@
package("moltenvk")
set_homepage("https://github.com/KhronosGroup/MoltenVK")
set_description("MoltenVK is a Vulkan Portability implementation.")
set_license("Apache-2.0")
add_urls("https://github.com/KhronosGroup/MoltenVK/archive/v$(version).tar.gz")
add_versions("1.1.0", "0538fa1c23ddae495c7f82ccd0db90790a90b7017a258ca7575fbae8021f3058")
on_install("macosx", function (package)
local configs = {"--macos"}
if package:debug() then
table.insert(configs, "--debug")
end
os.vrunv("./fetchDependencies", configs)
local conf = package:debug() and "Debug" or "Release"
os.vrun("xcodebuild build -quiet -project MoltenVKPackaging.xcodeproj -scheme \"MoltenVK Package (macOS only)\" -configuration \"" .. conf)
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 .. "/MoltenVKShaderConverter/Tools/*", package:installdir("bin"))
os.mv("Package/" .. conf .. "/MoltenVKShaderConverter/MoltenVKShaderConverter.xcframework/macos-*/*.a", package:installdir("lib"))
os.mv("Package/" .. conf .. "/MoltenVKShaderConverter/include/*.h", package:installdir("include"))
package:addenv("PATH", "bin")
end)
on_test(function (package)
assert(package:has_cfuncs("vkGetDeviceProcAddr", {includes = "vulkan/vulkan_core.h"}))
end)

@ -0,0 +1,25 @@
package("mpfr")
set_homepage("https://www.mpfr.org/")
set_description("The MPFR library is a C library for multiple-precision floating-point computations with correct rounding.")
set_license("LGPL-3.0")
add_urls("https://www.mpfr.org/mpfr-current/mpfr-$(version).tar.gz")
add_versions("4.1.0", "3127fe813218f3a1f0adf4e8899de23df33b4cf4b4b3831a5314f78e65ffa2d6")
add_deps("gmp")
on_install("macosx", "linux", function (package)
local configs = {"--disable-dependency-tracking"}
if package:config("shared") then
table.insert(configs, "--enable-shared=yes")
table.insert(configs, "--enable-static=no")
else
table.insert(configs, "--enable-static=yes")
table.insert(configs, "--enable-shared=no")
end
import("package.tools.autoconf").install(package, configs)
end)
on_test(function (package)
assert(package:has_cfuncs("mpfr_get_version", {includes = "mpfr.h"}))
end)

@ -9,7 +9,8 @@ package("spirv-tools")
add_patches("2020.5", "https://github.com/KhronosGroup/SPIRV-Tools/commit/a1d38174b1f7d2651c718ae661886d606cb50a32.patch", "2811faeef3ad53a83e409c8ef9879badcf9dc04fc3d98dbead7313514b819933")
add_deps("cmake", "spirv-headers", "python 3.x")
add_deps("cmake", "python 3.x", {kind = "binary"})
add_deps("spirv-headers")
on_install("linux", "windows", "macosx", function (package)
package:addenv("PATH", "bin")

@ -8,7 +8,7 @@ package("xcb-proto")
add_versions("1.14", "1c3fa23d091fb5e4f1e9bf145a902161cec00d260fabf880a7a248b02ab27031")
if is_plat("macosx", "linux") then
add_deps("pkg-config", "python 3.x")
add_deps("pkg-config", "python 3.x", {kind = "binary"})
end
on_install("macosx", "linux", function (package)

Loading…
Cancel
Save