/[gentoo-x86]/app-admin/eselect-opencl/eselect-opencl-1.1.0-r3.ebuild
Gentoo

Contents of /app-admin/eselect-opencl/eselect-opencl-1.1.0-r3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Tue Mar 31 20:35:48 2015 UTC (4 years, 9 months ago) by ulm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Package move app-admin/eselect-* to app-eselect/eselect-*.

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-opencl/eselect-opencl-1.1.0-r3.ebuild,v 1.1 2014/07/14 02:52:20 patrick Exp $
4
5 EAPI=4
6
7 inherit multilib
8
9 DESCRIPTION="Utility to change the OpenCL implementation being used"
10 HOMEPAGE="http://www.gentoo.org/"
11
12 # Source:
13 # http://www.khronos.org/registry/cl/api/${CL_ABI}/opencl.h
14 # http://www.khronos.org/registry/cl/api/${CL_ABI}/cl_platform.h
15 # http://www.khronos.org/registry/cl/api/${CL_ABI}/cl.h
16 # http://www.khronos.org/registry/cl/api/${CL_ABI}/cl_ext.h
17 # http://www.khronos.org/registry/cl/api/${CL_ABI}/cl_gl.h
18 # http://www.khronos.org/registry/cl/api/${CL_ABI}/cl_gl_ext.h
19 # http://www.khronos.org/registry/cl/api/${CL_ABI}/cl.hpp
20
21 # Using copy by Mario Kicherer #496418
22
23 #MIRROR="http://dev.gentoo.org/~xarthisius/distfiles/"
24 SRC_URI="https://github.com/anyc/opencl-headers/archive/opencl-headers-1.2.tar.gz
25 http://dev.gentoo.org/~xarthisius/distfiles/${P}-r1.tar.xz"
26
27 LICENSE="GPL-2"
28 SLOT="0"
29 KEYWORDS="~amd64 ~ppc ~x86 ~amd64-fbsd ~x86-fbsd"
30 IUSE=""
31
32 DEPEND="app-arch/xz-utils"
33 RDEPEND=">=app-admin/eselect-1.2.4"
34
35 pkg_postinst() {
36 local impl="$(eselect opencl show)"
37 if [[ -n "${impl}" && "${impl}" != '(none)' ]] ; then
38 eselect opencl set "${impl}"
39 fi
40 }
41
42 src_install() {
43 insinto /usr/share/eselect/modules
44 doins opencl.eselect
45 #doman opencl.eselect.5
46
47 local headers=( opencl.h cl_platform.h cl.h cl_ext.h cl_gl.h cl_gl_ext.h cl.hpp )
48
49 # We install all versions of OpenCL headers
50 cd "${WORKDIR}/opencl-headers-opencl-headers-1.2"
51 for CL_ABI in 1.0 1.1 1.2; do
52 mkdir -p "${D}/usr/$(get_libdir)/OpenCL/global/include/CL-${CL_ABI}"
53 for f in ${headers[@]}; do
54 cp OpenCL-${CL_ABI}/${f} "${D}/usr/$(get_libdir)/OpenCL/global/include/CL-${CL_ABI}/${f}"
55 done
56 done
57 # Create symlinks to newest. Maybe this should be switchable?
58 for f in ${headers[@]}; do
59 dosym "${D}/usr/$(get_libdir)/OpenCL/global/include/CL-1.1/${f}" "/usr/$(get_libdir)/OpenCL/global/include/CL/${f}"
60 done
61 }

  ViewVC Help
Powered by ViewVC 1.1.20