# $MidnightBSD: trunk/devel/libplist/Makefile 18179 2015-03-16 12:31:25Z laffer1 $

PORTNAME=	libplist
PORTVERSION=	1.11
PORTREVISION?=	0
CATEGORIES?=	devel
MASTER_SITES=	http://www.libimobiledevice.org/downloads/

MAINTAINER?=	ports@MidnightBSD.org
COMMENT?=	Library to handle Apple Property List format

LICENSE?=	lgpl2.1

SLAVE_PORT?=	no

USES+=		compiler libtool pathfix pkgconfig tar:bzip2
GNU_CONFIGURE=	yes
INSTALL_TARGET=	install-strip

.if ${SLAVE_PORT} == no

USE_GNOME=	libxml2
CONFIGURE_ARGS=	--without-cython
MAKE_JOBS_UNSAFE=	yes
USE_LDCONFIG=	${LOCALBASE}/lib

PORTDOCS=	AUTHORS NEWS README

OPTIONS_DEFINE=	DOCS

post-install:
	@${MKDIR} ${DOCSDIR}
	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${DOCSDIR}

.endif # ${SLAVE_PORT} == no

.include <bsd.port.pre.mk>

pre-build:
.if ${CHOSEN_COMPILER_TYPE} == gcc && ${COMPILER_VERSION} < 45
	@${REINPLACE_CMD} -e '/__attribute__/ s,deprecated(x),deprecated(),' \
		${WRKSRC}/include/plist/plist.h
.endif

.include <bsd.port.post.mk>
