Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Jul 2019 02:25:07 +0000 (UTC)
From:      Mark Linimon <linimon@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r506432 - in head: audio/libcoverart audio/nekobi-lv2 benchmarks/netperfmeter chinese/pyzy comms/ncid databases/postgis25 games/diaspora graphics/gimmage graphics/pcl-pointclouds graphi...
Message-ID:  <201907120225.x6C2P7b4029273@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: linimon
Date: Fri Jul 12 02:25:07 2019
New Revision: 506432
URL: https://svnweb.freebsd.org/changeset/ports/506432

Log:
  Prepare for powerpc-on-clang by deleting hard-coded tests for libstdc++.so
  as a stand-in for "are we running on gcc".
  
  For people already testing powerpc on clang, it is possible that they
  already have both compilers in base.  Thus, the assumption that "gcc is
  in base" (e.g.  libstdc++.so exists) always means "force use of GCC" is
  already broken.  It will be for everyone on -CURRENT once the switch is
  made.
  
  While here, standardize on compiler:c++11-lang instead of -lib (they are
  equivalent these days), pet portlint, and do some other cleanup.
  
  Approved by:	portmgr (tier-2 blanket)

Modified:
  head/audio/libcoverart/Makefile
  head/audio/nekobi-lv2/Makefile
  head/benchmarks/netperfmeter/Makefile
  head/chinese/pyzy/Makefile
  head/comms/ncid/Makefile
  head/databases/postgis25/Makefile
  head/games/diaspora/Makefile
  head/graphics/gimmage/Makefile
  head/graphics/pcl-pointclouds/Makefile
  head/graphics/pqiv/Makefile
  head/lang/libobjc2/Makefile
  head/math/rexx-regmath/Makefile
  head/multimedia/dvb-apps/Makefile
  head/multimedia/gstreamer1-transcoder/Makefile
  head/science/openbabel/Makefile
  head/security/clamav/Makefile
  head/security/libfido2/Makefile
  head/security/opensc/Makefile
  head/security/yubico-piv-tool/Makefile
  head/www/libepc/Makefile
  head/x11-fm/worker/Makefile

Modified: head/audio/libcoverart/Makefile
==============================================================================
--- head/audio/libcoverart/Makefile	Fri Jul 12 02:14:23 2019	(r506431)
+++ head/audio/libcoverart/Makefile	Fri Jul 12 02:25:07 2019	(r506432)
@@ -21,7 +21,9 @@ USE_LDCONFIG=	yes
 
 CXXFLAGS+=	-Wno-implicit-fallthrough
 
-.if exists(/usr/lib/libstdc++.so)
+.include <bsd.port.pre.mk>
+
+.if ${CHOSEN_COMPILER_TYPE} == gcc
 CXXFLAGS+=	-Wno-unused-function -Wno-class-memaccess -Wno-catch-value
 CFLAGS+=	-Wno-format-overflow
 .endif
@@ -30,4 +32,4 @@ post-patch:
 	${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \
 		 ${WRKSRC}/cmake/modules/*.cmake
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Modified: head/audio/nekobi-lv2/Makefile
==============================================================================
--- head/audio/nekobi-lv2/Makefile	Fri Jul 12 02:14:23 2019	(r506431)
+++ head/audio/nekobi-lv2/Makefile	Fri Jul 12 02:25:07 2019	(r506432)
@@ -29,7 +29,9 @@ USE_XORG=	x11
 CFLAGS+=	-I${FILESDIR}
 CFLAGS+=	-Wno-c++11-narrowing # clang prints errors: https://github.com/DISTRHO/Nekobi/issues/7
 
-.if exists(/usr/lib/libstdc++.so)
+.include <bsd.port.pre.mk>
+
+.if ${CHOSEN_COMPILER_TYPE} == gcc
 post-patch:
 	@${REINPLACE_CMD} -e 's/-mtune=generic -msse -msse2 //' \
 		${WRKSRC}/dpf/Makefile.base.mk
@@ -40,4 +42,4 @@ do-install: # https://github.com/DISTRHO/Nekobi/issues
 	cd ${WRKSRC}/bin && ${COPYTREE_SHARE} Nekobi.lv2 ${STAGEDIR}${PREFIX}/lib/lv2/
 	${INSTALL_PROGRAM} ${WRKSRC}/bin/Nekobi ${STAGEDIR}${PREFIX}/bin
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Modified: head/benchmarks/netperfmeter/Makefile
==============================================================================
--- head/benchmarks/netperfmeter/Makefile	Fri Jul 12 02:14:23 2019	(r506431)
+++ head/benchmarks/netperfmeter/Makefile	Fri Jul 12 02:25:07 2019	(r506432)
@@ -12,15 +12,17 @@ COMMENT=	Network Performance Meter
 LICENSE=	GPLv3+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		cmake shebangfix
+USES=		cmake compiler shebangfix
 CMAKE_ON=	BUILD_PLOT_PROGRAMS
 CMAKE_OFF=	BUILD_TEST_PROGRAMS WITH_NEAT
 SHEBANG_FILES=	src/pdfembedfonts src/pdfmetadata src/plot-netperfmeter-results
 
+.include <bsd.port.pre.mk>
+
 post-patch:
-.if exists(/usr/lib/libstdc++.so)
+.if ${CHOSEN_COMPILER_TYPE} == gcc
 	@${REINPLACE_CMD} 's, -Wno-array-bounds,,g' ${WRKSRC}/CMakeLists.txt
 .endif
 	@${REINPLACE_CMD} 's,share/man,man,' ${WRKSRC}/CMakeLists.txt
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Modified: head/chinese/pyzy/Makefile
==============================================================================
--- head/chinese/pyzy/Makefile	Fri Jul 12 02:14:23 2019	(r506431)
+++ head/chinese/pyzy/Makefile	Fri Jul 12 02:25:07 2019	(r506432)
@@ -20,7 +20,7 @@ LIB_DEPENDS=	libsqlite3.so:databases/sqlite3
 USE_GITHUB=	yes
 GH_TAGNAME=	6d9c3cd
 
-USES=		compiler:c++11-lib gmake libtool pkgconfig python:2.7,build shebangfix autoreconf gettext-runtime pathfix
+USES=		compiler:c++11-lang gmake libtool pkgconfig python:2.7,build shebangfix autoreconf gettext-runtime pathfix
 SHEBANG_FILES=	data/db/android/create_db.py
 USE_GNOME=	glib20
 USE_LDCONFIG=	yes
@@ -36,11 +36,13 @@ OPENCC_DESC=	Use opencc for simplified and traditional
 OPENCC_CONFIGURE_ENABLE=	opencc
 OPENCC_LIB_DEPENDS=		libopencc.so:chinese/opencc
 
-.if exists(/usr/lib/libstdc++.so)
+.include <bsd.port.pre.mk>
+
+.if ${CHOSEN_COMPILER_TYPE} == gcc
 CXXFLAGS+=	-Wno-error=narrowing
 .endif
 
 post-install:
 	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}-1.0.so
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Modified: head/comms/ncid/Makefile
==============================================================================
--- head/comms/ncid/Makefile	Fri Jul 12 02:14:23 2019	(r506431)
+++ head/comms/ncid/Makefile	Fri Jul 12 02:25:07 2019	(r506432)
@@ -45,6 +45,8 @@ post-extract:
 	@cd ${WRKSRC}/FreeBSD;for i in *.rc; do \
 		x=`echo $$i | cut -f 1 -d .`; ${CP} $$i $$x; done
 
+.include <bsd.port.pre.mk>
+
 post-patch:
 	@${GREP} -lr 'etc/ncid' ${WRKSRC}/ | ${XARGS} ${REINPLACE_CMD} -Ee \
 		's,(/usr/local/etc/ncid | /etc/ncid),${ETCDIR},g'
@@ -59,7 +61,7 @@ post-patch:
 		-e 's|$$(prefix)/share|$${PREFIX}/share|g' \
 		-e 's|$$(SHARE)/man|$${MANPREFIX}/man/|g' \
 		-e 's|$$(SHARE)/ncid|$${DATADIR}|g' ${WRKSRC}/Makefile
-.if exists(/usr/lib/libstdc++.so)
+.if ${CHOSEN_COMPILER_TYPE} == gcc
 	@${REINPLACE_CMD} -e 's|-Wno-stringop-truncation||g' \
 		${WRKSRC}/Makefile ${WRKSRC}/server/Makefile
 .endif
@@ -130,4 +132,4 @@ post-install-LOGROTATE-on:
 	${INSTALL_MAN} ${WRKSRC}/logrotate/*.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
 	${INSTALL_MAN} ${WRKSRC}/logrotate/*.5 ${STAGEDIR}${MAN5PREFIX}/man/man5
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Modified: head/databases/postgis25/Makefile
==============================================================================
--- head/databases/postgis25/Makefile	Fri Jul 12 02:14:23 2019	(r506431)
+++ head/databases/postgis25/Makefile	Fri Jul 12 02:25:07 2019	(r506432)
@@ -20,7 +20,7 @@ LIB_DEPENDS=	libproj.so:graphics/proj \
 
 CONFLICTS_INSTALL=	postgis20  postgis21 postgis22 postgis23 postgis24
 
-USES=		alias gettext gmake gnome iconv:wchar_t libtool:keepla \
+USES=		alias compiler gettext gmake gnome iconv:wchar_t libtool:keepla \
 		localbase perl5 pkgconfig pgsql:9.4+ shebangfix
 USE_GNOME=	libxml2
 USE_LDCONFIG=	yes
@@ -56,8 +56,10 @@ VER=		${PORTVERSION:R}
 PLIST_SUB=	PORTVERSION=${PORTVERSION} \
 		VER=${VER}
 
+.include <bsd.port.pre.mk>
+
+.if ${CHOSEN_COMPILER_TYPE} == gcc
 post-patch:
-.if exists(/usr/lib/libstdc++.so)
 	${REINPLACE_CMD} -e '/^#pragma GCC diagnostic/d' \
 		${WRKSRC}/postgis/lwgeom_functions_basic.c \
 		${WRKSRC}/postgis/lwgeom_geos.c
@@ -72,4 +74,4 @@ post-install:
 	${MKDIR} ${STAGEDIR}${DATADIR}/utils
 	(cd ${WRKSRC}/utils/ && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/utils/ "! ( -name *\.orig -o -name *\.bak -o -name Makefile -o -name *\.in -o -name uninstall_script )" )
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Modified: head/games/diaspora/Makefile
==============================================================================
--- head/games/diaspora/Makefile	Fri Jul 12 02:14:23 2019	(r506431)
+++ head/games/diaspora/Makefile	Fri Jul 12 02:25:07 2019	(r506432)
@@ -25,13 +25,15 @@ LICENSE_FILE_VOLITION=	${WRKSRC}/COPYING
 LICENSE_FILE_GPLv2=	${WRKDIR_DIASPORA}/wxlauncher/GPLv2.txt
 LICENSE_PERMS_VOLITION=	dist-mirror no-dist-sell pkg-mirror no-pkg-sell auto-accept
 
+BROKEN_aarch64=		Fails to compile: cast from pointer to smaller type loses information
+
 LIB_DEPENDS=	libjansson.so:devel/jansson \
 		libpng.so:graphics/png \
 		libogg.so:audio/libogg \
 		libvorbisfile.so:audio/libvorbis \
 		libtheora.so:multimedia/libtheora
 
-USES=		autoreconf gl jpeg lua:51 openal pkgconfig sdl tar:lzma
+USES=		autoreconf compiler gl jpeg lua:51 openal pkgconfig sdl tar:lzma
 USE_CXXSTD=	gnu++98
 USE_GL=		gl glu
 USE_SDL=	sdl
@@ -70,9 +72,9 @@ WXLAUNCHER_VARS=	PORTDATA+="resources *.ini *.png *.bm
 
 POST_PLIST+=	build-plist-empty
 
-BROKEN_aarch64=		Fails to compile: cast from pointer to smaller type loses information
+.include <bsd.port.pre.mk>
 
-.if exists(/usr/lib/libstdc++.so)
+.if ${CHOSEN_COMPILER_TYPE} == gcc
 CXXFLAGS+=	-fpermissive
 .endif
 
@@ -131,4 +133,4 @@ build-plist-empty: .SILENT
 	${FIND} ${STAGEDIR}${DATADIR}/data -type d -empty | \
 		${SED} -e 's|^${STAGEDIR}|@dir |' >> ${TMPPLIST}
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Modified: head/graphics/gimmage/Makefile
==============================================================================
--- head/graphics/gimmage/Makefile	Fri Jul 12 02:14:23 2019	(r506431)
+++ head/graphics/gimmage/Makefile	Fri Jul 12 02:25:07 2019	(r506432)
@@ -28,10 +28,12 @@ NLS_CONFIGURE_ENABLE=	gettext
 
 CONFIGURE_ARGS=	--with-libintl-prefix=${LOCALBASE}
 
-.if !exists(/usr/lib/libstdc++.so)
+.include <bsd.port.pre.mk>
+
+.if ! ${CHOSEN_COMPILER_TYPE} == gcc
 CXXFLAGS+=	-Wc++11-extensions -Wc++11-long-long \
 		-Wunused-command-line-argument -Wreturn-type \
 		-Wwritable-strings -Wlogical-op-parentheses
 .endif
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Modified: head/graphics/pcl-pointclouds/Makefile
==============================================================================
--- head/graphics/pcl-pointclouds/Makefile	Fri Jul 12 02:14:23 2019	(r506431)
+++ head/graphics/pcl-pointclouds/Makefile	Fri Jul 12 02:25:07 2019	(r506432)
@@ -27,7 +27,7 @@ LIB_DEPENDS=	libboost_system.so:devel/boost-libs \
 		libpcap.so:net/libpcap \
 		libtiff.so:graphics/tiff
 
-USES=		cmake eigen:3 jpeg python
+USES=		cmake compiler eigen:3 jpeg python
 USE_GITHUB=	yes
 GH_ACCOUNT=	PointCloudLibrary
 USE_XORG=	x11 xext xt ice sm
@@ -60,7 +60,9 @@ VTK_CMAKE_BOOL=		WITH_VTK
 VTK_LIB_DEPENDS=	libvtkCommonCore-8.1.so:math/vtk8
 VTK_BROKEN=		VTK has missing ompxx symbols: https://gitlab.kitware.com/vtk/vtk/issues/17444
 
-.if !exists(/usr/lib/libstdc++.so)
+.include <bsd.port.pre.mk>
+
+.if ${CHOSEN_COMPILER_TYPE} == clang
 # use clang from ports because cmake can't find OpenMP with base clang, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223678
 # This should also be an port option, but PCL fails to build w/out OpenMP: https://github.com/PointCloudLibrary/pcl/issues/2638
 BUILD_DEPENDS+=	clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT}
@@ -74,4 +76,4 @@ USE_GCC=	yes
 post-patch:  # 10 doesn't have std::sqrt, switching to ::sqrt from math.h
 	@${GREP} -rl std::sqrt ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e 's|::std::sqrt|::sqrt|g ; s|std::sqrt|::sqrt|g'
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Modified: head/graphics/pqiv/Makefile
==============================================================================
--- head/graphics/pqiv/Makefile	Fri Jul 12 02:14:23 2019	(r506431)
+++ head/graphics/pqiv/Makefile	Fri Jul 12 02:25:07 2019	(r506432)
@@ -32,7 +32,7 @@ WAND_DESC=		ImageMagick image processing support
 
 OPTIONS_DEFAULT=	GTK2 PIXBUF
 
-USES=		gettext-runtime gmake gnome pkgconfig
+USES=		compiler gettext-runtime gmake gnome pkgconfig
 USE_XORG=	x11
 USE_GNOME=	cairo gdkpixbuf2
 HAS_CONFIGURE=	yes
@@ -68,8 +68,10 @@ MAKEFILE=	GNUmakefile
 PORTDOCS=	README.markdown
 PLIST_FILES=	bin/pqiv man/man1/pqiv.1.gz
 
+.include <bsd.port.pre.mk>
+
+.if ${CHOSEN_COMPILER_TYPE} == gcc
 post-patch:
-.if exists(/usr/lib/libstdc++.so)
 	@${REINPLACE_CMD} -e '/#pragma GCC diagnostic/d' \
 		-e '/PQIV_DISABLE_PEDANTIC/d' \
 		-e '/PQIV_ENABLE_PEDANTIC/d' \
@@ -82,4 +84,4 @@ do-install:
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 	${INSTALL_DATA} ${WRKSRC}/README.markdown ${STAGEDIR}${DOCSDIR}
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Modified: head/lang/libobjc2/Makefile
==============================================================================
--- head/lang/libobjc2/Makefile	Fri Jul 12 02:14:23 2019	(r506431)
+++ head/lang/libobjc2/Makefile	Fri Jul 12 02:25:07 2019	(r506432)
@@ -5,14 +5,15 @@ PORTNAME=	libobjc2
 PORTVERSION=	2.0
 PORTREVISION=	1
 CATEGORIES=	lang devel gnustep
-LICENSE=	MIT
 
 MAINTAINER=	theraven@FreeBSD.org
 COMMENT=	Replacement Objective-C runtime supporting modern Objective-C features
 
+LICENSE=	MIT
+
 BROKEN_powerpc=		Does not compile on powerpc: Unsupported relocation type 10
 BROKEN_sparc64=		Does not compile on sparc64: Cannot configure clang properly
-USES=		cmake objc:compiler
+USES=		cmake compiler objc:compiler
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	gnustep
@@ -27,11 +28,14 @@ PLIST_SUB+=	SHLIB_MAJOR=${SHLIB_MAJOR} SHLIB_MINOR=${S
 
 CMAKE_ARGS+=	-DLIB_INSTALL_PATH=lib
 CMAKE_ARGS+=	-DTESTS=OFF
-.if exists(/usr/lib/libstdc++.so)
+
+.include <bsd.port.pre.mk>
+
+.if ${CHOSEN_COMPILER_TYPE} == gcc
 CXXFLAGS+=	-stdlib=libstdc++
 .endif
 
 post-install:
 	${LN} -sf libobjc.so.${SHLIB_MAJOR}.${SHLIB_MINOR} ${STAGEDIR}${PREFIX}/lib/libobjc.so.${SHLIB_MAJOR}
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Modified: head/math/rexx-regmath/Makefile
==============================================================================
--- head/math/rexx-regmath/Makefile	Fri Jul 12 02:14:23 2019	(r506431)
+++ head/math/rexx-regmath/Makefile	Fri Jul 12 02:25:07 2019	(r506432)
@@ -17,7 +17,7 @@ LICENSE=	MPL10
 
 BUILD_DEPENDS=	rexx:lang/rexx-regina
 
-USES=		zip
+USES=		compiler zip
 
 WRKSRC=		${WRKDIR}/math
 USE_LDCONFIG=	yes
@@ -32,7 +32,9 @@ PORTEXAMPLES=	README testrxmath testrexxmath
 
 OPTIONS_DEFINE=	DOCS EXAMPLES
 
-.if !exists(/usr/lib/libstdc++.so)
+.include <bsd.port.pre.mk>
+
+.if ! ${CHOSEN_COMPILER_TYPE} == gcc
 CFLAGS+=	-Wno-incompatible-pointer-types
 .endif
 
@@ -51,4 +53,4 @@ do-install-EXAMPLES-on:
 		${INSTALL_DATA} ${WRKDIR}/testrxmath ${STAGEDIR}${EXAMPLESDIR}/
 		${INSTALL_DATA} ${WRKDIR}/testrexxmath ${STAGEDIR}${EXAMPLESDIR}/
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Modified: head/multimedia/dvb-apps/Makefile
==============================================================================
--- head/multimedia/dvb-apps/Makefile	Fri Jul 12 02:14:23 2019	(r506431)
+++ head/multimedia/dvb-apps/Makefile	Fri Jul 12 02:25:07 2019	(r506432)
@@ -16,13 +16,15 @@ LICENSE_FILE=	${WRKSRC}/COPYING.LGPL
 BUILD_DEPENDS=	${LOCALBASE}/include/linux/dvb/version.h:multimedia/v4l_compat \
 		${LOCALBASE}/include/linux/input.h:devel/evdev-proto
 
-USES=		gmake iconv localbase:ldflags perl5 tar:bzip2
+USES=		compiler gmake iconv localbase:ldflags perl5 tar:bzip2
 
 USE_LDCONFIG=	yes
 USE_PERL5=	build
 
 MAKE_ARGS+=	prefix="${PREFIX}"
 
+.include <bsd.port.pre.mk>
+
 post-patch:
 	@${REINPLACE_CMD} 's|/usr/include|${LOCALBASE}/include|' \
 		${WRKSRC}/Makefile \
@@ -47,9 +49,9 @@ post-patch:
 		${WRKSRC}/test/test_vevent.c \
 		${WRKSRC}/test/test_stillimage.c \
 		${WRKSRC}/test/test_av.c
-.if exists(/usr/lib/libstdc++.so)
+.if ${CHOSEN_COMPILER_TYPE} == gcc
 	@${REINPLACE_CMD} -e 's/-Wno-packed-bitfield-compat//' \
 		${WRKSRC}/util/scan/Makefile
 .endif
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Modified: head/multimedia/gstreamer1-transcoder/Makefile
==============================================================================
--- head/multimedia/gstreamer1-transcoder/Makefile	Fri Jul 12 02:14:23 2019	(r506431)
+++ head/multimedia/gstreamer1-transcoder/Makefile	Fri Jul 12 02:25:07 2019	(r506432)
@@ -13,7 +13,7 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 
 BUILD_DEPENDS=	gtkdoc-check:textproc/gtk-doc
 
-USES=		gnome meson pkgconfig python:3.3+ #shebangfix
+USES=		compiler gnome meson pkgconfig python:3.3+ #shebangfix
 USE_GNOME=	introspection
 USE_GSTREAMER1=	core
 USE_LDCONFIG=	yes
@@ -25,10 +25,12 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	pitivi
 GH_PROJECT=	gst-transcoder
 
+.include <bsd.port.pre.mk>
+
+.if ${CHOSEN_COMPILER_TYPE} == gcc
 post-patch:
-.if exists(/usr/lib/libstdc++.so)
 	${REINPLACE_CMD} -e '/-Wno-pedantic/d' \
 		${WRKSRC}/meson.build
 .endif
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Modified: head/science/openbabel/Makefile
==============================================================================
--- head/science/openbabel/Makefile	Fri Jul 12 02:14:23 2019	(r506431)
+++ head/science/openbabel/Makefile	Fri Jul 12 02:25:07 2019	(r506432)
@@ -37,7 +37,9 @@ GUI_CMAKE_BOOL=	BUILD_GUI
 GUI_CMAKE_ON=	-DwxWidgets_CONFIG_EXECUTABLE:STRING=${WX_CONFIG}
 GUI_USE=	WX=3.0
 
-.if exists(/usr/lib/libstdc++.so)
+.include <bsd.port.pre.mk>
+
+.if ${CHOSEN_COMPILER_TYPE} == gcc
 CXXFLAGS+=	-Wno-narrowing
 USE_CXXSTD=	c++11
 .endif
@@ -52,4 +54,4 @@ post-patch-CAIRO-off:
 	${REINPLACE_CMD} -e '/find_package(Cairo)/d' \
 		${WRKSRC}/CMakeLists.txt
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Modified: head/security/clamav/Makefile
==============================================================================
--- head/security/clamav/Makefile	Fri Jul 12 02:14:23 2019	(r506431)
+++ head/security/clamav/Makefile	Fri Jul 12 02:25:07 2019	(r506432)
@@ -15,7 +15,7 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 LIB_DEPENDS=	libltdl.so:devel/libltdl \
 		libcurl.so:ftp/curl
 
-USES=		cpe gmake gnome libtool ncurses pathfix pkgconfig ssl
+USES=		compiler cpe gmake gnome libtool ncurses pathfix pkgconfig ssl
 USE_RC_SUBR=	clamav-clamd clamav-freshclam
 USE_LDCONFIG=	yes
 
@@ -144,6 +144,8 @@ SED_CONF=	-E -e 's|^\#?(Example)$$|\#\1|' \
 		-e 's|^\#?(MilterSocket) */tmp.*$$|\1 ${CLAMAV_MILTER_SOCKET}|' \
 		-e 's|^\#?(ClamdSocket).*$$|\1 unix:${CLAMAV_CLAMD_SOCKET}|'
 
+.include <bsd.port.pre.mk>
+
 post-patch:
 	@${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|-lthr|g' \
 			  -e 's|LC_REVISION=22|LC_REVISION=24|' \
@@ -152,7 +154,7 @@ post-patch:
 		${WRKSRC}/etc/clamd.conf.sample \
 		${WRKSRC}/etc/freshclam.conf.sample \
 		${WRKSRC}/etc/clamav-milter.conf.sample
-.if exists(/usr/lib/libstdc++.so)
+.if ${CHOSEN_COMPILER_TYPE} == gcc
 	@${REINPLACE_CMD} -e 's|-Wno-logical-op-parentheses||' \
 			  -e 's|-Wno-dangling-else||' \
 		${WRKSRC}/libclamav/Makefile.am \
@@ -184,4 +186,4 @@ post-install:
 		  ${STAGEDIR}${RUNDIR}
 	(cd ${WRKSRC}/docs/html; ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/html)
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Modified: head/security/libfido2/Makefile
==============================================================================
--- head/security/libfido2/Makefile	Fri Jul 12 02:14:23 2019	(r506431)
+++ head/security/libfido2/Makefile	Fri Jul 12 02:25:07 2019	(r506432)
@@ -15,17 +15,21 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 LIB_DEPENDS=	libcbor.so:devel/libcbor \
 		libhidapi.so.0:comms/hidapi
 
-USES=		cmake pkgconfig ssl
+USES=		cmake compiler pkgconfig ssl
 
 CFLAGS+=	-D_WITH_GETLINE
 LDFLAGS+=	-lcrypto
 
 OPTIONS_DEFINE=	DOCS
 
+.include <bsd.port.pre.mk>
+
 post-patch:
 	@${REINPLACE_CMD} -e '/libcrypto/d' ${WRKSRC}/CMakeLists.txt
 	@${REINPLACE_CMD} -e 's|share/man|man|' ${WRKSRC}/man/CMakeLists.txt
 	@${REINPLACE_CMD} -e 's|endian.h|sys/&|' ${WRKSRC}/CMakeLists.txt ${WRKSRC}/openbsd-compat/openbsd-compat.h
+.if ${CHOSEN_COMPILER_TYPE} == gcc
 	@${REINPLACE_CMD} -e '/-Wno-unused-result/d; /-Wno-discarded-qualifiers/d' ${WRKSRC}/CMakeLists.txt
+.endif
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Modified: head/security/opensc/Makefile
==============================================================================
--- head/security/opensc/Makefile	Fri Jul 12 02:14:23 2019	(r506431)
+++ head/security/opensc/Makefile	Fri Jul 12 02:25:07 2019	(r506432)
@@ -11,7 +11,7 @@ COMMENT=	Libraries and utilities to access smart cards
 
 LICENSE=	LGPL21
 
-USES=		libtool pkgconfig gmake ssl autoreconf
+USES=		autoreconf compiler gmake libtool pkgconfig ssl
 
 OPTIONS_SINGLE=	BACKEND
 OPTIONS_SINGLE_BACKEND=PCSC OPENCT CTAPI
@@ -66,10 +66,12 @@ CONFIGURE_ENV+=	XSLTPROC="${FALSE}"
 CONFIGURE_ARGS+=--without-xsl-stylesheetsdir
 .endif
 
+.include <bsd.port.pre.mk>
+
+.if ${CHOSEN_COMPILER_TYPE} == gcc
 post-patch:
-.if exists(/usr/lib/libstdc++.so)
 	${REINPLACE_CMD} -e '/-Wno-unused-but-set-variable/d' \
 		${WRKSRC}/src/tools/Makefile.am
 .endif
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Modified: head/security/yubico-piv-tool/Makefile
==============================================================================
--- head/security/yubico-piv-tool/Makefile	Fri Jul 12 02:14:23 2019	(r506431)
+++ head/security/yubico-piv-tool/Makefile	Fri Jul 12 02:25:07 2019	(r506432)
@@ -15,7 +15,7 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 BUILD_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/check.pc:devel/check
 LIB_DEPENDS=	libpcsclite.so:devel/pcsc-lite
 
-USES=		gmake libtool pathfix pkgconfig ssl
+USES=		compiler gmake libtool pathfix pkgconfig ssl
 USE_LDCONFIG=	yes
 GNU_CONFIGURE=	yes
 CONFIGURE_ENV=	OPENSSL_CFLAGS="${OPENSSL_CFLAGS}" \
@@ -37,8 +37,10 @@ PLIST_FILES=	bin/yubico-piv-tool \
 		libdata/pkgconfig/ykpiv.pc \
 		man/man1/yubico-piv-tool.1.gz
 
+.include <bsd.port.pre.mk>
+
+.if ${CHOSEN_COMPILER_TYPE} == gcc
 post-patch:
-.if exists(/usr/lib/libstdc++.so)
 	@${REINPLACE_CMD} -e '/#pragma GCC diagnostic/d' \
 		${WRKSRC}/lib/ykpiv.c \
 		${WRKSRC}/lib/util.c \
@@ -46,4 +48,4 @@ post-patch:
 		${WRKSRC}/tool/yubico-piv-tool.c
 .endif
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Modified: head/www/libepc/Makefile
==============================================================================
--- head/www/libepc/Makefile	Fri Jul 12 02:14:23 2019	(r506431)
+++ head/www/libepc/Makefile	Fri Jul 12 02:25:07 2019	(r506432)
@@ -19,16 +19,19 @@ LIB_DEPENDS=	libuuid.so:misc/e2fsprogs-libuuid \
 		libavahi-common.so:net/avahi-app \
 		libavahi-ui-gtk3.so:net/avahi-gtk3
 
-USES=		gettext gmake gnome libtool pathfix pkgconfig tar:xz
+USES=		compiler gettext gmake gnome libtool pathfix pkgconfig \
+		tar:xz
 USE_GNOME=	gnomeprefix cairo gdkpixbuf2 gtk30 intltool
 USE_LDCONFIG=	yes
 GNU_CONFIGURE=	yes
 INSTALL_TARGET=	install-strip
 
+.include <bsd.port.pre.mk>
+
+.if ${CHOSEN_COMPILER_TYPE} == gcc
 post-patch:
-.if exists(/usr/lib/libstdc++.so)
 	${REINPLACE_CMD} -e '/#pragma GCC diagnostic/d' \
 		${WRKSRC}/examples/simple-publisher.c
 .endif
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Modified: head/x11-fm/worker/Makefile
==============================================================================
--- head/x11-fm/worker/Makefile	Fri Jul 12 02:14:23 2019	(r506431)
+++ head/x11-fm/worker/Makefile	Fri Jul 12 02:25:07 2019	(r506432)
@@ -45,4 +45,10 @@ LUA_USES=	lua:51
 XFT_CONFIGURE_OFF=	--disable-xft
 XFT_USE=	xorg=xft
 
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if ${CHOSEN_COMPILER_TYPE} == gcc
+CXXFLAGS+=	-Wno-error=narrowing
+.endif
+
+.include <bsd.port.post.mk>



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