media-libs/amdvlk-bin: new package, add 2024.1.1

Signed-off-by: Denis Reva <denis7774@gmail.com>
This commit is contained in:
Denis Reva
2024-02-18 20:14:18 +05:00
parent 420e43f1d3
commit 0643c00df8
3 changed files with 126 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
DIST amdvlk-bin-2024.1.1-amd64.rpm 18242384 BLAKE2B f26155287dfd7c968581b5eba3a4ad4ac9e1c0d4740a9aa57e120c8a21a1638cf0f02bcf3fd51fb2b6150031b7d81a2c755095807f8afbec5727be4dd661bcaf SHA512 f75b175377a9c252d564db5d99aae47d833d6ddc2c0b7c9292113e96e0635d059deae82ef54e9a88025c28b8b2271113ab468c72a0aa16c4908857b970f3634e
DIST amdvlk-bin-2024.1.1-i386.deb 25981812 BLAKE2B c8cb424798b6d2f64f0d4c68930c4fbe7ac02039373d33aa6cc0c2912b71df7a7adff64e3f60be52f3bd4bcec0c91ee5f3a0edfaa88dc2f09390c245e94f0170 SHA512 6c3f5aea6e734fa3550c7f4103108dd3efca2ce0ddb1e0410b46ef3d4171deb66cf10b2e38935bf965d729daa221fd6af119582ef7b15e779df80d84122b9587

View File

@@ -0,0 +1,109 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
MULTILIB_COMPAT=( abi_x86_{32,64} )
inherit rpm unpacker multilib-build
DESCRIPTION="AMD Open Source Driver for Vulkan: official binary version"
HOMEPAGE="https://github.com/GPUOpen-Drivers/AMDVLK"
MY_PV="${PV/'.'/'.Q'}"
FETCH_URI="https://github.com/GPUOpen-Drivers/AMDVLK/releases/download"
SRC_URI="${FETCH_URI}/v-${MY_PV}/amdvlk-${MY_PV}.x86_64.rpm -> ${P}-amd64.rpm
${FETCH_URI}/v-${MY_PV}/amdvlk_${MY_PV}_i386.deb -> ${P}-i386.deb"
RESTRICT="test"
REQUIRED_USE="abi_x86_64"
LICENSE="MIT"
SLOT="0"
KEYWORDS="-* ~amd64" # The hardware is not supported x86 anymore
RDEPEND="
sys-libs/zlib[${MULTILIB_USEDEP}]
app-arch/zstd[${MULTILIB_USEDEP}]
x11-libs/libdrm[${MULTILIB_USEDEP}]
x11-libs/libXrandr[${MULTILIB_USEDEP}]
x11-libs/libxcb[${MULTILIB_USEDEP}]
x11-libs/libxshmfence[${MULTILIB_USEDEP}]
>=media-libs/vulkan-loader-1.3.224[${MULTILIB_USEDEP}]
"
DEPEND="
${RDEPEND}
"
BDEPEND="sys-apps/sed"
QA_PREBUILT="
usr/lib/*
usr/lib64/*
"
# TODO: Found a correct way to disable QA_SONAME for /usr/lib/amdvlk32.so
# I don't know why the current value is not working
QA_SONAME="usr/lib/*"
S=${WORKDIR}
pkg_pretend(){
if use abi_x86_32; then
ewarn "32-bit amdvlk binary is untested"
ewarn "Work in progress"
fi
}
src_unpack(){
elog "Unpacking abi_x86_64..."
mkdir -p "${S}"/amd64
cd "${S}"/amd64 || die
rpm_unpack ${P}-amd64.rpm
if use abi_x86_32; then
elog "Unpacking abi_x86_32..."
mkdir -p "${S}"/i386 || die
cd "${S}"/i386 || die
unpacker ${P}-i386.deb
fi
}
src_prepare() {
default
if use abi_x86_32; then
elog "Changing layout of abi_x86_32 from debian/ubuntu to Gentoo/RHEL-alike"
mv "${S}/i386/usr/lib/i386-linux-gnu/amdvlk32.so" "${S}/i386/usr/lib/" || die
rm -d "${S}/i386/usr/lib/i386-linux-gnu/" || die
rm -r "${S}/i386/usr/share/" || die
fi
mv "${S}/amd64/usr/share/doc/amdvlk/LICENSE.txt" "${S}" || die
rm -r "${S}/amd64/usr/share/" || die
}
src_configure(){
if use abi_x86_32; then
elog "Changing configuration of abi_x86_32 from debian/ubuntu to Gentoo/RHEL-alike"
sed -i 's/\/usr\/lib\/i386-linux-gnu\/amdvlk32.so/\/usr\/lib\/amdvlk32.so/g' \
"${S}/i386/etc/vulkan/icd.d/amd_icd32.json" || die
sed -i 's/\/usr\/lib\/i386-linux-gnu\/amdvlk32.so/\/usr\/lib\/amdvlk32.so/g' \
"${S}/i386/etc/vulkan/implicit_layer.d/amd_icd32.json" || die
fi
}
src_compile(){
elog "Nothing to compile..."
}
src_install(){
if use abi_x86_32; then
cp -a "${S}/i386"/* "${D}" || die
fi
cp -a "${S}/amd64"/* "${D}" || die
dodoc LICENSE.txt
}
pkg_postinst(){
ewarn "If you are using Xorg:"
ewarn "Make sure the following line is NOT included in the any Xorg configuration section:"
ewarn "| Driver \"modesetting\""
ewarn "and make sure you use DRI3 mode for Xorg"
ewarn "If you are using Wayland, it should be fine"
elog "More information about the configuration can be found here:"
elog "https://github.com/GPUOpen-Drivers/AMDVLK"
elog "You can use AMD_VULKAN_ICD variable to switch to the required driver."
elog "AMD_VULKAN_ICD=RADV application - for using radv."
elog "AMD_VULKAN_ICD=AMDVLK application - for using amdvlk."
}

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM 'https://www.gentoo.org/dtd/metadata.dtd'>
<pkgmetadata>
<maintainer type="person">
<email>denis7774@gmail.com</email>
<name>Denis Reva</name>
<description>rarogcmex</description>
</maintainer>
<longdescription lang="en">
The AMD Open Source Driver for Vulkan® is an open-source Vulkan driver for Radeon™ graphics adapters on Linux®. It is built on top of AMD's Platform Abstraction Library (PAL), a shared component that is designed to encapsulate certain hardware and OS-specific programming details for many of AMD's 3D and compute drivers. Leveraging PAL can help provide a consistent experience across platforms, including support for recently released GPUs and compatibility with AMD developer tools.
</longdescription>
<upstream>
<remote-id type="github">GPUOpen-Drivers/AMDVLK</remote-id>
</upstream>
</pkgmetadata>