summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gentoo.org>2013-02-23 02:24:31 +0000
committerMatt Turner <mattst88@gentoo.org>2013-02-23 02:24:31 +0000
commitd4dd69089144c2cfecdd93acb7ffa0f89071d58b (patch)
tree30a64d44c24f14ff7ee7f8bad43cf8c1e464a24c /media-libs
parentAdd ~arm-linux and ~x86-linux keywords. (diff)
downloadhistorical-d4dd69089144c2cfecdd93acb7ffa0f89071d58b.tar.gz
historical-d4dd69089144c2cfecdd93acb7ffa0f89071d58b.tar.bz2
historical-d4dd69089144c2cfecdd93acb7ffa0f89071d58b.zip
Version bump to 9.1.
Package-Manager: portage-2.1.11.31/cvs/Linux x86_64 RepoMan-Options: --force Manifest-Sign-Key: 0x974CA72A
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/mesa/ChangeLog7
-rw-r--r--media-libs/mesa/Manifest24
-rw-r--r--media-libs/mesa/mesa-9.1.ebuild413
3 files changed, 442 insertions, 2 deletions
diff --git a/media-libs/mesa/ChangeLog b/media-libs/mesa/ChangeLog
index b54b899445cc..b6ab2beac1b6 100644
--- a/media-libs/mesa/ChangeLog
+++ b/media-libs/mesa/ChangeLog
@@ -1,6 +1,11 @@
# 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.457 2013/02/18 21:59:57 chithanh Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.458 2013/02/23 02:24:28 mattst88 Exp $
+
+*mesa-9.1 (23 Feb 2013)
+
+ 23 Feb 2013; Matt Turner <mattst88@gentoo.org> +mesa-9.1.ebuild:
+ Version bump to 9.1.
*mesa-9.0.2 (18 Feb 2013)
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
index eb7c684a711a..93e8bf175a0c 100644
--- a/media-libs/mesa/Manifest
+++ b/media-libs/mesa/Manifest
@@ -1,3 +1,6 @@
+-----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
@@ -13,6 +16,7 @@ DIST MesaLib-9.0.1.tar.bz2 6115959 SHA256 57a7ba83bace3f3a7dc0929fe026ef5f0ad454
DIST MesaLib-9.0.2.tar.bz2 6132857 SHA256 75bf31f26c6e7b5515e610c1005fd1be1f7eeb2c9e6859848dab879c355ad64e SHA512 1f04562c04a87a2c761a2ccb729f2aa228b19a0044d3c56e7da08382143331843cc98aee226558c045dc275ca7f14d7754dfe19b633ca1463bc3f30fac01e9cc WHIRLPOOL d947dc3edf14a989883a74103f17e0ede1b27ea9686b9ad6510cb40b7e131ff293e8c409ff5c6f450a61e03f2bc7de5428adc2e6d6791ddb4a9bc10b86cb5472
DIST MesaLib-9.1-devel.tar.bz2 6123417 SHA256 bab7409b05aa1b6ac39a5420c59d602a832ba093132ab3d571b4013eb59e6df0 SHA512 859d43a41d0ed43b5167a6556697d44238b28a39d8fd81dd570396c7062ee3374dbd10858320fd223780c78af4807a4cc2b55a0bb59ee498cc0f77023f460610 WHIRLPOOL 13571cbdbec872eeed3bb5b20c482ff2468274c02a61aef5ed40eb83c01845d7a438842154fc002f70d61e605c549ceb402ffef28ed32792912b039f120f423e
DIST MesaLib-9.1-rc2.tar.bz2 6119856 SHA256 8acc5881d50b4cf63907d7c60553f3050ffbfdc4a5148f2d06a6e0216c535a05 SHA512 b8f8beb4f5c0d9d15511707a1cb31896225755be3c2769d516e617b2933439466a6f21623a77c73cd22c32a0301c68f56c1b9ecf699c85ff242ef582719fa805 WHIRLPOOL b41c76693c5adbd9e98c2ea921b9447b5716b3c28b339ccd6e339f1bea2469bd892d0cadc7b9f5c37b341c1d85c7418ff862a32c218d8cfb4064c3fb3a448316
+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
DIST mesa-8.0.4-gentoo-patches-01.tar.bz2 2380 SHA256 bad7443e7163b87b3c14f8f56568551300fe190f58531fdba4fdabd36c2db842 SHA512 855834bc13decb46ab0b81e75002d873d2f40f67c9b1770b2d33e892beffffb32c229db71df72bea24d74ec515a0890a89dc9221cb22bba59c50182c654be676 WHIRLPOOL c78b4fe32d6b3246c7dffa2b7b9c216e13323ece677129618b2333d620f81777e8a23f13c956f88cd3aa0ae790d0a102d4f1c1e96c9ca5a13b3583a14cb2288b
@@ -21,7 +25,25 @@ EBUILD mesa-7.11.2.ebuild 9981 SHA256 f0c47c532ad67ed7fc2abe30eecc727bba71bbe8fc
EBUILD mesa-8.0.4-r1.ebuild 10843 SHA256 e2d5aa6a67796611e3e2eddd97f8be407b2aa04cf7f70c1a874084d269f37331 SHA512 291e02e7990ae4eb8fe7394e1eefda0493b9dd4f5439720ca3989a935b7448ee3ed58e95b8e187f4839b7466f4b0974796d9180498de487deb992ecde09beda9 WHIRLPOOL d4724d1a98f4ab09e6982e75e1f986d7f2b8fb1c67c7b0d269c8df3fd03f9271e9e9f9ec36b194240bdccd58d4f6a07842468e68f1600bf6f0164eebe164a140
EBUILD mesa-9.0.1.ebuild 11075 SHA256 4f0802521b49c30c572f3ba476f4b164ceca3ea921b67892c1e14ee09bb189ac SHA512 25f8190a5d32fd8560d23cbebcd2ca67efcd2cb0cceb23cb9c9b761adc61347037f2574b1fc4c490ea4c5178f5ca357f442b1f60eeb5b75657702155d66f7d25 WHIRLPOOL 4118b6a10310f0cd3e1bb7a805ba2ea3f17a5c7bb6274aeca321bde4b4eca19614fcf852b34c0483c417a8dcd8efd6abb656de1ee99a2dde25b89717e290ff04
EBUILD mesa-9.0.2.ebuild 11085 SHA256 221ba217edf67ac54794549b1499149d0821f340cb22703162cca37c214481d0 SHA512 d222eebf1863af9b904eec2b18199849c50861c7556a5c14add8949641921073762a759e4a2db9d08820c3cda2b5e9fd8463f96484e5db5297e9d360e744d94b WHIRLPOOL 4374e2b3102078d6ca8b9b838b5828472e2f9ba3a2d9c17ae23bb98b7a75ec6ad70437cd660c17c0f74479d3afe0c6ce26e3ab4f21e61e0871ad9e2407332aa6
+EBUILD mesa-9.1.ebuild 10826 SHA256 995d01f686f6390f9ebf46b60d9d7d94a9d61cc76d2d76c3b14bb775585f4651 SHA512 127fc9075cec00a6fba0e63424e30915e31d74e87ee91aca785de95c0fbf16a89c9383ac1919f2ff5c51a5387aeb7c71d6b1d145afcec6e17c70fe153a22c3e1 WHIRLPOOL 7d2ec09c0dd8d2e684d54cc0d6e59b0ab2fd5a4f4f654b23b96297a2493ef2349e4170b7393787285938efafacac8ad075ebfdae30a42b89256a925f06e85f87
EBUILD mesa-9.1_rc1.ebuild 10838 SHA256 f45c1f6132f717332b14e7f1566a6846d56021e08613f08ee4552e9face1f9ab SHA512 3e0cd3e4389e9d10b5e750166b8a399d27fd86cb3037c1a33c73f79fa0a7259e5d9911231c126f5d64f60ae363ffdd5b0dffc2cfc5bdb1ff8393bcc4f4d75d5a WHIRLPOOL 0385ce044148ff744272b3ab551ac1f64ca7ed071b5b02835464c7bc2c052e2bda7426eb2dccb679cfca20b0e319396460276bb2be281ecb0c2a2fa375b2b18c
EBUILD mesa-9.1_rc2.ebuild 10830 SHA256 5a14680ebcdf37590255d5357cbe898850f99c0c87c927f5ee8ceebc967e52cd SHA512 9b139d2628d01256c6fafab851a708e8498a0231a847b42d8cf7c51a3066d5140e8fb1a62c59406aa0de4efbdda29f55c0e17bc87c5eecf4e9ab45f4a1f2a41b WHIRLPOOL ebd62a3ba44287e752d52d4a3d85a4846a3929dd2adcc50c8d22fe8f08c1f7d9c8477a75994a18d40c0af457fcaf007241495bdd2c7b69421453aeda5ffa1342
-MISC ChangeLog 74459 SHA256 4d452422265745f955d9679e0e6cd24d6d4ec336d1586fd3cb2a626c964552e2 SHA512 d39e8fcbdd8e58473292d6a863fadbe0364c21973496923fa9c3d2e7600ec596ad2eff207aacce09877de88568cebf711c52c8d42e5073c36956d4dcfe73ab6e WHIRLPOOL a0af382a947fd50dc2c6384ea0d1b3cfba03e7c207bcc62b7b8f3f31a42f1d3b159b59b2b18efb9e8e23c2139d206be6ca46134706a82364ab9f2069c40ffbf4
+MISC ChangeLog 74575 SHA256 39cc40a4876242b5a1eb11ea89638f90988c7dec91360857f7662621eb623c43 SHA512 d5e677ca0113dd851e27ca55b6e8830496e3eca02a57ab50a217e9391b5c753ddfcdb910404358a5f6ec6371161abed5da9cf59b0b5a6f3d00aab8d450911e07 WHIRLPOOL 2fc37b55fdee51da243de0a8ddb28799fc78e55d1ae0953c8aba01dbaf657021fdae214101baa753439e287e24baab1f031b7e3b40ecc950fc03e6a2437357f9
MISC metadata.xml 1986 SHA256 7a518f3eb77d4b51d4dc5c5cd347bebdc2c849e43d17d1057afeae6be2dc13ad SHA512 1dccfd236b8b8e39560d5056281e774979cd8e2299623b34c2e0f0d9e1ae84906932cfbc0ab15bdd1effc1d82cb484ca4d23acf7cd8d849a33a82f9ee2c60b90 WHIRLPOOL 14e19a3782775f7ca600526f1bf852ed55e328585b7e095a8ab239697ca351f812bf914205166faf714420d179ac7e36b6d1b10fe74188a028c580d40640e31c
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.19 (GNU/Linux)
+
+iQIcBAEBCAAGBQJRKCheAAoJEA/daC2XTKcqEFQQALYUesX2CFlTd6Q8CAePTtTn
+ri3zgTg8Oo/aDXCHKa+bBhg3mjRYLdfWpn++QU4bKUsvyMSiltSIp3H/DuXfTMZ/
+vTeSrHeBllWH4lCm3gB9wX+1VwITQuB+PpzHok37bWey8SVe1iO2cT3G/m+gVHZx
+VQ8Wp5ZGJyFyV1GrX6QqxjIu5vBPYgHOCJ0qXJoaCrUV09lXKPo0t8ttA0sNg534
+rzakKfsQjFHfDaQg/Ijiitpnjqmr5l27k6j7Vw1009Z033LIKig8+bF2PCl98MI+
+09tGwsBFlk7atJkOuhwCtPzUU7K+t/Ddv4Ovy0SDl6sV/pc0mJoEeyZq3UX/OFWD
+wVee3FvluZY8NFaBruyJIQHovYlwyDF+cXm1Q1iQfZVxnRvMsPG+hnwW8C6OlLm5
+9XBUgopgZBYBB02HGoHIr1dmVT+Kxb4ENuilJQdYb+V87LGrpQuZ934pYLqFkr0W
+wnvsGybqoDoia5aFeFHAIiNkDCoAnb347/Co+mO9869iToJP3FQubOkeln8TN5Ee
++MzhrpfPyBM/JAT23WTozd5xREEeKh3pm6U3iWQR/9z/ZgKdBHGvw1k+YzuWw+dL
+rFh91oMMUvMy/THUywjFqvO4/Iy2ceOCvzVSZWZpBAUyLF8FIFfdELEf5Fy+kI85
+d8xpzxWJJVaYbZrYVOUJ
+=TRt+
+-----END PGP SIGNATURE-----
diff --git a/media-libs/mesa/mesa-9.1.ebuild b/media-libs/mesa/mesa-9.1.ebuild
new file mode 100644
index 000000000000..8ca19019c4e3
--- /dev/null
+++ b/media-libs/mesa/mesa-9.1.ebuild
@@ -0,0 +1,413 @@
+# 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.ebuild,v 1.1 2013/02/23 02:24:28 mattst88 Exp $
+
+EAPI=5
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa"
+
+if [[ ${PV} = 9999* ]]; then
+ GIT_ECLASS="git-2"
+ EXPERIMENTAL="true"
+fi
+
+inherit base autotools multilib flag-o-matic 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/${P}-gentoo-patches-01.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 ~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-3.1 )
+ video_cards_radeonsi? ( >=sys-devel/llvm-3.1 )
+ )
+ =dev-lang/python-2*
+ dev-libs/libxml2[python]
+ 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
+}
+
+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} \
+ ${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
+}