Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/amdgpu-pro-vulkan/
Date: Fri, 03 Jun 2022 11:01:29
Message-Id: 1654254079.f87f1ffe86b53979f0e6f651ee0f6890ce2848af.juippis@gentoo
1 commit: f87f1ffe86b53979f0e6f651ee0f6890ce2848af
2 Author: Adel KARA SLIMANE <adel.ks <AT> zegrapher <DOT> com>
3 AuthorDate: Sat May 7 20:37:51 2022 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 3 11:01:19 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f87f1ffe
7
8 media-libs/amdgpu-pro-vulkan: version bump to 22.10.3
9
10 Signed-off-by: Adel KARA SLIMANE <adel.ks <AT> zegrapher.com>
11 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
12
13 media-libs/amdgpu-pro-vulkan/Manifest | 2 +
14 .../amdgpu-pro-vulkan-22.10.3.1420322.ebuild | 134 +++++++++++++++++++++
15 2 files changed, 136 insertions(+)
16
17 diff --git a/media-libs/amdgpu-pro-vulkan/Manifest b/media-libs/amdgpu-pro-vulkan/Manifest
18 index 98be7e7cd098..3d89b47ae5a9 100644
19 --- a/media-libs/amdgpu-pro-vulkan/Manifest
20 +++ b/media-libs/amdgpu-pro-vulkan/Manifest
21 @@ -4,3 +4,5 @@ DIST amdgpu-pro-vulkan-21.50.2.1384496-amd64.deb 8320356 BLAKE2B 1a5997ee983bf47
22 DIST amdgpu-pro-vulkan-21.50.2.1384496-i386.deb 8124180 BLAKE2B 697899e40cedc584d8507c3c4c908c54db3676d47d720fb7b7fcab6e1f542e1d1e5efedb5b46231d4cd6974d3d03a19816d6ab4cc6d2f0279547058b5e4143e3 SHA512 8662efb65f14172f4261401115737f3c7eebbe071a9660f5146eaee9a1d4684c30174b18bea94d31686dbe679d66ab77f252192c1cda27ed57784cc9a57e5fdf
23 DIST amdgpu-pro-vulkan-22.10.0.1395274-amd64.deb 9243596 BLAKE2B b083b636cc2f4e1b62a1e89a168a718a16690e7a605daa93693da5ce03b7a03c501db6ddf59b2823016c90cac28ba5e7f9288486799408b76bb85ca86bdd9424 SHA512 6791e536700fcc3558b74978b2a717a8da4e24f4a391fbd00264d1bf505b09fe8fc9bffd3817cfc1cbf5294761dcf6ad38c4c0191d20948b9e219c1b7f393100
24 DIST amdgpu-pro-vulkan-22.10.0.1395274-i386.deb 8992376 BLAKE2B 7b3ea214e5cc6a987cc8cfefa3bce1e06426fca6e0cf125b71e90b5f3d350a8f15c635abb541d479703b5ca0f546a968076a522d526a68e1ec12a90b466721da SHA512 5e5ba42933c820be524cd21685f85c0efc3787e9f1f2bf1d985aea7fd3a386ca98ea7f9f75d32d15d3f9d66e444177cbc7e6f357fe1092bbf193bc9b0f97ee8a
25 +DIST amdgpu-pro-vulkan-22.10.3.1420322-amd64.deb 9225672 BLAKE2B ea0496d06ef793a9896e0ff588de13e0a162b88eb3412c3ceea339c469fa08da6a079941209384169fc17cc5251db133d362c5fc631310c636ee23d45338498c SHA512 4bc98bfeb206274f782dea5464d7569cb0edab7816386ec496e8ddb2dba939adffd58cf9fbc470023b28e1cfd0336515ba41d07274547e4994d7a3940a4cacf6
26 +DIST amdgpu-pro-vulkan-22.10.3.1420322-i386.deb 8985660 BLAKE2B dc55f8b9b22269efdae0be7d7dcd67afe25390dc148fbc25b321ff901d764b988aec6465d2faa75a6d6d29256de33add37d9193b290bb717d63f8915e05ad78e SHA512 0bab89dea9b475efae99320f4836ed2ce132a9e04064cd64c2391fbf1f23a2726d3d255f8fae455ede113060a0aad057d028c24548df9a471c907c5dc6422d37
27
28 diff --git a/media-libs/amdgpu-pro-vulkan/amdgpu-pro-vulkan-22.10.3.1420322.ebuild b/media-libs/amdgpu-pro-vulkan/amdgpu-pro-vulkan-22.10.3.1420322.ebuild
29 new file mode 100644
30 index 000000000000..dabe6936012a
31 --- /dev/null
32 +++ b/media-libs/amdgpu-pro-vulkan/amdgpu-pro-vulkan-22.10.3.1420322.ebuild
33 @@ -0,0 +1,134 @@
34 +# Copyright 1999-2022 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=8
38 +
39 +inherit unpacker
40 +
41 +MY_PV_HIGH=$(ver_cut 1)
42 +MY_PV_MIDDLE=$(ver_cut 2)
43 +MY_PV_LOW=$(ver_cut 3)
44 +MY_PV_REV=$(ver_cut 4)
45 +
46 +MY_PV="${MY_PV_HIGH}.${MY_PV_MIDDLE}.${MY_PV_LOW}"
47 +[[ $MY_PV_LOW = "0" ]] && MY_PV="${MY_PV_HIGH}.${MY_PV_MIDDLE}"
48 +
49 +MY_PV_FULL="${MY_PV}-${MY_PV_REV}"
50 +
51 +MY_PN="vulkan-amdgpu-pro"
52 +
53 +MY_LINK="https://repo.radeon.com/amdgpu/${MY_PV}/ubuntu/pool/proprietary/v/${MY_PN}"
54 +
55 +DESCRIPTION="AMD's closed source vulkan driver, from Radeon Software for Linux"
56 +HOMEPAGE="https://www.amd.com/en/support"
57 +SRC_URI="
58 + abi_x86_64? ( ${MY_LINK}/${MY_PN}_${MY_PV_FULL}_amd64.deb -> ${P}-amd64.deb )
59 + abi_x86_32? ( ${MY_LINK}/${MY_PN}_${MY_PV_FULL}_i386.deb -> ${P}-i386.deb )
60 +"
61 +S="${WORKDIR}"
62 +
63 +RESTRICT="bindist mirror"
64 +
65 +LICENSE="AMD-GPU-PRO-EULA"
66 +SLOT="0"
67 +KEYWORDS="-* ~amd64 ~x86"
68 +IUSE="abi_x86_32 abi_x86_64 video_cards_amdgpu"
69 +
70 +REQUIRED_USE="video_cards_amdgpu"
71 +
72 +BDEPEND="dev-util/patchelf"
73 +
74 +QA_PREBUILT="
75 + usr/lib64/amdvlkpro64.so*
76 + usr/lib/amdvlkpro32.so*
77 +"
78 +
79 +src_unpack() {
80 + if use abi_x86_64 ; then
81 + mkdir "${S}/${PN}-amd64" || die
82 + cd "${S}/${PN}-amd64" || die
83 + unpack_deb "${DISTDIR}/${P}-amd64.deb"
84 + fi
85 +
86 + if use abi_x86_32 ; then
87 + mkdir "${S}/${PN}-i386" || die
88 + cd "${S}/${PN}-i386" || die
89 + unpack_deb "${DISTDIR}/${P}-i386.deb"
90 + fi
91 +}
92 +
93 +src_prepare() {
94 + if use abi_x86_64 ; then
95 + cd "${S}/${PN}-amd64/opt/amdgpu-pro/lib/x86_64-linux-gnu/" || die
96 +
97 + # Make sure there's only one file in the folder, to prevent unexpected behavior of the next command
98 + [[ "$(ls | wc -l)" = '1' ]] || die "more than one file in opt/amdgpu-pro/lib/x86_64-linux-gnu/"
99 +
100 + # Add "pro" in the .so file's name, and remove any numeric extension "e.g. amdvlk64.so.1"
101 + mv amdvlk64.so* amdvlkpro64.so || die
102 +
103 + # same with the SONAME
104 + patchelf --set-soname amdvlkpro64.so "${PWD}"/amdvlkpro64.so || die
105 +
106 + cd "${S}/${PN}-amd64/opt/amdgpu-pro/etc/vulkan/icd.d/" || die
107 + eapply "${FILESDIR}"/icd_amd64.patch
108 + mv amd_icd64.json amd_pro_icd64.json || die
109 + fi
110 +
111 + if use abi_x86_32 ; then
112 + cd "${S}/${PN}-i386/opt/amdgpu-pro/lib/i386-linux-gnu/" || die
113 +
114 + # Make sure there's only one file in the folder, to prevent unexpected behavior of the next command
115 + [[ "$(ls | wc -l)" = '1' ]] || die "more than one file in opt/amdgpu-pro/lib/i386-linux-gnu/"
116 +
117 + # Add "pro" in the .so file's name, and remove any numeric extension "e.g. amdvlk32.so.1"
118 + mv amdvlk32.so* amdvlkpro32.so || die
119 +
120 + # same with the SONAME
121 + patchelf --set-soname amdvlkpro32.so "${PWD}"/amdvlkpro32.so || die
122 +
123 + cd "${S}/${PN}-i386/opt/amdgpu-pro/etc/vulkan/icd.d/" || die
124 + eapply "${FILESDIR}"/icd_x86.patch
125 + mv amd_icd32.json amd_pro_icd32.json || die
126 + fi
127 +
128 + default
129 +}
130 +
131 +src_install() {
132 + if use abi_x86_64 ; then
133 + # Vulkan driver
134 + insinto /usr/lib64
135 + doins "${S}"/"${PN}"-amd64/opt/amdgpu-pro/lib/x86_64-linux-gnu/amdvlkpro64.so
136 +
137 + # ICD loader
138 + insinto /usr/share/vulkan/icd.d
139 + doins "${S}"/"${PN}"-amd64/opt/amdgpu-pro/etc/vulkan/icd.d/amd_pro_icd64.json
140 + fi
141 +
142 + if use abi_x86_32 ; then
143 + # Vulkan driver
144 + insinto /usr/lib
145 + doins "${S}"/"${PN}"-i386/opt/amdgpu-pro/lib/i386-linux-gnu/amdvlkpro32.so
146 +
147 + # ICD loader
148 + insinto /usr/share/vulkan/icd.d
149 + doins "${S}"/"${PN}"-i386/opt/amdgpu-pro/etc/vulkan/icd.d/amd_pro_icd32.json
150 + fi
151 +}
152 +
153 +pkg_postinst() {
154 +
155 + if use abi_x86_32; then
156 + elog "To run a 32bit program using the amdgpu-pro vulkan driver, the environment variable"
157 + elog " VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/amd_pro_icd32.json"
158 + elog "must be set beforehand"
159 + elog
160 + fi
161 +
162 + if use abi_x86_64; then
163 + elog "To run a 64bit program using the amdgpu-pro vulkan driver, the environment variable"
164 + elog " VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/amd_pro_icd64.json"
165 + elog "must be set beforehand"
166 + fi
167 +}