# Created by: Sergey Akifyev <asa@agava.com>
# $FreeBSD: tags/RELEASE_11_0_0/math/libqalculate/Makefile 412348 2016-04-01 14:16:16Z mat $

PORTNAME=	libqalculate
PORTVERSION=	0.9.7
PORTREVISION=	5
CATEGORIES=	math
MASTER_SITES=	SF/qalculate/${PORTNAME}/${PORTNAME}-${PORTVERSION}

MAINTAINER=	jhale@FreeBSD.org
COMMENT=	Multi-purpose desktop calculator (backend library)

LIB_DEPENDS=	libcln.so:math/cln

USES=		pkgconfig pathfix gmake libtool gettext-tools
USE_GNOME=	glib20 intltool libxml2
USE_LDCONFIG=	yes
GNU_CONFIGURE=	yes
CPPFLAGS+=	-I${LOCALBASE}/include
LIBS+=		-L${LOCALBASE}/lib
INSTALL_TARGET=	install-strip

OPTIONS_DEFINE=	NLS
OPTIONS_SUB=	yes

NLS_USES=	gettext-runtime

.include <bsd.port.options.mk>

post-patch:
.if !${PORT_OPTIONS:MNLS}
	@${REINPLACE_CMD} -e '/^SUBDIRS =/s|po ||g' ${WRKSRC}/Makefile.in
.endif
	@${REINPLACE_CMD} -e '/^SUBDIRS =/s|docs||g' ${WRKSRC}/Makefile.in

.include <bsd.port.mk>
