diff options
author | Jeremy Huddleston <eradicator@gentoo.org> | 2005-08-13 07:42:36 +0000 |
---|---|---|
committer | Jeremy Huddleston <eradicator@gentoo.org> | 2005-08-13 07:42:36 +0000 |
commit | 23b0288ceec8912cf3ad8b39c9c3d56f0e560378 (patch) | |
tree | 8136dc52f77d53ea68e342566e6439ae613e3891 /x11-base | |
parent | Stable on hppa (diff) | |
download | historical-23b0288ceec8912cf3ad8b39c9c3d56f0e560378.tar.gz historical-23b0288ceec8912cf3ad8b39c9c3d56f0e560378.tar.bz2 historical-23b0288ceec8912cf3ad8b39c9c3d56f0e560378.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.
Package-Manager: portage-2.0.51.22-r2
Diffstat (limited to 'x11-base')
-rw-r--r-- | x11-base/opengl-update/ChangeLog | 13 | ||||
-rw-r--r-- | x11-base/opengl-update/Manifest | 30 | ||||
-rw-r--r-- | x11-base/opengl-update/files/digest-opengl-update-2.1.1-r1 | 2 | ||||
-rw-r--r-- | x11-base/opengl-update/files/digest-opengl-update-2.2.2 | 2 | ||||
-rw-r--r-- | x11-base/opengl-update/files/digest-opengl-update-3.0.0 | 2 | ||||
-rw-r--r-- | x11-base/opengl-update/files/glxext.h-inttypes.patch | 4 | ||||
-rwxr-xr-x | x11-base/opengl-update/files/opengl-update-3.0.0 | 144 | ||||
-rw-r--r-- | x11-base/opengl-update/files/opengl-update-3.0.0.eselect | 357 | ||||
-rw-r--r-- | x11-base/opengl-update/opengl-update-2.1.1-r1.ebuild | 78 | ||||
-rw-r--r-- | x11-base/opengl-update/opengl-update-2.2.1.ebuild | 13 | ||||
-rw-r--r-- | x11-base/opengl-update/opengl-update-2.2.3.ebuild | 13 | ||||
-rw-r--r-- | x11-base/opengl-update/opengl-update-3.0.0.ebuild (renamed from x11-base/opengl-update/opengl-update-2.2.2.ebuild) | 30 |
12 files changed, 569 insertions, 119 deletions
diff --git a/x11-base/opengl-update/ChangeLog b/x11-base/opengl-update/ChangeLog index 3e06eb1c0398..24cce46afec9 100644 --- a/x11-base/opengl-update/ChangeLog +++ b/x11-base/opengl-update/ChangeLog @@ -1,6 +1,17 @@ # 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.100 2005/08/12 22:33:47 spyderous Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-base/opengl-update/ChangeLog,v 1.101 2005/08/13 07:42:36 eradicator Exp $ + +*opengl-update-3.0.0 (13 Aug 2005) + + 13 Aug 2005; Jeremy Huddleston <eradicator@gentoo.org> + +files/opengl-update-3.0.0, +files/opengl-update-3.0.0.eselect, + files/glxext.h-inttypes.patch, -opengl-update-2.1.1-r1.ebuild, + opengl-update-2.2.1.ebuild, -opengl-update-2.2.2.ebuild, + opengl-update-2.2.3.ebuild, +opengl-update-3.0.0.ebuild: + 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. *opengl-update-2.2.3 (12 Aug 2005) diff --git a/x11-base/opengl-update/Manifest b/x11-base/opengl-update/Manifest index a2fad5a6d505..2dba17b8473a 100644 --- a/x11-base/opengl-update/Manifest +++ b/x11-base/opengl-update/Manifest @@ -1,15 +1,25 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +MD5 1b918a3919fa46228e4a6f2d8319d736 ChangeLog 19007 MD5 69eeef9cee49974bcaae3cb9ddce8abd metadata.xml 366 -MD5 cd3a4b8acf0490934369cbcead0fcf26 opengl-update-2.2.1.ebuild 2670 -MD5 3f1fd46674f23700b58fe740b04cc5a7 opengl-update-2.2.2.ebuild 2684 -MD5 4a7be73674816e5b56d564f43f35245f opengl-update-2.2.3.ebuild 2684 -MD5 6cae34c9865539c34b8b126a72572fde opengl-update-2.1.1-r1.ebuild 2327 -MD5 22bbad890d202a75a539df2bdcb4f9ac ChangeLog 18474 +MD5 97763afc6c6c1ede790cc49d3b64f2e2 opengl-update-3.0.0.ebuild 2683 +MD5 47e72283d661e1735ac1b23e65bebf74 opengl-update-2.2.1.ebuild 2661 +MD5 9ee8e7fcccc74e1ee7e79a75cbeeb4ee opengl-update-2.2.3.ebuild 2671 MD5 78f2778d5b41874016deb3135122b189 files/opengl-update-2.2.1 9849 -MD5 91d9c17541be018d065a7838d7149c86 files/opengl-update-2.1.1 9110 MD5 219a292f64caeaa46b333eecde2197f2 files/digest-opengl-update-2.2.1 116 MD5 ae5b820a1034139870f7b0867f37be17 files/opengl-update-2.2.2 9702 -MD5 219a292f64caeaa46b333eecde2197f2 files/digest-opengl-update-2.2.2 116 -MD5 541a391b04dd49521480458bac48529d files/opengl-update-2.2.3 9859 +MD5 cf1441d189a90e495668ce495c1f08fd files/opengl-update-3.0.0.eselect 9797 MD5 219a292f64caeaa46b333eecde2197f2 files/digest-opengl-update-2.2.3 116 -MD5 bbec0e16e4f45a464cec5b4feeecaa9b files/digest-opengl-update-2.1.1-r1 116 -MD5 ca73e0f8c9b114553216930eb0eb601a files/glxext.h-inttypes.patch 677 +MD5 541a391b04dd49521480458bac48529d files/opengl-update-2.2.3 9859 +MD5 91d9c17541be018d065a7838d7149c86 files/opengl-update-2.1.1 9110 +MD5 2a49c0559ccf15a4670fdb3bf989360c files/opengl-update-3.0.0 3584 +MD5 600714175bf22abf40ed067b3dcb600d files/glxext.h-inttypes.patch 671 +MD5 d6b4a7de2926d22a6b52f4d129ce3e7f files/digest-opengl-update-3.0.0 116 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.2 (GNU/Linux) + +iD8DBQFC/aR/ArHZZzCEUG0RAvsqAJ9YPGqwmYFGvPfjRPHLCpjNC0hdBACeJQ++ +/XcquM8JWH27kba82/LeKZ8= +=W5xd +-----END PGP SIGNATURE----- diff --git a/x11-base/opengl-update/files/digest-opengl-update-2.1.1-r1 b/x11-base/opengl-update/files/digest-opengl-update-2.1.1-r1 deleted file mode 100644 index 6a175f487f3b..000000000000 --- a/x11-base/opengl-update/files/digest-opengl-update-2.1.1-r1 +++ /dev/null @@ -1,2 +0,0 @@ -MD5 ad3eba2841c01c0a94b6477d11d5ac31 glext.h-26.bz2 32485 -MD5 3260a509b23a3519b8df335a4e8f5e1d glxext.h-10.bz2 5895 diff --git a/x11-base/opengl-update/files/digest-opengl-update-2.2.2 b/x11-base/opengl-update/files/digest-opengl-update-2.2.2 deleted file mode 100644 index f25de9a2425e..000000000000 --- a/x11-base/opengl-update/files/digest-opengl-update-2.2.2 +++ /dev/null @@ -1,2 +0,0 @@ -MD5 aba5f492425adddd083c941735b8e3c1 glext.h-27.bz2 33156 -MD5 3260a509b23a3519b8df335a4e8f5e1d glxext.h-10.bz2 5895 diff --git a/x11-base/opengl-update/files/digest-opengl-update-3.0.0 b/x11-base/opengl-update/files/digest-opengl-update-3.0.0 new file mode 100644 index 000000000000..f4e7bd416303 --- /dev/null +++ b/x11-base/opengl-update/files/digest-opengl-update-3.0.0 @@ -0,0 +1,2 @@ +MD5 507d51b4e824b6a94f28c0e5d6793598 glext.h-29.bz2 33215 +MD5 2a8cc2e018a4fd8699d614718e61843e glxext.h-11.bz2 5900 diff --git a/x11-base/opengl-update/files/glxext.h-inttypes.patch b/x11-base/opengl-update/files/glxext.h-inttypes.patch index 04a0e896347f..02f91849864f 100644 --- a/x11-base/opengl-update/files/glxext.h-inttypes.patch +++ b/x11-base/opengl-update/files/glxext.h-inttypes.patch @@ -1,5 +1,5 @@ ---- glxext.h-10.orig 2005-01-20 00:38:56.000000000 -0800 -+++ glxext.h-10 2005-02-11 02:42:53.221321671 -0800 +--- glxext.h.orig 2005-01-20 00:38:56.000000000 -0800 ++++ glxext.h 2005-02-11 02:42:53.221321671 -0800 @@ -342,18 +342,7 @@ typedef struct { /* Define int32_t and int64_t types for UST/MSC */ diff --git a/x11-base/opengl-update/files/opengl-update-3.0.0 b/x11-base/opengl-update/files/opengl-update-3.0.0 new file mode 100755 index 000000000000..bf9c0ef546e7 --- /dev/null +++ b/x11-base/opengl-update/files/opengl-update-3.0.0 @@ -0,0 +1,144 @@ +#!/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-3.0.0,v 1.1 2005/08/13 07:42:36 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> + + +print_usage() { + cat << FOO +Usage: ${0##*/} [<options>] <GL implementation> + Set the opengl implementation. + Valid options: + --use-old: If an implementation is already set, use that one. + --prefix=<val>: Set the source prefix (default: /usr) + --dst-prefix=<val>: 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. + +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. + +WARNING: opengl-update is deprecated and is just a frontend to the opengl + eselect module. A future version will drop support for the + opengl-update command. Please see 'eselect opengl help' + +FOO +} + +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} +} + +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="old-implementation" + 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 + if [[ "${ACTION}" != "old-implementation" ]]; then + if [[ -n "${ACTION}" ]]; then + ACTION="error" + eerror "Invalid usage." + else + ACTION="set-implementation" + NEW_GL_IMPLEM="${opt}" + fi + fi + else + eerror "Unrecognized option: ${opt}" + ACTION="error" + fi + ;; + esac + done +} + +## START PROGRAM ## + +NEW_GL_IMPLEM="" +ACTION="" +PREFIX="/usr" +DST_PREFIX="/usr" +AVAIL_IMPLEMS=$(get_implementations) +CURRENT_GL_IMPLEM=$(eselect opengl show) +USE_PROFILE_HEADERS="no" + +parse_options ${@} + +case ${ACTION} in + get-implementation) + eselect opengl show + ;; + old-implementation) + eselect opengl set --use-old + exit $? + ;; + set-implementation) + local myconf = "set ${NEW_GL_IMPLEM} --prefix=\"${PREFIX}\" --dst-prefix=\"${DST_PREFIX}\"" + if [[ ${USE_PROFILE_HEADERS} == "yes" ]] ; then + myconf="${myconf} --impl-headers" + fi + eselect opengl ${myconf} + ;; + usage) + print_usage + exit 0 + ;; + *) + print_usage + exit 1 + ;; +esac diff --git a/x11-base/opengl-update/files/opengl-update-3.0.0.eselect b/x11-base/opengl-update/files/opengl-update-3.0.0.eselect new file mode 100644 index 000000000000..661a4bec77d6 --- /dev/null +++ b/x11-base/opengl-update/files/opengl-update-3.0.0.eselect @@ -0,0 +1,357 @@ +# 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-3.0.0.eselect,v 1.1 2005/08/13 07:42:36 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> +# Made into eselect module by Jeremy Huddleston <eradicator@gentoo.org> + +# Eselect data +DESCRIPTION="Manage the OpenGL implementation used by your system" +MAINTAINER="x11-drivers@gentoo.org" +VERSION="3.0.0" + +# Our data +ENV_D="${ROOT}/etc/env.d/03opengl" +PREFIX="${ROOT}/usr" +DST_PREFIX="${ROOT}/usr" +USE_PROFILE_HEADERS="no" + +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 + die -q "${0}: Must be run as root." + fi +} + +check_version() { + if portageq has_version / 'x11-base/xorg-x11'; then + if ! portageq has_version / '>=x11-base/xorg-x11-6.8.0-r4'; then + die -q "This version requires >=x11-base/xorg-x11-6.8.0-r4" + fi + 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} +} + +set-new-implementation() { + local GL_IMPLEM=${1} + local GL_LOCAL + + check_version + check_user + + # Set a sane umask... bug #83115 + umask 022 + + if ! hasq ${GL_IMPLEM} ${AVAIL_IMPLEMS}; then + eerror "Invalid profile selected." + exit 1 + fi + + echo -n "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 + + local MODULEDIR + if [[ -e "${DST_PREFIX}/${LIBDIR}/xorg/modules" ]]; then + MODULEDIR="xorg/modules" + else + MODULEDIR="modules" + fi + + if [[ -e "${PREFIX}/${LIBDIR}/opengl/${GL_LOCAL}/extensions" ]]; then + mkdir -p ${DST_PREFIX}/${LIBDIR}/${MODULEDIR}/extensions + pushd ${DST_PREFIX}/${LIBDIR}/${MODULEDIR}/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 >& /dev/null + + echo " done" +} + +### show action ### +describe_show() { + echo "Print the current OpenGL implementation." +} + +do_show() { + local CURRENT_GL_IMPLEM=$(get_current_implem) + if [[ -n "${CURRENT_GL_IMPLEM}" ]]; then + echo ${CURRENT_GL_IMPLEM} + return 0 + else + echo "(none)" + return 2 + fi +} + +### list action ### +describe_list() { + echo "List the availible OpenGL implementations." +} + +do_list() { + targets=( $(get_implementations) ) + write_list_start "Availible OpenGL implementations:" + if [[ -n ${targets[@]} ]] ; then + local i + for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do + [[ ${targets[${i}]} == $(get_current_implem) ]] && \ + targets[${i}]="${targets[${i}]} $(highlight '*' )" + done + write_numbered_list "${targets[@]}" + else + write_kv_list_entry "(none found)" "" + fi +} + +### set action ### +describe_set() { + echo "Select the OpenGL implementation. (see set --help)" +} + +do_set() { + local ACTION="error" + local CURRENT_GL_IMPLEM=$(get_current_implem) + local AVAIL_IMPLEMS=$(get_implementations) + + while [[ ${#} -gt 0 ]]; do + local opt=${1} + shift + case ${opt} in + --use-old) + if [[ -n "${CURRENT_GL_IMPLEM}" ]] && hasq ${CURRENT_GL_IMPLEM} ${AVAIL_IMPLEMS}; then + ACTION="old-implementation" + fi + ;; + --prefix=*) + PREFIX=${ROOT}${opt#*=} + AVAIL_IMPLEMS=$(get_implementations) + ;; + --dst-prefix=*) + DST_PREFIX=${ROOT}${opt#*=} + ;; + --impl-headers) + USE_PROFILE_HEADERS="yes" + ;; + --help|-h|-?) + ACION="usage" + ;; + *) + if [[ "${ACTION}" != "old-implementation" ]]; then + ACTION="set-implementation" + fi + + if is_number ${opt} ; then + targets=( $(get_implementations) ) + NEW_GL_IMPLEM=${targets[$(( ${opt} - 1 ))]} + if [[ -z "${NEW_GL_IMPLEM}" ]] ; then + die -q "Unrecognized option: ${opt}" + fi + elif hasq ${opt} ${AVAIL_IMPLEMS}; then + NEW_GL_IMPLEM="${opt}" + else + die -q "Unrecognized option: ${opt}" + fi + ;; + esac + done + + case ${ACTION} in + old-implementation) + set-new-implementation ${CURRENT_GL_IMPLEM} + return $? + ;; + set-implementation) + if [[ -n "${NEW_GL_IMPLEM}" ]]; then + set-new-implementation ${NEW_GL_IMPLEM} + return $? + else + print_set_usage + return 1 + fi + ;; + usage) + print_set_usage + return 0 + ;; + *) + print_set_usage + return 1 + ;; + esac + +} + +print_set_usage() { +cat << FOO +Usage: eselect opengl set [<options>] <GL implementation> + Set the opengl implementation. + Valid options: + --use-old: If an implementation is already set, use that one. + --prefix=<val>: Set the source prefix (default: /usr) + --dst-prefix=<val>: Set the destination prefix (default: /usr) + --impl-headers: Use headers provided by this implementation to + override golbal ones provided by opengl-update. + This was default in <opengl-update-2.2 +FOO +} diff --git a/x11-base/opengl-update/opengl-update-2.1.1-r1.ebuild b/x11-base/opengl-update/opengl-update-2.1.1-r1.ebuild deleted file mode 100644 index 8800db2e5bb5..000000000000 --- a/x11-base/opengl-update/opengl-update-2.1.1-r1.ebuild +++ /dev/null @@ -1,78 +0,0 @@ -# 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.1.1-r1.ebuild,v 1.10 2005/05/05 23:17:37 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="26" -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" - -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 - done - ABI="${OABI}" - unset OABI -} - -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 -} diff --git a/x11-base/opengl-update/opengl-update-2.2.1.ebuild b/x11-base/opengl-update/opengl-update-2.2.1.ebuild index 993020532a39..0d147127a248 100644 --- a/x11-base/opengl-update/opengl-update-2.2.1.ebuild +++ b/x11-base/opengl-update/opengl-update-2.2.1.ebuild @@ -1,6 +1,6 @@ # 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.1.ebuild,v 1.9 2005/07/07 22:51:45 geoman Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-base/opengl-update/opengl-update-2.2.1.ebuild,v 1.10 2005/08/13 07:42:36 eradicator Exp $ inherit multilib toolchain-funcs eutils @@ -31,6 +31,9 @@ S="${WORKDIR}" src_unpack() { unpack ${A} + mv glext.h-${GLEXT} glext.h + mv glxext.h-${GLXEXT} glxext.h + # Bugs #81199, #81472 epatch ${FILESDIR}/glxext.h-inttypes.patch } @@ -75,15 +78,15 @@ src_install() { 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 + 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 - newins ${WORKDIR}/glext.h-${GLEXT} glext.h || die - newins ${WORKDIR}/glxext.h-${GLXEXT} glxext.h || die + doins ${WORKDIR}/glext.h || die + doins ${WORKDIR}/glxext.h || die fi } diff --git a/x11-base/opengl-update/opengl-update-2.2.3.ebuild b/x11-base/opengl-update/opengl-update-2.2.3.ebuild index 0469fb85d5c6..272493c99218 100644 --- a/x11-base/opengl-update/opengl-update-2.2.3.ebuild +++ b/x11-base/opengl-update/opengl-update-2.2.3.ebuild @@ -1,6 +1,6 @@ # 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.3.ebuild,v 1.1 2005/08/12 22:33:47 spyderous Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-base/opengl-update/opengl-update-2.2.3.ebuild,v 1.2 2005/08/13 07:42:36 eradicator Exp $ inherit multilib toolchain-funcs eutils @@ -31,6 +31,9 @@ S="${WORKDIR}" src_unpack() { unpack ${A} + mv glext.h-${GLEXT} glext.h + mv glxext.h-${GLXEXT} glxext.h + # Bugs #81199, #81472 epatch ${FILESDIR}/glxext.h-inttypes.patch } @@ -75,15 +78,15 @@ src_install() { 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 + 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 - newins ${WORKDIR}/glext.h-${GLEXT} glext.h || die - newins ${WORKDIR}/glxext.h-${GLXEXT} glxext.h || die + doins ${WORKDIR}/glext.h || die + doins ${WORKDIR}/glxext.h || die fi } diff --git a/x11-base/opengl-update/opengl-update-2.2.2.ebuild b/x11-base/opengl-update/opengl-update-3.0.0.ebuild index 4abe155fda18..0b7f3cab6ca6 100644 --- a/x11-base/opengl-update/opengl-update-2.2.2.ebuild +++ b/x11-base/opengl-update/opengl-update-3.0.0.ebuild @@ -1,8 +1,8 @@ # 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.2.ebuild,v 1.1 2005/08/10 06:39:34 spyderous Exp $ +# $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 toolchain-funcs eutils +inherit multilib DESCRIPTION="Utility to change the OpenGL interface being used" HOMEPAGE="http://www.gentoo.org/" @@ -11,8 +11,8 @@ HOMEPAGE="http://www.gentoo.org/" # http://oss.sgi.com/projects/ogl-sample/ABI/glext.h # http://oss.sgi.com/projects/ogl-sample/ABI/glxext.h -GLEXT="27" -GLXEXT="10" +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" @@ -23,16 +23,16 @@ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" IUSE="" RESTRICT="multilib-pkg-force" -DEPEND="virtual/libc - app-arch/bzip2" +DEPEND="app-arch/bzip2" +RDEPEND="app-admin/eselect" S="${WORKDIR}" src_unpack() { unpack ${A} - # Bugs #81199, #81472 - epatch ${FILESDIR}/glxext.h-inttypes.patch + mv glext.h-${GLEXT} glext.h + mv glxext.h-${GLXEXT} glxext.h } pkg_preinst() { @@ -59,14 +59,16 @@ pkg_preinst() { } pkg_postinst() { - local impl="$(opengl-update --get-implementation)" + local impl="$(eselect opengl show)" if [[ -n "${impl}" ]] ; then - opengl-update "${impl}" + 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) @@ -75,15 +77,15 @@ src_install() { 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 + 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 - newins ${WORKDIR}/glext.h-${GLEXT} glext.h || die - newins ${WORKDIR}/glxext.h-${GLXEXT} glxext.h || die + doins ${WORKDIR}/glext.h || die + doins ${WORKDIR}/glxext.h || die fi } |