git: f9507e5bce20 - main - x11/nwg-launchers: unbreak build with Clang 13

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Wed, 10 Nov 2021 19:06:50 UTC
The branch main has been updated by jbeich:

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

commit f9507e5bce207f2d1054686b5f7f5ecde38733e5
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2021-11-10 14:36:55 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2021-11-10 19:06:02 +0000

    x11/nwg-launchers: unbreak build with Clang 13
    
    In file included from ../bar/bar.cc:12:
    ../common/nwg_classes.h:200:33: error: no viable constructor or deduction guide for deduction of template arguments of 'array'
        static constexpr std::array MAGIC { 'i', '3', '-', 'i', 'p', 'c' };
                                    ^
    /usr/include/c++/v1/__tuple:219:64: note: candidate function template not viable: requires 1 argument, but 6 were provided
    template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
                                                                   ^
    /usr/include/c++/v1/__tuple:219:64: note: candidate function template not viable: requires 0 arguments, but 6 were provided
    In file included from ../bar/bar.cc:12:
    ../common/nwg_classes.h:203:52: error: invalid operands to binary expression ('const auto' and 'unsigned long')
        static constexpr auto HEADER_SIZE = MAGIC_SIZE + 2 * sizeof(std::uint32_t);
                                            ~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
    ../common/nwg_classes.h:325:25: error: implicit instantiation of undefined template 'std::array<bool, 4>'
        std::array<bool, 4> edges{ 0, 0, 0, 0 };
                            ^
    /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 ../bar/bar.cc:12:
    ../common/nwg_classes.h:326:25: error: implicit instantiation of undefined template 'std::array<int, 4>'
        std::array<int,  4> margins{ 0, 0, 0, 0 };
                            ^
    /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 ../bar/bar.cc:12:
    ../common/nwg_classes.h:342:16: error: no viable constructor or deduction guide for deduction of template arguments of 'array'
        std::array edges_ {
                   ^
    /usr/include/c++/v1/__tuple:219:64: note: candidate function template not viable: requires 1 argument, but 4 were provided
    template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
                                                                   ^
    /usr/include/c++/v1/__tuple:219:64: note: candidate function template not viable: requires 0 arguments, but 4 were provided
    ../bar/bar.cc:106:9: error: cannot initialize object parameter of type 'CommonWindow' with an expression of type 'BarWindow'
            window.set_background_color(background_color);
            ^~~~~~
    ../bar/bar.cc:133:9: error: cannot initialize object parameter of type 'Gtk::Container' with an expression of type 'BarWindow'
            window.show_all_children();
            ^~~~~~
    ../bar/bar.cc:134:16: error: no matching member function for call to 'show'
            window.show(hint::Fullscreen);
            ~~~~~~~^~~~
    ../common/nwg_classes.h:364:22: note: candidate function template not viable: no known conversion from 'BarWindow' to 'PlatformWindow' for object argument
    void PlatformWindow::show(Hint h) {
                         ^
    ../bar/bar.cc:141:21: error: no matching member function for call to 'run'
            return app->run(window);
                   ~~~~~^~~
    /usr/local/include/gtkmm-3.0/gtkmm/application.h:480:7: note: candidate function not viable: no known conversion from 'BarWindow' to 'Gtk::Window &' for 1st argument
      int run(Window& window);
          ^
    /usr/local/include/gtkmm-3.0/gtkmm/application.h:496:7: note: candidate function not viable: requires 0 arguments, but 1 was provided
      int run();
          ^
    /usr/local/include/gtkmm-3.0/gtkmm/application.h:438:7: note: candidate function not viable: requires 2 arguments, but 1 was provided
      int run(int argc, char** argv);
          ^
    /usr/local/include/gtkmm-3.0/gtkmm/application.h:459:7: note: candidate function not viable: requires 3 arguments, but 1 was provided
      int run(Window& window, int argc, char** argv);
          ^
    
    Reported by:    antoine (via bug 258209 exp-run)
---
 x11/nwg-launchers/Makefile | 3 +++
 x11/nwg-launchers/distinfo | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/x11/nwg-launchers/Makefile b/x11/nwg-launchers/Makefile
index a4814d9d6e6d..cfcb2a7d03fe 100644
--- a/x11/nwg-launchers/Makefile
+++ b/x11/nwg-launchers/Makefile
@@ -3,6 +3,9 @@ DISTVERSIONPREFIX=	v
 DISTVERSION=	0.6.3
 CATEGORIES=	x11
 
+PATCH_SITES=	https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
+PATCHFILES+=	f123f433ad2d.patch:-p1 # https://github.com/nwg-piotr/nwg-launchers/pull/196
+
 MAINTAINER=	jbeich@FreeBSD.org
 COMMENT=	GTK-based launchers: application grid, button bar, dmenu for sway and other window managers
 
diff --git a/x11/nwg-launchers/distinfo b/x11/nwg-launchers/distinfo
index 26cc7c12ff52..2f8d49a7603a 100644
--- a/x11/nwg-launchers/distinfo
+++ b/x11/nwg-launchers/distinfo
@@ -1,3 +1,5 @@
 TIMESTAMP = 1632620334
 SHA256 (nwg-piotr-nwg-launchers-v0.6.3_GH0.tar.gz) = 8be219ef7e8aead08b46215c9c545b1bf9d108cefee580ffcf297553dee9dfaf
 SIZE (nwg-piotr-nwg-launchers-v0.6.3_GH0.tar.gz) = 64054
+SHA256 (f123f433ad2d.patch) = 76e1075f52e39cffca934393c5685b222d286879df995ad471740047a8cc04b5
+SIZE (f123f433ad2d.patch) = 1175