diff options
author | Adel KARA SLIMANE <adel.ks@zegrapher.com> | 2021-12-11 01:33:01 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-02-19 05:14:07 +0000 |
commit | f5dced2f12ebd418e3254b3038062224f763d88c (patch) | |
tree | 8c8b4092e3349b547e62f490968110974ad3455f /media-libs/amdgpu-pro-vulkan | |
parent | net-misc/asterisk-moh-opsound: fix dodir insinto (diff) | |
download | gentoo-f5dced2f12ebd418e3254b3038062224f763d88c.tar.gz gentoo-f5dced2f12ebd418e3254b3038062224f763d88c.tar.bz2 gentoo-f5dced2f12ebd418e3254b3038062224f763d88c.zip |
media-libs/amdgpu-pro-vulkan: new package
Supports x86 and amd64 only
Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs/amdgpu-pro-vulkan')
-rw-r--r-- | media-libs/amdgpu-pro-vulkan/Manifest | 2 | ||||
-rw-r--r-- | media-libs/amdgpu-pro-vulkan/amdgpu-pro-vulkan-21.50.1.1376756.ebuild | 106 | ||||
-rw-r--r-- | media-libs/amdgpu-pro-vulkan/files/icd_amd64.patch | 8 | ||||
-rw-r--r-- | media-libs/amdgpu-pro-vulkan/files/icd_x86.patch | 8 | ||||
-rw-r--r-- | media-libs/amdgpu-pro-vulkan/metadata.xml | 12 |
5 files changed, 136 insertions, 0 deletions
diff --git a/media-libs/amdgpu-pro-vulkan/Manifest b/media-libs/amdgpu-pro-vulkan/Manifest new file mode 100644 index 000000000000..81846043966e --- /dev/null +++ b/media-libs/amdgpu-pro-vulkan/Manifest @@ -0,0 +1,2 @@ +DIST amdgpu-pro-vulkan-21.50.1.1376756-amd64.deb 8342920 BLAKE2B a99ba48ded384e39beca0f7321ee6cc77f751843c7ee5d9b45e284740ac1a0932497e3029e95e6f7f6bc1a0d3772619be01a0bc22b4b3857bf24a47f1cfa7b2d SHA512 ff9479652c6b7d359e3b1b1c8f5038f4e447fe2f5f5f186414ecae30ed99be75373bacb599045b23d530c93a78d8049d2bedf129e655c198c9e9e9f8b528d951 +DIST amdgpu-pro-vulkan-21.50.1.1376756-i386.deb 8124604 BLAKE2B 5d325d2b6fe0b22c227df41049330f394315f17aa97203c7032131d5932e75d494539eac4d5e7ea89193a2736068e3a8e5f7a60de9a1a94b8af0b7fba757da21 SHA512 11480ebec72408a5727f99055c32d979912f838256d622c77c7efec37735d2805cf5c52e78d3c86dc0420d29ad52df2d65cd788b67cef1b2df1cfaa5a30c4bc2 diff --git a/media-libs/amdgpu-pro-vulkan/amdgpu-pro-vulkan-21.50.1.1376756.ebuild b/media-libs/amdgpu-pro-vulkan/amdgpu-pro-vulkan-21.50.1.1376756.ebuild new file mode 100644 index 000000000000..db6883188d30 --- /dev/null +++ b/media-libs/amdgpu-pro-vulkan/amdgpu-pro-vulkan-21.50.1.1376756.ebuild @@ -0,0 +1,106 @@ +# Copyright 1999-2022 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}.${MY_PV_LOW}" +MY_PV_FULL="${MY_PV}-${MY_PV_REV}" + +MY_PN="vulkan-amdgpu-pro" + +MY_LINK="https://repo.radeon.com/amdgpu/${MY_PV}/ubuntu/pool/proprietary/v/${MY_PN}" + +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}_amd64.deb -> ${P}-amd64.deb ) + abi_x86_32? ( ${MY_LINK}/${MY_PN}_${MY_PV_FULL}_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" + +BDEPEND="dev-util/patchelf" + +QA_PREBUILT=" + usr/lib64/amdvlkpro64.so* + usr/lib/amdvlkpro32.so* +" + +src_unpack() { + 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 + mv amdvlk64.so.1.0 amdvlkpro64.so.1.0 || die + patchelf --set-soname amdvlkpro64.so.1.0 "${PWD}"/amdvlkpro64.so.1.0 || 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 + mv amdvlk32.so.1.0 amdvlkpro32.so.1.0 || die + patchelf --set-soname amdvlkpro32.so.1.0 "${PWD}"/amdvlkpro32.so.1.0 || 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 + insinto /usr/lib64 + + # Vulkan + doins "${S}"/"${PN}"-amd64/opt/amdgpu-pro/lib/x86_64-linux-gnu/amdvlkpro64.so.1.0 + dosym amdvlkpro64.so.1.0 /usr/lib64/amdvlkpro64.so + dosym amdvlkpro64.so.1.0 /usr/lib64/amdvlkpro64.so.1 + + # 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 + insinto /usr/lib + + # Vulkan + doins "${S}"/"${PN}"-i386/opt/amdgpu-pro/lib/i386-linux-gnu/amdvlkpro32.so.1.0 + dosym amdvlkpro32.so.1.0 /usr/lib/amdvlkpro32.so + dosym amdvlkpro32.so.1.0 /usr/lib/amdvlkpro32.so.1 + + # ICD loader + insinto /usr/share/vulkan/icd.d + doins "${S}"/"${PN}"-i386/opt/amdgpu-pro/etc/vulkan/icd.d/amd_pro_icd32.json + fi +} diff --git a/media-libs/amdgpu-pro-vulkan/files/icd_amd64.patch b/media-libs/amdgpu-pro-vulkan/files/icd_amd64.patch new file mode 100644 index 000000000000..ac55e40a0f2b --- /dev/null +++ b/media-libs/amdgpu-pro-vulkan/files/icd_amd64.patch @@ -0,0 +1,8 @@ +--- a/amd_icd64.json ++++ b/amd_icd64.json +@@ -4 +4 @@ +- "library_path": "/opt/amdgpu-pro/lib/x86_64-linux-gnu/amdvlk64.so", ++ "library_path": "/usr/lib64/amdvlkpro64.so", +@@ -10 +10 @@ +- "library_path": "/opt/amdgpu-pro/lib/x86_64-linux-gnu/amdvlk64.so", ++ "library_path": "/usr/lib64/amdvlkpro64.so", diff --git a/media-libs/amdgpu-pro-vulkan/files/icd_x86.patch b/media-libs/amdgpu-pro-vulkan/files/icd_x86.patch new file mode 100644 index 000000000000..5d70ac2af943 --- /dev/null +++ b/media-libs/amdgpu-pro-vulkan/files/icd_x86.patch @@ -0,0 +1,8 @@ +--- a/amd_icd32.json ++++ b/amd_icd32.json +@@ -4 +4 @@ +- "library_path": "/opt/amdgpu-pro/lib/i386-linux-gnu/amdvlk32.so", ++ "library_path": "/usr/lib/amdvlkpro32.so", +@@ -10 +10 @@ +- "library_path": "/opt/amdgpu-pro/lib/i386-linux-gnu/amdvlk32.so", ++ "library_path": "/usr/lib/amdvlkpro32.so", diff --git a/media-libs/amdgpu-pro-vulkan/metadata.xml b/media-libs/amdgpu-pro-vulkan/metadata.xml new file mode 100644 index 000000000000..03e31d9fc34c --- /dev/null +++ b/media-libs/amdgpu-pro-vulkan/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <name>Adel Kara Slimane</name> + <email>adel.ks@zegrapher.com</email> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> +</pkgmetadata> |