diff options
author | Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> | 2013-05-23 00:29:27 +0000 |
---|---|---|
committer | Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> | 2013-05-23 00:29:27 +0000 |
commit | c55695d063715413aefaa0d0968a1413bcac222d (patch) | |
tree | b1ffdcad945ed933eef47bbe324999b80bbebab3 /media-libs/mesa | |
parent | disable v4l2 outdev with USE=-v4l (diff) | |
download | historical-c55695d063715413aefaa0d0968a1413bcac222d.tar.gz historical-c55695d063715413aefaa0d0968a1413bcac222d.tar.bz2 historical-c55695d063715413aefaa0d0968a1413bcac222d.zip |
Version bump.
Package-Manager: portage-2.1.11.62/cvs/Linux x86_64
Diffstat (limited to 'media-libs/mesa')
-rw-r--r-- | media-libs/mesa/ChangeLog | 8 | ||||
-rw-r--r-- | media-libs/mesa/Manifest | 4 | ||||
-rw-r--r-- | media-libs/mesa/mesa-9.1.3.ebuild | 418 |
3 files changed, 428 insertions, 2 deletions
diff --git a/media-libs/mesa/ChangeLog b/media-libs/mesa/ChangeLog index 5f307d9be94d..63c672f9123f 100644 --- a/media-libs/mesa/ChangeLog +++ b/media-libs/mesa/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for media-libs/mesa # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.473 2013/05/15 18:05:08 chithanh Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.474 2013/05/23 00:29:18 chithanh Exp $ + +*mesa-9.1.3 (23 May 2013) + + 23 May 2013; Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> + +mesa-9.1.3.ebuild: + Version bump. *mesa-9.2_pre20130515 (15 May 2013) diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest index 63ee38133d9a..a1164d626857 100644 --- a/media-libs/mesa/Manifest +++ b/media-libs/mesa/Manifest @@ -14,6 +14,7 @@ DIST MesaLib-9.0.2.tar.bz2 6132857 SHA256 75bf31f26c6e7b5515e610c1005fd1be1f7eeb DIST MesaLib-9.0.3.tar.bz2 6137208 SHA256 ea940005b2c379f83527b5ba6d7fb69c533c2c17b561dc3b8469237ac75606a5 SHA512 2685706670356ca82c36a9fc30bfdabe9429e37ba670ece4a44634222430f828dfd5f15b116d78e3a9a6c432cf6ee3cf3a44bd132f896b81cc0bf1e1076dfdc5 WHIRLPOOL e0e4d867de8bd8c97f25e10cd6aed6c5490224e25cc6413b0de0c7bfa4112e5f63d2aa135a3d3ea028257d1ad0340e1a69f38c270eb148ce68c8fb7cd4317f58 DIST MesaLib-9.1.1.tar.bz2 6122510 SHA256 3ae5741918a26ce6457b4427663b9e0ed31a3cae1b10b9009e55769a52e9adeb SHA512 3a0cd1cc71d44b78f6a99536acd1eaa50d56a5ce26d0a247bde8f3e52e02c61097c23d26ee358dc91a4876cbaa14d0bb32c23f04837eb09808fd5fab842d154e WHIRLPOOL 22bbbeac8fe6a7f6c08401ffaee166380b4c0436910bce167eb6ec171800ce5b268f04c0ec72013c001b8b56fae562e57796f92e19d86f06da528f1b83f28392 DIST MesaLib-9.1.2.tar.bz2 6122642 SHA256 0695115f7a900624db9ade4f5bd32f4b885d9273eed020fb12b7e29a953143db SHA512 80a09c76b43ad039d8d577f0d9e2b33038847aa8815a1a5251badec626dfe2e7b4c0dfa445f8ce388d4af052147da388ebac0c3265f48e42e3fda4147bfaa578 WHIRLPOOL ea5fe473813111ae08d64bbe9183a11454449ccf419cc689f644afc127ce7b1fd8cb5344682afae13f7db0a2d1d3b90ae418802805d4cee2f6d46d1d26953d1d +DIST MesaLib-9.1.3.tar.bz2 6123010 SHA256 8d5dac2202d0355bff5cfd183582ec8167d1d1227b7bb7a669acecbeaa52d766 SHA512 c319f5ff8143c9ed7ee7a643c9ff5950e7f847d5a542b267c9510686c1a978f9b0b1a00f496d9d980ab3ba591aca16c67e40f6eeedf20826f406eecd77dcc81d WHIRLPOOL 6b91d4810104683bb64443cb380bd98828e54f16cd9a1ae6c8cd13fbafe143556eb559c3bb7af914b78f82e4bec4d492ef6e49136d4b5369edbc4b9efcfbb733 DIST MesaLib-9.1.tar.bz2 6125400 SHA256 af484cbfe7fe26e62fb1ddb1204d608c4270e74364c44e7207508cd736a0707b SHA512 9475361e3e3ce0e8ad632003b6e41944d3750de3d5a1a774a2e9cb1f04fd0df8f27e6f47e31f08808c3f4506f683cbda53570617f1db1dd0657b07e4bac36a19 WHIRLPOOL 09488fc64f72818cf4baa3acb9c859a230e400749273f287b03645bfbc4679969037ad5eae1504de595becfd35d533fbdd6a9b37cd9aca41d62c2b9bf28991e1 DIST mesa-7.10.1-gentoo-patches-01.tar.bz2 5488 SHA256 31cd4f6d1a0a70249c40452919074856d120cd473a01a8457e3dc147a1b622d8 SHA512 c62b45b32e396e67f629003fc5242b7b4df054b8e20b5237489212bc4f0171534915a02fc9efa68965068121d10660b5cd92a419efabe33fd4596a97a39249c2 WHIRLPOOL 5f171959e3a31f5c38438b4806ce371bb8fdf1c7a87501865e4ed5d5ab284cda9568b7773005997d7a1cff151f95e64c027b36c0be48a4dd288a7ab8b5f69b97 DIST mesa-7.11.2-gentoo-patches-01.tar.bz2 4021 SHA256 e1e29d335f7e0c69824041a92b1815cd4e2defa4689285c86ea59d47a7ef407b SHA512 0dcd60bd40efa25c9895150b6c0230e6582ff42ba0bafae49290e170948ee99ff25be321e7d3d503b3f465eeedcd145fc46b312a54d9bc4d3577fd5e61c3439b WHIRLPOOL 8a4a5c250430ebc08d7081158c6cc41ea7b5718662ef0327e5829c2f26069be0bed7a0df12c82434c58d364926404c929ca9881847554b74906db195b12d6576 @@ -31,7 +32,8 @@ EBUILD mesa-9.0.3.ebuild 11090 SHA256 9f37e3e2daee8874d05adde22958ab2ea300ea6d4c EBUILD mesa-9.1.1.ebuild 10990 SHA256 95e5c318bde526b82c419737bc73d451be47357a1607ce6faccc85a1c729256a SHA512 0bf60745a83c931eb5b208460f4460f58b0081a32a463b1940c54a061be9917aafc6e6c88d8f1c1413a8802939912e5a74c8557cc163b4b918b7a430a06bce92 WHIRLPOOL 0dc3faeca905e87d25b426d3c5530cfe75865151699a53eb5e30f52c504bdd5554f33c27eee35e96fcf16212f069820bed1cc2f3fd06e226ab234af1b3d876fe EBUILD mesa-9.1.2-r1.ebuild 11003 SHA256 59395fee2e217f55a5fa72ad52e0854ddf02e6484191fd2de387a2396fb648bb SHA512 54a148d0d07d771f00804da6c5793195723d1d041d574a5ac95e7ad3fb35ed3a692ffe67e9c27eadd97f795def85fcc7464f02bf0baef97bc2f6790c4eaaa2e7 WHIRLPOOL 4e2c72b08d7c3e66a88ed703ae8701a61c3ab479acc81a69898bce5823783c3d71efc66babc98e79a89d19282fd9bd051a6c56fcf191cc6e21d3e560879626e7 EBUILD mesa-9.1.2.ebuild 11000 SHA256 a6ffe032d225f5e0c4c437dbf3dde3fdfdbc73ba183ba69e88e75fb9a470e07a SHA512 f6104ec1c8a897f1b09bece843a13533c2dcd9971100e104d619bd39f23d89d2a1fcf5fc7bbb569c68557d0d98aafd9fd59dfab1dae48cfb3a68a16b0784f74e WHIRLPOOL 100625331ff49721407ced8b0e69dbfc282850319a0e7fffbc1833ccfc2a776348872bee2c597ff83c474b5051e3d51a0718473e108293963f0cf6a990f7a2ac +EBUILD mesa-9.1.3.ebuild 11000 SHA256 1943ddf47e9e32ff342476b3e15b6d5f603e3865eee75c6362fd26a02cde1def SHA512 6ca24791b52200dcdb92e38b4d5ef616cb32ad12973f64a43ef6f5d3a704d264859cb97c2067fc3242df130fb87514c7dca339dc8300284e66bca9ac44f38210 WHIRLPOOL eda45b5d28e99612fdd9e1b2df240eede16d42c5912bd95baf1f949284135828edd1922f839a24278c026a2d21913755f6fd513ebf6934ac8eb2129fd7807535 EBUILD mesa-9.1.ebuild 10988 SHA256 97e819e9c0b614157c773b9d0209ff66b1a3af4a28a7437f4eb5b1feb44e981f SHA512 71c1654787e4b6cdc925eea13901687c8ca7333766c629e236ba3deb46eb0ff063dc8621a0d3fe164f5d3b80381efaa2ff8ccf40268b4ca346da115d903a1516 WHIRLPOOL b6e8fe21ed317b23e24b2c9e2693820906e74c3593f1b1d0f9f65cb3154a2d6dac96555616be629be8ad3a059ea955198703fa91c1dfb676187bae173351f8a9 EBUILD mesa-9.2_pre20130515.ebuild 11022 SHA256 8a6c728eb4814762511c095133693c67e6cdb4d8a660df1ff3c6eef117baf412 SHA512 c48bdeedf222ce0478456272747711fcb8093f0163638018e7d211413d6e2d16c152dc5234cb3ff778ba6426f9596c53722a175ae754f152121a77bdb0a7ea89 WHIRLPOOL 97853466baa061a6a291aca8ec09bed14dd9c29c5c70f2341f5af1dd3d1605cbd861ea1eca86028429bbe1122318dc2936cd4dc406fdabbb7d8739b9df8903e5 -MISC ChangeLog 77183 SHA256 5a3909d7ee93e1154b581bf88ef7a2c905cc6d03821239f7aeaf843bd7646335 SHA512 ebd43a34b7f6c93d91f73d6fd57fb236a29e9b705d866385cdb41a377caf204fa987d85b93f8a3ca40f1e36532101dc75996557eb6f32060de2c622f319c4ebf WHIRLPOOL d394fc60e28ead0067d6dfbb89830cd96eb17e97e0b751bb4a2d5904f6cd3746162c736f54f07e076f3c4c39147b1b2af0c411902a2caeafb99d798fa01050d0 +MISC ChangeLog 77318 SHA256 60f73e4ef239e6278db138994e6d76f87b39f09c14663860b2e1cdb094c0ef73 SHA512 7b3459b501d7302f6fb4e0d6767eb3668966e8d9a1b3dea596f2c6b4af6748375f546b6fe6ac33317c2f56bbced224f22fff9f99f594b4a0d37c528649aa7e6d WHIRLPOOL 11cfc6c9fa26efcf67e9f1325c30485bdc4209fa0c2f92e6cb0997b8ab61a66a4feaf74a8542933fa6f636d541110cc146900925871395b2702b6ac08aea51a1 MISC metadata.xml 1986 SHA256 7a518f3eb77d4b51d4dc5c5cd347bebdc2c849e43d17d1057afeae6be2dc13ad SHA512 1dccfd236b8b8e39560d5056281e774979cd8e2299623b34c2e0f0d9e1ae84906932cfbc0ab15bdd1effc1d82cb484ca4d23acf7cd8d849a33a82f9ee2c60b90 WHIRLPOOL 14e19a3782775f7ca600526f1bf852ed55e328585b7e095a8ab239697ca351f812bf914205166faf714420d179ac7e36b6d1b10fe74188a028c580d40640e31c diff --git a/media-libs/mesa/mesa-9.1.3.ebuild b/media-libs/mesa/mesa-9.1.3.ebuild new file mode 100644 index 000000000000..aa96bf977597 --- /dev/null +++ b/media-libs/mesa/mesa-9.1.3.ebuild @@ -0,0 +1,418 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/mesa-9.1.3.ebuild,v 1.1 2013/05/23 00:29:18 chithanh Exp $ + +EAPI=5 + +EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa" + +if [[ ${PV} = 9999* ]]; then + GIT_ECLASS="git-2" + EXPERIMENTAL="true" +fi + +PYTHON_COMPAT=( python{2_6,2_7} ) + +inherit base autotools multilib flag-o-matic python-single-r1 toolchain-funcs ${GIT_ECLASS} + +OPENGL_DIR="xorg-x11" + +MY_PN="${PN/m/M}" +MY_P="${MY_PN}-${PV/_rc/-rc}" +MY_SRC_P="${MY_PN}Lib-${PV/_rc/-rc}" + +FOLDER="${PV/_rc*/}" + +DESCRIPTION="OpenGL-like graphic library for Linux" +HOMEPAGE="http://mesa3d.sourceforge.net/" + +SRC_PATCHES="mirror://gentoo/${PN}-9.1-gentoo-patches-05.tar.bz2" +if [[ $PV = 9999* ]]; then + SRC_URI="${SRC_PATCHES}" +else + SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_SRC_P}.tar.bz2 + ${SRC_PATCHES}" +fi + +# The code is MIT/X11. +# GLES[2]/gl[2]{,ext,platform}.h are SGI-B-2.0 +LICENSE="MIT SGI-B-2.0" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" + +INTEL_CARDS="i915 i965 intel" +RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" +VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} nouveau vmware" +for card in ${VIDEO_CARDS}; do + IUSE_VIDEO_CARDS+=" video_cards_${card}" +done + +IUSE="${IUSE_VIDEO_CARDS} + bindist +classic debug +egl +gallium gbm gles1 gles2 +llvm +nptl + openvg osmesa pax_kernel pic r600-llvm-compiler selinux +shared-glapi vdpau + wayland xvmc xa xorg kernel_FreeBSD" + +REQUIRED_USE=" + llvm? ( gallium ) + openvg? ( egl gallium ) + gbm? ( shared-glapi ) + gles1? ( egl ) + gles2? ( egl ) + r600-llvm-compiler? ( gallium llvm || ( video_cards_r600 video_cards_radeon ) ) + xa? ( gallium ) + xorg? ( gallium ) + video_cards_intel? ( || ( classic gallium ) ) + video_cards_i915? ( || ( classic gallium ) ) + video_cards_i965? ( classic ) + video_cards_nouveau? ( || ( classic gallium ) ) + video_cards_radeon? ( || ( classic gallium ) ) + video_cards_r100? ( classic ) + video_cards_r200? ( classic ) + video_cards_r300? ( gallium ) + video_cards_r600? ( gallium ) + video_cards_radeonsi? ( gallium llvm ) + video_cards_vmware? ( gallium ) +" + +LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.42" +# keep correct libdrm and dri2proto dep +# keep blocks in rdepend for binpkg +RDEPEND=" + !<x11-base/xorg-server-1.7 + !<=x11-proto/xf86driproto-2.0.3 + classic? ( app-admin/eselect-mesa ) + gallium? ( app-admin/eselect-mesa ) + >=app-admin/eselect-opengl-1.2.7 + dev-libs/expat + gbm? ( virtual/udev ) + >=x11-libs/libX11-1.3.99.901 + x11-libs/libXdamage + x11-libs/libXext + x11-libs/libXxf86vm + >=x11-libs/libxcb-1.8.1 + vdpau? ( >=x11-libs/libvdpau-0.4.1 ) + wayland? ( >=dev-libs/wayland-1.0.3 ) + xorg? ( + x11-base/xorg-server:=[-minimal] + x11-libs/libdrm[libkms] + ) + xvmc? ( >=x11-libs/libXvMC-1.0.6 ) + ${LIBDRM_DEPSTRING}[video_cards_nouveau?,video_cards_vmware?] +" +for card in ${INTEL_CARDS}; do + RDEPEND="${RDEPEND} + video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) + " +done + +for card in ${RADEON_CARDS}; do + RDEPEND="${RDEPEND} + video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) + " +done + +DEPEND="${RDEPEND} + llvm? ( + >=sys-devel/llvm-2.9 + r600-llvm-compiler? ( sys-devel/llvm[video_cards_radeon] ) + video_cards_radeonsi? ( sys-devel/llvm[video_cards_radeon] ) + ) + ${PYTHON_DEPS} + dev-libs/libxml2[python,${PYTHON_USEDEP}] + sys-devel/bison + sys-devel/flex + virtual/pkgconfig + >=x11-proto/dri2proto-2.6 + >=x11-proto/glproto-1.4.15-r1 + >=x11-proto/xextproto-7.0.99.1 + x11-proto/xf86driproto + x11-proto/xf86vidmodeproto +" + +S="${WORKDIR}/${MY_P}" + +# 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*" + +# Think about: ggi, fbcon, no-X configs + +pkg_setup() { + # workaround toc-issue wrt #386545 + use ppc64 && append-flags -mminimal-toc + + python-single-r1_pkg_setup +} + +src_unpack() { + default + [[ $PV = 9999* ]] && git-2_src_unpack +} + +src_prepare() { + # apply patches + if [[ ${PV} != 9999* && -n ${SRC_PATCHES} ]]; then + EPATCH_FORCE="yes" \ + EPATCH_SOURCE="${WORKDIR}/patches" \ + EPATCH_SUFFIX="patch" \ + epatch + fi + + # relax the requirement that r300 must have llvm, bug 380303 + epatch "${FILESDIR}"/${PN}-8.1-dont-require-llvm-for-r300.patch + + # fix for hardened pax_kernel, bug 240956 + [[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch + + # Solaris needs some recent POSIX stuff in our case + if [[ ${CHOST} == *-solaris* ]] ; then + sed -i -e "s/-DSVR4/-D_POSIX_C_SOURCE=200112L/" configure.ac || die + fi + + # Tests fail against python-3, bug #407887 + sed -i 's|/usr/bin/env python|/usr/bin/env python2|' src/glsl/tests/compare_ir || die + + base_src_prepare + + eautoreconf +} + +src_configure() { + local myconf + + if use classic; then + # Configurable DRI drivers + driver_enable swrast + + # Intel code + driver_enable video_cards_i915 i915 + driver_enable video_cards_i965 i965 + if ! use video_cards_i915 && \ + ! use video_cards_i965; then + driver_enable video_cards_intel i915 i965 + fi + + # Nouveau code + driver_enable video_cards_nouveau nouveau + + # ATI code + driver_enable video_cards_r100 radeon + driver_enable video_cards_r200 r200 + if ! use video_cards_r100 && \ + ! use video_cards_r200; then + driver_enable video_cards_radeon radeon r200 + fi + fi + + if use egl; then + myconf+=" + --with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm") + $(use_enable gallium gallium-egl) + " + fi + + if use gallium; then + myconf+=" + $(use_enable llvm gallium-llvm) + $(use_enable openvg) + $(use_enable r600-llvm-compiler) + $(use_enable vdpau) + $(use_enable xvmc) + " + gallium_enable swrast + gallium_enable video_cards_vmware svga + gallium_enable video_cards_nouveau nouveau + gallium_enable video_cards_i915 i915 + if ! use video_cards_i915; then + gallium_enable video_cards_intel i915 + fi + + gallium_enable video_cards_r300 r300 + gallium_enable video_cards_r600 r600 + gallium_enable video_cards_radeonsi radeonsi + if ! use video_cards_r300 && \ + ! use video_cards_r600; then + gallium_enable video_cards_radeon r300 r600 + fi + fi + + # x86 hardened pax_kernel needs glx-rts, bug 240956 + if use pax_kernel; then + myconf+=" + $(use_enable x86 glx-rts) + " + fi + + # build fails with BSD indent, bug #428112 + use userland_GNU || export INDENT=cat + + econf \ + --enable-dri \ + --enable-glx \ + $(use_enable !bindist texture-float) \ + $(use_enable debug) \ + $(use_enable egl) \ + $(use_enable gbm) \ + $(use_enable gles1) \ + $(use_enable gles2) \ + $(use_enable nptl glx-tls) \ + $(use_enable osmesa) \ + $(use_enable !pic asm) \ + $(use_enable shared-glapi) \ + $(use_enable xa) \ + $(use_enable xorg) \ + --with-dri-drivers=${DRI_DRIVERS} \ + --with-gallium-drivers=${GALLIUM_DRIVERS} \ + PYTHON2="${PYTHON}" \ + ${myconf} +} + +src_install() { + base_src_install + + find "${ED}" -name '*.la' -exec rm -f {} + || die + + if use !bindist; then + dodoc docs/patents.txt + fi + + # Install config file for eselect mesa + insinto /usr/share/mesa + newins "${FILESDIR}/eselect-mesa.conf.8.1" eselect-mesa.conf + + # 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 ) + keepdir /usr/$(get_libdir)/dri + dodir /usr/$(get_libdir)/mesa + for x in ${gallium_drivers[@]}; do + if [ -f "${S}/$(get_libdir)/gallium/${x}" ]; then + mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ + || die "Failed to move ${x}" + insinto "/usr/$(get_libdir)/dri/" + if [ -f "${S}/$(get_libdir)/${x}" ]; then + insopts -m0755 + doins "${S}/$(get_libdir)/${x}" + fi + fi + done + for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do + if [ -f ${x} -o -L ${x} ]; then + mv -f "${x}" "${x/dri/mesa}" \ + || die "Failed to move ${x}" + fi + done + pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" + ln -s ../mesa/*.so . || die "Creating symlink failed" + # remove symlinks to drivers known to eselect + for x in ${gallium_drivers[@]}; do + if [ -f ${x} -o -L ${x} ]; then + rm "${x}" || die "Failed to remove ${x}" + fi + done + popd + eend $? + fi +} + +pkg_postinst() { + # Switch to the xorg implementation. + 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 + fi + + # warn about patent encumbered texture-float + if use !bindist; then + elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" + elog "enabled. Please see patents.txt for an explanation." + fi + + local using_radeon r_flag + for r_flag in ${RADEON_CARDS}; do + if use video_cards_${r_flag}; then + using_radeon=1 + break + fi + done + + if [[ ${using_radeon} = 1 ]] && ! has_version media-libs/libtxc_dxtn; then + elog "Note that in order to have full S3TC support, it is necessary to install" + 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 +} + +# $1 - VIDEO_CARDS flag +# other args - names of DRI drivers to enable +# TODO: avoid code duplication for a more elegant implementation +driver_enable() { + case $# in + # for enabling unconditionally + 1) + DRI_DRIVERS+=",$1" + ;; + *) + if use $1; then + shift + for i in $@; do + DRI_DRIVERS+=",${i}" + done + fi + ;; + esac +} + +gallium_enable() { + case $# in + # for enabling unconditionally + 1) + GALLIUM_DRIVERS+=",$1" + ;; + *) + if use $1; then + shift + for i in $@; do + GALLIUM_DRIVERS+=",${i}" + done + fi + ;; + esac +} |