72 lines
2.7 KiB
Bash
72 lines
2.7 KiB
Bash
# Template file for 'amdvlk'
|
|
pkgname=amdvlk
|
|
version=2019.Q2.1
|
|
revision=1
|
|
_llpc_commit=6c6de1dab3927bfb0f6659ba89c6fe80be8a4a04
|
|
_xgl_commit=5b4058dc288a25f6554fcc61f80bf3f27eb35d8d
|
|
_pal_commit=99901922d67e502ff4233a8bfcbfa0347c0ffa1b
|
|
_llvm_commit=97cc33415120ae3ed472b6dd5cb234b74a80bd80
|
|
_wsa_commit=f558403d3292039de4d17334e562bda58abfc72c
|
|
archs="i686* x86_64*"
|
|
create_wrksrc=yes
|
|
build_wrksrc="xgl"
|
|
build_style=cmake
|
|
configure_args="-DBUILD_WAYLAND_SUPPORT=ON -DBUILD_WSA=ON"
|
|
hostmakedepends="pkg-config python3 perl"
|
|
makedepends="libxml2-devel xorg-server-devel libXrandr-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/archive/${_llvm_commit}.tar.gz
|
|
https://github.com/GPUOpen-Drivers/wsa/archive/${_wsa_commit}.tar.gz"
|
|
checksum="c9c5e7bc219c6849d85304adcb5d3ab77cdb09d095328422c0ec1625b05a8bec
|
|
82f292025bb948405ccd6852fe034a5e659597e1391c8489deb99905f1eb3ac4
|
|
29b271f3e21271652ef8cc07d9d41118188da927d164fe6522726f4ab7f62620
|
|
7ba7baa5dc9377ccdf040e537397b3d188340ee6bf93074b57930171baf59a51
|
|
37727c7ffac673729cf098e4b640179cc1515bc4e63c0f728b88720c9cda2150
|
|
b23e9453fa7b14bb13157fb645936ec74b18b12cdef301758452a92b23f27705"
|
|
nocross=yes
|
|
|
|
case $XBPS_TARGET_MACHINE in
|
|
*-musl) makedepends+=" rand48_r-devel"
|
|
esac
|
|
|
|
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-${_llvm_commit} ${wrksrc}/llvm
|
|
mv ${wrksrc}/wsa-${_wsa_commit} ${wrksrc}/wsa
|
|
}
|
|
|
|
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}"
|
|
}
|
|
|
|
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/
|
|
;;
|
|
*)
|
|
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
|
|
vinstall build/wsa/wayland/libamdgpu_wsa_wayland.so 644 usr/lib/
|
|
vlicense ${wrksrc}/AMDVLK/LICENSE.txt
|
|
}
|