git: fc66d1726d5b - main - graphics/anttweakbar: Fix build with llvm16
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 23 Jul 2023 15:53:12 UTC
The branch main has been updated by bofh:
URL: https://cgit.FreeBSD.org/ports/commit/?id=fc66d1726d5bbcd802b4e41ed73d43f82608dcad
commit fc66d1726d5bbcd802b4e41ed73d43f82608dcad
Author: Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-07-23 12:25:45 +0000
Commit: Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-07-23 15:53:02 +0000
graphics/anttweakbar: Fix build with llvm16
- Pet portclippy
Approved by: portmgr (blanket)
Sponsored by: The FreeBSD Foundation
---
graphics/anttweakbar/Makefile | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/graphics/anttweakbar/Makefile b/graphics/anttweakbar/Makefile
index 64630175e6cd..046e1d0b0028 100644
--- a/graphics/anttweakbar/Makefile
+++ b/graphics/anttweakbar/Makefile
@@ -12,26 +12,33 @@ WWW= http://anttweakbar.sourceforge.net/doc/
LICENSE= ZLIB
LICENSE_FILE= ${WRKSRC}/../License.txt
-USES= dos2unix gl xorg zip
+USES= dos2unix gl localbase:ldflags xorg zip
+DOS2UNIX_FILES= Makefile LoadOGLCore.h TwPrecomp.h
USE_GL= gl glu
-USE_XORG= x11
USE_LDCONFIG= yes
+USE_XORG= x11
-WRKSRC= ${WRKDIR}/AntTweakBar
-WRKSRC_SUBDIR= src
-
-DOS2UNIX_FILES= Makefile LoadOGLCore.h TwPrecomp.h
-
-LDFLAGS+= -L${LOCALBASE}/lib -lX11
+LDFLAGS+= -lX11
BINARY_ALIAS= gcc=${CC}
+WRKSRC= ${WRKDIR}/AntTweakBar
+WRKSRC_SUBDIR= src
+
PLIST_FILES= include/AntTweakBar.h \
lib/libAntTweakBar.a \
lib/libAntTweakBar.so \
lib/libAntTweakBar.so.${DISTVERSION:R} \
lib/libAntTweakBar.so.${DISTVERSION}
+.include <bsd.port.options.mk>
+
+post-patch:
+.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1400091
+ @${REINPLACE_CMD} -e 's|public binary_function|public __binary_function|' \
+ ${WRKSRC}/TwMgr.cpp
+.endif
+
do-install:
${INSTALL_DATA} ${WRKSRC}/../include/AntTweakBar.h ${STAGEDIR}${PREFIX}/include
${INSTALL_DATA} ${WRKSRC}/../lib/libAntTweakBar.a ${STAGEDIR}${PREFIX}/lib