git: 9b533488867e - main - archivers/unalz: Fix build with llvm16
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 06 Aug 2023 23:52:36 UTC
The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/ports/commit/?id=9b533488867e809193e30e92f840ea20e4e92101 commit 9b533488867e809193e30e92f840ea20e4e92101 Author: Muhammad Moinur Rahman <bofh@FreeBSD.org> AuthorDate: 2023-08-06 23:08:20 +0000 Commit: Muhammad Moinur Rahman <bofh@FreeBSD.org> CommitDate: 2023-08-06 23:52:27 +0000 archivers/unalz: Fix build with llvm16 - Utilize USES=localbase Approved by: portmgr (blanket) Sponsored by: The FreeBSD Foundation --- archivers/unalz/Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/archivers/unalz/Makefile b/archivers/unalz/Makefile index 53e35090e386..1550454b9cc4 100644 --- a/archivers/unalz/Makefile +++ b/archivers/unalz/Makefile @@ -12,19 +12,24 @@ LICENSE_FILE= ${WRKSRC}/readme.txt WRKSRC= ${WRKDIR}/${PORTNAME} -USES= cpe iconv tar:xz +USES= cpe iconv localbase:ldflags tar:xz MAKE_ARGS+= CPP="${CXX}" CC="${CC}" OBJ="${UNALZ_OBJS}" \ LDFLAGS="${LDFLAGS}" CFLAGS="${CFLAGS}" ALL_TARGET= posix-utf8 -CFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib -lz -lbz2 +LDFLAGS+= -lz -lbz2 PLIST_FILES= bin/${PORTNAME} UNALZ_OBJS= main.o UnAlz.o UnAlzUtils.o UnAlzBz2decompress.o \ UnAlzBzip2.o UnAlzbzlib.o +.include <bsd.port.options.mk> + +.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400091 || ( ${OSVERSION} >= 1302507 && ${OSVERSION} < 1400000 )) +CFLAGS+= -Dregister= +.endif + post-patch: ${REINPLACE_CMD} -e \ 's/-liconv/${ICONV_LIB}/g' ${WRKSRC}/Makefile