aboutsummaryrefslogtreecommitdiffstats
path: root/net/gnu-dico/Makefile
blob: 04c193f84a4085046852f802e6b6871558fa0836 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# New ports collection makefile for:    gnu dico
# Date created:     27-12-2009
# Whom:         Goran Tal
#
# $FreeBSD$
#

PORTNAME=   dico
PORTVERSION=    2.2
PORTREVISION=   1
CATEGORIES= net textproc
MASTER_SITES=   ${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= ${PORTNAME}
PKGNAMEPREFIX=  gnu-

MAINTAINER= goran.tal@gmail.com
COMMENT=    Flexible modular implementation of DICT server

USE_XZ=     yes
USE_LDCONFIG=   yes
USE_GMAKE=  yes
USE_AUTOTOOLS=  libltdl libtool

GNU_CONFIGURE=  yes
CPPFLAGS+=  -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib
CONFIGURE_ARGS= --localstatedir=/var

OPTIONS=    PYTHON  "With PYTHON support" on \
        GUILE   "With GUILE support" on \
        PCRE    "With PCRE support" on \
        GSASL   "With GSASL support" off \
        PAM "With PAM support" off \
        LDAP    "With LDAP support" off

.include <bsd.port.options.mk>

.if defined(WITH_PYTHON)
USE_PYTHON= yes
PLIST_SUB+= PYTHON=""
.else
CONFIGURE_ARGS+=--without-python
PLIST_SUB+= PYTHON="@comment "
.endif

.if defined(WITH_GUILE)
LIB_DEPENDS+=   guile.21:${PORTSDIR}/lang/guile
PLIST_SUB+= GUILE=""
.else
CONFIGURE_ARGS+=--without-guile
PLIST_SUB+= GUILE="@comment "
.endif

.if defined(WITH_PCRE)
LIB_DEPENDS+=   pcre.3:${PORTSDIR}/devel/pcre
PLIST_SUB+= PCRE=""
.else
CONFIGURE_ARGS+=--without-pcre
PLIST_SUB+= PCRE="@comment "
.endif

.if defined(WITH_GSASL)
LIB_DEPENDS+=   gsasl.16:${PORTSDIR}/security/gsasl
CONFIGURE_ARGS+=--with-gsasl
.else
CONFIGURE_ARGS+=--without-gsasl
.endif

.if defined(WITH_PAM)
PLIST_SUB+= PAM=""
CONFIGURE_ARGS+=--enable-pam
.else
PLIST_SUB+= PAM="@comment "
CONFIGURE_ARGS+=--disable-pam
.endif

.if defined(WITH_LDAP)
USE_OPENLDAP=   yes
PLIST_SUB+= LDAP=""
.else
CONFIGURE_ARGS+=--without-ldap
PLIST_SUB+= LDAP="@comment "
.endif

.if !defined(WITHOUT_NLS)
USES+=      gettext
PLIST_SUB+= NLS=""
.else
CONFIGURE_ARGS+=--disable-nls
PLIST_SUB+= NLS="@comment "
.endif

INFO=       dico

PLIST_SUB+= PORTVERSION=${PORTVERSION}
SUB_FILES+= pkg-message
USE_RC_SUBR=    dicod

post-patch:
    @${REINPLACE_CMD} 's/@bindir@/@sbindir@/' ${WRKSRC}/dicod/Makefile.in
    @${REINPLACE_CMD} 's/(bindir)..dir/&\/gdico/' ${WRKSRC}/dico/Makefile.in
    @${REINPLACE_CMD} '/INSTALL.*charset/d' ${WRKSRC}/gnu/Makefile.in

post-install:
    @${INSTALL_DATA} ${FILESDIR}/dicod.conf ${PREFIX}/etc/dicod.conf.sample
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>