Skip to content

Commit

Permalink
archivers/unalz: Fix build with llvm16
Browse files Browse the repository at this point in the history
- Utilize USES=localbase

Approved by:	portmgr (blanket)
Sponsored by:	The FreeBSD Foundation
  • Loading branch information
5u623l20 committed Aug 6, 2023
1 parent 9fff9ee commit 9b53348
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions archivers/unalz/Makefile
Expand Up @@ -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
Expand Down

0 comments on commit 9b53348

Please sign in to comment.