Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Oct 2021 17:40:52 GMT
From:      Dimitry Andric <dim@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 5425bfb16f2f - main - graphics/qt5-wayland: fix build with clang 13 by adding <array>
Message-ID:  <202110221740.19MHeqGk047661@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dim (src committer):

URL: https://cgit.FreeBSD.org/ports/commit/?id=5425bfb16f2f14ed7d3ffe138c5ee564b9e554bf

commit 5425bfb16f2f14ed7d3ffe138c5ee564b9e554bf
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2021-10-19 21:54:48 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2021-10-22 17:38:48 +0000

    graphics/qt5-wayland: fix build with clang 13 by adding <array>
    
    During an exp-run for llvm 13 (see bug 258209), it turned out that
    graphics/qt5-wayland fails to build with clang 13:
    
    In file included from main.cpp:32:
    In file included from ../../../../hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.h:33:
    ../../../../hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabuf.h:145:40: error: implicit instantiation of undefined template 'std::array<Plane, 4>'
        std::array<Plane, MaxDmabufPlanes> m_planes;
                                           ^
    /usr/include/c++/v1/__tuple:219:64: note: template is declared here
    template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
                                                                   ^
    In file included from main.cpp:32:
    In file included from ../../../../hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.h:33:
    ../../../../hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabuf.h:148:46: error: implicit instantiation of undefined template 'std::array<void *, 4>'
        std::array<EGLImageKHR, MaxDmabufPlanes> m_eglImages = { {EGL_NO_IMAGE_KHR, EGL_NO_IMAGE_KHR, EGL_NO_IMAGE_KHR, EGL_NO_IMAGE_KHR} };
                                                 ^
    /usr/include/c++/v1/__tuple:219:64: note: template is declared here
    template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
                                                                   ^
    In file included from main.cpp:32:
    In file included from ../../../../hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.h:33:
    ../../../../hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabuf.h:149:51: error: implicit instantiation of undefined template 'std::array<QOpenGLTexture *, 4>'
        std::array<QOpenGLTexture *, MaxDmabufPlanes> m_textures = { {nullptr, nullptr, nullptr, nullptr} };
                                                      ^
    /usr/include/c++/v1/__tuple:219:64: note: template is declared here
    template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
                                                                   ^
    3 errors generated.
    
    This is because linuxdmabuf.h doesn't include the <array> header. Fix it
    by adding the include.
    
    PR:             259288
    Approved by:    tcberner (maintainer)
    MFH:            2021Q4
---
 graphics/qt5-wayland/Makefile                                 |  2 +-
 ...egration_compositor_linux-dmabuf-unstable-v1_linuxdmabuf.h | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/graphics/qt5-wayland/Makefile b/graphics/qt5-wayland/Makefile
index fb2ae1578b82..7ee0e16dc648 100644
--- a/graphics/qt5-wayland/Makefile
+++ b/graphics/qt5-wayland/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	wayland
 DISTVERSION=	${QT5_VERSION}
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	graphics
 PKGNAMEPREFIX=	qt5-
 
diff --git a/graphics/qt5-wayland/files/patch-src_hardwareintegration_compositor_linux-dmabuf-unstable-v1_linuxdmabuf.h b/graphics/qt5-wayland/files/patch-src_hardwareintegration_compositor_linux-dmabuf-unstable-v1_linuxdmabuf.h
new file mode 100644
index 000000000000..eae8123a0da4
--- /dev/null
+++ b/graphics/qt5-wayland/files/patch-src_hardwareintegration_compositor_linux-dmabuf-unstable-v1_linuxdmabuf.h
@@ -0,0 +1,11 @@
+--- src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabuf.h.orig	2020-10-27 08:02:11 UTC
++++ src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabuf.h
+@@ -44,6 +44,8 @@
+ #include <EGL/egl.h>
+ #include <EGL/eglext.h>
+ 
++#include <array>
++
+ // compatibility with libdrm <= 2.4.74
+ #ifndef DRM_FORMAT_RESERVED
+ #define DRM_FORMAT_RESERVED           ((1ULL << 56) - 1)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202110221740.19MHeqGk047661>