diff options
author | Marek Szuba <marecki@gentoo.org> | 2018-09-27 10:42:27 +0100 |
---|---|---|
committer | Marek Szuba <marecki@gentoo.org> | 2018-09-27 10:42:56 +0100 |
commit | 663eb4abfe7059e46994caee8ced73dd52f15c92 (patch) | |
tree | babe72e66e475dd0847cf7fc2134ab334e3a16d6 /dev-libs/beignet | |
parent | sys-power/iasl: Removed old. (diff) | |
download | gentoo-663eb4abfe7059e46994caee8ced73dd52f15c92.tar.gz gentoo-663eb4abfe7059e46994caee8ced73dd52f15c92.tar.bz2 gentoo-663eb4abfe7059e46994caee8ced73dd52f15c92.zip |
dev-libs/beignet: run "eselect opencl" in pkg_postinst()
Select ocl-icd if the relevant USE flag was set, self otherwise. In both
cases use --use-old to honour possible earlier user-made choice.
Package-Manager: Portage-2.3.49, Repoman-2.3.10
Diffstat (limited to 'dev-libs/beignet')
-rw-r--r-- | dev-libs/beignet/beignet-1.3.2-r2.ebuild | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/dev-libs/beignet/beignet-1.3.2-r2.ebuild b/dev-libs/beignet/beignet-1.3.2-r2.ebuild index bc69b887c3d5..189160961421 100644 --- a/dev-libs/beignet/beignet-1.3.2-r2.ebuild +++ b/dev-libs/beignet/beignet-1.3.2-r2.ebuild @@ -25,16 +25,16 @@ else S=${WORKDIR}/Beignet-${PV}-Source fi -COMMON="media-libs/mesa[${MULTILIB_USEDEP}] +COMMON="app-eselect/eselect-opencl + media-libs/mesa[${MULTILIB_USEDEP}] <sys-devel/clang-6.0.9999:=[${MULTILIB_USEDEP}] >=x11-libs/libdrm-2.4.70[video_cards_intel,${MULTILIB_USEDEP}] x11-libs/libXext[${MULTILIB_USEDEP}] - x11-libs/libXfixes[${MULTILIB_USEDEP}]" -RDEPEND="${COMMON} - app-eselect/eselect-opencl" + x11-libs/libXfixes[${MULTILIB_USEDEP}] + ocl-icd? ( dev-libs/ocl-icd )" +RDEPEND="${COMMON}" DEPEND="${COMMON} ${PYTHON_DEPS} - ocl-icd? ( dev-libs/ocl-icd ) virtual/pkgconfig" LLVM_MAX_SLOT=6 @@ -105,3 +105,11 @@ multilib_src_install() { dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libcl.so.1 dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libcl.so } + +pkg_postinst() { + if use ocl-icd; then + "${ROOT}"/usr/bin/eselect opencl set --use-old ocl-icd + else + "${ROOT}"/usr/bin/eselect opencl set --use-old beignet + fi +} |