1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
10 DESCRIPTION="Utility to change the OpenCL implementation being used"
11 HOMEPAGE="https://www.gentoo.org/"
14 # http://www.khronos.org/registry/cl/api/${CL_ABI}/opencl.h
15 # http://www.khronos.org/registry/cl/api/${CL_ABI}/cl_platform.h
16 # http://www.khronos.org/registry/cl/api/${CL_ABI}/cl.h
17 # http://www.khronos.org/registry/cl/api/${CL_ABI}/cl_ext.h
18 # http://www.khronos.org/registry/cl/api/${CL_ABI}/cl_gl.h
19 # http://www.khronos.org/registry/cl/api/${CL_ABI}/cl_gl_ext.h
20 # http://www.khronos.org/registry/cl/api/${CL_ABI}/cl.hpp
22 MIRROR="https://dev.gentoo.org/~xarthisius/distfiles/"
23 SRC_URI="${MIRROR}/opencl.h.${CL_ABI}.xz
24 ${MIRROR}/cl_platform.h.${CL_ABI}.xz
25 ${MIRROR}/cl.h.${CL_ABI}.xz
26 ${MIRROR}/cl_ext.h.${CL_ABI}.xz
27 ${MIRROR}/cl_gl.h.${CL_ABI}.xz
28 ${MIRROR}/cl_gl_ext.h.${CL_ABI}.xz
29 ${MIRROR}/cl.hpp.${CL_ABI}.xz
30 ${MIRROR}/${P}-r1.tar.xz"
34 KEYWORDS="amd64 ~ppc x86 ~amd64-fbsd ~x86-fbsd"
37 DEPEND="app-arch/xz-utils"
38 RDEPEND=">=app-admin/eselect-1.2.4"
41 local impl="$(eselect opencl show)"
42 if [[ -n "${impl}" && "${impl}" != '(none)' ]] ; then
43 eselect opencl set "${impl}"
48 insinto /usr/share/eselect/modules
50 #doman opencl.eselect.5
52 local headers=( opencl.h cl_platform.h cl.h cl_ext.h cl_gl.h cl_gl_ext.h cl.hpp )
53 insinto /usr/$(get_libdir)/OpenCL/global/include/CL
55 for f in ${headers[@]}; do
56 newins ${f}.${CL_ABI} ${f}