commit: e276a5eab8552202db5988843c41ef7007759475 Author: Jan Vesely <jano.vesely <AT> gmail <DOT> com> AuthorDate: Sat Oct 6 17:06:24 2018 +0000 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> CommitDate: Mon Oct 8 15:43:13 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e276a5ea
media-libs/mesa: Use ICD version of OpenCL Closes: https://github.com/gentoo/gentoo/pull/9836 Closes: https://bugs.gentoo.org/546320 Signed-off-by: Jan Vesely <jano.vesely <AT> gmail.com> Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> .../{mesa-9999.ebuild => mesa-18.2.2-r1.ebuild} | 38 +++++----------------- media-libs/mesa/mesa-9999.ebuild | 34 ++++--------------- 2 files changed, 14 insertions(+), 58 deletions(-) diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-18.2.2-r1.ebuild similarity index 94% copy from media-libs/mesa/mesa-9999.ebuild copy to media-libs/mesa/mesa-18.2.2-r1.ebuild index 2fd5700404f..5d286e7f051 100644 --- a/media-libs/mesa/mesa-9999.ebuild +++ b/media-libs/mesa/mesa-18.2.2-r1.ebuild @@ -3,7 +3,7 @@ EAPI=6 -PYTHON_COMPAT=( python3_4 python3_5 python3_6 python3_7 ) +PYTHON_COMPAT=( python2_7 ) inherit llvm meson multilib-minimal pax-utils python-any-r1 @@ -95,7 +95,7 @@ RDEPEND=" ) lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] ) opencl? ( - app-eselect/eselect-opencl + dev-libs/ocl-icd dev-libs/libclc virtual/libelf:0=[${MULTILIB_USEDEP}] ) @@ -134,9 +134,9 @@ RDEPEND="${RDEPEND} # 1. List all the working slots (with min versions) in ||, newest first. # 2. Update the := to specify *max* version, e.g. < 7. # 3. Specify LLVM_MAX_SLOT, e.g. 6. +LLVM_MAX_SLOT="7" LLVM_DEPSTR=" || ( - sys-devel/llvm:8[${MULTILIB_USEDEP}] sys-devel/llvm:7[${MULTILIB_USEDEP}] sys-devel/llvm:6[${MULTILIB_USEDEP}] sys-devel/llvm:5[${MULTILIB_USEDEP}] @@ -424,14 +424,12 @@ multilib_src_configure() { fi gallium_enable video_cards_freedreno freedreno - # opencl stuff - if use opencl; then - emesonargs+=( - -Dgallium-opencl="$(usex opencl standalone disabled)" - ) - fi - gallium_enable video_cards_virgl virgl + + # opencl stuff + emesonargs+=( + -Dgallium-opencl="$(usex opencl icd disabled)" + ) fi if use vulkan; then @@ -488,21 +486,6 @@ multilib_src_compile() { multilib_src_install() { meson_src_install - - if use opencl; then - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" - dodir ${cl_dir}/{lib,include} - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ - "${ED}"${cl_dir} - fi - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then - mv -f "${ED}"/usr/include/CL \ - "${ED}"${cl_dir}/include - fi - eend $? - fi } multilib_src_install_all() { @@ -517,11 +500,6 @@ pkg_postinst() { # Switch to the xorg implementation. echo eselect opengl set --use-old ${OPENGL_DIR} - - # Switch to mesa opencl - if use opencl; then - eselect opencl set --use-old ${PN} - fi } # $1 - VIDEO_CARDS flag (check skipped for "--") diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-9999.ebuild index 2fd5700404f..f07bda10516 100644 --- a/media-libs/mesa/mesa-9999.ebuild +++ b/media-libs/mesa/mesa-9999.ebuild @@ -95,7 +95,7 @@ RDEPEND=" ) lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] ) opencl? ( - app-eselect/eselect-opencl + dev-libs/ocl-icd dev-libs/libclc virtual/libelf:0=[${MULTILIB_USEDEP}] ) @@ -424,14 +424,12 @@ multilib_src_configure() { fi gallium_enable video_cards_freedreno freedreno - # opencl stuff - if use opencl; then - emesonargs+=( - -Dgallium-opencl="$(usex opencl standalone disabled)" - ) - fi - gallium_enable video_cards_virgl virgl + + # opencl stuff + emesonargs+=( + -Dgallium-opencl="$(usex opencl icd disabled)" + ) fi if use vulkan; then @@ -488,21 +486,6 @@ multilib_src_compile() { multilib_src_install() { meson_src_install - - if use opencl; then - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" - dodir ${cl_dir}/{lib,include} - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ - "${ED}"${cl_dir} - fi - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then - mv -f "${ED}"/usr/include/CL \ - "${ED}"${cl_dir}/include - fi - eend $? - fi } multilib_src_install_all() { @@ -517,11 +500,6 @@ pkg_postinst() { # Switch to the xorg implementation. echo eselect opengl set --use-old ${OPENGL_DIR} - - # Switch to mesa opencl - if use opencl; then - eselect opencl set --use-old ${PN} - fi } # $1 - VIDEO_CARDS flag (check skipped for "--")