pentoo-opencl: introduce virtual to pull in the correct opencl support based on user config, and use it

This commit is contained in:
Rick Farina (Zero_Chaos) 2020-08-02 12:18:35 -04:00
parent d53fe253ed
commit d561bd0a26
No known key found for this signature in database
GPG key ID: A29433C0AA431DDC
4 changed files with 48 additions and 19 deletions

View file

@ -8,22 +8,22 @@ HOMEPAGE="http://www.pentoo.ch"
LICENSE="GPL-3"
SLOT="0"
IUSE_VIDEO_CARDS="video_cards_nvidia"
IUSE="amd-opencl intel-opencl opencl +dict ${IUSE_VIDEO_CARDS} livecd-stage1 pentoo-extra pentoo-full"
IUSE="opencl +dict livecd-stage1 pentoo-extra pentoo-full"
KEYWORDS="~amd64 ~arm ~x86"
#rocm is opencl for amd
#intel-neo is opencl for newer intel
PDEPEND="
app-crypt/johntheripper-jumbo
net-analyzer/hydra
!arm? ( app-crypt/chntpw )
!arm? ( !livecd-stage1? ( opencl? ( app-crypt/hashcat
amd-opencl? ( dev-libs/rocm-opencl-runtime )
intel-opencl? ( dev-libs/intel-neo )
dev-libs/opencl-icd-loader
net-wireless/hcxkeys ) ) )
!arm? (
app-crypt/chntpw
!livecd-stage1? (
opencl? (
pentoo/pentoo-opencl
app-crypt/hashcat
net-wireless/hcxkeys
)
)
)
pentoo-full? (
net-analyzer/medusa

View file

@ -0,0 +1,31 @@
# Copyright 2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DESCRIPTION="Virtual for pulling in appropriate opencl stuffs"
HOMEPAGE="https://pentoo.ch"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="opencl-cpu video_cards_amdgpu video_cards_i965 video_cards_nvidia"
DEPEND=""
RDEPEND=""
BDEPEND=""
PDEPEND="virtual/opencl
opencl-cpu? ( amd64? ( dev-util/intel-ocl-sdk ) )
video_cards_amdgpu? ( dev-libs/rocm-opencl-runtime )
video_cards_i965? ( dev-libs/intel-neo )
video_cards_nvidia? ( x11-drivers/nvidia-drivers[uvm] )
"
pkg_setup() {
if use opencl-cpu; then
if ! use amd64; then
die "opencl-cpu is only available for 64 bit systems"
fi
fi
}

View file

@ -9,7 +9,7 @@ HOMEPAGE="http://www.pentoo.ch"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"
IUSE="cuda gps +drivers livecd-stage1 pentoo-extra pentoo-full opencl +wpe"
IUSE="gps +drivers livecd-stage1 pentoo-extra pentoo-full +wpe"
#util-linux has rfkill now
PDEPEND="

View file

@ -69,14 +69,12 @@ PDEPEND="
sci-geosciences/gpsd
net-wireless/rtl_433
net-wireless/mousejack
opencl? ( pentoo/pentoo-opencl
net-wireless/gnuradio
net-wireless/fosphor_knob
)
)
opencl? ( net-wireless/gnuradio
dev-libs/rocm-opencl-runtime
net-analyzer/gr-fosphor
net-wireless/fosphor_knob
dev-libs/opencl-icd-loader
dev-libs/intel-neo
)"
"
src_install() {
if ! use wctf-minimal; then