commit: 9599894aef4f3cbc1ff704cc2a5a8aaa2c64baba Author: Jan Vesely <jano.vesely <AT> gmail <DOT> com> AuthorDate: Wed Oct 10 06:33:25 2018 +0000 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> CommitDate: Fri Oct 19 17:46:55 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9599894a
dev-libs/ocl-icd-2.2.12: Install headers and drop ocl-icd.icd Add useflag to install khronos CL headers. Don't install ocl-icd.icd to /etc/. v2: Don't try to move docs. It's not necessary. v3: Fixup ruby depend Signed-off-by: Jan Vesely <jano.vesely <AT> gmail.com> Closes: https://github.com/gentoo/gentoo/pull/10122 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> dev-libs/ocl-icd/metadata.xml | 5 +++++ dev-libs/ocl-icd/ocl-icd-2.2.12.ebuild | 29 ++++++++++++++++++----------- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/dev-libs/ocl-icd/metadata.xml b/dev-libs/ocl-icd/metadata.xml index f3de5f693ed..1cfa787eaf1 100644 --- a/dev-libs/ocl-icd/metadata.xml +++ b/dev-libs/ocl-icd/metadata.xml @@ -5,4 +5,9 @@ <email>patr...@gentoo.org</email> <name>Patrick Lauer</name> </maintainer> + <use> + <flag name="khronos-headers" restrict=">dev-libs/ocl-icd-2.2.11-r1"> + Install Khronos OpenCL headers. + </flag> + </use> </pkgmetadata> diff --git a/dev-libs/ocl-icd/ocl-icd-2.2.12.ebuild b/dev-libs/ocl-icd/ocl-icd-2.2.12.ebuild index f102277aa8f..6d59cbc6210 100644 --- a/dev-libs/ocl-icd/ocl-icd-2.2.12.ebuild +++ b/dev-libs/ocl-icd/ocl-icd-2.2.12.ebuild @@ -3,7 +3,8 @@ EAPI=7 -inherit autotools flag-o-matic multilib-minimal +USE_RUBY="ruby23 ruby24 ruby25" +inherit autotools flag-o-matic multilib-minimal ruby-single DESCRIPTION="Alternative to vendor specific OpenCL ICD loaders" HOMEPAGE="https://github.com/OCL-dev/ocl-icd" @@ -12,10 +13,9 @@ LICENSE="BSD-2" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="" +IUSE="+khronos-headers" -DEPEND="dev-lang/ruby - dev-ruby/rubygems" +DEPEND="${RUBY_DEPS}" RDEPEND="app-eselect/eselect-opencl" src_prepare() { @@ -30,16 +30,23 @@ multilib_src_configure() { } multilib_src_install() { + default + + # Drop .la files find "${D}" -name '*.la' -delete || die - echo "/usr/$(get_libdir)/OpenCL/vendors/ocl-icd/libOpenCL.so" > "${PN}-${ABI}.icd" - insinto /etc/OpenCL/vendors/ - doins "${PN}-${ABI}.icd" + OCL_DIR="/usr/$(get_libdir)/OpenCL/vendors/ocl-icd" + dodir ${OCL_DIR}/{,include} - emake DESTDIR="${D}" install + # Install vendor library + mv -f "${D}/usr/$(get_libdir)"/libOpenCL* "${ED}${OCL_DIR}" || die "Can't install vendor library" - OCL_DIR="${D}"/usr/"$(get_libdir)"/OpenCL/vendors/ocl-icd/ - mkdir -p ${OCL_DIR} || die "mkdir failed" + # Install vendor headers + if use khronos-headers; then + cp -r "${S}/khronos-headers/CL" "${ED}${OCL_DIR}/include" || die "Can't install vendor headers" + fi +} - mv "${D}/usr/$(get_libdir)"/libOpenCL* "${OCL_DIR}" +pkg_postinst() { + eselect opencl set --use-old ${PN} }