add libjpeg-turbo, gn, dxc and update icu4c, glslang (#169)
* add libjpeg-turbo * add directxshadercompiler * update glslang * add gn * update icu4c * remove google download url * remove redundant env pathpull/171/head
parent
16a681b734
commit
30b3f83644
6 changed files with 166 additions and 9 deletions
@ -0,0 +1,21 @@ |
|||||||
|
package("directxshadercompiler") |
||||||
|
|
||||||
|
set_homepage("https://github.com/microsoft/DirectXShaderCompiler/") |
||||||
|
set_description("DirectX Shader Compiler") |
||||||
|
set_license("LLVM") |
||||||
|
|
||||||
|
local date = {["1.5.2010"] = "2020_10-22"} |
||||||
|
add_urls("https://github.com/microsoft/DirectXShaderCompiler/releases/download/v$(version).zip", {version = function (version) return version .. "/dxc_" .. date[version] end}) |
||||||
|
add_versions("1.5.2010", "b691f63778f470ebeb94874426779b2f60685fc8711adf1b1f9f01535d9b67f8") |
||||||
|
|
||||||
|
set_kind("binary") |
||||||
|
|
||||||
|
on_install("@windows|x64", function (package) |
||||||
|
os.cp("bin/x64/**", package:installdir("bin")) |
||||||
|
os.cp("inc/**", package:installdir("include")) |
||||||
|
os.cp("lib", package:installdir()) |
||||||
|
end) |
||||||
|
|
||||||
|
on_test(function (package) |
||||||
|
os.vrun("dxc -help") |
||||||
|
end) |
@ -0,0 +1,31 @@ |
|||||||
|
package("gn") |
||||||
|
|
||||||
|
set_homepage("https://gn.googlesource.com/gn") |
||||||
|
set_description("GN is a meta-build system that generates build files for Ninja.") |
||||||
|
set_kind("binary") |
||||||
|
|
||||||
|
if is_host("windows") then |
||||||
|
if os.arch() == "x64" then |
||||||
|
add_urls("https://github.com/xmake-mirror/gn-releases/raw/v$(version)/gn-windows-amd64.zip") |
||||||
|
add_versions("20201128", "1cf7fbda62a585925391cc551053e0c6313a9c5aabc02c3c20c138c0ea6bc2bf") |
||||||
|
end |
||||||
|
elseif is_host("linux") then |
||||||
|
add_urls("https://github.com/xmake-mirror/gn-releases/raw/v$(version)/gn-linux-amd64.zip") |
||||||
|
add_versions("20201128", "756d6a88adcb157bd80eb4cea10df9e77fa1e7a328c67858b4c0cd0ab15c9f6e") |
||||||
|
elseif is_host("macosx") then |
||||||
|
if os.arch() == "arm64" then |
||||||
|
add_urls("https://github.com/xmake-mirror/gn-releases/raw/v$(version)/gn-mac-arm64.zip") |
||||||
|
add_versions("20201128", "be0be7cc48ced8124f1da53fe3c571cefa6390ccd7f531144e3dffd4b51e1138") |
||||||
|
else |
||||||
|
add_urls("https://github.com/xmake-mirror/gn-releases/raw/v$(version)/gn-mac-amd64.zip") |
||||||
|
add_versions("20201128", "34dc4171ec89cf7839c8ada4fec80860109b4af936688a3bfe9373c464667573") |
||||||
|
end |
||||||
|
end |
||||||
|
|
||||||
|
on_install("@windows", "@linux", "@macosx", function (package) |
||||||
|
os.cp("gn*", package:installdir("bin")) |
||||||
|
end) |
||||||
|
|
||||||
|
on_test(function (package) |
||||||
|
os.vrun("gn --version") |
||||||
|
end) |
@ -0,0 +1,39 @@ |
|||||||
|
package("libjpeg-turbo") |
||||||
|
|
||||||
|
set_homepage("https://libjpeg-turbo.org/") |
||||||
|
set_description("A JPEG image codec that uses SIMD instructions (MMX, SSE2, AVX2, Neon, AltiVec) to accelerate baseline JPEG compression and decompression on x86, x86-64, Arm, and PowerPC systems.") |
||||||
|
set_license("BSD-3-Clause") |
||||||
|
|
||||||
|
add_urls("https://cfhcable.dl.sourceforge.net/project/libjpeg-turbo/$(version)/libjpeg-turbo-$(version).tar.gz", {alias = "sf"}) |
||||||
|
add_urls("https://github.com/libjpeg-turbo/libjpeg-turbo/archive/$(version).tar.gz", {alias = "github"}) |
||||||
|
add_versions("sf:2.0.5", "16f8f6f2715b3a38ab562a84357c793dd56ae9899ce130563c72cd93d8357b5d") |
||||||
|
add_versions("sf:2.0.6", "d74b92ac33b0e3657123ddcf6728788c90dc84dcb6a52013d758af3c4af481bb") |
||||||
|
add_versions("github:2.0.5", "b3090cd37b5a8b3e4dbd30a1311b3989a894e5d3c668f14cbc6739d77c9402b7") |
||||||
|
add_versions("github:2.0.6", "005aee2fcdca252cee42271f7f90574dda64ca6505d9f8b86ae61abc2b426371") |
||||||
|
|
||||||
|
add_configs("jpeg", {description = "libjpeg API/ABI emulation target version.", default = "6", type = "string", values = {"6", "7", "8"}}) |
||||||
|
|
||||||
|
add_deps("cmake", "nasm") |
||||||
|
|
||||||
|
on_install("windows", "linux", "macosx", function (package) |
||||||
|
local configs = {} |
||||||
|
local jpeg = package:config("jpeg") |
||||||
|
if jpeg == "7" then |
||||||
|
table.insert(configs, "-DWITH_JPEG7=ON") |
||||||
|
elseif jpeg == "8" then |
||||||
|
table.insert(configs, "-DWITH_JPEG8=ON") |
||||||
|
end |
||||||
|
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release")) |
||||||
|
if package:config("shared") then |
||||||
|
table.insert(configs, "-DENABLE_SHARED=ON") |
||||||
|
table.insert(configs, "-DENABLE_STATIC=OFF") |
||||||
|
else |
||||||
|
table.insert(configs, "-DENABLE_SHARED=OFF") |
||||||
|
table.insert(configs, "-DENABLE_STATIC=ON") |
||||||
|
end |
||||||
|
import("package.tools.cmake").install(package, configs) |
||||||
|
end) |
||||||
|
|
||||||
|
on_test(function (package) |
||||||
|
assert(package:has_cfuncs("tjSaveImage", {includes = "turbojpeg.h"})) |
||||||
|
end) |
Loading…
Reference in new issue