# Created by: Phil Oleson <oz@nixil.net>
# $FreeBSD: tags/RELEASE_10_0_0/devel/libdnsres/Makefile 327724 2013-09-20 17:13:42Z bapt $

PORTNAME=	libdnsres
PORTVERSION=	0.1a
PORTREVISION=	5
CATEGORIES=	devel
MASTER_SITES=	http://monkey.org/~provos/

MAINTAINER=	oz@nixil.net
COMMENT=	Provides a non-blocking thread-safe API for resolving DNS names

BUILD_DEPENDS=	${LOCALBASE}/lib/libevent.a:${PORTSDIR}/devel/libevent

GNU_CONFIGURE=	yes
USE_AUTOTOOLS=	libtool
USE_LDCONFIG=	yes
CONFIGURE_ARGS=--with-libevent=${LOCALBASE}
MAKE_JOBS_UNSAFE=	yes

PLIST_SUB+=	PORTVERSION="${PORTVERSION}"

MAN3=	dnsres.3
MLINKS=	dnsres.3 dnsres_init.3 dnsres.3 dnsres_gethostbyname.3 \
	dnsres.3 dnsres_gethostbyname2.3 dnsres.3 dnsres_gethostbyaddr.3 \
	dnsres.3 dnsres_getaddrinfo.3

NO_STAGE=	yes
post-patch:
	@${REINPLACE_CMD} -e 's,CFLAGS =,CFLAGS +=, ; s|top_buildir|top_builddir|g' \
		${WRKSRC}/Makefile.in

.include <bsd.port.mk>
