Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 49182 Details for
Bug 78475
opengl-update needs better multilib support
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
opengl-update-multilib.patch
opengl-update-multilib.patch (text/plain), 10.22 KB, created by
Jeremy Huddleston (RETIRED)
on 2005-01-22 02:54:36 UTC
(
hide
)
Description:
opengl-update-multilib.patch
Filename:
MIME Type:
Creator:
Jeremy Huddleston (RETIRED)
Created:
2005-01-22 02:54:36 UTC
Size:
10.22 KB
patch
obsolete
>Index: opengl-update-2.0_pre4 >=================================================================== >RCS file: /var/cvsroot/gentoo-x86/x11-base/opengl-update/files/opengl-update-2.0_pre4,v >retrieving revision 1.3 >diff -p -u -4 -r1.3 opengl-update-2.0_pre4 >--- opengl-update-2.0_pre4 27 Dec 2004 00:06:04 -0000 1.3 >+++ opengl-update-2.0_pre4 22 Jan 2005 10:53:22 -0000 >@@ -96,8 +96,11 @@ examples: > FOO > exit 1 > } > >+# It needs to be before 04multilib >+[ -f "/etc/env.d/09opengl" ] && mv /etc/env.d/09opengl /etc/env.d/03opengl >+ > need_version > > if [ "$#" -ne 1 -a "$#" -ne 2 ] || \ > [ "$#" -eq 2 -a "$1" != "--use-old" ] >@@ -108,16 +111,16 @@ fi > GL_IMPLEM="" > > # Discover GL implementation if it exists > get_implem() { >- if [ -f /etc/env.d/09opengl ] >+ if [ -f /etc/env.d/03opengl ] > then >- source /etc/env.d/09opengl >+ source /etc/env.d/03opengl > if [ -n "${LDPATH}" ] > then >- GL_IMPLEM="${LDPATH/:\*/}" >- GL_IMPLEM="${GL_IMPLEM/\/usr\/lib\/opengl\/}" >- GL_IMPLEM="${GL_IMPLEM/\/lib}" >+ GL_IMPLEM="${LDPATH%%:*}" >+ GL_IMPLEM="${GL_IMPLEM##*opengl/}" >+ GL_IMPLEM="${GL_IMPLEM%/lib*}" > unset LDPATH > fi > fi > } >@@ -166,214 +169,110 @@ then > usage > fi > > ebegin "Switching to ${GL_IMPLEM} OpenGL interface" >+ rm -f /etc/env.d/03opengl &> /dev/null > >- # Provide the right libnvidia-tls depending on ntpl or not >- if [ "${GL_IMPLEM}" = "nvidia" ] >- then >- if [ -e /usr/lib/opengl/${GL_IMPLEM}/lib/tls ] >- then >- rm -f /usr/lib/opengl/${GL_IMPLEM}/lib/tls >- fi >- >-# This was the nvidia approach but it seems to not work, new method >-# as suggested on various bug reports, #64927, #70545 >-# /usr/lib/misc/tls_test /usr/lib/misc/tls_test_dso.so 2>/dev/null >- getconf GNU_LIBPTHREAD_VERSION | grep -i nptl > /dev/null >- if [ ${?} = 0 ] >- then >- ln -sf /usr/lib/opengl/${GL_IMPLEM}/tls /usr/lib/opengl/${GL_IMPLEM}/lib/tls >- if [ -d /usr/lib32/opengl/${GL_IMPLEM} ] >- then >- ln -sf /usr/lib32/opengl/${GL_IMPLEM}/tls /usr/lib32/opengl/${GL_IMPLEM}/lib/tls >- fi >- fi >- fi >- >- # Setup the $LDPATH >- echo "LDPATH=/usr/lib/opengl/${GL_IMPLEM}/lib" > /etc/env.d/09opengl >- # Check if we need 32 bit compatibility >- if [ -d /usr/lib32/opengl/${GL_IMPLEM} ] >- then >- source /etc/env.d/09opengl >- echo "LDPATH=${LDPATH}:/usr/lib32/opengl/${GL_IMPLEM}/lib" > /etc/env.d/09opengl >- unset LDPATH >- >- # We also need to make TLS directories now aswell, make 32bit one here >- lib32="$(readlink /usr/lib32)" >- if [ -h ${lib32}/tls ] >- then >- rm -f ${lib32}/tls >- fi >- if [ ! -d ${lib32}/tls ] >- then >- mkdir -p ${lib32}/tls >- fi >- >- fi >- >- # System wide tls stuff >- if [ -h /usr/lib/tls ] >- then >- rm -f /usr/lib/tls >- fi >- if [ ! -d /usr/lib/tls ] >- then >- mkdir -p /usr/lib/tls >- fi >- >- /usr/sbin/env-update &>/dev/null >+ LIBDIRS="lib lib32 lib64" >+ for LIBDIR in ${LIBDIRS}; do >+ [ -d "/usr/${LIBDIR}" -a ! -h "/usr/${LIBDIR}" ] || continue >+ # System wide tls stuff >+ [ -h "/usr/${LIBDIR}/tls" ] && rm -f /usr/${LIBDIR}/tls >+ [ -d "/usr/${LIBDIR}/tls" ] || mkdir -p /usr/${LIBDIR}/tls > >- LIBDIRS="lib lib32" >- for LIBDIR in ${LIBDIRS} >- do >- # If there is a 32 bit compatibility implementation we shall use it >- # Otherwise we want to have some compatibility GL, use xorg-x11. >- if [ "${LIBDIR}" = "lib32" ] && [ ! -d /usr/lib32/opengl/"${GL_IMPLEM}" ] >- then >+ # Fallback on xorg-x11 if we don't have this implementation for this LIBDIR. >+ if [ ! -d /usr/${LIBDIR}/opengl/"${GL_IMPLEM}" ]; then > GL_LOCAL="xorg-x11" > else > GL_LOCAL="${GL_IMPLEM}" > fi > >- #setup the /usr/lib/libGL.so symlink >- if [ -e /usr/${LIBDIR}/libGL.so ] >- then >- rm -f /usr/${LIBDIR}/libGL.so >- fi >- if [ -e /usr/${LIBDIR}/libGL.so.1 ] >- then >- rm -f /usr/${LIBDIR}/libGL.so.1 >- fi >- if [ -e /usr/${LIBDIR}/opengl/${GL_LOCAL}/lib/libGL.so ] >- then >- realname="$(readlink /usr/${LIBDIR}/opengl/${GL_LOCAL}/lib/libGL.so)" >- ln -sf /usr/${LIBDIR}/opengl/${GL_LOCAL}/lib/${realname} \ >- /usr/${LIBDIR}/libGL.so >- ln -sf /usr/${LIBDIR}/opengl/${GL_LOCAL}/lib/${realname} \ >- /usr/${LIBDIR}/libGL.so.1 >- fi >- >- # Setup the /usr/lib/libGLcore.so symlink >- if [ -e /usr/${LIBDIR}/libGLcore.so ] >- then >- rm -f /usr/${LIBDIR}/libGLcore.so >- fi >- if [ -e /usr/${LIBDIR}/libGLcore.so.1 ] >- then >- rm -f /usr/${LIBDIR}/libGLcore.so.1 >- fi >- if [ -e /usr/${LIBDIR}/opengl/${GL_IMPLEM}/lib/libGLcore.so ] >- then >- realname="$(readlink /usr/${LIBDIR}/opengl/${GL_IMPLEM}/lib/libGLcore.so)" >- ln -sf /usr/${LIBDIR}/opengl/${GL_LOCAL}/lib/${realname} \ >- /usr/${LIBDIR}/libGLcore.so >- ln -sf /usr/${LIBDIR}/opengl/${GL_LOCAL}/lib/${realname} \ >- /usr/${LIBDIR}/libGLcore.so.1 >+ # Provide the right libnvidia-tls depending on ntpl or not >+ if [ "${GL_LOCAL}" = "nvidia" ]; then >+ if [ -e "/usr/${LIBDIR}/opengl/${GL_LOCAL}/lib/tls" ]; then >+ rm -f /usr/${LIBDIR}/opengl/${GL_LOCAL}/lib/tls >+ fi >+ >+ if getconf GNU_LIBPTHREAD_VERSION | grep -i nptl; then >+ ln -sf /usr/${LIBDIR}/opengl/${GL_LOCAL}/tls /usr/${LIBDIR}/opengl/${GL_IMPLEM}/lib/tls >+ ldpath="${ldpath:+${ldpath}:}/usr/${LIBDIR}/opengl/${GL_LOCAL}/lib/tls" >+ fi > fi > >- # Now setup the TLS library links >- if [ -e /usr/${LIBDIR}/libnvidia-tls.so ] >- then >- rm -f /usr/${LIBDIR}/libnvidia-tls.so >- fi >- if [ -e /usr/${LIBDIR}/libnvidia-tls.so.1 ] >- then >- rm -f /usr/${LIBDIR}/libnvidia-tls.so.1 >- fi >- if [ -e /usr/${LIBDIR}/opengl/${GL_LOCAL}/lib/tls/libnvidia-tls.so.1 ] >- then >- realtls="$(readlink /usr/${LIBDIR}/opengl/${GL_LOCAL}/lib/tls/libnvidia-tls.so.1)" >- ln -sf /usr/${LIBDIR}/opengl/${GL_LOCAL}/lib/tls/${realtls} \ >- /usr/${LIBDIR}/tls/libnvidia-tls.so >- ln -sf /usr/${LIBDIR}/opengl/${GL_LOCAL}/lib/tls/${realtls} \ >- /usr/${LIBDIR}/tls/libnvidia-tls.so.1 >- fi >- if [ -e /usr/${LIBDIR}/opengl/${GL_LOCAL}/lib/libnvidia-tls.so.1 ] >- then >- realname="$(readlink /usr/${LIBDIR}/opengl/${GL_LOCAL}/lib/libnvidia-tls.so.1)" >- ln -sf /usr/${LIBDIR}/opengl/${GL_LOCAL}/lib/${realname} \ >- /usr/${LIBDIR}/libnvidia-tls.so >- ln -sf /usr/${LIBDIR}/opengl/${GL_LOCAL}/lib/${realname} \ >- /usr/${LIBDIR}/libnvidia-tls.so.1 >+ pushd /usr/${LIBDIR} >+ # First remove old symlinks >+ for file in libGL.so* libGLcore.so* libnvidia-tls.so* libMesaGL.so* tls/*; do >+ rm -f ${file} >+ done >+ >+ # Note that we don't do .so*, just .so on purpose. The >+ # loaded knows to look in the profile dir, and the >+ # linked just needs the .so >+ for file in opengl/${GL_LOCAL}/lib/*.{so,a,la}; do >+ [ -f "${file}" ] || continue >+ rm -f $(basename ${file}) >+ ln -s ${file} >+ >+ # Fix libtool archives (#48297) >+ if [ "${file%.la}" != "${file}" ]; then >+ sed -i "s:/usr/[^/]*/opengl/[^/]*/lib/:/usr/${LIBDIR}/:g" ${file} >+ fi >+ done >+ >+ ln -s opengl/${GL_LOCAL}/lib/libGL.so libMesaGL.so >+ popd >+ >+ if [ -e "/usr/${LIBDIR}/opengl/${GL_LOCAL}/lib/tls" ]; then >+ pushd /usr/${LIBDIR}/tls >+ for file in ../opengl/${GL_LOCAL}/lib/tls/*.{so,a,la}; do >+ [ -f "${file}" ] || continue >+ rm -f $(basename ${file}) >+ ln -s ${file} >+ done >+ popd >+ fi >+ >+ if [ -e "/usr/${LIBDIR}/opengl/${GL_LOCAL}/modules/extensions" ]; then >+ mkdir -p /usr/${LIBDIR}/modules/extensions >+ pushd /usr/${LIBDIR}/modules/extensions >+ for file in ../../opengl/${GL_LOCAL}/lib/extensions/*.{so,a,la}; do >+ [ -f "${file}" ] || continue >+ rm -f $(basename ${file}) >+ ln -s ${file} >+ done >+ popd >+ fi >+ >+ # Setup the $LDPATH >+ ldpath="${ldpath:+${ldpath}:}/usr/${LIBDIR}/opengl/${GL_LOCAL}/lib" >+ >+ # Setup the includes >+ if [ -d "/usr/${LIBDIR}/opengl/${GL_IMPLEM}/include" ]; then >+ for x in gl.h glx.h glxtokens.h glext.h; do >+ if [ -e /usr/X11R6/include/GL/${x} ]; then >+ rm -f /usr/X11R6/include/GL/${x} >+ fi >+ >+ # 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 >+ >+ if [ -e /usr/lib/opengl/${GL_IMPLEM}/include/${x} ]; then >+ ln -sf /usr/lib/opengl/${GL_IMPLEM}/include/${x} \ >+ /usr/X11R6/include/GL/${x} >+ else >+ ln -sf /usr/lib/opengl/global/include/${x} \ >+ /usr/X11R6/include/GL/${x} >+ fi >+ done > fi >- done >- >- # Setup the /usr/lib/libMesaGL.so symlink >- if [ -e /usr/lib/libMesaGL.so ] >- then >- rm -f /usr/lib/libMesaGL.so >- fi >- realname="$(readlink /usr/lib/opengl/${GL_IMPLEM}/lib/libGL.so)" >- ln -sf /usr/lib/opengl/${GL_IMPLEM}/lib/${realname} \ >- /usr/lib/libMesaGL.so >- >- # Setup the /usr/lib/libGL.la symlink >- if [ -e /usr/lib/libGL.la ] >- then >- rm -f /usr/lib/libGL.la >- fi >- if [ -e /usr/lib/opengl/${GL_IMPLEM}/lib/libGL.la ] >- then >- ln -sf /usr/lib/opengl/${GL_IMPLEM}/lib/libGL.la \ >- /usr/lib/libGL.la >- fi >- >- # Fix libtool archives (#48297) >- CURDIR="$(pwd)" >- cd /usr/lib >- if [ "`grep -l /usr/lib/opengl *.la`" ] >- then >- sed -i 's:/usr/lib/opengl/[^/]*/lib/libGL.la:/usr/lib/libGL.la:' \ >- `grep -l /usr/lib/opengl *.la` >- fi >- cd ${CURDIR} > >- # Setup the /usr/lib/modules/extensions/libglx.so symlink >- if [ -e /usr/lib/modules/extensions/libglx.so ] >- then >- rm -f /usr/lib/modules/extensions/libglx.so >- fi >- if [ -e /usr/lib/opengl/${GL_IMPLEM}/extensions/libglx.so ] >- then >- ln -sf /usr/lib/opengl/${GL_IMPLEM}/extensions/libglx.so \ >- /usr/lib/modules/extensions/libglx.so >- fi >+ done &> /dev/null > >- #setup the /usr/lib/modules/extensions/libglx.a symlink >- if [ -e /usr/lib/modules/extensions/libglx.a ] >- then >- rm -f /usr/lib/modules/extensions/libglx.a >- fi >- if [ -e /usr/lib/opengl/${GL_IMPLEM}/extensions/libglx.a ] >- then >- ln -sf /usr/lib/opengl/${GL_IMPLEM}/extensions/libglx.a \ >- /usr/lib/modules/extensions/libglx.a >- fi >- >- #setup the includes >- for x in gl.h glx.h glxtokens.h glext.h >- do >- if [ -e /usr/X11R6/include/GL/${x} ] >- then >- rm -f /usr/X11R6/include/GL/${x} >- fi >+ echo "LDPATH=\"${ldpath}\"" > /etc/env.d/03opengl > >- # 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 >- >- if [ -e /usr/lib/opengl/${GL_IMPLEM}/include/${x} ] >- then >- ln -sf /usr/lib/opengl/${GL_IMPLEM}/include/${x} \ >- /usr/X11R6/include/GL/${x} >- else >- ln -sf /usr/lib/opengl/global/include/${x} \ >- /usr/X11R6/include/GL/${x} >- fi >- done >+ env-update > > eend 0 > > # vim:ts=4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 78475
:
48814
|
49128
|
49181
| 49182