archivers/pbzip2: rework previous naive and inaccurate build fix
Back in 2017 I've untied this port from GNU make(1) so I could use it as a PKG_DEPENDS, by spelling target's prerequisites in both GNU and BSD make(1) syntax, which seemed like a nifty trick at the time. It worked well until the import of bmake-20250707 in July which had added POSIX $^ support, so now we were listing prerequisites twice without separating them with space, in turn causing the breakage. While we could probably just use the old BSD $> (or even .ALLSRC), tentatively keep existing hack, guarded by the closest OSVERSION, so it would go away naturally when all supported FreeBSD versions would understand $^ (unconditional replacing would have to stay forever because upstreaming old BSD $> when GNU, POSIX, and new BSD use $^ is unfeasible). PR: 290004 Fixes:34c19efe9d,e27ff90e17
This commit is contained in:
@@ -16,16 +16,14 @@ PLIST_FILES= bin/pbzip2 bin/pbunzip2 \
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1500000
|
||||
USES+= gmake
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's,PRI[iu]MAX, & ,g' ${WRKSRC}/pbzip2.cpp \
|
||||
${WRKSRC}/BZ2StreamScanner.cpp
|
||||
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1500053
|
||||
# Spell target sources to be understood by both BSD and GNU make(1)
|
||||
@${REINPLACE_CMD} -e '/-O2/s,^,#, ; s,$$^,$$>&,' \
|
||||
${WRKSRC}/Makefile
|
||||
.endif
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
|
||||
|
||||
Reference in New Issue
Block a user