# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 inherit cmake-utils DESCRIPTION="Intercept Layer for OpenCL Applications" HOMEPAGE="https://github.com/intel/opencl-intercept-layer" if [[ ${PV} = *9999 ]]; then inherit git-r3 EGIT_REPO_URI="https://github.com/intel/opencl-intercept-layer.git" else SRC_URI="https://github.com/intel/opencl-intercept-layer/archive/v${PV}.tar.gz" fi LICENSE="MIT" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="" #Note: needs dev-libs/ocl-icd as known target for config file DEPEND="dev-libs/ocl-icd" RDEPEND="${DEPEND} app-eselect/eselect-opencl" BDEPEND="" src_configure() { mycmakeargs=( -DENABLE_CLILOADER=TRUE -DENABLE_CLIPROF=TRUE -DCMAKE_INSTALL_LIBDIR="/usr/$(get_libdir)/OpenCL/vendors/opencl-intercept-layer" ) cmake-utils_src_configure } src_install() { cmake-utils_src_install mkdir -p "${D}etc/OpenCL" echo "DllName=/usr/lib64/OpenCL/vendors/ocl-icd/libOpenCL.so" > "${D}etc/OpenCL/clintercept.conf" } pkg_postinst() { eselect opencl set --use-old ${PN} }