summaryrefslogtreecommitdiffstats
path: root/textproc/confget/Makefile
blob: 1c1bbcad090c1c0c3c672a5afa63e6021a241e6b (plain)
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
# Created by: Peter Pentchev <roam@FreeBSD.org>
# $FreeBSD$

PORTNAME=	confget
PORTVERSION=	1.04
PORTREVISION=	1
CATEGORIES=	textproc
MASTER_SITES=	http://devel.ringlet.net/textproc/confget/ \
		LOCAL/sunpoet

MAINTAINER=	sunpoet@FreeBSD.org
COMMENT=	Read variables from INI-style configuration files

OPTIONS_DEFINE=	EXAMPLES PCRE
OPTIONS_DEFAULT=PCRE

MAKE_ENV=	CFLAGS_CONF=-DHAVE_FGETLN
USE_GMAKE=	yes

MAN1=		confget.1
MANCOMPRESSED=	yes
PLIST_FILES=	bin/confget
PORTEXAMPLES=	t1.ini t2.ini

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MEXAMPLES}
MAKE_ENV+=	EXAMPLESDIR=${EXAMPLESDIR}
.endif

.if ${PORT_OPTIONS:MPCRE}
LIB_DEPENDS+=	pcre.3:${PORTSDIR}/devel/pcre
.else
MAKE_ENV+=	PCRE_CFLAGS="" PCRE_LIBS=""
.endif

post-patch:
.if empty(PORT_OPTIONS:MEXAMPLES)
	@${REINPLACE_CMD} -e '/^install:/ s| install-examples||' ${WRKSRC}/Makefile
.endif

regression-test test: build
	cd ${WRKSRC}/ && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} test

.include <bsd.port.mk>
OpenPOWER on IntegriCloud