mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-05 12:38:09 -07:00
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@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/10122 Signed-off-by: Matt Turner <mattst88@gentoo.org>
This commit is contained in:
@@ -5,4 +5,9 @@
|
||||
<email>patrick@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>
|
||||
|
||||
@@ -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"
|
||||
|
||||
mv "${D}/usr/$(get_libdir)"/libOpenCL* "${OCL_DIR}"
|
||||
# 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}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user