Add ebuild which works with old eselect-opengl for stabilization in bug #530652.
authorChí-Thanh Christopher Nguyễn <chithanh@gentoo.org>
Sun, 8 Feb 2015 20:07:18 +0000 (20:07 +0000)
committerChí-Thanh Christopher Nguyễn <chithanh@gentoo.org>
Sun, 8 Feb 2015 20:07:18 +0000 (20:07 +0000)
Package-Manager: portage-2.2.14/cvs/Linux x86_64
Manifest-Sign-Key: 0x2324E7B566DF2611!

media-libs/mesa/ChangeLog
media-libs/mesa/Manifest
media-libs/mesa/mesa-10.3.7-r1.ebuild [new file with mode: 0644]
media-libs/mesa/mesa-10.3.7-r2.ebuild [moved from media-libs/mesa/mesa-10.3.7.ebuild with 99% similarity]

index a9171990133f03a669724d06dec07c2a4fe80ccb..2ae983c7fbc9e0e5e2acdaa63f2eb3d842d9f224 100644 (file)
@@ -1,6 +1,14 @@
 # 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.601 2015/02/08 19:11:00 chithanh Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.602 2015/02/08 20:07:10 chithanh Exp $
+
+*mesa-10.3.7-r1 (08 Feb 2015)
+*mesa-10.3.7-r2 (08 Feb 2015)
+
+  08 Feb 2015; Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org>
+  +mesa-10.3.7-r1.ebuild, +mesa-10.3.7-r2.ebuild, -mesa-10.3.7.ebuild:
+  Add ebuild which works with old eselect-opengl for stabilization in bug
+  #530652.
 
 *mesa-10.4.4 (08 Feb 2015)
 
index de90187ded0cc29d3ffaeac7b151558ec7144f5f..7ca280ed051d1d1b5fb83127ea557385f24f233c 100644 (file)
@@ -35,7 +35,8 @@ EBUILD mesa-10.0.4.ebuild 13849 SHA256 96e8e9dd3ddfe7ae94502450403b4b88cfa930413
 EBUILD mesa-10.1.6.ebuild 14178 SHA256 99135f36e638ba4de4a87244aec595b11f89b604ad7bbe97518792285dba00f6 SHA512 5bc42321c84e894aad577cecdb1f4b968d9c9574f22572684bbdaa3bbbfec80c11e54535e9b9a0be16aea2d3821cb2c3978c6e968c14aa0f16709b2158a23375 WHIRLPOOL 2eb210ef81a2febecf9acde688963d8931d1c0760eb61a7f43755dda41721155a76ccaac01707a690c55e3dfd633491e7ef9cfb825879e571a0c3abffc3e5991
 EBUILD mesa-10.2.8.ebuild 14929 SHA256 39c3a20ee5f613d4ef1d6d090ea78b60675379e81ae004e93a8b49bd56478dd8 SHA512 d5dc7353ee943552057d854b0facf789e26e664c1ff4be91996adfba8320deb8531c2261d443012ad07b05120c10088ee41bad57b777f44303de2279b3245bd9 WHIRLPOOL 38b9c32b7bc56d4923e9b6ceae6bfdeafaf945cff9c11465a3d4732985132bc333eed0c4982c571fc2b91acbf50eef1e9d496df71dd43c1ce280d19f359a6b01
 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.3.7-r1.ebuild 14960 SHA256 1d33cd364e996865ad787a2f7f8958fe6b3ff42fe81e0b04401e1f4a35fd7fdf SHA512 99facb07e9ad51eb3cb0faceb767ca68240255181dc4c93d04ea3e98dbcdbe2472ed70c849eec5855d109be19cb43127fbb5396a026b1264ed1d60c0742e7dcb WHIRLPOOL dc5165416803a18256923ce3040eadaccbcec774e7248f29c4c2e09684bf5274c0737d64b694c12c367a1d1abb2956b6bf6242cd4fd4aeefa0b0cf05eaf8217a
+EBUILD mesa-10.3.7-r2.ebuild 13834 SHA256 f7a4c4072d6c1a3e943c7ad9807f4236917c4fc2cab00db941db5fe191890ada SHA512 95cacef6c9489539ae1f5d66e26bc28266aa9492048cf1fb83904b67d1b8b70432bc48cb617a43bd207f574b6ee6e661422b14dcdafa6cb9a6fb9f016f9747f3 WHIRLPOOL aaad9e947a7c86d6f0c43e9531a2bda8f102de08cccf49d6a6b03fedabc0f5ac5eba75dddf61f26dbc6bb865599e41d7b0bdc3042b99699b7f370a639e575371
 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
@@ -44,24 +45,24 @@ EBUILD mesa-8.0.4-r1.ebuild 10791 SHA256 99d033fcc41f3053bc46793022ba0f7a05b490e
 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 96429 SHA256 0584a05ebe43e3b2bd6c499569a8eee778ae0acefff475dbbe0f07f6a2e3f3c5 SHA512 0dde29c11a216f5b535e5827f940f8571bbed63c05ed6956220f621116d5563756646fb87c1db9e2051a88fe13e1869f12f39d6fc4934c2d8d146c79c0d32d4c WHIRLPOOL 5a35457883d0598562aa9801131ca0588cfbe012c28f7709a94b01a498203ac1b3cd3c32236208582a844bf94af40bf66b4eb0bb7728921971e3621f6d982a93
+MISC ChangeLog 96716 SHA256 aca83e1543763e772a3801676f0d5038e32b33a82a0361ac9eb475471649f465 SHA512 e49f0f61715b151ca26886d38ca676aa04f8662c3b7d19e7379dcb469bf2849609acec85bdb0627364140510dd1b14361047e7d80ba79603b395eb7706a88b68 WHIRLPOOL eb0eecb07ed360ec67cbd791882a53c4a34855eb5421ff84d3a376fd21e0674be057adb35fe2966ca0f05ab3497f0ce6c26ab5aabbcd87a335aba4cda3f5f1d2
 MISC metadata.xml 2404 SHA256 5f1078b6c20d702857df5c10bf06090287ea6778018c9a41a3e5c32609d320ae SHA512 2fb42a0145c765e26bae2b44c0e43641e7f6948a0b6e238827eb44e612521dfc5defaa2a0d5c9cd70f76512280fa9849ba71241f22b164be9858d7db0aff9007 WHIRLPOOL 4af80f8aada5bcbe5e7f0dbe94ec10b81c3b50a4cad87c932772f43bac76722c6d2d10dfd8e5323284b009369296372ef68028b64f3f8e7eb267c60479df6368
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0
 
-iQJ8BAEBCABmBQJU17TUXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
+iQJ8BAEBCABmBQJU18H9XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
 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
+MzI0RTdCNTY2REYyNjExAAoJECMk57Vm3yYRvN0P/1olgqYEQSv64F9usblpFd4r
+yXD5O4FlfHQCfGaqOakFQTyRQrmdpzMTMEDLAemO6yQug/aCmlcl364A9cIcxz5H
+HIRO5FzfVQEMGZVZfKfEXfBzk42op2SeeyI5uf2WhbgwDwlDyGIhtVZSxo5KrBvv
+GtYGtdHBR4SU1vKAJBMjugUBKTLXLY55maKx1EgZqN2RCWogfSGAU0BkCOXeYuKH
+ix0FwiskUB/9gn/Q7Q1UT9kqhkZfAnjItr4jFNrUaXeHCw3y0jcgzNPtETV0xKSX
+seCaYGPs33M+/lcKvYBH7tkLJjkE5lm2i6kkgqVnRubeMiYWcv5y7EWsX0QuVTKW
+O0c+DE4A5NO9TXKqeYD1Mey0V6O+FqgqaRXsJwOwiFMHC2fnyqkZndmA3QBsIZpN
+lI0WUDSkkmbfR+bNGtF5irhdKgoRgdwrTB9sMgtmjRrvOFmqwSEZO3SAr2AgNy9O
+Lj1sKHMLIkipV873Tu2DqteOF56+U4WWjxH3xALll/Ae+sr3CsV51KpQf5y0FwwI
+tbd9fBoKj7/PB8ufBkj8W+npHaUi34crP0V03yu7Qt9bcMaTvBLFUyzS37edYzqE
+QxJjHjSLYrBk13M8jTBYro1Dua2RDU0mdiNEArNb/BF6nuwL789tpwo/wOCajdVG
+URDtKoaHN+Okoe31UgUm
+=5P2U
 -----END PGP SIGNATURE-----
diff --git a/media-libs/mesa/mesa-10.3.7-r1.ebuild b/media-libs/mesa/mesa-10.3.7-r1.ebuild
new file mode 100644 (file)
index 0000000..21ffe3b
--- /dev/null
@@ -0,0 +1,534 @@
+# 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.3.7-r1.ebuild,v 1.1 2015/02/08 20:07:10 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/.0/}"
+
+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 ~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 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm +nptl
+       opencl openvg osmesa pax_kernel openmax pic r600-llvm-compiler selinux
+       +udev vdpau wayland xvmc xa kernel_FreeBSD kernel_linux"
+
+REQUIRED_USE="
+       llvm?   ( gallium )
+       openvg? ( egl 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 ) )
+       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.2.7
+       udev? ( kernel_linux? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) )
+       >=dev-libs/expat-2.1.0-r3:=[${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.3-r3:=[${MULTILIB_USEDEP}]
+               video_cards_radeonsi? ( >=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}] )
+       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.16-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*/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
+
+       # 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
+
+       epatch "${FILESDIR}"/${PN}-10.3.7-dont-use-clrsb.patch
+
+       # relax the requirement that r300 must have llvm, bug 380303
+       epatch "${FILESDIR}"/${PN}-10.2-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
+
+       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 llvm gallium-llvm)
+                       $(use_enable openvg)
+                       $(use_enable openvg gallium-egl)
+                       $(use_enable openmax omx)
+                       $(use_enable r600-llvm-compiler)
+                       $(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}"
+
+       # 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 "$(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}
+
+       # 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
+
+       # 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
+}
similarity index 99%
rename from media-libs/mesa/mesa-10.3.7.ebuild
rename to media-libs/mesa/mesa-10.3.7-r2.ebuild
index 4be7f89c7668560934a55e1082ad7554175f8e7b..b485a1033f69d343ac6b8eca86a06be52dad16af 100644 (file)
@@ -1,6 +1,6 @@
 # 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.3.7.ebuild,v 1.2 2015/02/03 21:43:26 mattst88 Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/mesa-10.3.7-r2.ebuild,v 1.1 2015/02/08 20:07:10 chithanh Exp $
 
 EAPI=5