From 450f410688e70e8702b8a1e9bbcaf3f32a7639dd Mon Sep 17 00:00:00 2001 From: Emmanuel Vadot Date: Thu, 3 Dec 2020 20:55:32 +0000 Subject: [PATCH] mesa-*: Update to 20.2.3 - Fix mesa-gallium-va and mesa-gallium-vdpau for X11 usage - Add a patch so iris will be prefered for compatible intel GPUs (>=broadwell) PR: 250307 250325 --- graphics/libosmesa/Makefile | 1 - graphics/mesa-dri/Makefile | 7 ++--- graphics/mesa-dri/Makefile.common | 2 +- graphics/mesa-dri/distinfo | 6 ++-- .../files/patch-src_loader_meson.build | 11 +++++++ graphics/mesa-gallium-va/Makefile | 28 ++++++++++++------ graphics/mesa-gallium-va/pkg-plist | 20 +++++++++++++ graphics/mesa-gallium-vdpau/Makefile | 29 ++++++++++++------- graphics/mesa-gallium-vdpau/pkg-plist | 23 +++++++++++++++ graphics/mesa-gallium-xa/Makefile | 1 - graphics/mesa-libs/Makefile | 4 +-- lang/clover/Makefile | 1 - 12 files changed, 101 insertions(+), 32 deletions(-) create mode 100644 graphics/mesa-dri/files/patch-src_loader_meson.build diff --git a/graphics/libosmesa/Makefile b/graphics/libosmesa/Makefile index 6a30183352a8..bf34ae47b11b 100644 --- a/graphics/libosmesa/Makefile +++ b/graphics/libosmesa/Makefile @@ -3,7 +3,6 @@ PORTNAME= libosmesa PORTVERSION= ${MESAVERSION} -PORTREVISION= 2 CATEGORIES= graphics COMMENT= Off-Screen Mesa implementation of the OpenGL API diff --git a/graphics/mesa-dri/Makefile b/graphics/mesa-dri/Makefile index 63d6cc7da96d..57798fcf8358 100644 --- a/graphics/mesa-dri/Makefile +++ b/graphics/mesa-dri/Makefile @@ -3,7 +3,6 @@ PORTNAME= mesa-dri PORTVERSION= ${MESAVERSION} -PORTREVISION= 2 CATEGORIES= graphics COMMENT= OpenGL hardware acceleration drivers for DRI2+ @@ -71,9 +70,9 @@ MESA_PLATFORMS+= wayland .endif MESON_ARGS+= -Ddri-drivers="${DRI_DRIVERS:ts,:tl}" \ - -Dgallium-drivers="${GALLIUM_DRIVERS:ts,:tl}" \ - -Dvulkan-drivers="${VULKAN_DRIVERS:ts,:tl}" \ - -Dplatforms="${MESA_PLATFORMS:ts,:tl}" + -Dgallium-drivers="${GALLIUM_DRIVERS:ts,:tl}" \ + -Dvulkan-drivers="${VULKAN_DRIVERS:ts,:tl}" \ + -Dplatforms="${MESA_PLATFORMS:ts,:tl}" # Disable some options MESON_ARGS+= -Dgallium-xa=disabled \ diff --git a/graphics/mesa-dri/Makefile.common b/graphics/mesa-dri/Makefile.common index 95cb221eab5b..842368a0b02f 100644 --- a/graphics/mesa-dri/Makefile.common +++ b/graphics/mesa-dri/Makefile.common @@ -14,7 +14,7 @@ MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/} MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/} -MESABASEVERSION= 20.2.0 +MESABASEVERSION= 20.2.3 # if there is a subversion, don't include the '-' between 7.11-rc2. MESASUBVERSION= diff --git a/graphics/mesa-dri/distinfo b/graphics/mesa-dri/distinfo index cec66b1e922c..f93dd1c7b67b 100644 --- a/graphics/mesa-dri/distinfo +++ b/graphics/mesa-dri/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1601893546 -SHA256 (mesa-20.2.0.tar.xz) = 63f0359575d558ef98dd78adffc0df4c66b76964ebf603b778b7004964191d30 -SIZE (mesa-20.2.0.tar.xz) = 13675596 +TIMESTAMP = 1607017629 +SHA256 (mesa-20.2.3.tar.xz) = ae1b240e11531df528d14dc214d2dc4d2b4f2e835c6230ba0b492b171eceb82b +SIZE (mesa-20.2.3.tar.xz) = 13844212 diff --git a/graphics/mesa-dri/files/patch-src_loader_meson.build b/graphics/mesa-dri/files/patch-src_loader_meson.build new file mode 100644 index 000000000000..14ef872d46f4 --- /dev/null +++ b/graphics/mesa-dri/files/patch-src_loader_meson.build @@ -0,0 +1,11 @@ +--- src/loader/meson.build.orig 2020-12-03 18:59:28.209491000 +0100 ++++ src/loader/meson.build 2020-12-03 18:59:40.685431000 +0100 +@@ -41,7 +41,7 @@ + '-DDEFAULT_DRIVER_DIR="@0@"'.format(dri_search_path), + ] + +-if with_gallium_iris and get_option('prefer-iris') ++if get_option('prefer-iris') + loader_c_args += ['-DPREFER_IRIS'] + endif + diff --git a/graphics/mesa-gallium-va/Makefile b/graphics/mesa-gallium-va/Makefile index 421ebec15e4d..0b77d722c419 100644 --- a/graphics/mesa-gallium-va/Makefile +++ b/graphics/mesa-gallium-va/Makefile @@ -7,12 +7,14 @@ CATEGORIES= graphics COMMENT= Mesa Gallium VAAPI drivers -USES= xorg -USE_XORG= xcb xfixes xrandr - LIB_DEPENDS= libva.so:multimedia/libva \ libzstd.so:archivers/zstd -BUILD_DEPENDS= wayland-protocols>=1.8:graphics/wayland-protocols + +OPTIONS_DEFINE= X11 +OPTIONS_DEFAULT= X11 +X11_DESC= Enable X11 support +X11_USES= xorg +X11_USE= xorg=xorgproto,x11,xcb,xdamage,xext,xfixes,xshmfence,xxf86vm,xrandr .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" @@ -29,17 +31,25 @@ MESON_ARGS+= -Ddri-drivers="" \ -Dgallium-opencl=disabled \ -Dgallium-xvmc=disabled \ -Dgallium-nine=false \ - -Degl=disabled \ -Dgbm=disabled \ + -Dgles1=disabled \ -Dgles2=disabled \ + -Dosmesa=none \ -Dglx=disabled \ - -Dopengl=false \ - -Dshared-glapi=disabled \ - -Dosmesa=none + -Ddri3=disabled -LDFLAGS_i386= -Wl,-znotext +LDFLAGS_i386= -Wl,-znotext MESON_ARGS+= -Dgallium-va=enabled +.if ${PORT_OPTIONS:MX11} +MESON_ARGS+= -Dplatforms="x11" +.else +MESON_ARGS+= -Dglx=disabled \ + -Degl=disabled \ + -Dopengl=false \ + -Dshared-glapi=disabled +.endif + .include "${MASTERDIR}/Makefile.targets" .include diff --git a/graphics/mesa-gallium-va/pkg-plist b/graphics/mesa-gallium-va/pkg-plist index 42cca3a2808d..34763f0f943f 100644 --- a/graphics/mesa-gallium-va/pkg-plist +++ b/graphics/mesa-gallium-va/pkg-plist @@ -1,3 +1,23 @@ +@comment include/EGL/egl.h +@comment include/EGL/eglext.h +@comment include/EGL/eglextchromium.h +@comment include/EGL/eglmesaext.h +@comment include/EGL/eglplatform.h +@comment include/GL/gl.h +@comment include/GL/glcorearb.h +@comment include/GL/glext.h +@comment include/GL/internal/dri_interface.h +@comment include/KHR/khrplatform.h +@comment lib/dri/r600_dri.so lib/dri/r600_drv_video.so +@comment lib/dri/radeonsi_dri.so lib/dri/radeonsi_drv_video.so +@comment lib/libEGL.so +@comment lib/libEGL.so.1 +@comment lib/libEGL.so.1.0.0 +@comment lib/libglapi.so +@comment lib/libglapi.so.0 +@comment lib/libglapi.so.0.0.0 +@comment libdata/pkgconfig/dri.pc +@comment libdata/pkgconfig/egl.pc @comment share/drirc.d/00-mesa-defaults.conf diff --git a/graphics/mesa-gallium-vdpau/Makefile b/graphics/mesa-gallium-vdpau/Makefile index 661f78b22f1c..e713adb06690 100644 --- a/graphics/mesa-gallium-vdpau/Makefile +++ b/graphics/mesa-gallium-vdpau/Makefile @@ -2,18 +2,19 @@ PORTNAME= mesa-gallium-vdpau PORTVERSION= ${MESAVERSION} -PORTREVISION= 2 CATEGORIES= graphics COMMENT= Mesa Gallium VDPAU drivers -USES= xorg -USE_XORG= xcb xfixes xrandr - LIB_DEPENDS= libva.so:multimedia/libva \ libvdpau.so:multimedia/libvdpau \ libzstd.so:archivers/zstd -BUILD_DEPENDS= wayland-protocols>=1.8:graphics/wayland-protocols + +OPTIONS_DEFINE= X11 +OPTIONS_DEFAULT= X11 +X11_DESC= Enable X11 support +X11_USES= xorg +X11_USE= xorg=xorgproto,x11,xcb,xdamage,xext,xfixes,xshmfence,xxf86vm,xrandr .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" @@ -24,23 +25,31 @@ ONLY_FOR_ARCHS_REASON= Used only by amd/radeon hardware MESON_ARGS+= -Ddri-drivers="" \ -Dgallium-drivers="r300,r600,radeonsi" \ -Dvulkan-drivers="" \ - -Dgallium-va=disabled \ + -Dgallium-vdpau=disabled \ -Dgallium-omx=disabled \ -Dgallium-xa=disabled \ -Dgallium-opencl=disabled \ -Dgallium-xvmc=disabled \ -Dgallium-nine=false \ - -Degl=disabled \ -Dgbm=disabled \ + -Dgles1=disabled \ -Dgles2=disabled \ + -Dosmesa=none \ -Dglx=disabled \ - -Dopengl=false \ - -Dshared-glapi=disabled \ - -Dosmesa=none + -Ddri3=disabled LDFLAGS_i386= -Wl,-znotext MESON_ARGS+= -Dgallium-vdpau=enabled +.if ${PORT_OPTIONS:MX11} +MESON_ARGS+= -Dplatforms="x11" +.else +MESON_ARGS+= -Dglx=disabled \ + -Degl=disabled \ + -Dopengl=false \ + -Dshared-glapi=disabled +.endif + .include "${MASTERDIR}/Makefile.targets" .include diff --git a/graphics/mesa-gallium-vdpau/pkg-plist b/graphics/mesa-gallium-vdpau/pkg-plist index ed12f5810083..7b0d81e78957 100644 --- a/graphics/mesa-gallium-vdpau/pkg-plist +++ b/graphics/mesa-gallium-vdpau/pkg-plist @@ -1,3 +1,24 @@ +@comment include/EGL/egl.h +@comment include/EGL/eglext.h +@comment include/EGL/eglextchromium.h +@comment include/EGL/eglmesaext.h +@comment include/EGL/eglplatform.h +@comment include/GL/gl.h +@comment include/GL/glcorearb.h +@comment include/GL/glext.h +@comment include/GL/internal/dri_interface.h +@comment include/KHR/khrplatform.h +@comment lib/dri/r300_dri.so +@comment lib/dri/r600_dri.so +@comment lib/dri/r600_drv_video.so +@comment lib/dri/radeonsi_dri.so +@comment lib/dri/radeonsi_drv_video.so +@comment lib/libEGL.so +@comment lib/libEGL.so.1 +@comment lib/libEGL.so.1.0.0 +@comment lib/libglapi.so +@comment lib/libglapi.so.0 +@comment lib/libglapi.so.0.0.0 lib/vdpau/libvdpau_r300.so lib/vdpau/libvdpau_r300.so.1 lib/vdpau/libvdpau_r300.so.1.0 @@ -10,4 +31,6 @@ lib/vdpau/libvdpau_radeonsi.so lib/vdpau/libvdpau_radeonsi.so.1 lib/vdpau/libvdpau_radeonsi.so.1.0 lib/vdpau/libvdpau_radeonsi.so.1.0.0 +@comment libdata/pkgconfig/dri.pc +@comment libdata/pkgconfig/egl.pc @comment share/drirc.d/00-mesa-defaults.conf diff --git a/graphics/mesa-gallium-xa/Makefile b/graphics/mesa-gallium-xa/Makefile index a5c5445cb4f7..fc2c7d9f9051 100644 --- a/graphics/mesa-gallium-xa/Makefile +++ b/graphics/mesa-gallium-xa/Makefile @@ -3,7 +3,6 @@ PORTNAME= mesa-gallium-xa PORTVERSION= ${MESAVERSION} -PORTREVISION= 2 CATEGORIES= graphics COMMENT= Mesa Gallium XA state tracker diff --git a/graphics/mesa-libs/Makefile b/graphics/mesa-libs/Makefile index 802f484b5eb2..2c1f6f10a2c1 100644 --- a/graphics/mesa-libs/Makefile +++ b/graphics/mesa-libs/Makefile @@ -3,7 +3,6 @@ PORTNAME= mesa-libs PORTVERSION= ${MESAVERSION} -PORTREVISION= 2 CATEGORIES= graphics COMMENT= OpenGL libraries that support GLX and EGL clients @@ -44,7 +43,8 @@ MESON_ARGS+= -Dgallium-drivers="" \ -Dtools="" \ -Degl=enabled \ -Dgbm=enabled \ - -Dvulkan-drivers="" + -Dvulkan-drivers="" \ + -Dprefer-iris=true # Building EGL and GBM requires a dri driver so add swrast MESON_ARGS+= -Ddri-drivers="swrast" diff --git a/lang/clover/Makefile b/lang/clover/Makefile index 001bbdda7878..e00342dab1de 100644 --- a/lang/clover/Makefile +++ b/lang/clover/Makefile @@ -2,7 +2,6 @@ PORTNAME= clover PORTVERSION= ${MESAVERSION} -PORTREVISION= 1 CATEGORIES= lang COMMENT= Mesa OpenCL implementation for AMD GPUs