1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-20 08:27:15 +00:00

archivers/unalz: Fix build with llvm16

- Utilize USES=localbase

Approved by:	portmgr (blanket)
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Muhammad Moinur Rahman 2023-08-07 01:08:20 +02:00
parent 9fff9ee248
commit 9b53348886

View File

@ -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