PORTNAME=	libharu
DISTVERSIONPREFIX=	v
DISTVERSION=	2.4.6
CATEGORIES=	print

MAINTAINER=	fluffy@FreeBSD.org
COMMENT=	Haru Free PDF Library
WWW=		http://libharu.org/

LICENSE=	ZLIB
LICENSE_FILE=	${WRKSRC}/LICENSE

LIB_DEPENDS=	libpng.so:graphics/png

USES=		cmake
USE_LDCONFIG=	yes

USE_GITHUB=	yes

PLIST_SUB=	SHL1=${DISTVERSION:R:R} \
		SHL2=${DISTVERSION:R} \
		SHL3=${DISTVERSION}
PORTEXAMPLES=	*

OPTIONS_DEFINE=	EXAMPLES

EXAMPLES_CMAKE_BOOL=	LIBHPDF_EXAMPLES
EXAMPLES_CMAKE_ON=	-DEXAMPLESDIR:STRING=share/examples/${PORTNAME}

post-install:
	${RLN} libhpdf.so.${DISTVERSION} ${STAGEDIR}${PREFIX}/lib/libhpdf.so.${DISTVERSION:R:R}

.include <bsd.port.mk>
