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: Mon, 08 Oct 2018 15:43:37
Message-Id: 1539013393.e276a5eab8552202db5988843c41ef7007759475.mattst88@gentoo
1 commit: e276a5eab8552202db5988843c41ef7007759475
2 Author: Jan Vesely <jano.vesely <AT> gmail <DOT> com>
3 AuthorDate: Sat Oct 6 17:06:24 2018 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Mon Oct 8 15:43:13 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e276a5ea
7
8 media-libs/mesa: Use ICD version of OpenCL
9
10 Closes: https://github.com/gentoo/gentoo/pull/9836
11 Closes: https://bugs.gentoo.org/546320
12 Signed-off-by: Jan Vesely <jano.vesely <AT> gmail.com>
13 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
14
15 .../{mesa-9999.ebuild => mesa-18.2.2-r1.ebuild} | 38 +++++-----------------
16 media-libs/mesa/mesa-9999.ebuild | 34 ++++---------------
17 2 files changed, 14 insertions(+), 58 deletions(-)
18
19 diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-18.2.2-r1.ebuild
20 similarity index 94%
21 copy from media-libs/mesa/mesa-9999.ebuild
22 copy to media-libs/mesa/mesa-18.2.2-r1.ebuild
23 index 2fd5700404f..5d286e7f051 100644
24 --- a/media-libs/mesa/mesa-9999.ebuild
25 +++ b/media-libs/mesa/mesa-18.2.2-r1.ebuild
26 @@ -3,7 +3,7 @@
27
28 EAPI=6
29
30 -PYTHON_COMPAT=( python3_4 python3_5 python3_6 python3_7 )
31 +PYTHON_COMPAT=( python2_7 )
32
33 inherit llvm meson multilib-minimal pax-utils python-any-r1
34
35 @@ -95,7 +95,7 @@ RDEPEND="
36 )
37 lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] )
38 opencl? (
39 - app-eselect/eselect-opencl
40 + dev-libs/ocl-icd
41 dev-libs/libclc
42 virtual/libelf:0=[${MULTILIB_USEDEP}]
43 )
44 @@ -134,9 +134,9 @@ RDEPEND="${RDEPEND}
45 # 1. List all the working slots (with min versions) in ||, newest first.
46 # 2. Update the := to specify *max* version, e.g. < 7.
47 # 3. Specify LLVM_MAX_SLOT, e.g. 6.
48 +LLVM_MAX_SLOT="7"
49 LLVM_DEPSTR="
50 || (
51 - sys-devel/llvm:8[${MULTILIB_USEDEP}]
52 sys-devel/llvm:7[${MULTILIB_USEDEP}]
53 sys-devel/llvm:6[${MULTILIB_USEDEP}]
54 sys-devel/llvm:5[${MULTILIB_USEDEP}]
55 @@ -424,14 +424,12 @@ multilib_src_configure() {
56 fi
57
58 gallium_enable video_cards_freedreno freedreno
59 - # opencl stuff
60 - if use opencl; then
61 - emesonargs+=(
62 - -Dgallium-opencl="$(usex opencl standalone disabled)"
63 - )
64 - fi
65 -
66 gallium_enable video_cards_virgl virgl
67 +
68 + # opencl stuff
69 + emesonargs+=(
70 + -Dgallium-opencl="$(usex opencl icd disabled)"
71 + )
72 fi
73
74 if use vulkan; then
75 @@ -488,21 +486,6 @@ multilib_src_compile() {
76
77 multilib_src_install() {
78 meson_src_install
79 -
80 - if use opencl; then
81 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
82 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
83 - dodir ${cl_dir}/{lib,include}
84 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
85 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
86 - "${ED}"${cl_dir}
87 - fi
88 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
89 - mv -f "${ED}"/usr/include/CL \
90 - "${ED}"${cl_dir}/include
91 - fi
92 - eend $?
93 - fi
94 }
95
96 multilib_src_install_all() {
97 @@ -517,11 +500,6 @@ pkg_postinst() {
98 # Switch to the xorg implementation.
99 echo
100 eselect opengl set --use-old ${OPENGL_DIR}
101 -
102 - # Switch to mesa opencl
103 - if use opencl; then
104 - eselect opencl set --use-old ${PN}
105 - fi
106 }
107
108 # $1 - VIDEO_CARDS flag (check skipped for "--")
109
110 diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-9999.ebuild
111 index 2fd5700404f..f07bda10516 100644
112 --- a/media-libs/mesa/mesa-9999.ebuild
113 +++ b/media-libs/mesa/mesa-9999.ebuild
114 @@ -95,7 +95,7 @@ RDEPEND="
115 )
116 lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] )
117 opencl? (
118 - app-eselect/eselect-opencl
119 + dev-libs/ocl-icd
120 dev-libs/libclc
121 virtual/libelf:0=[${MULTILIB_USEDEP}]
122 )
123 @@ -424,14 +424,12 @@ multilib_src_configure() {
124 fi
125
126 gallium_enable video_cards_freedreno freedreno
127 - # opencl stuff
128 - if use opencl; then
129 - emesonargs+=(
130 - -Dgallium-opencl="$(usex opencl standalone disabled)"
131 - )
132 - fi
133 -
134 gallium_enable video_cards_virgl virgl
135 +
136 + # opencl stuff
137 + emesonargs+=(
138 + -Dgallium-opencl="$(usex opencl icd disabled)"
139 + )
140 fi
141
142 if use vulkan; then
143 @@ -488,21 +486,6 @@ multilib_src_compile() {
144
145 multilib_src_install() {
146 meson_src_install
147 -
148 - if use opencl; then
149 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
150 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
151 - dodir ${cl_dir}/{lib,include}
152 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
153 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
154 - "${ED}"${cl_dir}
155 - fi
156 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
157 - mv -f "${ED}"/usr/include/CL \
158 - "${ED}"${cl_dir}/include
159 - fi
160 - eend $?
161 - fi
162 }
163
164 multilib_src_install_all() {
165 @@ -517,11 +500,6 @@ pkg_postinst() {
166 # Switch to the xorg implementation.
167 echo
168 eselect opengl set --use-old ${OPENGL_DIR}
169 -
170 - # Switch to mesa opencl
171 - if use opencl; then
172 - eselect opencl set --use-old ${PN}
173 - fi
174 }
175
176 # $1 - VIDEO_CARDS flag (check skipped for "--")