aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2020-07-19 17:39:36 +0000
committerPiotr Kubaj <pkubaj@FreeBSD.org>2020-07-19 17:39:36 +0000
commit9fbd58c15f4072feead414f0bdc114f4639f4553 (patch)
tree1d8c379ae7a50cb94ae22ff80b5f66215ce5e50d /graphics
parent7e12e6805635b130e08eeed7be82757a44a06f10 (diff)
downloadports-9fbd58c15f4072feead414f0bdc114f4639f4553.tar.gz
ports-9fbd58c15f4072feead414f0bdc114f4639f4553.zip
MFH: r542589
graphics/dspdfviewer: fix build on GCC architectures To build with Qt5, use C++11 compiler. Hide Clang-only flags behind .if and add one for GCC. Approved by: portmgr (fix build blanket)
Notes
Notes: svn path=/branches/2020Q3/; revision=542590
Diffstat (limited to 'graphics')
-rw-r--r--graphics/dspdfviewer/Makefile12
1 files changed, 9 insertions, 3 deletions
diff --git a/graphics/dspdfviewer/Makefile b/graphics/dspdfviewer/Makefile
index 986bc9da665c..fa50d7ee943d 100644
--- a/graphics/dspdfviewer/Makefile
+++ b/graphics/dspdfviewer/Makefile
@@ -15,7 +15,7 @@ LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libboost_program_options.so:devel/boost-libs \
libpoppler-qt5.so:graphics/poppler-qt5
-USES= cmake:insource pkgconfig qt:5
+USES= cmake:insource compiler:c++11-lang pkgconfig qt:5
USE_QT= core gui linguisttools widgets xml buildtools_build qmake_build
USE_LDCONFIG= yes
@@ -35,22 +35,28 @@ PLIST_FILES= bin/dspdfviewer \
.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
+.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200039 && ${CHOSEN_COMPILER_TYPE} == clang
CFLAGS+= -Wno-error=zero-as-null-pointer-constant
.endif
# Fixes build failure for Clang 8.0.0
-.if ${OPSYS} == FreeBSD && (${OSVERSION} >= 1300014 || (${OSVERSION} >= 1103000 && ${OSVERSION} < 1200000) || ${OSVERSION} >= 1201000)
+.if ${OPSYS} == FreeBSD && (${OSVERSION} >= 1300014 || (${OSVERSION} >= 1103000 && ${OSVERSION} < 1200000) || ${OSVERSION} >= 1201000) && ${CHOSEN_COMPILER_TYPE} == clang
CFLAGS+= -Wno-error=extra-semi-stmt
.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>