git: ef47f050967e - main - graphics/inkscape: Fix build with llvm16

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Sun, 25 Jun 2023 18:10:07 UTC
The branch main has been updated by bofh:

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

commit ef47f050967e7eca60771fbe1a4c3f681e5d0c9b
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-06-25 18:08:32 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-06-25 18:09:48 +0000

    graphics/inkscape: Fix build with llvm16
    
    - Add missing LIB_DEPENDS reported by poudriere testport
    
    Approved by:    portmgr (blanket)
    Sponsored by:   The FreeBSD Foundation
---
 graphics/inkscape/Makefile | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/graphics/inkscape/Makefile b/graphics/inkscape/Makefile
index 44b0a206e7e6..bce060ec99d5 100644
--- a/graphics/inkscape/Makefile
+++ b/graphics/inkscape/Makefile
@@ -29,6 +29,7 @@ LICENSE_FILE_LGPL3+ =	${WRKSRC}/LICENSES/LGPL-3.0-or-later.txt
 LICENSE_FILE_MPL11  =	${WRKSRC}/LICENSES/MPL-1.1.txt
 
 LIB_DEPENDS=	libboost_filesystem.so:devel/boost-libs \
+		libenchant-2.so:textproc/enchant2 \
 		libpopt.so:devel/popt \
 		libgc.so:devel/boehm-gc \
 		libgdl-3.so:x11-toolkits/gdl \
@@ -123,6 +124,8 @@ GSPELL_DESC=		Support for spell checking through gspell
 GSPELL_CMAKE_BOOL= 	WITH_GSPELL
 GSPELL_LIB_DEPENDS=	libgspell-1.so:textproc/gspell
 
+.include <bsd.port.options.mk>
+
 post-patch:
 	@${REINPLACE_CMD} -e 's|COMMAND python3|COMMAND ${PYTHON_VERSION}|g' \
 		${WRKSRC}/share/*/CMakeLists.txt
@@ -130,5 +133,13 @@ post-patch:
 	@${REINPLACE_CMD} -e 's|"python3"|"${PYTHON_VERSION}"|g' \
 		${WRKSRC}/src/extension/implementation/script.cpp
 	@${TOUCH} ${WRKSRC}/share/extensions/gcodetools_check_for_updates.inx.h
+.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1400091
+	@${REINPLACE_CMD} -e 's|std::unary_function|std::__unary_function| ; s|std::binary_function|std::__binary_function|' \
+		${WRKSRC}/src/device-manager.cpp \
+		${WRKSRC}/src/libnrtype/FontFactory.h \
+		${WRKSRC}/src/ui/dialog/undo-history.h \
+		${WRKSRC}/src/ui/tool/multi-path-manipulator.cpp \
+		${WRKSRC}/src/util/units.h
+.endif
 
 .include <bsd.port.mk>