From owner-svn-ports-all@freebsd.org Sat Mar 23 23:08:51 2019 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF181155FE3B; Sat, 23 Mar 2019 23:08:50 +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 4E93C86F51; Sat, 23 Mar 2019 23:08:50 +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 266DDF52B; Sat, 23 Mar 2019 23:08:50 +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 x2NN8oJ0088978; Sat, 23 Mar 2019 23:08:50 GMT (envelope-from mandree@FreeBSD.org) Received: (from mandree@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2NN8nOZ088974; Sat, 23 Mar 2019 23:08:49 GMT (envelope-from mandree@FreeBSD.org) Message-Id: <201903232308.x2NN8nOZ088974@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mandree set sender to mandree@FreeBSD.org using -f From: Matthias Andree Date: Sat, 23 Mar 2019 23:08:49 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r496692 - in head/graphics/rawtherapee: . files X-SVN-Group: ports-head X-SVN-Commit-Author: mandree X-SVN-Commit-Paths: in head/graphics/rawtherapee: . files X-SVN-Commit-Revision: 496692 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4E93C86F51 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] 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: Sat, 23 Mar 2019 23:08:51 -0000 Author: mandree Date: Sat Mar 23 23:08:49 2019 New Revision: 496692 URL: https://svnweb.freebsd.org/changeset/ports/496692 Log: rawtherapee: fix exit SIGABRT, enable OpenMP/i386 Backport 'Explicitly destroy static Glib::RefPtr<>s on exit' from Hombre57's hidpi-icons branch in GitHub (now merged to dev branch). Also expose pixbufCache globally and explicitly .clear() it before exit(). Fixes the SIGABRT-on-exit issue. Remove the wrapper that runs ulimit -c 0 before rawtherapee. Enable OpenMP on i386 (uses GCC for now). Shorten option descriptions so they don't get truncated. Only add -msse2 on i386 and amd64, to fix broken aarch64/powerpc64 builds. Fix various portlint warnings, removing USE_LDCONFIG. PR: 205370 Added: head/graphics/rawtherapee/files/patch-proper-cleanup-to-avoid-SIGABRT (contents, props changed) Deleted: head/graphics/rawtherapee/files/run-rawtherapee.in Modified: head/graphics/rawtherapee/Makefile head/graphics/rawtherapee/pkg-message head/graphics/rawtherapee/pkg-plist Modified: head/graphics/rawtherapee/Makefile ============================================================================== --- head/graphics/rawtherapee/Makefile Sat Mar 23 22:57:52 2019 (r496691) +++ head/graphics/rawtherapee/Makefile Sat Mar 23 23:08:49 2019 (r496692) @@ -3,6 +3,7 @@ PORTNAME= rawtherapee PORTVERSION= 5.5 +PORTREVISION= 1 #DISTNAME= ${PORTNAME}-${PORTVERSION:R}-r${PORTVERSION:E}${DISTVERSIONSUFFIX} CATEGORIES= graphics MASTER_SITES= http://rawtherapee.com/shared/source/ @@ -29,14 +30,14 @@ LIB_DEPENDS= \ USES= cmake desktop-file-utils gnome dos2unix \ jpeg localbase:ldflags pkgconfig tar:xz + DOS2UNIX_REGEX= .*\.(cc|h) LDFLAGS+= -Wl,--as-needed # fontconfig, freetype, gettext, libX11 USE_GNOME= gtkmm30 -USE_LDCONFIG= yes -# The -D_GLIBCXX_USE_C99 works around stoi not being defined -# by default because the GCC headers believe FreeBSD insufficiently C99 -# compliant. -CFLAGS+= -I${LOCALBASE}/include -fPIC -D_GLIBCXX_USE_C99 -Wno-deprecated-declarations -Wno-unused-result + +# The -D_GLIBCXX_USE_C99 works around stoi not being defined by default, +# because the GCC headers believe FreeBSD insufficiently C99 compliant. +CFLAGS+= -I${LOCALBASE}/include -fPIC -D_GLIBCXX_USE_C99 -Wno-deprecated-declarations -Wno-unused-result -Wno-overloaded-virtual LDFLAGS+= -lpthread CMAKE_ARGS+= -DDOCDIR="${DOCSDIR}" \ -DCREDITSDIR="${DOCSDIR}" \ @@ -51,8 +52,6 @@ CMAKE_ARGS+= -DDOCDIR="${DOCSDIR}" \ # linker flags are passed. Else -lomp is not found with clang. # See: https://cmake.org/cmake/help/v3.4/policy/CMP0056.html -SUB_FILES= run-rawtherapee - INSTALLS_ICONS= yes .if defined(PACKAGE_BUILDING) && empty(CFLAGS:M-march*) @@ -63,25 +62,19 @@ RTDIR= ${PREFIX}/libdata/${PORTNAME} OPTIONS_DEFINE= DOCS OPTIMIZED_CFLAGS OPENMP NATIVE OPTIONS_DEFAULT= OPTIMIZED_CFLAGS OPENMP -OPENMP_DESC= Enable multicore processing using OpenMP (amd64) -OPTIMIZED_CFLAGS_DESC= Use extra compiler optimizations (requires SSE2 support) -NATIVE_DESC= Use -march=native for compilation (do not use for generic packages!) +OPENMP_DESC= Enable OpenMP parallel processing (i386/amd64 only) +OPTIMIZED_CFLAGS_DESC= Use extra optimizations (needs SSE2 on i386/amd64) +NATIVE_DESC= Use -march=native (avoid for generic packages!) OPENMP_CMAKE_BOOL= OPTION_OMP -OPTIMIZED_CFLAGS_CFLAGS= -O3 -funroll-loops -msse2 -# GCC 5.4 includes -fexpensive-optimizations in -O2 already - .include # ------------------------------------------------------------------- # -BROKEN_aarch64= fails to build: gcc5: error: unrecognized command line option -msse2 -BROKEN_powerpc64= fails to build: gcc6: error: unrecognized command line option -msse2 - .if ${OPSYS} == FreeBSD -.if ${OSVERSION} >= 1200000 +.if ${OSVERSION} >= 1300000 # don't waste everybody's time with Tier-2 and moving targets. # might add ARM64 or SPARC64 later on if they are established by the # time FreeBSD 12 is out. @@ -94,8 +87,8 @@ ONLY_FOR_ARCHS_REASON=Only amd64 is supported on non-r CMAKE_ARGS+= -DPROC_TARGET_NUMBER="2" .endif -.if !empty(PORT_OPTIONS:MOPENMP) && ${ARCH} == "amd64" -LIB_DEPENDS+= libomp.so.0:devel/openmp +.if !empty(PORT_OPTIONS:MOPENMP) && (${ARCH} == "amd64" || ${ARCH} == "i386") +LIB_DEPENDS+= libomp.so:devel/openmp OPENMP_FLAGS= -lm -lomp LDFLAGS+= ${OPENMP_FLAGS} .endif @@ -105,7 +98,12 @@ STRIP= .endif .if ${ARCH} == i386 +. if ${PORT_OPTIONS:MOPENMP} +# OpenMP + clang on i386 will miss atomic ops => use GCC +USES+= compiler:gcc-c++11-lib +. else USES+= compiler:c++11-lib +. endif # If we were to use GCC on i386, we'd need to use -mstackrealign # or similar options, else we get SIGBUS when SSE2 is enabled due to # improper alignment. Base clang is good enough though, i386 does not @@ -115,6 +113,14 @@ USES+= compiler:c++11-lib USES+= compiler:c++14-lang .endif +.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} +CFLAGS+= -O3 -funroll-loops +# GCC 5.4 includes -fexpensive-optimizations in -O2 already +. if (${ARCH} == i386) || (${ARCH} == amd64) +CFLAGS+= -msse2 +. endif +.endif + # ------------------------------------------------------------------- .include @@ -134,15 +140,10 @@ post-patch: # 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 && \ + @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/,.*//}" - @${ECHO_MSG} "===> Wrapping rawtherapee to prevent core dumps unless \$$DEBUG is nonempty" - # wrap things in a script that prevents core dumps - ${MV} ${STAGEDIR}${PREFIX}/bin/rawtherapee ${STAGEDIR}${PREFIX}/bin/rawtherapee.real - ${INSTALL_SCRIPT} ${WRKDIR}/run-rawtherapee ${STAGEDIR}${PREFIX}/bin/rawtherapee - .include Added: head/graphics/rawtherapee/files/patch-proper-cleanup-to-avoid-SIGABRT ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/rawtherapee/files/patch-proper-cleanup-to-avoid-SIGABRT Sat Mar 23 23:08:49 2019 (r496692) @@ -0,0 +1,164 @@ +--- rtgui/cursormanager.cc.orig 2019-03-23 13:04:21 UTC ++++ rtgui/cursormanager.cc +@@ -79,6 +79,29 @@ void CursorManager::init (Glib::RefPtr ma + window = mainWindow; + } + ++void CursorManager::cleanup() ++{ ++ cAdd.reset(); ++ cAddPicker.reset(); ++ cCropDraw.reset(); ++ cCrosshair.reset(); ++ cHandClosed.reset(); ++ cHandOpen.reset(); ++ cEmpty.reset(); ++ cMoveBL.reset(); ++ cMoveBR.reset(); ++ cMoveL.reset(); ++ cMoveR.reset(); ++ cMoveTL.reset(); ++ cMoveTR.reset(); ++ cMoveX.reset(); ++ cMoveY.reset(); ++ cMoveXY.reset(); ++ cRotate.reset(); ++ cWB.reset(); ++ cWait.reset(); ++} ++ + /* Set the cursor of the given window */ + void CursorManager::setCursor (Glib::RefPtr window, CursorShape shape) + { +--- rtgui/cursormanager.h.orig 2019-03-23 13:04:21 UTC ++++ rtgui/cursormanager.h +@@ -82,6 +82,7 @@ class CursorManager (private) + + public: + void init (Glib::RefPtr mainWindow); ++ void cleanup (); + static void setWidgetCursor (Glib::RefPtr window, CursorShape shape); + static void setCursorOfMainWindow (Glib::RefPtr window, CursorShape shape); + }; +--- rtgui/filmsimulation.cc.orig 2019-03-23 13:04:21 UTC ++++ rtgui/filmsimulation.cc +@@ -262,10 +262,17 @@ void ClutComboBox::setBatchMode(bool yes) + } + + ++void ClutComboBox::cleanup() ++{ ++ cm.reset(); ++ cm2.reset(); ++} ++ ++ + void ClutComboBox::updateUnchangedEntry() + { + auto c = m_model()->children(); +- ++ + if (batchMode) { + if (c.empty() || c[c.size()-1][m_columns().clutFilename] != "NULL") { + Gtk::TreeModel::Row row = *(m_model()->append()); +--- rtgui/filmsimulation.h.orig 2019-03-23 13:04:21 UTC ++++ rtgui/filmsimulation.h +@@ -18,6 +18,8 @@ class ClutComboBox : public MyComboBox (public) + void setSelectedClut( Glib::ustring filename ); + void setBatchMode(bool yes); + ++ static void cleanup(); ++ + private: + void updateUnchangedEntry(); // in batchMode we need to add an extra entry "(Unchanged)". We do this whenever the widget is mapped (connecting to signal_map()), unless options.multiDisplayMode (see the comment below about cm2 in this case) + +--- rtgui/guiutils.cc.orig 2019-03-23 13:04:21 UTC ++++ rtgui/guiutils.cc +@@ -560,6 +560,15 @@ void MyExpander::init() + closedPBuf = Gdk::Pixbuf::create_from_file(rtengine::findIconAbsolutePath("expander-closed-small.png")); + } + ++void MyExpander::cleanup() ++{ ++ inconsistentPBuf.reset(); ++ enabledPBuf.reset(); ++ disabledPBuf.reset(); ++ openedPBuf.reset(); ++ closedPBuf.reset(); ++} ++ + MyExpander::MyExpander(bool useEnabled, Gtk::Widget* titleWidget) : + enabled(false), inconsistent(false), flushEvent(false), expBox(nullptr), + child(nullptr), headerWidget(nullptr), statusImage(nullptr), +--- rtgui/guiutils.h.orig 2019-03-23 13:04:21 UTC ++++ rtgui/guiutils.h +@@ -228,6 +228,7 @@ class MyExpander : public Gtk::VBox (public) + + /// Initialize the class by loading the images + static void init(); ++ static void cleanup(); + + Glib::SignalProxy1< bool, GdkEventButton* > signal_button_release_event() + { +--- rtgui/main.cc.orig 2019-03-23 15:29:41 UTC ++++ rtgui/main.cc +@@ -673,5 +673,7 @@ int main (int argc, char **argv) + + #endif + ++ ns_RTImage::pixbufCache.clear(); ++ + return ret; + } +--- rtgui/rtimage.cc.orig 2019-03-23 13:04:21 UTC ++++ rtgui/rtimage.cc +@@ -25,12 +25,9 @@ + #include "options.h" + #include "../rtengine/icons.h" + +-namespace +-{ ++using namespace ns_RTImage; + +-std::map> pixbufCache; +- +-} ++std::map> ns_RTImage::pixbufCache; + + RTImage::RTImage (const Glib::ustring& fileName, const Glib::ustring& rtlFileName) : Gtk::Image() + { +--- rtgui/rtimage.h.orig 2019-03-23 13:04:21 UTC ++++ rtgui/rtimage.h +@@ -23,6 +23,13 @@ + + class Options; + ++namespace ns_RTImage ++{ ++ ++extern std::map> pixbufCache; ++ ++} ++ + /** + * @brief A derived class of Gtk::Image in order to handle theme-related icon sets. + */ +--- rtgui/rtwindow.cc.orig 2019-03-23 13:04:21 UTC ++++ rtgui/rtwindow.cc +@@ -708,6 +708,16 @@ bool RTWindow::on_delete_event (GdkEventAny* event) + cacheMgr->closeCache (); // also makes cleanup if too large + WhiteBalance::cleanup(); + ProfilePanel::cleanup(); ++ ClutComboBox::cleanup(); ++ MyExpander::cleanup(); ++ mainWindowCursorManager.cleanup(); ++ editWindowCursorManager.cleanup(); ++ BatchQueueEntry::savedAsIcon.reset(); ++ FileBrowserEntry::editedIcon.reset(); ++ FileBrowserEntry::recentlySavedIcon.reset(); ++ FileBrowserEntry::enqueuedIcon.reset(); ++ FileBrowserEntry::hdr.reset(); ++ FileBrowserEntry::ps.reset(); + + if (!options.windowMaximized) { + get_size (options.windowWidth, options.windowHeight); Modified: head/graphics/rawtherapee/pkg-message ============================================================================== --- head/graphics/rawtherapee/pkg-message Sat Mar 23 22:57:52 2019 (r496691) +++ head/graphics/rawtherapee/pkg-message Sat Mar 23 23:08:49 2019 (r496692) @@ -9,11 +9,3 @@ remove older cache directories. Also, after configurations have been moved to the new version's directory, older $HOME/.config/RawTherapee* directories may be removed. ======================================================================= -Also, due to a bug that has not yet been found, RawTherapee will -cause an abort trap when shutting down. rawtherapee is now installed -as rawtherapee.real, and rawtherapee is a wrapper script that will -prevent the creation of a core file in this situation, unless the -environment variable DEBUG is set and not empty. --> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205370 --> https://github.com/Beep6581/RawTherapee/issues/3636 -======================================================================= Modified: head/graphics/rawtherapee/pkg-plist ============================================================================== --- head/graphics/rawtherapee/pkg-plist Sat Mar 23 22:57:52 2019 (r496691) +++ head/graphics/rawtherapee/pkg-plist Sat Mar 23 23:08:49 2019 (r496692) @@ -1,6 +1,5 @@ @comment env LC_ALL=C sort -f bin/rawtherapee -bin/rawtherapee.real bin/rawtherapee-cli man/man1/rawtherapee.1.gz share/applications/rawtherapee.desktop