90 lines
3.6 KiB
Bash
90 lines
3.6 KiB
Bash
# Template file for 'amdvlk'
|
|
pkgname=amdvlk
|
|
version=2020.Q2.2
|
|
revision=1
|
|
_llpc_commit=3864fc733e437a6e6ae729c6858b92b39194eada
|
|
_xgl_commit=d8c926b86b1245badc67e5d55b0eaa45d4a910a0
|
|
_pal_commit=e1b2dde021a2efd34da6593994f87317a803b065
|
|
_llvm_project_commit=a1299ba9c8e2337f00bdec73e2031144d9811ed7
|
|
_spvgen_commit=d4817ab957f79762da83b7fc1d3f2816dbdc13fd
|
|
_MetroHash_commit=2b6fee002db6cc92345b02aeee963ebaaf4c0e2f
|
|
_CWPack_commit=b601c88aeca7a7b08becb3d32709de383c8ee428
|
|
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 <johnz@posteo.net>"
|
|
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="e57b7805e97cc1a82ef9dba2ea79c4e559ee7e865a9e7a942fc2b52559625068
|
|
e24e9fed555024ae556b3ecfc93b273e8681bcb6f088864468f77aa5c93b18d7
|
|
8d6bb8d82e14de6d30640e3d3d65ee088a975360e08cc42d9136284f141f351d
|
|
d8374e12081099dbcd7afe1fb9b09b75be96dc7ab1cf8e7b2f70b58820a5425e
|
|
a9808ab3adec79aabcf0d1cdfc5ff443e261c0177ceca4f1cf71dec0835abb3f
|
|
fc13a42980efc55ca6aec36bd60b5c621207468a0c5c22f44538260cf46542c5
|
|
e8ecf026584dd953e39c3abba2eb04d28b28ed4577482ee70265f0d421fef398
|
|
58ca397f33d62bcfecaecd89eb4ad466a6c33e1c619e5cf742822074f1f7d664"
|
|
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
|
|
}
|