# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=5 inherit eutils versionator RESTRICT="test" DESCRIPTION="The CO-PRocessing THReads (COPRTHR) SDK" HOMEPAGE="https://github.com/browndeer/coprthr http://www.browndeertechnology.com/coprthr.html" SRC_URI="https://github.com/browndeer/coprthr/archive/v${PV}.zip -> ${P}.zip" SLOT="0" LICENSE="LGPL-3" KEYWORDS="~amd64" IUSE="video_cards_fglrx video_cards_nvidia video_cards_intel" DEPEND="dev-libs/libelf dev-libs/libconfig dev-libs/libevent video_cards_fglrx? ( >=x11-drivers/ati-drivers-12.1-r1 ) video_cards_nvidia? ( >=x11-drivers/nvidia-drivers-290.10-r2 ) video_cards_intel? ( dev-util/intel-ocl-sdk ) " RDEPEND="${DEPEND}" src_configure() { use video_cards_nvidia && myconf+="nvidia," use video_cards_fglrx && myconf+="amdapp," use video_cards_intel && myconf+="intel" ./configure prefix=/usr --with-lib=/usr --enable-user-install --with-opencl-icd-path="${D}/etc/OpenCL/vendors/" \ --docdir=/usr/share/doc --with-opencl-platform=coprthr,${myconf} } src_compile() { emake -j1 } src_test() { emake -j1 test } src_install() { # silly build system making sandbox unhappy ... emake -j1 INSTALL_ICD_DIR="${D}/usr/icd/" prefix="${D}/usr" install # we provide headers already #rm -rf "${D}"/usr/include/CL/ # don't need this installed rm -rf "${D}"/usr/test # build system is silly, let's fix this path: echo "/usr/lib/libcoprthr_opencl.so" > "${D}"/etc/OpenCL/vendors/coprthr.icd mv "${D}"/usr/etc/ocl.conf "${D}"/etc/ }