Skip to content

Commit

Permalink
media-libs/mesa: Update to support the new eselect-opengl framework
Browse files Browse the repository at this point in the history
Signed-off-by: David Heidelberg <david@ixit.cz>
  • Loading branch information
mgorny authored and okias committed Dec 20, 2014
1 parent 2dd9118 commit d213639
Showing 1 changed file with 4 additions and 37 deletions.
41 changes: 4 additions & 37 deletions media-libs/mesa/mesa-9999.ebuild
Expand Up @@ -92,7 +92,7 @@ RDEPEND="
abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
classic? ( app-admin/eselect-mesa )
gallium? ( app-admin/eselect-mesa )
>=app-admin/eselect-opengl-1.2.7
>=app-admin/eselect-opengl-1.3.0
>=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
gbm? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] )
dri3? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] )
Expand Down Expand Up @@ -162,7 +162,7 @@ DEPEND="${RDEPEND}
>=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
>=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
)
>=x11-proto/glproto-1.4.16-r1:=[${MULTILIB_USEDEP}]
>=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
>=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
>=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
>=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
Expand All @@ -173,8 +173,8 @@ EGIT_CHECKOUT_DIR=${S}

# It is slow without texrels, if someone wants slow
# mesa without texrels +pic use is worth the shot
QA_EXECSTACK="usr/lib*/opengl/xorg-x11/lib/libGL.so*"
QA_WX_LOAD="usr/lib*/opengl/xorg-x11/lib/libGL.so*"
QA_EXECSTACK="usr/lib*/libGL.so*"
QA_WX_LOAD="usr/lib*/libGL.so*"

# Think about: ggi, fbcon, no-X configs

Expand Down Expand Up @@ -328,32 +328,6 @@ multilib_src_configure() {
multilib_src_install() {
emake install DESTDIR="${D}"

# Move libGL and others from /usr/lib to /usr/lib/opengl/blah/lib
# because user can eselect desired GL provider.
ebegin "Moving libGL and friends for dynamic switching"
local x
local gl_dir="/usr/$(get_libdir)/opengl/${OPENGL_DIR}/"
dodir ${gl_dir}/{lib,extensions,include/GL}
for x in "${ED}"/usr/$(get_libdir)/lib{EGL,GL*,OpenVG}.{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
for x in "${ED}"/usr/include/GL/{gl.h,glx.h,glext.h,glxext.h}; do
if [ -f ${x} -o -L ${x} ]; then
mv -f "${x}" "${ED}${gl_dir}"/include/GL \
|| die "Failed to move ${x}"
fi
done
for x in "${ED}"/usr/include/{EGL,GLES*,VG,KHR}; do
if [ -d ${x} ]; then
mv -f "${x}" "${ED}${gl_dir}"/include \
|| 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 )
Expand Down Expand Up @@ -436,13 +410,6 @@ pkg_postinst() {
echo
eselect opengl set --use-old ${OPENGL_DIR}

# switch to xorg-x11 and back if necessary, bug #374647 comment 11
OLD_IMPLEM="$(eselect opengl show)"
if [[ ${OPENGL_DIR}x != ${OLD_IMPLEM}x ]]; then
eselect opengl set ${OPENGL_DIR}
eselect opengl set ${OLD_IMPLEM}
fi

# Select classic/gallium drivers
if use classic || use gallium; then
eselect mesa set --auto
Expand Down

0 comments on commit d213639

Please sign in to comment.