add mpfr and moltenvk (#192)
* add mpfr * switch python dependent to binary * add moltenvkpull/196/head
parent
568a0f57c5
commit
f47299b730
6 changed files with 61 additions and 4 deletions
@ -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) |
Loading…
Reference in new issue