summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlcarlier <lcarlier@9fca08f4-af9d-4005-b8df-a31f2cc04f65>2019-11-24 16:04:17 +0000
committerlcarlier <lcarlier@9fca08f4-af9d-4005-b8df-a31f2cc04f65>2019-11-24 16:04:17 +0000
commit93a162fe15f2741444255b5fd89a23cb4d6d7afc (patch)
tree517f26ac1dcaf5e0a8b487675006cec7e976e73a
parent391b30930d3bad4f697fc204566b8f2c0f972bcb (diff)
archrelease: copy trunk to multilib-x86_64
git-svn-id: file:///srv/repos/svn-community/svn@533073 9fca08f4-af9d-4005-b8df-a31f2cc04f65
-rw-r--r--lib32-amdvlk/repos/multilib-x86_64/PKGBUILD63
1 files changed, 63 insertions, 0 deletions
diff --git a/lib32-amdvlk/repos/multilib-x86_64/PKGBUILD b/lib32-amdvlk/repos/multilib-x86_64/PKGBUILD
new file mode 100644
index 00000000000..6d39b2b0e4b
--- /dev/null
+++ b/lib32-amdvlk/repos/multilib-x86_64/PKGBUILD
@@ -0,0 +1,63 @@
+# Maintainer: Laurent Carlier <lordheavym@gmail.com>
+# Contributor: lod <aur@cyber-anlage.de>
+
+pkgname=lib32-amdvlk
+pkgver=2019.Q4.2
+pkgrel=1
+pkgdesc="AMD's standalone Vulkan driver"
+arch=(x86_64)
+url="https://github.com/GPUOpen-Drivers"
+license=('MIT')
+provides=('vulkan-driver')
+makedepends=('perl-xml-xpath' 'python' 'lib32-wayland' 'lib32-libxrandr' 'xorg-server-devel' 'cmake' 'ninja' 'git')
+source=("https://github.com/GPUOpen-Drivers/AMDVLK/archive/v-${pkgver}.tar.gz")
+sha256sums=('385c84e1a5cf6476d2a547418fdc41a10921c7a45be25dd0b7e7dfaee6cd63f8')
+
+prepare() {
+ local nrepos path name revision
+
+ nrepos=$(xpath -q -e //project AMDVLK-v-${pkgver}/default.xml | wc -l)
+
+ while (($nrepos>0))
+ do
+ path=$(xpath -q -e //project[$nrepos]/@path AMDVLK-v-${pkgver}/default.xml | sed 's/ path="drivers\/\(.*\)"/\1/g')
+ name=$(xpath -q -e //project[$nrepos]/@name AMDVLK-v-${pkgver}/default.xml | sed 's/ name="\(.*\)"/\1/g')
+ revision=$(xpath -q -e //project[$nrepos]/@revision AMDVLK-v-${pkgver}/default.xml | sed 's/ revision="\(.*\)"/\1/g')
+ git clone https://github.com/GPUOpen-Drivers/$name $path
+ pushd $path
+ git checkout $revision
+ popd
+ (( nrepos-- ))
+ done
+
+ # fix build with gcc9
+ sed -i "s/-Werror//g" ${srcdir}/pal/shared/gpuopen/cmake/AMD.cmake
+}
+
+build() {
+ export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
+
+ cd ${srcdir}/xgl
+ cmake -H. -Bbuilds/Release \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_C_FLAGS=-m32 \
+ -DCMAKE_CXX_FLAGS=-m32 \
+ -DLLVM_TARGET_ARCH:STRING=i686 \
+ -DLLVM_DEFAULT_TARGET_TRIPLE="i686-pc-linux-gnu" \
+ -DBUILD_WAYLAND_SUPPORT=On \
+ -G Ninja
+
+ ninja -C builds/Release
+}
+
+package() {
+ install -m755 -d "${pkgdir}"/usr/lib32
+ install -m755 -d "${pkgdir}"/usr/share/vulkan/icd.d
+ install -m755 -d "${pkgdir}"/usr/share/licenses/${pkgname}
+
+ install xgl/builds/Release/icd/amdvlk32.so "${pkgdir}"/usr/lib32/
+ install AMDVLK/json/Redhat/amd_icd32.json "${pkgdir}"/usr/share/vulkan/icd.d/
+ install AMDVLK/LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/
+
+ sed -i "s/\/lib/\/lib32/g" "${pkgdir}"/usr/share/vulkan/icd.d/amd_icd32.json
+}