summaryrefslogtreecommitdiff
path: root/dev-libs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-01-19 19:19:56 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-01-19 19:19:56 +0000
commit5d0b82d02220085a717c53f54b29a8f6d4d00dd6 (patch)
treeccab10ebb6212a4b69724d54e287057f7f379916 /dev-libs
parente350dc300bdb7efe4c5619f72e12468cf0fe885f (diff)
dev-libs/ocl-icd : import from gentoo, don't use ruby-single.eclass
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/ocl-icd/Manifest1
-rw-r--r--dev-libs/ocl-icd/ocl-icd-2.2.12-r10.ebuild52
2 files changed, 53 insertions, 0 deletions
diff --git a/dev-libs/ocl-icd/Manifest b/dev-libs/ocl-icd/Manifest
new file mode 100644
index 00000000..ae9b88a9
--- /dev/null
+++ b/dev-libs/ocl-icd/Manifest
@@ -0,0 +1 @@
+DIST ocl-icd-2.2.12.tar.gz 80718 BLAKE2B 524f9eea9782323eafa2f41858c4970333c029898c651bbf15624331e184d1b439d2259532b02defd67c9ab434a35b1b9a64a28e1515b3f42f09b3a270975df7 SHA512 f1668c3a39ecfbc089ee5a5f61f44ceb86ab80e504e58064dec306ce907daf77936c5403b4af15ed8714068891d68346c86725f285cfbc90c4fcb35d18db4048
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}
+}