summaryrefslogtreecommitdiffstats
path: root/devel/gamin/Makefile
blob: 63d42db70c08d93bb2555d74fb5af0b77634c949 (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
# ports collection makefile for:    gamin
# Date created:             24 March 2005
# Whom:                 Joe Marcus Clarke <marcus@FreeBSD.org>
#
# $FreeBSD$
#    $MCom: ports/devel/gamin/Makefile,v 1.9 2012/01/17 04:02:05 ahze Exp $
#

PORTNAME=   gamin
PORTVERSION=    0.1.10
PORTREVISION?=  6
CATEGORIES?=    devel
MASTER_SITES=   http://people.gnome.org/~veillard/gamin/sources/

MAINTAINER?=    gnome@FreeBSD.org
COMMENT?=   A file and directory monitoring system

USE_AUTOTOOLS=  libtool
USE_GMAKE=  yes
USE_GETTEXT=    yes
USE_GNOME?= gnomehack _glib20 pkgconfig
USE_LDCONFIG=   yes
CONFIGURE_ARGS?=--with-html-dir=${PREFIX}/share/doc \
        --without-python
LDFLAGS+=   -L${LOCALBASE}/lib ${PTHREAD_LIBS}
CPPFLAGS+=  -DHAVE_LINUX -I${LOCALBASE}/include ${PTHREAD_CFLAGS}

CONFLICTS=  fam-[0-9]*

GNU_CONFIGURE=  yes

.if !defined(GAMIN_SLAVE)
OPTIONS_DEFINE= GAM_POLLER LIBINOTIFY
GAM_POLLER_DESC=Use gamin's poller instead of kqueue's
LIBINOTIFY_DESC=Use libinotify as the FAM backend
.endif

.include <bsd.port.pre.mk>

.if !defined(GAM_SLAVE)
.if ${PORT_OPTIONS:MGAM_POLLER}
CPPFLAGS+=  -DUSE_GAMIN_POLLER=1
.endif

.if ${PORT_OPTIONS:MLIBINOTIFY}
CONFIGURE_ARGS+=--enable-inotify
LDFLAGS+=   -L${LOCALBASE}/lib -linotify
LIB_DEPENDS+=   inotify:${PORTSDIR}/devel/libinotify
.else
CONFIGURE_ARGS+=--disable-inotify
.endif
.endif

post-patch:
    @${REINPLACE_CMD} "s|/etc|${PREFIX}/etc|g" ${WRKSRC}/server/gam_conf.c

.if !defined(GAMIN_SLAVE)
regression-test: build
    @${ECHO_MSG} "===> Running gamin regression tests"
    @(cd ${WRKSRC}/tests && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} \
        Makefile ${MAKE_ARGS} tests)

post-install:
    @${CAT} ${PKGMESSAGE}
.endif

.include <bsd.port.post.mk>