diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-01-19 19:19:56 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-01-19 19:19:56 +0000 |
commit | 5d0b82d02220085a717c53f54b29a8f6d4d00dd6 (patch) | |
tree | ccab10ebb6212a4b69724d54e287057f7f379916 /dev-libs/ocl-icd/ocl-icd-2.2.12-r10.ebuild | |
parent | e350dc300bdb7efe4c5619f72e12468cf0fe885f (diff) |
dev-libs/ocl-icd : import from gentoo, don't use ruby-single.eclass
Diffstat (limited to 'dev-libs/ocl-icd/ocl-icd-2.2.12-r10.ebuild')
-rw-r--r-- | dev-libs/ocl-icd/ocl-icd-2.2.12-r10.ebuild | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/dev-libs/ocl-icd/ocl-icd-2.2.12-r10.ebuild b/dev-libs/ocl-icd/ocl-icd-2.2.12-r10.ebuild new file mode 100644 index 00000000..ec8e555b --- /dev/null +++ b/dev-libs/ocl-icd/ocl-icd-2.2.12-r10.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools flag-o-matic multilib-minimal + +DESCRIPTION="Alternative to vendor specific OpenCL ICD loaders" +HOMEPAGE="https://github.com/OCL-dev/ocl-icd" +SRC_URI="https://github.com/OCL-dev/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="+khronos-headers" + +BDEPEND="dev-lang/ruby:2.5 + virtual/rubygems" +RDEPEND="app-eselect/eselect-opencl" + +src_prepare() { + replace-flags -Os -O2 # bug 646122 + + default + eautoreconf +} + +multilib_src_configure() { + ECONF_SOURCE="${S}" econf --enable-pthread-once +} + +multilib_src_install() { + default + + # Drop .la files + find "${ED}" -name '*.la' -delete || die + + OCL_DIR="/usr/$(get_libdir)/OpenCL/vendors/ocl-icd" + dodir ${OCL_DIR}/{,include} + + # Install vendor library + mv -f "${ED}/usr/$(get_libdir)"/libOpenCL* "${ED}${OCL_DIR}" || die "Can't install vendor library" + + # 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 +} + +pkg_postinst() { + eselect opencl set --use-old ${PN} +} |