1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
9 DESCRIPTION="Utility to change the OpenGL interface being used"
10 HOMEPAGE="https://www.gentoo.org/"
13 # http://www.opengl.org/registry/api/glext.h
14 # http://www.opengl.org/registry/api/glxext.h
18 MIRROR="https://dev.gentoo.org/~mattst88/distfiles"
19 SRC_URI="${MIRROR}/glext.h.${GLEXT}.xz
20 ${MIRROR}/glxext.h.${GLXEXT}.xz
21 ${MIRROR}/${P}.tar.xz"
25 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
28 DEPEND="app-arch/xz-utils"
29 RDEPEND=">=app-admin/eselect-1.2.4
30 !<media-libs/mesa-8.0.3-r1
31 !<x11-proto/glproto-1.4.15-r1
32 !=media-libs/mesa-10.3.4-r1
33 !=media-libs/mesa-10.3.5-r1
34 !>=media-libs/mesa-10.3.7-r2
35 !>=x11-proto/glproto-1.4.17-r1
36 !=x11-base/xorg-server-1.12.4-r6
37 !=x11-base/xorg-server-1.15.2-r3
38 !=x11-base/xorg-server-1.16.4-r1
39 !>=x11-base/xorg-server-1.16.4-r4"
42 local impl="$(eselect opengl show)"
43 if [[ -n "${impl}" && "${impl}" != '(none)' ]] ; then
44 eselect opengl set "${impl}"
49 # don't die on Darwin users
50 if [[ ${CHOST} == *-darwin* ]] ; then
51 sed -i -e 's/libGL\.so/libGL.dylib/' opengl.eselect || die
56 insinto "/usr/share/eselect/modules"
58 doman opengl.eselect.5
60 # Install global glext.h and glxext.h
61 insinto "/usr/$(get_libdir)/opengl/global/include/GL/"
63 newins glext.h.${GLEXT} glext.h
64 newins glxext.h.${GLXEXT} glxext.h