64 lines
2.5 KiB
Bash
64 lines
2.5 KiB
Bash
|
# Template file for 'DirectXShaderCompiler'
|
||
|
pkgname=DirectXShaderCompiler
|
||
|
version=1.7.2207
|
||
|
revision=1
|
||
|
build_style=cmake
|
||
|
configure_args="-C ../cmake/caches/PredefinedParams.cmake"
|
||
|
hostmakedepends="python3 git"
|
||
|
short_desc="DirectX Shader Compiler based on LLVM/Clang. "
|
||
|
maintainer="Joshua Woodie <joshua.t.woodie@gmail.com>"
|
||
|
license="LLVM"
|
||
|
homepage="https://github.com/microsoft/DirectXShaderCompiler"
|
||
|
_SPIRV_Headers_commit=b2a156e1c0434bc8c99aaebba1c7be98be7ac580
|
||
|
_SPIRV_Tools_commit=b930e734ea198b7aabbbf04ee1562cf6f57962f0
|
||
|
_re2_commit=3e9622e0cd94ebba6e04d5c50b7af32029e330d8
|
||
|
_effcee_commit=ddf5e2bb92957dc8a12c5392f8495333d6844133
|
||
|
distfiles="https://github.com/microsoft/DirectXShaderCompiler/archive/refs/tags/v${version}.tar.gz
|
||
|
https://github.com/KhronosGroup/SPIRV-Headers/archive/${_SPIRV_Headers_commit}.tar.gz
|
||
|
https://github.com/KhronosGroup/SPIRV-Tools/archive/${_SPIRV_Tools_commit}.tar.gz
|
||
|
https://github.com/google/re2/archive/${_re2_commit}.tar.gz
|
||
|
https://github.com/google/effcee/archive/${_effcee_commit}.tar.gz"
|
||
|
checksum="a52aad3830b4d3e39734455ad7f288ad24e32c006e256d987a0ed44fc54fbd26
|
||
|
b200990e1c07894906e298368e7e56d5ab9d728d851f9292587ec740c2b4d409
|
||
|
9cddc845f99d7daa65940ff9deb6754cd71b67987ec9860bb0ef2af8a8732c84
|
||
|
218e0f8d100ba09a089582de7a54ae0ebfa08fd8e43b4c8035ef2faa5e0d284a
|
||
|
5809b2f80b67dc231c52da743be37bb46c5ce4a59dde344761f7c4295119750c"
|
||
|
|
||
|
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
|
||
|
# Tests on musl would require some patching to be done
|
||
|
# Also some fun with Mutexes. so mt is disabled for now
|
||
|
configure_args+=" -DCLANG_INCLUDE_TESTS=FALSE -DHLSL_INCLUDE_TESTS=FALSE -DLLVM_ENABLE_THREADS=OFF"
|
||
|
fi
|
||
|
nocross="fun with cmake and bunlded llvm"
|
||
|
|
||
|
post_extract() {
|
||
|
rmdir -v ${wrksrc}/external/SPIRV-Headers
|
||
|
mv ${wrksrc}/../SPIRV-Headers-${_SPIRV_Headers_commit} ${wrksrc}/external/SPIRV-Headers
|
||
|
rmdir -v ${wrksrc}/external/SPIRV-Tools
|
||
|
mv ${wrksrc}/../SPIRV-Tools-${_SPIRV_Tools_commit} ${wrksrc}/external/SPIRV-Tools
|
||
|
rmdir -v ${wrksrc}/external/re2
|
||
|
mv ${wrksrc}/../re2-${_re2_commit} ${wrksrc}/external/re2
|
||
|
rmdir -v ${wrksrc}/external/effcee
|
||
|
mv ${wrksrc}/../effcee-${_effcee_commit} ${wrksrc}/external/effcee
|
||
|
}
|
||
|
|
||
|
do_install() {
|
||
|
for f in build/lib/libdxcompiler.so*; do
|
||
|
vinstall $f 644 usr/lib
|
||
|
done
|
||
|
vbin build/bin/dxc
|
||
|
vmkdir usr/include
|
||
|
vcopy include/dxc usr/include/
|
||
|
vlicense LICENSE.TXT
|
||
|
vlicense ThirdPartyNotices.txt
|
||
|
}
|
||
|
|
||
|
DirectXShaderCompiler-devel_package() {
|
||
|
short_desc+="${short_desc} - development files"
|
||
|
depends="${sourcepkg}>=${version}_${revision}"
|
||
|
pkg_install() {
|
||
|
vmove usr/include
|
||
|
vmove usr/bin/dxc
|
||
|
}
|
||
|
}
|