diff options
author | 2015-08-07 12:17:17 +0000 | |
---|---|---|
committer | 2015-08-07 12:17:17 +0000 | |
commit | 486fb1fc7b9fa14932dde4a05c8c5af53bdf48a0 (patch) | |
tree | befb03cda1176a468ef806e5867123b846fb719f /media-libs | |
parent | Version bump. Remove old. (diff) | |
download | historical-486fb1fc7b9fa14932dde4a05c8c5af53bdf48a0.tar.gz historical-486fb1fc7b9fa14932dde4a05c8c5af53bdf48a0.tar.bz2 historical-486fb1fc7b9fa14932dde4a05c8c5af53bdf48a0.zip |
Version bump.
Package-Manager: portage-2.2.20/cvs/Linux x86_64
Diffstat (limited to 'media-libs')
-rw-r--r-- | media-libs/mesa/ChangeLog | 7 | ||||
-rw-r--r-- | media-libs/mesa/Manifest | 4 | ||||
-rw-r--r-- | media-libs/mesa/mesa-10.6.3.ebuild | 455 |
3 files changed, 464 insertions, 2 deletions
diff --git a/media-libs/mesa/ChangeLog b/media-libs/mesa/ChangeLog index a441bb0d4cd1..9fe8158eef83 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.648 2015/07/13 13:37:16 mrueg Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.649 2015/08/07 12:17:14 mrueg Exp $ + +*mesa-10.6.3 (07 Aug 2015) + + 07 Aug 2015; Manuel Rüger <mrueg@gentoo.org> +mesa-10.6.3.ebuild: + Version bump. 13 Jul 2015; Manuel Rüger <mrueg@gentoo.org> mesa-10.6.2.ebuild: Drop unrecognized configure option. diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest index 9e49fcd1585c..e56668c52143 100644 --- a/media-libs/mesa/Manifest +++ b/media-libs/mesa/Manifest @@ -13,6 +13,7 @@ DIST MesaLib-7.10.3.tar.bz2 6056837 SHA256 1e701fc839b872677ddca9ed8784d754c9da1 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-10.6.2.tar.xz 7033344 SHA256 05753d3db4212900927b9894221a1669a10f56786e86a7e818b6e18a0817dca9 SHA512 feaca60b7cc8310a613bd89d0008fb7807de403ce6782e0e62e47ecba040d3728602778f47c704751cb49f8e2d950de03153b84b66d28203e29a70987b96340b WHIRLPOOL 8b148e7bb36fdcc7c25bb02561489b796f01f82bc74ce1d927987eeeaed5f602647d435c046142f5384aa4fb0369bb4a288281b51a03be712b4af8ed7111bf23 +DIST mesa-10.6.3.tar.xz 7036480 SHA256 58592e07c350cd2e8969b73fa83048c657a39fe2f13f3b88f5e5818fe2e4676d SHA512 4474e089c0b618d0b0469e31c213d84530f9dd22d4280612f34370578a7e7dfdfd1ac499feae470f032e462f5d7532aafa4416a7dd97d0cd6d9332aec5b44446 WHIRLPOOL 13f44d38e34b6b03919393918a65d2f47ef20de2b31a27ffb3b74c969414d40b01840652829a749924aa3ae548f2cf0abce8c830bcad6a4365ceedd4908e06cb 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 @@ -21,6 +22,7 @@ EBUILD mesa-10.4.6.ebuild 13529 SHA256 d20a50c4462486da75b13676598429922a656763c 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-10.6.2.ebuild 12524 SHA256 46f38f6e6d5aaf40e02dca977d611f2d9e862614e1bb86d11e4d750d83eff967 SHA512 7f9bf9c5c2c750f94f08bc26c908dc9b51c214b75f5fdc594917acdcfe6c51d31cd57046238614c9890cd97f2547b58730cc5f756994d1fdce40ca079f75332b WHIRLPOOL f21d49e58892f3fb8b023817aef397af97de8ad605edc8c9137eafe552034ba0d82fa58433ef01c7bbc5c47433a218773ef8ed3f7c52bc88909b82f467cfd852 +EBUILD mesa-10.6.3.ebuild 12524 SHA256 e2e2b9eafeb0df17cb28f9fb8737512b777e09986508813768db6de266a91934 SHA512 6a95c5e28d3005af1de1dbf9681bd073ab6af9f9c0edfbca023cfafe85d3581937754eaf0b5fa0c0f9529d8411465c15554539e7147d5a934bd147ae87ebb5d1 WHIRLPOOL 1571a9bc36e51c99d442c3ab0201d04de5b6080eb13371f36ce87d3af2033f303a516b99ecad74c426dcf693c2cc3edb79ef2bb31acec4657046a4f74e4fd18b EBUILD mesa-7.10.3.ebuild 9834 SHA256 2365eae41e795a722548fb4d8a6c72216b3d5a4b287014f8de5242a017ec5c2a SHA512 1cb57bf082d93bfd91bb0d68d7978c1339dd20477efe84e050fbf6c869313292819e158ae2620602d651023463f6cb9ab4ec40199732338a2c5168ef6e5281e4 WHIRLPOOL 329e68844422b3fc81485825067b916b6cec0b2723d87b4c7682bdecf25a51a466792f04fe0f72332767912714c9fac1fdfe284ae17b68add5019113be008681 -MISC ChangeLog 103663 SHA256 8603cf2d0e77603c9c28bfd443f212d2654b792b61cf7b17553a6de61a8b96c7 SHA512 5f2f9918820090bc29fff6f2a55c91fd62949f3614cc4aedaefed4ad4c08a278a14edf81b709bfcb641cbae57f322f85dfae52b5e509482269ac0a4cf39b4cf3 WHIRLPOOL fb8bd704422a24c2bcaf246aaca35967537107515d071e92eae6e5a592b2672d1edc89149b5e49f7bdb340cc168854529039c7b37cd905cba0ce60269a09256f +MISC ChangeLog 103777 SHA256 4b0a5d5630eac8d95c57f5bd440e8f743db364db91e3027efb52541230383724 SHA512 acea97a4adc6157a818db9afdcda514cf050cd85c5619531063c2acf74642f86c286b413976404c50d9af3cce6c4da2edea087c7a43ffec2516436a3f47d3e56 WHIRLPOOL 2c7a7b3baae65fcc0234689e1e9cc70cb89b80c96fc28eee359489c485bbe8f401605352b4f6dde3b5b58a3ae39cff8b6c81c6be5e5ee1f1d68aba8b91cbe226 MISC metadata.xml 1854 SHA256 b60b4d587e093ccf61c0d6840982145e406bb3f6f68bf208a9e08d0a98a960c8 SHA512 e9d40790143c9a4560b3287510e12578ddbeb17f9a22f72a60cabe0c2921f7019612d37fe32b95006f5508bc56565f438df3acca297762616e888e2b675f6bc7 WHIRLPOOL 6fb4932c93a021d6060f9aa0e1b0baf194083b9e0f981771557b2affd3639981df1495b56f160ac99e839059fb65ed18715c4a728919308733872f5d87806ea5 diff --git a/media-libs/mesa/mesa-10.6.3.ebuild b/media-libs/mesa/mesa-10.6.3.ebuild new file mode 100644 index 000000000000..89d0d5abaa4b --- /dev/null +++ b/media-libs/mesa/mesa-10.6.3.ebuild @@ -0,0 +1,455 @@ +# 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.3.ebuild,v 1.1 2015/08/07 12:17:14 mrueg 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 \ + $(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 +} |