blob: 995ed664ab9189f2b785ed52fa5456630610f260 [file] [log] [blame]
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-opengl/eselect-opengl-1.2.4.ebuild,v 1.1 2011/08/18 18:15:01 vapier Exp $
EAPI=4
inherit multilib eutils
DESCRIPTION="Utility to change the OpenGL interface being used"
HOMEPAGE="http://www.gentoo.org/"
# Source:
# http://www.opengl.org/registry/api/glext.h
# http://www.opengl.org/registry/api/glxext.h
GLEXT="67"
GLXEXT="32"
MIRROR="http://dev.gentooexperimental.org/~scarabeus/"
SRC_URI="${MIRROR}/glext.h.${GLEXT}.xz
${MIRROR}/glxext.h.${GLXEXT}.xz
mirror://gentoo/${P}.tar.xz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="*"
IUSE=""
DEPEND="app-arch/xz-utils"
RDEPEND=">=app-admin/eselect-1.2.4"
pkg_postinst() {
local impl="$(eselect opengl show)"
if [[ -n "${impl}" && "${impl}" != '(none)' ]] ; then
eselect opengl set "${impl}"
fi
}
src_prepare() {
epatch "${FILESDIR}"/*.patch
}
src_install() {
insinto "/usr/share/eselect/modules"
doins opengl.eselect
doman opengl.eselect.5
# Install global glext.h and glxext.h
insinto "/usr/$(get_libdir)/opengl/global/include"
cd "${WORKDIR}"
newins glext.h.${GLEXT} glext.h
newins glxext.h.${GLXEXT} glxext.h
}