# New ports collection makefile for:	upnp
# Date created:				02 August 2002
# Whom:	      				Yen-Ming Lee <leeym@leeym.com>
#
# $FreeBSD: ports/devel/upnp/Makefile,v 1.23 2007/10/25 03:25:52 linimon Exp $
#

PORTNAME=	upnp
PORTVERSION=	1.6.0
PORTEPOCH=	1
CATEGORIES=	devel
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	pupnp
DISTNAME=	lib${PORTNAME}-${PORTVERSION}

MAINTAINER=	farrokhi@FreeBSD.org
COMMENT=	Universal Plug and Play Software Development Kit

CONFLICTS=	upnp-1.0.*
USE_BZIP2=	yes
USE_AUTOTOOLS=	libtool:15
GNU_CONFIGURE=	yes
USE_DOS2UNIX=	yes
USE_LDCONFIG=	yes

.include <bsd.port.pre.mk>

.if ${OSVERSION} >= 700042
.if ${ARCH} == "amd64" || ${ARCH} == "sparc64"
BROKEN=		Does not compile with GCC 4.2
.endif
.endif

MAKE_ENV=	PTHREAD_LIBS=${PTHREAD_LIBS}
CONFIGURE_ENV+=	LIBS="-llwres -lcompat"

.if defined(NOPORTDOCS)
CONFIGURE_ARGS=	--without-documentation
.else
CONFIGURE_ARGS=	--with-documentation=${DOCSDIR}
.endif

post-patch:
	${FIND} ${WRKSRC} -type f | \
		${XARGS} ${REINPLACE_CMD} -e 's,malloc.h,stdlib.h,'
	${REINPLACE_CMD} -Ee 's,^(pkgconfigexecdir = ).*,\1${PREFIX}/libdata/pkgconfig,' \
		${WRKSRC}/Makefile.in

.include <bsd.port.post.mk>


syntax highlighted by Code2HTML, v. 0.9.1