diff options
author | Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> | 2013-04-05 22:02:49 +0000 |
---|---|---|
committer | Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> | 2013-04-05 22:02:49 +0000 |
commit | d749d7c9c5323b7f59f6d17d4de05b969c27f038 (patch) | |
tree | 0452c7063c40afc0a74bcc1d5686b2627e696708 /media-libs/mesa | |
parent | Stable for x86, wrt bug #464414 (diff) | |
download | historical-d749d7c9c5323b7f59f6d17d4de05b969c27f038.tar.gz historical-d749d7c9c5323b7f59f6d17d4de05b969c27f038.tar.bz2 historical-d749d7c9c5323b7f59f6d17d4de05b969c27f038.zip |
Add new prerelease snapshot with radeon UVD and Gallium3D HUD support.
Package-Manager: portage-2.1.11.55/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 | 25 | ||||
-rw-r--r-- | media-libs/mesa/mesa-9.2_pre20130404.ebuild | 419 |
3 files changed, 430 insertions, 22 deletions
diff --git a/media-libs/mesa/ChangeLog b/media-libs/mesa/ChangeLog index 01742cda6c7f..e4abf0a1fdf7 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.466 2013/03/20 00:50:52 mattst88 Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.467 2013/04/05 22:02:10 chithanh Exp $ + +*mesa-9.2_pre20130404 (05 Apr 2013) + + 05 Apr 2013; Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> + +mesa-9.2_pre20130404.ebuild: + Add new prerelease snapshot with radeon UVD and Gallium3D HUD support. *mesa-9.1.1 (20 Mar 2013) diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest index 0a800e25efa5..9c586940606e 100644 --- a/media-libs/mesa/Manifest +++ b/media-libs/mesa/Manifest @@ -1,6 +1,3 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 - AUX eselect-mesa.conf.7.10 1670 SHA256 3ff15cedc353feeb2da450533c2ea2efc33ed1c8434a7b3037999c4965907149 SHA512 c62679e2427b6e922a7c04dec7afe1eddb4f8ba255735479338ebaf6da7db4ad7c6c916a3cf62da8bf8d2c0ceb60b6d591f8e878d4add9b7f63ff8121bb610a2 WHIRLPOOL 5d3522f8715ab62c9a1b4a96031db63734a98bb9e8a1cc722d20e018e7eedb3ffac92bb7c727bff1f58e216476b0e20552373b8155a51954f3d9af704e830782 AUX eselect-mesa.conf.7.11 1670 SHA256 448d08e97e931563aa2e33f22feeaf911caf9a2eb9fd7b446485311d1dcc1225 SHA512 0a8178006f64d2f2d41f0f1ffbceab959ad66ac9142e2f74b593405041ade112b68fbabd54915c21dbf6bd7e3564499e6f76c348e8af632d751409b070420481 WHIRLPOOL 5df8041475f506ed544afb4b7ce94a31b4974c6cd26fd5054a6c29dda26cbec1694d60b68e975106d0797ff857764a39ec820da000e454be34181112b201ae36 AUX eselect-mesa.conf.8.0.1 1622 SHA256 a7a4306084885dc624304a8893ca4f5645f7f1fe31322f9fb663e5a103f69221 SHA512 58eacf1304ebaa0116ea3c53fafdddb8c94738e31daad8546ac33b46dc51b81a6bccb48c167afe792c7fd41ca5054d8e66123f524b0623ad3e603ed4872f9dc4 WHIRLPOOL 7af55e3cb9448f4b3b4c463443e078a5559588371767e10b5890918d84bfeb16797f11ffabf9aaa205db70c550c5dfc18fe709b3a2e00746d93d4bf4944124b1 @@ -21,6 +18,8 @@ DIST mesa-7.10.1-gentoo-patches-01.tar.bz2 5488 SHA256 31cd4f6d1a0a70249c4045291 DIST mesa-7.11.2-gentoo-patches-01.tar.bz2 4021 SHA256 e1e29d335f7e0c69824041a92b1815cd4e2defa4689285c86ea59d47a7ef407b SHA512 0dcd60bd40efa25c9895150b6c0230e6582ff42ba0bafae49290e170948ee99ff25be321e7d3d503b3f465eeedcd145fc46b312a54d9bc4d3577fd5e61c3439b WHIRLPOOL 8a4a5c250430ebc08d7081158c6cc41ea7b5718662ef0327e5829c2f26069be0bed7a0df12c82434c58d364926404c929ca9881847554b74906db195b12d6576 DIST mesa-8.0.4-gentoo-patches-01.tar.bz2 2380 SHA256 bad7443e7163b87b3c14f8f56568551300fe190f58531fdba4fdabd36c2db842 SHA512 855834bc13decb46ab0b81e75002d873d2f40f67c9b1770b2d33e892beffffb32c229db71df72bea24d74ec515a0890a89dc9221cb22bba59c50182c654be676 WHIRLPOOL c78b4fe32d6b3246c7dffa2b7b9c216e13323ece677129618b2333d620f81777e8a23f13c956f88cd3aa0ae790d0a102d4f1c1e96c9ca5a13b3583a14cb2288b DIST mesa-9.1-gentoo-patches-01.tar.bz2 1162 SHA256 f068c3ee3a97da8107ee1f96801e92076ad87224086c97c42ebca2cb0b7407ac SHA512 cc55fa3eb4ec66eaba8f441687942520304556d5ead6cf08cdbf0d23efbc271c71ab728de803aa992a1ee5f0f9c231ebc638a09782a49b738e52b89a8468981a WHIRLPOOL 1483eccaeb918bdb68ec493ac925d21c366d26ad7a222d9fe4f7fa44724fd7183079e42f42ba8e85cb7f4fd15b3a0c091cd477954e85071b5f562f4fe0356113 +DIST mesa-9.2_pre20130404-gentoo-patches-01.tar.bz2 14890 SHA256 0e9d0c707494ae96a39e028659c4a013d11110d19ecb791a0a999222ee49885f SHA512 1eec47fc3a7b3511d64634350b51cb646fd3272e3b713c0e59a4a09dfa9cd8d56fe3a75423e6b31b69b6b0c73f86ac3a444e9a296296e2cb2608bfd3cb96a7fd WHIRLPOOL d01f6c022693aa308b7376092fd5f6f119cb182ee8fa15e8cf6b3035a6a292a9ee676b8f545f8fdfa5674625a9cfe5b86c25a3936b6c82c9c08627d424aa7b7f +DIST mesa-9.2_pre20130404.tar.xz 4655504 SHA256 59fd8b0ab0adf35949a8111d5d535969b9d741b0a9bcaab3a8b73c59a51652b2 SHA512 f82bcaf5aad872666061029ee098c553784f868ec24612acb362337d3e5174323edff975886b5ee9517d50f2df08c9ebccbafad11850bdad95115725a9beeec5 WHIRLPOOL bbc423dcbe3a4ebdd1fe381a526f3aff5bd609b2d50354ff0f8b957f4d66c12cd108f1becf7a9f1d0a3d836ce5379bae3eae3882d6877f0c29d78898bcfee379 EBUILD mesa-7.10.3.ebuild 9833 SHA256 0539d7b38201da07040eae24c996346d5e3fc2c9c2cd7271a91886bbfa8a503c SHA512 e87083af5e10b923863369f225a3791adb91c085933aea7c449f879510a3202c63b849abc89b272ded7b90428413ec5480cf14d101eba3756b8d2603d8798d27 WHIRLPOOL 722c321abbc61ba2ac5f7f727b370d760ab17c0da0baddc353aa45acfc874f762f68066010b451f7e048b7f9f50b5a59d88eeb6f0cedf9159ac4efb54143f7ef EBUILD mesa-7.11.2.ebuild 9981 SHA256 f0c47c532ad67ed7fc2abe30eecc727bba71bbe8fc302df4920ef6ddee6d5776 SHA512 6c3968a4bb3601dd9dc8ec4ab415cd3df11e6505e9327ea66d62594337f27bfba65cac00a262ad6066b5fb49ec8b10217cdb66f139123bc254a1582c78925a30 WHIRLPOOL 0ddc6b9fe995216db9b4611e5a97e3cba1dc7a08a3a59e0ce1706495643f89eb3d6b12fbc41b42db4b092ece690ba1c90464df29b09f00cd79a124faa6da5c89 EBUILD mesa-8.0.4-r1.ebuild 10843 SHA256 e2d5aa6a67796611e3e2eddd97f8be407b2aa04cf7f70c1a874084d269f37331 SHA512 291e02e7990ae4eb8fe7394e1eefda0493b9dd4f5439720ca3989a935b7448ee3ed58e95b8e187f4839b7466f4b0974796d9180498de487deb992ecde09beda9 WHIRLPOOL d4724d1a98f4ab09e6982e75e1f986d7f2b8fb1c67c7b0d269c8df3fd03f9271e9e9f9ec36b194240bdccd58d4f6a07842468e68f1600bf6f0164eebe164a140 @@ -29,22 +28,6 @@ EBUILD mesa-9.0.2.ebuild 11094 SHA256 76c6873a3e966bfa60ed97c2fab03d9d1329864ecf EBUILD mesa-9.0.3.ebuild 11065 SHA256 b2fbbde969886a0cd94624d772bf22f908c72f8ea0dcc13be37461bfd8d1d78a SHA512 a9550a4fd8edc532b483985c1e6e6f77be81d68c222e49cb93b7c61b6e39cefa019d01031cbafbf5efe66184f9290905ceaa6536441cfa54e3d17181b3816329 WHIRLPOOL 596b8a2d15a4549c916b324fd53bdc566c0bdd30e2571faffb3d9813c9b6b452f20f5f564d74dccb11390782f85e0c754a7e77d5ba2fa933417b290bb271ab05 EBUILD mesa-9.1.1.ebuild 10990 SHA256 95e5c318bde526b82c419737bc73d451be47357a1607ce6faccc85a1c729256a SHA512 0bf60745a83c931eb5b208460f4460f58b0081a32a463b1940c54a061be9917aafc6e6c88d8f1c1413a8802939912e5a74c8557cc163b4b918b7a430a06bce92 WHIRLPOOL 0dc3faeca905e87d25b426d3c5530cfe75865151699a53eb5e30f52c504bdd5554f33c27eee35e96fcf16212f069820bed1cc2f3fd06e226ab234af1b3d876fe EBUILD mesa-9.1.ebuild 10988 SHA256 97e819e9c0b614157c773b9d0209ff66b1a3af4a28a7437f4eb5b1feb44e981f SHA512 71c1654787e4b6cdc925eea13901687c8ca7333766c629e236ba3deb46eb0ff063dc8621a0d3fe164f5d3b80381efaa2ff8ccf40268b4ca346da115d903a1516 WHIRLPOOL b6e8fe21ed317b23e24b2c9e2693820906e74c3593f1b1d0f9f65cb3154a2d6dac96555616be629be8ad3a059ea955198703fa91c1dfb676187bae173351f8a9 -MISC ChangeLog 75684 SHA256 84e2550cbf50ee0bd8a361e5a8d31d82ef53d8da46e09816c8572c352d81724e SHA512 5abfd5257fcc44fc88b99a0ed6f7f182692fbfc92f43a5f598385fc323d6a681decb72e64b0cfd90357e25109a00a64a7d654b4da3b0a6d63d559cfc73c512f0 WHIRLPOOL 768be6799d98882c11927d8912cde2fa5b576cb1ace4ab1659977f3b694875296625ee9c269c13b8ce0daa99c8a3ce49fad2d511a44c69250831f127f0019360 +EBUILD mesa-9.2_pre20130404.ebuild 11003 SHA256 895e15b0a070ea1929d2336d8b6da3877d63468a47f0f57316ed4652c67c7d9d SHA512 0ba8c8232ed32080db4145f96460dd5897bdc59816eeea4d2526e16aa8aa1f56593276cf6e16e4ace9b5980ece46faf89473451153b2ee1201125d75c0c28d13 WHIRLPOOL 5f7bd3f515b2e9d8a05e981380f8f9dea1d8fc6a1692e06e70e0a4ea114a3b7f09e1408d7f6919ee3413b2d2f7ec72d2ddfb2204123cf7868c713db86ea240e8 +MISC ChangeLog 75896 SHA256 7c972eade2730b43c09f16db1862de8334aab442cad3703818ab9b150145746a SHA512 82b2429a588bafb921f121098f318dff762afafa511ae1cf71b965fcee3172fb604036d71eb0519249e873ae664ffb324f62ce3d1fce479d28443ca6ba708372 WHIRLPOOL e304243b0911a5cdb9fb117c087b8214a8475f47209ecfd5e204758981313cb9ec24b1a6f9c9af2998aeb5f8a4dd287c4f18c78d47270a179fe6b2c8ea108eae MISC metadata.xml 1986 SHA256 7a518f3eb77d4b51d4dc5c5cd347bebdc2c849e43d17d1057afeae6be2dc13ad SHA512 1dccfd236b8b8e39560d5056281e774979cd8e2299623b34c2e0f0d9e1ae84906932cfbc0ab15bdd1effc1d82cb484ca4d23acf7cd8d849a33a82f9ee2c60b90 WHIRLPOOL 14e19a3782775f7ca600526f1bf852ed55e328585b7e095a8ab239697ca351f812bf914205166faf714420d179ac7e36b6d1b10fe74188a028c580d40640e31c ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.19 (GNU/Linux) - -iQIcBAEBCAAGBQJRSQf4AAoJEA/daC2XTKcqmY8P/1bn8Ti3Z3brdLAJFD2896lh -Z5GDcYICiz4zRs9GbM1dB2l6u9/640Df4W8SToJ89f1nbq1mrjCy8MA7k7SkoE+Z -KpcODH6qYESfhU+aQrIczTsl+60x/s3qki+mC+w+vbyimGWTFY9c5p4il/qJJFIg -6ZeqafyHrDwHFivjBlDdM3spe+kbTymmuQ/QrDTLZwg1nPXT19ZzSHHZo8pRjk0U -WumYYV61GGlgHRbkslMoPLNOO9nvFsiBcXTaXG9rbGGfAINA40F4yNK2G+mowcYZ -pKOc6k6RhabbpLEbj8xwj6TVn+JGLe7VCBzuU/r1ia3cXnxeIAutyVvf7804AiaU -HlE/4zX4ZgBiQ04kVE31wGwDq4GorSZlybJRWTXrUti3CR/vZQPVinJBN7rDhHBA -LWI/CISyhAjknkWzm78nvNPK+u2EvP/1EOnBpqr6xhExkhLNmgW7FbZSlMVs7kc4 -uM/9xyFZ62pdcqHFRNrETKKw4SlJcOpFqgWybA7voZqdmvn9MnemDAWr7PNSAEqm -AQvOhqxgI40hC7OLZ+q98FApivuGf2WiUF75v6zVV4ZQBHgtXVakEioL507sdqox -m71Rg1gSJBrTDCRLVo9h5m0LNc2Ieb8/ayfJ5wTuY2N+kruLKiRvzv/kqgLE8wtB -FTQjmPExRUNb1ULEfqy3 -=97E1 ------END PGP SIGNATURE----- diff --git a/media-libs/mesa/mesa-9.2_pre20130404.ebuild b/media-libs/mesa/mesa-9.2_pre20130404.ebuild new file mode 100644 index 000000000000..5f2e3fec9fa9 --- /dev/null +++ b/media-libs/mesa/mesa-9.2_pre20130404.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.2_pre20130404.ebuild,v 1.1 2013/04/05 22:02:10 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/_/-}" +MY_SRC_P="${MY_PN}Lib-${PV/_/-}" + +FOLDER="${PV/_rc*/}" + +DESCRIPTION="OpenGL-like graphic library for Linux" +HOMEPAGE="http://mesa3d.sourceforge.net/" + +SRC_PATCHES="mirror://gentoo/${P}-gentoo-patches-01.tar.bz2" +if [[ $PV = 9999* ]]; then + SRC_URI="${SRC_PATCHES}" +else + SRC_URI="mirror://gentoo/${P}.tar.xz + ${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:= + 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 + mv "${WORKDIR}"/${PN}-* "${WORKDIR}/${MY_P}" || die +} + +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 +} |