Date: Fri, 30 Aug 2024 19:37:48 GMT From: Dimitry Andric <dim@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org Subject: git: 117ed7e19830 - 2024Q3 - editors/le: fix build with recent libc++ headers Message-ID: <202408301937.47UJbmIG081226@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch 2024Q3 has been updated by dim: URL: https://cgit.FreeBSD.org/ports/commit/?id=117ed7e19830f213744750d5db48d45766f5c1a5 commit 117ed7e19830f213744750d5db48d45766f5c1a5 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2024-08-30 19:07:16 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2024-08-30 19:35:01 +0000 editors/le: fix build with recent libc++ headers As reported on the ports mailing lists, with recent libc++ headers on e.g. 15.0-CURRENT, 13.4 or 14.2, editors/le fails with errors similar to: /usr/include/c++/v1/ios:257:25: error: expected ')' 257 | static const fmtflags hex = 0x0008; | ^ ./edit.h:158:26: note: expanded from macro 'hex' 158 | #define hex (editmode==HEXM) | ^ /usr/include/c++/v1/ios:257:25: note: to match this '(' ./edit.h:158:17: note: expanded from macro 'hex' 158 | #define hex (editmode==HEXM) | ^ This is because edit.h defines a `hex` macro, and this clashes with std::hex from the libc++ headers. To fix the build, use post-patch to rename the `hex` macro to `is_hex`. PR: 281141 Reported by: J David <j.david.lists@gmail.com> Approved by: zi (maintainer) MFH: 2024Q3 (cherry picked from commit 1aa709605c874eb09ce84076367d86a02023ee2d) --- editors/le/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/editors/le/Makefile b/editors/le/Makefile index d3c803e84423..04108f14cffb 100644 --- a/editors/le/Makefile +++ b/editors/le/Makefile @@ -20,6 +20,11 @@ GNU_CONFIGURE_MANPREFIX= ${PREFIX}/share MAKE_JOBS_UNSAFE= yes +post-patch: + @${FIND} ${WRKSRC} -type f \( -name '*.[ch]' -o -name '*.cc' \) | \ + ${XARGS} ${GREP} -l '[[:<:]]hex[[:>:]]' | \ + ${XARGS} ${REINPLACE_CMD} -e 's/[[:<:]]hex[[:>:]]/is_hex/g' + derp-do-install: @${MKDIR} ${STAGEDIR}${DATADIR} ${STAGEDIR}${DOCSDIR} (cd ${WRKSRC}/src && ${INSTALL_PROGRAM} le ${STAGEDIR}${PREFIX}/bin)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202408301937.47UJbmIG081226>