On Sun Nov 12, 2023 at 11:16:19AM +0100, Rafael Sadowski wrote:
> The following patches is necessary to build tdesktop with Qt 6.6.
> Otherwise we end with the following issue like FreeBSD:
> 
> usr/include/c++/v1/concept:318:1: error: Parse error at "::"
> 
> Patch form FreeBSD:
> https://cgit.freebsd.org/ports/commit/?id=5244b8425c414f0bca521df362eb62bb334640b3
> 
> OK?

ping, this is necessary for the Qt6 update.

> 
> diff --git a/devel/cmake/Makefile b/devel/cmake/Makefile
> index d87c0496312..87118d8541b 100644
> --- a/devel/cmake/Makefile
> +++ b/devel/cmake/Makefile
> @@ -6,6 +6,7 @@ VER =         3.27.7
>  EPOCH =              0
>  DISTNAME =   cmake-${VER}
>  CATEGORIES = devel
> +REVISION =   0
>  
>  HOMEPAGE =   https://www.cmake.org/
>  
> diff --git a/devel/cmake/patches/patch-Source_cmQtAutoGenInitializer_cxx 
> b/devel/cmake/patches/patch-Source_cmQtAutoGenInitializer_cxx
> new file mode 100644
> index 00000000000..e4bcfa8e752
> --- /dev/null
> +++ b/devel/cmake/patches/patch-Source_cmQtAutoGenInitializer_cxx
> @@ -0,0 +1,26 @@
> +CMake >= 3.27 exports the CXX std to moc. This is a workaround for
> +a moc parsing bug that happens parsing headers from libc++ < 14 when
> +the CXX std > 17.
> +
> +usr/include/c++/v1/concept:318:1: error: Parse error at "::"
> +
> +Moc should theoretically be able to parse this. [1] Not exactly sure
> +why it's failing. Upstream bug report [2]
> +
> +[1] 
> https://code.qt.io/cgit/qt/qtbase.git/tree/src/tools/moc/moc.cpp?h=6.6.0#n631
> +[2] https://bugreports.qt.io/browse/QTBUG-117765
> +
> +Index: Source/cmQtAutoGenInitializer.cxx
> +--- Source/cmQtAutoGenInitializer.cxx.orig
> ++++ Source/cmQtAutoGenInitializer.cxx
> +@@ -1797,6 +1797,10 @@ bool cmQtAutoGenInitializer::SetupWriteAutogenInfo()
> +       if (this->Moc.PredefsCmd.size() >= 3) {
> +         this->Moc.PredefsCmd.insert(this->Moc.PredefsCmd.begin() + 1,
> +                                     CompileOptionValue);
> ++#if (defined(__FreeBSD__) && __FreeBSD_version < 1302000) || 
> defined(__OpenBSD__)
> ++        this->Moc.PredefsCmd.insert(this->Moc.PredefsCmd.begin() + 1,
> ++                                    "-D_LIBCPP_HAS_NO_CONCEPTS");
> ++#endif
> +       }
> +     }
> +     info.SetArray("MOC_PREDEFS_CMD", this->Moc.PredefsCmd);
> 

Reply via email to