Use https by default
[gentoo.git] / app-eselect / eselect-opencl / eselect-opencl-1.1.0-r1.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=4
6 CL_ABI=1.1
7
8 inherit multilib
9
10 DESCRIPTION="Utility to change the OpenCL implementation being used"
11 HOMEPAGE="https://www.gentoo.org/"
12
13 # Source:
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
21
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"
31
32 LICENSE="GPL-2"
33 SLOT="0"
34 KEYWORDS="amd64 ~ppc x86 ~amd64-fbsd ~x86-fbsd"
35 IUSE=""
36
37 DEPEND="app-arch/xz-utils"
38 RDEPEND=">=app-admin/eselect-1.2.4"
39
40 pkg_postinst() {
41         local impl="$(eselect opencl show)"
42         if [[ -n "${impl}"  && "${impl}" != '(none)' ]] ; then
43                 eselect opencl set "${impl}"
44         fi
45 }
46
47 src_install() {
48         insinto /usr/share/eselect/modules
49         doins opencl.eselect
50         #doman opencl.eselect.5
51
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
54         cd "${WORKDIR}"
55         for f in ${headers[@]}; do
56                 newins ${f}.${CL_ABI} ${f}
57         done
58 }