Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/mesa/
Date: Wed, 29 Nov 2017 14:35:40
Message-Id: 1511966118.077c42934785e310b9361cdf9d14c32c6e2f0477.mgorny@gentoo
1 commit: 077c42934785e310b9361cdf9d14c32c6e2f0477
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Nov 29 14:33:56 2017 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Nov 29 14:35:18 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=077c4293
7
8 media-libs/mesa: Prune interim old versions
9
10 media-libs/mesa/Manifest | 10 -
11 media-libs/mesa/mesa-17.1.9.ebuild | 503 ----------------------------
12 media-libs/mesa/mesa-17.2.0.ebuild | 504 ----------------------------
13 media-libs/mesa/mesa-17.2.1.ebuild | 579 --------------------------------
14 media-libs/mesa/mesa-17.2.2.ebuild | 579 --------------------------------
15 media-libs/mesa/mesa-17.2.3.ebuild | 582 --------------------------------
16 media-libs/mesa/mesa-17.2.4.ebuild | 582 --------------------------------
17 media-libs/mesa/mesa-17.2.5.ebuild | 582 --------------------------------
18 media-libs/mesa/mesa-17.3.0_rc2.ebuild | 585 ---------------------------------
19 media-libs/mesa/mesa-17.3.0_rc3.ebuild | 585 ---------------------------------
20 media-libs/mesa/mesa-17.3.0_rc4.ebuild | 585 ---------------------------------
21 11 files changed, 5676 deletions(-)
22
23 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
24 index 494ecb05634..bd816043b0c 100644
25 --- a/media-libs/mesa/Manifest
26 +++ b/media-libs/mesa/Manifest
27 @@ -3,15 +3,5 @@ DIST mesa-13.0.6.tar.xz 9179236 SHA256 29ef104a7fc082d352b1599bd6cb1d040be424ccd
28 DIST mesa-17.0.6.tar.xz 9494872 SHA256 89ecf3bcd0f18dcca5aaa42bf36bb52a2df33be89889f94aaaad91f7a504a69d SHA512 537d28aa694c2d48811d2467e33b3adc841067d5f1cdb7e0809ba100f71869090285bbb246e57e5f0177401a539b44cc32b1ccfcb32a1855c14b011b92d32eaf WHIRLPOOL f3ee87377e87cbd23bd9009d840e6c0ae50ccbbb30cfa7be61f3023cbe9519f5b50f22c59dbcc207a106a6e357d77074fcaee63916ee091b920cbc3d511ec2ab
29 DIST mesa-17.1.10.tar.xz 9872168 SHA256 cbc0d681cc4df47d8deb5a36f45b420978128522fd665b2cd4c7096316f11bdb SHA512 728dbd41f5d3a7a1c33fc18c08a8b8eb1f6d236c5f00781209f46b144dd66a27ecd723ab1635868b7ad77de3a18ad53f1a88c932f17c0be97605a2775e3b3a9b WHIRLPOOL d33cc0b7620e01822ce6ca2708f01eccc6c7796c1ed19f3642dab733521d17d794658dbc47bcca7d71f94f99c81637a28738dc6c45c4d1ccc7e2855f07a5f961
30 DIST mesa-17.1.8.tar.xz 9902800 SHA256 75ed2eaeae26ddd536150f294386468ae2e1a7717948c41cd14b7875be5269db SHA512 d29fd999d75967683f5aa836cf0b701705f54de428ebbbac059c3e335e94552c0b455aa67fa2870464a086dc58994f2f320710a1abc265dea363241aede71c5b WHIRLPOOL 8faad2f3da8546d48ee9b5470d147de7507a0dc39787a876f6513933e958baa94571d285095fced7c34c674364ab897a896acc39374849fb22026dd05a9bd27f
31 -DIST mesa-17.1.9.tar.xz 9908296 SHA256 5f51ad94341696097d5df7b838183534478216858ac0fc8de183671a36ffea1a SHA512 359da171deaba0a1a5ce7112d49d7b48be38d24d0211264fcdcc3218f1f35be9419e5be1d08d56b6ca15654d3f93107b1706ff18a5e31d3746f7a3191b808cdf WHIRLPOOL a4b76204005ed15cee799a0e7e590d5e9f5078f65d83fccec26f00ab397c4144f70ff6eac652f13197af3bbdf4c4096c531329766297caa9875aee47bc3e4d67
32 -DIST mesa-17.2.0.tar.xz 10335284 SHA256 3123448f770eae58bc73e15480e78909defb892f10ab777e9116c9b218094943 SHA512 6ac39274fcf86a26ea5fe51aed486ba3d45b75e0d2f7cc17e1e71d4cf9a85420a832fe559a2ac7b215eda615fab99a2bd290c8388a48c52e13737e7e4ef8d4fd WHIRLPOOL 3fec3810c23aa12f49c0fe561b6dbdbd5724a3bff513b21c273d5796c85eebdd889fb405a03f7cc0fe926a8289794e1872a0d04799c31122061a268faceacf36
33 -DIST mesa-17.2.1.tar.xz 10414776 SHA256 77385d17827cff24a3bae134342234f2efe7f7f990e778109682571dbbc9ba1e SHA512 19a7d6c2e2d439b1c73199bffd4154b42017bccc138be954a893c3b70e885f07988de84dc8aa2aff36e06295e91f0181d5b95372152f6f0f80b7afe4b3846b6a WHIRLPOOL b9048aa4d512307c3f558a925afb39949ea84b7e52ca52e2ba39cf6fba38c284ef527b25fdbfa7ec22ca6c9e17a8628ce41fc8916bfaafc7f5142c3476750b6d
34 -DIST mesa-17.2.2.tar.xz 10359156 SHA256 cf522244d6a5a1ecde3fc00e7c96935253fe22f808f064cab98be6f3faa65782 SHA512 641342c68989b8d801c37e668b012d3b7c4ad43d8ca01b74f8cbb3a1ec25b7390f69fe7ebc84b29dab1c6a4ac01c882ec9fd4a6b331505629461bdbbe6aa3f7e WHIRLPOOL 74271721fb38a0c62f6f35d84ba9196e000f2fe2a32e75120288e77649a87e225464572d347fc149190b573d22c32dfee3e174d6a2578b3c649c4b72375a94ec
35 -DIST mesa-17.2.3.tar.xz 10344180 SHA256 a0b0ec8f7b24dd044d7ab30a8c7e6d3767521e245f88d4ed5dd93315dc56f837 SHA512 749a0a46b772974633e405804ace7f509afb79f47811dbbdd390333721d744f2ac64f985ff1fd6c5aa3019b700be70bc1f75f60745ed9f4c5b08a9a8f77dfc76 WHIRLPOOL 333bdb9dd15726a4a19fa7a87d2044aba6ebaea2eb83dd436f916020221a8bc46d667e8710a701c52930217292ecdfd468b654a7846357aa8881356987f394c0
36 -DIST mesa-17.2.4.tar.xz 10381984 SHA256 5ba408fecd6e1132e5490eec1a2f04466214e4c65c8b89b331be844768c2e550 SHA512 665b63aab6af3f8f263f182d85d9ad71db7a23bcbaf67d62fe53c258cb0f600266ac82e72d681ec20cf7c66b47d4076aad5c3f553519f19110ee577da2707085 WHIRLPOOL 29750c50a496cb27e0b4466bf0d1496434330a96259616dd7c368adc3d9478aa6ba1facf11ec4ff231a244f890781c12637327b1675c423786693c40f787945d
37 -DIST mesa-17.2.5.tar.xz 10386312 BLAKE2B b7391bc00b0570f7e4a4e00f5fa645c8ed6e6ccb72ba757ef56f3ba21004f1904a6a3891e7ddfd8e46797ddc747f21f726b4c70c26ac3415b4353c821ad8819f SHA512 c4b0f7f48b0b57fdf610de3d61e127774f8223e755acfde6cf2649818eec985e8f925abf8a15d530ecdb882cb8d7268fd01e5d94c8ac6934551b8a74272353c7
38 DIST mesa-17.2.6.tar.xz 10387604 BLAKE2B 43bd60f9e61bb04e3a2afe4bc6e18099a524cdec3c7948d9ccfffa5bfe50eb3e0625ba6da7bb3b32959ef4a5e3db982daf2f90d3ee555cf65084d70849b3ca12 SHA512 739645d963da2ff79fa0f2bfcc4948516c4f0a768f9d21f98eff049edc88218847afd3786003ccf7b10deec585f4f1d7f70fcc5e5f6e33186ebbb86cd8cb0202
39 -DIST mesa-17.3.0-rc2.tar.xz 10658696 SHA256 13b2c085a54836465a3b6814ad4bc2dae0a502f43405e75ced67789d5afc18cd SHA512 749cca3e0875dbff7b6fab4d646974ecbcc7659ec82ad025bc386372d6e0e050d84d5e05fb68c5099e685557d85daf55c6a5db7bd89a7323778ae7e87e01215e WHIRLPOOL 4007e6641de55145b9bf8bf7aa567c284d3a4b29ea6b83fb5ba3324abf757cf72cf1f1bc0cd3011e58b3d0c6cc6fa7f7c03b1affb7f0ba7c4a5e7ade398bf2f3
40 -DIST mesa-17.3.0-rc3.tar.xz 10664384 BLAKE2B 16644892293a197bd69126876f047411989ebecd4336a8b3883f416429ab51aa54e843cf5ca428fa73a8a6695b79458311e6070e390ce4ffae6f352caa4c7d5b SHA512 403da79ac87325f2f0962e9be406edf4d009b6f5d479c2943be5bc1a26ad201d96072461a0d041b5a59abe327829eeba0dfb44abce217074079c47811729b058
41 -DIST mesa-17.3.0-rc4.tar.xz 10662396 BLAKE2B 6b2455a7aeef476d30ddb77a1a01fa6125dfb1b703a5fbd89e7ac9b8a5681101b7b97f9c15d5f1b1c7c8418e72ad3efc0eaf307594d8d88934b1d981ec727445 SHA512 410a43852944899fbc9d7ab887510dffda3cb98330d7acd5d529cb01abafe1886b353d050c918cd63ecb1b7afb9350e5ceddf8eabf6e8fd6bd4e6f87343f68cb
42 DIST mesa-17.3.0-rc5.tar.xz 10663464 BLAKE2B 0706e3175358f43ce70707e9f18c22df60c387d1260c4dfae13a55f9278a266d9885483c6e794d913c8ad5f4b9dd3d852f309e0ef3f042b9ae62b371d9dfba84 SHA512 b53e40f39850067e97dcf9d1eb10d1f5d3a8729933057bacf3648b86ef55c43d7b2f2f5444ae8c6f1b8677c2c3fd12f7484ee08139bd388dc4cebd8dbaf28c83
43
44 diff --git a/media-libs/mesa/mesa-17.1.9.ebuild b/media-libs/mesa/mesa-17.1.9.ebuild
45 deleted file mode 100644
46 index e331fde780d..00000000000
47 --- a/media-libs/mesa/mesa-17.1.9.ebuild
48 +++ /dev/null
49 @@ -1,503 +0,0 @@
50 -# Copyright 1999-2017 Gentoo Foundation
51 -# Distributed under the terms of the GNU General Public License v2
52 -
53 -EAPI=6
54 -
55 -EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git"
56 -
57 -if [[ ${PV} = 9999 ]]; then
58 - GIT_ECLASS="git-r3"
59 - EXPERIMENTAL="true"
60 -fi
61 -
62 -PYTHON_COMPAT=( python2_7 )
63 -
64 -inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
65 -
66 -OPENGL_DIR="xorg-x11"
67 -
68 -MY_P="${P/_/-}"
69 -
70 -DESCRIPTION="OpenGL-like graphic library for Linux"
71 -HOMEPAGE="https://www.mesa3d.org/"
72 -
73 -if [[ $PV == 9999 ]]; then
74 - SRC_URI=""
75 -else
76 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
77 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
78 -fi
79 -
80 -LICENSE="MIT"
81 -SLOT="0"
82 -RESTRICT="!bindist? ( bindist )"
83 -
84 -INTEL_CARDS="i915 i965 intel"
85 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
86 -VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno imx nouveau vc4 vivante vmware"
87 -for card in ${VIDEO_CARDS}; do
88 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
89 -done
90 -
91 -IUSE="${IUSE_VIDEO_CARDS}
92 - bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
93 - +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
94 - vdpau vulkan wayland xvmc xa"
95 -
96 -REQUIRED_USE="
97 - d3d9? ( dri3 gallium )
98 - llvm? ( gallium )
99 - opencl? ( gallium llvm )
100 - openmax? ( gallium )
101 - gles1? ( egl )
102 - gles2? ( egl )
103 - vaapi? ( gallium )
104 - vdpau? ( gallium )
105 - vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
106 - video_cards_radeonsi? ( llvm ) )
107 - wayland? ( egl gbm )
108 - xa? ( gallium )
109 - video_cards_freedreno? ( gallium )
110 - video_cards_intel? ( classic )
111 - video_cards_i915? ( || ( classic gallium ) )
112 - video_cards_i965? ( classic )
113 - video_cards_imx? ( gallium )
114 - video_cards_nouveau? ( || ( classic gallium ) )
115 - video_cards_radeon? ( || ( classic gallium )
116 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
117 - video_cards_r100? ( classic )
118 - video_cards_r200? ( classic )
119 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
120 - video_cards_r600? ( gallium )
121 - video_cards_radeonsi? ( gallium llvm )
122 - video_cards_vc4? ( gallium )
123 - video_cards_vivante? ( gallium gbm )
124 - video_cards_vmware? ( gallium )
125 -"
126 -
127 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.77"
128 -# keep correct libdrm and dri2proto dep
129 -# keep blocks in rdepend for binpkg
130 -RDEPEND="
131 - !<x11-base/xorg-server-1.7
132 - !<=x11-proto/xf86driproto-2.0.3
133 - abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
134 - classic? ( app-eselect/eselect-mesa )
135 - gallium? ( app-eselect/eselect-mesa )
136 - >=app-eselect/eselect-opengl-1.3.0
137 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
138 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
139 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
140 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
141 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
142 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
143 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
144 - >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
145 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
146 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
147 - llvm? (
148 - video_cards_radeonsi? (
149 - virtual/libelf:0=[${MULTILIB_USEDEP}]
150 - vulkan? ( >=sys-devel/llvm-3.9.0:=[${MULTILIB_USEDEP}] )
151 - )
152 - video_cards_r600? (
153 - virtual/libelf:0=[${MULTILIB_USEDEP}]
154 - )
155 - video_cards_radeon? (
156 - virtual/libelf:0=[${MULTILIB_USEDEP}]
157 - )
158 - >=sys-devel/llvm-3.6.0:=[${MULTILIB_USEDEP}]
159 - )
160 - opencl? (
161 - app-eselect/eselect-opencl
162 - dev-libs/libclc
163 - virtual/libelf:0=[${MULTILIB_USEDEP}]
164 - )
165 - openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
166 - vaapi? (
167 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
168 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
169 - )
170 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
171 - wayland? ( >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}] )
172 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
173 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
174 -"
175 -for card in ${INTEL_CARDS}; do
176 - RDEPEND="${RDEPEND}
177 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
178 - "
179 -done
180 -
181 -for card in ${RADEON_CARDS}; do
182 - RDEPEND="${RDEPEND}
183 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
184 - "
185 -done
186 -RDEPEND="${RDEPEND}
187 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
188 -"
189 -
190 -# FIXME: kill the sys-devel/llvm[video_cards_radeon] compat once
191 -# LLVM < 3.9 is out of the game
192 -DEPEND="${RDEPEND}
193 - ${PYTHON_DEPS}
194 - llvm? (
195 - video_cards_radeonsi? ( || (
196 - sys-devel/llvm[llvm_targets_AMDGPU]
197 - sys-devel/llvm[video_cards_radeon]
198 - ) )
199 - )
200 - opencl? (
201 - >=sys-devel/llvm-3.6.0:=[${MULTILIB_USEDEP}]
202 - >=sys-devel/clang-3.6.0:=[${MULTILIB_USEDEP}]
203 - >=sys-devel/gcc-4.6
204 - )
205 - sys-devel/gettext
206 - virtual/pkgconfig
207 - valgrind? ( dev-util/valgrind )
208 - >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
209 - dri3? (
210 - >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
211 - >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
212 - )
213 - >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
214 - >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
215 - >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
216 - >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
217 -"
218 -[[ ${PV} == 9999 ]] && DEPEND+="
219 - sys-devel/bison
220 - sys-devel/flex
221 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
222 -"
223 -
224 -S="${WORKDIR}/${MY_P}"
225 -EGIT_CHECKOUT_DIR=${S}
226 -
227 -QA_WX_LOAD="
228 -x86? (
229 - !pic? (
230 - usr/lib*/libglapi.so.0.0.0
231 - usr/lib*/libGLESv1_CM.so.1.1.0
232 - usr/lib*/libGLESv2.so.2.0.0
233 - usr/lib*/libGL.so.1.2.0
234 - usr/lib*/libOSMesa.so.8.0.0
235 - )
236 -)"
237 -
238 -pkg_setup() {
239 - # warning message for bug 459306
240 - if use llvm && has_version sys-devel/llvm[!debug=]; then
241 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
242 - ewarn "detected! This can cause problems. For details, see bug 459306."
243 - fi
244 -
245 - if use llvm || use opencl; then
246 - llvm_pkg_setup
247 - fi
248 - python-any-r1_pkg_setup
249 -}
250 -
251 -src_prepare() {
252 - [[ ${PV} == 9999 ]] && eautoreconf
253 - eapply_user
254 -}
255 -
256 -multilib_src_configure() {
257 - local myconf
258 -
259 - if use classic; then
260 - # Configurable DRI drivers
261 - driver_enable swrast
262 -
263 - # Intel code
264 - driver_enable video_cards_i915 i915
265 - driver_enable video_cards_i965 i965
266 - if ! use video_cards_i915 && \
267 - ! use video_cards_i965; then
268 - driver_enable video_cards_intel i915 i965
269 - fi
270 -
271 - # Nouveau code
272 - driver_enable video_cards_nouveau nouveau
273 -
274 - # ATI code
275 - driver_enable video_cards_r100 radeon
276 - driver_enable video_cards_r200 r200
277 - if ! use video_cards_r100 && \
278 - ! use video_cards_r200; then
279 - driver_enable video_cards_radeon radeon r200
280 - fi
281 - fi
282 -
283 - if use egl; then
284 - myconf+=" --with-egl-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
285 - fi
286 -
287 - if use gallium; then
288 - myconf+="
289 - $(use_enable d3d9 nine)
290 - $(use_enable llvm)
291 - $(use_enable openmax omx)
292 - $(use_enable vaapi va)
293 - $(use_enable vdpau)
294 - $(use_enable xa)
295 - $(use_enable xvmc)
296 - "
297 - use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
298 -
299 - gallium_enable swrast
300 - gallium_enable video_cards_vc4 vc4
301 - gallium_enable video_cards_vivante etnaviv
302 - gallium_enable video_cards_vmware svga
303 - gallium_enable video_cards_nouveau nouveau
304 - gallium_enable video_cards_i915 i915
305 - gallium_enable video_cards_imx imx
306 - if ! use video_cards_i915 && \
307 - ! use video_cards_i965; then
308 - gallium_enable video_cards_intel i915
309 - fi
310 -
311 - gallium_enable video_cards_r300 r300
312 - gallium_enable video_cards_r600 r600
313 - gallium_enable video_cards_radeonsi radeonsi
314 - if ! use video_cards_r300 && \
315 - ! use video_cards_r600; then
316 - gallium_enable video_cards_radeon r300 r600
317 - fi
318 -
319 - gallium_enable video_cards_freedreno freedreno
320 - # opencl stuff
321 - if use opencl; then
322 - myconf+="
323 - $(use_enable opencl)
324 - --with-clang-libdir="${EPREFIX}/usr/lib"
325 - "
326 - fi
327 - fi
328 -
329 - if use vulkan; then
330 - vulkan_enable video_cards_i965 intel
331 - vulkan_enable video_cards_radeonsi radeon
332 - fi
333 -
334 - # x86 hardened pax_kernel needs glx-rts, bug 240956
335 - if [[ ${ABI} == x86 ]]; then
336 - myconf+=" $(use_enable pax_kernel glx-read-only-text)"
337 - fi
338 -
339 - # on abi_x86_32 hardened we need to have asm disable
340 - if [[ ${ABI} == x86* ]] && use pic; then
341 - myconf+=" --disable-asm"
342 - fi
343 -
344 - if use gallium; then
345 - myconf+=" $(use_enable osmesa gallium-osmesa)"
346 - else
347 - myconf+=" $(use_enable osmesa)"
348 - fi
349 -
350 - # build fails with BSD indent, bug #428112
351 - use userland_GNU || export INDENT=cat
352 -
353 - ECONF_SOURCE="${S}" \
354 - econf \
355 - --enable-dri \
356 - --enable-glx \
357 - --enable-shared-glapi \
358 - $(use_enable !bindist texture-float) \
359 - $(use_enable d3d9 nine) \
360 - $(use_enable debug) \
361 - $(use_enable dri3) \
362 - $(use_enable egl) \
363 - $(use_enable gbm) \
364 - $(use_enable gles1) \
365 - $(use_enable gles2) \
366 - $(use_enable nptl glx-tls) \
367 - $(use_enable unwind libunwind) \
368 - --enable-valgrind=$(usex valgrind auto no) \
369 - --enable-llvm-shared-libs \
370 - --with-dri-drivers=${DRI_DRIVERS} \
371 - --with-gallium-drivers=${GALLIUM_DRIVERS} \
372 - --with-vulkan-drivers=${VULKAN_DRIVERS} \
373 - PYTHON2="${PYTHON}" \
374 - ${myconf}
375 -}
376 -
377 -multilib_src_install() {
378 - emake install DESTDIR="${D}"
379 -
380 - if use classic || use gallium; then
381 - ebegin "Moving DRI/Gallium drivers for dynamic switching"
382 - local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
383 - keepdir /usr/$(get_libdir)/dri
384 - dodir /usr/$(get_libdir)/mesa
385 - for x in ${gallium_drivers[@]}; do
386 - if [ -f "$(get_libdir)/gallium/${x}" ]; then
387 - mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
388 - || die "Failed to move ${x}"
389 - fi
390 - done
391 - if use classic; then
392 - emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
393 - fi
394 - for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
395 - if [ -f ${x} -o -L ${x} ]; then
396 - mv -f "${x}" "${x/dri/mesa}" \
397 - || die "Failed to move ${x}"
398 - fi
399 - done
400 - pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
401 - ln -s ../mesa/*.so . || die "Creating symlink failed"
402 - # remove symlinks to drivers known to eselect
403 - for x in ${gallium_drivers[@]}; do
404 - if [ -f ${x} -o -L ${x} ]; then
405 - rm "${x}" || die "Failed to remove ${x}"
406 - fi
407 - done
408 - popd
409 - eend $?
410 - fi
411 - if use opencl; then
412 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
413 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
414 - dodir ${cl_dir}/{lib,include}
415 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
416 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
417 - "${ED}"${cl_dir}
418 - fi
419 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
420 - mv -f "${ED}"/usr/include/CL \
421 - "${ED}"${cl_dir}/include
422 - fi
423 - eend $?
424 - fi
425 -
426 - if use openmax; then
427 - echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
428 - doenvd "${T}"/99mesaxdgomx
429 - keepdir /usr/share/mesa/xdg
430 - fi
431 -}
432 -
433 -multilib_src_install_all() {
434 - find "${ED}" -name '*.la' -delete
435 - einstalldocs
436 -
437 - if use !bindist; then
438 - dodoc docs/patents.txt
439 - fi
440 -
441 - # Install config file for eselect mesa
442 - insinto /usr/share/mesa
443 - newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
444 -}
445 -
446 -multilib_src_test() {
447 - if use llvm; then
448 - local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
449 - pushd src/gallium/drivers/llvmpipe >/dev/null || die
450 - emake ${llvm_tests}
451 - pax-mark m ${llvm_tests}
452 - popd >/dev/null || die
453 - fi
454 - emake check
455 -}
456 -
457 -pkg_postinst() {
458 - # Switch to the xorg implementation.
459 - echo
460 - eselect opengl set --use-old ${OPENGL_DIR}
461 -
462 - # Select classic/gallium drivers
463 - if use classic || use gallium; then
464 - eselect mesa set --auto
465 - fi
466 -
467 - # Switch to mesa opencl
468 - if use opencl; then
469 - eselect opencl set --use-old ${PN}
470 - fi
471 -
472 - # run omxregister-bellagio to make the OpenMAX drivers known system-wide
473 - if use openmax; then
474 - ebegin "Registering OpenMAX drivers"
475 - BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
476 - OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
477 - omxregister-bellagio
478 - eend $?
479 - fi
480 -
481 - # warn about patent encumbered texture-float
482 - if use !bindist; then
483 - elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
484 - elog "enabled. Please see patents.txt for an explanation."
485 - fi
486 -
487 - if ! has_version media-libs/libtxc_dxtn; then
488 - elog "Note that in order to have full S3TC support, it is necessary to install"
489 - elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
490 - elog "textures in some apps, and some others even require this to run."
491 - fi
492 -}
493 -
494 -pkg_prerm() {
495 - if use openmax; then
496 - rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
497 - fi
498 -}
499 -
500 -# $1 - VIDEO_CARDS flag
501 -# other args - names of DRI drivers to enable
502 -# TODO: avoid code duplication for a more elegant implementation
503 -driver_enable() {
504 - case $# in
505 - # for enabling unconditionally
506 - 1)
507 - DRI_DRIVERS+=",$1"
508 - ;;
509 - *)
510 - if use $1; then
511 - shift
512 - for i in $@; do
513 - DRI_DRIVERS+=",${i}"
514 - done
515 - fi
516 - ;;
517 - esac
518 -}
519 -
520 -gallium_enable() {
521 - case $# in
522 - # for enabling unconditionally
523 - 1)
524 - GALLIUM_DRIVERS+=",$1"
525 - ;;
526 - *)
527 - if use $1; then
528 - shift
529 - for i in $@; do
530 - GALLIUM_DRIVERS+=",${i}"
531 - done
532 - fi
533 - ;;
534 - esac
535 -}
536 -
537 -vulkan_enable() {
538 - case $# in
539 - # for enabling unconditionally
540 - 1)
541 - VULKAN_DRIVERS+=",$1"
542 - ;;
543 - *)
544 - if use $1; then
545 - shift
546 - for i in $@; do
547 - VULKAN_DRIVERS+=",${i}"
548 - done
549 - fi
550 - ;;
551 - esac
552 -}
553
554 diff --git a/media-libs/mesa/mesa-17.2.0.ebuild b/media-libs/mesa/mesa-17.2.0.ebuild
555 deleted file mode 100644
556 index f54779f9572..00000000000
557 --- a/media-libs/mesa/mesa-17.2.0.ebuild
558 +++ /dev/null
559 @@ -1,504 +0,0 @@
560 -# Copyright 1999-2017 Gentoo Foundation
561 -# Distributed under the terms of the GNU General Public License v2
562 -
563 -EAPI=6
564 -
565 -EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git"
566 -
567 -if [[ ${PV} = 9999 ]]; then
568 - GIT_ECLASS="git-r3"
569 - EXPERIMENTAL="true"
570 -fi
571 -
572 -PYTHON_COMPAT=( python2_7 )
573 -
574 -inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
575 -
576 -OPENGL_DIR="xorg-x11"
577 -
578 -MY_P="${P/_/-}"
579 -
580 -DESCRIPTION="OpenGL-like graphic library for Linux"
581 -HOMEPAGE="https://www.mesa3d.org/"
582 -
583 -if [[ $PV == 9999 ]]; then
584 - SRC_URI=""
585 -else
586 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
587 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
588 -fi
589 -
590 -LICENSE="MIT"
591 -SLOT="0"
592 -RESTRICT="!bindist? ( bindist )"
593 -
594 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
595 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 vivante vmware"
596 -for card in ${VIDEO_CARDS}; do
597 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
598 -done
599 -
600 -IUSE="${IUSE_VIDEO_CARDS}
601 - bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
602 - +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
603 - vdpau vulkan wayland xvmc xa"
604 -
605 -REQUIRED_USE="
606 - d3d9? ( dri3 gallium )
607 - llvm? ( gallium )
608 - opencl? ( gallium llvm )
609 - openmax? ( gallium )
610 - gles1? ( egl )
611 - gles2? ( egl )
612 - vaapi? ( gallium )
613 - vdpau? ( gallium )
614 - vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
615 - video_cards_radeonsi? ( llvm ) )
616 - wayland? ( egl gbm )
617 - xa? ( gallium )
618 - video_cards_freedreno? ( gallium )
619 - video_cards_intel? ( classic )
620 - video_cards_i915? ( || ( classic gallium ) )
621 - video_cards_i965? ( classic )
622 - video_cards_imx? ( gallium )
623 - video_cards_nouveau? ( || ( classic gallium ) )
624 - video_cards_radeon? ( || ( classic gallium )
625 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
626 - video_cards_r100? ( classic )
627 - video_cards_r200? ( classic )
628 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
629 - video_cards_r600? ( gallium )
630 - video_cards_radeonsi? ( gallium llvm )
631 - video_cards_vc4? ( gallium )
632 - video_cards_vivante? ( gallium gbm )
633 - video_cards_vmware? ( gallium )
634 -"
635 -
636 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.82"
637 -# keep correct libdrm and dri2proto dep
638 -# keep blocks in rdepend for binpkg
639 -RDEPEND="
640 - !<x11-base/xorg-server-1.7
641 - !<=x11-proto/xf86driproto-2.0.3
642 - abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
643 - classic? ( app-eselect/eselect-mesa )
644 - gallium? ( app-eselect/eselect-mesa )
645 - >=app-eselect/eselect-opengl-1.3.0
646 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
647 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
648 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
649 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
650 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
651 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
652 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
653 - >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
654 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
655 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
656 - llvm? (
657 - video_cards_radeonsi? (
658 - virtual/libelf:0=[${MULTILIB_USEDEP}]
659 - vulkan? ( >=sys-devel/llvm-3.9.0:=[${MULTILIB_USEDEP}] )
660 - )
661 - video_cards_r600? (
662 - virtual/libelf:0=[${MULTILIB_USEDEP}]
663 - )
664 - video_cards_radeon? (
665 - virtual/libelf:0=[${MULTILIB_USEDEP}]
666 - )
667 - >=sys-devel/llvm-3.6.0:=[${MULTILIB_USEDEP}]
668 - )
669 - opencl? (
670 - app-eselect/eselect-opencl
671 - dev-libs/libclc
672 - virtual/libelf:0=[${MULTILIB_USEDEP}]
673 - )
674 - openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
675 - vaapi? (
676 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
677 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
678 - )
679 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
680 - wayland? (
681 - >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}]
682 - >=dev-libs/wayland-protocols-1.8
683 - )
684 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
685 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
686 -
687 - video_cards_intel? (
688 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
689 - )
690 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
691 -"
692 -for card in ${RADEON_CARDS}; do
693 - RDEPEND="${RDEPEND}
694 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
695 - "
696 -done
697 -RDEPEND="${RDEPEND}
698 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
699 -"
700 -
701 -# FIXME: kill the sys-devel/llvm[video_cards_radeon] compat once
702 -# LLVM < 3.9 is out of the game
703 -DEPEND="${RDEPEND}
704 - ${PYTHON_DEPS}
705 - llvm? (
706 - video_cards_radeonsi? ( || (
707 - sys-devel/llvm[llvm_targets_AMDGPU]
708 - sys-devel/llvm[video_cards_radeon]
709 - ) )
710 - )
711 - opencl? (
712 - >=sys-devel/llvm-3.6.0:=[${MULTILIB_USEDEP}]
713 - >=sys-devel/clang-3.6.0:=[${MULTILIB_USEDEP}]
714 - >=sys-devel/gcc-4.6
715 - )
716 - sys-devel/gettext
717 - virtual/pkgconfig
718 - valgrind? ( dev-util/valgrind )
719 - >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
720 - dri3? (
721 - >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
722 - >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
723 - )
724 - >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
725 - >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
726 - >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
727 - >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
728 -"
729 -[[ ${PV} == 9999 ]] && DEPEND+="
730 - sys-devel/bison
731 - sys-devel/flex
732 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
733 -"
734 -
735 -S="${WORKDIR}/${MY_P}"
736 -EGIT_CHECKOUT_DIR=${S}
737 -
738 -QA_WX_LOAD="
739 -x86? (
740 - !pic? (
741 - usr/lib*/libglapi.so.0.0.0
742 - usr/lib*/libGLESv1_CM.so.1.1.0
743 - usr/lib*/libGLESv2.so.2.0.0
744 - usr/lib*/libGL.so.1.2.0
745 - usr/lib*/libOSMesa.so.8.0.0
746 - )
747 -)"
748 -
749 -pkg_setup() {
750 - # warning message for bug 459306
751 - if use llvm && has_version sys-devel/llvm[!debug=]; then
752 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
753 - ewarn "detected! This can cause problems. For details, see bug 459306."
754 - fi
755 -
756 - if use llvm || use opencl; then
757 - llvm_pkg_setup
758 - fi
759 - python-any-r1_pkg_setup
760 -}
761 -
762 -src_prepare() {
763 - [[ ${PV} == 9999 ]] && eautoreconf
764 - eapply_user
765 -}
766 -
767 -multilib_src_configure() {
768 - local myconf
769 -
770 - if use classic; then
771 - # Configurable DRI drivers
772 - driver_enable swrast
773 -
774 - # Intel code
775 - driver_enable video_cards_i915 i915
776 - driver_enable video_cards_i965 i965
777 - if ! use video_cards_i915 && \
778 - ! use video_cards_i965; then
779 - driver_enable video_cards_intel i915 i965
780 - fi
781 -
782 - # Nouveau code
783 - driver_enable video_cards_nouveau nouveau
784 -
785 - # ATI code
786 - driver_enable video_cards_r100 radeon
787 - driver_enable video_cards_r200 r200
788 - if ! use video_cards_r100 && \
789 - ! use video_cards_r200; then
790 - driver_enable video_cards_radeon radeon r200
791 - fi
792 - fi
793 -
794 - if use egl; then
795 - myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
796 - fi
797 -
798 - if use gallium; then
799 - myconf+="
800 - $(use_enable d3d9 nine)
801 - $(use_enable llvm)
802 - $(use_enable openmax omx)
803 - $(use_enable vaapi va)
804 - $(use_enable vdpau)
805 - $(use_enable xa)
806 - $(use_enable xvmc)
807 - "
808 - use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
809 -
810 - gallium_enable swrast
811 - gallium_enable video_cards_vc4 vc4
812 - gallium_enable video_cards_vivante etnaviv
813 - gallium_enable video_cards_vmware svga
814 - gallium_enable video_cards_nouveau nouveau
815 - gallium_enable video_cards_i915 i915
816 - gallium_enable video_cards_imx imx
817 - if ! use video_cards_i915 && \
818 - ! use video_cards_i965; then
819 - gallium_enable video_cards_intel i915
820 - fi
821 -
822 - gallium_enable video_cards_r300 r300
823 - gallium_enable video_cards_r600 r600
824 - gallium_enable video_cards_radeonsi radeonsi
825 - if ! use video_cards_r300 && \
826 - ! use video_cards_r600; then
827 - gallium_enable video_cards_radeon r300 r600
828 - fi
829 -
830 - gallium_enable video_cards_freedreno freedreno
831 - # opencl stuff
832 - if use opencl; then
833 - myconf+="
834 - $(use_enable opencl)
835 - --with-clang-libdir="${EPREFIX}/usr/lib"
836 - "
837 - fi
838 - fi
839 -
840 - if use vulkan; then
841 - vulkan_enable video_cards_i965 intel
842 - vulkan_enable video_cards_radeonsi radeon
843 - fi
844 -
845 - # x86 hardened pax_kernel needs glx-rts, bug 240956
846 - if [[ ${ABI} == x86 ]]; then
847 - myconf+=" $(use_enable pax_kernel glx-read-only-text)"
848 - fi
849 -
850 - # on abi_x86_32 hardened we need to have asm disable
851 - if [[ ${ABI} == x86* ]] && use pic; then
852 - myconf+=" --disable-asm"
853 - fi
854 -
855 - if use gallium; then
856 - myconf+=" $(use_enable osmesa gallium-osmesa)"
857 - else
858 - myconf+=" $(use_enable osmesa)"
859 - fi
860 -
861 - # build fails with BSD indent, bug #428112
862 - use userland_GNU || export INDENT=cat
863 -
864 - ECONF_SOURCE="${S}" \
865 - econf \
866 - --enable-dri \
867 - --enable-glx \
868 - --enable-shared-glapi \
869 - $(use_enable !bindist texture-float) \
870 - $(use_enable d3d9 nine) \
871 - $(use_enable debug) \
872 - $(use_enable dri3) \
873 - $(use_enable egl) \
874 - $(use_enable gbm) \
875 - $(use_enable gles1) \
876 - $(use_enable gles2) \
877 - $(use_enable nptl glx-tls) \
878 - $(use_enable unwind libunwind) \
879 - --enable-valgrind=$(usex valgrind auto no) \
880 - --enable-llvm-shared-libs \
881 - --with-dri-drivers=${DRI_DRIVERS} \
882 - --with-gallium-drivers=${GALLIUM_DRIVERS} \
883 - --with-vulkan-drivers=${VULKAN_DRIVERS} \
884 - PYTHON2="${PYTHON}" \
885 - ${myconf}
886 -}
887 -
888 -multilib_src_install() {
889 - emake install DESTDIR="${D}"
890 -
891 - if use classic || use gallium; then
892 - ebegin "Moving DRI/Gallium drivers for dynamic switching"
893 - local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
894 - keepdir /usr/$(get_libdir)/dri
895 - dodir /usr/$(get_libdir)/mesa
896 - for x in ${gallium_drivers[@]}; do
897 - if [ -f "$(get_libdir)/gallium/${x}" ]; then
898 - mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
899 - || die "Failed to move ${x}"
900 - fi
901 - done
902 - if use classic; then
903 - emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
904 - fi
905 - for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
906 - if [ -f ${x} -o -L ${x} ]; then
907 - mv -f "${x}" "${x/dri/mesa}" \
908 - || die "Failed to move ${x}"
909 - fi
910 - done
911 - pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
912 - ln -s ../mesa/*.so . || die "Creating symlink failed"
913 - # remove symlinks to drivers known to eselect
914 - for x in ${gallium_drivers[@]}; do
915 - if [ -f ${x} -o -L ${x} ]; then
916 - rm "${x}" || die "Failed to remove ${x}"
917 - fi
918 - done
919 - popd
920 - eend $?
921 - fi
922 - if use opencl; then
923 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
924 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
925 - dodir ${cl_dir}/{lib,include}
926 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
927 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
928 - "${ED}"${cl_dir}
929 - fi
930 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
931 - mv -f "${ED}"/usr/include/CL \
932 - "${ED}"${cl_dir}/include
933 - fi
934 - eend $?
935 - fi
936 -
937 - if use openmax; then
938 - echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
939 - doenvd "${T}"/99mesaxdgomx
940 - keepdir /usr/share/mesa/xdg
941 - fi
942 -}
943 -
944 -multilib_src_install_all() {
945 - find "${ED}" -name '*.la' -delete
946 - einstalldocs
947 -
948 - if use !bindist; then
949 - dodoc docs/patents.txt
950 - fi
951 -
952 - # Install config file for eselect mesa
953 - insinto /usr/share/mesa
954 - newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
955 -}
956 -
957 -multilib_src_test() {
958 - if use llvm; then
959 - local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
960 - pushd src/gallium/drivers/llvmpipe >/dev/null || die
961 - emake ${llvm_tests}
962 - pax-mark m ${llvm_tests}
963 - popd >/dev/null || die
964 - fi
965 - emake check
966 -}
967 -
968 -pkg_postinst() {
969 - # Switch to the xorg implementation.
970 - echo
971 - eselect opengl set --use-old ${OPENGL_DIR}
972 -
973 - # Select classic/gallium drivers
974 - if use classic || use gallium; then
975 - eselect mesa set --auto
976 - fi
977 -
978 - # Switch to mesa opencl
979 - if use opencl; then
980 - eselect opencl set --use-old ${PN}
981 - fi
982 -
983 - # run omxregister-bellagio to make the OpenMAX drivers known system-wide
984 - if use openmax; then
985 - ebegin "Registering OpenMAX drivers"
986 - BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
987 - OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
988 - omxregister-bellagio
989 - eend $?
990 - fi
991 -
992 - # warn about patent encumbered texture-float
993 - if use !bindist; then
994 - elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
995 - elog "enabled. Please see patents.txt for an explanation."
996 - fi
997 -
998 - if ! has_version media-libs/libtxc_dxtn; then
999 - elog "Note that in order to have full S3TC support, it is necessary to install"
1000 - elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
1001 - elog "textures in some apps, and some others even require this to run."
1002 - fi
1003 -}
1004 -
1005 -pkg_prerm() {
1006 - if use openmax; then
1007 - rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
1008 - fi
1009 -}
1010 -
1011 -# $1 - VIDEO_CARDS flag
1012 -# other args - names of DRI drivers to enable
1013 -# TODO: avoid code duplication for a more elegant implementation
1014 -driver_enable() {
1015 - case $# in
1016 - # for enabling unconditionally
1017 - 1)
1018 - DRI_DRIVERS+=",$1"
1019 - ;;
1020 - *)
1021 - if use $1; then
1022 - shift
1023 - for i in $@; do
1024 - DRI_DRIVERS+=",${i}"
1025 - done
1026 - fi
1027 - ;;
1028 - esac
1029 -}
1030 -
1031 -gallium_enable() {
1032 - case $# in
1033 - # for enabling unconditionally
1034 - 1)
1035 - GALLIUM_DRIVERS+=",$1"
1036 - ;;
1037 - *)
1038 - if use $1; then
1039 - shift
1040 - for i in $@; do
1041 - GALLIUM_DRIVERS+=",${i}"
1042 - done
1043 - fi
1044 - ;;
1045 - esac
1046 -}
1047 -
1048 -vulkan_enable() {
1049 - case $# in
1050 - # for enabling unconditionally
1051 - 1)
1052 - VULKAN_DRIVERS+=",$1"
1053 - ;;
1054 - *)
1055 - if use $1; then
1056 - shift
1057 - for i in $@; do
1058 - VULKAN_DRIVERS+=",${i}"
1059 - done
1060 - fi
1061 - ;;
1062 - esac
1063 -}
1064
1065 diff --git a/media-libs/mesa/mesa-17.2.1.ebuild b/media-libs/mesa/mesa-17.2.1.ebuild
1066 deleted file mode 100644
1067 index 5183b093938..00000000000
1068 --- a/media-libs/mesa/mesa-17.2.1.ebuild
1069 +++ /dev/null
1070 @@ -1,579 +0,0 @@
1071 -# Copyright 1999-2017 Gentoo Foundation
1072 -# Distributed under the terms of the GNU General Public License v2
1073 -
1074 -EAPI=6
1075 -
1076 -EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git"
1077 -
1078 -if [[ ${PV} = 9999 ]]; then
1079 - GIT_ECLASS="git-r3"
1080 - EXPERIMENTAL="true"
1081 -fi
1082 -
1083 -PYTHON_COMPAT=( python2_7 )
1084 -
1085 -inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
1086 -
1087 -OPENGL_DIR="xorg-x11"
1088 -
1089 -MY_P="${P/_/-}"
1090 -
1091 -DESCRIPTION="OpenGL-like graphic library for Linux"
1092 -HOMEPAGE="https://www.mesa3d.org/"
1093 -
1094 -if [[ $PV == 9999 ]]; then
1095 - SRC_URI=""
1096 -else
1097 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
1098 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
1099 -fi
1100 -
1101 -LICENSE="MIT"
1102 -SLOT="0"
1103 -RESTRICT="!bindist? ( bindist )"
1104 -
1105 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
1106 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 vivante vmware"
1107 -for card in ${VIDEO_CARDS}; do
1108 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
1109 -done
1110 -
1111 -IUSE="${IUSE_VIDEO_CARDS}
1112 - bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
1113 - +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
1114 - vdpau vulkan wayland xvmc xa"
1115 -
1116 -REQUIRED_USE="
1117 - d3d9? ( dri3 gallium )
1118 - llvm? ( gallium )
1119 - opencl? ( gallium llvm )
1120 - openmax? ( gallium )
1121 - gles1? ( egl )
1122 - gles2? ( egl )
1123 - vaapi? ( gallium )
1124 - vdpau? ( gallium )
1125 - vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
1126 - video_cards_radeonsi? ( llvm ) )
1127 - wayland? ( egl gbm )
1128 - xa? ( gallium )
1129 - video_cards_freedreno? ( gallium )
1130 - video_cards_intel? ( classic )
1131 - video_cards_i915? ( || ( classic gallium ) )
1132 - video_cards_i965? ( classic )
1133 - video_cards_imx? ( gallium )
1134 - video_cards_nouveau? ( || ( classic gallium ) )
1135 - video_cards_radeon? ( || ( classic gallium )
1136 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
1137 - video_cards_r100? ( classic )
1138 - video_cards_r200? ( classic )
1139 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
1140 - video_cards_r600? ( gallium )
1141 - video_cards_radeonsi? ( gallium llvm )
1142 - video_cards_vc4? ( gallium )
1143 - video_cards_vivante? ( gallium gbm )
1144 - video_cards_vmware? ( gallium )
1145 -"
1146 -
1147 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.82"
1148 -# keep correct libdrm and dri2proto dep
1149 -# keep blocks in rdepend for binpkg
1150 -RDEPEND="
1151 - !<x11-base/xorg-server-1.7
1152 - !<=x11-proto/xf86driproto-2.0.3
1153 - abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
1154 - classic? ( app-eselect/eselect-mesa )
1155 - gallium? ( app-eselect/eselect-mesa )
1156 - >=app-eselect/eselect-opengl-1.3.0
1157 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
1158 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
1159 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
1160 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
1161 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
1162 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
1163 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
1164 - >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
1165 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
1166 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
1167 - llvm? (
1168 - video_cards_radeonsi? (
1169 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1170 - )
1171 - video_cards_r600? (
1172 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1173 - )
1174 - video_cards_radeon? (
1175 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1176 - )
1177 - )
1178 - opencl? (
1179 - app-eselect/eselect-opencl
1180 - dev-libs/libclc
1181 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1182 - )
1183 - openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
1184 - vaapi? (
1185 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
1186 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
1187 - )
1188 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
1189 - wayland? (
1190 - >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}]
1191 - >=dev-libs/wayland-protocols-1.8
1192 - )
1193 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
1194 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
1195 -
1196 - video_cards_intel? (
1197 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1198 - )
1199 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1200 -"
1201 -for card in ${RADEON_CARDS}; do
1202 - RDEPEND="${RDEPEND}
1203 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
1204 - "
1205 -done
1206 -RDEPEND="${RDEPEND}
1207 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
1208 -"
1209 -
1210 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
1211 -# we need to *really* make sure we're not pulling one than more slot
1212 -# simultaneously.
1213 -#
1214 -# How to use it:
1215 -# 1. List all the working slots (with min versions) in ||, newest first.
1216 -# 2. Update the := to specify *max* version, e.g. < 7.
1217 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
1218 -LLVM_MAX_SLOT="5"
1219 -LLVM_DEPSTR="
1220 - || (
1221 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
1222 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
1223 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
1224 - )
1225 - sys-devel/llvm:=[${MULTILIB_USEDEP}]
1226 -"
1227 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1228 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
1229 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1230 -RDEPEND="${RDEPEND}
1231 - llvm? (
1232 - opencl? (
1233 - video_cards_r600? (
1234 - ${CLANG_DEPSTR_AMDGPU}
1235 - )
1236 - !video_cards_r600? (
1237 - video_cards_radeonsi? (
1238 - ${CLANG_DEPSTR_AMDGPU}
1239 - )
1240 - )
1241 - !video_cards_r600? (
1242 - !video_cards_radeonsi? (
1243 - video_cards_radeon? (
1244 - ${CLANG_DEPSTR_AMDGPU}
1245 - )
1246 - )
1247 - )
1248 - !video_cards_r600? (
1249 - !video_cards_radeon? (
1250 - !video_cards_radeonsi? (
1251 - ${CLANG_DEPSTR}
1252 - )
1253 - )
1254 - )
1255 - )
1256 - !opencl? (
1257 - video_cards_r600? (
1258 - ${LLVM_DEPSTR_AMDGPU}
1259 - )
1260 - !video_cards_r600? (
1261 - video_cards_radeonsi? (
1262 - ${LLVM_DEPSTR_AMDGPU}
1263 - )
1264 - )
1265 - !video_cards_r600? (
1266 - !video_cards_radeonsi? (
1267 - video_cards_radeon? (
1268 - ${LLVM_DEPSTR_AMDGPU}
1269 - )
1270 - )
1271 - )
1272 - !video_cards_r600? (
1273 - !video_cards_radeon? (
1274 - !video_cards_radeonsi? (
1275 - ${LLVM_DEPSTR}
1276 - )
1277 - )
1278 - )
1279 - )
1280 - )
1281 -"
1282 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
1283 -
1284 -DEPEND="${RDEPEND}
1285 - ${PYTHON_DEPS}
1286 - opencl? (
1287 - >=sys-devel/gcc-4.6
1288 - )
1289 - sys-devel/gettext
1290 - virtual/pkgconfig
1291 - valgrind? ( dev-util/valgrind )
1292 - >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
1293 - dri3? (
1294 - >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
1295 - >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
1296 - )
1297 - >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
1298 - >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
1299 - >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
1300 - >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
1301 -"
1302 -[[ ${PV} == 9999 ]] && DEPEND+="
1303 - sys-devel/bison
1304 - sys-devel/flex
1305 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
1306 -"
1307 -
1308 -S="${WORKDIR}/${MY_P}"
1309 -EGIT_CHECKOUT_DIR=${S}
1310 -
1311 -QA_WX_LOAD="
1312 -x86? (
1313 - !pic? (
1314 - usr/lib*/libglapi.so.0.0.0
1315 - usr/lib*/libGLESv1_CM.so.1.1.0
1316 - usr/lib*/libGLESv2.so.2.0.0
1317 - usr/lib*/libGL.so.1.2.0
1318 - usr/lib*/libOSMesa.so.8.0.0
1319 - )
1320 -)"
1321 -
1322 -llvm_check_deps() {
1323 - local flags=${MULTILIB_USEDEP}
1324 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
1325 - then
1326 - flags+=",llvm_targets_AMDGPU(-)"
1327 - fi
1328 -
1329 - if use opencl; then
1330 - has_version "sys-devel/clang[${flags}]" || return 1
1331 - fi
1332 - has_version "sys-devel/llvm[${flags}]"
1333 -}
1334 -
1335 -pkg_setup() {
1336 - # warning message for bug 459306
1337 - if use llvm && has_version sys-devel/llvm[!debug=]; then
1338 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
1339 - ewarn "detected! This can cause problems. For details, see bug 459306."
1340 - fi
1341 -
1342 - if use llvm; then
1343 - llvm_pkg_setup
1344 - fi
1345 - python-any-r1_pkg_setup
1346 -}
1347 -
1348 -src_prepare() {
1349 - [[ ${PV} == 9999 ]] && eautoreconf
1350 - eapply_user
1351 -}
1352 -
1353 -multilib_src_configure() {
1354 - local myconf
1355 -
1356 - if use classic; then
1357 - # Configurable DRI drivers
1358 - driver_enable swrast
1359 -
1360 - # Intel code
1361 - driver_enable video_cards_i915 i915
1362 - driver_enable video_cards_i965 i965
1363 - if ! use video_cards_i915 && \
1364 - ! use video_cards_i965; then
1365 - driver_enable video_cards_intel i915 i965
1366 - fi
1367 -
1368 - # Nouveau code
1369 - driver_enable video_cards_nouveau nouveau
1370 -
1371 - # ATI code
1372 - driver_enable video_cards_r100 radeon
1373 - driver_enable video_cards_r200 r200
1374 - if ! use video_cards_r100 && \
1375 - ! use video_cards_r200; then
1376 - driver_enable video_cards_radeon radeon r200
1377 - fi
1378 - fi
1379 -
1380 - if use egl; then
1381 - myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
1382 - fi
1383 -
1384 - if use gallium; then
1385 - myconf+="
1386 - $(use_enable d3d9 nine)
1387 - $(use_enable llvm)
1388 - $(use_enable openmax omx)
1389 - $(use_enable vaapi va)
1390 - $(use_enable vdpau)
1391 - $(use_enable xa)
1392 - $(use_enable xvmc)
1393 - "
1394 - use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
1395 -
1396 - gallium_enable swrast
1397 - gallium_enable video_cards_vc4 vc4
1398 - gallium_enable video_cards_vivante etnaviv
1399 - gallium_enable video_cards_vmware svga
1400 - gallium_enable video_cards_nouveau nouveau
1401 - gallium_enable video_cards_i915 i915
1402 - gallium_enable video_cards_imx imx
1403 - if ! use video_cards_i915 && \
1404 - ! use video_cards_i965; then
1405 - gallium_enable video_cards_intel i915
1406 - fi
1407 -
1408 - gallium_enable video_cards_r300 r300
1409 - gallium_enable video_cards_r600 r600
1410 - gallium_enable video_cards_radeonsi radeonsi
1411 - if ! use video_cards_r300 && \
1412 - ! use video_cards_r600; then
1413 - gallium_enable video_cards_radeon r300 r600
1414 - fi
1415 -
1416 - gallium_enable video_cards_freedreno freedreno
1417 - # opencl stuff
1418 - if use opencl; then
1419 - myconf+="
1420 - $(use_enable opencl)
1421 - --with-clang-libdir="${EPREFIX}/usr/lib"
1422 - "
1423 - fi
1424 - fi
1425 -
1426 - if use vulkan; then
1427 - vulkan_enable video_cards_i965 intel
1428 - vulkan_enable video_cards_radeonsi radeon
1429 - fi
1430 -
1431 - # x86 hardened pax_kernel needs glx-rts, bug 240956
1432 - if [[ ${ABI} == x86 ]]; then
1433 - myconf+=" $(use_enable pax_kernel glx-read-only-text)"
1434 - fi
1435 -
1436 - # on abi_x86_32 hardened we need to have asm disable
1437 - if [[ ${ABI} == x86* ]] && use pic; then
1438 - myconf+=" --disable-asm"
1439 - fi
1440 -
1441 - if use gallium; then
1442 - myconf+=" $(use_enable osmesa gallium-osmesa)"
1443 - else
1444 - myconf+=" $(use_enable osmesa)"
1445 - fi
1446 -
1447 - # build fails with BSD indent, bug #428112
1448 - use userland_GNU || export INDENT=cat
1449 -
1450 - ECONF_SOURCE="${S}" \
1451 - econf \
1452 - --enable-dri \
1453 - --enable-glx \
1454 - --enable-shared-glapi \
1455 - $(use_enable !bindist texture-float) \
1456 - $(use_enable d3d9 nine) \
1457 - $(use_enable debug) \
1458 - $(use_enable dri3) \
1459 - $(use_enable egl) \
1460 - $(use_enable gbm) \
1461 - $(use_enable gles1) \
1462 - $(use_enable gles2) \
1463 - $(use_enable nptl glx-tls) \
1464 - $(use_enable unwind libunwind) \
1465 - --enable-valgrind=$(usex valgrind auto no) \
1466 - --enable-llvm-shared-libs \
1467 - --with-dri-drivers=${DRI_DRIVERS} \
1468 - --with-gallium-drivers=${GALLIUM_DRIVERS} \
1469 - --with-vulkan-drivers=${VULKAN_DRIVERS} \
1470 - PYTHON2="${PYTHON}" \
1471 - ${myconf}
1472 -}
1473 -
1474 -multilib_src_install() {
1475 - emake install DESTDIR="${D}"
1476 -
1477 - if use classic || use gallium; then
1478 - ebegin "Moving DRI/Gallium drivers for dynamic switching"
1479 - local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
1480 - keepdir /usr/$(get_libdir)/dri
1481 - dodir /usr/$(get_libdir)/mesa
1482 - for x in ${gallium_drivers[@]}; do
1483 - if [ -f "$(get_libdir)/gallium/${x}" ]; then
1484 - mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
1485 - || die "Failed to move ${x}"
1486 - fi
1487 - done
1488 - if use classic; then
1489 - emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
1490 - fi
1491 - for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
1492 - if [ -f ${x} -o -L ${x} ]; then
1493 - mv -f "${x}" "${x/dri/mesa}" \
1494 - || die "Failed to move ${x}"
1495 - fi
1496 - done
1497 - pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
1498 - ln -s ../mesa/*.so . || die "Creating symlink failed"
1499 - # remove symlinks to drivers known to eselect
1500 - for x in ${gallium_drivers[@]}; do
1501 - if [ -f ${x} -o -L ${x} ]; then
1502 - rm "${x}" || die "Failed to remove ${x}"
1503 - fi
1504 - done
1505 - popd
1506 - eend $?
1507 - fi
1508 - if use opencl; then
1509 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
1510 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
1511 - dodir ${cl_dir}/{lib,include}
1512 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
1513 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
1514 - "${ED}"${cl_dir}
1515 - fi
1516 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
1517 - mv -f "${ED}"/usr/include/CL \
1518 - "${ED}"${cl_dir}/include
1519 - fi
1520 - eend $?
1521 - fi
1522 -
1523 - if use openmax; then
1524 - echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
1525 - doenvd "${T}"/99mesaxdgomx
1526 - keepdir /usr/share/mesa/xdg
1527 - fi
1528 -}
1529 -
1530 -multilib_src_install_all() {
1531 - find "${ED}" -name '*.la' -delete
1532 - einstalldocs
1533 -
1534 - if use !bindist; then
1535 - dodoc docs/patents.txt
1536 - fi
1537 -
1538 - # Install config file for eselect mesa
1539 - insinto /usr/share/mesa
1540 - newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
1541 -}
1542 -
1543 -multilib_src_test() {
1544 - if use llvm; then
1545 - local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
1546 - pushd src/gallium/drivers/llvmpipe >/dev/null || die
1547 - emake ${llvm_tests}
1548 - pax-mark m ${llvm_tests}
1549 - popd >/dev/null || die
1550 - fi
1551 - emake check
1552 -}
1553 -
1554 -pkg_postinst() {
1555 - # Switch to the xorg implementation.
1556 - echo
1557 - eselect opengl set --use-old ${OPENGL_DIR}
1558 -
1559 - # Select classic/gallium drivers
1560 - if use classic || use gallium; then
1561 - eselect mesa set --auto
1562 - fi
1563 -
1564 - # Switch to mesa opencl
1565 - if use opencl; then
1566 - eselect opencl set --use-old ${PN}
1567 - fi
1568 -
1569 - # run omxregister-bellagio to make the OpenMAX drivers known system-wide
1570 - if use openmax; then
1571 - ebegin "Registering OpenMAX drivers"
1572 - BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
1573 - OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
1574 - omxregister-bellagio
1575 - eend $?
1576 - fi
1577 -
1578 - # warn about patent encumbered texture-float
1579 - if use !bindist; then
1580 - elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
1581 - elog "enabled. Please see patents.txt for an explanation."
1582 - fi
1583 -
1584 - if ! has_version media-libs/libtxc_dxtn; then
1585 - elog "Note that in order to have full S3TC support, it is necessary to install"
1586 - elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
1587 - elog "textures in some apps, and some others even require this to run."
1588 - fi
1589 -}
1590 -
1591 -pkg_prerm() {
1592 - if use openmax; then
1593 - rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
1594 - fi
1595 -}
1596 -
1597 -# $1 - VIDEO_CARDS flag
1598 -# other args - names of DRI drivers to enable
1599 -# TODO: avoid code duplication for a more elegant implementation
1600 -driver_enable() {
1601 - case $# in
1602 - # for enabling unconditionally
1603 - 1)
1604 - DRI_DRIVERS+=",$1"
1605 - ;;
1606 - *)
1607 - if use $1; then
1608 - shift
1609 - for i in $@; do
1610 - DRI_DRIVERS+=",${i}"
1611 - done
1612 - fi
1613 - ;;
1614 - esac
1615 -}
1616 -
1617 -gallium_enable() {
1618 - case $# in
1619 - # for enabling unconditionally
1620 - 1)
1621 - GALLIUM_DRIVERS+=",$1"
1622 - ;;
1623 - *)
1624 - if use $1; then
1625 - shift
1626 - for i in $@; do
1627 - GALLIUM_DRIVERS+=",${i}"
1628 - done
1629 - fi
1630 - ;;
1631 - esac
1632 -}
1633 -
1634 -vulkan_enable() {
1635 - case $# in
1636 - # for enabling unconditionally
1637 - 1)
1638 - VULKAN_DRIVERS+=",$1"
1639 - ;;
1640 - *)
1641 - if use $1; then
1642 - shift
1643 - for i in $@; do
1644 - VULKAN_DRIVERS+=",${i}"
1645 - done
1646 - fi
1647 - ;;
1648 - esac
1649 -}
1650
1651 diff --git a/media-libs/mesa/mesa-17.2.2.ebuild b/media-libs/mesa/mesa-17.2.2.ebuild
1652 deleted file mode 100644
1653 index 5183b093938..00000000000
1654 --- a/media-libs/mesa/mesa-17.2.2.ebuild
1655 +++ /dev/null
1656 @@ -1,579 +0,0 @@
1657 -# Copyright 1999-2017 Gentoo Foundation
1658 -# Distributed under the terms of the GNU General Public License v2
1659 -
1660 -EAPI=6
1661 -
1662 -EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git"
1663 -
1664 -if [[ ${PV} = 9999 ]]; then
1665 - GIT_ECLASS="git-r3"
1666 - EXPERIMENTAL="true"
1667 -fi
1668 -
1669 -PYTHON_COMPAT=( python2_7 )
1670 -
1671 -inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
1672 -
1673 -OPENGL_DIR="xorg-x11"
1674 -
1675 -MY_P="${P/_/-}"
1676 -
1677 -DESCRIPTION="OpenGL-like graphic library for Linux"
1678 -HOMEPAGE="https://www.mesa3d.org/"
1679 -
1680 -if [[ $PV == 9999 ]]; then
1681 - SRC_URI=""
1682 -else
1683 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
1684 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
1685 -fi
1686 -
1687 -LICENSE="MIT"
1688 -SLOT="0"
1689 -RESTRICT="!bindist? ( bindist )"
1690 -
1691 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
1692 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 vivante vmware"
1693 -for card in ${VIDEO_CARDS}; do
1694 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
1695 -done
1696 -
1697 -IUSE="${IUSE_VIDEO_CARDS}
1698 - bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
1699 - +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
1700 - vdpau vulkan wayland xvmc xa"
1701 -
1702 -REQUIRED_USE="
1703 - d3d9? ( dri3 gallium )
1704 - llvm? ( gallium )
1705 - opencl? ( gallium llvm )
1706 - openmax? ( gallium )
1707 - gles1? ( egl )
1708 - gles2? ( egl )
1709 - vaapi? ( gallium )
1710 - vdpau? ( gallium )
1711 - vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
1712 - video_cards_radeonsi? ( llvm ) )
1713 - wayland? ( egl gbm )
1714 - xa? ( gallium )
1715 - video_cards_freedreno? ( gallium )
1716 - video_cards_intel? ( classic )
1717 - video_cards_i915? ( || ( classic gallium ) )
1718 - video_cards_i965? ( classic )
1719 - video_cards_imx? ( gallium )
1720 - video_cards_nouveau? ( || ( classic gallium ) )
1721 - video_cards_radeon? ( || ( classic gallium )
1722 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
1723 - video_cards_r100? ( classic )
1724 - video_cards_r200? ( classic )
1725 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
1726 - video_cards_r600? ( gallium )
1727 - video_cards_radeonsi? ( gallium llvm )
1728 - video_cards_vc4? ( gallium )
1729 - video_cards_vivante? ( gallium gbm )
1730 - video_cards_vmware? ( gallium )
1731 -"
1732 -
1733 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.82"
1734 -# keep correct libdrm and dri2proto dep
1735 -# keep blocks in rdepend for binpkg
1736 -RDEPEND="
1737 - !<x11-base/xorg-server-1.7
1738 - !<=x11-proto/xf86driproto-2.0.3
1739 - abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
1740 - classic? ( app-eselect/eselect-mesa )
1741 - gallium? ( app-eselect/eselect-mesa )
1742 - >=app-eselect/eselect-opengl-1.3.0
1743 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
1744 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
1745 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
1746 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
1747 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
1748 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
1749 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
1750 - >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
1751 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
1752 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
1753 - llvm? (
1754 - video_cards_radeonsi? (
1755 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1756 - )
1757 - video_cards_r600? (
1758 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1759 - )
1760 - video_cards_radeon? (
1761 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1762 - )
1763 - )
1764 - opencl? (
1765 - app-eselect/eselect-opencl
1766 - dev-libs/libclc
1767 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1768 - )
1769 - openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
1770 - vaapi? (
1771 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
1772 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
1773 - )
1774 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
1775 - wayland? (
1776 - >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}]
1777 - >=dev-libs/wayland-protocols-1.8
1778 - )
1779 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
1780 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
1781 -
1782 - video_cards_intel? (
1783 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1784 - )
1785 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1786 -"
1787 -for card in ${RADEON_CARDS}; do
1788 - RDEPEND="${RDEPEND}
1789 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
1790 - "
1791 -done
1792 -RDEPEND="${RDEPEND}
1793 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
1794 -"
1795 -
1796 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
1797 -# we need to *really* make sure we're not pulling one than more slot
1798 -# simultaneously.
1799 -#
1800 -# How to use it:
1801 -# 1. List all the working slots (with min versions) in ||, newest first.
1802 -# 2. Update the := to specify *max* version, e.g. < 7.
1803 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
1804 -LLVM_MAX_SLOT="5"
1805 -LLVM_DEPSTR="
1806 - || (
1807 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
1808 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
1809 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
1810 - )
1811 - sys-devel/llvm:=[${MULTILIB_USEDEP}]
1812 -"
1813 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1814 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
1815 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1816 -RDEPEND="${RDEPEND}
1817 - llvm? (
1818 - opencl? (
1819 - video_cards_r600? (
1820 - ${CLANG_DEPSTR_AMDGPU}
1821 - )
1822 - !video_cards_r600? (
1823 - video_cards_radeonsi? (
1824 - ${CLANG_DEPSTR_AMDGPU}
1825 - )
1826 - )
1827 - !video_cards_r600? (
1828 - !video_cards_radeonsi? (
1829 - video_cards_radeon? (
1830 - ${CLANG_DEPSTR_AMDGPU}
1831 - )
1832 - )
1833 - )
1834 - !video_cards_r600? (
1835 - !video_cards_radeon? (
1836 - !video_cards_radeonsi? (
1837 - ${CLANG_DEPSTR}
1838 - )
1839 - )
1840 - )
1841 - )
1842 - !opencl? (
1843 - video_cards_r600? (
1844 - ${LLVM_DEPSTR_AMDGPU}
1845 - )
1846 - !video_cards_r600? (
1847 - video_cards_radeonsi? (
1848 - ${LLVM_DEPSTR_AMDGPU}
1849 - )
1850 - )
1851 - !video_cards_r600? (
1852 - !video_cards_radeonsi? (
1853 - video_cards_radeon? (
1854 - ${LLVM_DEPSTR_AMDGPU}
1855 - )
1856 - )
1857 - )
1858 - !video_cards_r600? (
1859 - !video_cards_radeon? (
1860 - !video_cards_radeonsi? (
1861 - ${LLVM_DEPSTR}
1862 - )
1863 - )
1864 - )
1865 - )
1866 - )
1867 -"
1868 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
1869 -
1870 -DEPEND="${RDEPEND}
1871 - ${PYTHON_DEPS}
1872 - opencl? (
1873 - >=sys-devel/gcc-4.6
1874 - )
1875 - sys-devel/gettext
1876 - virtual/pkgconfig
1877 - valgrind? ( dev-util/valgrind )
1878 - >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
1879 - dri3? (
1880 - >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
1881 - >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
1882 - )
1883 - >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
1884 - >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
1885 - >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
1886 - >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
1887 -"
1888 -[[ ${PV} == 9999 ]] && DEPEND+="
1889 - sys-devel/bison
1890 - sys-devel/flex
1891 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
1892 -"
1893 -
1894 -S="${WORKDIR}/${MY_P}"
1895 -EGIT_CHECKOUT_DIR=${S}
1896 -
1897 -QA_WX_LOAD="
1898 -x86? (
1899 - !pic? (
1900 - usr/lib*/libglapi.so.0.0.0
1901 - usr/lib*/libGLESv1_CM.so.1.1.0
1902 - usr/lib*/libGLESv2.so.2.0.0
1903 - usr/lib*/libGL.so.1.2.0
1904 - usr/lib*/libOSMesa.so.8.0.0
1905 - )
1906 -)"
1907 -
1908 -llvm_check_deps() {
1909 - local flags=${MULTILIB_USEDEP}
1910 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
1911 - then
1912 - flags+=",llvm_targets_AMDGPU(-)"
1913 - fi
1914 -
1915 - if use opencl; then
1916 - has_version "sys-devel/clang[${flags}]" || return 1
1917 - fi
1918 - has_version "sys-devel/llvm[${flags}]"
1919 -}
1920 -
1921 -pkg_setup() {
1922 - # warning message for bug 459306
1923 - if use llvm && has_version sys-devel/llvm[!debug=]; then
1924 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
1925 - ewarn "detected! This can cause problems. For details, see bug 459306."
1926 - fi
1927 -
1928 - if use llvm; then
1929 - llvm_pkg_setup
1930 - fi
1931 - python-any-r1_pkg_setup
1932 -}
1933 -
1934 -src_prepare() {
1935 - [[ ${PV} == 9999 ]] && eautoreconf
1936 - eapply_user
1937 -}
1938 -
1939 -multilib_src_configure() {
1940 - local myconf
1941 -
1942 - if use classic; then
1943 - # Configurable DRI drivers
1944 - driver_enable swrast
1945 -
1946 - # Intel code
1947 - driver_enable video_cards_i915 i915
1948 - driver_enable video_cards_i965 i965
1949 - if ! use video_cards_i915 && \
1950 - ! use video_cards_i965; then
1951 - driver_enable video_cards_intel i915 i965
1952 - fi
1953 -
1954 - # Nouveau code
1955 - driver_enable video_cards_nouveau nouveau
1956 -
1957 - # ATI code
1958 - driver_enable video_cards_r100 radeon
1959 - driver_enable video_cards_r200 r200
1960 - if ! use video_cards_r100 && \
1961 - ! use video_cards_r200; then
1962 - driver_enable video_cards_radeon radeon r200
1963 - fi
1964 - fi
1965 -
1966 - if use egl; then
1967 - myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
1968 - fi
1969 -
1970 - if use gallium; then
1971 - myconf+="
1972 - $(use_enable d3d9 nine)
1973 - $(use_enable llvm)
1974 - $(use_enable openmax omx)
1975 - $(use_enable vaapi va)
1976 - $(use_enable vdpau)
1977 - $(use_enable xa)
1978 - $(use_enable xvmc)
1979 - "
1980 - use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
1981 -
1982 - gallium_enable swrast
1983 - gallium_enable video_cards_vc4 vc4
1984 - gallium_enable video_cards_vivante etnaviv
1985 - gallium_enable video_cards_vmware svga
1986 - gallium_enable video_cards_nouveau nouveau
1987 - gallium_enable video_cards_i915 i915
1988 - gallium_enable video_cards_imx imx
1989 - if ! use video_cards_i915 && \
1990 - ! use video_cards_i965; then
1991 - gallium_enable video_cards_intel i915
1992 - fi
1993 -
1994 - gallium_enable video_cards_r300 r300
1995 - gallium_enable video_cards_r600 r600
1996 - gallium_enable video_cards_radeonsi radeonsi
1997 - if ! use video_cards_r300 && \
1998 - ! use video_cards_r600; then
1999 - gallium_enable video_cards_radeon r300 r600
2000 - fi
2001 -
2002 - gallium_enable video_cards_freedreno freedreno
2003 - # opencl stuff
2004 - if use opencl; then
2005 - myconf+="
2006 - $(use_enable opencl)
2007 - --with-clang-libdir="${EPREFIX}/usr/lib"
2008 - "
2009 - fi
2010 - fi
2011 -
2012 - if use vulkan; then
2013 - vulkan_enable video_cards_i965 intel
2014 - vulkan_enable video_cards_radeonsi radeon
2015 - fi
2016 -
2017 - # x86 hardened pax_kernel needs glx-rts, bug 240956
2018 - if [[ ${ABI} == x86 ]]; then
2019 - myconf+=" $(use_enable pax_kernel glx-read-only-text)"
2020 - fi
2021 -
2022 - # on abi_x86_32 hardened we need to have asm disable
2023 - if [[ ${ABI} == x86* ]] && use pic; then
2024 - myconf+=" --disable-asm"
2025 - fi
2026 -
2027 - if use gallium; then
2028 - myconf+=" $(use_enable osmesa gallium-osmesa)"
2029 - else
2030 - myconf+=" $(use_enable osmesa)"
2031 - fi
2032 -
2033 - # build fails with BSD indent, bug #428112
2034 - use userland_GNU || export INDENT=cat
2035 -
2036 - ECONF_SOURCE="${S}" \
2037 - econf \
2038 - --enable-dri \
2039 - --enable-glx \
2040 - --enable-shared-glapi \
2041 - $(use_enable !bindist texture-float) \
2042 - $(use_enable d3d9 nine) \
2043 - $(use_enable debug) \
2044 - $(use_enable dri3) \
2045 - $(use_enable egl) \
2046 - $(use_enable gbm) \
2047 - $(use_enable gles1) \
2048 - $(use_enable gles2) \
2049 - $(use_enable nptl glx-tls) \
2050 - $(use_enable unwind libunwind) \
2051 - --enable-valgrind=$(usex valgrind auto no) \
2052 - --enable-llvm-shared-libs \
2053 - --with-dri-drivers=${DRI_DRIVERS} \
2054 - --with-gallium-drivers=${GALLIUM_DRIVERS} \
2055 - --with-vulkan-drivers=${VULKAN_DRIVERS} \
2056 - PYTHON2="${PYTHON}" \
2057 - ${myconf}
2058 -}
2059 -
2060 -multilib_src_install() {
2061 - emake install DESTDIR="${D}"
2062 -
2063 - if use classic || use gallium; then
2064 - ebegin "Moving DRI/Gallium drivers for dynamic switching"
2065 - local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
2066 - keepdir /usr/$(get_libdir)/dri
2067 - dodir /usr/$(get_libdir)/mesa
2068 - for x in ${gallium_drivers[@]}; do
2069 - if [ -f "$(get_libdir)/gallium/${x}" ]; then
2070 - mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
2071 - || die "Failed to move ${x}"
2072 - fi
2073 - done
2074 - if use classic; then
2075 - emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
2076 - fi
2077 - for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
2078 - if [ -f ${x} -o -L ${x} ]; then
2079 - mv -f "${x}" "${x/dri/mesa}" \
2080 - || die "Failed to move ${x}"
2081 - fi
2082 - done
2083 - pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
2084 - ln -s ../mesa/*.so . || die "Creating symlink failed"
2085 - # remove symlinks to drivers known to eselect
2086 - for x in ${gallium_drivers[@]}; do
2087 - if [ -f ${x} -o -L ${x} ]; then
2088 - rm "${x}" || die "Failed to remove ${x}"
2089 - fi
2090 - done
2091 - popd
2092 - eend $?
2093 - fi
2094 - if use opencl; then
2095 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
2096 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
2097 - dodir ${cl_dir}/{lib,include}
2098 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
2099 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
2100 - "${ED}"${cl_dir}
2101 - fi
2102 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
2103 - mv -f "${ED}"/usr/include/CL \
2104 - "${ED}"${cl_dir}/include
2105 - fi
2106 - eend $?
2107 - fi
2108 -
2109 - if use openmax; then
2110 - echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
2111 - doenvd "${T}"/99mesaxdgomx
2112 - keepdir /usr/share/mesa/xdg
2113 - fi
2114 -}
2115 -
2116 -multilib_src_install_all() {
2117 - find "${ED}" -name '*.la' -delete
2118 - einstalldocs
2119 -
2120 - if use !bindist; then
2121 - dodoc docs/patents.txt
2122 - fi
2123 -
2124 - # Install config file for eselect mesa
2125 - insinto /usr/share/mesa
2126 - newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
2127 -}
2128 -
2129 -multilib_src_test() {
2130 - if use llvm; then
2131 - local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
2132 - pushd src/gallium/drivers/llvmpipe >/dev/null || die
2133 - emake ${llvm_tests}
2134 - pax-mark m ${llvm_tests}
2135 - popd >/dev/null || die
2136 - fi
2137 - emake check
2138 -}
2139 -
2140 -pkg_postinst() {
2141 - # Switch to the xorg implementation.
2142 - echo
2143 - eselect opengl set --use-old ${OPENGL_DIR}
2144 -
2145 - # Select classic/gallium drivers
2146 - if use classic || use gallium; then
2147 - eselect mesa set --auto
2148 - fi
2149 -
2150 - # Switch to mesa opencl
2151 - if use opencl; then
2152 - eselect opencl set --use-old ${PN}
2153 - fi
2154 -
2155 - # run omxregister-bellagio to make the OpenMAX drivers known system-wide
2156 - if use openmax; then
2157 - ebegin "Registering OpenMAX drivers"
2158 - BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
2159 - OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
2160 - omxregister-bellagio
2161 - eend $?
2162 - fi
2163 -
2164 - # warn about patent encumbered texture-float
2165 - if use !bindist; then
2166 - elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
2167 - elog "enabled. Please see patents.txt for an explanation."
2168 - fi
2169 -
2170 - if ! has_version media-libs/libtxc_dxtn; then
2171 - elog "Note that in order to have full S3TC support, it is necessary to install"
2172 - elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
2173 - elog "textures in some apps, and some others even require this to run."
2174 - fi
2175 -}
2176 -
2177 -pkg_prerm() {
2178 - if use openmax; then
2179 - rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
2180 - fi
2181 -}
2182 -
2183 -# $1 - VIDEO_CARDS flag
2184 -# other args - names of DRI drivers to enable
2185 -# TODO: avoid code duplication for a more elegant implementation
2186 -driver_enable() {
2187 - case $# in
2188 - # for enabling unconditionally
2189 - 1)
2190 - DRI_DRIVERS+=",$1"
2191 - ;;
2192 - *)
2193 - if use $1; then
2194 - shift
2195 - for i in $@; do
2196 - DRI_DRIVERS+=",${i}"
2197 - done
2198 - fi
2199 - ;;
2200 - esac
2201 -}
2202 -
2203 -gallium_enable() {
2204 - case $# in
2205 - # for enabling unconditionally
2206 - 1)
2207 - GALLIUM_DRIVERS+=",$1"
2208 - ;;
2209 - *)
2210 - if use $1; then
2211 - shift
2212 - for i in $@; do
2213 - GALLIUM_DRIVERS+=",${i}"
2214 - done
2215 - fi
2216 - ;;
2217 - esac
2218 -}
2219 -
2220 -vulkan_enable() {
2221 - case $# in
2222 - # for enabling unconditionally
2223 - 1)
2224 - VULKAN_DRIVERS+=",$1"
2225 - ;;
2226 - *)
2227 - if use $1; then
2228 - shift
2229 - for i in $@; do
2230 - VULKAN_DRIVERS+=",${i}"
2231 - done
2232 - fi
2233 - ;;
2234 - esac
2235 -}
2236
2237 diff --git a/media-libs/mesa/mesa-17.2.3.ebuild b/media-libs/mesa/mesa-17.2.3.ebuild
2238 deleted file mode 100644
2239 index 12be4d77969..00000000000
2240 --- a/media-libs/mesa/mesa-17.2.3.ebuild
2241 +++ /dev/null
2242 @@ -1,582 +0,0 @@
2243 -# Copyright 1999-2017 Gentoo Foundation
2244 -# Distributed under the terms of the GNU General Public License v2
2245 -
2246 -EAPI=6
2247 -
2248 -EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git"
2249 -
2250 -if [[ ${PV} = 9999 ]]; then
2251 - GIT_ECLASS="git-r3"
2252 - EXPERIMENTAL="true"
2253 -fi
2254 -
2255 -PYTHON_COMPAT=( python2_7 )
2256 -
2257 -inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
2258 -
2259 -OPENGL_DIR="xorg-x11"
2260 -
2261 -MY_P="${P/_/-}"
2262 -
2263 -DESCRIPTION="OpenGL-like graphic library for Linux"
2264 -HOMEPAGE="https://www.mesa3d.org/"
2265 -
2266 -if [[ $PV == 9999 ]]; then
2267 - SRC_URI=""
2268 -else
2269 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
2270 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
2271 -fi
2272 -
2273 -LICENSE="MIT"
2274 -SLOT="0"
2275 -RESTRICT="!bindist? ( bindist )"
2276 -
2277 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
2278 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
2279 -for card in ${VIDEO_CARDS}; do
2280 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
2281 -done
2282 -
2283 -IUSE="${IUSE_VIDEO_CARDS}
2284 - bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
2285 - +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
2286 - vdpau vulkan wayland xvmc xa"
2287 -
2288 -REQUIRED_USE="
2289 - d3d9? ( dri3 gallium )
2290 - llvm? ( gallium )
2291 - opencl? ( gallium llvm )
2292 - openmax? ( gallium )
2293 - gles1? ( egl )
2294 - gles2? ( egl )
2295 - vaapi? ( gallium )
2296 - vdpau? ( gallium )
2297 - vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
2298 - video_cards_radeonsi? ( llvm ) )
2299 - wayland? ( egl gbm )
2300 - xa? ( gallium )
2301 - video_cards_freedreno? ( gallium )
2302 - video_cards_intel? ( classic )
2303 - video_cards_i915? ( || ( classic gallium ) )
2304 - video_cards_i965? ( classic )
2305 - video_cards_imx? ( gallium )
2306 - video_cards_nouveau? ( || ( classic gallium ) )
2307 - video_cards_radeon? ( || ( classic gallium )
2308 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
2309 - video_cards_r100? ( classic )
2310 - video_cards_r200? ( classic )
2311 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
2312 - video_cards_r600? ( gallium )
2313 - video_cards_radeonsi? ( gallium llvm )
2314 - video_cards_vc4? ( gallium )
2315 - video_cards_virgl? ( gallium )
2316 - video_cards_vivante? ( gallium gbm )
2317 - video_cards_vmware? ( gallium )
2318 -"
2319 -
2320 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.82"
2321 -# keep correct libdrm and dri2proto dep
2322 -# keep blocks in rdepend for binpkg
2323 -RDEPEND="
2324 - !<x11-base/xorg-server-1.7
2325 - !<=x11-proto/xf86driproto-2.0.3
2326 - abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
2327 - classic? ( app-eselect/eselect-mesa )
2328 - gallium? ( app-eselect/eselect-mesa )
2329 - >=app-eselect/eselect-opengl-1.3.0
2330 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
2331 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
2332 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
2333 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
2334 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
2335 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
2336 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
2337 - >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
2338 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
2339 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
2340 - llvm? (
2341 - video_cards_radeonsi? (
2342 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2343 - )
2344 - video_cards_r600? (
2345 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2346 - )
2347 - video_cards_radeon? (
2348 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2349 - )
2350 - )
2351 - opencl? (
2352 - app-eselect/eselect-opencl
2353 - dev-libs/libclc
2354 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2355 - )
2356 - openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
2357 - vaapi? (
2358 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
2359 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
2360 - )
2361 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
2362 - wayland? (
2363 - >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}]
2364 - >=dev-libs/wayland-protocols-1.8
2365 - )
2366 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
2367 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
2368 -
2369 - video_cards_intel? (
2370 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
2371 - )
2372 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
2373 -"
2374 -for card in ${RADEON_CARDS}; do
2375 - RDEPEND="${RDEPEND}
2376 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
2377 - "
2378 -done
2379 -RDEPEND="${RDEPEND}
2380 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
2381 -"
2382 -
2383 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
2384 -# we need to *really* make sure we're not pulling one than more slot
2385 -# simultaneously.
2386 -#
2387 -# How to use it:
2388 -# 1. List all the working slots (with min versions) in ||, newest first.
2389 -# 2. Update the := to specify *max* version, e.g. < 7.
2390 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
2391 -LLVM_MAX_SLOT="5"
2392 -LLVM_DEPSTR="
2393 - || (
2394 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
2395 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
2396 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
2397 - )
2398 - sys-devel/llvm:=[${MULTILIB_USEDEP}]
2399 -"
2400 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
2401 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
2402 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
2403 -RDEPEND="${RDEPEND}
2404 - llvm? (
2405 - opencl? (
2406 - video_cards_r600? (
2407 - ${CLANG_DEPSTR_AMDGPU}
2408 - )
2409 - !video_cards_r600? (
2410 - video_cards_radeonsi? (
2411 - ${CLANG_DEPSTR_AMDGPU}
2412 - )
2413 - )
2414 - !video_cards_r600? (
2415 - !video_cards_radeonsi? (
2416 - video_cards_radeon? (
2417 - ${CLANG_DEPSTR_AMDGPU}
2418 - )
2419 - )
2420 - )
2421 - !video_cards_r600? (
2422 - !video_cards_radeon? (
2423 - !video_cards_radeonsi? (
2424 - ${CLANG_DEPSTR}
2425 - )
2426 - )
2427 - )
2428 - )
2429 - !opencl? (
2430 - video_cards_r600? (
2431 - ${LLVM_DEPSTR_AMDGPU}
2432 - )
2433 - !video_cards_r600? (
2434 - video_cards_radeonsi? (
2435 - ${LLVM_DEPSTR_AMDGPU}
2436 - )
2437 - )
2438 - !video_cards_r600? (
2439 - !video_cards_radeonsi? (
2440 - video_cards_radeon? (
2441 - ${LLVM_DEPSTR_AMDGPU}
2442 - )
2443 - )
2444 - )
2445 - !video_cards_r600? (
2446 - !video_cards_radeon? (
2447 - !video_cards_radeonsi? (
2448 - ${LLVM_DEPSTR}
2449 - )
2450 - )
2451 - )
2452 - )
2453 - )
2454 -"
2455 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
2456 -
2457 -DEPEND="${RDEPEND}
2458 - ${PYTHON_DEPS}
2459 - opencl? (
2460 - >=sys-devel/gcc-4.6
2461 - )
2462 - sys-devel/gettext
2463 - virtual/pkgconfig
2464 - valgrind? ( dev-util/valgrind )
2465 - >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
2466 - dri3? (
2467 - >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
2468 - >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
2469 - )
2470 - >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
2471 - >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
2472 - >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
2473 - >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
2474 -"
2475 -[[ ${PV} == 9999 ]] && DEPEND+="
2476 - sys-devel/bison
2477 - sys-devel/flex
2478 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
2479 -"
2480 -
2481 -S="${WORKDIR}/${MY_P}"
2482 -EGIT_CHECKOUT_DIR=${S}
2483 -
2484 -QA_WX_LOAD="
2485 -x86? (
2486 - !pic? (
2487 - usr/lib*/libglapi.so.0.0.0
2488 - usr/lib*/libGLESv1_CM.so.1.1.0
2489 - usr/lib*/libGLESv2.so.2.0.0
2490 - usr/lib*/libGL.so.1.2.0
2491 - usr/lib*/libOSMesa.so.8.0.0
2492 - )
2493 -)"
2494 -
2495 -llvm_check_deps() {
2496 - local flags=${MULTILIB_USEDEP}
2497 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
2498 - then
2499 - flags+=",llvm_targets_AMDGPU(-)"
2500 - fi
2501 -
2502 - if use opencl; then
2503 - has_version "sys-devel/clang[${flags}]" || return 1
2504 - fi
2505 - has_version "sys-devel/llvm[${flags}]"
2506 -}
2507 -
2508 -pkg_setup() {
2509 - # warning message for bug 459306
2510 - if use llvm && has_version sys-devel/llvm[!debug=]; then
2511 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
2512 - ewarn "detected! This can cause problems. For details, see bug 459306."
2513 - fi
2514 -
2515 - if use llvm; then
2516 - llvm_pkg_setup
2517 - fi
2518 - python-any-r1_pkg_setup
2519 -}
2520 -
2521 -src_prepare() {
2522 - [[ ${PV} == 9999 ]] && eautoreconf
2523 - eapply_user
2524 -}
2525 -
2526 -multilib_src_configure() {
2527 - local myconf
2528 -
2529 - if use classic; then
2530 - # Configurable DRI drivers
2531 - driver_enable swrast
2532 -
2533 - # Intel code
2534 - driver_enable video_cards_i915 i915
2535 - driver_enable video_cards_i965 i965
2536 - if ! use video_cards_i915 && \
2537 - ! use video_cards_i965; then
2538 - driver_enable video_cards_intel i915 i965
2539 - fi
2540 -
2541 - # Nouveau code
2542 - driver_enable video_cards_nouveau nouveau
2543 -
2544 - # ATI code
2545 - driver_enable video_cards_r100 radeon
2546 - driver_enable video_cards_r200 r200
2547 - if ! use video_cards_r100 && \
2548 - ! use video_cards_r200; then
2549 - driver_enable video_cards_radeon radeon r200
2550 - fi
2551 - fi
2552 -
2553 - if use egl; then
2554 - myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
2555 - fi
2556 -
2557 - if use gallium; then
2558 - myconf+="
2559 - $(use_enable d3d9 nine)
2560 - $(use_enable llvm)
2561 - $(use_enable openmax omx)
2562 - $(use_enable vaapi va)
2563 - $(use_enable vdpau)
2564 - $(use_enable xa)
2565 - $(use_enable xvmc)
2566 - "
2567 - use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
2568 -
2569 - gallium_enable swrast
2570 - gallium_enable video_cards_vc4 vc4
2571 - gallium_enable video_cards_vivante etnaviv
2572 - gallium_enable video_cards_vmware svga
2573 - gallium_enable video_cards_nouveau nouveau
2574 - gallium_enable video_cards_i915 i915
2575 - gallium_enable video_cards_imx imx
2576 - if ! use video_cards_i915 && \
2577 - ! use video_cards_i965; then
2578 - gallium_enable video_cards_intel i915
2579 - fi
2580 -
2581 - gallium_enable video_cards_r300 r300
2582 - gallium_enable video_cards_r600 r600
2583 - gallium_enable video_cards_radeonsi radeonsi
2584 - if ! use video_cards_r300 && \
2585 - ! use video_cards_r600; then
2586 - gallium_enable video_cards_radeon r300 r600
2587 - fi
2588 -
2589 - gallium_enable video_cards_freedreno freedreno
2590 - # opencl stuff
2591 - if use opencl; then
2592 - myconf+="
2593 - $(use_enable opencl)
2594 - --with-clang-libdir="${EPREFIX}/usr/lib"
2595 - "
2596 - fi
2597 -
2598 - gallium_enable video_cards_virgl virgl
2599 - fi
2600 -
2601 - if use vulkan; then
2602 - vulkan_enable video_cards_i965 intel
2603 - vulkan_enable video_cards_radeonsi radeon
2604 - fi
2605 -
2606 - # x86 hardened pax_kernel needs glx-rts, bug 240956
2607 - if [[ ${ABI} == x86 ]]; then
2608 - myconf+=" $(use_enable pax_kernel glx-read-only-text)"
2609 - fi
2610 -
2611 - # on abi_x86_32 hardened we need to have asm disable
2612 - if [[ ${ABI} == x86* ]] && use pic; then
2613 - myconf+=" --disable-asm"
2614 - fi
2615 -
2616 - if use gallium; then
2617 - myconf+=" $(use_enable osmesa gallium-osmesa)"
2618 - else
2619 - myconf+=" $(use_enable osmesa)"
2620 - fi
2621 -
2622 - # build fails with BSD indent, bug #428112
2623 - use userland_GNU || export INDENT=cat
2624 -
2625 - ECONF_SOURCE="${S}" \
2626 - econf \
2627 - --enable-dri \
2628 - --enable-glx \
2629 - --enable-shared-glapi \
2630 - $(use_enable !bindist texture-float) \
2631 - $(use_enable d3d9 nine) \
2632 - $(use_enable debug) \
2633 - $(use_enable dri3) \
2634 - $(use_enable egl) \
2635 - $(use_enable gbm) \
2636 - $(use_enable gles1) \
2637 - $(use_enable gles2) \
2638 - $(use_enable nptl glx-tls) \
2639 - $(use_enable unwind libunwind) \
2640 - --enable-valgrind=$(usex valgrind auto no) \
2641 - --enable-llvm-shared-libs \
2642 - --with-dri-drivers=${DRI_DRIVERS} \
2643 - --with-gallium-drivers=${GALLIUM_DRIVERS} \
2644 - --with-vulkan-drivers=${VULKAN_DRIVERS} \
2645 - PYTHON2="${PYTHON}" \
2646 - ${myconf}
2647 -}
2648 -
2649 -multilib_src_install() {
2650 - emake install DESTDIR="${D}"
2651 -
2652 - if use classic || use gallium; then
2653 - ebegin "Moving DRI/Gallium drivers for dynamic switching"
2654 - local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
2655 - keepdir /usr/$(get_libdir)/dri
2656 - dodir /usr/$(get_libdir)/mesa
2657 - for x in ${gallium_drivers[@]}; do
2658 - if [ -f "$(get_libdir)/gallium/${x}" ]; then
2659 - mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
2660 - || die "Failed to move ${x}"
2661 - fi
2662 - done
2663 - if use classic; then
2664 - emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
2665 - fi
2666 - for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
2667 - if [ -f ${x} -o -L ${x} ]; then
2668 - mv -f "${x}" "${x/dri/mesa}" \
2669 - || die "Failed to move ${x}"
2670 - fi
2671 - done
2672 - pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
2673 - ln -s ../mesa/*.so . || die "Creating symlink failed"
2674 - # remove symlinks to drivers known to eselect
2675 - for x in ${gallium_drivers[@]}; do
2676 - if [ -f ${x} -o -L ${x} ]; then
2677 - rm "${x}" || die "Failed to remove ${x}"
2678 - fi
2679 - done
2680 - popd
2681 - eend $?
2682 - fi
2683 - if use opencl; then
2684 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
2685 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
2686 - dodir ${cl_dir}/{lib,include}
2687 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
2688 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
2689 - "${ED}"${cl_dir}
2690 - fi
2691 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
2692 - mv -f "${ED}"/usr/include/CL \
2693 - "${ED}"${cl_dir}/include
2694 - fi
2695 - eend $?
2696 - fi
2697 -
2698 - if use openmax; then
2699 - echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
2700 - doenvd "${T}"/99mesaxdgomx
2701 - keepdir /usr/share/mesa/xdg
2702 - fi
2703 -}
2704 -
2705 -multilib_src_install_all() {
2706 - find "${ED}" -name '*.la' -delete
2707 - einstalldocs
2708 -
2709 - if use !bindist; then
2710 - dodoc docs/patents.txt
2711 - fi
2712 -
2713 - # Install config file for eselect mesa
2714 - insinto /usr/share/mesa
2715 - newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
2716 -}
2717 -
2718 -multilib_src_test() {
2719 - if use llvm; then
2720 - local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
2721 - pushd src/gallium/drivers/llvmpipe >/dev/null || die
2722 - emake ${llvm_tests}
2723 - pax-mark m ${llvm_tests}
2724 - popd >/dev/null || die
2725 - fi
2726 - emake check
2727 -}
2728 -
2729 -pkg_postinst() {
2730 - # Switch to the xorg implementation.
2731 - echo
2732 - eselect opengl set --use-old ${OPENGL_DIR}
2733 -
2734 - # Select classic/gallium drivers
2735 - if use classic || use gallium; then
2736 - eselect mesa set --auto
2737 - fi
2738 -
2739 - # Switch to mesa opencl
2740 - if use opencl; then
2741 - eselect opencl set --use-old ${PN}
2742 - fi
2743 -
2744 - # run omxregister-bellagio to make the OpenMAX drivers known system-wide
2745 - if use openmax; then
2746 - ebegin "Registering OpenMAX drivers"
2747 - BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
2748 - OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
2749 - omxregister-bellagio
2750 - eend $?
2751 - fi
2752 -
2753 - # warn about patent encumbered texture-float
2754 - if use !bindist; then
2755 - elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
2756 - elog "enabled. Please see patents.txt for an explanation."
2757 - fi
2758 -
2759 - if ! has_version media-libs/libtxc_dxtn; then
2760 - elog "Note that in order to have full S3TC support, it is necessary to install"
2761 - elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
2762 - elog "textures in some apps, and some others even require this to run."
2763 - fi
2764 -}
2765 -
2766 -pkg_prerm() {
2767 - if use openmax; then
2768 - rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
2769 - fi
2770 -}
2771 -
2772 -# $1 - VIDEO_CARDS flag
2773 -# other args - names of DRI drivers to enable
2774 -# TODO: avoid code duplication for a more elegant implementation
2775 -driver_enable() {
2776 - case $# in
2777 - # for enabling unconditionally
2778 - 1)
2779 - DRI_DRIVERS+=",$1"
2780 - ;;
2781 - *)
2782 - if use $1; then
2783 - shift
2784 - for i in $@; do
2785 - DRI_DRIVERS+=",${i}"
2786 - done
2787 - fi
2788 - ;;
2789 - esac
2790 -}
2791 -
2792 -gallium_enable() {
2793 - case $# in
2794 - # for enabling unconditionally
2795 - 1)
2796 - GALLIUM_DRIVERS+=",$1"
2797 - ;;
2798 - *)
2799 - if use $1; then
2800 - shift
2801 - for i in $@; do
2802 - GALLIUM_DRIVERS+=",${i}"
2803 - done
2804 - fi
2805 - ;;
2806 - esac
2807 -}
2808 -
2809 -vulkan_enable() {
2810 - case $# in
2811 - # for enabling unconditionally
2812 - 1)
2813 - VULKAN_DRIVERS+=",$1"
2814 - ;;
2815 - *)
2816 - if use $1; then
2817 - shift
2818 - for i in $@; do
2819 - VULKAN_DRIVERS+=",${i}"
2820 - done
2821 - fi
2822 - ;;
2823 - esac
2824 -}
2825
2826 diff --git a/media-libs/mesa/mesa-17.2.4.ebuild b/media-libs/mesa/mesa-17.2.4.ebuild
2827 deleted file mode 100644
2828 index 12be4d77969..00000000000
2829 --- a/media-libs/mesa/mesa-17.2.4.ebuild
2830 +++ /dev/null
2831 @@ -1,582 +0,0 @@
2832 -# Copyright 1999-2017 Gentoo Foundation
2833 -# Distributed under the terms of the GNU General Public License v2
2834 -
2835 -EAPI=6
2836 -
2837 -EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git"
2838 -
2839 -if [[ ${PV} = 9999 ]]; then
2840 - GIT_ECLASS="git-r3"
2841 - EXPERIMENTAL="true"
2842 -fi
2843 -
2844 -PYTHON_COMPAT=( python2_7 )
2845 -
2846 -inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
2847 -
2848 -OPENGL_DIR="xorg-x11"
2849 -
2850 -MY_P="${P/_/-}"
2851 -
2852 -DESCRIPTION="OpenGL-like graphic library for Linux"
2853 -HOMEPAGE="https://www.mesa3d.org/"
2854 -
2855 -if [[ $PV == 9999 ]]; then
2856 - SRC_URI=""
2857 -else
2858 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
2859 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
2860 -fi
2861 -
2862 -LICENSE="MIT"
2863 -SLOT="0"
2864 -RESTRICT="!bindist? ( bindist )"
2865 -
2866 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
2867 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
2868 -for card in ${VIDEO_CARDS}; do
2869 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
2870 -done
2871 -
2872 -IUSE="${IUSE_VIDEO_CARDS}
2873 - bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
2874 - +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
2875 - vdpau vulkan wayland xvmc xa"
2876 -
2877 -REQUIRED_USE="
2878 - d3d9? ( dri3 gallium )
2879 - llvm? ( gallium )
2880 - opencl? ( gallium llvm )
2881 - openmax? ( gallium )
2882 - gles1? ( egl )
2883 - gles2? ( egl )
2884 - vaapi? ( gallium )
2885 - vdpau? ( gallium )
2886 - vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
2887 - video_cards_radeonsi? ( llvm ) )
2888 - wayland? ( egl gbm )
2889 - xa? ( gallium )
2890 - video_cards_freedreno? ( gallium )
2891 - video_cards_intel? ( classic )
2892 - video_cards_i915? ( || ( classic gallium ) )
2893 - video_cards_i965? ( classic )
2894 - video_cards_imx? ( gallium )
2895 - video_cards_nouveau? ( || ( classic gallium ) )
2896 - video_cards_radeon? ( || ( classic gallium )
2897 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
2898 - video_cards_r100? ( classic )
2899 - video_cards_r200? ( classic )
2900 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
2901 - video_cards_r600? ( gallium )
2902 - video_cards_radeonsi? ( gallium llvm )
2903 - video_cards_vc4? ( gallium )
2904 - video_cards_virgl? ( gallium )
2905 - video_cards_vivante? ( gallium gbm )
2906 - video_cards_vmware? ( gallium )
2907 -"
2908 -
2909 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.82"
2910 -# keep correct libdrm and dri2proto dep
2911 -# keep blocks in rdepend for binpkg
2912 -RDEPEND="
2913 - !<x11-base/xorg-server-1.7
2914 - !<=x11-proto/xf86driproto-2.0.3
2915 - abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
2916 - classic? ( app-eselect/eselect-mesa )
2917 - gallium? ( app-eselect/eselect-mesa )
2918 - >=app-eselect/eselect-opengl-1.3.0
2919 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
2920 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
2921 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
2922 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
2923 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
2924 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
2925 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
2926 - >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
2927 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
2928 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
2929 - llvm? (
2930 - video_cards_radeonsi? (
2931 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2932 - )
2933 - video_cards_r600? (
2934 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2935 - )
2936 - video_cards_radeon? (
2937 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2938 - )
2939 - )
2940 - opencl? (
2941 - app-eselect/eselect-opencl
2942 - dev-libs/libclc
2943 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2944 - )
2945 - openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
2946 - vaapi? (
2947 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
2948 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
2949 - )
2950 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
2951 - wayland? (
2952 - >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}]
2953 - >=dev-libs/wayland-protocols-1.8
2954 - )
2955 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
2956 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
2957 -
2958 - video_cards_intel? (
2959 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
2960 - )
2961 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
2962 -"
2963 -for card in ${RADEON_CARDS}; do
2964 - RDEPEND="${RDEPEND}
2965 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
2966 - "
2967 -done
2968 -RDEPEND="${RDEPEND}
2969 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
2970 -"
2971 -
2972 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
2973 -# we need to *really* make sure we're not pulling one than more slot
2974 -# simultaneously.
2975 -#
2976 -# How to use it:
2977 -# 1. List all the working slots (with min versions) in ||, newest first.
2978 -# 2. Update the := to specify *max* version, e.g. < 7.
2979 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
2980 -LLVM_MAX_SLOT="5"
2981 -LLVM_DEPSTR="
2982 - || (
2983 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
2984 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
2985 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
2986 - )
2987 - sys-devel/llvm:=[${MULTILIB_USEDEP}]
2988 -"
2989 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
2990 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
2991 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
2992 -RDEPEND="${RDEPEND}
2993 - llvm? (
2994 - opencl? (
2995 - video_cards_r600? (
2996 - ${CLANG_DEPSTR_AMDGPU}
2997 - )
2998 - !video_cards_r600? (
2999 - video_cards_radeonsi? (
3000 - ${CLANG_DEPSTR_AMDGPU}
3001 - )
3002 - )
3003 - !video_cards_r600? (
3004 - !video_cards_radeonsi? (
3005 - video_cards_radeon? (
3006 - ${CLANG_DEPSTR_AMDGPU}
3007 - )
3008 - )
3009 - )
3010 - !video_cards_r600? (
3011 - !video_cards_radeon? (
3012 - !video_cards_radeonsi? (
3013 - ${CLANG_DEPSTR}
3014 - )
3015 - )
3016 - )
3017 - )
3018 - !opencl? (
3019 - video_cards_r600? (
3020 - ${LLVM_DEPSTR_AMDGPU}
3021 - )
3022 - !video_cards_r600? (
3023 - video_cards_radeonsi? (
3024 - ${LLVM_DEPSTR_AMDGPU}
3025 - )
3026 - )
3027 - !video_cards_r600? (
3028 - !video_cards_radeonsi? (
3029 - video_cards_radeon? (
3030 - ${LLVM_DEPSTR_AMDGPU}
3031 - )
3032 - )
3033 - )
3034 - !video_cards_r600? (
3035 - !video_cards_radeon? (
3036 - !video_cards_radeonsi? (
3037 - ${LLVM_DEPSTR}
3038 - )
3039 - )
3040 - )
3041 - )
3042 - )
3043 -"
3044 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
3045 -
3046 -DEPEND="${RDEPEND}
3047 - ${PYTHON_DEPS}
3048 - opencl? (
3049 - >=sys-devel/gcc-4.6
3050 - )
3051 - sys-devel/gettext
3052 - virtual/pkgconfig
3053 - valgrind? ( dev-util/valgrind )
3054 - >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
3055 - dri3? (
3056 - >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
3057 - >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
3058 - )
3059 - >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
3060 - >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
3061 - >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
3062 - >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
3063 -"
3064 -[[ ${PV} == 9999 ]] && DEPEND+="
3065 - sys-devel/bison
3066 - sys-devel/flex
3067 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
3068 -"
3069 -
3070 -S="${WORKDIR}/${MY_P}"
3071 -EGIT_CHECKOUT_DIR=${S}
3072 -
3073 -QA_WX_LOAD="
3074 -x86? (
3075 - !pic? (
3076 - usr/lib*/libglapi.so.0.0.0
3077 - usr/lib*/libGLESv1_CM.so.1.1.0
3078 - usr/lib*/libGLESv2.so.2.0.0
3079 - usr/lib*/libGL.so.1.2.0
3080 - usr/lib*/libOSMesa.so.8.0.0
3081 - )
3082 -)"
3083 -
3084 -llvm_check_deps() {
3085 - local flags=${MULTILIB_USEDEP}
3086 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
3087 - then
3088 - flags+=",llvm_targets_AMDGPU(-)"
3089 - fi
3090 -
3091 - if use opencl; then
3092 - has_version "sys-devel/clang[${flags}]" || return 1
3093 - fi
3094 - has_version "sys-devel/llvm[${flags}]"
3095 -}
3096 -
3097 -pkg_setup() {
3098 - # warning message for bug 459306
3099 - if use llvm && has_version sys-devel/llvm[!debug=]; then
3100 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
3101 - ewarn "detected! This can cause problems. For details, see bug 459306."
3102 - fi
3103 -
3104 - if use llvm; then
3105 - llvm_pkg_setup
3106 - fi
3107 - python-any-r1_pkg_setup
3108 -}
3109 -
3110 -src_prepare() {
3111 - [[ ${PV} == 9999 ]] && eautoreconf
3112 - eapply_user
3113 -}
3114 -
3115 -multilib_src_configure() {
3116 - local myconf
3117 -
3118 - if use classic; then
3119 - # Configurable DRI drivers
3120 - driver_enable swrast
3121 -
3122 - # Intel code
3123 - driver_enable video_cards_i915 i915
3124 - driver_enable video_cards_i965 i965
3125 - if ! use video_cards_i915 && \
3126 - ! use video_cards_i965; then
3127 - driver_enable video_cards_intel i915 i965
3128 - fi
3129 -
3130 - # Nouveau code
3131 - driver_enable video_cards_nouveau nouveau
3132 -
3133 - # ATI code
3134 - driver_enable video_cards_r100 radeon
3135 - driver_enable video_cards_r200 r200
3136 - if ! use video_cards_r100 && \
3137 - ! use video_cards_r200; then
3138 - driver_enable video_cards_radeon radeon r200
3139 - fi
3140 - fi
3141 -
3142 - if use egl; then
3143 - myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
3144 - fi
3145 -
3146 - if use gallium; then
3147 - myconf+="
3148 - $(use_enable d3d9 nine)
3149 - $(use_enable llvm)
3150 - $(use_enable openmax omx)
3151 - $(use_enable vaapi va)
3152 - $(use_enable vdpau)
3153 - $(use_enable xa)
3154 - $(use_enable xvmc)
3155 - "
3156 - use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
3157 -
3158 - gallium_enable swrast
3159 - gallium_enable video_cards_vc4 vc4
3160 - gallium_enable video_cards_vivante etnaviv
3161 - gallium_enable video_cards_vmware svga
3162 - gallium_enable video_cards_nouveau nouveau
3163 - gallium_enable video_cards_i915 i915
3164 - gallium_enable video_cards_imx imx
3165 - if ! use video_cards_i915 && \
3166 - ! use video_cards_i965; then
3167 - gallium_enable video_cards_intel i915
3168 - fi
3169 -
3170 - gallium_enable video_cards_r300 r300
3171 - gallium_enable video_cards_r600 r600
3172 - gallium_enable video_cards_radeonsi radeonsi
3173 - if ! use video_cards_r300 && \
3174 - ! use video_cards_r600; then
3175 - gallium_enable video_cards_radeon r300 r600
3176 - fi
3177 -
3178 - gallium_enable video_cards_freedreno freedreno
3179 - # opencl stuff
3180 - if use opencl; then
3181 - myconf+="
3182 - $(use_enable opencl)
3183 - --with-clang-libdir="${EPREFIX}/usr/lib"
3184 - "
3185 - fi
3186 -
3187 - gallium_enable video_cards_virgl virgl
3188 - fi
3189 -
3190 - if use vulkan; then
3191 - vulkan_enable video_cards_i965 intel
3192 - vulkan_enable video_cards_radeonsi radeon
3193 - fi
3194 -
3195 - # x86 hardened pax_kernel needs glx-rts, bug 240956
3196 - if [[ ${ABI} == x86 ]]; then
3197 - myconf+=" $(use_enable pax_kernel glx-read-only-text)"
3198 - fi
3199 -
3200 - # on abi_x86_32 hardened we need to have asm disable
3201 - if [[ ${ABI} == x86* ]] && use pic; then
3202 - myconf+=" --disable-asm"
3203 - fi
3204 -
3205 - if use gallium; then
3206 - myconf+=" $(use_enable osmesa gallium-osmesa)"
3207 - else
3208 - myconf+=" $(use_enable osmesa)"
3209 - fi
3210 -
3211 - # build fails with BSD indent, bug #428112
3212 - use userland_GNU || export INDENT=cat
3213 -
3214 - ECONF_SOURCE="${S}" \
3215 - econf \
3216 - --enable-dri \
3217 - --enable-glx \
3218 - --enable-shared-glapi \
3219 - $(use_enable !bindist texture-float) \
3220 - $(use_enable d3d9 nine) \
3221 - $(use_enable debug) \
3222 - $(use_enable dri3) \
3223 - $(use_enable egl) \
3224 - $(use_enable gbm) \
3225 - $(use_enable gles1) \
3226 - $(use_enable gles2) \
3227 - $(use_enable nptl glx-tls) \
3228 - $(use_enable unwind libunwind) \
3229 - --enable-valgrind=$(usex valgrind auto no) \
3230 - --enable-llvm-shared-libs \
3231 - --with-dri-drivers=${DRI_DRIVERS} \
3232 - --with-gallium-drivers=${GALLIUM_DRIVERS} \
3233 - --with-vulkan-drivers=${VULKAN_DRIVERS} \
3234 - PYTHON2="${PYTHON}" \
3235 - ${myconf}
3236 -}
3237 -
3238 -multilib_src_install() {
3239 - emake install DESTDIR="${D}"
3240 -
3241 - if use classic || use gallium; then
3242 - ebegin "Moving DRI/Gallium drivers for dynamic switching"
3243 - local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
3244 - keepdir /usr/$(get_libdir)/dri
3245 - dodir /usr/$(get_libdir)/mesa
3246 - for x in ${gallium_drivers[@]}; do
3247 - if [ -f "$(get_libdir)/gallium/${x}" ]; then
3248 - mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
3249 - || die "Failed to move ${x}"
3250 - fi
3251 - done
3252 - if use classic; then
3253 - emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
3254 - fi
3255 - for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
3256 - if [ -f ${x} -o -L ${x} ]; then
3257 - mv -f "${x}" "${x/dri/mesa}" \
3258 - || die "Failed to move ${x}"
3259 - fi
3260 - done
3261 - pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
3262 - ln -s ../mesa/*.so . || die "Creating symlink failed"
3263 - # remove symlinks to drivers known to eselect
3264 - for x in ${gallium_drivers[@]}; do
3265 - if [ -f ${x} -o -L ${x} ]; then
3266 - rm "${x}" || die "Failed to remove ${x}"
3267 - fi
3268 - done
3269 - popd
3270 - eend $?
3271 - fi
3272 - if use opencl; then
3273 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
3274 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
3275 - dodir ${cl_dir}/{lib,include}
3276 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
3277 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
3278 - "${ED}"${cl_dir}
3279 - fi
3280 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
3281 - mv -f "${ED}"/usr/include/CL \
3282 - "${ED}"${cl_dir}/include
3283 - fi
3284 - eend $?
3285 - fi
3286 -
3287 - if use openmax; then
3288 - echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
3289 - doenvd "${T}"/99mesaxdgomx
3290 - keepdir /usr/share/mesa/xdg
3291 - fi
3292 -}
3293 -
3294 -multilib_src_install_all() {
3295 - find "${ED}" -name '*.la' -delete
3296 - einstalldocs
3297 -
3298 - if use !bindist; then
3299 - dodoc docs/patents.txt
3300 - fi
3301 -
3302 - # Install config file for eselect mesa
3303 - insinto /usr/share/mesa
3304 - newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
3305 -}
3306 -
3307 -multilib_src_test() {
3308 - if use llvm; then
3309 - local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
3310 - pushd src/gallium/drivers/llvmpipe >/dev/null || die
3311 - emake ${llvm_tests}
3312 - pax-mark m ${llvm_tests}
3313 - popd >/dev/null || die
3314 - fi
3315 - emake check
3316 -}
3317 -
3318 -pkg_postinst() {
3319 - # Switch to the xorg implementation.
3320 - echo
3321 - eselect opengl set --use-old ${OPENGL_DIR}
3322 -
3323 - # Select classic/gallium drivers
3324 - if use classic || use gallium; then
3325 - eselect mesa set --auto
3326 - fi
3327 -
3328 - # Switch to mesa opencl
3329 - if use opencl; then
3330 - eselect opencl set --use-old ${PN}
3331 - fi
3332 -
3333 - # run omxregister-bellagio to make the OpenMAX drivers known system-wide
3334 - if use openmax; then
3335 - ebegin "Registering OpenMAX drivers"
3336 - BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
3337 - OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
3338 - omxregister-bellagio
3339 - eend $?
3340 - fi
3341 -
3342 - # warn about patent encumbered texture-float
3343 - if use !bindist; then
3344 - elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
3345 - elog "enabled. Please see patents.txt for an explanation."
3346 - fi
3347 -
3348 - if ! has_version media-libs/libtxc_dxtn; then
3349 - elog "Note that in order to have full S3TC support, it is necessary to install"
3350 - elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
3351 - elog "textures in some apps, and some others even require this to run."
3352 - fi
3353 -}
3354 -
3355 -pkg_prerm() {
3356 - if use openmax; then
3357 - rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
3358 - fi
3359 -}
3360 -
3361 -# $1 - VIDEO_CARDS flag
3362 -# other args - names of DRI drivers to enable
3363 -# TODO: avoid code duplication for a more elegant implementation
3364 -driver_enable() {
3365 - case $# in
3366 - # for enabling unconditionally
3367 - 1)
3368 - DRI_DRIVERS+=",$1"
3369 - ;;
3370 - *)
3371 - if use $1; then
3372 - shift
3373 - for i in $@; do
3374 - DRI_DRIVERS+=",${i}"
3375 - done
3376 - fi
3377 - ;;
3378 - esac
3379 -}
3380 -
3381 -gallium_enable() {
3382 - case $# in
3383 - # for enabling unconditionally
3384 - 1)
3385 - GALLIUM_DRIVERS+=",$1"
3386 - ;;
3387 - *)
3388 - if use $1; then
3389 - shift
3390 - for i in $@; do
3391 - GALLIUM_DRIVERS+=",${i}"
3392 - done
3393 - fi
3394 - ;;
3395 - esac
3396 -}
3397 -
3398 -vulkan_enable() {
3399 - case $# in
3400 - # for enabling unconditionally
3401 - 1)
3402 - VULKAN_DRIVERS+=",$1"
3403 - ;;
3404 - *)
3405 - if use $1; then
3406 - shift
3407 - for i in $@; do
3408 - VULKAN_DRIVERS+=",${i}"
3409 - done
3410 - fi
3411 - ;;
3412 - esac
3413 -}
3414
3415 diff --git a/media-libs/mesa/mesa-17.2.5.ebuild b/media-libs/mesa/mesa-17.2.5.ebuild
3416 deleted file mode 100644
3417 index 12be4d77969..00000000000
3418 --- a/media-libs/mesa/mesa-17.2.5.ebuild
3419 +++ /dev/null
3420 @@ -1,582 +0,0 @@
3421 -# Copyright 1999-2017 Gentoo Foundation
3422 -# Distributed under the terms of the GNU General Public License v2
3423 -
3424 -EAPI=6
3425 -
3426 -EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git"
3427 -
3428 -if [[ ${PV} = 9999 ]]; then
3429 - GIT_ECLASS="git-r3"
3430 - EXPERIMENTAL="true"
3431 -fi
3432 -
3433 -PYTHON_COMPAT=( python2_7 )
3434 -
3435 -inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
3436 -
3437 -OPENGL_DIR="xorg-x11"
3438 -
3439 -MY_P="${P/_/-}"
3440 -
3441 -DESCRIPTION="OpenGL-like graphic library for Linux"
3442 -HOMEPAGE="https://www.mesa3d.org/"
3443 -
3444 -if [[ $PV == 9999 ]]; then
3445 - SRC_URI=""
3446 -else
3447 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
3448 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
3449 -fi
3450 -
3451 -LICENSE="MIT"
3452 -SLOT="0"
3453 -RESTRICT="!bindist? ( bindist )"
3454 -
3455 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
3456 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
3457 -for card in ${VIDEO_CARDS}; do
3458 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
3459 -done
3460 -
3461 -IUSE="${IUSE_VIDEO_CARDS}
3462 - bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
3463 - +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
3464 - vdpau vulkan wayland xvmc xa"
3465 -
3466 -REQUIRED_USE="
3467 - d3d9? ( dri3 gallium )
3468 - llvm? ( gallium )
3469 - opencl? ( gallium llvm )
3470 - openmax? ( gallium )
3471 - gles1? ( egl )
3472 - gles2? ( egl )
3473 - vaapi? ( gallium )
3474 - vdpau? ( gallium )
3475 - vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
3476 - video_cards_radeonsi? ( llvm ) )
3477 - wayland? ( egl gbm )
3478 - xa? ( gallium )
3479 - video_cards_freedreno? ( gallium )
3480 - video_cards_intel? ( classic )
3481 - video_cards_i915? ( || ( classic gallium ) )
3482 - video_cards_i965? ( classic )
3483 - video_cards_imx? ( gallium )
3484 - video_cards_nouveau? ( || ( classic gallium ) )
3485 - video_cards_radeon? ( || ( classic gallium )
3486 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
3487 - video_cards_r100? ( classic )
3488 - video_cards_r200? ( classic )
3489 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
3490 - video_cards_r600? ( gallium )
3491 - video_cards_radeonsi? ( gallium llvm )
3492 - video_cards_vc4? ( gallium )
3493 - video_cards_virgl? ( gallium )
3494 - video_cards_vivante? ( gallium gbm )
3495 - video_cards_vmware? ( gallium )
3496 -"
3497 -
3498 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.82"
3499 -# keep correct libdrm and dri2proto dep
3500 -# keep blocks in rdepend for binpkg
3501 -RDEPEND="
3502 - !<x11-base/xorg-server-1.7
3503 - !<=x11-proto/xf86driproto-2.0.3
3504 - abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
3505 - classic? ( app-eselect/eselect-mesa )
3506 - gallium? ( app-eselect/eselect-mesa )
3507 - >=app-eselect/eselect-opengl-1.3.0
3508 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
3509 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
3510 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
3511 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
3512 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
3513 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
3514 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
3515 - >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
3516 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
3517 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
3518 - llvm? (
3519 - video_cards_radeonsi? (
3520 - virtual/libelf:0=[${MULTILIB_USEDEP}]
3521 - )
3522 - video_cards_r600? (
3523 - virtual/libelf:0=[${MULTILIB_USEDEP}]
3524 - )
3525 - video_cards_radeon? (
3526 - virtual/libelf:0=[${MULTILIB_USEDEP}]
3527 - )
3528 - )
3529 - opencl? (
3530 - app-eselect/eselect-opencl
3531 - dev-libs/libclc
3532 - virtual/libelf:0=[${MULTILIB_USEDEP}]
3533 - )
3534 - openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
3535 - vaapi? (
3536 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
3537 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
3538 - )
3539 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
3540 - wayland? (
3541 - >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}]
3542 - >=dev-libs/wayland-protocols-1.8
3543 - )
3544 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
3545 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
3546 -
3547 - video_cards_intel? (
3548 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
3549 - )
3550 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
3551 -"
3552 -for card in ${RADEON_CARDS}; do
3553 - RDEPEND="${RDEPEND}
3554 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
3555 - "
3556 -done
3557 -RDEPEND="${RDEPEND}
3558 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
3559 -"
3560 -
3561 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
3562 -# we need to *really* make sure we're not pulling one than more slot
3563 -# simultaneously.
3564 -#
3565 -# How to use it:
3566 -# 1. List all the working slots (with min versions) in ||, newest first.
3567 -# 2. Update the := to specify *max* version, e.g. < 7.
3568 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
3569 -LLVM_MAX_SLOT="5"
3570 -LLVM_DEPSTR="
3571 - || (
3572 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
3573 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
3574 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
3575 - )
3576 - sys-devel/llvm:=[${MULTILIB_USEDEP}]
3577 -"
3578 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
3579 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
3580 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
3581 -RDEPEND="${RDEPEND}
3582 - llvm? (
3583 - opencl? (
3584 - video_cards_r600? (
3585 - ${CLANG_DEPSTR_AMDGPU}
3586 - )
3587 - !video_cards_r600? (
3588 - video_cards_radeonsi? (
3589 - ${CLANG_DEPSTR_AMDGPU}
3590 - )
3591 - )
3592 - !video_cards_r600? (
3593 - !video_cards_radeonsi? (
3594 - video_cards_radeon? (
3595 - ${CLANG_DEPSTR_AMDGPU}
3596 - )
3597 - )
3598 - )
3599 - !video_cards_r600? (
3600 - !video_cards_radeon? (
3601 - !video_cards_radeonsi? (
3602 - ${CLANG_DEPSTR}
3603 - )
3604 - )
3605 - )
3606 - )
3607 - !opencl? (
3608 - video_cards_r600? (
3609 - ${LLVM_DEPSTR_AMDGPU}
3610 - )
3611 - !video_cards_r600? (
3612 - video_cards_radeonsi? (
3613 - ${LLVM_DEPSTR_AMDGPU}
3614 - )
3615 - )
3616 - !video_cards_r600? (
3617 - !video_cards_radeonsi? (
3618 - video_cards_radeon? (
3619 - ${LLVM_DEPSTR_AMDGPU}
3620 - )
3621 - )
3622 - )
3623 - !video_cards_r600? (
3624 - !video_cards_radeon? (
3625 - !video_cards_radeonsi? (
3626 - ${LLVM_DEPSTR}
3627 - )
3628 - )
3629 - )
3630 - )
3631 - )
3632 -"
3633 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
3634 -
3635 -DEPEND="${RDEPEND}
3636 - ${PYTHON_DEPS}
3637 - opencl? (
3638 - >=sys-devel/gcc-4.6
3639 - )
3640 - sys-devel/gettext
3641 - virtual/pkgconfig
3642 - valgrind? ( dev-util/valgrind )
3643 - >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
3644 - dri3? (
3645 - >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
3646 - >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
3647 - )
3648 - >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
3649 - >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
3650 - >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
3651 - >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
3652 -"
3653 -[[ ${PV} == 9999 ]] && DEPEND+="
3654 - sys-devel/bison
3655 - sys-devel/flex
3656 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
3657 -"
3658 -
3659 -S="${WORKDIR}/${MY_P}"
3660 -EGIT_CHECKOUT_DIR=${S}
3661 -
3662 -QA_WX_LOAD="
3663 -x86? (
3664 - !pic? (
3665 - usr/lib*/libglapi.so.0.0.0
3666 - usr/lib*/libGLESv1_CM.so.1.1.0
3667 - usr/lib*/libGLESv2.so.2.0.0
3668 - usr/lib*/libGL.so.1.2.0
3669 - usr/lib*/libOSMesa.so.8.0.0
3670 - )
3671 -)"
3672 -
3673 -llvm_check_deps() {
3674 - local flags=${MULTILIB_USEDEP}
3675 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
3676 - then
3677 - flags+=",llvm_targets_AMDGPU(-)"
3678 - fi
3679 -
3680 - if use opencl; then
3681 - has_version "sys-devel/clang[${flags}]" || return 1
3682 - fi
3683 - has_version "sys-devel/llvm[${flags}]"
3684 -}
3685 -
3686 -pkg_setup() {
3687 - # warning message for bug 459306
3688 - if use llvm && has_version sys-devel/llvm[!debug=]; then
3689 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
3690 - ewarn "detected! This can cause problems. For details, see bug 459306."
3691 - fi
3692 -
3693 - if use llvm; then
3694 - llvm_pkg_setup
3695 - fi
3696 - python-any-r1_pkg_setup
3697 -}
3698 -
3699 -src_prepare() {
3700 - [[ ${PV} == 9999 ]] && eautoreconf
3701 - eapply_user
3702 -}
3703 -
3704 -multilib_src_configure() {
3705 - local myconf
3706 -
3707 - if use classic; then
3708 - # Configurable DRI drivers
3709 - driver_enable swrast
3710 -
3711 - # Intel code
3712 - driver_enable video_cards_i915 i915
3713 - driver_enable video_cards_i965 i965
3714 - if ! use video_cards_i915 && \
3715 - ! use video_cards_i965; then
3716 - driver_enable video_cards_intel i915 i965
3717 - fi
3718 -
3719 - # Nouveau code
3720 - driver_enable video_cards_nouveau nouveau
3721 -
3722 - # ATI code
3723 - driver_enable video_cards_r100 radeon
3724 - driver_enable video_cards_r200 r200
3725 - if ! use video_cards_r100 && \
3726 - ! use video_cards_r200; then
3727 - driver_enable video_cards_radeon radeon r200
3728 - fi
3729 - fi
3730 -
3731 - if use egl; then
3732 - myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
3733 - fi
3734 -
3735 - if use gallium; then
3736 - myconf+="
3737 - $(use_enable d3d9 nine)
3738 - $(use_enable llvm)
3739 - $(use_enable openmax omx)
3740 - $(use_enable vaapi va)
3741 - $(use_enable vdpau)
3742 - $(use_enable xa)
3743 - $(use_enable xvmc)
3744 - "
3745 - use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
3746 -
3747 - gallium_enable swrast
3748 - gallium_enable video_cards_vc4 vc4
3749 - gallium_enable video_cards_vivante etnaviv
3750 - gallium_enable video_cards_vmware svga
3751 - gallium_enable video_cards_nouveau nouveau
3752 - gallium_enable video_cards_i915 i915
3753 - gallium_enable video_cards_imx imx
3754 - if ! use video_cards_i915 && \
3755 - ! use video_cards_i965; then
3756 - gallium_enable video_cards_intel i915
3757 - fi
3758 -
3759 - gallium_enable video_cards_r300 r300
3760 - gallium_enable video_cards_r600 r600
3761 - gallium_enable video_cards_radeonsi radeonsi
3762 - if ! use video_cards_r300 && \
3763 - ! use video_cards_r600; then
3764 - gallium_enable video_cards_radeon r300 r600
3765 - fi
3766 -
3767 - gallium_enable video_cards_freedreno freedreno
3768 - # opencl stuff
3769 - if use opencl; then
3770 - myconf+="
3771 - $(use_enable opencl)
3772 - --with-clang-libdir="${EPREFIX}/usr/lib"
3773 - "
3774 - fi
3775 -
3776 - gallium_enable video_cards_virgl virgl
3777 - fi
3778 -
3779 - if use vulkan; then
3780 - vulkan_enable video_cards_i965 intel
3781 - vulkan_enable video_cards_radeonsi radeon
3782 - fi
3783 -
3784 - # x86 hardened pax_kernel needs glx-rts, bug 240956
3785 - if [[ ${ABI} == x86 ]]; then
3786 - myconf+=" $(use_enable pax_kernel glx-read-only-text)"
3787 - fi
3788 -
3789 - # on abi_x86_32 hardened we need to have asm disable
3790 - if [[ ${ABI} == x86* ]] && use pic; then
3791 - myconf+=" --disable-asm"
3792 - fi
3793 -
3794 - if use gallium; then
3795 - myconf+=" $(use_enable osmesa gallium-osmesa)"
3796 - else
3797 - myconf+=" $(use_enable osmesa)"
3798 - fi
3799 -
3800 - # build fails with BSD indent, bug #428112
3801 - use userland_GNU || export INDENT=cat
3802 -
3803 - ECONF_SOURCE="${S}" \
3804 - econf \
3805 - --enable-dri \
3806 - --enable-glx \
3807 - --enable-shared-glapi \
3808 - $(use_enable !bindist texture-float) \
3809 - $(use_enable d3d9 nine) \
3810 - $(use_enable debug) \
3811 - $(use_enable dri3) \
3812 - $(use_enable egl) \
3813 - $(use_enable gbm) \
3814 - $(use_enable gles1) \
3815 - $(use_enable gles2) \
3816 - $(use_enable nptl glx-tls) \
3817 - $(use_enable unwind libunwind) \
3818 - --enable-valgrind=$(usex valgrind auto no) \
3819 - --enable-llvm-shared-libs \
3820 - --with-dri-drivers=${DRI_DRIVERS} \
3821 - --with-gallium-drivers=${GALLIUM_DRIVERS} \
3822 - --with-vulkan-drivers=${VULKAN_DRIVERS} \
3823 - PYTHON2="${PYTHON}" \
3824 - ${myconf}
3825 -}
3826 -
3827 -multilib_src_install() {
3828 - emake install DESTDIR="${D}"
3829 -
3830 - if use classic || use gallium; then
3831 - ebegin "Moving DRI/Gallium drivers for dynamic switching"
3832 - local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
3833 - keepdir /usr/$(get_libdir)/dri
3834 - dodir /usr/$(get_libdir)/mesa
3835 - for x in ${gallium_drivers[@]}; do
3836 - if [ -f "$(get_libdir)/gallium/${x}" ]; then
3837 - mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
3838 - || die "Failed to move ${x}"
3839 - fi
3840 - done
3841 - if use classic; then
3842 - emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
3843 - fi
3844 - for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
3845 - if [ -f ${x} -o -L ${x} ]; then
3846 - mv -f "${x}" "${x/dri/mesa}" \
3847 - || die "Failed to move ${x}"
3848 - fi
3849 - done
3850 - pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
3851 - ln -s ../mesa/*.so . || die "Creating symlink failed"
3852 - # remove symlinks to drivers known to eselect
3853 - for x in ${gallium_drivers[@]}; do
3854 - if [ -f ${x} -o -L ${x} ]; then
3855 - rm "${x}" || die "Failed to remove ${x}"
3856 - fi
3857 - done
3858 - popd
3859 - eend $?
3860 - fi
3861 - if use opencl; then
3862 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
3863 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
3864 - dodir ${cl_dir}/{lib,include}
3865 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
3866 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
3867 - "${ED}"${cl_dir}
3868 - fi
3869 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
3870 - mv -f "${ED}"/usr/include/CL \
3871 - "${ED}"${cl_dir}/include
3872 - fi
3873 - eend $?
3874 - fi
3875 -
3876 - if use openmax; then
3877 - echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
3878 - doenvd "${T}"/99mesaxdgomx
3879 - keepdir /usr/share/mesa/xdg
3880 - fi
3881 -}
3882 -
3883 -multilib_src_install_all() {
3884 - find "${ED}" -name '*.la' -delete
3885 - einstalldocs
3886 -
3887 - if use !bindist; then
3888 - dodoc docs/patents.txt
3889 - fi
3890 -
3891 - # Install config file for eselect mesa
3892 - insinto /usr/share/mesa
3893 - newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
3894 -}
3895 -
3896 -multilib_src_test() {
3897 - if use llvm; then
3898 - local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
3899 - pushd src/gallium/drivers/llvmpipe >/dev/null || die
3900 - emake ${llvm_tests}
3901 - pax-mark m ${llvm_tests}
3902 - popd >/dev/null || die
3903 - fi
3904 - emake check
3905 -}
3906 -
3907 -pkg_postinst() {
3908 - # Switch to the xorg implementation.
3909 - echo
3910 - eselect opengl set --use-old ${OPENGL_DIR}
3911 -
3912 - # Select classic/gallium drivers
3913 - if use classic || use gallium; then
3914 - eselect mesa set --auto
3915 - fi
3916 -
3917 - # Switch to mesa opencl
3918 - if use opencl; then
3919 - eselect opencl set --use-old ${PN}
3920 - fi
3921 -
3922 - # run omxregister-bellagio to make the OpenMAX drivers known system-wide
3923 - if use openmax; then
3924 - ebegin "Registering OpenMAX drivers"
3925 - BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
3926 - OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
3927 - omxregister-bellagio
3928 - eend $?
3929 - fi
3930 -
3931 - # warn about patent encumbered texture-float
3932 - if use !bindist; then
3933 - elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
3934 - elog "enabled. Please see patents.txt for an explanation."
3935 - fi
3936 -
3937 - if ! has_version media-libs/libtxc_dxtn; then
3938 - elog "Note that in order to have full S3TC support, it is necessary to install"
3939 - elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
3940 - elog "textures in some apps, and some others even require this to run."
3941 - fi
3942 -}
3943 -
3944 -pkg_prerm() {
3945 - if use openmax; then
3946 - rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
3947 - fi
3948 -}
3949 -
3950 -# $1 - VIDEO_CARDS flag
3951 -# other args - names of DRI drivers to enable
3952 -# TODO: avoid code duplication for a more elegant implementation
3953 -driver_enable() {
3954 - case $# in
3955 - # for enabling unconditionally
3956 - 1)
3957 - DRI_DRIVERS+=",$1"
3958 - ;;
3959 - *)
3960 - if use $1; then
3961 - shift
3962 - for i in $@; do
3963 - DRI_DRIVERS+=",${i}"
3964 - done
3965 - fi
3966 - ;;
3967 - esac
3968 -}
3969 -
3970 -gallium_enable() {
3971 - case $# in
3972 - # for enabling unconditionally
3973 - 1)
3974 - GALLIUM_DRIVERS+=",$1"
3975 - ;;
3976 - *)
3977 - if use $1; then
3978 - shift
3979 - for i in $@; do
3980 - GALLIUM_DRIVERS+=",${i}"
3981 - done
3982 - fi
3983 - ;;
3984 - esac
3985 -}
3986 -
3987 -vulkan_enable() {
3988 - case $# in
3989 - # for enabling unconditionally
3990 - 1)
3991 - VULKAN_DRIVERS+=",$1"
3992 - ;;
3993 - *)
3994 - if use $1; then
3995 - shift
3996 - for i in $@; do
3997 - VULKAN_DRIVERS+=",${i}"
3998 - done
3999 - fi
4000 - ;;
4001 - esac
4002 -}
4003
4004 diff --git a/media-libs/mesa/mesa-17.3.0_rc2.ebuild b/media-libs/mesa/mesa-17.3.0_rc2.ebuild
4005 deleted file mode 100644
4006 index 03a35c8a2c1..00000000000
4007 --- a/media-libs/mesa/mesa-17.3.0_rc2.ebuild
4008 +++ /dev/null
4009 @@ -1,585 +0,0 @@
4010 -# Copyright 1999-2017 Gentoo Foundation
4011 -# Distributed under the terms of the GNU General Public License v2
4012 -
4013 -EAPI=6
4014 -
4015 -EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git"
4016 -
4017 -if [[ ${PV} = 9999 ]]; then
4018 - GIT_ECLASS="git-r3"
4019 - EXPERIMENTAL="true"
4020 -fi
4021 -
4022 -PYTHON_COMPAT=( python2_7 )
4023 -
4024 -inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
4025 -
4026 -OPENGL_DIR="xorg-x11"
4027 -
4028 -MY_P="${P/_/-}"
4029 -
4030 -DESCRIPTION="OpenGL-like graphic library for Linux"
4031 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
4032 -
4033 -if [[ $PV == 9999 ]]; then
4034 - SRC_URI=""
4035 -else
4036 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
4037 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
4038 -fi
4039 -
4040 -LICENSE="MIT"
4041 -SLOT="0"
4042 -RESTRICT="!bindist? ( bindist )"
4043 -
4044 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
4045 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
4046 -for card in ${VIDEO_CARDS}; do
4047 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
4048 -done
4049 -
4050 -IUSE="${IUSE_VIDEO_CARDS}
4051 - bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
4052 - +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
4053 - vdpau vulkan wayland xvmc xa"
4054 -
4055 -REQUIRED_USE="
4056 - d3d9? ( dri3 gallium )
4057 - llvm? ( gallium )
4058 - opencl? ( gallium llvm )
4059 - openmax? ( gallium )
4060 - gles1? ( egl )
4061 - gles2? ( egl )
4062 - vaapi? ( gallium )
4063 - vdpau? ( gallium )
4064 - vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
4065 - video_cards_radeonsi? ( llvm ) )
4066 - wayland? ( egl gbm )
4067 - xa? ( gallium )
4068 - video_cards_freedreno? ( gallium )
4069 - video_cards_intel? ( classic )
4070 - video_cards_i915? ( || ( classic gallium ) )
4071 - video_cards_i965? ( classic )
4072 - video_cards_imx? ( gallium video_cards_vivante )
4073 - video_cards_nouveau? ( || ( classic gallium ) )
4074 - video_cards_radeon? ( || ( classic gallium )
4075 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
4076 - video_cards_r100? ( classic )
4077 - video_cards_r200? ( classic )
4078 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
4079 - video_cards_r600? ( gallium )
4080 - video_cards_radeonsi? ( gallium llvm )
4081 - video_cards_vc4? ( gallium )
4082 - video_cards_virgl? ( gallium )
4083 - video_cards_vivante? ( gallium gbm )
4084 - video_cards_vmware? ( gallium )
4085 -"
4086 -
4087 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.85"
4088 -# keep correct libdrm and dri2proto dep
4089 -# keep blocks in rdepend for binpkg
4090 -RDEPEND="
4091 - !<x11-base/xorg-server-1.7
4092 - !<=x11-proto/xf86driproto-2.0.3
4093 - abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
4094 - classic? ( app-eselect/eselect-mesa )
4095 - gallium? ( app-eselect/eselect-mesa )
4096 - >=app-eselect/eselect-opengl-1.3.0
4097 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
4098 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
4099 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
4100 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
4101 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
4102 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
4103 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
4104 - >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
4105 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
4106 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
4107 - llvm? (
4108 - video_cards_radeonsi? (
4109 - virtual/libelf:0=[${MULTILIB_USEDEP}]
4110 - )
4111 - video_cards_r600? (
4112 - virtual/libelf:0=[${MULTILIB_USEDEP}]
4113 - )
4114 - video_cards_radeon? (
4115 - virtual/libelf:0=[${MULTILIB_USEDEP}]
4116 - )
4117 - )
4118 - opencl? (
4119 - app-eselect/eselect-opencl
4120 - dev-libs/libclc
4121 - virtual/libelf:0=[${MULTILIB_USEDEP}]
4122 - )
4123 - openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
4124 - vaapi? (
4125 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
4126 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
4127 - )
4128 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
4129 - wayland? (
4130 - >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}]
4131 - >=dev-libs/wayland-protocols-1.8
4132 - )
4133 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
4134 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
4135 -
4136 - video_cards_intel? (
4137 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
4138 - )
4139 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
4140 -"
4141 -for card in ${RADEON_CARDS}; do
4142 - RDEPEND="${RDEPEND}
4143 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
4144 - "
4145 -done
4146 -RDEPEND="${RDEPEND}
4147 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
4148 -"
4149 -
4150 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
4151 -# we need to *really* make sure we're not pulling one than more slot
4152 -# simultaneously.
4153 -#
4154 -# How to use it:
4155 -# 1. List all the working slots (with min versions) in ||, newest first.
4156 -# 2. Update the := to specify *max* version, e.g. < 7.
4157 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
4158 -LLVM_DEPSTR="
4159 - || (
4160 - sys-devel/llvm:6[${MULTILIB_USEDEP}]
4161 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
4162 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
4163 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
4164 - )
4165 - sys-devel/llvm:=[${MULTILIB_USEDEP}]
4166 -"
4167 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
4168 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
4169 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
4170 -RDEPEND="${RDEPEND}
4171 - llvm? (
4172 - opencl? (
4173 - video_cards_r600? (
4174 - ${CLANG_DEPSTR_AMDGPU}
4175 - )
4176 - !video_cards_r600? (
4177 - video_cards_radeonsi? (
4178 - ${CLANG_DEPSTR_AMDGPU}
4179 - )
4180 - )
4181 - !video_cards_r600? (
4182 - !video_cards_radeonsi? (
4183 - video_cards_radeon? (
4184 - ${CLANG_DEPSTR_AMDGPU}
4185 - )
4186 - )
4187 - )
4188 - !video_cards_r600? (
4189 - !video_cards_radeon? (
4190 - !video_cards_radeonsi? (
4191 - ${CLANG_DEPSTR}
4192 - )
4193 - )
4194 - )
4195 - )
4196 - !opencl? (
4197 - video_cards_r600? (
4198 - ${LLVM_DEPSTR_AMDGPU}
4199 - )
4200 - !video_cards_r600? (
4201 - video_cards_radeonsi? (
4202 - ${LLVM_DEPSTR_AMDGPU}
4203 - )
4204 - )
4205 - !video_cards_r600? (
4206 - !video_cards_radeonsi? (
4207 - video_cards_radeon? (
4208 - ${LLVM_DEPSTR_AMDGPU}
4209 - )
4210 - )
4211 - )
4212 - !video_cards_r600? (
4213 - !video_cards_radeon? (
4214 - !video_cards_radeonsi? (
4215 - ${LLVM_DEPSTR}
4216 - )
4217 - )
4218 - )
4219 - )
4220 - )
4221 -"
4222 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
4223 -
4224 -DEPEND="${RDEPEND}
4225 - ${PYTHON_DEPS}
4226 - opencl? (
4227 - >=sys-devel/gcc-4.6
4228 - )
4229 - sys-devel/gettext
4230 - virtual/pkgconfig
4231 - valgrind? ( dev-util/valgrind )
4232 - >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
4233 - dri3? (
4234 - >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
4235 - >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
4236 - )
4237 - >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
4238 - >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
4239 - >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
4240 - >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
4241 - vulkan? (
4242 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
4243 - )
4244 -"
4245 -[[ ${PV} == 9999 ]] && DEPEND+="
4246 - sys-devel/bison
4247 - sys-devel/flex
4248 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
4249 -"
4250 -
4251 -S="${WORKDIR}/${MY_P}"
4252 -EGIT_CHECKOUT_DIR=${S}
4253 -
4254 -QA_WX_LOAD="
4255 -x86? (
4256 - !pic? (
4257 - usr/lib*/libglapi.so.0.0.0
4258 - usr/lib*/libGLESv1_CM.so.1.1.0
4259 - usr/lib*/libGLESv2.so.2.0.0
4260 - usr/lib*/libGL.so.1.2.0
4261 - usr/lib*/libOSMesa.so.8.0.0
4262 - )
4263 -)"
4264 -
4265 -llvm_check_deps() {
4266 - local flags=${MULTILIB_USEDEP}
4267 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
4268 - then
4269 - flags+=",llvm_targets_AMDGPU(-)"
4270 - fi
4271 -
4272 - if use opencl; then
4273 - has_version "sys-devel/clang[${flags}]" || return 1
4274 - fi
4275 - has_version "sys-devel/llvm[${flags}]"
4276 -}
4277 -
4278 -pkg_setup() {
4279 - # warning message for bug 459306
4280 - if use llvm && has_version sys-devel/llvm[!debug=]; then
4281 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
4282 - ewarn "detected! This can cause problems. For details, see bug 459306."
4283 - fi
4284 -
4285 - if use llvm; then
4286 - llvm_pkg_setup
4287 - fi
4288 - python-any-r1_pkg_setup
4289 -}
4290 -
4291 -src_prepare() {
4292 - [[ ${PV} == 9999 ]] && eautoreconf
4293 - eapply_user
4294 -}
4295 -
4296 -multilib_src_configure() {
4297 - local myconf
4298 -
4299 - if use classic; then
4300 - # Configurable DRI drivers
4301 - driver_enable swrast
4302 -
4303 - # Intel code
4304 - driver_enable video_cards_i915 i915
4305 - driver_enable video_cards_i965 i965
4306 - if ! use video_cards_i915 && \
4307 - ! use video_cards_i965; then
4308 - driver_enable video_cards_intel i915 i965
4309 - fi
4310 -
4311 - # Nouveau code
4312 - driver_enable video_cards_nouveau nouveau
4313 -
4314 - # ATI code
4315 - driver_enable video_cards_r100 radeon
4316 - driver_enable video_cards_r200 r200
4317 - if ! use video_cards_r100 && \
4318 - ! use video_cards_r200; then
4319 - driver_enable video_cards_radeon radeon r200
4320 - fi
4321 - fi
4322 -
4323 - if use egl; then
4324 - myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
4325 - fi
4326 -
4327 - if use gallium; then
4328 - myconf+="
4329 - $(use_enable d3d9 nine)
4330 - $(use_enable llvm)
4331 - $(use_enable openmax omx-bellagio)
4332 - $(use_enable vaapi va)
4333 - $(use_enable vdpau)
4334 - $(use_enable xa)
4335 - $(use_enable xvmc)
4336 - "
4337 - use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
4338 -
4339 - gallium_enable swrast
4340 - gallium_enable video_cards_vc4 vc4
4341 - gallium_enable video_cards_vivante etnaviv
4342 - gallium_enable video_cards_vmware svga
4343 - gallium_enable video_cards_nouveau nouveau
4344 - gallium_enable video_cards_i915 i915
4345 - gallium_enable video_cards_imx imx
4346 - if ! use video_cards_i915 && \
4347 - ! use video_cards_i965; then
4348 - gallium_enable video_cards_intel i915
4349 - fi
4350 -
4351 - gallium_enable video_cards_r300 r300
4352 - gallium_enable video_cards_r600 r600
4353 - gallium_enable video_cards_radeonsi radeonsi
4354 - if ! use video_cards_r300 && \
4355 - ! use video_cards_r600; then
4356 - gallium_enable video_cards_radeon r300 r600
4357 - fi
4358 -
4359 - gallium_enable video_cards_freedreno freedreno
4360 - # opencl stuff
4361 - if use opencl; then
4362 - myconf+="
4363 - $(use_enable opencl)
4364 - --with-clang-libdir="${EPREFIX}/usr/lib"
4365 - "
4366 - fi
4367 -
4368 - gallium_enable video_cards_virgl virgl
4369 - fi
4370 -
4371 - if use vulkan; then
4372 - vulkan_enable video_cards_i965 intel
4373 - vulkan_enable video_cards_radeonsi radeon
4374 - fi
4375 -
4376 - # x86 hardened pax_kernel needs glx-rts, bug 240956
4377 - if [[ ${ABI} == x86 ]]; then
4378 - myconf+=" $(use_enable pax_kernel glx-read-only-text)"
4379 - fi
4380 -
4381 - # on abi_x86_32 hardened we need to have asm disable
4382 - if [[ ${ABI} == x86* ]] && use pic; then
4383 - myconf+=" --disable-asm"
4384 - fi
4385 -
4386 - if use gallium; then
4387 - myconf+=" $(use_enable osmesa gallium-osmesa)"
4388 - else
4389 - myconf+=" $(use_enable osmesa)"
4390 - fi
4391 -
4392 - # build fails with BSD indent, bug #428112
4393 - use userland_GNU || export INDENT=cat
4394 -
4395 - ECONF_SOURCE="${S}" \
4396 - econf \
4397 - --enable-dri \
4398 - --enable-glx \
4399 - --enable-shared-glapi \
4400 - $(use_enable !bindist texture-float) \
4401 - $(use_enable d3d9 nine) \
4402 - $(use_enable debug) \
4403 - $(use_enable dri3) \
4404 - $(use_enable egl) \
4405 - $(use_enable gbm) \
4406 - $(use_enable gles1) \
4407 - $(use_enable gles2) \
4408 - $(use_enable nptl glx-tls) \
4409 - $(use_enable unwind libunwind) \
4410 - --enable-valgrind=$(usex valgrind auto no) \
4411 - --enable-llvm-shared-libs \
4412 - --with-dri-drivers=${DRI_DRIVERS} \
4413 - --with-gallium-drivers=${GALLIUM_DRIVERS} \
4414 - --with-vulkan-drivers=${VULKAN_DRIVERS} \
4415 - PYTHON2="${PYTHON}" \
4416 - ${myconf}
4417 -}
4418 -
4419 -multilib_src_install() {
4420 - emake install DESTDIR="${D}"
4421 -
4422 - if use classic || use gallium; then
4423 - ebegin "Moving DRI/Gallium drivers for dynamic switching"
4424 - local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
4425 - keepdir /usr/$(get_libdir)/dri
4426 - dodir /usr/$(get_libdir)/mesa
4427 - for x in ${gallium_drivers[@]}; do
4428 - if [ -f "$(get_libdir)/gallium/${x}" ]; then
4429 - mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
4430 - || die "Failed to move ${x}"
4431 - fi
4432 - done
4433 - if use classic; then
4434 - emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
4435 - fi
4436 - for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
4437 - if [ -f ${x} -o -L ${x} ]; then
4438 - mv -f "${x}" "${x/dri/mesa}" \
4439 - || die "Failed to move ${x}"
4440 - fi
4441 - done
4442 - pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
4443 - ln -s ../mesa/*.so . || die "Creating symlink failed"
4444 - # remove symlinks to drivers known to eselect
4445 - for x in ${gallium_drivers[@]}; do
4446 - if [ -f ${x} -o -L ${x} ]; then
4447 - rm "${x}" || die "Failed to remove ${x}"
4448 - fi
4449 - done
4450 - popd
4451 - eend $?
4452 - fi
4453 - if use opencl; then
4454 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
4455 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
4456 - dodir ${cl_dir}/{lib,include}
4457 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
4458 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
4459 - "${ED}"${cl_dir}
4460 - fi
4461 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
4462 - mv -f "${ED}"/usr/include/CL \
4463 - "${ED}"${cl_dir}/include
4464 - fi
4465 - eend $?
4466 - fi
4467 -
4468 - if use openmax; then
4469 - echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
4470 - doenvd "${T}"/99mesaxdgomx
4471 - keepdir /usr/share/mesa/xdg
4472 - fi
4473 -}
4474 -
4475 -multilib_src_install_all() {
4476 - find "${ED}" -name '*.la' -delete
4477 - einstalldocs
4478 -
4479 - if use !bindist; then
4480 - dodoc docs/patents.txt
4481 - fi
4482 -
4483 - # Install config file for eselect mesa
4484 - insinto /usr/share/mesa
4485 - newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
4486 -}
4487 -
4488 -multilib_src_test() {
4489 - if use llvm; then
4490 - local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
4491 - pushd src/gallium/drivers/llvmpipe >/dev/null || die
4492 - emake ${llvm_tests}
4493 - pax-mark m ${llvm_tests}
4494 - popd >/dev/null || die
4495 - fi
4496 - emake check
4497 -}
4498 -
4499 -pkg_postinst() {
4500 - # Switch to the xorg implementation.
4501 - echo
4502 - eselect opengl set --use-old ${OPENGL_DIR}
4503 -
4504 - # Select classic/gallium drivers
4505 - if use classic || use gallium; then
4506 - eselect mesa set --auto
4507 - fi
4508 -
4509 - # Switch to mesa opencl
4510 - if use opencl; then
4511 - eselect opencl set --use-old ${PN}
4512 - fi
4513 -
4514 - # run omxregister-bellagio to make the OpenMAX drivers known system-wide
4515 - if use openmax; then
4516 - ebegin "Registering OpenMAX drivers"
4517 - BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
4518 - OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
4519 - omxregister-bellagio
4520 - eend $?
4521 - fi
4522 -
4523 - # warn about patent encumbered texture-float
4524 - if use !bindist; then
4525 - elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
4526 - elog "enabled. Please see patents.txt for an explanation."
4527 - fi
4528 -
4529 - if ! has_version media-libs/libtxc_dxtn; then
4530 - elog "Note that in order to have full S3TC support, it is necessary to install"
4531 - elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
4532 - elog "textures in some apps, and some others even require this to run."
4533 - fi
4534 -}
4535 -
4536 -pkg_prerm() {
4537 - if use openmax; then
4538 - rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
4539 - fi
4540 -}
4541 -
4542 -# $1 - VIDEO_CARDS flag
4543 -# other args - names of DRI drivers to enable
4544 -# TODO: avoid code duplication for a more elegant implementation
4545 -driver_enable() {
4546 - case $# in
4547 - # for enabling unconditionally
4548 - 1)
4549 - DRI_DRIVERS+=",$1"
4550 - ;;
4551 - *)
4552 - if use $1; then
4553 - shift
4554 - for i in $@; do
4555 - DRI_DRIVERS+=",${i}"
4556 - done
4557 - fi
4558 - ;;
4559 - esac
4560 -}
4561 -
4562 -gallium_enable() {
4563 - case $# in
4564 - # for enabling unconditionally
4565 - 1)
4566 - GALLIUM_DRIVERS+=",$1"
4567 - ;;
4568 - *)
4569 - if use $1; then
4570 - shift
4571 - for i in $@; do
4572 - GALLIUM_DRIVERS+=",${i}"
4573 - done
4574 - fi
4575 - ;;
4576 - esac
4577 -}
4578 -
4579 -vulkan_enable() {
4580 - case $# in
4581 - # for enabling unconditionally
4582 - 1)
4583 - VULKAN_DRIVERS+=",$1"
4584 - ;;
4585 - *)
4586 - if use $1; then
4587 - shift
4588 - for i in $@; do
4589 - VULKAN_DRIVERS+=",${i}"
4590 - done
4591 - fi
4592 - ;;
4593 - esac
4594 -}
4595
4596 diff --git a/media-libs/mesa/mesa-17.3.0_rc3.ebuild b/media-libs/mesa/mesa-17.3.0_rc3.ebuild
4597 deleted file mode 100644
4598 index 03a35c8a2c1..00000000000
4599 --- a/media-libs/mesa/mesa-17.3.0_rc3.ebuild
4600 +++ /dev/null
4601 @@ -1,585 +0,0 @@
4602 -# Copyright 1999-2017 Gentoo Foundation
4603 -# Distributed under the terms of the GNU General Public License v2
4604 -
4605 -EAPI=6
4606 -
4607 -EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git"
4608 -
4609 -if [[ ${PV} = 9999 ]]; then
4610 - GIT_ECLASS="git-r3"
4611 - EXPERIMENTAL="true"
4612 -fi
4613 -
4614 -PYTHON_COMPAT=( python2_7 )
4615 -
4616 -inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
4617 -
4618 -OPENGL_DIR="xorg-x11"
4619 -
4620 -MY_P="${P/_/-}"
4621 -
4622 -DESCRIPTION="OpenGL-like graphic library for Linux"
4623 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
4624 -
4625 -if [[ $PV == 9999 ]]; then
4626 - SRC_URI=""
4627 -else
4628 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
4629 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
4630 -fi
4631 -
4632 -LICENSE="MIT"
4633 -SLOT="0"
4634 -RESTRICT="!bindist? ( bindist )"
4635 -
4636 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
4637 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
4638 -for card in ${VIDEO_CARDS}; do
4639 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
4640 -done
4641 -
4642 -IUSE="${IUSE_VIDEO_CARDS}
4643 - bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
4644 - +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
4645 - vdpau vulkan wayland xvmc xa"
4646 -
4647 -REQUIRED_USE="
4648 - d3d9? ( dri3 gallium )
4649 - llvm? ( gallium )
4650 - opencl? ( gallium llvm )
4651 - openmax? ( gallium )
4652 - gles1? ( egl )
4653 - gles2? ( egl )
4654 - vaapi? ( gallium )
4655 - vdpau? ( gallium )
4656 - vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
4657 - video_cards_radeonsi? ( llvm ) )
4658 - wayland? ( egl gbm )
4659 - xa? ( gallium )
4660 - video_cards_freedreno? ( gallium )
4661 - video_cards_intel? ( classic )
4662 - video_cards_i915? ( || ( classic gallium ) )
4663 - video_cards_i965? ( classic )
4664 - video_cards_imx? ( gallium video_cards_vivante )
4665 - video_cards_nouveau? ( || ( classic gallium ) )
4666 - video_cards_radeon? ( || ( classic gallium )
4667 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
4668 - video_cards_r100? ( classic )
4669 - video_cards_r200? ( classic )
4670 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
4671 - video_cards_r600? ( gallium )
4672 - video_cards_radeonsi? ( gallium llvm )
4673 - video_cards_vc4? ( gallium )
4674 - video_cards_virgl? ( gallium )
4675 - video_cards_vivante? ( gallium gbm )
4676 - video_cards_vmware? ( gallium )
4677 -"
4678 -
4679 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.85"
4680 -# keep correct libdrm and dri2proto dep
4681 -# keep blocks in rdepend for binpkg
4682 -RDEPEND="
4683 - !<x11-base/xorg-server-1.7
4684 - !<=x11-proto/xf86driproto-2.0.3
4685 - abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
4686 - classic? ( app-eselect/eselect-mesa )
4687 - gallium? ( app-eselect/eselect-mesa )
4688 - >=app-eselect/eselect-opengl-1.3.0
4689 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
4690 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
4691 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
4692 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
4693 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
4694 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
4695 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
4696 - >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
4697 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
4698 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
4699 - llvm? (
4700 - video_cards_radeonsi? (
4701 - virtual/libelf:0=[${MULTILIB_USEDEP}]
4702 - )
4703 - video_cards_r600? (
4704 - virtual/libelf:0=[${MULTILIB_USEDEP}]
4705 - )
4706 - video_cards_radeon? (
4707 - virtual/libelf:0=[${MULTILIB_USEDEP}]
4708 - )
4709 - )
4710 - opencl? (
4711 - app-eselect/eselect-opencl
4712 - dev-libs/libclc
4713 - virtual/libelf:0=[${MULTILIB_USEDEP}]
4714 - )
4715 - openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
4716 - vaapi? (
4717 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
4718 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
4719 - )
4720 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
4721 - wayland? (
4722 - >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}]
4723 - >=dev-libs/wayland-protocols-1.8
4724 - )
4725 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
4726 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
4727 -
4728 - video_cards_intel? (
4729 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
4730 - )
4731 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
4732 -"
4733 -for card in ${RADEON_CARDS}; do
4734 - RDEPEND="${RDEPEND}
4735 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
4736 - "
4737 -done
4738 -RDEPEND="${RDEPEND}
4739 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
4740 -"
4741 -
4742 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
4743 -# we need to *really* make sure we're not pulling one than more slot
4744 -# simultaneously.
4745 -#
4746 -# How to use it:
4747 -# 1. List all the working slots (with min versions) in ||, newest first.
4748 -# 2. Update the := to specify *max* version, e.g. < 7.
4749 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
4750 -LLVM_DEPSTR="
4751 - || (
4752 - sys-devel/llvm:6[${MULTILIB_USEDEP}]
4753 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
4754 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
4755 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
4756 - )
4757 - sys-devel/llvm:=[${MULTILIB_USEDEP}]
4758 -"
4759 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
4760 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
4761 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
4762 -RDEPEND="${RDEPEND}
4763 - llvm? (
4764 - opencl? (
4765 - video_cards_r600? (
4766 - ${CLANG_DEPSTR_AMDGPU}
4767 - )
4768 - !video_cards_r600? (
4769 - video_cards_radeonsi? (
4770 - ${CLANG_DEPSTR_AMDGPU}
4771 - )
4772 - )
4773 - !video_cards_r600? (
4774 - !video_cards_radeonsi? (
4775 - video_cards_radeon? (
4776 - ${CLANG_DEPSTR_AMDGPU}
4777 - )
4778 - )
4779 - )
4780 - !video_cards_r600? (
4781 - !video_cards_radeon? (
4782 - !video_cards_radeonsi? (
4783 - ${CLANG_DEPSTR}
4784 - )
4785 - )
4786 - )
4787 - )
4788 - !opencl? (
4789 - video_cards_r600? (
4790 - ${LLVM_DEPSTR_AMDGPU}
4791 - )
4792 - !video_cards_r600? (
4793 - video_cards_radeonsi? (
4794 - ${LLVM_DEPSTR_AMDGPU}
4795 - )
4796 - )
4797 - !video_cards_r600? (
4798 - !video_cards_radeonsi? (
4799 - video_cards_radeon? (
4800 - ${LLVM_DEPSTR_AMDGPU}
4801 - )
4802 - )
4803 - )
4804 - !video_cards_r600? (
4805 - !video_cards_radeon? (
4806 - !video_cards_radeonsi? (
4807 - ${LLVM_DEPSTR}
4808 - )
4809 - )
4810 - )
4811 - )
4812 - )
4813 -"
4814 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
4815 -
4816 -DEPEND="${RDEPEND}
4817 - ${PYTHON_DEPS}
4818 - opencl? (
4819 - >=sys-devel/gcc-4.6
4820 - )
4821 - sys-devel/gettext
4822 - virtual/pkgconfig
4823 - valgrind? ( dev-util/valgrind )
4824 - >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
4825 - dri3? (
4826 - >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
4827 - >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
4828 - )
4829 - >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
4830 - >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
4831 - >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
4832 - >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
4833 - vulkan? (
4834 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
4835 - )
4836 -"
4837 -[[ ${PV} == 9999 ]] && DEPEND+="
4838 - sys-devel/bison
4839 - sys-devel/flex
4840 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
4841 -"
4842 -
4843 -S="${WORKDIR}/${MY_P}"
4844 -EGIT_CHECKOUT_DIR=${S}
4845 -
4846 -QA_WX_LOAD="
4847 -x86? (
4848 - !pic? (
4849 - usr/lib*/libglapi.so.0.0.0
4850 - usr/lib*/libGLESv1_CM.so.1.1.0
4851 - usr/lib*/libGLESv2.so.2.0.0
4852 - usr/lib*/libGL.so.1.2.0
4853 - usr/lib*/libOSMesa.so.8.0.0
4854 - )
4855 -)"
4856 -
4857 -llvm_check_deps() {
4858 - local flags=${MULTILIB_USEDEP}
4859 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
4860 - then
4861 - flags+=",llvm_targets_AMDGPU(-)"
4862 - fi
4863 -
4864 - if use opencl; then
4865 - has_version "sys-devel/clang[${flags}]" || return 1
4866 - fi
4867 - has_version "sys-devel/llvm[${flags}]"
4868 -}
4869 -
4870 -pkg_setup() {
4871 - # warning message for bug 459306
4872 - if use llvm && has_version sys-devel/llvm[!debug=]; then
4873 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
4874 - ewarn "detected! This can cause problems. For details, see bug 459306."
4875 - fi
4876 -
4877 - if use llvm; then
4878 - llvm_pkg_setup
4879 - fi
4880 - python-any-r1_pkg_setup
4881 -}
4882 -
4883 -src_prepare() {
4884 - [[ ${PV} == 9999 ]] && eautoreconf
4885 - eapply_user
4886 -}
4887 -
4888 -multilib_src_configure() {
4889 - local myconf
4890 -
4891 - if use classic; then
4892 - # Configurable DRI drivers
4893 - driver_enable swrast
4894 -
4895 - # Intel code
4896 - driver_enable video_cards_i915 i915
4897 - driver_enable video_cards_i965 i965
4898 - if ! use video_cards_i915 && \
4899 - ! use video_cards_i965; then
4900 - driver_enable video_cards_intel i915 i965
4901 - fi
4902 -
4903 - # Nouveau code
4904 - driver_enable video_cards_nouveau nouveau
4905 -
4906 - # ATI code
4907 - driver_enable video_cards_r100 radeon
4908 - driver_enable video_cards_r200 r200
4909 - if ! use video_cards_r100 && \
4910 - ! use video_cards_r200; then
4911 - driver_enable video_cards_radeon radeon r200
4912 - fi
4913 - fi
4914 -
4915 - if use egl; then
4916 - myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
4917 - fi
4918 -
4919 - if use gallium; then
4920 - myconf+="
4921 - $(use_enable d3d9 nine)
4922 - $(use_enable llvm)
4923 - $(use_enable openmax omx-bellagio)
4924 - $(use_enable vaapi va)
4925 - $(use_enable vdpau)
4926 - $(use_enable xa)
4927 - $(use_enable xvmc)
4928 - "
4929 - use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
4930 -
4931 - gallium_enable swrast
4932 - gallium_enable video_cards_vc4 vc4
4933 - gallium_enable video_cards_vivante etnaviv
4934 - gallium_enable video_cards_vmware svga
4935 - gallium_enable video_cards_nouveau nouveau
4936 - gallium_enable video_cards_i915 i915
4937 - gallium_enable video_cards_imx imx
4938 - if ! use video_cards_i915 && \
4939 - ! use video_cards_i965; then
4940 - gallium_enable video_cards_intel i915
4941 - fi
4942 -
4943 - gallium_enable video_cards_r300 r300
4944 - gallium_enable video_cards_r600 r600
4945 - gallium_enable video_cards_radeonsi radeonsi
4946 - if ! use video_cards_r300 && \
4947 - ! use video_cards_r600; then
4948 - gallium_enable video_cards_radeon r300 r600
4949 - fi
4950 -
4951 - gallium_enable video_cards_freedreno freedreno
4952 - # opencl stuff
4953 - if use opencl; then
4954 - myconf+="
4955 - $(use_enable opencl)
4956 - --with-clang-libdir="${EPREFIX}/usr/lib"
4957 - "
4958 - fi
4959 -
4960 - gallium_enable video_cards_virgl virgl
4961 - fi
4962 -
4963 - if use vulkan; then
4964 - vulkan_enable video_cards_i965 intel
4965 - vulkan_enable video_cards_radeonsi radeon
4966 - fi
4967 -
4968 - # x86 hardened pax_kernel needs glx-rts, bug 240956
4969 - if [[ ${ABI} == x86 ]]; then
4970 - myconf+=" $(use_enable pax_kernel glx-read-only-text)"
4971 - fi
4972 -
4973 - # on abi_x86_32 hardened we need to have asm disable
4974 - if [[ ${ABI} == x86* ]] && use pic; then
4975 - myconf+=" --disable-asm"
4976 - fi
4977 -
4978 - if use gallium; then
4979 - myconf+=" $(use_enable osmesa gallium-osmesa)"
4980 - else
4981 - myconf+=" $(use_enable osmesa)"
4982 - fi
4983 -
4984 - # build fails with BSD indent, bug #428112
4985 - use userland_GNU || export INDENT=cat
4986 -
4987 - ECONF_SOURCE="${S}" \
4988 - econf \
4989 - --enable-dri \
4990 - --enable-glx \
4991 - --enable-shared-glapi \
4992 - $(use_enable !bindist texture-float) \
4993 - $(use_enable d3d9 nine) \
4994 - $(use_enable debug) \
4995 - $(use_enable dri3) \
4996 - $(use_enable egl) \
4997 - $(use_enable gbm) \
4998 - $(use_enable gles1) \
4999 - $(use_enable gles2) \
5000 - $(use_enable nptl glx-tls) \
5001 - $(use_enable unwind libunwind) \
5002 - --enable-valgrind=$(usex valgrind auto no) \
5003 - --enable-llvm-shared-libs \
5004 - --with-dri-drivers=${DRI_DRIVERS} \
5005 - --with-gallium-drivers=${GALLIUM_DRIVERS} \
5006 - --with-vulkan-drivers=${VULKAN_DRIVERS} \
5007 - PYTHON2="${PYTHON}" \
5008 - ${myconf}
5009 -}
5010 -
5011 -multilib_src_install() {
5012 - emake install DESTDIR="${D}"
5013 -
5014 - if use classic || use gallium; then
5015 - ebegin "Moving DRI/Gallium drivers for dynamic switching"
5016 - local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
5017 - keepdir /usr/$(get_libdir)/dri
5018 - dodir /usr/$(get_libdir)/mesa
5019 - for x in ${gallium_drivers[@]}; do
5020 - if [ -f "$(get_libdir)/gallium/${x}" ]; then
5021 - mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
5022 - || die "Failed to move ${x}"
5023 - fi
5024 - done
5025 - if use classic; then
5026 - emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
5027 - fi
5028 - for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
5029 - if [ -f ${x} -o -L ${x} ]; then
5030 - mv -f "${x}" "${x/dri/mesa}" \
5031 - || die "Failed to move ${x}"
5032 - fi
5033 - done
5034 - pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
5035 - ln -s ../mesa/*.so . || die "Creating symlink failed"
5036 - # remove symlinks to drivers known to eselect
5037 - for x in ${gallium_drivers[@]}; do
5038 - if [ -f ${x} -o -L ${x} ]; then
5039 - rm "${x}" || die "Failed to remove ${x}"
5040 - fi
5041 - done
5042 - popd
5043 - eend $?
5044 - fi
5045 - if use opencl; then
5046 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
5047 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
5048 - dodir ${cl_dir}/{lib,include}
5049 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
5050 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
5051 - "${ED}"${cl_dir}
5052 - fi
5053 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
5054 - mv -f "${ED}"/usr/include/CL \
5055 - "${ED}"${cl_dir}/include
5056 - fi
5057 - eend $?
5058 - fi
5059 -
5060 - if use openmax; then
5061 - echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
5062 - doenvd "${T}"/99mesaxdgomx
5063 - keepdir /usr/share/mesa/xdg
5064 - fi
5065 -}
5066 -
5067 -multilib_src_install_all() {
5068 - find "${ED}" -name '*.la' -delete
5069 - einstalldocs
5070 -
5071 - if use !bindist; then
5072 - dodoc docs/patents.txt
5073 - fi
5074 -
5075 - # Install config file for eselect mesa
5076 - insinto /usr/share/mesa
5077 - newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
5078 -}
5079 -
5080 -multilib_src_test() {
5081 - if use llvm; then
5082 - local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
5083 - pushd src/gallium/drivers/llvmpipe >/dev/null || die
5084 - emake ${llvm_tests}
5085 - pax-mark m ${llvm_tests}
5086 - popd >/dev/null || die
5087 - fi
5088 - emake check
5089 -}
5090 -
5091 -pkg_postinst() {
5092 - # Switch to the xorg implementation.
5093 - echo
5094 - eselect opengl set --use-old ${OPENGL_DIR}
5095 -
5096 - # Select classic/gallium drivers
5097 - if use classic || use gallium; then
5098 - eselect mesa set --auto
5099 - fi
5100 -
5101 - # Switch to mesa opencl
5102 - if use opencl; then
5103 - eselect opencl set --use-old ${PN}
5104 - fi
5105 -
5106 - # run omxregister-bellagio to make the OpenMAX drivers known system-wide
5107 - if use openmax; then
5108 - ebegin "Registering OpenMAX drivers"
5109 - BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
5110 - OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
5111 - omxregister-bellagio
5112 - eend $?
5113 - fi
5114 -
5115 - # warn about patent encumbered texture-float
5116 - if use !bindist; then
5117 - elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
5118 - elog "enabled. Please see patents.txt for an explanation."
5119 - fi
5120 -
5121 - if ! has_version media-libs/libtxc_dxtn; then
5122 - elog "Note that in order to have full S3TC support, it is necessary to install"
5123 - elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
5124 - elog "textures in some apps, and some others even require this to run."
5125 - fi
5126 -}
5127 -
5128 -pkg_prerm() {
5129 - if use openmax; then
5130 - rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
5131 - fi
5132 -}
5133 -
5134 -# $1 - VIDEO_CARDS flag
5135 -# other args - names of DRI drivers to enable
5136 -# TODO: avoid code duplication for a more elegant implementation
5137 -driver_enable() {
5138 - case $# in
5139 - # for enabling unconditionally
5140 - 1)
5141 - DRI_DRIVERS+=",$1"
5142 - ;;
5143 - *)
5144 - if use $1; then
5145 - shift
5146 - for i in $@; do
5147 - DRI_DRIVERS+=",${i}"
5148 - done
5149 - fi
5150 - ;;
5151 - esac
5152 -}
5153 -
5154 -gallium_enable() {
5155 - case $# in
5156 - # for enabling unconditionally
5157 - 1)
5158 - GALLIUM_DRIVERS+=",$1"
5159 - ;;
5160 - *)
5161 - if use $1; then
5162 - shift
5163 - for i in $@; do
5164 - GALLIUM_DRIVERS+=",${i}"
5165 - done
5166 - fi
5167 - ;;
5168 - esac
5169 -}
5170 -
5171 -vulkan_enable() {
5172 - case $# in
5173 - # for enabling unconditionally
5174 - 1)
5175 - VULKAN_DRIVERS+=",$1"
5176 - ;;
5177 - *)
5178 - if use $1; then
5179 - shift
5180 - for i in $@; do
5181 - VULKAN_DRIVERS+=",${i}"
5182 - done
5183 - fi
5184 - ;;
5185 - esac
5186 -}
5187
5188 diff --git a/media-libs/mesa/mesa-17.3.0_rc4.ebuild b/media-libs/mesa/mesa-17.3.0_rc4.ebuild
5189 deleted file mode 100644
5190 index 03a35c8a2c1..00000000000
5191 --- a/media-libs/mesa/mesa-17.3.0_rc4.ebuild
5192 +++ /dev/null
5193 @@ -1,585 +0,0 @@
5194 -# Copyright 1999-2017 Gentoo Foundation
5195 -# Distributed under the terms of the GNU General Public License v2
5196 -
5197 -EAPI=6
5198 -
5199 -EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git"
5200 -
5201 -if [[ ${PV} = 9999 ]]; then
5202 - GIT_ECLASS="git-r3"
5203 - EXPERIMENTAL="true"
5204 -fi
5205 -
5206 -PYTHON_COMPAT=( python2_7 )
5207 -
5208 -inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
5209 -
5210 -OPENGL_DIR="xorg-x11"
5211 -
5212 -MY_P="${P/_/-}"
5213 -
5214 -DESCRIPTION="OpenGL-like graphic library for Linux"
5215 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
5216 -
5217 -if [[ $PV == 9999 ]]; then
5218 - SRC_URI=""
5219 -else
5220 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
5221 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
5222 -fi
5223 -
5224 -LICENSE="MIT"
5225 -SLOT="0"
5226 -RESTRICT="!bindist? ( bindist )"
5227 -
5228 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
5229 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
5230 -for card in ${VIDEO_CARDS}; do
5231 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
5232 -done
5233 -
5234 -IUSE="${IUSE_VIDEO_CARDS}
5235 - bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
5236 - +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
5237 - vdpau vulkan wayland xvmc xa"
5238 -
5239 -REQUIRED_USE="
5240 - d3d9? ( dri3 gallium )
5241 - llvm? ( gallium )
5242 - opencl? ( gallium llvm )
5243 - openmax? ( gallium )
5244 - gles1? ( egl )
5245 - gles2? ( egl )
5246 - vaapi? ( gallium )
5247 - vdpau? ( gallium )
5248 - vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
5249 - video_cards_radeonsi? ( llvm ) )
5250 - wayland? ( egl gbm )
5251 - xa? ( gallium )
5252 - video_cards_freedreno? ( gallium )
5253 - video_cards_intel? ( classic )
5254 - video_cards_i915? ( || ( classic gallium ) )
5255 - video_cards_i965? ( classic )
5256 - video_cards_imx? ( gallium video_cards_vivante )
5257 - video_cards_nouveau? ( || ( classic gallium ) )
5258 - video_cards_radeon? ( || ( classic gallium )
5259 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
5260 - video_cards_r100? ( classic )
5261 - video_cards_r200? ( classic )
5262 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
5263 - video_cards_r600? ( gallium )
5264 - video_cards_radeonsi? ( gallium llvm )
5265 - video_cards_vc4? ( gallium )
5266 - video_cards_virgl? ( gallium )
5267 - video_cards_vivante? ( gallium gbm )
5268 - video_cards_vmware? ( gallium )
5269 -"
5270 -
5271 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.85"
5272 -# keep correct libdrm and dri2proto dep
5273 -# keep blocks in rdepend for binpkg
5274 -RDEPEND="
5275 - !<x11-base/xorg-server-1.7
5276 - !<=x11-proto/xf86driproto-2.0.3
5277 - abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
5278 - classic? ( app-eselect/eselect-mesa )
5279 - gallium? ( app-eselect/eselect-mesa )
5280 - >=app-eselect/eselect-opengl-1.3.0
5281 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
5282 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
5283 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
5284 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
5285 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
5286 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
5287 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
5288 - >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
5289 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
5290 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
5291 - llvm? (
5292 - video_cards_radeonsi? (
5293 - virtual/libelf:0=[${MULTILIB_USEDEP}]
5294 - )
5295 - video_cards_r600? (
5296 - virtual/libelf:0=[${MULTILIB_USEDEP}]
5297 - )
5298 - video_cards_radeon? (
5299 - virtual/libelf:0=[${MULTILIB_USEDEP}]
5300 - )
5301 - )
5302 - opencl? (
5303 - app-eselect/eselect-opencl
5304 - dev-libs/libclc
5305 - virtual/libelf:0=[${MULTILIB_USEDEP}]
5306 - )
5307 - openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
5308 - vaapi? (
5309 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
5310 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
5311 - )
5312 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
5313 - wayland? (
5314 - >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}]
5315 - >=dev-libs/wayland-protocols-1.8
5316 - )
5317 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
5318 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
5319 -
5320 - video_cards_intel? (
5321 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
5322 - )
5323 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
5324 -"
5325 -for card in ${RADEON_CARDS}; do
5326 - RDEPEND="${RDEPEND}
5327 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
5328 - "
5329 -done
5330 -RDEPEND="${RDEPEND}
5331 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
5332 -"
5333 -
5334 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
5335 -# we need to *really* make sure we're not pulling one than more slot
5336 -# simultaneously.
5337 -#
5338 -# How to use it:
5339 -# 1. List all the working slots (with min versions) in ||, newest first.
5340 -# 2. Update the := to specify *max* version, e.g. < 7.
5341 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
5342 -LLVM_DEPSTR="
5343 - || (
5344 - sys-devel/llvm:6[${MULTILIB_USEDEP}]
5345 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
5346 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
5347 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
5348 - )
5349 - sys-devel/llvm:=[${MULTILIB_USEDEP}]
5350 -"
5351 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
5352 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
5353 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
5354 -RDEPEND="${RDEPEND}
5355 - llvm? (
5356 - opencl? (
5357 - video_cards_r600? (
5358 - ${CLANG_DEPSTR_AMDGPU}
5359 - )
5360 - !video_cards_r600? (
5361 - video_cards_radeonsi? (
5362 - ${CLANG_DEPSTR_AMDGPU}
5363 - )
5364 - )
5365 - !video_cards_r600? (
5366 - !video_cards_radeonsi? (
5367 - video_cards_radeon? (
5368 - ${CLANG_DEPSTR_AMDGPU}
5369 - )
5370 - )
5371 - )
5372 - !video_cards_r600? (
5373 - !video_cards_radeon? (
5374 - !video_cards_radeonsi? (
5375 - ${CLANG_DEPSTR}
5376 - )
5377 - )
5378 - )
5379 - )
5380 - !opencl? (
5381 - video_cards_r600? (
5382 - ${LLVM_DEPSTR_AMDGPU}
5383 - )
5384 - !video_cards_r600? (
5385 - video_cards_radeonsi? (
5386 - ${LLVM_DEPSTR_AMDGPU}
5387 - )
5388 - )
5389 - !video_cards_r600? (
5390 - !video_cards_radeonsi? (
5391 - video_cards_radeon? (
5392 - ${LLVM_DEPSTR_AMDGPU}
5393 - )
5394 - )
5395 - )
5396 - !video_cards_r600? (
5397 - !video_cards_radeon? (
5398 - !video_cards_radeonsi? (
5399 - ${LLVM_DEPSTR}
5400 - )
5401 - )
5402 - )
5403 - )
5404 - )
5405 -"
5406 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
5407 -
5408 -DEPEND="${RDEPEND}
5409 - ${PYTHON_DEPS}
5410 - opencl? (
5411 - >=sys-devel/gcc-4.6
5412 - )
5413 - sys-devel/gettext
5414 - virtual/pkgconfig
5415 - valgrind? ( dev-util/valgrind )
5416 - >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
5417 - dri3? (
5418 - >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
5419 - >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
5420 - )
5421 - >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
5422 - >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
5423 - >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
5424 - >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
5425 - vulkan? (
5426 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
5427 - )
5428 -"
5429 -[[ ${PV} == 9999 ]] && DEPEND+="
5430 - sys-devel/bison
5431 - sys-devel/flex
5432 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
5433 -"
5434 -
5435 -S="${WORKDIR}/${MY_P}"
5436 -EGIT_CHECKOUT_DIR=${S}
5437 -
5438 -QA_WX_LOAD="
5439 -x86? (
5440 - !pic? (
5441 - usr/lib*/libglapi.so.0.0.0
5442 - usr/lib*/libGLESv1_CM.so.1.1.0
5443 - usr/lib*/libGLESv2.so.2.0.0
5444 - usr/lib*/libGL.so.1.2.0
5445 - usr/lib*/libOSMesa.so.8.0.0
5446 - )
5447 -)"
5448 -
5449 -llvm_check_deps() {
5450 - local flags=${MULTILIB_USEDEP}
5451 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
5452 - then
5453 - flags+=",llvm_targets_AMDGPU(-)"
5454 - fi
5455 -
5456 - if use opencl; then
5457 - has_version "sys-devel/clang[${flags}]" || return 1
5458 - fi
5459 - has_version "sys-devel/llvm[${flags}]"
5460 -}
5461 -
5462 -pkg_setup() {
5463 - # warning message for bug 459306
5464 - if use llvm && has_version sys-devel/llvm[!debug=]; then
5465 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
5466 - ewarn "detected! This can cause problems. For details, see bug 459306."
5467 - fi
5468 -
5469 - if use llvm; then
5470 - llvm_pkg_setup
5471 - fi
5472 - python-any-r1_pkg_setup
5473 -}
5474 -
5475 -src_prepare() {
5476 - [[ ${PV} == 9999 ]] && eautoreconf
5477 - eapply_user
5478 -}
5479 -
5480 -multilib_src_configure() {
5481 - local myconf
5482 -
5483 - if use classic; then
5484 - # Configurable DRI drivers
5485 - driver_enable swrast
5486 -
5487 - # Intel code
5488 - driver_enable video_cards_i915 i915
5489 - driver_enable video_cards_i965 i965
5490 - if ! use video_cards_i915 && \
5491 - ! use video_cards_i965; then
5492 - driver_enable video_cards_intel i915 i965
5493 - fi
5494 -
5495 - # Nouveau code
5496 - driver_enable video_cards_nouveau nouveau
5497 -
5498 - # ATI code
5499 - driver_enable video_cards_r100 radeon
5500 - driver_enable video_cards_r200 r200
5501 - if ! use video_cards_r100 && \
5502 - ! use video_cards_r200; then
5503 - driver_enable video_cards_radeon radeon r200
5504 - fi
5505 - fi
5506 -
5507 - if use egl; then
5508 - myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
5509 - fi
5510 -
5511 - if use gallium; then
5512 - myconf+="
5513 - $(use_enable d3d9 nine)
5514 - $(use_enable llvm)
5515 - $(use_enable openmax omx-bellagio)
5516 - $(use_enable vaapi va)
5517 - $(use_enable vdpau)
5518 - $(use_enable xa)
5519 - $(use_enable xvmc)
5520 - "
5521 - use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
5522 -
5523 - gallium_enable swrast
5524 - gallium_enable video_cards_vc4 vc4
5525 - gallium_enable video_cards_vivante etnaviv
5526 - gallium_enable video_cards_vmware svga
5527 - gallium_enable video_cards_nouveau nouveau
5528 - gallium_enable video_cards_i915 i915
5529 - gallium_enable video_cards_imx imx
5530 - if ! use video_cards_i915 && \
5531 - ! use video_cards_i965; then
5532 - gallium_enable video_cards_intel i915
5533 - fi
5534 -
5535 - gallium_enable video_cards_r300 r300
5536 - gallium_enable video_cards_r600 r600
5537 - gallium_enable video_cards_radeonsi radeonsi
5538 - if ! use video_cards_r300 && \
5539 - ! use video_cards_r600; then
5540 - gallium_enable video_cards_radeon r300 r600
5541 - fi
5542 -
5543 - gallium_enable video_cards_freedreno freedreno
5544 - # opencl stuff
5545 - if use opencl; then
5546 - myconf+="
5547 - $(use_enable opencl)
5548 - --with-clang-libdir="${EPREFIX}/usr/lib"
5549 - "
5550 - fi
5551 -
5552 - gallium_enable video_cards_virgl virgl
5553 - fi
5554 -
5555 - if use vulkan; then
5556 - vulkan_enable video_cards_i965 intel
5557 - vulkan_enable video_cards_radeonsi radeon
5558 - fi
5559 -
5560 - # x86 hardened pax_kernel needs glx-rts, bug 240956
5561 - if [[ ${ABI} == x86 ]]; then
5562 - myconf+=" $(use_enable pax_kernel glx-read-only-text)"
5563 - fi
5564 -
5565 - # on abi_x86_32 hardened we need to have asm disable
5566 - if [[ ${ABI} == x86* ]] && use pic; then
5567 - myconf+=" --disable-asm"
5568 - fi
5569 -
5570 - if use gallium; then
5571 - myconf+=" $(use_enable osmesa gallium-osmesa)"
5572 - else
5573 - myconf+=" $(use_enable osmesa)"
5574 - fi
5575 -
5576 - # build fails with BSD indent, bug #428112
5577 - use userland_GNU || export INDENT=cat
5578 -
5579 - ECONF_SOURCE="${S}" \
5580 - econf \
5581 - --enable-dri \
5582 - --enable-glx \
5583 - --enable-shared-glapi \
5584 - $(use_enable !bindist texture-float) \
5585 - $(use_enable d3d9 nine) \
5586 - $(use_enable debug) \
5587 - $(use_enable dri3) \
5588 - $(use_enable egl) \
5589 - $(use_enable gbm) \
5590 - $(use_enable gles1) \
5591 - $(use_enable gles2) \
5592 - $(use_enable nptl glx-tls) \
5593 - $(use_enable unwind libunwind) \
5594 - --enable-valgrind=$(usex valgrind auto no) \
5595 - --enable-llvm-shared-libs \
5596 - --with-dri-drivers=${DRI_DRIVERS} \
5597 - --with-gallium-drivers=${GALLIUM_DRIVERS} \
5598 - --with-vulkan-drivers=${VULKAN_DRIVERS} \
5599 - PYTHON2="${PYTHON}" \
5600 - ${myconf}
5601 -}
5602 -
5603 -multilib_src_install() {
5604 - emake install DESTDIR="${D}"
5605 -
5606 - if use classic || use gallium; then
5607 - ebegin "Moving DRI/Gallium drivers for dynamic switching"
5608 - local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
5609 - keepdir /usr/$(get_libdir)/dri
5610 - dodir /usr/$(get_libdir)/mesa
5611 - for x in ${gallium_drivers[@]}; do
5612 - if [ -f "$(get_libdir)/gallium/${x}" ]; then
5613 - mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
5614 - || die "Failed to move ${x}"
5615 - fi
5616 - done
5617 - if use classic; then
5618 - emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
5619 - fi
5620 - for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
5621 - if [ -f ${x} -o -L ${x} ]; then
5622 - mv -f "${x}" "${x/dri/mesa}" \
5623 - || die "Failed to move ${x}"
5624 - fi
5625 - done
5626 - pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
5627 - ln -s ../mesa/*.so . || die "Creating symlink failed"
5628 - # remove symlinks to drivers known to eselect
5629 - for x in ${gallium_drivers[@]}; do
5630 - if [ -f ${x} -o -L ${x} ]; then
5631 - rm "${x}" || die "Failed to remove ${x}"
5632 - fi
5633 - done
5634 - popd
5635 - eend $?
5636 - fi
5637 - if use opencl; then
5638 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
5639 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
5640 - dodir ${cl_dir}/{lib,include}
5641 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
5642 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
5643 - "${ED}"${cl_dir}
5644 - fi
5645 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
5646 - mv -f "${ED}"/usr/include/CL \
5647 - "${ED}"${cl_dir}/include
5648 - fi
5649 - eend $?
5650 - fi
5651 -
5652 - if use openmax; then
5653 - echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
5654 - doenvd "${T}"/99mesaxdgomx
5655 - keepdir /usr/share/mesa/xdg
5656 - fi
5657 -}
5658 -
5659 -multilib_src_install_all() {
5660 - find "${ED}" -name '*.la' -delete
5661 - einstalldocs
5662 -
5663 - if use !bindist; then
5664 - dodoc docs/patents.txt
5665 - fi
5666 -
5667 - # Install config file for eselect mesa
5668 - insinto /usr/share/mesa
5669 - newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
5670 -}
5671 -
5672 -multilib_src_test() {
5673 - if use llvm; then
5674 - local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
5675 - pushd src/gallium/drivers/llvmpipe >/dev/null || die
5676 - emake ${llvm_tests}
5677 - pax-mark m ${llvm_tests}
5678 - popd >/dev/null || die
5679 - fi
5680 - emake check
5681 -}
5682 -
5683 -pkg_postinst() {
5684 - # Switch to the xorg implementation.
5685 - echo
5686 - eselect opengl set --use-old ${OPENGL_DIR}
5687 -
5688 - # Select classic/gallium drivers
5689 - if use classic || use gallium; then
5690 - eselect mesa set --auto
5691 - fi
5692 -
5693 - # Switch to mesa opencl
5694 - if use opencl; then
5695 - eselect opencl set --use-old ${PN}
5696 - fi
5697 -
5698 - # run omxregister-bellagio to make the OpenMAX drivers known system-wide
5699 - if use openmax; then
5700 - ebegin "Registering OpenMAX drivers"
5701 - BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
5702 - OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
5703 - omxregister-bellagio
5704 - eend $?
5705 - fi
5706 -
5707 - # warn about patent encumbered texture-float
5708 - if use !bindist; then
5709 - elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
5710 - elog "enabled. Please see patents.txt for an explanation."
5711 - fi
5712 -
5713 - if ! has_version media-libs/libtxc_dxtn; then
5714 - elog "Note that in order to have full S3TC support, it is necessary to install"
5715 - elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
5716 - elog "textures in some apps, and some others even require this to run."
5717 - fi
5718 -}
5719 -
5720 -pkg_prerm() {
5721 - if use openmax; then
5722 - rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
5723 - fi
5724 -}
5725 -
5726 -# $1 - VIDEO_CARDS flag
5727 -# other args - names of DRI drivers to enable
5728 -# TODO: avoid code duplication for a more elegant implementation
5729 -driver_enable() {
5730 - case $# in
5731 - # for enabling unconditionally
5732 - 1)
5733 - DRI_DRIVERS+=",$1"
5734 - ;;
5735 - *)
5736 - if use $1; then
5737 - shift
5738 - for i in $@; do
5739 - DRI_DRIVERS+=",${i}"
5740 - done
5741 - fi
5742 - ;;
5743 - esac
5744 -}
5745 -
5746 -gallium_enable() {
5747 - case $# in
5748 - # for enabling unconditionally
5749 - 1)
5750 - GALLIUM_DRIVERS+=",$1"
5751 - ;;
5752 - *)
5753 - if use $1; then
5754 - shift
5755 - for i in $@; do
5756 - GALLIUM_DRIVERS+=",${i}"
5757 - done
5758 - fi
5759 - ;;
5760 - esac
5761 -}
5762 -
5763 -vulkan_enable() {
5764 - case $# in
5765 - # for enabling unconditionally
5766 - 1)
5767 - VULKAN_DRIVERS+=",$1"
5768 - ;;
5769 - *)
5770 - if use $1; then
5771 - shift
5772 - for i in $@; do
5773 - VULKAN_DRIVERS+=",${i}"
5774 - done
5775 - fi
5776 - ;;
5777 - esac
5778 -}