freebsd-ports/devel/gamin/Makefile
Joe Marcus Clarke 79bed2eee8 Add optional libinotify support (default disabled) and fix the build
if devel/libinotify is installed.

PR:		164756
Submitted by:	sunpoet
2012-02-12 17:03:59 +00:00

67 lines
1.6 KiB
Makefile

# 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.6 2008/11/26 06:48:13 marcus Exp $
#
PORTNAME= gamin
PORTVERSION= 0.1.10
PORTREVISION?= 4
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
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= GAM_POLLER "Use gamin's poller instead of kqueue's" off \
LIBINOTIFY "Use libinotify as the FAM backend" off
.endif
.include <bsd.port.pre.mk>
.if !defined(GAMIN_SLAVE)
.if defined(WITH_GAM_POLLER)
CPPFLAGS+= -DUSE_GAMIN_POLLER=1
.endif
.if defined(WITH_LIBINOTIFY)
CONFIGURE_ARGS+=--enable-inotify
LDFLAGS+= -L${LOCALBASE}/lib -linotify
LIB_DEPENDS+= inotify.0:${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>