diff options
author | Jeremy Huddleston <eradicator@gentoo.org> | 2005-08-17 21:43:19 +0000 |
---|---|---|
committer | Jeremy Huddleston <eradicator@gentoo.org> | 2005-08-17 21:43:19 +0000 |
commit | 879396b6210b760ecbe879f32c929fa633a5180d (patch) | |
tree | ec8c10574a81e282adf7424f34c5636d7b2c154b /x11-base | |
parent | Added eselect opengl module which will be a replacement for opengl-update. (diff) | |
download | gentoo-2-879396b6210b760ecbe879f32c929fa633a5180d.tar.gz gentoo-2-879396b6210b760ecbe879f32c929fa633a5180d.tar.bz2 gentoo-2-879396b6210b760ecbe879f32c929fa633a5180d.zip |
Moved eselect stuff to app-admin/eselect-opengl
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'x11-base')
-rw-r--r-- | x11-base/opengl-update/ChangeLog | 6 | ||||
-rw-r--r-- | x11-base/opengl-update/files/opengl-update-3.0.0.eselect | 324 | ||||
-rw-r--r-- | x11-base/opengl-update/opengl-update-3.0.0.ebuild | 78 |
3 files changed, 8 insertions, 400 deletions
diff --git a/x11-base/opengl-update/ChangeLog b/x11-base/opengl-update/ChangeLog index b01ed30305db..00a80b0f1cf4 100644 --- a/x11-base/opengl-update/ChangeLog +++ b/x11-base/opengl-update/ChangeLog @@ -1,6 +1,10 @@ # 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.102 2005/08/13 20:29:11 eradicator Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-base/opengl-update/ChangeLog,v 1.103 2005/08/17 21:43:19 eradicator Exp $ + + 17 Aug 2005; Jeremy Huddleston <eradicator@gentoo.org> + -files/opengl-update-3.0.0.eselect, opengl-update-3.0.0.ebuild: + Moved eselect stuff to app-admin/eselect-opengl 13 Aug 2005; Jeremy Huddleston <eradicator@gentoo.org> files/opengl-update-3.0.0.eselect: 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 deleted file mode 100644 index 92613933e3d6..000000000000 --- a/x11-base/opengl-update/files/opengl-update-3.0.0.eselect +++ /dev/null @@ -1,324 +0,0 @@ -# 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.4 2005/08/15 17:50:51 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" - -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" ]] && ! has ${dir##*/} ${implems}; then - implems=${implems:+${implems} }${dir##*/} - fi - done - - echo ${implems} -} - -set_new_implementation() { - local GL_IMPLEM=${1} - local GL_LOCAL - local AVAIL_IMPLEMS=$(get_implementations) - - check_version - check_root - - # Set a sane umask... bug #83115 - umask 022 - - if ! has ${GL_IMPLEM} ${AVAIL_IMPLEMS}; then - die -q "Invalid profile selected." - fi - - echo -n "Switching to ${GL_IMPLEM} OpenGL interface..." - rm -f ${ENV_D} &> /dev/null - - local libdir - for LIBDIR in $(list_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 "$(basename ${file})" ]] && rm -f $(basename ${file}) - - # Fix libtool archives (#48297) - if [[ "${file%.la}" != "${file}" ]]; then - sed "s:${PREFIX}/[^/]*/opengl/[^/]*/lib:${DST_PREFIX}/${LIBDIR}:g" ${file} > $(basename ${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 "$(basename ${file})" ]] && rm -f $(basename ${file}) - - # Fix libtool archives (#48297) - if [ "${file%.la}" != "${file}" ]; then - sed "s:${PREFIX}/[^/]*/opengl/[^/]*/lib:${DST_PREFIX}/${LIBDIR}:g" ${file} > $(basename ${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 "$(basename ${file})" ]] && rm -f $(basename ${file}) - - # Fix libtool archives (#48297) - if [[ "${file%.la}" != "${file}" ]]; then - sed "s:${PREFIX}/[^/]*/opengl/[^/]*/lib:${DST_PREFIX}/${LIBDIR}:g" ${file} > $(basename ${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}" ]] && has ${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" - ;; - *) - 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 has ${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 - ;; - *) - die -q "Invalid usage." - ;; - esac -} - -show_extra_help_text() { - write_list_start "Extra options for 'set' action:" - write_kv_list_entry "--use-old" "If an implementation is already set, use that one." - write_kv_list_entry "--prefix=<val>" "Set the source prefix (default: /usr)" - write_kv_list_entry "--dst-prefix=<val>" "Set the destination prefix (default: /usr)" - write_kv_list_entry "--impl-headers" "Use headers provided by this implementation to" - write_kv_list_entry "" "override golbal ones provided by opengl-update." - write_kv_list_entry "" "This was default in <opengl-update-2.2" -} diff --git a/x11-base/opengl-update/opengl-update-3.0.0.ebuild b/x11-base/opengl-update/opengl-update-3.0.0.ebuild index 0b7f3cab6ca6..eedf3b2df366 100644 --- a/x11-base/opengl-update/opengl-update-3.0.0.ebuild +++ b/x11-base/opengl-update/opengl-update-3.0.0.ebuild @@ -1,91 +1,19 @@ # 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 +# $Header: /var/cvsroot/gentoo-x86/x11-base/opengl-update/opengl-update-3.0.0.ebuild,v 1.2 2005/08/17 21:43:19 eradicator Exp $ 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" +SRC_URI="" 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 -} +RDEPEND="app-admin/eselect-opengl" 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 } |