Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Jul 2020 17:38:43 +0000 (UTC)
From:      Piotr Kubaj <pkubaj@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r542589 - head/graphics/dspdfviewer
Message-ID:  <202007191738.06JHchBq043480@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pkubaj
Date: Sun Jul 19 17:38:43 2020
New Revision: 542589
URL: https://svnweb.freebsd.org/changeset/ports/542589

Log:
  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.
  
  MFH:		2020Q3 (fix build blanket)

Modified:
  head/graphics/dspdfviewer/Makefile

Modified: head/graphics/dspdfviewer/Makefile
==============================================================================
--- head/graphics/dspdfviewer/Makefile	Sun Jul 19 16:15:35 2020	(r542588)
+++ head/graphics/dspdfviewer/Makefile	Sun Jul 19 17:38:43 2020	(r542589)
@@ -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>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007191738.06JHchBq043480>