aboutsummaryrefslogtreecommitdiffstats
path: root/www/sarg/Makefile
blob: 6fcfc67bab9bdd9663810408fb0cccacf4e671c3 (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
# Created by: mt@primats.org.ua
# $FreeBSD$

PORTNAME=   sarg
PORTVERSION=    2.3.9
CATEGORIES= www
MASTER_SITES=   SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}

MAINTAINER= garga@FreeBSD.org
COMMENT=    Squid log analyzer and HTML report generator

LICENSE=    GPLv2
LICENSE_FILE=   ${WRKSRC}/LICENSE

OPTIONS_DEFINE= GD PHP NLS PCRE LDAP ICONV
OPTIONS_DEFAULT=GD PHP NLS PCRE LDAP ICONV
OPTIONS_SUB=    yes

PHP_DESC=   Install PHP for reporting generating

USES=       gmake
GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --sysconfdir="${ETCDIR}" \
        --enable-fontdir="${ETCDIR}/fonts" \
        --enable-imagedir="${ETCDIR}/images"
CPPFLAGS+=  -I${LOCALBASE}/include
LIBS+=      -L${LOCALBASE}/lib

NLS_USES=       gettext
NLS_CONFIGURE_ENABLE=   nls
NLS_LIBS=       -lintl
GD_CONFIGURE_WITH=  gd
GD_LIB_DEPENDS=     libgd.so:graphics/gd
PHP_CONFIGURE_ON=   --enable-sargphp="${ETCDIR}"
PHP_CONFIGURE_OFF=  --disable-sargphp
PCRE_CONFIGURE_WITH=    pcre
PCRE_LIB_DEPENDS=   libpcre.so:devel/pcre
LDAP_USE=       USE_OPENLDAP=yes
LDAP_CONFIGURE_WITH=    ldap
ICONV_USES=     iconv
ICONV_CONFIGURE_WITH=   iconv
ICONV_LDFLAGS=      ${ICONV_LIB}

post-patch:
    @${REINPLACE_CMD} -e '/test .*==/ s/==/=/' \
        ${WRKSRC}/configure

.include <bsd.port.mk>