summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdel KARA SLIMANE <adel.ks@zegrapher.com>2024-03-23 17:33:07 +0100
committerJoonas Niilola <juippis@gentoo.org>2024-04-26 09:55:01 +0300
commit718fb860b148fc356fb5fbb37da719aa9022f22d (patch)
tree54ad50023809359ccf32134441958a51b33e7c25 /media-libs
parentapp-crypt/swtpm: drop 0.8.0-r2 (diff)
downloadgentoo-718fb860b148fc356fb5fbb37da719aa9022f22d.tar.gz
gentoo-718fb860b148fc356fb5fbb37da719aa9022f22d.tar.bz2
gentoo-718fb860b148fc356fb5fbb37da719aa9022f22d.zip
media-libs/amdgpu-pro-vulkan: add 23.40.0.1718238
Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/amdgpu-pro-vulkan/Manifest2
-rw-r--r--media-libs/amdgpu-pro-vulkan/amdgpu-pro-vulkan-23.40.0.1718238.ebuild134
2 files changed, 136 insertions, 0 deletions
diff --git a/media-libs/amdgpu-pro-vulkan/Manifest b/media-libs/amdgpu-pro-vulkan/Manifest
index a52cff141fd9..0f26568f8904 100644
--- a/media-libs/amdgpu-pro-vulkan/Manifest
+++ b/media-libs/amdgpu-pro-vulkan/Manifest
@@ -10,3 +10,5 @@ DIST amdgpu-pro-vulkan-23.10.3.1620044-amd64.deb 28230396 BLAKE2B f0c59e5c955640
DIST amdgpu-pro-vulkan-23.10.3.1620044-i386.deb 29943120 BLAKE2B cb15cd340854d2d023c1d5d700790d7ef37f3cddb6ec5e11a0642da8dd6c9bcf375bcc3793f4a6a1e379c78b518c68e6bb188b91cd815bca1abc1e09f6516c02 SHA512 2c251b68a4910e8873256316248d4c932483e928e38b9752fd919df0165e3db134e7d08c2c1f95cceda24e47cd5b419d482243ff7e42af3cb4bec8abb4162436
DIST amdgpu-pro-vulkan-23.20.0.1654522-amd64.deb 24480404 BLAKE2B 10e2dea7e03bc6c24b40b8d8c4933897e17edb8e9b1fb1aebc7a6151c2bf051bbd5e994b771a045e747730f41996b2b3819edd8163daeb22a0487d5a96ea15f7 SHA512 4014a3f5cdbc3e977d5953719e8d0ea34a0ff1cc9b7292513df69e98d1c6556643392dd77edf10a682f049c689d69c92ba307d5af5b8e68003ccbba014f7aa9a
DIST amdgpu-pro-vulkan-23.20.0.1654522-i386.deb 25453504 BLAKE2B 46940aecb2d6981846534f49b7f2d829924c03ba7fe8fe84c84408968a761683183524f4aa58ac9a2810bbc16975634cc6dcaaba3331604ab2bb74bd9949bb3b SHA512 ab8e7df7d093bc25dcdda942456ba54f3d21312435af025619b1f9531606ea5a18b975fe291e06154dabaaafb48cd5f58261d958c765058ed23e53517032b5fe
+DIST amdgpu-pro-vulkan-23.40.0.1718238-amd64.deb 23555536 BLAKE2B fc3aa3d0fe271bb9184999c6ba887cbd466ef41a61d1e35aaa0e94838322f8182e9c40393fa250fda7489ce5b04514b70f3b49274b6e58ce6db2a70223a11280 SHA512 6f6ca7cabc665fefbb8d2308cc3654baec726899ea1923885056bfa80e681c5f96eaba7e912bc73b7889dac322ffefec0cda061b7e0a1d099bca378e7afc5ae1
+DIST amdgpu-pro-vulkan-23.40.0.1718238-i386.deb 24907864 BLAKE2B 438cec19c1e96b872a81690b212b1693a048fab92cc67bab2aedaf917fa802760100631e408d70a5f3ff70bb88b8f888ee566926055770d318fbaa9a88a4490f SHA512 5f46fb6ab37ad596762f46fcd2ac2a0568a98023e97c92408d943e4a1033f4811450331f688da6f90a070d9cd0a56962284c71e645111c6c4f52e205fd41bf82
diff --git a/media-libs/amdgpu-pro-vulkan/amdgpu-pro-vulkan-23.40.0.1718238.ebuild b/media-libs/amdgpu-pro-vulkan/amdgpu-pro-vulkan-23.40.0.1718238.ebuild
new file mode 100644
index 000000000000..a6e635176f5a
--- /dev/null
+++ b/media-libs/amdgpu-pro-vulkan/amdgpu-pro-vulkan-23.40.0.1718238.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit unpacker
+
+MY_PV_HIGH=$(ver_cut 1)
+MY_PV_MIDDLE=$(ver_cut 2)
+MY_PV_LOW=$(ver_cut 3)
+MY_PV_REV=$(ver_cut 4)
+
+MY_PV="${MY_PV_HIGH}.${MY_PV_MIDDLE}"
+
+INTERNAL_VER="6.0.2"
+
+MY_PV_FULL="${MY_PV}-${MY_PV_REV}"
+
+MY_PN="vulkan-amdgpu-pro"
+MY_LINK="https://repo.radeon.com/amdgpu/${INTERNAL_VER}/ubuntu/pool/proprietary/v/${MY_PN}"
+
+UBUNTU_VER="22.04"
+
+DESCRIPTION="AMD's closed source vulkan driver, from Radeon Software for Linux"
+HOMEPAGE="https://www.amd.com/en/support"
+SRC_URI="
+ abi_x86_64? ( ${MY_LINK}/${MY_PN}_${MY_PV_FULL}.${UBUNTU_VER}_amd64.deb -> ${P}-amd64.deb )
+ abi_x86_32? ( ${MY_LINK}/${MY_PN}_${MY_PV_FULL}.${UBUNTU_VER}_i386.deb -> ${P}-i386.deb )
+"
+S="${WORKDIR}"
+
+RESTRICT="bindist mirror"
+
+LICENSE="AMD-GPU-PRO-EULA"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="abi_x86_32 abi_x86_64 video_cards_amdgpu"
+
+REQUIRED_USE="video_cards_amdgpu"
+
+BDEPEND="dev-util/patchelf"
+
+QA_PREBUILT="
+ usr/lib64/amdvlkpro64.so*
+ usr/lib/amdvlkpro32.so*
+"
+
+src_unpack() {
+ default
+
+ if use abi_x86_64 ; then
+ mkdir "${S}/${PN}-amd64" || die
+ cd "${S}/${PN}-amd64" || die
+ unpack_deb "${DISTDIR}/${P}-amd64.deb"
+ fi
+
+ if use abi_x86_32 ; then
+ mkdir "${S}/${PN}-i386" || die
+ cd "${S}/${PN}-i386" || die
+ unpack_deb "${DISTDIR}/${P}-i386.deb"
+ fi
+}
+
+src_prepare() {
+ if use abi_x86_64 ; then
+ cd "${S}/${PN}-amd64/opt/amdgpu-pro/lib/x86_64-linux-gnu/" || die
+
+ # Make sure there's only one file in the folder, to prevent unexpected behavior of the next command
+ [[ "$(ls | wc -l)" = '1' ]] || die "more than one file in opt/amdgpu-pro/lib/x86_64-linux-gnu/"
+
+ # Add "pro" in the .so file's name, and remove any numeric extension "e.g. amdvlk64.so.1"
+ mv amdvlk64.so* amdvlkpro64.so || die
+
+ # same with the SONAME
+ patchelf --set-soname amdvlkpro64.so "${PWD}"/amdvlkpro64.so || die
+
+ cd "${S}/${PN}-amd64/opt/amdgpu-pro/etc/vulkan/icd.d/" || die
+ eapply "${FILESDIR}"/icd_amd64.patch
+ mv amd_icd64.json amd_pro_icd64.json || die
+ fi
+
+ if use abi_x86_32 ; then
+ cd "${S}/${PN}-i386/opt/amdgpu-pro/lib/i386-linux-gnu/" || die
+
+ # Make sure there's only one file in the folder, to prevent unexpected behavior of the next command
+ [[ "$(ls | wc -l)" = '1' ]] || die "more than one file in opt/amdgpu-pro/lib/i386-linux-gnu/"
+
+ # Add "pro" in the .so file's name, and remove any numeric extension "e.g. amdvlk32.so.1"
+ mv amdvlk32.so* amdvlkpro32.so || die
+
+ # same with the SONAME
+ patchelf --set-soname amdvlkpro32.so "${PWD}"/amdvlkpro32.so || die
+
+ cd "${S}/${PN}-i386/opt/amdgpu-pro/etc/vulkan/icd.d/" || die
+ eapply "${FILESDIR}"/icd_x86.patch
+ mv amd_icd32.json amd_pro_icd32.json || die
+ fi
+
+ default
+}
+
+src_install() {
+ if use abi_x86_64 ; then
+ # Vulkan driver
+ insinto /usr/lib64
+ doins "${S}"/"${PN}"-amd64/opt/amdgpu-pro/lib/x86_64-linux-gnu/amdvlkpro64.so
+
+ # ICD loader
+ insinto /usr/share/vulkan/icd.d
+ doins "${S}"/"${PN}"-amd64/opt/amdgpu-pro/etc/vulkan/icd.d/amd_pro_icd64.json
+ fi
+
+ if use abi_x86_32 ; then
+ # Vulkan driver
+ insinto /usr/lib
+ doins "${S}"/"${PN}"-i386/opt/amdgpu-pro/lib/i386-linux-gnu/amdvlkpro32.so
+
+ # ICD loader
+ insinto /usr/share/vulkan/icd.d
+ doins "${S}"/"${PN}"-i386/opt/amdgpu-pro/etc/vulkan/icd.d/amd_pro_icd32.json
+ fi
+
+ # AMDGPU-PRO & RADV Vulkan prefix
+ dobin "${FILESDIR}/vk_pro"
+ dobin "${FILESDIR}/vk_radv"
+}
+
+pkg_postinst() {
+ elog "To execute programs with the amdgpu-pro-vulkan driver:"
+ elog " - Use the `vk_pro` wrapper script: e.g. 'vk_pro vkcube'"
+ elog " - Define the following environment variable: "
+ elog " VK_DRIVER_FILES=/usr/share/vulkan/icd.d/amd_pro_icd64.json:/usr/share/vulkan/icd.d/amd_pro_icd32.json"
+ elog
+}