summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <eradicator@gentoo.org>2005-08-13 07:42:36 +0000
committerJeremy Huddleston <eradicator@gentoo.org>2005-08-13 07:42:36 +0000
commitccd5f63220b6cac196397eed80aa53138bb6b406 (patch)
tree83a70d96c9dd6e18bf59686fcf8415c7d19ed0a3 /x11-base/opengl-update/opengl-update-3.0.0.ebuild
parentStable on hppa (diff)
downloadgentoo-2-ccd5f63220b6cac196397eed80aa53138bb6b406.tar.gz
gentoo-2-ccd5f63220b6cac196397eed80aa53138bb6b406.tar.bz2
gentoo-2-ccd5f63220b6cac196397eed80aa53138bb6b406.zip
Transition to eselect module, but we still have an opengl-update executable as a frontend to it while users/ebuilds migrate. Also bump the versions of the headers to latest upstream.
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'x11-base/opengl-update/opengl-update-3.0.0.ebuild')
-rw-r--r--x11-base/opengl-update/opengl-update-3.0.0.ebuild91
1 files changed, 91 insertions, 0 deletions
diff --git a/x11-base/opengl-update/opengl-update-3.0.0.ebuild b/x11-base/opengl-update/opengl-update-3.0.0.ebuild
new file mode 100644
index 000000000000..0b7f3cab6ca6
--- /dev/null
+++ b/x11-base/opengl-update/opengl-update-3.0.0.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-base/opengl-update/opengl-update-3.0.0.ebuild,v 1.1 2005/08/13 07:42:36 eradicator Exp $
+
+inherit multilib
+
+DESCRIPTION="Utility to change the OpenGL interface being used"
+HOMEPAGE="http://www.gentoo.org/"
+
+# Source:
+# http://oss.sgi.com/projects/ogl-sample/ABI/glext.h
+# http://oss.sgi.com/projects/ogl-sample/ABI/glxext.h
+
+GLEXT="29"
+GLXEXT="11"
+
+SRC_URI="http://dev.gentoo.org/~eradicator/opengl/glext.h-${GLEXT}.bz2
+ http://dev.gentoo.org/~eradicator/opengl/glxext.h-${GLXEXT}.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE=""
+RESTRICT="multilib-pkg-force"
+
+DEPEND="app-arch/bzip2"
+RDEPEND="app-admin/eselect"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ unpack ${A}
+
+ mv glext.h-${GLEXT} glext.h
+ mv glxext.h-${GLXEXT} glxext.h
+}
+
+pkg_preinst() {
+ # It needs to be before 04multilib
+ [ -f "${ROOT}/etc/env.d/09opengl" ] && mv ${ROOT}/etc/env.d/09opengl ${ROOT}/etc/env.d/03opengl
+
+ OABI="${ABI}"
+ for ABI in $(get_install_abis); do
+ if [ -e "${ROOT}/usr/$(get_libdir)/opengl/xorg-x11/lib/libMesaGL.so" ]; then
+ einfo "Removing libMesaGL.so from xorg-x11 profile. See bug #47598."
+ rm -f ${ROOT}/usr/$(get_libdir)/opengl/xorg-x11/lib/libMesaGL.so
+ fi
+ if [ -e "${ROOT}/usr/$(get_libdir)/libMesaGL.so" ]; then
+ einfo "Removing libMesaGL.so from /usr/$(get_libdir). See bug #47598."
+ rm -f ${ROOT}/usr/$(get_libdir)/libMesaGL.so
+ fi
+
+ for f in ${ROOT}/usr/$(get_libdir)/libGL.so.* ${ROOT}/usr/$(get_libdir)/libGLcore.so.* ${ROOT}/usr/$(get_libdir)/libnvidia-tls* ${ROOT}/usr/$(get_libdir)/tls/libnvidia-tls* ; do
+ [[ -e ${f} ]] && rm -f ${f}
+ done
+ done
+ ABI="${OABI}"
+ unset OABI
+}
+
+pkg_postinst() {
+ local impl="$(eselect opengl show)"
+ if [[ -n "${impl}" ]] ; then
+ eselect opengl set "${impl}"
+ fi
+}
+
+src_install() {
+ newsbin ${FILESDIR}/opengl-update-${PV} opengl-update || die
+ insinto /usr/share/eselect/modules
+ newins ${FILESDIR}/opengl-update-${PV}.eselect opengl.eselect
+
+ # MULTILIB-CLEANUP: Fix this when FEATURES=multilib-pkg is in portage
+ local MLTEST=$(type dyn_unpack)
+ if has_multilib_profile && [ "${MLTEST/set_abi}" = "${MLTEST}" ]; then
+ OABI="${ABI}"
+ for ABI in $(get_install_abis); do
+ # Install default glext.h
+ insinto /usr/$(get_libdir)/opengl/global/include
+ doins ${WORKDIR}/glext.h || die
+ doins ${WORKDIR}/glxext.h || die
+ done
+ ABI="${OABI}"
+ unset OABI
+ else
+ # Install default glext.h
+ insinto /usr/$(get_libdir)/opengl/global/include
+ doins ${WORKDIR}/glext.h || die
+ doins ${WORKDIR}/glxext.h || die
+ fi
+}