From owner-svn-ports-all@freebsd.org Sun Dec 29 12:34:35 2019 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1CD191DE2B6; Sun, 29 Dec 2019 12:34:35 +0000 (UTC) (envelope-from mandree@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47m0PQ71H1z4SPV; Sun, 29 Dec 2019 12:34:34 +0000 (UTC) (envelope-from mandree@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EBDE9198C5; Sun, 29 Dec 2019 12:34:34 +0000 (UTC) (envelope-from mandree@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBTCYY8j087998; Sun, 29 Dec 2019 12:34:34 GMT (envelope-from mandree@FreeBSD.org) Received: (from mandree@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBTCYYJK087997; Sun, 29 Dec 2019 12:34:34 GMT (envelope-from mandree@FreeBSD.org) Message-Id: <201912291234.xBTCYYJK087997@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mandree set sender to mandree@FreeBSD.org using -f From: Matthias Andree Date: Sun, 29 Dec 2019 12:34:34 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r521278 - head/graphics/rawtherapee X-SVN-Group: ports-head X-SVN-Commit-Author: mandree X-SVN-Commit-Paths: head/graphics/rawtherapee X-SVN-Commit-Revision: 521278 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2019 12:34:35 -0000 Author: mandree Date: Sun Dec 29 12:34:34 2019 New Revision: 521278 URL: https://svnweb.freebsd.org/changeset/ports/521278 Log: graphics/rawtherapee: document Makefile better, test-process images ...under "make test", if any are placed into testimages/ No functional changes to generated package => PORTREVISION unchanged. Modified: head/graphics/rawtherapee/Makefile Modified: head/graphics/rawtherapee/Makefile ============================================================================== --- head/graphics/rawtherapee/Makefile Sun Dec 29 12:22:30 2019 (r521277) +++ head/graphics/rawtherapee/Makefile Sun Dec 29 12:34:34 2019 (r521278) @@ -32,19 +32,25 @@ USES= cmake desktop-file-utils compiler:gcc-c++11-lib DOS2UNIX_REGEX= .*\.(cc|h) USE_GNOME= gtkmm30 librsvg2 -USE_GCC= 9+ + +# Binutils required for LTO (base ar/nm/ld/ranlib don't work) USE_BINUTILS= yes -# gcc needs -flto=${MAKE_JOBS_NUMBER} for parallel link -# and does not understand -flto=thin +# As of 2019-09-29, this port is known to be miscompiled by clang90 +# (SIGSEGV or SIBGUS). +# +# FreeBSD 11.2/12.0's base clang 6.0.1 emits worse code with +# considerably higher processing times, and on i386 additional calls to +# __atomic_*(), so we shall stick to GCC 9.x for now +USE_GCC= 9+ + +_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 # -# As of 2019-09-29, this port is known to be micompiled by clang90 (SIGSEGV or SIBGUS) -# FreeBSD 12.0's base clang 6.0.1 emits worse code with considerably higher -# processing times. -# so we shall stick to GCC 9.x for now -_LTO_FLAGS= -flto=${MAKE_JOBS_NUMBER} +# XXX re _AR/_RANLIB: might be worth checking if plain binutils is good _AR= ${CC:S/gcc/gcc-ar/} _RANLIB= ${CC:S/gcc/gcc-ranlib/} CFLAGS+= -I${LOCALBASE}/include -fPIC ${_LTO_FLAGS} ${_OPT_FLAGS} @@ -116,11 +122,13 @@ STRIP= .endif _OPT_FLAGS= -O3 -funroll-loops -# GCC 5.4 includes -fexpensive-optimizations in -O2 already +# GCC >= 5.4 includes -fexpensive-optimizations in -O2 already .if (${ARCH} == i386) || (${ARCH} == amd64) +# and SSE2 has been around since the years 2000...2003 latest _OPT_FLAGS+= -msse2 .endif +# workaround for values on the stack that cause SIGBUS on SSE2: .if ${ARCH} == i386 _OPT_FLAGS+= -mstackrealign .endif @@ -133,14 +141,22 @@ post-patch: @${REINPLACE_CMD} -e 's#DESTINATION "$${CMAKE_INSTALL_PREFIX}/share/man/man1"#DESTINATION "${MANPREFIX}/man/man1/"#' \ ${WRKSRC}/CMakeLists.txt +TESTIMAGES= ${FILESDIR}/../testimages + # paranoia: run rawtherapee --help to be sure it finds all its # shared libraries (this hinges on proper RPATH setting and propagation) post-install: @${ECHO_MSG} "===> Running smoke tests" - @TMP=$$(mktemp -d -t ${PORTNAME}) && trap "rc=$$? ; ${RM} -rf \"$$TMP\" ; exit \$$rc" 0 && \ + @(set -x ; TMP=$$(${MKTEMP} -d -t ${PORTNAME}) && trap "rc=$$? ; ${RM} -rf \"$$TMP\" ; exit \$$rc" 0 && \ ${SETENV} LANG= LC_ALL=C LANGUAGE= DISPLAY= HOME="$$TMP" ${STAGEDIR}${PREFIX}/bin/rawtherapee --help 2>&1 \ | ${EGREP} -q "RawTherapee, version ${PKGVERSION:C/_.*//:C/,.*//}|cannot open display:" && \ ${SETENV} LANG= LC_ALL=C LANGUAGE= DISPLAY= HOME="$$TMP" ${STAGEDIR}${PREFIX}/bin/rawtherapee-cli --version 2>&1 \ - | ${EGREP} -q "RawTherapee, version ${PKGVERSION:C/_.*//:C/,.*//}" + | ${EGREP} -q "RawTherapee, version ${PKGVERSION:C/_.*//:C/,.*//}" && \ + if test -n "$(TESTIMAGES)" ; then \ + time ${SETENV} LANG= LC_ALL=C LANGUAGE= DISPLAY= HOME="$$TMP" ${STAGEDIR}${PREFIX}/bin/rawtherapee-cli \ + -o "$$TMP" -q -f -c $(TESTIMAGES) && \ + time ${SETENV} LANG= LC_ALL=C LANGUAGE= DISPLAY= HOME="$$TMP" ${STAGEDIR}${PREFIX}/bin/rawtherapee-cli \ + -o "$$TMP" -q -s -Y -c $(TESTIMAGES) ; \ + fi ) .include