1 # Created by: Rong-En Fan <rafan@FreeBSD.org>
5 PORTVERSION= 2014.12.27
7 MASTER_SITES= http://www.maier-komor.de/software/mbuffer/
8 DISTNAME= ${PORTNAME}-${PORTVERSION:S/.//g}
10 MAINTAINER= mm@FreeBSD.org
11 COMMENT= Tool for buffering data streams
14 LICENSE_FILE= ${WRKSRC}/LICENSE
18 MAKE_ARGS= SHELL=${SH}
20 PLIST_FILES= bin/mbuffer man/man1/mbuffer.1.gz
23 MHASH_DESC= Use mhash for hash generation
25 OPTIONS_DEFAULT= MHASH
27 .include <bsd.port.options.mk>
29 .if ${PORT_OPTIONS:MMHASH}
30 LIB_DEPENDS+= libmhash.so:${PORTSDIR}/security/mhash
31 CFLAGS+= -I${LOCALBASE}/include
32 LDFLAGS+= -L${LOCALBASE}/lib
34 CONFIGURE_ARGS+=ac_cv_search_mhash_init=no
38 # Prevent sendfile() from being detected by configure and rejected
39 # by mbuffer.c due to being "unable to send from buffers".
40 CONFIGURE_ARGS+=ac_cv_search_sendfile=no
42 .include <bsd.port.pre.mk>
45 # Rename variables to make sure they aren't redefined through mhash.h
46 @${REINPLACE_CMD} -E -e 's@(PACKAGE|VERSION)@MBUFFER_\1@' \
47 ${WRKSRC}/config.h ${WRKSRC}/mbuffer.c
49 .include <bsd.port.post.mk>