# Created by: Rusmir Dusko <nemysis@FreeBSD.org>
# $FreeBSD: tags/RELEASE_10_1_0/graphics/viewnior/Makefile 363964 2014-08-04 05:44:43Z nemysis $

PORTNAME=	viewnior
PORTVERSION=	1.4
PORTREVISION=	2
CATEGORIES=	graphics

MAINTAINER=	nemysis@FreeBSD.org
COMMENT=	Fast and simple image viewer

LICENSE=	GPLv3

BUILD_DEPENDS=	gnome-autogen.sh:${PORTSDIR}/devel/gnome-common \
		p5-XML-Parser>=0:${PORTSDIR}/textproc/p5-XML-Parser
LIB_DEPENDS=	libexiv2.so:${PORTSDIR}/graphics/exiv2

USE_GITHUB=	yes
GH_ACCOUNT=	xsisqox
GH_PROJECT=	Viewnior
GH_TAGNAME=	${GH_COMMIT}
GH_COMMIT=	fc0f5cb

USES=		desktop-file-utils gmake pkgconfig
USE_GNOME=	glib20 gtk20
USE_AUTOTOOLS=	aclocal autoheader automake autoconf libtoolize
AUTOMAKE_ARGS=	--add-missing --force
GNU_CONFIGURE=	yes
INSTALLS_ICONS=	yes

PORTDOCS=	AUTHORS NEWS README

OPTIONS_DEFINE=	DOCS NLS
OPTIONS_SUB=	yes

NLS_USES=	gettext

.include <bsd.port.options.mk>

post-patch:
	@${REINPLACE_CMD} -e \
		's|$$(prefix)/$$(DATADIRNAME)/locale|$$(datarootdir)/locale|' \
		${WRKSRC}/po/Makefile.in.in

.if ! ${PORT_OPTIONS:MNLS}
	@${REINPLACE_CMD} -e 's|install: install-data|install:|' \
		${WRKSRC}/po/Makefile.in.in
.endif

post-install:
	${MKDIR} ${STAGEDIR}${DOCSDIR}
	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>
