aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/libtre/Makefile
blob: 802c528d31d850117193fc0c1402bb579640857a (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
61
62
63
# ex:ts=8
# Ports collection makefile for:    libtre
# Date created:         Oct 14, 2002
# Whom:             ijliao
#
# $FreeBSD$
#

PORTNAME=   libtre
PORTVERSION=    0.7.3
CATEGORIES= textproc
MASTER_SITES=   http://laurikari.net/tre/
DISTNAME=   tre-${PORTVERSION}

MAINTAINER= ports@FreeBSD.org
COMMENT=    A lightweight fully POSIX compliant regexp matching library

USE_BZIP2=  yes
USE_GNOME=  gnomehack gnometarget pkgconfig
USE_GETOPT_LONG=    yes
USE_AUTOTOOLS=  libtool:15
CONFIGURE_ENV=  CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
INSTALLS_SHLIB= yes

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

MAN1=       agrep.1

.if defined(WITHOUT_NLS)
CONFIGURE_ARGS+=    --disable-nls
PLIST_SUB+= NLS="@comment "
.else
USE_GETTEXT=    yes
PLIST_SUB+= NLS=""
.endif

.if defined(WITH_OPTIMIZED_CFLAGS)
CFLAGS+=    -Wuninitialized -ffast-math -finline-functions \
        -fomit-frame-pointer -fexpensive-optimizations \
        -fforce-mem -fforce-addr -O3
.endif

pre-everything::
.ifndef(WITH_OPTIMIZED_CFLAGS)
    @${ECHO_MSG} '===>'
    @${ECHO_MSG} '===> You can enable extra optimizations by defining WITH_OPTIMIZED_CFLAGS'
    @${ECHO_MSG} "===> For example, 'make WITH_OPTIMIZED_CFLAGS=yes'"
.endif
    @${ECHO_MSG} '===>'

post-patch:
    @${REINPLACE_CMD} -e 's|^CFLAGS=|#CFLAGS=|g' ${WRKSRC}/configure

post-install:
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
.for i in tre-api.html tre-syntax.html
    ${INSTALL_DATA} ${WRKSRC}/doc/${i} ${DOCSDIR}
.endfor
.endif

.include <bsd.port.mk>