diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2021-10-19 21:54:48 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2021-10-22 17:38:48 +0000 |
commit | 5425bfb16f2f14ed7d3ffe138c5ee564b9e554bf (patch) | |
tree | 148a1871b67d76211cbd026a478f88faf1f4e63c | |
parent | 45bdca3c58cb45be1ae701d53b3dcb7d04df6f37 (diff) | |
download | ports-5425bfb16f2f14ed7d3ffe138c5ee564b9e554bf.tar.gz ports-5425bfb16f2f14ed7d3ffe138c5ee564b9e554bf.zip |
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
-rw-r--r-- | graphics/qt5-wayland/Makefile | 2 | ||||
-rw-r--r-- | graphics/qt5-wayland/files/patch-src_hardwareintegration_compositor_linux-dmabuf-unstable-v1_linuxdmabuf.h | 11 |
2 files changed, 12 insertions, 1 deletions
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) |