freebsd-ports/textproc/chpp/Makefile
Kyle Evans de40e29027 textproc/chpp: fix the build against -CURRENT
libgnuregex has been removed in FreeBSD 13.0. The version in base had a
number of known or likely bugs associated with it, so just use the newer
and more stable port on all supported FreeBSD versions.

PR:		252256
MFH:		2021Q1
2021-01-10 17:38:50 +00:00

59 lines
1.4 KiB
Makefile

# Created by: Andrey Zakhvatov <andy@FreeBSD.org>
# $FreeBSD$
PORTNAME= chpp
PORTVERSION= 0.3.5
PORTREVISION= 7
CATEGORIES= textproc
MASTER_SITES= http://www.complang.tuwien.ac.at/schani/chpp/files/ \
http://freebsd.nsu.ru/distfiles/
MAINTAINER= ports@FreeBSD.org
COMMENT= Non-intrusive full-featured text preprocessor
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libgc.so:devel/boehm-gc \
libgnuregex.so.6:devel/libgnuregex
USES= autoreconf gmake makeinfo
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --libdir=${PREFIX}/share
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
INFO= chpp
OPTIONS_DEFINE= DOCS EXAMPLES
.include <bsd.port.pre.mk>
post-extract:
.for i in getopt.h regex.h gc/gc.h
@cd ${WRKSRC} && ${MV} -f ${i} ${i}.dist
.endfor
post-patch:
@${REINPLACE_CMD} -e \
's| getopt.c getopt.h getopt1.c | | ; \
s| regex.c regex.h | | ; \
/LDADD/s| gc/gc.a | -lgc -lgnuregex | ; \
s|^YFLAGS|AM_YFLAGS|' ${WRKSRC}/Makefile.am
.for i in arrayops.c builtins.c stringops.c
@${REINPLACE_CMD} -e \
's|"../regex.h"|<gnu/regex.h>|' ${WRKSRC}/builtins/${i}
.endfor
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
.for filename in AUTHORS NEWS README
${INSTALL_DATA} ${WRKSRC}/${filename} ${STAGEDIR}${DOCSDIR}
.endfor
post-install-EXAMPLES-on:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
(cd ${WRKSRC}/test && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
.include <bsd.port.post.mk>