diff options
author | Piotr Kubaj <pkubaj@FreeBSD.org> | 2023-08-15 23:19:31 +0000 |
---|---|---|
committer | Piotr Kubaj <pkubaj@FreeBSD.org> | 2023-08-15 23:19:31 +0000 |
commit | c960759946217abeef45e5f39e7b224d69812730 (patch) | |
tree | 05f292e1586c09af3cdbd08cf184fb45cef968c5 | |
parent | d67529adbac5db89990779726f3ac5a54793206f (diff) | |
download | ports-c960759946217abeef45e5f39e7b224d69812730.tar.gz ports-c960759946217abeef45e5f39e7b224d69812730.zip |
print/scribus-devel: fix build with llvm16 while keeping compatibility with older llvm
Previous fix broke llvm < 16.
PR: 273140
-rw-r--r-- | print/scribus-devel/Makefile | 9 | ||||
-rw-r--r-- | print/scribus-devel/files/patch-scribus_desaxe_digester.cpp | 14 |
2 files changed, 8 insertions, 15 deletions
diff --git a/print/scribus-devel/Makefile b/print/scribus-devel/Makefile index feae31864363..aad5a04d62c5 100644 --- a/print/scribus-devel/Makefile +++ b/print/scribus-devel/Makefile @@ -50,6 +50,8 @@ CMAKE_ARGS+= -DWANT_HUNSPELL=YES \ OPTIONS_DEFINE= DOCS +.include <bsd.port.pre.mk> + # Patch sources to force using include files installed by graphics/podofo09 post-patch: @${REINPLACE_CMD} -e '/^[\t ]*#include/s|podofo/podofo.h|podofo09/podofo.h|' \ @@ -58,9 +60,14 @@ post-patch: ${WRKSRC}/scribus/imagedataloaders/scimgdataloader_pdf.cpp \ ${WRKSRC}/scribus/pdflib_core.h \ ${WRKSRC}/scribus/pdf_analyzer.h +.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 160 + @${REINPLACE_CMD} -e 's|std::unary_function|std::__unary_function|' \ + ${WRKSRC}/scribus/desaxe/digester.cpp +.endif + post-install: ${LN} -sf ../share/icons/1_5_1/scribus.png \ ${STAGEDIR}${PREFIX}/share/pixmaps/ -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/print/scribus-devel/files/patch-scribus_desaxe_digester.cpp b/print/scribus-devel/files/patch-scribus_desaxe_digester.cpp deleted file mode 100644 index db186823e4bd..000000000000 --- a/print/scribus-devel/files/patch-scribus_desaxe_digester.cpp +++ /dev/null @@ -1,14 +0,0 @@ ---- scribus/desaxe/digester.cpp.orig 2023-07-31 21:07:27 UTC -+++ scribus/desaxe/digester.cpp -@@ -448,7 +448,11 @@ automata::NFA<nfa_state_t, token_t>* RuleState::create - return nfa; - } - -+#if __cplusplus >= 201703L // ISO C++ 2017 or newer. -+struct CreateDFAState : public std::__unary_function <std::set<nfa_state_t>, dfa_state_t> { -+#else - struct CreateDFAState : public std::unary_function <std::set<nfa_state_t>, dfa_state_t> { -+#endif - - CreateDFAState(const std::vector<rule_t>& rules, const std::vector<nfa_state_t>& accepting) - : n(0), rules_(rules), accepting_(accepting) |