summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/mesa/ChangeLog7
-rw-r--r--media-libs/mesa/Manifest30
-rw-r--r--media-libs/mesa/mesa-10.6.1.ebuild456
3 files changed, 478 insertions, 15 deletions
diff --git a/media-libs/mesa/ChangeLog b/media-libs/mesa/ChangeLog
index 2d9f321a4738..b4715405fbb9 100644
--- a/media-libs/mesa/ChangeLog
+++ b/media-libs/mesa/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for media-libs/mesa
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.644 2015/07/02 00:47:27 mattst88 Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.645 2015/07/02 00:58:46 mattst88 Exp $
+
+*mesa-10.6.1 (02 Jul 2015)
+
+ 02 Jul 2015; Matt Turner <mattst88@gentoo.org> +mesa-10.6.1.ebuild:
+ Version bump to 10.6.1.
*mesa-10.5.8 (02 Jul 2015)
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
index fe71651605c1..1998191fde25 100644
--- a/media-libs/mesa/Manifest
+++ b/media-libs/mesa/Manifest
@@ -17,6 +17,7 @@ DIST mesa-10.5.4.tar.xz 6988284 SHA256 b51e723f3a20d842c88a92d809435b229fc4744ca
DIST mesa-10.5.5.tar.xz 6989964 SHA256 4ac4e4ea3414f1cadb1467f2f173f9e56170d31e8674f7953a46f0549d319f28 SHA512 d339f598bfdbe14388d3213b166bed5f89e67535b0ccc09d47f434e2669ed3c5d4c23a1c86f3e180d90e8ba1175f9de24f62b16364f072ac6bb695b57e519b61 WHIRLPOOL d824732ed0f6dd2377b183e8676f8b1e7685f078ed5e3f6a536157ac272928a190c710dc8d77b5e89bcff83ccd2d8f805ea6cf6413780fa6420d704e5bcd84b0
DIST mesa-10.5.6.tar.xz 6991136 SHA256 66017853bde5f7a6647db3eede30512a091a3491daa1708e0ad8027c328ba595 SHA512 691a757755a76a85ac0877617bad7491037dda9445fc36499e9fc32d0fbfb3d3cdf8666bc45596a4d8e0b6fea40860e86e5e2ef1adc041b23cb5990aceaf4903 WHIRLPOOL 379cbd0dfb86672a1280641897c4c2ace4274a0b2db188ce3e7ade099db6beb3a73be25e7d1e0cff5418f5110540923d872e84693e33b79e576336e26ad9b670
DIST mesa-10.5.8.tar.xz 6993084 SHA256 2866b855c5299a4aed066338c77ff6467c389b2c30ada7647be8758663da2b54 SHA512 d7fc441b4cdad8a2905f03091af26ca7b01573bf4d0d928e950270981e4c6e7d20dba6aa97a60500b9a335a3c5cabc7f388a5338d43d391eed3f09dea60b77b2 WHIRLPOOL 68cc3d8490da9759b9d790053c70429be4c529c63b114f65f411112f76cd4daccc3490120a85a84d01cdcb989c0a0e58016b4d80f2238f2320b1caff797f3390
+DIST mesa-10.6.1.tar.xz 7035216 SHA256 6c80a2b647e57c85dc36e609d9aed17f878f0d8e0cf9ace86d14cf604101e1eb SHA512 7ba5f4a7e421e6f198c4e80c1f0259071e1115aecdbe2846a7986bcfe1503a6f4a1806126295e3d9f4b6aee63dd107e82c3972ccb8079b9b5baf1f65246d21ab WHIRLPOOL 1e72a397e30e0f02afc18d864aea004f13cc95a925b66538ac1e368dea9f4737168dcf6b6af715ae04331b0626b3bda7aa2affae95575c56edbeaf0177bc3117
DIST mesa-7.10.1-gentoo-patches-01.tar.bz2 5488 SHA256 31cd4f6d1a0a70249c40452919074856d120cd473a01a8457e3dc147a1b622d8 SHA512 c62b45b32e396e67f629003fc5242b7b4df054b8e20b5237489212bc4f0171534915a02fc9efa68965068121d10660b5cd92a419efabe33fd4596a97a39249c2 WHIRLPOOL 5f171959e3a31f5c38438b4806ce371bb8fdf1c7a87501865e4ed5d5ab284cda9568b7773005997d7a1cff151f95e64c027b36c0be48a4dd288a7ab8b5f69b97
EBUILD mesa-10.2.8.ebuild 14640 SHA256 be10cd6a5733a18ce12565585f0b339d1c4eacc3162b7d1073a8142e13abf222 SHA512 923ad8071d832aa4a8e9e58ac730a38bfd62c4cf539db93b3ca6123a03d4c8d1e7624430b9fe06c2db5159993107d4d7bb38dd15572df074d0b754f06b8f554b WHIRLPOOL f8ee6d3350d62bf940a58d0ab03cfb0ce6c6b32e838ee50ae1368afb7fb7df06b75e120f7e5e505398fa51aa7c75c2d6da17a981fb859cf0aae12ddf3e81daac
EBUILD mesa-10.3.7-r1.ebuild 14765 SHA256 6e9cc97119020e9f40e93c62cf926241d9dea6de26b130e5c25e104c24474e43 SHA512 cd38c3113800319e8c56d9382f27ae9cd98f4bc360f1f3bd913b59da08a2abc31424cb4291db7a537a59e7444987e1a0b1ab4781b7e5e66b596260e0eb468e48 WHIRLPOOL 1e65c294682ba0d6d8bc581ea6a7925b075a52134fa5b98a3dbfc1cb5a87ed2294e1ad6847395d0fb4574d6aff904b82d652b36e156062509edc58c32449fd5d
@@ -26,23 +27,24 @@ EBUILD mesa-10.5.4.ebuild 12527 SHA256 f9576967ed290cb8203247e528b0d0293dcf29596
EBUILD mesa-10.5.5.ebuild 12527 SHA256 c50c78921b6f2b0f193803233735782402c5cea991f1c597c31e5c2ef553c09b SHA512 51545089ef503e34550e251df139ebdeced73326fde79ae625b7446b3d263d62e4aef9e2dc2cfab973986021589e4ca4e4770ead32c251fa3506dbc5bab171b5 WHIRLPOOL 75a8f2138979aba76fb989a4b5ce422e4766aaae8df9676158053be4854e4a2bc279c81262034b77288ccd991a7fb3dbb52d7e72f9907f37b726d8a6d94fea34
EBUILD mesa-10.5.6.ebuild 12527 SHA256 f109807f25db58e4b631b2820a0896e910a247b4987545bcf634a60aa7f2e0c5 SHA512 987ac393885c71b33de325ae5a3551d8db6181af23e4cd2fcce27d5f162a64a10b98d72f14d618264c877249ef8589ae97ff04ed173caafb95c0c9652be0b268 WHIRLPOOL 051f3b3f47cc1ce69623a191a3362148f3e14815073f91a423286253fe8e2182de735b3efccdeef2a3bca2fe75cc58a5c730b63dc5ee0cb9ce4e556bd9e06311
EBUILD mesa-10.5.8.ebuild 12527 SHA256 0e5805a251139fca75cc96c1b0d8d11f7b79612563097bc382567cf4c9aa6b86 SHA512 af7511b0b905b7876161cac81c64cbb1e9f70cf9256da2a2201d650ae8a8a582fcee1eae3951060e386fcd2912bb0d95ee846403547401375dbf97335682cd54 WHIRLPOOL b8b23a713fb327727c5c58eb35de505dd22d4777a58456f1808f7b118a5d6d98be783dc838503819771bde023b738bc5fe722b1ce365b7be687e851f230e96e3
+EBUILD mesa-10.6.1.ebuild 12554 SHA256 82961b392e6404e15b89ac91cf078896bca48f3f1ce31dd1b6fa60d9274b174b SHA512 ff1987464fee3f873fd1f2fed15802259e81824cea22fa4d21af37386016a375d4e6ac46dcc9fe0ff54a656418ad4843f46d9f76968d4846ab7463d7952ee995 WHIRLPOOL 3c4424f14e415dc9be2033a7faab3b32effa7d9cc30848425fa8f87f17d88d001909b8382eee2796569f0b9ea0aac8c36204087fd4ce19e54d0ab53e552fa533
EBUILD mesa-7.10.3.ebuild 9834 SHA256 2365eae41e795a722548fb4d8a6c72216b3d5a4b287014f8de5242a017ec5c2a SHA512 1cb57bf082d93bfd91bb0d68d7978c1339dd20477efe84e050fbf6c869313292819e158ae2620602d651023463f6cb9ab4ec40199732338a2c5168ef6e5281e4 WHIRLPOOL 329e68844422b3fc81485825067b916b6cec0b2723d87b4c7682bdecf25a51a466792f04fe0f72332767912714c9fac1fdfe284ae17b68add5019113be008681
-MISC ChangeLog 103193 SHA256 d04996758cf56b3f26bcf891878dcabd003569e6b716562b22e79cf26a949662 SHA512 c8bd0f6e2bad88dd5481c9d04eb648573b5017cf87d713a7908610e8c5fa5bbb7d475f00697445dfdab70263115c4c64c7f7bc07f3c3ad166c27a1e14398ad15 WHIRLPOOL d4aec861098e79882ff36919b15d7941c6c4833ff7bf42138bd503871814ead89870688eddf933d9f03004f532ad31b7473d704c724c87c1e2817efb49080c47
+MISC ChangeLog 103318 SHA256 9992cf14f3ca73c1dfbef967b6d58a6047ee13825a46b5cbbb088ca597d4bf29 SHA512 129ccdf880046f151a3a4398cc8eb4b6c1e90c42fbdd45a7ce4c7c9e6ed67e1982dab97ba2375b94deff33ada9ecda4883b7a350c3b6d79877cf8f2930ddec5c WHIRLPOOL d9239f6d6dd6f67223dbe20d4a8d522d7ec4a113888ac8271a648f4294af3324f3ebc40b45914b2ef7b5f9579eb581dd42709b0e18c7ec7c33d5e7fc0fed9fbc
MISC metadata.xml 1854 SHA256 b60b4d587e093ccf61c0d6840982145e406bb3f6f68bf208a9e08d0a98a960c8 SHA512 e9d40790143c9a4560b3287510e12578ddbeb17f9a22f72a60cabe0c2921f7019612d37fe32b95006f5508bc56565f438df3acca297762616e888e2b675f6bc7 WHIRLPOOL 6fb4932c93a021d6060f9aa0e1b0baf194083b9e0f981771557b2affd3639981df1495b56f160ac99e839059fb65ed18715c4a728919308733872f5d87806ea5
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
-iQIcBAEBCAAGBQJVlIqKAAoJEA/daC2XTKcqKhIP/iTySToNpANPJ+klgGaUgziH
-UP8Muh4hdHAqHEDLa8qRtJTrORhKquihW8dfyJlVX6+d4JfssqHGiP/fQadMJb0S
-1RB7qYkmRyFQt4W4TpKPvgEfnKVL8D9E2kRztUbNplVVZ+NMsgj5Tum5muT1C8VP
-nG024bQo/NX2r5JOk0GCE+FjwHwLQrT1Jhx446jPrEo/RrmMkirTGmU5zN4o6Wrz
-qgWpxgLULPfO/7rYuv0U0WFBKavpB4y+42BFkjhyGVJK3/CrbdI3kH1w+OEbpmKd
-GR7F2ku1TFyFt0xopkkh3eCq4tB6cMRMJxkybdcaF15g/S84Hfi3lzYSY2FIXijZ
-Kq3riKw/GzO/OgMMdoP2tTx8hJO0ge4+4YjjJlKxBBBEbZJ2WHh2W0veA59EInX1
-6n4JVvqJwr7mhBzPbJX/V4TeI7nwGdjglKs1GCO+6hiEq2NChbD43rIPoCReD/Qo
-3IqOBb7OhjSxpiLxmPqS3/Kxi/3vJCef1nt0bMaq6OQDJMvqdf/T0Ls/N5n1bLZa
-Dd3HMdBvkwkbWWNPkKr2FEtURhxfDXKQ3Ib5qYefSyMyBF4NHWhojoh14ND3PP5w
-rA1yKiP91xg1dKIg/7ddIaOXclAH8lc1rmzpeba05RwlIA1oHs33xaDlTh+Ey2eh
-dZN90wrMiDrXg3WomElg
-=0h5O
+iQIcBAEBCAAGBQJVlI0xAAoJEA/daC2XTKcqSlkP/1Jcem9RPye8066z33Tg/HKl
+3zQmLCyOAQsv66EJxGBVv421wcgI7sw2Zs6F6TDoHTsIZRGQukBuGHwj1AAiFhDI
+s4sjb1pavlIf1CKC+7DTn/QOfPtQcdpGROK0yZYFKbwkbarrtv6AgBUu6qINM+as
+xnCzlSxuVTx4mmbdNwVo6YsdCALGxwyx1Xte79MesD0uRgoTirp/qhm15PvNw2/z
+hYh1In1Aiq+PC2PXTn5cp+cFb1E1bZZWaaHT+VcGgHbb0KCzyMfDAEQNEvEYTHd4
+fxm7L1ipT+xsS1u7FoqTQuQmNA3OcXFEaC2mqeqJMrzINgUK1otab1Ubmxsk45N5
+q8ZFF3h8hdTzfiVwioFrl1Y7GazO/TEg65ML/KmIawy/Ua/m8pombhaGujaM5+y1
+yCvFeQeN84Vc3aeTEt8sQUAZloC692Q6zufFf2AhWH5y0S//YVIptEtxzoJT4I9q
+HTnwelk+qxwSh4f0VlTsyJ1/ZCDuuIMzlEDanVAhjx29aTMb7cRqnsYjBiChbm6H
+Tdz6MaKyyOS2XjISse2lH4rj51L8gMAfcIw8xPRzaumUuGt+G2uuN3AnszkLreXw
+qehFLoxnBdwNHNmANqQYAjlR53kFuH7B076hIPzUMgKSifTHCgVtU6OVNSNwZze9
+klSBruPycuCwz0rcT6Vx
+=MHHL
-----END PGP SIGNATURE-----
diff --git a/media-libs/mesa/mesa-10.6.1.ebuild b/media-libs/mesa/mesa-10.6.1.ebuild
new file mode 100644
index 000000000000..24c3ec367ba5
--- /dev/null
+++ b/media-libs/mesa/mesa-10.6.1.ebuild
@@ -0,0 +1,456 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/mesa-10.6.1.ebuild,v 1.1 2015/07/02 00:58:46 mattst88 Exp $
+
+EAPI=5
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa"
+
+if [[ ${PV} = 9999* ]]; then
+ GIT_ECLASS="git-r3"
+ EXPERIMENTAL="true"
+fi
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
+
+OPENGL_DIR="xorg-x11"
+
+MY_P="${P/_/-}"
+FOLDER="${PV/_rc*/}"
+
+DESCRIPTION="OpenGL-like graphic library for Linux"
+HOMEPAGE="http://mesa3d.sourceforge.net/"
+
+if [[ $PV == 9999* ]]; then
+ SRC_URI=""
+else
+ SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_P}.tar.xz"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~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"
+RESTRICT="!bindist? ( bindist )"
+
+INTEL_CARDS="i915 i965 ilo intel"
+RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
+VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno nouveau vmware"
+for card in ${VIDEO_CARDS}; do
+ IUSE_VIDEO_CARDS+=" video_cards_${card}"
+done
+
+IUSE="${IUSE_VIDEO_CARDS}
+ bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm
+ +nptl opencl osmesa pax_kernel openmax pic selinux +udev vaapi vdpau
+ wayland xvmc xa kernel_FreeBSD"
+
+REQUIRED_USE="
+ d3d9? ( dri3 gallium )
+ llvm? ( gallium )
+ opencl? ( gallium llvm )
+ openmax? ( gallium )
+ gles1? ( egl )
+ gles2? ( egl )
+ vaapi? ( gallium )
+ vdpau? ( gallium )
+ wayland? ( egl gbm )
+ xa? ( gallium )
+ video_cards_freedreno? ( gallium )
+ video_cards_intel? ( classic )
+ video_cards_i915? ( || ( classic gallium ) )
+ video_cards_i965? ( classic )
+ video_cards_ilo? ( gallium )
+ video_cards_nouveau? ( || ( classic gallium ) )
+ video_cards_radeon? ( || ( classic gallium ) )
+ video_cards_r100? ( classic )
+ video_cards_r200? ( classic )
+ video_cards_r300? ( gallium llvm )
+ video_cards_r600? ( gallium )
+ video_cards_radeonsi? ( gallium llvm )
+ video_cards_vmware? ( gallium )
+ ${PYTHON_REQUIRED_USE}
+"
+
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.60"
+# 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
+ abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
+ classic? ( app-eselect/eselect-mesa )
+ gallium? ( app-eselect/eselect-mesa )
+ >=app-eselect/eselect-opengl-1.3.0
+ udev? ( kernel_linux? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) )
+ >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
+ gbm? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] )
+ dri3? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] )
+ >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
+ x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
+ llvm? (
+ video_cards_radeonsi? ( || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ ) )
+ !video_cards_r600? (
+ video_cards_radeon? ( || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ ) )
+ )
+ >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
+ )
+ opencl? (
+ app-eselect/eselect-opencl
+ dev-libs/libclc
+ || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ )
+ )
+ openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
+ vaapi? ( >=x11-libs/libva-0.35.0:=[${MULTILIB_USEDEP}] )
+ vdpau? ( >=x11-libs/libvdpau-0.7:=[${MULTILIB_USEDEP}] )
+ wayland? ( >=dev-libs/wayland-1.2.0:=[${MULTILIB_USEDEP}] )
+ xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
+ ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vmware?,${MULTILIB_USEDEP}]
+"
+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? (
+ video_cards_radeonsi? ( sys-devel/llvm[video_cards_radeon] )
+ )
+ opencl? (
+ >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
+ >=sys-devel/clang-3.4.2:=[${MULTILIB_USEDEP}]
+ >=sys-devel/gcc-4.6
+ )
+ sys-devel/gettext
+ virtual/pkgconfig
+ >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
+ dri3? (
+ >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
+ >=x11-proto/presentproto-1.0:=[${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}]
+"
+[[ ${PV} == "9999" ]] && DEPEND+="
+ sys-devel/bison
+ sys-devel/flex
+ ${PYTHON_DEPS}
+ $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
+"
+
+S="${WORKDIR}/${MY_P}"
+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*/libGL.so*"
+QA_WX_LOAD="usr/lib*/libGL.so*"
+
+pkg_setup() {
+ # warning message for bug 459306
+ if use llvm && has_version sys-devel/llvm[!debug=]; then
+ ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
+ ewarn "detected! This can cause problems. For details, see bug 459306."
+ fi
+
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ # fix for hardened pax_kernel, bug 240956
+ [[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch
+
+ eautoreconf
+}
+
+multilib_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") "
+ fi
+
+ if use gallium; then
+ myconf+="
+ $(use_enable d3d9 nine)
+ $(use_enable llvm gallium-llvm)
+ $(use_enable openmax omx)
+ $(use_enable vaapi va)
+ $(use_enable vdpau)
+ $(use_enable xa)
+ $(use_enable xvmc)
+ "
+ gallium_enable swrast
+ gallium_enable video_cards_vmware svga
+ gallium_enable video_cards_nouveau nouveau
+ gallium_enable video_cards_i915 i915
+ gallium_enable video_cards_ilo ilo
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; 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
+
+ gallium_enable video_cards_freedreno freedreno
+ # opencl stuff
+ if use opencl; then
+ myconf+="
+ $(use_enable opencl)
+ --with-clang-libdir="${EPREFIX}/usr/lib"
+ "
+ fi
+ fi
+
+ # x86 hardened pax_kernel needs glx-rts, bug 240956
+ if use pax_kernel; then
+ myconf+="
+ $(use_enable x86 glx-rts)
+ "
+ fi
+
+ # on abi_x86_32 hardened we need to have asm disable
+ if [[ ${ABI} == x86* ]] && use pic; then
+ myconf+=" --disable-asm"
+ fi
+
+ # build fails with BSD indent, bug #428112
+ use userland_GNU || export INDENT=cat
+
+ ECONF_SOURCE="${S}" \
+ econf \
+ --enable-dri \
+ --enable-glx \
+ --enable-shared-glapi \
+ --disable-shader-cache \
+ $(use_enable !bindist texture-float) \
+ $(use_enable d3d9 nine) \
+ $(use_enable debug) \
+ $(use_enable dri3) \
+ $(use_enable egl) \
+ $(use_enable gbm) \
+ $(use_enable gles1) \
+ $(use_enable gles2) \
+ $(use_enable nptl glx-tls) \
+ $(use_enable osmesa) \
+ $(use_enable !udev sysfs) \
+ --enable-llvm-shared-libs \
+ --with-dri-drivers=${DRI_DRIVERS} \
+ --with-gallium-drivers=${GALLIUM_DRIVERS} \
+ PYTHON2="${PYTHON}" \
+ ${myconf}
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+
+ 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 "$(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}"
+ fi
+ done
+ if use classic; then
+ emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
+ fi
+ 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
+ if use opencl; then
+ ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
+ local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
+ dodir ${cl_dir}/{lib,include}
+ if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
+ mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
+ "${ED}"${cl_dir}
+ fi
+ if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
+ mv -f "${ED}"/usr/include/CL \
+ "${ED}"${cl_dir}/include
+ fi
+ eend $?
+ fi
+
+ if use openmax; then
+ echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
+ doenvd "${T}"/99mesaxdgomx
+ keepdir /usr/share/mesa/xdg
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ einstalldocs
+
+ if use !bindist; then
+ dodoc docs/patents.txt
+ fi
+
+ # Install config file for eselect mesa
+ insinto /usr/share/mesa
+ newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
+}
+
+multilib_src_test() {
+ if use llvm; then
+ local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
+ pushd src/gallium/drivers/llvmpipe >/dev/null || die
+ emake ${llvm_tests}
+ pax-mark m ${llvm_tests}
+ popd >/dev/null || die
+ fi
+ emake check
+}
+
+pkg_postinst() {
+ # Switch to the xorg implementation.
+ echo
+ eselect opengl set --use-old ${OPENGL_DIR}
+
+ # Select classic/gallium drivers
+ if use classic || use gallium; then
+ eselect mesa set --auto
+ fi
+
+ # Switch to mesa opencl
+ if use opencl; then
+ eselect opencl set --use-old ${PN}
+ fi
+
+ # run omxregister-bellagio to make the OpenMAX drivers known system-wide
+ if use openmax; then
+ ebegin "Registering OpenMAX drivers"
+ BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
+ OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
+ omxregister-bellagio
+ eend $?
+ 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
+
+ if ! 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
+}
+
+pkg_prerm() {
+ if use openmax; then
+ rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
+ 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
+}