aboutsummaryrefslogtreecommitdiff
path: root/astro/merkaartor/Makefile
blob: 3003451f77810323b2716dc96f13fa9ba5ad8130 (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Created by: Slaven Rezic <slaven@rezic.de>

PORTNAME=	merkaartor
PORTVERSION=	0.19.0
PORTREVISION=	0
CATEGORIES=	astro

MAINTAINER=	dev2@heesakkers.info
COMMENT=	Openstreetmap mapping program

LICENSE=	GPLv2
LICENSE_FILE=	${WRKSRC}/LICENSE

LIB_DEPENDS=	libgdal.so:graphics/gdal \
		libproj.so:graphics/proj \
		libquazip1-qt5.so:archivers/quazip

USES=		compiler:c++11-lang gnome pkgconfig qmake qt:5 sqlite:3
USE_GITHUB=	yes
GH_ACCOUNT=	openstreetmap
USE_LDCONFIG=	yes

CFLAGS+=	"-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1"

QMAKE_ARGS=	SYSTEM_QUAZIP=1
USE_QT=		buildtools_build \
		concurrent core gui imageformats network printsupport svg \
		webkit widgets xml

OPTIONS_DEFINE=	DEBUG GEOIMAGE NLS PROTOBUF ZBAR
OPTIONS_DEFAULT=	GEOIMAGE

GEOIMAGE_DESC=	Enable geotagged images (needs exiv2)
GEOIMAGE_QMAKE_ON=	GEOIMAGE=1
GEOIMAGE_LIB_DEPENDS=	libexiv2.so:graphics/exiv2

PROTOBUF_DESC=	Protobuf Binary Format support
PROTOBUF_QMAKE_ON=	PROTOBUF=1
PROTOBUF_LIB_DEPENDS=	libprotobuf.so:devel/protobuf

ZBAR_DESC=	Read barcodes from walking papers (BROKEN)
ZBAR_QMAKE_ON=	ZBAR=1
ZBAR_LIB_DEPENDS=	libzbar.so:graphics/zbar
# graphics/zbar needs to be built with Qt support (and needs a Qt5 version)
ZBAR_BROKEN=	Does not build with option ZBAR selected

DEBUG_QMAKE_OFF=	NODEBUG=1 RELEASE=1

NLS_USES=	qt:5
NLS_USE=	QT=linguisttools_build

INSTALLS_ICONS= yes

OPTIONS_SUB=	yes

pre-build-NLS-on:
	@cd ${WRKSRC}/translations && ${LRELEASE} ../src/src.pro

pre-build-PROTOBUF-on:
	@cd ${WRKSRC}/src/ImportExport && ${LOCALBASE}/bin/protoc --cpp_out=. \
		fileformat.proto osmformat.proto

post-install-NLS-on:
	@${MKDIR} ${STAGEDIR}${DATADIR}/translations
	@(cd ${WRKSRC}/translations && ${COPYTREE_SHARE} "merkaartor_*.qm" \
		${STAGEDIR}${DATADIR}/translations)

.include <bsd.port.mk>