Fix the build on recent FreeBSD versions.

Reported by:	Sergey V. Dyatko
Pointyhat to:	danfe
This commit is contained in:
Alexey Dokuchaev 2011-04-08 06:53:30 +00:00
parent 96db8214d0
commit 73b51dcb51
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=272374

View file

@ -29,14 +29,18 @@ MAKE_ARGS= CC=${CXX}
PLIST_FILES= bin/sviewgl PLIST_FILES= bin/sviewgl
.include <bsd.port.pre.mk>
post-patch: post-patch:
# Respect CFLAGS, prefer more widely used libungif instead of giflib # Respect CFLAGS, prefer more widely used libungif instead of giflib
@${REINPLACE_CMD} -e 's,-O2,${CFLAGS}, ; s,/usr,${LOCALBASE},g ; \ @${REINPLACE_CMD} -e 's,-O2,${CFLAGS}, ; s,/usr,${LOCALBASE},g ; \
s,=-s,=-L${LOCALBASE}/lib, ; s,lgif,lungif,' ${WRKSRC}/Makefile s,=-s,=-L${LOCALBASE}/lib, ; s,lgif,lungif,' ${WRKSRC}/Makefile
.if ${OSVERSION} < 800501
@${REINPLACE_CMD} -e 's,const struct dirent,struct dirent,' \ @${REINPLACE_CMD} -e 's,const struct dirent,struct dirent,' \
${WRKSRC}/src/fileslist.* ${WRKSRC}/src/fileslist.*
.endif
do-install: do-install:
${INSTALL_PROGRAM} ${WRKSRC}/sviewgl ${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/sviewgl ${PREFIX}/bin
.include <bsd.port.mk> .include <bsd.port.post.mk>