aboutsummaryrefslogtreecommitdiff
path: root/graphics/dspdfviewer/Makefile
blob: 8737eb7ecec74c4cab7c2dc905a7f7e5869c0a7c (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
PORTNAME=	dspdfviewer
PORTVERSION=	1.15.1
DISTVERSIONPREFIX=	v
PORTREVISION=	41
CATEGORIES=	graphics

MAINTAINER=	fox@FreeBSD.org
COMMENT=	Dual-screen PDF viewer for LaTeX-beamer

LICENSE=	GPLv2
LICENSE_FILE=	${WRKSRC}/COPYING

LIB_DEPENDS=	libboost_program_options.so:devel/boost-libs \
		libpoppler-qt5.so:graphics/poppler-qt5

USES=		cmake:insource compiler:c++11-lang pkgconfig qt:5
USE_QT=		core gui linguisttools widgets xml buildtools_build qmake_build
USE_LDCONFIG=	yes

USE_GITHUB=	yes
GH_ACCOUNT=	dannyedel

BUILD_WRKSRC=		${WRKSRC}/build
CONFIGURE_WRKSRC=	${WRKSRC}/build
INSTALL_WRKSRC=		${WRKSRC}/build

CMAKE_ARGS=	-DBuildTests=OFF \
		-DPOPPLER_LIBRARIES=${LOCALBASE}/lib/libpoppler-qt5.so

PLIST_FILES=	bin/dspdfviewer \
		man/man1/dspdfviewer.1.gz \
		share/applications/dspdfviewer.desktop

.include <bsd.port.pre.mk>

.if ${CHOSEN_COMPILER_TYPE} == clang
# Build fails with LLVM 4.0.  Reported upstream as #191:
# https://github.com/dannyedel/dspdfviewer/issues/191
CFLAGS+=	-Wno-error=undefined-func-template
.endif

.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200039 && ${CHOSEN_COMPILER_TYPE} == clang
# (rene) also related to issue #191 which is still open as of 2020-10-21
CFLAGS+=	-Wno-error=zero-as-null-pointer-constant
.endif

# Fixes build failure for Clang 8.0.0
.if ${OPSYS} == FreeBSD && ${CHOSEN_COMPILER_TYPE} == clang
CFLAGS+=	-Wno-error=extra-semi-stmt
.endif

# Fixes build failure for Clang 11.0.0
.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1300111 && ${CHOSEN_COMPILER_TYPE} == clang
CFLAGS+=	-Wno-error=suggest-destructor-override
CFLAGS+=	-Wno-error=suggest-override
.endif

# Prepare for Qt5-5.15
CFLAGS+=	-Wno-deprecated

.if ${CHOSEN_COMPILER_TYPE} == clang
CFLAGS+=	-Wno-error=redundant-parens
.else
CFLAGS+=	-Wno-error=deprecated-declarations
.endif

.include <bsd.port.post.mk>