DIST MesaLib-10.3.5.tar.bz2 7283615 SHA256 eb75d2790f1606d59d50a6acaa637b6c75f2155b3e0eca3d5099165c0d9556ae SHA512 4aebf726e51da7ce55d82da407e50741aa0b0c009de59979b4c7b8643e3d3542e52ae100fdcc25c764518953344bc60ad00a730537850e02a9c6f43ed21d0fee WHIRLPOOL 4d450a8eb793efb7d5162fe1a07e2533df06e0d2f250de6946378eed209e3821e8f110619b503387e1e605bcc880a5da73f51786e2c52328a59e94f25b0c82aa
DIST MesaLib-10.3.7.tar.bz2 7287153 SHA256 43c6ced15e237cbb21b3082d7c0b42777c50c1f731d0d4b5efb5231063fb6a5b SHA512 bbc027c4146c42aaa160990f5281c71a342d32c10ba56f91da1a60dd4cb7d620ff49b72553d24bc1d87470e2baf9be81b5bdee9abe49d6acc57902fccb9e2e5f WHIRLPOOL 7fa32e70c6aabb84a06f2f852f77eac839aea08726c442742b3d3abdb94a0fd9f033439ab0cb16865f4ee14e1538cb86937856bbdfd1f9090e8e7c43eac52e03
DIST MesaLib-10.4.3.tar.bz2 7504749 SHA256 ef6ecc9c2f36c9f78d1662382a69ae961f38f03af3a0c3268e53f351aa1978ad SHA512 b59ce48fb663d3ea1c5400fd43cc90983d244068bc45fd809cb175ab64e416473a45d81ccb9274661d8a9a2d7753c4f57726bfe294aea801cb266fd76a732901 WHIRLPOOL 7ef298f400c5caa6757c8ec9a2764236896dc4d517564e2d6411423a43381843cf3cc7dedd1eb1dd884d9f1cd7111458c1f188ff959fc530df2cdb459ed10faf
+DIST MesaLib-10.4.4.tar.bz2 7507100 SHA256 f18a967e9c4d80e054b2fdff8c130ce6e6d1f8eecfc42c9f354f8628d8b4df1c SHA512 72d289d051bcb676ea93714c73f43e3decddaf1877e39bc7b9f092946b79d4e9c40dd534187a9eae81c844f8f9843bc6d0a804e5f22fae0cafc2b482859c7357 WHIRLPOOL ec89fcf5ac70170d8253a7b5d41dd0f46dc666e1b39d6b981d1a0169fbe360efa26c6f550c5391122baf1745f70786bc8a6a6b5d070404a455374aa358800e04
DIST MesaLib-7.10.3.tar.bz2 6056837 SHA256 1e701fc839b872677ddca9ed8784d754c9da1fbeda98173980e06aa7df0e85c0 SHA512 aa1f5f068b305fae5519e11cad2db9c6dc647d3122252bbcb210f13ac6ef1b667ae750344898bca7c5bfae94934db05eff915cb7417a59590e6d3ba230817aa8 WHIRLPOOL 5c2adda647936ed4163a4e4d5afad8344eb576712f9432f697aa0fc22ca17d7aaf0aeb6ad2d4e7e0825dc27cae570660332450778f8091e9b27aad2865c9b5fc
DIST MesaLib-7.11.2.tar.bz2 6257280 SHA256 57746aa8c60bc6f5596ec6c6c7274de40fa12edce5ec33fe899e704fa00b5357 SHA512 f9f93aeb5ba3e4f0cdd7041a7bba6cd18dd8f58446b796849f43c6037297011df826017c32e03f03c8527d4afd3b9096e9ae3cbfb3c86b4ad145c66867198c21 WHIRLPOOL 0cf1b328b95e4f09e549c8adb2f6dc67e36c48ef570c1a5fda73efad54b8327cbec896d67bd01838be8bba7274f32704feca3fde8bb68bf1141563d17e8be707
DIST MesaLib-8.0.4.tar.bz2 5737052 SHA256 02ed19f4f5f6535dda03a9932a81438aa78ea723ebba1f39a3d49a70a4e1d07e SHA512 b7e8879e92252d0588d9eeeed904fd502ce1f48551b9a97f52aeb1318c79a80fab27504521107d61fbb5d986b2d778d89023a892baf9f1c5a5d2ee3746fefa57 WHIRLPOOL 5371a13e93e2d43264e2580e1e5e28ed85b6bfbdda9dd89104b1c18e62d35417e20b0ed8f13d8c54f58b83875fac9348d57f14ba08e4a88599e5fc0202502173
EBUILD mesa-10.3.5.ebuild 14900 SHA256 8c2fa274efdf687ace1591a9f6feda155c845c022f79368b29a8bd24696c11ba SHA512 73d59b896d8e460d20663f307447425ccb2d4e1a022f1591b06b1f9ee2a3506de4759e37561963ef1ef551f445d00d6035050a4a0fb659d3aa43f6883d79072c WHIRLPOOL f98b7aaa3e84bcec8365b45af3e697c7d43813023b428517fa0437ed27b774c3762d45faaadc488741cb24c18906c39d727bbc060a8f84adcfc79e01322f3299
EBUILD mesa-10.3.7.ebuild 13831 SHA256 90d234ef035a0cfae72acb78c9cb4c83fcf2e013f24a2d03f209e5ad85327b26 SHA512 9ef905a9ba34e56d6ec10a649691f70cf5175cc3bd753f33c02a09e96f0dae909094a10034c2528bc11e2ffe7e4b3512b9a99984a3ef53419c6f2a160fb94efa WHIRLPOOL 7520cc4ee9af5c5b615b9c1e639e21810f18e7ff0604ce56b873defdf68756ed41664fc5cde9f0a7816524123656768bfa9eac9a3d5bc58c33c794f54dd92949
EBUILD mesa-10.4.3.ebuild 13807 SHA256 3e73db9e5af5c2fce6133705b447322dc6c3f3079ef6a5a03bbc35057a36f660 SHA512 d78b76e744c2e35e339f2f410c27f4a8a1e6c2c3dd475662f4d5ad097167520c9eef75dc840caa3e7516c59f89f3a20345724efde140c99311642db0b5adc41a WHIRLPOOL d5ba9c1cb22c471f58979425f674fa9bd504bd0b31dcb07543597e485db038111e7bc36041c7f7abba8246bcddee37ff6b9700c60d2efa567f6971ae4b054ebf
+EBUILD mesa-10.4.4.ebuild 13753 SHA256 1530d609fc3c6e07542398e50aad3a4e2e31a32554a2d48ea7e690e40734a0f3 SHA512 3f7ab15073b981125c641929b0b6aadc6e5f52235d08b565e054971eb76d7c27aa1ab34ba93802dce93294495d263204474fd2ab57d72a6f0c11b49f064f1181 WHIRLPOOL ca924d59c419a754c1e7a9dfc6f2cec139360ffb4efb248219a892c33be36301d5c3ce921755ffb5ba59e4405437048b5bd1a99584ad776ad0adb00a1782f652
EBUILD mesa-7.10.3.ebuild 9833 SHA256 8d0fcf291314e22dfcc1e4a913320d67390920fae9dcbb1cc664989e8ae80fcd SHA512 71b145c6725f4ccf2ab7f99b45ec366c56fa9d3d0f602525cc95ad47f616563fbb6f8ff499408c6b0352b92b92413e130165fbddc64f4e09a3de3ce854533fc4 WHIRLPOOL 0084102900d7d9d4f2c206cb8f8c4087d0bfe974e60544b8afda1273a759d2a441ec8803f13fd0dc98a3bdef3cde69f11ef42128969e0fef4cc8c1257942765a
EBUILD mesa-7.11.2.ebuild 9993 SHA256 7b53334b0ce4ccd58e0a6cf64c1211f985321f0a7bc345a3fc5340738798a4aa SHA512 5f6dd871a7ff804ffc6da7b3f8d936595dfa7b1e9d0fe6ce728c8ebf90c4ad8f38231d7a565fa3fce8eeb855ee1bd53abec1e71a6ff0c9c7b5e38c11511d1445 WHIRLPOOL d1fabc18aa97e308058ca2878bdf591c241047ef3b89e145936c859b3524e96cee6077a96d2622bc1ed4ed698c9d0bc2c3e2dacd5bd8b3794bad35f1df387133
EBUILD mesa-8.0.4-r1.ebuild 10791 SHA256 99d033fcc41f3053bc46793022ba0f7a05b490ee813889022b202568937edff2 SHA512 b8f9b906827f3c66473feb90b3022c671b49783c411a23f61985e3361e9e8545397ba64b0e96cc0314d7f8a004aa31f7a23be57457908b9fb2774ad06e0ff1e3 WHIRLPOOL 12088fffae079e20c38881251f67948fec22d4dab2da46010d24f4b685fb14a783126bdcd1be977eb19a23e41225f897485d7e180a84a2b251b3882d0eb95a64
EBUILD mesa-9.0.3.ebuild 11113 SHA256 ef9c8cab66b5d57787ed19ccef7e945589a652abdc9eda54cadb41f1e8ab7ebc SHA512 e5d4261beaa7f93c7382b2eab572bda5424b02c2eadcfea5e81ca8a0439fbc40f76a7c3887a57b73249e2c6a8599a42f3a536485ec7ec2ec6d06d4d3cae2901a WHIRLPOOL 91734df6565e97391d86ff5122e33820b82ae74ca8a7ff4c83b825a568ea87a79b1378d612b5f83a40abb5f98f4d71a84718e114a5c5a9bca5aaf9c426a7fdd8
EBUILD mesa-9.1.6.ebuild 11043 SHA256 4e614a3bb2be81876d09618ed357ed36bde336b53e57794fa14c888990569b1d SHA512 d109bdc955ecc0e6357691c42be1bbde1cb3c2fb27b2a5b6c5013c5d54e587f5f9d486ed03dba1440346e4c4d3ed9366b7f5327754a497d4b2cc25e0b7660e6a WHIRLPOOL b421eb3bbd229a23ae3853745f17116ed77a5cfbdb0dd0b252a664a20de002655dfea626a42f10933eb14b9538f6562ce5b1deb74af3156b2df4510aeba41211
EBUILD mesa-9.2.5-r1.ebuild 13934 SHA256 f23057faf60d26d7234eb79448efa568700418cbe27abf5dad12ae2e5b6df3fc SHA512 7bc40298c615f01aff79a5fa3f6a285f7e2359ea85c83be98f28cd587eea8026f7e9dbe37cc0176252a07606a682e1be59be91fe8e97c4872ca2bbeb8ef825c0 WHIRLPOOL 01b1f5938ced676b7b0ded85aa14d9ceeb844e3587c5ed527d67f1f40f3b47feaad49137209b21d9388d1209d407ff139d49c814bb5d2d8b41bcd1ab430a7a7d
-MISC ChangeLog 96247 SHA256 a573d0ad1ac4fca8c02a9b3d733d7e801f9feeee1194459146e83a8aaadf2f4f SHA512 cd3d2f740f2dabeac8b4ffdce9d75ce9bfea9cb414d50dfd568831e640728b82d010e08fdd7fcc67df7f546745114a1fe2796b4bc80e5abd208452cd08393687 WHIRLPOOL ad39c21b3cedc9dc4a5a108a956402c5d8ad0c867d8c506702b840f7eddc5c2e06b8f4a0730fab16abdaea5c68428235e715ea17505bac85b4ef49968cd08ee0
-MISC metadata.xml 2288 SHA256 ae8d2bd2670f9d5409d42b364f56e30a676419ae934fe5c7f7abe8608f95e2ac SHA512 79eeb3773c6f3632f896f31d2266b59e958310a436610fc7676e10465fcbcf205d2dfbe3b31554c92af6a28bf4a59a571ff7104084cb1cb44e33e4cbdc5eed99 WHIRLPOOL a12aa115cc8fa5330070bb4a62ec57d886cfde8d33d23deac5c63b8fb6db40c6dd71c9bab60b2aca2d30e0a2085aac4a0c25b1248dd2289b745c828c78b5b19d
+MISC ChangeLog 96429 SHA256 0584a05ebe43e3b2bd6c499569a8eee778ae0acefff475dbbe0f07f6a2e3f3c5 SHA512 0dde29c11a216f5b535e5827f940f8571bbed63c05ed6956220f621116d5563756646fb87c1db9e2051a88fe13e1869f12f39d6fc4934c2d8d146c79c0d32d4c WHIRLPOOL 5a35457883d0598562aa9801131ca0588cfbe012c28f7709a94b01a498203ac1b3cd3c32236208582a844bf94af40bf66b4eb0bb7728921971e3621f6d982a93
+MISC metadata.xml 2404 SHA256 5f1078b6c20d702857df5c10bf06090287ea6778018c9a41a3e5c32609d320ae SHA512 2fb42a0145c765e26bae2b44c0e43641e7f6948a0b6e238827eb44e612521dfc5defaa2a0d5c9cd70f76512280fa9849ba71241f22b164be9858d7db0aff9007 WHIRLPOOL 4af80f8aada5bcbe5e7f0dbe94ec10b81c3b50a4cad87c932772f43bac76722c6d2d10dfd8e5323284b009369296372ef68028b64f3f8e7eb267c60479df6368
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2
+Version: GnuPG v2.0
-iEYEAREIAAYFAlTR4fcACgkQCaWpQKGI+9QvNwCfX4JhhW56b2iO+BTDTwgoeA8g
-rHYAn2yZEMc++TE5tGfxJSoAK51RHDYn
-=5tJA
+iQJ8BAEBCABmBQJU17TUXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
+ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ1RDFCODdDQUUxMkUwNkJCNjUyMDMxOEIy
+MzI0RTdCNTY2REYyNjExAAoJECMk57Vm3yYR578QAIU8x1P4oxx0f6wtbMP7nSqP
+RZXIgRFM0RJ7C+nflrTeaBK1UoKd+we5861ukYD6jxmyntxo0BowWx/rItRyfwBe
+hrjT3LqdHGkeZuvb6X3Sn1aP+qHOk6aM5i/DPGAbzK1Ql38DiyREEcDSJ5pMispJ
+0Uv35rMBcZCgXsmlLZSAU6p5ymBYE1cOOOTNsEAgkDrFMFkgDJMIJk8Jf12i/bRo
+nxB27HI9zj+nOctJIWoVgVHTdO95ncB1H/e0EWktNdEVnRcst2Kgz3caR2lAbXln
+AjOUC6kT2fxjwy2zfK1erWk7EeVkMprtxn10GKguPWv9Q61vLgNNv2wbCkAbHXPp
+srEZTCGPA3V+7vOVzDOSQxxGFsskO5CBKV11VLj4lLHlT+ZrrlJZmkNCnXc5dl5J
+RVe0rMM12onC9SnOw23tI5KwVBwNgOuC3RNzZUo3Z/1CPznidXaxiDp+mmWGxNWn
+6bxKpkn4XWSEHQviJOugE2j92RnIwdcaxjb1y+FvToawusmlvq4qBTPv5ghy3Ygr
+A51uAGIJsxSzU5jg5usnq01HrE1Nup6rM8WWiTnY8wC02V05fJel4i1404u7kMKD
+bIh/zH4t4GADd267a7wlIDRFhvqIUtu+C1hR5E/v9PDBcturAzy8y2q3K2x2lwFg
+RjxJZHpCdilLsQ3PQMcW
+=tCov
-----END PGP SIGNATURE-----
--- /dev/null
+# 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.4.4.ebuild,v 1.1 2015/02/08 19:11:00 chithanh 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=( python{2_6,2_7} )
+
+inherit base autotools multilib multilib-minimal flag-o-matic \
+ python-any-r1 toolchain-funcs pax-utils ${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="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 ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+
+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 r600-llvm-compiler selinux
+ +udev vaapi vdpau wayland xvmc xa kernel_FreeBSD"
+
+REQUIRED_USE="
+ d3d9? ( dri3 gallium )
+ llvm? ( gallium )
+ opencl? (
+ gallium
+ llvm
+ video_cards_r600? ( r600-llvm-compiler )
+ video_cards_radeon? ( r600-llvm-compiler )
+ video_cards_radeonsi? ( r600-llvm-compiler )
+ )
+ openmax? ( gallium )
+ gles1? ( egl )
+ gles2? ( egl )
+ r600-llvm-compiler? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi video_cards_radeon ) )
+ vaapi? ( gallium )
+ vdpau? ( gallium )
+ wayland? ( egl gbm )
+ xa? ( gallium )
+ video_cards_freedreno? ( gallium )
+ video_cards_intel? ( || ( classic gallium ) )
+ 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 )
+ video_cards_r600? ( gallium )
+ video_cards_radeonsi? ( gallium llvm )
+ video_cards_vmware? ( gallium )
+ ${PYTHON_REQUIRED_USE}
+"
+
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.56"
+# 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-admin/eselect-mesa )
+ gallium? ( app-admin/eselect-mesa )
+ >=app-admin/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}]
+ llvm? (
+ video_cards_radeonsi? ( || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ ) )
+ video_cards_r600? ( || (
+ >=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-admin/eselect-opencl
+ dev-libs/libclc
+ )
+ 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}
+ ${PYTHON_DEPS}
+ llvm? (
+ r600-llvm-compiler? ( sys-devel/llvm[video_cards_radeon] )
+ 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/bison
+ sys-devel/flex
+ 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}]
+"
+
+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*"
+
+# Think about: ggi, fbcon, no-X configs
+
+pkg_setup() {
+ # workaround toc-issue wrt #386545
+ use ppc64 && append-flags -mminimal-toc
+
+ # 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_unpack() {
+ default
+ [[ $PV = 9999* ]] && git-r3_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
+
+ # 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
+
+ base_src_prepare
+
+ eautoreconf
+ multilib_copy_sources
+}
+
+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 r600-llvm-compiler)
+ $(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-opencl-libdir="${EPREFIX}/usr/$(get_libdir)/OpenCL/vendors/mesa"
+ --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 \
+ --enable-dri \
+ --enable-glx \
+ --enable-shared-glapi \
+ $(use_enable !bindist texture-float) \
+ $(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
+
+ 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
+}
+
+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
+}