From: Marek Szuba Date: Wed, 1 Apr 2020 23:49:11 +0000 (+0100) Subject: dev-libs/opencl-icd-loader: new package X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d1e684dfb0287cd859c4107d09ebb58f646f3cfd;p=gentoo.git dev-libs/opencl-icd-loader: new package The Khronos Group has finally released the first tagged version of their official ICD loader! Signed-off-by: Marek Szuba --- diff --git a/dev-libs/opencl-icd-loader/Manifest b/dev-libs/opencl-icd-loader/Manifest new file mode 100644 index 000000000000..e4390ff8c73a --- /dev/null +++ b/dev-libs/opencl-icd-loader/Manifest @@ -0,0 +1 @@ +DIST opencl-icd-loader-2020.03.13.tar.gz 57833 BLAKE2B 7d74ce808f446554c92fea1e431f2026ed33b6c19a6dd6bf832184f8e4fb34a362464e5b844e99b1866afe55b7a521fa669388f868549882a4fde5c4c3c9313b SHA512 56dadf660d4add8cf779e389be1b4d60742b293c5452d7b114b79fe0d96591e56f338303ea991f1b77a40d321a23d53cb1ad9cc95bec502594ee18335641f060 diff --git a/dev-libs/opencl-icd-loader/metadata.xml b/dev-libs/opencl-icd-loader/metadata.xml new file mode 100644 index 000000000000..e74450ef1a65 --- /dev/null +++ b/dev-libs/opencl-icd-loader/metadata.xml @@ -0,0 +1,12 @@ + + + + + marecki@gentoo.org + Marek Szuba + + + KhronosGroup/OpenCL-ICD-Loader + + + diff --git a/dev-libs/opencl-icd-loader/opencl-icd-loader-2020.03.13.ebuild b/dev-libs/opencl-icd-loader/opencl-icd-loader-2020.03.13.ebuild new file mode 100644 index 000000000000..354e60244a5a --- /dev/null +++ b/dev-libs/opencl-icd-loader/opencl-icd-loader-2020.03.13.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +CMAKE_ECLASS=cmake +inherit cmake-multilib + +MY_PN="OpenCL-ICD-Loader" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="Official Khronos OpenCL ICD Loader" +HOMEPAGE="https://github.com/KhronosGroup/OpenCL-ICD-Loader" +SRC_URI="https://github.com/KhronosGroup/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" + +RESTRICT="!test? ( test )" + +DEPEND="dev-util/opencl-headers" +RDEPEND="${DEPEND} + app-eselect/eselect-opencl" + +S="${WORKDIR}/${MY_P}" + +multilib_src_configure() { + local ocl_dir="/usr/$(get_libdir)/OpenCL/vendors/${PN}" + + local mycmakeargs=( + -DCMAKE_INSTALL_PREFIX="${ocl_dir}" + -DCMAKE_INSTALL_LIBDIR="${ocl_dir}" + -DBUILD_TESTING=$(usex test) + -DOPENCL_ICD_LOADER_HEADERS_DIR="${ocl_dir}/include" + ) + cmake_src_configure +} + +multilib_src_test() { + OCL_ICD_FILENAMES="${BUILD_DIR}/test/driver_stub/libOpenCLDriverStub.so" \ + cmake_src_test +} + +pkg_postinst() { + eselect opencl set --use-old "${PN}" +}