Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Nov 2020 22:41:56 +0000 (UTC)
From:      Matthias Andree <mandree@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r554991 - head/graphics/rawtherapee
Message-ID:  <202011122241.0ACMfuSC079034@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mandree
Date: Thu Nov 12 22:41:56 2020
New Revision: 554991
URL: https://svnweb.freebsd.org/changeset/ports/554991

Log:
  graphics/rawtherapee: build stability improvements
  
  - on some systems, the base binutils's ar does not support --plugin.
    Use BINARY_ALIAS to make sure the port/package binutils's ar and
    ranlib are used. [1]
  
  - while here, disable TCMALLOC on FreeBSD 11, which appears to cause
    strange errors in the run-time self-tests
    -> bump PORTREVISION to flush out old packages
  
  - while here, rearrange a bit per portclippy's suggestions
  
  PR:		251041 [1]
  PR:		240594 comment #9 [1]
  Reported by:	rozhuk.im@gmail.com [1]

Modified:
  head/graphics/rawtherapee/Makefile

Modified: head/graphics/rawtherapee/Makefile
==============================================================================
--- head/graphics/rawtherapee/Makefile	Thu Nov 12 21:30:35 2020	(r554990)
+++ head/graphics/rawtherapee/Makefile	Thu Nov 12 22:41:56 2020	(r554991)
@@ -3,7 +3,7 @@
 
 PORTNAME=	rawtherapee
 PORTVERSION=	5.8
-PORTREVISION=	6
+PORTREVISION=	7
 CATEGORIES=	graphics
 MASTER_SITES=	https://rawtherapee.com/shared/source/ \
 		LOCAL/mandree/
@@ -32,28 +32,33 @@ USES=		cmake desktop-file-utils compiler:gcc-c++11-lib
 		jpeg localbase:ldflags pkgconfig tar:xz
 
 DOS2UNIX_REGEX=	.*\.(cc|h)
-USE_GNOME=	gtkmm30 librsvg2
-INSTALLS_ICONS=	yes
 
 # Binutils required for LTO (base ar/nm/ld/ranlib don't work)
 USE_BINUTILS=	yes
 
 # As of 2019-09-29, this port is known to be miscompiled by clang90
 # (SIGSEGV or SIBGUS) and 12.1's base clang.
-#
-# so we shall stick to GCC 9.x for now
+# So we shall stick to GCC 9.x for now
 USE_GCC=	9+
 
+USE_GNOME=	gtkmm30 librsvg2
+INSTALLS_ICONS=	yes
+
 _LTO_FLAGS=	-flto=${MAKE_JOBS_NUMBER}
 # gcc needs -flto=${MAKE_JOBS_NUMBER} for parallel link (fixed in GCC 10?)
 #     and does not understand -flto=thin
 #
 # llvm/clang needs -flto=thin and will automatically parallelize the link
+
+# 11.x has binutils that don't accept a --plugin option,
+# and gcc-ar9 appears to grab those, so make sure that USE_BINUTILS
+# override those in /usr/bin which usually is first in the PATH,
+# before ${LOCALBASE}/bin.  (For some reason, poudriere does not trigger this.)
+# Fixes https://bugs.freebsd.org/251041
+BINARY_ALIAS+=	ar=${AR} ranlib=${RANLIB}
 #
 _AR=		${CC:S/gcc/gcc-ar/}
 _RANLIB=	${CC:S/gcc/gcc-ranlib/}
-CFLAGS+=	-I${LOCALBASE}/include -fPIC ${_LTO_FLAGS} ${_OPT_FLAGS}
-LDFLAGS+=	-Wl,--as-needed -lpthread ${_LTO_FLAGS} ${_OPT_FLAGS}
 CMAKE_ARGS+=	-DDOCDIR="${DOCSDIR}" \
 		-DCREDITSDIR="${DOCSDIR}" \
 		-DLICENCEDIR="${DOCSDIR}" \
@@ -68,6 +73,8 @@ CMAKE_ARGS+=	-DDOCDIR="${DOCSDIR}" \
 # any more. The CMP0056 policy must be explicitly set to NEW to ensure
 # linker flags are passed. Else -lomp is not found with clang.
 # See: https://cmake.org/cmake/help/v3.4/policy/CMP0056.html
+CFLAGS+=	-I${LOCALBASE}/include -fPIC ${_LTO_FLAGS} ${_OPT_FLAGS}
+LDFLAGS+=	-Wl,--as-needed -lpthread ${_LTO_FLAGS} ${_OPT_FLAGS}
 
 .if defined(PACKAGE_BUILDING) && empty(CFLAGS:M-march*) && (${ARCH} == i386 || ${ARCH} == amd64 || ${ARCH} == aarch64)
 # this gets translated to -mtune=generic, see ${WRKSRC}/ProcessorTargets.cmake
@@ -83,17 +90,19 @@ CMAKE_ARGS+=	-DCMAKE_C_COMPILER_LAUNCHER=${CCACHE_BIN}
 .endif
 
 OPTIONS_DEFINE=		DOCS NATIVE
-OPTIONS_DEFINE_i386=	OPENMP TCMALLOC
 OPTIONS_DEFINE_amd64=	OPENMP TCMALLOC
+OPTIONS_DEFINE_i386=	OPENMP TCMALLOC
 OPTIONS_DEFAULT=	OPENMP TCMALLOC
-OPENMP_DESC=		Enable OpenMP parallel processing (i386/amd64 only)
+# For some reason, 11.4-amd64 fails run-time tests with TCMALLOC, strip out:
+OPTIONS_EXCLUDE_FreeBSD_11=	TCMALLOC
 NATIVE_DESC=		Use -march=native (avoid for generic packages!)
+OPENMP_DESC=		Enable OpenMP parallel processing (i386/amd64 only)
 TCMALLOC_DESC=		Use Google's tcmalloc instead of system allocator
 
 OPENMP_CMAKE_BOOL=	OPTION_OMP
 
-TCMALLOC_CMAKE_BOOL=	ENABLE_TCMALLOC
 TCMALLOC_LIB_DEPENDS=	libtcmalloc.so:devel/google-perftools
+TCMALLOC_CMAKE_BOOL=	ENABLE_TCMALLOC
 
 .include <bsd.port.options.mk>
 
@@ -109,7 +118,7 @@ TCMALLOC_LIB_DEPENDS=	libtcmalloc.so:devel/google-perf
 #
 # Tier-2 only supported on the latest stable FreeBSD release.
 ONLY_FOR_ARCHS=	amd64
-ONLY_FOR_ARCHS_REASON= On i386, rawtherapee malfunctions under FreeBSD 11.x - upgrade to 12.x
+ONLY_FOR_ARCHS_REASON=On i386, rawtherapee malfunctions under FreeBSD 11.x - upgrade to 12.x
 .endif
 
 .if (${OPSYS} == FreeBSD) && (${OSVERSION} >= 1300000)
@@ -167,7 +176,7 @@ _check_version=	${PKGVERSION:C/.g0//}
 _env=		LANG= LC_ALL=C LANGUAGE= DISPLAY= HOME="$$TMP" RT_SETTINGS=${WRKDIR}/rt-config RT_CACHE="$$TMP/rtcache"
 post-install:
 	@${ECHO_MSG} "===> Running smoke tests"
-	@${RM} -f ${WRKDIR}/selftest.exitcodes ${WRKDIR}/selftest.expect 
+	@${RM} -f ${WRKDIR}/selftest.exitcodes ${WRKDIR}/selftest.expect
 	@${RM} -rf ${WRKDIR}/rt-config
 	${MKDIR} ${WRKDIR}/rt-config ${WRKDIR}/rt-config/dcpprofiles ${WRKDIR}/rt-config/profiles
 	${CP} ${WRKSRC}/rtengine/camconst.json ${WRKDIR}/rt-config



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