Tweak misc/mbuffer version 2014.12.27
[dports.git] / misc / mbuffer / Makefile
1 # Created by: Rong-En Fan <rafan@FreeBSD.org>
2 # $FreeBSD$
3
4 PORTNAME=       mbuffer
5 PORTVERSION=    2014.12.27
6 CATEGORIES=     misc
7 MASTER_SITES=   http://www.maier-komor.de/software/mbuffer/
8 DISTNAME=       ${PORTNAME}-${PORTVERSION:S/.//g}
9
10 MAINTAINER=     mm@FreeBSD.org
11 COMMENT=        Tool for buffering data streams
12
13 LICENSE=        GPLv3
14 LICENSE_FILE=   ${WRKSRC}/LICENSE
15
16 USES=           gmake tar:tgz
17 GNU_CONFIGURE=  yes
18 MAKE_ARGS=      SHELL=${SH}
19
20 PLIST_FILES=    bin/mbuffer man/man1/mbuffer.1.gz
21
22 OPTIONS_DEFINE= MHASH
23 MHASH_DESC=     Use mhash for hash generation
24
25 OPTIONS_DEFAULT=        MHASH
26
27 .include <bsd.port.options.mk>
28
29 .if ${PORT_OPTIONS:MMHASH}
30 LIB_DEPENDS+=   libmhash.so:${PORTSDIR}/security/mhash
31 CFLAGS+=        -I${LOCALBASE}/include
32 LDFLAGS+=       -L${LOCALBASE}/lib
33 .else
34 CONFIGURE_ARGS+=ac_cv_search_mhash_init=no
35 USE_OPENSSL=    yes
36 .endif
37
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
41
42 .include <bsd.port.pre.mk>
43
44 post-configure:
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
48
49 .include <bsd.port.post.mk>