public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Julien Roy" <julien@jroy.ca>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:master commit in: media-libs/amdvlk-bin/
Date: Sun, 18 Feb 2024 16:15:44 +0000 (UTC)	[thread overview]
Message-ID: <1708269275.0643c00df81ff8a08cff0d2f7e929ae341404212.julien@gentoo> (raw)

commit:     0643c00df81ff8a08cff0d2f7e929ae341404212
Author:     Denis Reva <denis7774 <AT> gmail <DOT> com>
AuthorDate: Sun Feb 18 15:14:18 2024 +0000
Commit:     Julien Roy <julien <AT> jroy <DOT> ca>
CommitDate: Sun Feb 18 15:14:35 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0643c00d

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

Signed-off-by: Denis Reva <denis7774 <AT> gmail.com>

 media-libs/amdvlk-bin/Manifest                   |   2 +
 media-libs/amdvlk-bin/amdvlk-bin-2024.1.1.ebuild | 109 +++++++++++++++++++++++
 media-libs/amdvlk-bin/metadata.xml               |  15 ++++
 3 files changed, 126 insertions(+)

diff --git a/media-libs/amdvlk-bin/Manifest b/media-libs/amdvlk-bin/Manifest
new file mode 100644
index 0000000000..13d0d16472
--- /dev/null
+++ b/media-libs/amdvlk-bin/Manifest
@@ -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

diff --git a/media-libs/amdvlk-bin/amdvlk-bin-2024.1.1.ebuild b/media-libs/amdvlk-bin/amdvlk-bin-2024.1.1.ebuild
new file mode 100644
index 0000000000..9c98574bf3
--- /dev/null
+++ b/media-libs/amdvlk-bin/amdvlk-bin-2024.1.1.ebuild
@@ -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."
+}

diff --git a/media-libs/amdvlk-bin/metadata.xml b/media-libs/amdvlk-bin/metadata.xml
new file mode 100644
index 0000000000..0d58bfb318
--- /dev/null
+++ b/media-libs/amdvlk-bin/metadata.xml
@@ -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>


             reply	other threads:[~2024-02-18 16:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-18 16:15 Julien Roy [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-02-18 16:15 [gentoo-commits] repo/proj/guru:master commit in: media-libs/amdvlk-bin/ Julien Roy
2024-02-18 16:15 Julien Roy
2024-02-18 18:16 Julien Roy
2024-03-03 10:07 Haelwenn Monnier
2024-05-16 16:27 Julien Roy
2024-08-09  3:29 Lucio Sauer
2024-08-09  3:29 Lucio Sauer
2024-10-03  9:43 Andrew Ammerlaan
2024-11-04 18:27 David Roman
2024-12-05 12:00 Florian Schmaus
2024-12-26 15:36 Julien Roy
2025-02-22 22:36 David Roman
2025-03-01 19:19 Haelwenn Monnier
2025-03-01 19:19 Haelwenn Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1708269275.0643c00df81ff8a08cff0d2f7e929ae341404212.julien@gentoo \
    --to=julien@jroy.ca \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox