diff options
Diffstat (limited to 'media-libs/mesa')
-rw-r--r-- | media-libs/mesa/ChangeLog | 8 | ||||
-rw-r--r-- | media-libs/mesa/Manifest | 25 | ||||
-rw-r--r-- | media-libs/mesa/mesa-9.2.5.ebuild | 479 |
3 files changed, 490 insertions, 22 deletions
diff --git a/media-libs/mesa/ChangeLog b/media-libs/mesa/ChangeLog index 46a8b8c15c54..21df8b8ddb2a 100644 --- a/media-libs/mesa/ChangeLog +++ b/media-libs/mesa/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for media-libs/mesa # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.523 2013/12/13 07:27:56 mattst88 Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.524 2013/12/16 22:06:52 chithanh Exp $ + +*mesa-9.2.5 (16 Dec 2013) + + 16 Dec 2013; Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> + +mesa-9.2.5.ebuild: + Version bump. *mesa-10.0.1 (13 Dec 2013) diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest index 71821b97899e..07aaea3fc2ce 100644 --- a/media-libs/mesa/Manifest +++ b/media-libs/mesa/Manifest @@ -1,6 +1,3 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 - AUX eselect-mesa.conf.7.10 1670 SHA256 3ff15cedc353feeb2da450533c2ea2efc33ed1c8434a7b3037999c4965907149 SHA512 c62679e2427b6e922a7c04dec7afe1eddb4f8ba255735479338ebaf6da7db4ad7c6c916a3cf62da8bf8d2c0ceb60b6d591f8e878d4add9b7f63ff8121bb610a2 WHIRLPOOL 5d3522f8715ab62c9a1b4a96031db63734a98bb9e8a1cc722d20e018e7eedb3ffac92bb7c727bff1f58e216476b0e20552373b8155a51954f3d9af704e830782 AUX eselect-mesa.conf.7.11 1670 SHA256 448d08e97e931563aa2e33f22feeaf911caf9a2eb9fd7b446485311d1dcc1225 SHA512 0a8178006f64d2f2d41f0f1ffbceab959ad66ac9142e2f74b593405041ade112b68fbabd54915c21dbf6bd7e3564499e6f76c348e8af632d751409b070420481 WHIRLPOOL 5df8041475f506ed544afb4b7ce94a31b4974c6cd26fd5054a6c29dda26cbec1694d60b68e975106d0797ff857764a39ec820da000e454be34181112b201ae36 AUX eselect-mesa.conf.8.0.1 1622 SHA256 a7a4306084885dc624304a8893ca4f5645f7f1fe31322f9fb663e5a103f69221 SHA512 58eacf1304ebaa0116ea3c53fafdddb8c94738e31daad8546ac33b46dc51b81a6bccb48c167afe792c7fd41ca5054d8e66123f524b0623ad3e603ed4872f9dc4 WHIRLPOOL 7af55e3cb9448f4b3b4c463443e078a5559588371767e10b5890918d84bfeb16797f11ffabf9aaa205db70c550c5dfc18fe709b3a2e00746d93d4bf4944124b1 @@ -20,10 +17,12 @@ DIST MesaLib-8.0.4.tar.bz2 5737052 SHA256 02ed19f4f5f6535dda03a9932a81438aa78ea7 DIST MesaLib-9.0.3.tar.bz2 6137208 SHA256 ea940005b2c379f83527b5ba6d7fb69c533c2c17b561dc3b8469237ac75606a5 SHA512 2685706670356ca82c36a9fc30bfdabe9429e37ba670ece4a44634222430f828dfd5f15b116d78e3a9a6c432cf6ee3cf3a44bd132f896b81cc0bf1e1076dfdc5 WHIRLPOOL e0e4d867de8bd8c97f25e10cd6aed6c5490224e25cc6413b0de0c7bfa4112e5f63d2aa135a3d3ea028257d1ad0340e1a69f38c270eb148ce68c8fb7cd4317f58 DIST MesaLib-9.1.6.tar.bz2 6134267 SHA256 e632dff0acafad0a59dc208d16dedb37f7bd58f94c5d58c4b51912e41d005e3d SHA512 b23d0cc3515b56636f73c4d3247212f8c731c967f5ecf8c247a3bd359038ed374c23eb1bb0da17a9152f8b8d984acd134fa9823d9349285287e58676419b4d40 WHIRLPOOL 4e3c07c893060f77cade242d904c1ec4c1c2982b6b3d9ff188b3d809ad8592408c34bd71276f0e8dfa38bce58a82e146b25064cfa50d3ce6d52a7b69a694690a DIST MesaLib-9.2.4.tar.bz2 6675532 SHA256 fdde10c3d17a1de1fa9afcf5dc40d72eef84d3ad77e7d631b8b442772957b937 SHA512 c250789ee15fc0c68370d532e19c2111179a7dffe9a8f9af1e4de7c8ee6ad0840266189d7dd701c1c23ce956884a862b8695a18c7ecf04472799de4ac9e591e4 WHIRLPOOL 7b379e9f449dedeff576b29cd54f6b5a50fd44b82c6542b68a9d923ddbe96ca58b4d3d8811af1e27975c82c4b57162784c54cd1029c799f8166bbe219afeefaa +DIST MesaLib-9.2.5.tar.bz2 6678076 SHA256 b46ab9efed176df0591993397594d712ada9da6a47fd31bbe75050fe28eb6bf0 SHA512 faf18507907344b1021d0ea183bab49b1aa805516a5c328349bdf36dc1f8fcae6b7f9a1de0cb736cd1c534d64b23e14c7b0c3f81a7a8431bf52ee9663ae46544 WHIRLPOOL f326ef4b0e6c04770b100f751d4953b4b6404ac802de6bd034685d953e858f2f3659c7f322d99cec0551c2e1562828daa6f3f24093fd4ebce2109aec0d90d789 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 DIST mesa-9.2-gentoo-patches-01.tar.xz 2260 SHA256 2caf9dd7d1c3b9869d8b90b56f5ec9c653a208f403abed706997e392cdcc26c7 SHA512 8182f258dbfb2e87db044abd86c9c7e57656eb08f320ec51f012689d88ffc321d27aee0efdd7d3b9c117d12c949f5560b53917835e0b8f4a610dacec6bd2c483 WHIRLPOOL b5953ac84760967ff81d87847898d9c74f3476baf0fe596951458983e7751e8ed75ce91e7f63c6536ce5baddbe1bdd239b1c112788890c1dcb25ca74ce909cb8 +DIST mesa-9.2-gentoo-patches-02.tar.xz 1992 SHA256 d707864f600a07682fc66cf571e65ca561c5894dbb58e58e245ebef00568e224 SHA512 11a4f8e61bd0d80cad46442b050d2448a32c8688b3e6de9995fb308be92ddac2af204db994dedbe9e23b5336c271656d5b2c351e2cf8c39f5ab8684862eec993 WHIRLPOOL a3105ccd508ea42b0535c40a6fc723536c54edde050d928a679c3079fb9e526bfbb4afe43b0ffd34686ca1acefa660c0e2a28c46bd5b6d80631baa65a2489fde EBUILD mesa-10.0.0.ebuild 12979 SHA256 88c59c86a5755046f58ac5e2e787634d8a2229d9a6702ddac5b9a79a05d15c16 SHA512 e6223f525075ca5b020d3fa0b38e3c010715af08c71e2a65867a3d4cd45885d6574f8bd646e7e11d3550c883e4749bb976bf19f2e8605d82b0e6ad74994f3696 WHIRLPOOL 7f1d1bacf013904768e15ae24dc31445a6542664683f9898e9f8d3c3bdd500292e085b0f8fe4a20f7b08f6fb42aefa57676421418d46b162617f1e1dc2016c34 EBUILD mesa-10.0.0_rc2.ebuild 12949 SHA256 0a4e53ba471fe6b7db5921892d03a54704080c9cc07279515d788219aa9e708c SHA512 bf518246521c3b0e05b58e1d575e845cdd5971458340bc6ee55596996854a6bd1e57d39c25159a42fa6eac726f1f6c78671cd8ca1a88d9599b3c8a06c45ee3e0 WHIRLPOOL c3cb99bfa1dd8a6ebb4394082389d35c00f8957933c390ab1f176052f40855b05768c57091ec0c8f0246945eae5532fa0e3457455124d126196c483dba7107d5 EBUILD mesa-10.0.1.ebuild 12975 SHA256 e35fb79f612b248ffdb79b86568884c43265a15d46270e3079b5e240afde9467 SHA512 465ad090823e52b956b9e2262bcb1f08bab26a2c25dd27136f98244d797ecd253e408bce96e40244ff4629fa478faba84e88f46dd9d48e8ae681b3ced721029e WHIRLPOOL 630f4fdd962d77a926b58eb4f6db41895bb8376292043922ca581e3bdcf936ebcbd6323f170b609e80560a5d402280814ea58d185643e5c0fdfe760f7b9a2ed9 @@ -33,22 +32,6 @@ EBUILD mesa-8.0.4-r1.ebuild 10856 SHA256 9f45044bd8c41dffa69a5eb6a5210d0e0f0c43c EBUILD mesa-9.0.3.ebuild 11097 SHA256 8afc359abc165f2f4d43148d06ed911eeabeee759b8b8dccd0adba01679f4bdc SHA512 31f88bc07fc48b0ee008284e1bcc997681882dffa0d28e11e03f741276dcb7e08da41b09841b1b97ce068ac01749181ec609cca6b3a5f8ccd11808727e6db14d WHIRLPOOL 5e604647c872abed31c2c813a4a4b3c374564cd9a8221244dbe08927c298ddc58627f51a475d393074d72e7c75e52a3fd89de58a1875bbe6a2c828a2f8f4fabe EBUILD mesa-9.1.6.ebuild 11006 SHA256 f72d642c545db28b187d76f4c3dbf1e446fcc9821d41b330902f2997943bf5ae SHA512 ed4fd2acee2ef58d2ea2a3c8120752d3d79a84016c7736b7773bc3af1b7388e7c65c256f5c7bf94440a49e0b645f891e582d7cbc610a8715fea584f8505d723b WHIRLPOOL faa911ea021dcbf53eea6ecac548810031ba10952e707dfdb1aa97067b4973f96472494e6a86b8d568e6b00e20f950e27466ec27afdd3c8bdd46581d42d9f724 EBUILD mesa-9.2.4.ebuild 12956 SHA256 fa55349672fc5b87f7d03a5d644907c81836a0b69260f993710fbe66e0fe84ad SHA512 a282bd6b53e2358d42a0c8053eaae5f30ff7f00f024fc6bd41b28c3890a195e1e4136674e96bf3e16ee1c9ed5a73493bfdbba3577634158561233a4be9c6c5ee WHIRLPOOL a1f85a4cdc4a2232965901fbb25ae5c406a75626f4dc0fdaa4b1800de77c6aba8a30252ee86fc4d5f209577dd383d7c7f6d08991e6c27d853d5bc8280b2fdffc -MISC ChangeLog 84391 SHA256 326b8b8a187c4019b73032bc3ea65131c9328aae560d38ea07c6cf603d74956c SHA512 27539f7365b6ae0f5549d9bc76cdc05aec5c3f706b6f4aba61b2e5f1f2ef9ec12e696f54e4eb2d3a5987b6d1ee2d0fdeb29aa0e8d1434ab80087a4caf4f58350 WHIRLPOOL 23a5c038f6c4ab5722aae5ce9d2fa2cec9452b0a980dfb46560716bcf771ff6f979e2e7aadc3f48cbecda14da7a655c39761d09b9b2b2099ffc8743d9165401d +EBUILD mesa-9.2.5.ebuild 12956 SHA256 a3aa0c6dc2022f3b8183c2ed824b2ba4303d4c18721807f55dde51cf5578158c SHA512 5c76fed87834c09c1f1d034dbc1eff66a719a968132715a75b58ecd19759f87d8c5b87a06ff6eb64c7cc47cb0b019cf532b52417d86e10f86089ded930207206 WHIRLPOOL 5d2c0aa2da0e9c88b522a8f433cd3300a47621c58c1ac74e703f023de919a704ba89627096180e55c52a93406719944448dcf14017916ab51f643396c1632e17 +MISC ChangeLog 84526 SHA256 ce4194b1a28b6c2fd15a8dd682ae3599637d852449a0f05873d0946ebda817f1 SHA512 451b4d267de634973b008e2ab4129837bcbb360460870b331d0b23cb1ad8b4764b0fa5e6fc9dea91b020e88df1381a7d5dd51138164e56fc84ad889fefee4afe WHIRLPOOL aeea94a64f16c8964eb6072a8be18e3b0828b0ba555682c2778ffa4ec965da4d0a76a448cf5e568d3fb5f1eb0d1998b39d2d2e5bec9f6254069be3b05337a07d MISC metadata.xml 2149 SHA256 579a58d3fe0f64b315090dddbcf027041e5b2d2b8249e088213c7ed8a4417f61 SHA512 51e06e966e10ae0121cc490d293ae6cbb27282c538159f71e9c004236edf73ecc138991297f579937f46b08226d6d101ae5892dddb12196bad838a0ba4770831 WHIRLPOOL cadb35665914c8ce925baae33d276600c9e6328703c15d32652d5687ab7b937094ad15a44cf7c052b9595cf0dc97d6c62edbc575d8d2ec85a2d01b7e906303ae ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.20 (GNU/Linux) - -iQIcBAEBCAAGBQJSqrcEAAoJEA/daC2XTKcqO3oP/0wPpo6QhCuPFiu9IapRvFEe -vMhXBZszR3QhDldxmlhSKy31QzxgGvBTzEM+F2zdku4XjukDkDDmLaWvkDWjM412 -cgvIhtieSPW38xORfTrFJnKYLvByAcrF+BxvLYAIInzHDb7CIZ6rYlGz9hvKdS5J -QeOjei7WCVfRdNDX0MyxZFFv/rQNSx4SP0okzmVk3iCVxU+NnqSAQ/RZQNLze3Dz -hHepdqTyzLJVoIuerloM/EmGLtQ6UffGAhRM2mGkEzq03+S29RgtTScGA7mxRV7z -5Sy1uuUfzMZYmkq7fhAG/Ow9gt33gP2OBOuZ1I/KHkWTaqLwu3LdrITirqm4NtjX -XSOPfeCvb58QinTIGqEFaElxX2C4IhJC9E6svgZvHdASY3MxKZCK3vI3xlWHk4aD -+gowP9um9SXDsfQK3++TmWRFpBNDWoAaS4NUhx6yA09j40rTnnxW4q8PY6kUQoBY -zGTff3dAEXaNwPHwvpLHGRNJgnEJolJP1ze/C/zDavZDeNVnx0lxop59nSwpm/zi -/MmPqjtTOn8PmmK4Zn7B0pzy1W/23zkyhNvjlL/j0/aWOuF5zegcvkyxnbRBceG1 -rk9Dzh+IfJLbDGwsipZPcvKLVWZfNP2rC92Ck95ly0K9gtgVZwfKYtV8IZqs/oGG -0A9fwEYVwd5TXM+nnecA -=IfjG ------END PGP SIGNATURE----- diff --git a/media-libs/mesa/mesa-9.2.5.ebuild b/media-libs/mesa/mesa-9.2.5.ebuild new file mode 100644 index 000000000000..6c9eefa0f693 --- /dev/null +++ b/media-libs/mesa/mesa-9.2.5.ebuild @@ -0,0 +1,479 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/mesa-9.2.5.ebuild,v 1.1 2013/12/16 22:06:52 chithanh Exp $ + +EAPI=5 + +EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa" + +if [[ ${PV} = 9999* ]]; then + GIT_ECLASS="git-2" + EXPERIMENTAL="true" +fi + +PYTHON_COMPAT=( python{2_6,2_7} ) + +inherit base autotools multilib multilib-minimal flag-o-matic \ + python-any-r1 toolchain-funcs ${GIT_ECLASS} + +OPENGL_DIR="xorg-x11" + +MY_PN="${PN/m/M}" +MY_P="${MY_PN}-${PV/_/-}" +MY_SRC_P="${MY_PN}Lib-${PV/_/-}" + +FOLDER="${PV/_rc*/}" + +DESCRIPTION="OpenGL-like graphic library for Linux" +HOMEPAGE="http://mesa3d.sourceforge.net/" + +SRC_PATCHES="mirror://gentoo/${PN}-9.2-gentoo-patches-02.tar.xz" +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 +egl +gallium gbm gles1 gles2 +llvm +nptl + llvm-shared-libs opencl openvg osmesa pax_kernel pic r600-llvm-compiler + selinux vdpau wayland xvmc xa xorg kernel_FreeBSD" + +REQUIRED_USE=" + llvm? ( gallium ) + openvg? ( egl gallium ) + opencl? ( + gallium + llvm-shared-libs + video_cards_r600? ( r600-llvm-compiler ) + video_cards_radeon? ( r600-llvm-compiler ) + video_cards_radeonsi? ( r600-llvm-compiler ) + ) + gles1? ( egl ) + gles2? ( egl ) + r600-llvm-compiler? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi video_cards_radeon ) ) + wayland? ( egl ) + xa? ( gallium ) + xorg? ( 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 ) +" + +LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.46" +# 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 + dev-libs/expat[${MULTILIB_USEDEP}] + gbm? ( virtual/udev[${MULTILIB_USEDEP}] ) + >=x11-libs/libX11-1.3.99.901[${MULTILIB_USEDEP}] + x11-libs/libXdamage[${MULTILIB_USEDEP}] + x11-libs/libXext[${MULTILIB_USEDEP}] + x11-libs/libXxf86vm[${MULTILIB_USEDEP}] + >=x11-libs/libxcb-1.8.1[${MULTILIB_USEDEP}] + opencl? ( + app-admin/eselect-opencl + dev-libs/libclc + ) + vdpau? ( >=x11-libs/libvdpau-0.4.1[${MULTILIB_USEDEP}] ) + wayland? ( >=dev-libs/wayland-1.0.3[${MULTILIB_USEDEP}] ) + xorg? ( + x11-base/xorg-server:= + x11-libs/libdrm[libkms] + ) + xvmc? ( >=x11-libs/libXvMC-1.0.6[${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? ( + >=sys-devel/llvm-2.9[${MULTILIB_USEDEP}] + r600-llvm-compiler? ( sys-devel/llvm[video_cards_radeon] ) + video_cards_radeonsi? ( sys-devel/llvm[video_cards_radeon] ) + ) + opencl? ( + >=sys-devel/llvm-3.3-r1[video_cards_radeon,${MULTILIB_USEDEP}] + >=sys-devel/clang-3.3[${MULTILIB_USEDEP}] + >=sys-devel/gcc-4.6 + ) + sys-devel/bison + sys-devel/flex + virtual/pkgconfig + >=x11-proto/dri2proto-2.6[${MULTILIB_USEDEP}] + >=x11-proto/glproto-1.4.15-r1[${MULTILIB_USEDEP}] + >=x11-proto/xextproto-7.0.99.1[${MULTILIB_USEDEP}] + x11-proto/xf86driproto[${MULTILIB_USEDEP}] + x11-proto/xf86vidmodeproto[${MULTILIB_USEDEP}] + $(python_gen_any_dep 'dev-libs/libxml2[python,${PYTHON_USEDEP}]') +" + +python_check_deps() { + has_version "dev-libs/libxml2[python,${PYTHON_USEDEP}]" +} + +S="${WORKDIR}/${MY_P}" + +# It is slow without texrels, if someone wants slow +# mesa without texrels +pic use is worth the shot +QA_EXECSTACK="usr/lib*/opengl/xorg-x11/lib/libGL.so*" +QA_WX_LOAD="usr/lib*/opengl/xorg-x11/lib/libGL.so*" + +# Think about: ggi, fbcon, no-X configs + +pkg_setup() { + # workaround toc-issue wrt #386545 + use ppc64 && append-flags -mminimal-toc + + python-any-r1_pkg_setup +} + +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}-9.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") + $(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 + 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 + + # build fails with BSD indent, bug #428112 + use userland_GNU || export INDENT=cat + + if ! multilib_is_native_abi; then + myconf+="--disable-xorg + LLVM_CONFIG=${EPREFIX}/usr/bin/llvm-config.${ABI}" + fi + + econf \ + --enable-dri \ + --enable-glx \ + --enable-shared-glapi \ + $(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 xa) \ + $(use_enable xorg) \ + $(use_with 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}" + insinto "/usr/$(get_libdir)/dri/" + if [ -f "$(get_libdir)/${x}" ]; then + insopts -m0755 + doins "$(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 + 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 +} + +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 +} + +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 + + # 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 +} |