From 14a675b1bed78ad3df654c57fbcc620d20289616 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Wed, 9 Sep 2015 02:37:08 +0300 Subject: sync with upstream --- media-libs/mesa/mesa-scm.ebuild | 136 +++++++++++++--------------------------- 1 file changed, 45 insertions(+), 91 deletions(-) (limited to 'media-libs/mesa/mesa-scm.ebuild') diff --git a/media-libs/mesa/mesa-scm.ebuild b/media-libs/mesa/mesa-scm.ebuild index 697ceb6..14915ca 100644 --- a/media-libs/mesa/mesa-scm.ebuild +++ b/media-libs/mesa/mesa-scm.ebuild @@ -6,6 +6,7 @@ EAPI=5 EGIT_REPO_URI="http://anongit.freedesktop.org/git/mesa/mesa" +EXPERIMENTAL="true" GIT_ECLASS="git-r3" EXPERIMENTAL="true" @@ -43,29 +44,23 @@ for card in ${VIDEO_CARDS}; do done IUSE="${IUSE_VIDEO_CARDS} - bindist +classic d3d debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm - +nptl opencl osmesa pax_kernel openmax pic r600-llvm-compiler selinux - vaapi vdpau wayland xvmc xa kernel_FreeBSD" + 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=" - d3d? ( gallium ) + d3d9? ( dri3 gallium ) llvm? ( gallium ) - opencl? ( - gallium - video_cards_r600? ( r600-llvm-compiler ) - video_cards_radeon? ( r600-llvm-compiler ) - video_cards_radeonsi? ( r600-llvm-compiler ) - ) + opencl? ( gallium llvm ) 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_intel? ( classic ) video_cards_i915? ( || ( classic gallium ) ) video_cards_i965? ( classic ) video_cards_ilo? ( gallium ) @@ -73,14 +68,14 @@ REQUIRED_USE=" video_cards_radeon? ( || ( classic gallium ) ) video_cards_r100? ( classic ) video_cards_r200? ( classic ) - video_cards_r300? ( gallium ) + 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.56" +LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.64" # keep correct libdrm and dri2proto dep # keep blocks in rdepend for binpkg RDEPEND=" @@ -89,7 +84,8 @@ RDEPEND=" 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.2.7 + >=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}] ) @@ -99,30 +95,31 @@ RDEPEND=" >=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? ( || ( - >=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}] + >=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}] ) + vdpau? ( >=x11-libs/libvdpau-1.1:=[${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}] @@ -138,16 +135,18 @@ for card in ${RADEON_CARDS}; do video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) " done +RDEPEND="${RDEPEND} + video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) +" 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.3-r3:=[${MULTILIB_USEDEP}] - >=sys-devel/clang-3.3:=[${MULTILIB_USEDEP}] + >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}] + >=sys-devel/clang-3.4.2:=[${MULTILIB_USEDEP}] >=sys-devel/gcc-4.6 ) sys-devel/bison @@ -159,7 +158,7 @@ DEPEND="${RDEPEND} >=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/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}] @@ -168,17 +167,18 @@ DEPEND="${RDEPEND} 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 +QA_WX_LOAD=" +x86? ( + !pic? ( + usr/lib*/libglapi.so.0.0.0 + usr/lib*/libGLESv1_CM.so.1.1.0 + usr/lib*/libGLESv2.so.2.0.0 + usr/lib*/libGL.so.1.2.0 + usr/lib*/libOSMesa.so.8.0.0 + ) +)" 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" @@ -195,25 +195,17 @@ src_unpack() { src_prepare() { - # 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 + # Configurable DRI drivers driver_enable swrast - # Intel code + # Intel code driver_enable video_cards_i915 i915 driver_enable video_cards_i965 i965 if ! use video_cards_i915 && \ @@ -239,15 +231,16 @@ multilib_src_configure() { if use gallium; then myconf+=" - $(use_enable d3d nine) + $(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) " + use vaapi && myconf+="--with-va-libdir=/usr/$(get_libdir)/va/drivers" + gallium_enable swrast gallium_enable video_cards_vmware svga gallium_enable video_cards_nouveau nouveau @@ -271,7 +264,6 @@ multilib_src_configure() { 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 @@ -284,7 +276,7 @@ multilib_src_configure() { " fi - # on abi_x86_32 hardened we need to have asm disable + # on abi_x86_32 hardened we need to have asm disable if [[ ${ABI} == x86* ]] && use pic; then myconf+=" --disable-asm" fi @@ -292,12 +284,14 @@ multilib_src_configure() { # build fails with BSD indent, bug #428112 use userland_GNU || export INDENT=cat + ECONF_SOURCE="${S}" \ econf \ --enable-dri \ --enable-glx \ --enable-shared-glapi \ + --disable-shader-cache \ $(use_enable !bindist texture-float) \ - $(use_enable d3d nine) \ + $(use_enable d3d9 nine) \ $(use_enable debug) \ $(use_enable dri3) \ $(use_enable egl) \ @@ -306,6 +300,7 @@ multilib_src_configure() { $(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} \ @@ -316,32 +311,6 @@ multilib_src_configure() { 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 ) @@ -424,13 +393,6 @@ pkg_postinst() { 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 @@ -456,15 +418,7 @@ pkg_postinst() { 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 + 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." -- cgit v1.2.3