aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/chpp/Makefile
blob: b9999a59ec02081b85f1c3102f14fac28caa0b08 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Created by: Andrey Zakhvatov <andy@FreeBSD.org>
# $FreeBSD$

PORTNAME=   chpp
PORTVERSION=    0.3.5
PORTREVISION=   1
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

LIB_DEPENDS=    libgc.so:${PORTSDIR}/devel/boehm-gc

USES=       gmake makeinfo
USE_AUTOTOOLS=  autoheader aclocal automake autoconf
AUTOMAKE_ARGS=  --add-missing --copy --force-missing
CONFIGURE_ARGS= --libdir=${PREFIX}/share

CPPFLAGS+=  -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib

INFO=       chpp

OPTIONS_DEFINE= DOCS EXAMPLES

.include <bsd.port.pre.mk>

.if ${ARCH} != "i386" && ${ARCH} != "amd64"
BROKEN=     Does not compile
.endif

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:
    @${MKDIR} ${STAGEDIR}${DOCSDIR}
.for file in AUTHORS NEWS README
    ${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${DOCSDIR}
.endfor
    @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
    (cd ${WRKSRC}/test && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})

.include <bsd.port.post.mk>