summaryrefslogtreecommitdiff
path: root/dev-libs/ocl-icd/ocl-icd-2.2.12-r2.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/ocl-icd/ocl-icd-2.2.12-r2.ebuild')
-rw-r--r--dev-libs/ocl-icd/ocl-icd-2.2.12-r2.ebuild54
1 files changed, 54 insertions, 0 deletions
diff --git a/dev-libs/ocl-icd/ocl-icd-2.2.12-r2.ebuild b/dev-libs/ocl-icd/ocl-icd-2.2.12-r2.ebuild
new file mode 100644
index 00000000..451b66f7
--- /dev/null
+++ b/dev-libs/ocl-icd/ocl-icd-2.2.12-r2.ebuild
@@ -0,0 +1,54 @@
+# 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"
+
+PATCHES=("${FILESDIR}"/${P}-gcc-10.patch)
+
+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}
+}