# Created by: gahr
# $FreeBSD: head/textproc/xerces-c3/Makefile 410250 2016-03-06 06:19:05Z sunpoet $
# $MidnightBSD$

PORTNAME=	xerces-c
PORTVERSION=	3.2.0
CATEGORIES=	textproc
MASTER_SITES=	APACHE/xerces/c/3/sources
PKGNAMESUFFIX=	3

MAINTAINER=	ports@MidnightBSD.org
COMMENT=	Validating XML parser from the Apache XML Project

LICENSE=	apache2
LICENSE_FILE=	${WRKSRC}/LICENSE

CONFLICTS_INSTALL=	xerces-c2-[0-9]* xerces-c2-devel-[0-9]*

CONFIGURE_ARGS=	--enable-netaccessor-socket \
		--enable-transcoder-iconv \
		--with-pkgconfigdir=${PREFIX}/libdata/pkgconfig
GNU_CONFIGURE=	yes
INSTALL_TARGET=	install-strip
MAKE_ENV=	XERCESCROOT=${WRKSRC}
TEST_TARGET=	check
USE_LDCONFIG=	yes
USES=		cpe gmake iconv libtool pathfix

PLIST_SUB=	MAJOR_VER=${PORTVERSION:R}

CPE_PRODUCT=	xerces-c++
CPE_VENDOR=	apache

post-patch:
	${REINPLACE_CMD} -e "s,@DEFS@,& -D__STDC_LIMIT_MACROS," ${WRKSRC}/src/Makefile.in

post-install:
	${LN} -s libxerces-c-${PORTVERSION:R}.so ${STAGEDIR}${PREFIX}/lib/libxerces-c.so.${PORTVERSION:R:R}

.include <bsd.port.mk>
