summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <eradicator@gentoo.org>2005-04-26 02:31:27 +0000
committerJeremy Huddleston <eradicator@gentoo.org>2005-04-26 02:31:27 +0000
commitd28508dc17332e801922d06ce49134e32bdd23dc (patch)
tree6ff8cf8ae9ad7dd6f286f6b127970795f9468349 /x11-base/opengl-update
parentMore cleanup (diff)
downloadgentoo-2-d28508dc17332e801922d06ce49134e32bdd23dc.tar.gz
gentoo-2-d28508dc17332e801922d06ce49134e32bdd23dc.tar.bz2
gentoo-2-d28508dc17332e801922d06ce49134e32bdd23dc.zip
Bumped glext.h version to latest from upstream (27). Now use global headers by default. You can use --impl-headers to use the ones from the specific implementation. No longer mess with nvidia tls as that's handled by the nvidia-glx ebuild instead. We just need to worry about libGL and libGLcore.
(Portage version: 2.0.51.20-r4)
Diffstat (limited to 'x11-base/opengl-update')
-rw-r--r--x11-base/opengl-update/ChangeLog11
-rw-r--r--x11-base/opengl-update/Manifest13
-rw-r--r--x11-base/opengl-update/files/digest-opengl-update-2.2.02
-rw-r--r--x11-base/opengl-update/files/opengl-update-2.2.0364
-rw-r--r--x11-base/opengl-update/opengl-update-2.2.0.ebuild93
5 files changed, 472 insertions, 11 deletions
diff --git a/x11-base/opengl-update/ChangeLog b/x11-base/opengl-update/ChangeLog
index 8f13839703d8..767c0159d4d4 100644
--- a/x11-base/opengl-update/ChangeLog
+++ b/x11-base/opengl-update/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for x11-base/opengl-update
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-base/opengl-update/ChangeLog,v 1.85 2005/04/15 22:47:22 eradicator Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-base/opengl-update/ChangeLog,v 1.86 2005/04/26 02:31:27 eradicator Exp $
+
+*opengl-update-2.2.0 (26 Apr 2005)
+
+ 26 Apr 2005; Jeremy Huddleston <eradicator@gentoo.org>
+ +files/opengl-update-2.2.0, +opengl-update-2.2.0.ebuild:
+ Bumped glext.h version to latest from upstream (27). Now use global headers
+ by default. You can use --impl-headers to use the ones from the specific
+ implementation. No longer mess with nvidia tls as that's handled by the
+ nvidia-glx ebuild instead. We just need to worry about libGL and libGLcore.
15 Apr 2005; Jeremy Huddleston <eradicator@gentoo.org>
-files/opengl-update-1.7.2, -files/opengl-update-1.8.2,
diff --git a/x11-base/opengl-update/Manifest b/x11-base/opengl-update/Manifest
index 2cd6a2f98193..8150fb7258a5 100644
--- a/x11-base/opengl-update/Manifest
+++ b/x11-base/opengl-update/Manifest
@@ -1,16 +1,9 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
MD5 3b7b8632e4d597c52ac1b7e4588ecedf ChangeLog 15908
MD5 f4a810bc95a74e27b27973e4e948a937 metadata.xml 358
+MD5 f699ba80edd5229b42953be10100fe92 opengl-update-2.2.0.ebuild 2771
MD5 7acbfac090d4bdc3b7ec492bc35b917d opengl-update-2.1.1-r1.ebuild 2420
+MD5 219a292f64caeaa46b333eecde2197f2 files/digest-opengl-update-2.2.0 116
+MD5 bf25a34a070936e3468a27ada7081cd6 files/opengl-update-2.2.0 9426
MD5 91d9c17541be018d065a7838d7149c86 files/opengl-update-2.1.1 9110
MD5 bbec0e16e4f45a464cec5b4feeecaa9b files/digest-opengl-update-2.1.1-r1 116
MD5 ca73e0f8c9b114553216930eb0eb601a files/glxext.h-inttypes.patch 677
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.1 (GNU/Linux)
-
-iD8DBQFCYESGArHZZzCEUG0RAiZrAJ0SgSQaRruwNyHEWsi/djhA6Jdg7QCfXh3T
-eCM63q9LvZvcF8CWr8OmtKE=
-=Ujn5
------END PGP SIGNATURE-----
diff --git a/x11-base/opengl-update/files/digest-opengl-update-2.2.0 b/x11-base/opengl-update/files/digest-opengl-update-2.2.0
new file mode 100644
index 000000000000..f25de9a2425e
--- /dev/null
+++ b/x11-base/opengl-update/files/digest-opengl-update-2.2.0
@@ -0,0 +1,2 @@
+MD5 aba5f492425adddd083c941735b8e3c1 glext.h-27.bz2 33156
+MD5 3260a509b23a3519b8df335a4e8f5e1d glxext.h-10.bz2 5895
diff --git a/x11-base/opengl-update/files/opengl-update-2.2.0 b/x11-base/opengl-update/files/opengl-update-2.2.0
new file mode 100644
index 000000000000..11dbb2eb133e
--- /dev/null
+++ b/x11-base/opengl-update/files/opengl-update-2.2.0
@@ -0,0 +1,364 @@
+#!/bin/bash
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-base/opengl-update/files/opengl-update-2.2.0,v 1.1 2005/04/26 02:31:27 eradicator Exp $
+# Author: Martin Schlemmer <azarah@gentoo.org>
+# Further modifications by Donnie Berkholz <spyderous@gentoo.org>
+# Further modifications based off submissions to bug #54984 <cyfred@gentoo.org>
+# Further modifications by Jeremy Huddleston <eradicator@gentoo.org>
+
+. /etc/init.d/functions.sh
+
+hasq() {
+ local x
+
+ local me=${1}
+ shift
+
+ for x in "${@}"; do
+ if [[ "${x}" == "${me}" ]]; then
+ return 0
+ fi
+ done
+ return 1
+}
+
+check_user() {
+ if [[ $(id -u) -ne 0 ]]; then
+ eerror "${0}: Must be run as root."
+ exit 1
+ fi
+}
+
+check_version() {
+ if ! portageq has_version / '>=x11-base/xorg-x11-6.8.0-r4'; then
+ eerror "This version requires >=x11-base/xorg-x11-6.8.0-r4"
+ exit 1
+ fi
+}
+
+get_current_implem() {
+ local implem
+ if [[ -f ${ENV_D} ]]; then
+ source ${ENV_D}
+ if [[ -n "${OPENGL_PROFILE}" ]]; then
+ implem="${OPENGL_PROFILE}"
+ elif [[ -n "${LDPATH}" ]]; then
+ implem="${LDPATH%%:*}"
+ implem="${implem##*opengl/}"
+ implem="${implem%/lib*}"
+ fi
+ unset LDPATH
+ unset OPENGL_PROFILE
+ fi
+
+ echo ${implem}
+}
+
+get_implementations() {
+ local implems
+ for dir in ${PREFIX}/lib{,32,64}/opengl/*; do
+ if [[ -d "${dir}" && ${dir##*/} != "global" ]] && ! hasq ${dir##*/} ${implems}; then
+ implems=${implems:+${implems} }${dir##*/}
+ fi
+ done
+ echo ${implems}
+}
+
+print_version() {
+ echo "opengl-update ${VERSION}"
+}
+
+print_usage() {
+ # Get grammar right in message
+ local IS_ARE IMPLEM_PLURAL
+ if [[ $(echo ${AVAIL_IMPLEMS} | wc -w) -eq 1 ]]; then
+ IS_ARE="is"
+ IMPLEM_PLURAL=""
+ else
+ IS_ARE="are"
+ IMPLEM_PLURAL="s"
+ fi
+
+ cat << FOO
+Usage: ${0##*/} [<options>] <GL implementation>
+ Set the opengl implementation.
+ Valid options:
+ --use-old: only change the implementation if isn't already set.
+ --prefix: set the source prefix (default: /usr)
+ --dst-prefix: set the destination prefix (default: /usr)
+ --impl-headers: Use headers provided by this implementation to
+ override golbal ones provided by opengl-update.
+
+Usage: ${0##*/} --get-implementation
+ Print the current implementaion
+
+Notes:
+ --impl-headers was default in <opengl-update-2.2.
+
+ This utility switches between OpenGL implementations. There ${IS_ARE}
+ $(echo ${AVAIL_IMPLEMS} | wc -w) available implementation${IMPLEM_PLURAL}: ${AVAIL_IMPLEMS}
+
+Examples:
+ ${0##*/} xorg-x11
+ This will setup things to use libGL.so from X.org.
+
+ ${0##*/} nvidia
+ This will setup things to use libGL.so from the nVidia drivers.
+
+FOO
+ exit 1
+}
+
+parse_options() {
+ local opt
+ while [[ ${#} -gt 0 ]]; do
+ opt=${1}
+ shift
+ case ${opt} in
+ --use-old)
+ if [[ -n "${ACTION}" ]]; then
+ ACTION="error"
+ eerror "Invalid usage."
+ else
+ if [[ -n "${CURRENT_GL_IMPLEM}" ]] && hasq ${CURRENT_GL_IMPLEM} ${AVAIL_IMPLEMS}; then
+ ACTION="nothing"
+ fi
+ fi
+ ;;
+ --get-implementation)
+ if [[ -n "${ACTION}" ]]; then
+ ACTION="error"
+ eerror "Invalid usage."
+ else
+ ACTION="get-implementation"
+ fi
+ ;;
+ --prefix=*)
+ PREFIX=${opt#*=}
+ AVAIL_IMPLEMS=$(get_implementations)
+ ;;
+ --dst-prefix=*)
+ DST_PREFIX=${opt#*=}
+ ;;
+ --impl-headers)
+ USE_PROFILE_HEADERS="yes"
+ ;;
+ --help|-h|-?)
+ ACION="usage"
+ ;;
+ *)
+ if hasq ${opt} ${AVAIL_IMPLEMS}; then
+ NEW_GL_IMPLEM="${opt}"
+ if [[ "${ACTION}" != "nothing" ]]; then
+ if [[ -n "${ACTION}" ]]; then
+ ACTION="error"
+ eerror "Invalid usage."
+ else
+ ACTION="set-implementation"
+ fi
+ fi
+ else
+ eerror "Unrecognized option: ${opt}"
+ ACTION="error"
+ fi
+ ;;
+ esac
+ done
+}
+
+set-new-implementation() {
+ local GL_IMPLEM=${1}
+ local GL_LOCAL
+
+ check_version
+ check_user
+
+ if ! hasq ${GL_IMPLEM} ${AVAIL_IMPLEMS}; then
+ eerror "Invalid profile selected."
+ exit 1
+ fi
+
+ ebegin "Switching to ${GL_IMPLEM} OpenGL interface"
+ rm -f ${ENV_D} &> /dev/null
+
+ LIBDIRS="lib32 lib lib64"
+ for LIBDIR in ${LIBDIRS}; do
+ # Special case handling of lib32 because it can be a symlink to
+ # emul libs
+ if [[ "${LIBDIR}" = "lib32" ]]; then
+ [[ -d "${PREFIX}/${LIBDIR}/opengl" ]] || continue
+ else
+ [[ -d "${PREFIX}/${LIBDIR}/opengl" && ! -h "${PREFIX}/${LIBDIR}" ]] || continue
+ fi
+
+ # Fallback on xorg-x11 if we don't have this implementation for this LIBDIR.
+ if [[ ! -d ${PREFIX}/${LIBDIR}/opengl/"${GL_IMPLEM}" ]]; then
+ GL_LOCAL="xorg-x11"
+ else
+ GL_LOCAL="${GL_IMPLEM}"
+ fi
+
+ mkdir -p ${DST_PREFIX}/${LIBDIR}
+ pushd ${DST_PREFIX}/${LIBDIR} &> /dev/null
+ # First remove old symlinks
+ for file in libGL{,core}.{a,so,la} ; do
+ [[ -h ${file} ]] && rm -f ${file}
+ done
+
+ # Note that we don't do .so*, just .so on purpose. The
+ # loader knows to look in the profile dir, and the
+ # linked just needs the .so
+ for file in ${PREFIX}/${LIBDIR}/opengl/${GL_LOCAL}/lib/libGL{,core}.{so,a,la}; do
+ [[ -f "${file}" ]] || continue
+ [[ -f "${file##*/}" ]] && rm -f ${file##*/}
+
+ # Fix libtool archives (#48297)
+ if [[ "${file%.la}" != "${file}" ]]; then
+ sed "s:${PREFIX}/[^/]*/opengl/[^/]*/lib:${DST_PREFIX}/${LIBDIR}:g" ${file} > ${file##*/}
+ else
+ ln -s ${file}
+ fi
+ done
+ popd &> /dev/null
+
+ if [[ -e "${PREFIX}/${LIBDIR}/${LIBDIR}/opengl/${GL_LOCAL}/lib/tls" ]]; then
+ mkdir -p ${DST_PREFIX}/${LIBDIR}/tls
+ pushd ${DST_PREFIX}/${LIBDIR}/tls &> /dev/null
+ # First remove old symlinks
+ for file in libGL{,core}.{a,so,la} ; do
+ [[ -h ${file} ]] && rm -f ${file}
+ done
+
+ for file in ${PREFIX}/${LIBDIR}/opengl/${GL_LOCAL}/lib/tls/libGL{,core}.{so,a,la}; do
+ [[ -f "${file}" ]] || continue
+ [[ -f "${file##*/}" ]] && rm -f ${file##*/}
+
+ # Fix libtool archives (#48297)
+ if [ "${file%.la}" != "${file}" ]; then
+ sed "s:${PREFIX}/[^/]*/opengl/[^/]*/lib:${DST_PREFIX}/${LIBDIR}:g" ${file} > ${file##*/}
+ else
+ ln -s ${file}
+ fi
+ done
+ popd &> /dev/null
+ fi
+
+ if [[ -e "${PREFIX}/${LIBDIR}/opengl/${GL_LOCAL}/extensions" ]]; then
+ mkdir -p ${DST_PREFIX}/${LIBDIR}/modules/extensions
+ pushd ${DST_PREFIX}/${LIBDIR}/modules/extensions &> /dev/null
+ # First remove old symlinks
+ for file in libglx.so libglx.a; do
+ [[ -h ${file} ]] && rm -f ${file}
+ done
+
+ for file in ${PREFIX}/${LIBDIR}/opengl/${GL_LOCAL}/extensions/*.{so,a,la}; do
+ [[ -f "${file}" ]] || continue
+ [[ -f "${file##*/}" ]] && rm -f ${file##*/}
+
+ # Fix libtool archives (#48297)
+ if [[ "${file%.la}" != "${file}" ]]; then
+ sed "s:${PREFIX}/[^/]*/opengl/[^/]*/lib:${DST_PREFIX}/${LIBDIR}:g" ${file} > ${file##*/}
+ else
+ ln -s ${file}
+ fi
+ done
+ popd &> /dev/null
+ fi
+
+ # Setup the includes
+ mkdir -p ${DST_PREFIX}/include/GL
+ pushd ${DST_PREFIX}/include/GL &> /dev/null
+ for file in gl.h glx.h glxtokens.h glext.h glxext.h glxmd.h glxproto.h; do
+ # IMPORTANT
+ # It is preferable currently to use the standard glext.h file
+ # however if an OpenGL provider must use a self produced glext.h
+ # then it should be installed to ${GL_IMPLEM}/include and the user
+ # can add the --impl-headers option to select it.
+
+ if [[ ${USE_PROFILE_HEADERS} == "yes" ]] ; then
+ # Check the profile first.
+ if [[ -e ${PREFIX}/${LIBDIR}/opengl/${GL_IMPLEM}/include/${file} ]]; then
+ [[ -f "${file}" || ( -L "${file}" && ! -e "${file}" ) ]] && rm -f ${file}
+ ln -s ${PREFIX}/${LIBDIR}/opengl/${GL_IMPLEM}/include/${file}
+ fi
+ fi
+
+ if [[ -e ${PREFIX}/${LIBDIR}/opengl/global/include/${file} ]]; then
+ [[ -f "${file}" || ( -L "${file}" && ! -e "${file}" ) ]] && rm -f ${file}
+ ln -s ${PREFIX}/${LIBDIR}/opengl/global/include/${file}
+ elif [[ -e ${PREFIX}/${LIBDIR}/opengl/${GL_IMPLEM}/include/${file} ]]; then
+ [[ -f "${file}" || ( -L "${file}" && ! -e "${file}" ) ]] && rm -f ${file}
+ ln -s ${PREFIX}/${LIBDIR}/opengl/${GL_IMPLEM}/include/${file}
+ elif [[ -e ${PREFIX}/${LIBDIR}/opengl/xorg-x11/include/${file} ]]; then
+ [[ -f "${file}" || ( -L "${file}" && ! -e "${file}" ) ]] && rm -f ${file}
+ ln -s ${PREFIX}/${LIBDIR}/opengl/xorg-x11/include/${file}
+ fi
+ done
+ popd &> /dev/null
+
+ # Setup the $LDPATH
+ ldpath="${ldpath:+${ldpath}:}${PREFIX}/${LIBDIR}/opengl/${GL_LOCAL}/lib"
+
+ done
+
+ echo "LDPATH=\"${ldpath}\"" > ${ENV_D}
+ echo "OPENGL_PROFILE=\"${GL_IMPLEM}\"" >> ${ENV_D}
+
+ env-update
+
+ eend 0
+}
+
+## START PROGRAM ##
+
+ENV_D="/etc/env.d/03opengl"
+NEW_GL_IMPLEM=""
+ACTION=""
+PREFIX="/usr"
+DST_PREFIX="/usr"
+AVAIL_IMPLEMS=$(get_implementations)
+CURRENT_GL_IMPLEM=$(get_current_implem)
+USE_PROFILE_HEADERS="no"
+VERSION="2.2.0"
+
+parse_options ${@}
+
+case ${ACTION} in
+ get-implementation)
+ if [[ -n "${CURRENT_GL_IMPLEM}" ]]; then
+ echo ${CURRENT_GL_IMPLEM}
+ exit 0
+ else
+ exit 2
+ fi
+ ;;
+ set-implementation)
+ if [[ -n "${NEW_GL_IMPLEM}" ]]; then
+ set-new-implementation ${NEW_GL_IMPLEM}
+ exit $?
+ else
+ print_usage
+ exit 1
+ fi
+ ;;
+ version)
+ print_version
+ exit 0
+ ;;
+ nothing)
+ exit 0
+ ;;
+ usage)
+ print_usage
+ exit 0
+ ;;
+ error)
+ print_usage
+ exit 1
+ ;;
+ *)
+ print_usage
+ exit 1
+ ;;
+esac
diff --git a/x11-base/opengl-update/opengl-update-2.2.0.ebuild b/x11-base/opengl-update/opengl-update-2.2.0.ebuild
new file mode 100644
index 000000000000..c12a2a95887c
--- /dev/null
+++ b/x11-base/opengl-update/opengl-update-2.2.0.ebuild
@@ -0,0 +1,93 @@
+# 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-2.2.0.ebuild,v 1.1 2005/04/26 02:31:27 eradicator Exp $
+
+inherit multilib toolchain-funcs eutils
+
+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="27"
+GLXEXT="10"
+
+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="virtual/libc
+ app-arch/bzip2"
+
+RDEPEND="!x11-base/xfree86
+ !<x11-base/xorg-x11-6.8.0-r4
+ !<media-video/ati-drivers-8.8.25-r3"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ unpack ${A}
+
+ # Bugs #81199, #81472
+ epatch ${FILESDIR}/glxext.h-inttypes.patch
+}
+
+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="$(opengl-update --get-implementation)"
+ if [[ -n "${impl}" ]] ; then
+ opengl-update "${impl}"
+ fi
+}
+
+src_install() {
+ newsbin ${FILESDIR}/opengl-update-${PV} opengl-update || die
+
+ # 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
+ newins ${WORKDIR}/glext.h-${GLEXT} glext.h || die
+ newins ${WORKDIR}/glxext.h-${GLXEXT} glxext.h || die
+ done
+ ABI="${OABI}"
+ unset OABI
+ else
+ # Install default glext.h
+ insinto /usr/$(get_libdir)/opengl/global/include
+ newins ${WORKDIR}/glext.h-${GLEXT} glext.h || die
+ newins ${WORKDIR}/glxext.h-${GLXEXT} glxext.h || die
+ fi
+}