Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/mesa/
Date: Sat, 18 Aug 2018 04:53:51
Message-Id: 1534567997.a0ece8925e0d757751a9b9d26eeae2796f5aa4b8.mattst88@gentoo
1 commit: a0ece8925e0d757751a9b9d26eeae2796f5aa4b8
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 18 04:36:07 2018 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 18 04:53:17 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0ece892
7
8 media-libs/mesa: Replace REQUIRED_USE with ewarns
9
10 Mesa has a lot of configuration options and many of them are only
11 meaningful when specific Gallium drivers are enabled. Previously we
12 attempted to specify all of those dependencies with REQUIRED_USE logic
13 which was tedious for users to configure but ensured they knew what they
14 were getting.
15
16 With the transition to Meson, some configuration combinations that had
17 not been specified in REQUIRED_USE (and with autotools were silently
18 ignored) began producing configuration errors. Rather than extend
19 REQUIRED_USE instead provide a warning in pkg_prepare().
20
21 Closes: https://bugs.gentoo.org/658892
22 Closes: https://bugs.gentoo.org/658938
23 Closes: https://bugs.gentoo.org/663418
24 Closes: https://bugs.gentoo.org/663470
25 Closes: https://bugs.gentoo.org/663660
26
27 media-libs/mesa/mesa-9999.ebuild | 126 ++++++++++++++++++++++++++++++++++-----
28 1 file changed, 111 insertions(+), 15 deletions(-)
29
30 diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-9999.ebuild
31 index 346320a1fc6..0ccb06194dc 100644
32 --- a/media-libs/mesa/mesa-9999.ebuild
33 +++ b/media-libs/mesa/mesa-9999.ebuild
34 @@ -41,19 +41,13 @@ IUSE="${IUSE_VIDEO_CARDS}
35 vulkan wayland xa xvmc"
36
37 REQUIRED_USE="
38 - d3d9? ( dri3 gallium )
39 - llvm? ( gallium )
40 - opencl? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi ) )
41 + d3d9? ( dri3 )
42 gles1? ( egl )
43 gles2? ( egl )
44 - lm_sensors? ( gallium )
45 - vaapi? ( gallium )
46 - vdpau? ( gallium )
47 vulkan? ( dri3
48 || ( video_cards_i965 video_cards_radeonsi )
49 video_cards_radeonsi? ( llvm ) )
50 wayland? ( egl gbm )
51 - xa? ( gallium )
52 video_cards_freedreno? ( gallium )
53 video_cards_intel? ( classic )
54 video_cards_i915? ( || ( classic gallium ) )
55 @@ -250,6 +244,72 @@ llvm_check_deps() {
56 has_version "sys-devel/llvm[${flags}]"
57 }
58
59 +pkg_pretend() {
60 + if use d3d9; then
61 + if ! use video_cards_r300 &&
62 + ! use video_cards_r600 &&
63 + ! use video_cards_radeonsi &&
64 + ! use video_cards_nouveau &&
65 + ! use video_cards_vmware; then
66 + ewarn "Ignoring USE=d3d9 since VIDEO_CARDS does not contain r300, r600, radeonsi, nouveau, or vmware"
67 + fi
68 + fi
69 +
70 + if use opencl; then
71 + if ! use video_cards_r600 &&
72 + ! use video_cards_radeonsi; then
73 + ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
74 + fi
75 + fi
76 +
77 + if use vaapi; then
78 + if ! use video_cards_r600 &&
79 + ! use video_cards_radeonsi &&
80 + ! use video_cards_nouveau; then
81 + ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
82 + fi
83 + fi
84 +
85 + if use vdpau; then
86 + if ! use video_cards_r300 &&
87 + ! use video_cards_r600 &&
88 + ! use video_cards_radeonsi &&
89 + ! use video_cards_nouveau; then
90 + ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
91 + fi
92 + fi
93 +
94 + if use xa; then
95 + if ! use video_cards_freedreno &&
96 + ! use video_cards_nouveau; then
97 + ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno or nouveau"
98 + fi
99 + fi
100 +
101 + if use xvmc; then
102 + if ! use video_cards_r600 &&
103 + ! use video_cards_nouveau; then
104 + ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
105 + fi
106 + fi
107 +
108 + if ! use gallium; then
109 + use d3d9 && ewarn "Ignoring USE=d3d9 since USE does not contain gallium"
110 + use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium"
111 + use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
112 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
113 + use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
114 + use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
115 + use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
116 + use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
117 + use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
118 + fi
119 +
120 + if ! use llvm; then
121 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
122 + fi
123 +}
124 +
125 pkg_setup() {
126 # warning message for bug 459306
127 if use llvm && has_version sys-devel/llvm[!debug=]; then
128 @@ -293,14 +353,52 @@ multilib_src_configure() {
129
130 if use gallium; then
131 emesonargs+=(
132 - $(meson_use d3d9 gallium-nine)
133 $(meson_use llvm)
134 - $(meson_use vaapi gallium-va)
135 - $(meson_use vdpau gallium-vdpau)
136 - $(meson_use xa gallium-xa)
137 - $(meson_use xvmc gallium-xvmc)
138 + $(meson_use lm_sensors lmsensors)
139 + $(meson_use unwind libunwind)
140 )
141 - use vaapi && emesonargs+=( -Dva-libs-path=/usr/$(get_libdir)/va/drivers )
142 +
143 + if use video_cards_r300 ||
144 + use video_cards_r600 ||
145 + use video_cards_radeonsi ||
146 + use video_cards_nouveau ||
147 + use video_cards_vmware; then
148 + emesonargs+=($(meson_use d3d9 gallium-nine))
149 + else
150 + emesonargs+=(-Dgallium-nine=false)
151 + fi
152 +
153 + if use video_cards_r600 ||
154 + use video_cards_radeonsi ||
155 + use video_cards_nouveau; then
156 + emesonargs+=($(meson_use vaapi gallium-va))
157 + use vaapi && emesonargs+=( -Dva-libs-path=/usr/$(get_libdir)/va/drivers )
158 + else
159 + emesonargs+=(-Dgallium-va=false)
160 + fi
161 +
162 + if use video_cards_r300 ||
163 + use video_cards_r600 ||
164 + use video_cards_radeonsi ||
165 + use video_cards_nouveau; then
166 + emesonargs+=($(meson_use vdpau gallium-vdpau))
167 + else
168 + emesonargs+=(-Dgallium-vdpau=false)
169 + fi
170 +
171 + if use video_cards_freedreno ||
172 + use video_cards_nouveau; then
173 + emesonargs+=($(meson_use xa gallium-xa))
174 + else
175 + emesonargs+=(-Dgallium-xa=false)
176 + fi
177 +
178 + if use video_cards_r600 ||
179 + use video_cards_nouveau; then
180 + emesonargs+=($(meson_use xvmc gallium-xvmc))
181 + else
182 + emesonargs+=(-Dgallium-xvmc=false)
183 + fi
184
185 gallium_enable video_cards_vc4 vc4
186 gallium_enable video_cards_vivante etnaviv
187 @@ -374,8 +472,6 @@ multilib_src_configure() {
188 $(meson_use gles1)
189 $(meson_use gles2)
190 $(meson_use selinux)
191 - $(meson_use unwind libunwind)
192 - $(meson_use lm_sensors lmsensors)
193 -Dvalgrind=$(usex valgrind auto false)
194 -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
195 -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")