void-packages/srcpkgs/amdvlk/template

73 lines
2.7 KiB
Bash
Raw Normal View History

# Template file for 'amdvlk'
pkgname=amdvlk
2019-03-15 12:54:39 +01:00
version=2019.Q1.8
revision=1
2019-03-15 12:54:39 +01:00
_llpc_commit=cf5610192a65cddb20c0775b46013067fc7f3d2c
_xgl_commit=61ee6484930effa39fc806c2f941c5f073a2dfbe
_pal_commit=94501ac9adc214f5c61de042205929eb8681d175
_llvm_commit=97cc33415120ae3ed472b6dd5cb234b74a80bd80
_wsa_commit=f558403d3292039de4d17334e562bda58abfc72c
create_wrksrc=yes
build_wrksrc="xgl"
archs="i686* x86_64*"
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"
2019-03-15 12:54:39 +01:00
checksum="d641482ebcba359d0d7a795af1b068d52c0d965f5e8e8f2e9d2ea0918ab2ec53
a799911767e13b23e4b8f89e69a50326312ed3716214f41ff06c50be99d7525f
9640eeb58fd04de6edc2622be41c566db287f40536c7e9669bee27bab64b8b03
675b78199f2b0028cc3637fb51fb6c4af7a4f71ae48287861591b317061b0544
37727c7ffac673729cf098e4b640179cc1515bc4e63c0f728b88720c9cda2150
b23e9453fa7b14bb13157fb645936ec74b18b12cdef301758452a92b23f27705"
2019-01-28 02:32:17 +01:00
nocross=yes
2019-02-27 00:38:19 +01:00
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
}
2019-01-28 02:32:17 +01:00
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
}