diff options
-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.6.ebuild | 419 |
3 files changed, 429 insertions, 2 deletions
diff --git a/media-libs/mesa/ChangeLog b/media-libs/mesa/ChangeLog index 2ed0e1932a17..8d8c96051b7c 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.491 2013/07/29 15:22:27 chithanh Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.492 2013/08/02 12:52:38 chithanh Exp $ + +*mesa-9.1.6 (02 Aug 2013) + + 02 Aug 2013; Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> + +mesa-9.1.6.ebuild: + Version bump. *mesa-9.1.5 (29 Jul 2013) diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest index 72c0f753be44..ef8c2323addf 100644 --- a/media-libs/mesa/Manifest +++ b/media-libs/mesa/Manifest @@ -18,6 +18,7 @@ DIST MesaLib-9.1.2.tar.bz2 6122642 SHA256 0695115f7a900624db9ade4f5bd32f4b885d92 DIST MesaLib-9.1.3.tar.bz2 6123010 SHA256 8d5dac2202d0355bff5cfd183582ec8167d1d1227b7bb7a669acecbeaa52d766 SHA512 c319f5ff8143c9ed7ee7a643c9ff5950e7f847d5a542b267c9510686c1a978f9b0b1a00f496d9d980ab3ba591aca16c67e40f6eeedf20826f406eecd77dcc81d WHIRLPOOL 6b91d4810104683bb64443cb380bd98828e54f16cd9a1ae6c8cd13fbafe143556eb559c3bb7af914b78f82e4bec4d492ef6e49136d4b5369edbc4b9efcfbb733 DIST MesaLib-9.1.4.tar.bz2 6124177 SHA256 6e858786e9e68e79aa245037d351a664f3a5c05ccdbdc2519307bc06f8ee68da SHA512 b9da2b2b3a5544b5e181f3bcdcb73b78fe692fbe9dd0a8e04e3bd6741205e54c43dd4c76f495496edc6c5f0b72e05449cda491607c18689ad2dd0adf0cec31b4 WHIRLPOOL 495dad4f931cea2a1af08cab8fa1a77a97e113922d67fb242b13ef6377b4219943d5f897a3d8b8a3e7e365f9642769335e7a4d1d45ce1d585f109567f5579f2b DIST MesaLib-9.1.5.tar.bz2 6127632 SHA256 89ea0d1afd90a87dab253777bfe414820c4aa3890add1487ca2b49f6b3e194fd SHA512 e6ab81aebfd20e41b6b1e3d98c9228ef57e4660e6e9d3473b2aa7e03bc63effca135206fcdc32fc2b03652deb98b458ce15d12b0b29d9d8d05a225ed4dc31943 WHIRLPOOL d8a09b6f8191bfbed84c405e28e5d4449174e63226c268306a8f64ac40259d69958a43171a025c2f3c45bacafae9ccd25f334523f54711da22cbda0544d21457 +DIST MesaLib-9.1.6.tar.bz2 6134267 SHA256 e632dff0acafad0a59dc208d16dedb37f7bd58f94c5d58c4b51912e41d005e3d SHA512 b23d0cc3515b56636f73c4d3247212f8c731c967f5ecf8c247a3bd359038ed374c23eb1bb0da17a9152f8b8d984acd134fa9823d9349285287e58676419b4d40 WHIRLPOOL 4e3c07c893060f77cade242d904c1ec4c1c2982b6b3d9ff188b3d809ad8592408c34bd71276f0e8dfa38bce58a82e146b25064cfa50d3ce6d52a7b69a694690a 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 @@ -40,9 +41,10 @@ EBUILD mesa-9.1.2.ebuild 11000 SHA256 a6ffe032d225f5e0c4c437dbf3dde3fdfdbc73ba18 EBUILD mesa-9.1.3.ebuild 11018 SHA256 2f0d8172e8862399edbadd91bf79c6459f838c2c15074e3d16c823f911edfdf9 SHA512 d4b41e67b0b9b899b030eaee8dd17e573d600e567aaf77221e35282321d9817ee292a5fbe014ea4363dbb5f6390a7ed0534ed1933904b45ade64fa7619db7757 WHIRLPOOL 1d625b06f97acd8245af12d7965536d4aef2c061942719155f4c0086b17051b43c04430af40f65c79701ea9633b8e9b967d213cc0329abcb0bff3af978fdf520 EBUILD mesa-9.1.4.ebuild 11019 SHA256 1d07e090abc2bb3683eb096e91e4abddbc10fea1733c80d4b977e0d9e07b9169 SHA512 62b3deeadfb7dc743393844830b47c9583077272ab951c78979ee8e2ac9c7b5a2b9a6ebb3925efc13cdcaf43514d04599d1803d4ee0c7cf6cba0679ef6c737e2 WHIRLPOOL 4bab90db38d96ab551c2a0f4a950e5859406cd20bf959cae861bd5da16823c8ea4ea4588ee680093ffe931e6e3f5b4e49ed025b23374a41dead78353fd5196fd EBUILD mesa-9.1.5.ebuild 11019 SHA256 069d6164c6c6d931959d27fcc8ae5ca812ce896c601bd4d3e628351f82c9e4c8 SHA512 ca7fc41856b60a9fed901a09a4f5a6ae8c63052973f94c0c7e319977cdb29804d0c83e7fd1dd166fc29873d447c735e32a09f78491059b98a3aed31eb3224b61 WHIRLPOOL 0c77085685ae88d107be04a3e715b3fbfc2c48260fb0ec7e9d48b387851d5816c374c35dbb0dfbbb5990838071fd4a53f8b1f0cd11af5d46239092f71b7f030d +EBUILD mesa-9.1.6.ebuild 11019 SHA256 8b89bb4042a44531358fbb8076249e0c1a801fc0e5387b8cb9a006f6e6ef4bfa SHA512 7a57d114a6d9df0c3f3f1506f26e0c5744049879b4d2b1cec79e264b8c380cb9f207171d14537e8a10eeebe71ad607d2247781f55d8c13729eee4efcc989fca8 WHIRLPOOL c027211a96402556cfc99dda880bb9fef70c8b8f9d170a611b76a78cd66bd6c8a0752db1acf076b8bc91b2a2059cfdaa708e75fdefeb482268b53e9b11b3b9d2 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 EBUILD mesa-9.2_pre20130528.ebuild 11245 SHA256 40ec0bbef3d3aac874f786e87171715405dd58bb5ba89676fee15e9ddb3cce1f SHA512 61324c495002d3bee89896946eb311ab9a10da7cefd30df5376b8a3c64dfec2b91ab707c20647e27207fefc1aa5c9d50d810b78549c27a6513a23eb2e890fb1a WHIRLPOOL c34865dfefd3c46bd1000552832a1e6766ab6b721cf2a20099ca29d4791c5b28b9f5f7e1fcbc69e05848b78b3027358f1fba1e8d6bc2341127eec006ff3cacd0 EBUILD mesa-9.2_pre20130619.ebuild 12178 SHA256 799b2cff59f77ac93bd15ab8ee2514da08fedd95b6c049a028739556eaaed60e SHA512 180e00b36b7e794ba57812b6b78dcfa37758d44299dd2f7415e0db6e8370cebe84038794e9432dddf5aa07fad26d3799371997d5957eb20a3693f1d508e9a6c0 WHIRLPOOL 32bda7a2e4380b36f1f67ed940e7e03fcb3c74b884b4ff072d3bd8e2bf4bcb5ad65b9cc438150369ad9c876e0ca59b486251dc2d2a4524594e9d8e8489009815 -MISC ChangeLog 79469 SHA256 55a89d702f9cad4dc26a0431a216593e3356ec0fd6f1ddcd0d811e2ba9da0267 SHA512 40ccd6ae913d649ee6317b70bea4e11cabedde8b65fd8842dd594f1673e39d1f049f70c8d2b576195d14669470cace3904290c3418b9ef3b5cd0241f074cbcd1 WHIRLPOOL 77776bd8aafd5712f2a23d2e5e20e1488295ebf23bbbf21b5c220aa240f1cdd8669bce10aa096b0ca4ee1bf68d792ba0d1acabfd2cba1a9485f9dc281f8e1745 +MISC ChangeLog 79604 SHA256 1d6ccb25ec92d27c90cb65b68b2f42e2e3bae865be8733e41a228500a42d02b5 SHA512 4a42e88044c351ac4304e1e76663711f19d5497a4706acd48c65126a18e8026231f9793154177153400e83f229d7273a35142c7b2b531368b7aaa1a179e591f1 WHIRLPOOL 4e09490c59a4d21ee54388df9041c71ea6758879b1b789e2c0f6b6a4ee7a989eec9155d933696f217a4f8258af4c8781725c52a10355aff95d1365a9efc8a1b4 MISC metadata.xml 2062 SHA256 ff16fa963c95af756ccd96b5bfb746d5c812085f1749281d8a739f5367d57918 SHA512 5a592c8417c253a55f636e98a4cb0a59f7678dd48a1a4a2886fff376f6596ae70c693810cfc20096d06b8e163d2fbd21909cd37ad6cfa5c3897bf3543e27e777 WHIRLPOOL 5fcd8ff3c0471330a3a8f3f1f536f8a5e88ecda43375b6d23a8e358494c56f8cb6a36260012b9506b4126e9efb5653cee8e91aa746e4a27902a0343745b5310e diff --git a/media-libs/mesa/mesa-9.1.6.ebuild b/media-libs/mesa/mesa-9.1.6.ebuild new file mode 100644 index 000000000000..8e140175f91d --- /dev/null +++ b/media-libs/mesa/mesa-9.1.6.ebuild @@ -0,0 +1,419 @@ +# 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.6.ebuild,v 1.1 2013/08/02 12:52:38 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 ) ) + wayland? ( egl ) + 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 +} |