Files
sisungo 5c89842dc0 initial commit
Signed-off-by: sisungo <[email protected]>
2026-08-22 11:41:05 +00:00

39 lines
1.0 KiB
Python

from lib.make import *
from lib import cpp, packie
version("22.1.5")
description("A tool and a library for bi-directional translation between SPIR-V and LLVM IR")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/refs/tags/v22.1.5.tar.gz")
builddep("shortcut/cmake")
builddep("shortcut/c++")
builddep("libllvm-dev (~22.1.0) @target")
builddep("libllvm-static (~22.1.0) @target")
builddep("pkgconf @target")
builddep("spirv-headers @target")
builddep("spirv-tools-dev @target")
def build():
cpp.cmake([
"-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=ON",
f"-DLLVM_DIR={packie.prefix_of('libllvm-dev')}/lib/cmake/llvm",
f"-DCMAKE_INSTALL_PREFIX={get_prefix('libllvmspirv-dev')}",
])
cpp.ninja()
cpp.ninja_install()
on_build(build)
package("libllvmspirv-dev")
dep("libllvm-dev (~22.1.0) @same-arch")
cpp.use_auto_pack(["dev"])
package("llvm-spirv")
dep("libllvm (~22.1.0) @same-arch")
dep("libcxx @same-arch")
cpp.use_auto_pack(["bin"])