--- /usr/portage/media-libs/mesa/mesa-11.1.1.ebuild 2016-01-23 14:13:28.027484677 +0000 +++ /usr/portage/media-libs/mesa/mesa-11.1.1.ebuild 2016-01-23 20:44:39.121734181 +0000 @@ -84,7 +84,7 @@ abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] ) classic? ( app-eselect/eselect-mesa ) gallium? ( app-eselect/eselect-mesa ) - >=app-eselect/eselect-opengl-1.3.0 + >=app-eselect/eselect-opengl-1.3.1-r5 udev? ( kernel_linux? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) ) >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] @@ -303,6 +303,18 @@ multilib_src_install() { emake install DESTDIR="${D}" + # Move lib{EGL*,GL*,OpenVG,OpenGL}.{la,a,so*} files from /usr/lib to /usr/lib/opengl/xorg-x11/lib + ebegin "Moving lib{EGL*,GL*,OpenVG,OpenGL}.{la,a,so*} in order to implement dynamic GL switching support" + local gl_dir="/usr/$(get_libdir)/opengl/${OPENGL_DIR}" + dodir ${gl_dir}/lib + for x in "${ED}"/usr/$(get_libdir)/lib{EGL*,GL*,OpenVG,OpenGL}.{la,a,so*} ; do + if [ -f ${x} -o -L ${x} ]; then + mv -f "${x}" "${ED}${gl_dir}"/lib \ + || die "Failed to move ${x}" + fi + done + eend $? + if use classic || use gallium; then ebegin "Moving DRI/Gallium drivers for dynamic switching" local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) @@ -415,6 +427,11 @@ elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice" elog "textures in some apps, and some others even require this to run." fi + + ewarn "This is an experimental version of ${CATEGORY}/${PN} designed to fix various issues" + ewarn "when switching GL providers." + ewarn "This package can only be used in conjuction with a specially patched version" + ewarn "of app-select/eselect-opengl ." } pkg_prerm() {