# Created by: Gea-Suan Lin <gslin@gslin.org>
# $FreeBSD: tags/RELEASE_10_0_0/net/libzmq2/Makefile 335619 2013-12-04 14:08:03Z koobs $

PORTNAME=	zmq
PORTVERSION=	2.2.0
PORTREVISION=	1
CATEGORIES=	net
MASTER_SITES=	http://download.zeromq.org/
DISTNAME=	zeromq-${DISTVERSION}

MAINTAINER=	gslin@gslin.org
COMMENT=	ZeroMQ core library (Version 2)

LICENSE=	LGPL3

USES=		pathfix
USE_LDCONFIG=	yes
GNU_CONFIGURE=	yes

CONFLICTS=	libzmq[^2]-[0-9]*

OPTIONS_DEFINE=		DEBUG
DEBUG_CONFIGURE_ON=	--enable-debug

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MDEBUG}
WITH_DEBUG=	yes
.endif

post-patch:
	${REINPLACE_CMD} -e '9s|$$| -pthread|' ${WRKSRC}/src/libzmq.pc.in

regression-test: build
	cd ${WRKSRC} && ${MAKE} check

.include <bsd.port.mk>
