90 lines
3.6 KiB
Bash
90 lines
3.6 KiB
Bash
# Template file for 'amdvlk'
|
|
pkgname=amdvlk
|
|
version=2020.Q3.3
|
|
revision=1
|
|
_llpc_commit=897de5981ede47587bf4bd0205b860338eb45fa7
|
|
_xgl_commit=f4a992dd7e556ed5e7e2ffa2c830f1cd79bd4596
|
|
_pal_commit=477c8e78bc4f8c7f8b4cd312e708935b0e04b1cc
|
|
_llvm_project_commit=319fe935a7a607e83d2885c881ae5aeff9b08b22
|
|
_spvgen_commit=8dc855026f2502ab3f45dadaf0bb802a57d6ad60
|
|
_MetroHash_commit=712f76fee75d69b23a1ea8f6465752c3ccaaf9a2
|
|
_CWPack_commit=7387247eb9889ddcabbc1053b9c2052e253b088e
|
|
archs="i686* x86_64*"
|
|
create_wrksrc=yes
|
|
build_wrksrc="xgl"
|
|
build_style=cmake
|
|
configure_args="-DBUILD_WAYLAND_SUPPORT=ON
|
|
-DXGL_METROHASH_PATH=../../metrohash
|
|
-DXGL_CWPACK_PATH=../../cwpack"
|
|
hostmakedepends="pkg-config python3 perl"
|
|
makedepends="libxml2-devel xorg-server-devel libXrandr-devel libffi-devel"
|
|
depends="vulkan-loader"
|
|
short_desc="AMD Open Source Driver For Vulkan"
|
|
maintainer="John <me@johnnynator.dev>"
|
|
license="MIT"
|
|
homepage="https://github.com/GPUOpen-Drivers/AMDVLK"
|
|
distfiles="https://github.com/GPUOpen-Drivers/AMDVLK/archive/v-${version}.tar.gz
|
|
https://github.com/GPUOpen-Drivers/llpc/archive/${_llpc_commit}.tar.gz
|
|
https://github.com/GPUOpen-Drivers/xgl/archive/${_xgl_commit}.tar.gz
|
|
https://github.com/GPUOpen-Drivers/pal/archive/${_pal_commit}.tar.gz
|
|
https://github.com/GPUOpen-Drivers/llvm-project/archive/${_llvm_project_commit}.tar.gz
|
|
https://github.com/GPUOpen-Drivers/spvgen/archive/${_spvgen_commit}.tar.gz
|
|
https://github.com/GPUOpen-Drivers/MetroHash/archive/${_MetroHash_commit}.tar.gz
|
|
https://github.com/GPUOpen-Drivers/CWPack/archive/${_CWPack_commit}.tar.gz"
|
|
checksum="f595d7ca34fa6ce4673447fdee74d6d6f97018ff1da015aab2c4a610cf83421d
|
|
2c81d671815776ce13b49c4568af5f71336ff4d81a6ca7e8fc74cc45794cf3ca
|
|
60b170dd44cb5968b2d776ccea4614163f36a065b772abcc140b60a66f4dc125
|
|
127181ac0ab84cf3e5932bbdce77ab24cf3713f8d1ed83f2d121fc54c80127a2
|
|
49a29572c84d39e6a412de1f2716113ab5dc68fd21db68dff76350b1367a0708
|
|
8d56ad0d5c57a8b6af1ee686746037faae52844d2ebdacb646552fb960c74a8b
|
|
07c7389894a4acd9aff7ddb6d70fc3ea6a4cc10589b69ce92c737487cbe2d37d
|
|
186060fbcf87165224ba7df0e1858b66ebc42cf190c481aef1df8d89ebab7abd"
|
|
nocross=yes
|
|
lib32files="/usr/share/vulkan/icd.d/amd_icd32.json"
|
|
|
|
post_extract() {
|
|
mv ${wrksrc}/AMDVLK-v-${version} ${wrksrc}/AMDVLK
|
|
mv ${wrksrc}/xgl-${_xgl_commit} ${wrksrc}/xgl
|
|
mv ${wrksrc}/pal-${_pal_commit} ${wrksrc}/pal
|
|
mv ${wrksrc}/llpc-${_llpc_commit} ${wrksrc}/llpc
|
|
mv ${wrksrc}/llvm-project-${_llvm_project_commit} ${wrksrc}/llvm-project
|
|
mv ${wrksrc}/spvgen-${_spvgen_commit} ${wrksrc}/spvgen
|
|
mv ${wrksrc}/MetroHash-${_MetroHash_commit} ${wrksrc}/metrohash
|
|
mv ${wrksrc}/CWPack-${_CWPack_commit} ${wrksrc}/cwpack
|
|
}
|
|
|
|
pre_configure() {
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686*) _arch="X86";;
|
|
x86_64*) _arch="X86";;
|
|
esac
|
|
configure_args+=" -DLLVM_TARGET_ARCH=${_arch}"
|
|
configure_args+=" -DLLVM_DEFAULT_TARGET_TRIPLE=${XBPS_CROSS_TRIPLET:-$XBPS_TRIPLET}"
|
|
}
|
|
|
|
pre_build() {
|
|
# lower burden on build servers, llvm eats too much memory
|
|
if [ "$XBPS_MAKEJOBS" -gt 2 ]; then
|
|
echo $XBPS_MAKEJOBS
|
|
export makejobs="-j$(( $XBPS_MAKEJOBS / 2 ))"
|
|
echo $XBPS_MAKEJOBS
|
|
fi
|
|
|
|
}
|
|
|
|
do_install() {
|
|
case $XBPS_TARGET_MACHINE in
|
|
i686*|mips*|arm*|ppc|ppc-musl)
|
|
vinstall build/icd/amdvlk32.so 644 usr/lib/
|
|
vinstall ${wrksrc}/AMDVLK/json/Redhat/amd_icd32.json 644 usr/share/vulkan/icd.d/
|
|
vsed -i ${DESTDIR}/usr/share/vulkan/icd.d/amd_icd32.json -e 's#/usr/lib/#/usr/lib32/#g'
|
|
;;
|
|
*)
|
|
vinstall build/icd/amdvlk64.so 644 usr/lib/
|
|
vinstall ${wrksrc}/AMDVLK/json/Redhat/amd_icd64.json 644 usr/share/vulkan/icd.d/
|
|
vsed -i ${DESTDIR}/usr/share/vulkan/icd.d/amd_icd64.json -e 's#/usr/lib64/#/usr/lib/#g'
|
|
;;
|
|
esac
|
|
vlicense ${wrksrc}/AMDVLK/LICENSE.txt
|
|
}
|