git: a3424a036570 - 2026Q1 - devel/qt5-buildtools: Hello 'L'-o
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 20 Jan 2026 13:02:58 UTC
The branch 2026Q1 has been updated by jhale:
URL: https://cgit.FreeBSD.org/ports/commit/?id=a3424a036570e7aae8c404676b3b4372eb3c934d
commit a3424a036570e7aae8c404676b3b4372eb3c934d
Author: Jason E. Hale <jhale@FreeBSD.org>
AuthorDate: 2026-01-20 12:49:37 +0000
Commit: Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2026-01-20 13:02:47 +0000
devel/qt5-buildtools: Hello 'L'-o
Add support for the 'L' integer suffix to moc.
This fixes a parsing bug that appeared in graphics/qt5-wayland after [1].
extensions/qwltexturesharingextension_p.h:145: Parse error at "DESIGNABLE"
Many thanks to kenrap and fuz for their help!
[1] https://cgit.freebsd.org/src/commit/?id=f441a225c4eb56deff1edc2402fe85a0ae263ebd
PR: 292531
Reported by: Kenneth Raplee <kenrap@kennethraplee.com>
MFH: 2026Q1
(cherry picked from commit 69d2fe9445a4fd125814f361facf325c23f9e8ed)
---
devel/qt5-buildtools/Makefile | 1 +
.../files/patch-src_tools_moc_preprocessor.cpp | 40 ++++++++++++++++++++++
2 files changed, 41 insertions(+)
diff --git a/devel/qt5-buildtools/Makefile b/devel/qt5-buildtools/Makefile
index e9264a322ef4..eb3b7049076b 100644
--- a/devel/qt5-buildtools/Makefile
+++ b/devel/qt5-buildtools/Makefile
@@ -1,5 +1,6 @@
PORTNAME= buildtools
PORTVERSION= ${QT5_VERSION}${QT5_KDE_PATCH}
+PORTREVISION= 1
CATEGORIES= devel
PKGNAMEPREFIX= qt5-
diff --git a/devel/qt5-buildtools/files/patch-src_tools_moc_preprocessor.cpp b/devel/qt5-buildtools/files/patch-src_tools_moc_preprocessor.cpp
new file mode 100644
index 000000000000..32d76d0333ae
--- /dev/null
+++ b/devel/qt5-buildtools/files/patch-src_tools_moc_preprocessor.cpp
@@ -0,0 +1,40 @@
+Backport of [1] to handle the 'L' integer suffix.
+
+[1] https://code.qt.io/cgit/qt/qtbase.git/commit/?id=f0039bd5170ad84d972a023316e8d153b89f841a
+
+--- src/tools/moc/preprocessor.cpp.orig 2025-11-01 21:43:44 UTC
++++ src/tools/moc/preprocessor.cpp
+@@ -247,7 +247,8 @@ Symbols Preprocessor::tokenize(const QByteArray& input
+ ++data;
+ while (is_hex_char(*data) || *data == '\'')
+ ++data;
+- }
++ } else if (*data == 'L')
++ ++data;
+ break;
+ }
+ token = FLOATING_LITERAL;
+@@ -424,7 +425,8 @@ Symbols Preprocessor::tokenize(const QByteArray& input
+ ++data;
+ while (is_hex_char(*data) || *data == '\'')
+ ++data;
+- }
++ } else if (*data == 'L')
++ ++data;
+ break;
+ }
+ token = PP_FLOATING_LITERAL;
+@@ -951,7 +953,12 @@ int PP_Expression::primary_expression()
+ test(PP_RPAREN);
+ } else {
+ next();
+- value = lexem().toInt(nullptr, 0);
++ const QByteArray &lex = lexem();
++ if (lex.endsWith('L')) {
++ value = lex.left(lex.size() - 1).toInt(nullptr, 0);
++ } else {
++ value = lex.toInt(nullptr, 0);
++ }
+ }
+ return value;
+ }