aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2011-02-23 13:25:48 +0000
committerMichał Górny <mgorny@gentoo.org>2011-02-23 13:25:48 +0000
commit3bcc00a8bfa67d4c1b9ddce75ae082f2df007513 (patch)
treee3bebd6338311ff4ed231b0259cccc0c71690965
parentUpdate mesa.eselect for multilib (diff)
downloadeselect-3bcc00a8bfa67d4c1b9ddce75ae082f2df007513.tar.gz
eselect-3bcc00a8bfa67d4c1b9ddce75ae082f2df007513.tar.bz2
eselect-3bcc00a8bfa67d4c1b9ddce75ae082f2df007513.zip
Check whether the select OpenGL implem provides any libGL.so.
svn path=/trunk/extern/; revision=806
-rw-r--r--modules/opengl.eselect15
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/opengl.eselect b/modules/opengl.eselect
index b9697ad..3d52504 100644
--- a/modules/opengl.eselect
+++ b/modules/opengl.eselect
@@ -173,6 +173,21 @@ set_new_implementation() {
die -q "Invalid opengl implementation selected."
fi
+ local found_libgl
+ for libdir in $(list_libdirs); do
+ [[ ${ROOT} != / ]] && libdir=${libdir#${EROOT}}
+ [[ -d ${PREFIX}/${libdir}/opengl && ! -h ${PREFIX}/${libdir} ]] || continue
+ [[ -f "${PREFIX}/${libdir}/opengl/${gl_implem}/lib/libGL.so" ]] && found_libgl=yes
+ done
+
+ if [[ -z ${found_libgl} ]]; then
+ write_error_msg "The ${gl_implem} OpenGL implementation doesn't seem to provide"
+ write_error_msg "libGL.so file. This might be an effect of breakage introduced"
+ write_error_msg "by a prioprietary driver installer. Please re-merge the package"
+ write_error_msg "providing your OpenGL implementation."
+ die -q "Selected OpenGL implementation incomplete."
+ fi
+
echo -n "Switching to ${gl_implem} OpenGL interface..."
if [[ -f ${ENV_FILE} ]] ; then
rm -f "${ENV_FILE}" || die -q "Failed to remove ${ENV_FILE}"