aboutsummaryrefslogtreecommitdiff
path: root/print/qpdfview/Makefile
blob: 322d8bf6848414a20bc8e343c463ef5ced34d7de (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Created by: Veniamin Gvozdikov <vg@FreeBSD.org>

PORTNAME=	qpdfview
DISTVERSION=	0.4.18
PORTREVISION=	17
CATEGORIES=	print
MASTER_SITES=	https://launchpadlibrarian.net/294276875/ \
		https://launchpad.net/${PORTNAME}/trunk/${DISTVERSION}/+download/

MAINTAINER=	mbeis@xs4all.nl
COMMENT=	Tabbed DjVu/PDF/PS document viewer

LICENSE=	GPLv2+
LICENSE_FILE=	${WRKSRC}/COPYING

LIB_DEPENDS=	libpoppler-qt5.so:graphics/poppler-qt5

USES=		compiler:c++11-lang desktop-file-utils gl pkgconfig qmake qt:5
USE_LDCONFIG=	yes
USE_QT=		buildtools_build concurrent core dbus gui imageformats linguisttools printsupport sql sql-sqlite3 svg widgets xml
USE_GL=		gl

QMAKE_SOURCE_PATH=	${PORTNAME}.pro

DATADIR=	${PREFIX}/share/${PORTNAME}

OPTIONS_DEFINE=	CUPS DJVU PS
OPTIONS_DEFAULT=	CUPS DJVU PS
OPTIONS_SUB=	yes

CUPS_QMAKE_OFF=	"CONFIG+=without_cups"
CUPS_LIB_DEPENDS=	libcups.so:print/cups

DJVU_LIB_DEPENDS=	libdjvulibre.so:graphics/djvulibre
DJVU_QMAKE_OFF=	"CONFIG+=without_djvu"

PS_LIB_DEPENDS=	libspectre.so:print/libspectre
PS_QMAKE_OFF=	"CONFIG+=without_ps"

.include <bsd.port.options.mk>

pre-configure:
	${REINPLACE_CMD} -e 's#/usr#${PREFIX}#g;s#${PREFIX}/share/man#${PREFIX}/man#g' \
		${WRKSRC}/${PORTNAME}.pri
	cd ${WRKSRC} && ${LRELEASE} ${PORTNAME}.pro

.include <bsd.port.mk>