mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
Update RawTherapee to 5.6 release.
Announcement: <https://rawtherapee.com/blog/rawtherapee-5.6-released> Only offer OPENMP option on x86/amd64 for now. While here, avoid -mtune=generic on anything but x86/amd64/aarch64. [1] PR: 237285 [1] Submitted by: pkubaj [1]
This commit is contained in:
parent
a88c42c5cb
commit
e93bba65ee
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=499524
6 changed files with 332 additions and 821 deletions
|
@ -2,9 +2,8 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= rawtherapee
|
||||
PORTVERSION= 5.5
|
||||
PORTREVISION= 1
|
||||
#DISTNAME= ${PORTNAME}-${PORTVERSION:R}-r${PORTVERSION:E}${DISTVERSIONSUFFIX}
|
||||
PORTVERSION= 5.6
|
||||
#DISTNAME= ${PORTNAME}-${PORTVERSION:R}-rc2${DISTVERSIONSUFFIX}
|
||||
CATEGORIES= graphics
|
||||
MASTER_SITES= http://rawtherapee.com/shared/source/
|
||||
|
||||
|
@ -33,7 +32,7 @@ USES= cmake desktop-file-utils gnome dos2unix \
|
|||
|
||||
DOS2UNIX_REGEX= .*\.(cc|h)
|
||||
LDFLAGS+= -Wl,--as-needed # fontconfig, freetype, gettext, libX11
|
||||
USE_GNOME= gtkmm30
|
||||
USE_GNOME= gtkmm30 librsvg2
|
||||
|
||||
# The -D_GLIBCXX_USE_C99 works around stoi not being defined by default,
|
||||
# because the GCC headers believe FreeBSD insufficiently C99 compliant.
|
||||
|
@ -54,13 +53,18 @@ CMAKE_ARGS+= -DDOCDIR="${DOCSDIR}" \
|
|||
|
||||
INSTALLS_ICONS= yes
|
||||
|
||||
.if defined(PACKAGE_BUILDING) && empty(CFLAGS:M-march*)
|
||||
.if defined(PACKAGE_BUILDING) && empty(CFLAGS:M-march*) && (${ARCH} == i386 || ${ARCH} == amd64 || ${ARCH} == aarch64)
|
||||
# this gets translated to -mtune=generic, see ${WRKSRC}/ProcessorTargets.cmake
|
||||
# and as of GCC 8.3, it appears that among FreeBSD's supported architectures,
|
||||
# only the three listed above support this GCC option.
|
||||
CMAKE_ARGS+= -DPROC_TARGET_NUMBER="1"
|
||||
.endif
|
||||
|
||||
RTDIR= ${PREFIX}/libdata/${PORTNAME}
|
||||
|
||||
OPTIONS_DEFINE= DOCS OPTIMIZED_CFLAGS OPENMP NATIVE
|
||||
OPTIONS_DEFINE= DOCS OPTIMIZED_CFLAGS NATIVE
|
||||
OPTIONS_DEFINE_i386= DOCS OPTIMIZED_CFLAGS NATIVE OPENMP
|
||||
OPTIONS_DEFINE_amd64= DOCS OPTIMIZED_CFLAGS NATIVE OPENMP
|
||||
OPTIONS_DEFAULT= OPTIMIZED_CFLAGS OPENMP
|
||||
OPENMP_DESC= Enable OpenMP parallel processing (i386/amd64 only)
|
||||
OPTIMIZED_CFLAGS_DESC= Use extra optimizations (needs SSE2 on i386/amd64)
|
||||
|
@ -73,21 +77,19 @@ OPENMP_CMAKE_BOOL= OPTION_OMP
|
|||
# -------------------------------------------------------------------
|
||||
#
|
||||
|
||||
.if ${OPSYS} == FreeBSD
|
||||
.if ${OSVERSION} >= 1300000
|
||||
.if (${OPSYS} == FreeBSD) && (${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.
|
||||
ONLY_FOR_ARCHS= amd64
|
||||
ONLY_FOR_ARCHS_REASON=Only amd64 is supported on non-released FreeBSD versions.
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MNATIVE}
|
||||
CMAKE_ARGS+= -DPROC_TARGET_NUMBER="2"
|
||||
.endif
|
||||
|
||||
.if !empty(PORT_OPTIONS:MOPENMP) && (${ARCH} == "amd64" || ${ARCH} == "i386")
|
||||
.if !empty(PORT_OPTIONS:MOPENMP) && !empty(OPTIONS_DEFINE:MOPENMP)
|
||||
LIB_DEPENDS+= libomp.so:devel/openmp
|
||||
OPENMP_FLAGS= -lm -lomp
|
||||
LDFLAGS+= ${OPENMP_FLAGS}
|
||||
|
@ -104,11 +106,9 @@ 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
|
||||
# support OpenMP, and those seeking ultimate performance need to use
|
||||
# amd64. Workaround implemented below.
|
||||
# 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. Workaround implemented below.
|
||||
.else
|
||||
USES+= compiler:c++14-lang
|
||||
.endif
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
TIMESTAMP = 1545145340
|
||||
SHA256 (rawtherapee-5.5.tar.xz) = c169c9fb37dd5183de795200338af1e597f8189b1f75a48f8688db6eb35048f0
|
||||
SIZE (rawtherapee-5.5.tar.xz) = 12163556
|
||||
TIMESTAMP = 1555804282
|
||||
SHA256 (rawtherapee-5.6.tar.xz) = f9ea4b159580bd99aa7eaba9487c07e9dc7c095405f310f243400e67ae630d74
|
||||
SIZE (rawtherapee-5.6.tar.xz) = 12083264
|
||||
|
|
|
@ -1,164 +0,0 @@
|
|||
--- rtgui/cursormanager.cc.orig 2019-03-23 13:04:21 UTC
|
||||
+++ rtgui/cursormanager.cc
|
||||
@@ -79,6 +79,29 @@ void CursorManager::init (Glib::RefPtr<Gdk::Window> 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<Gdk::Window> 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<Gdk::Window> mainWindow);
|
||||
+ void cleanup ();
|
||||
static void setWidgetCursor (Glib::RefPtr<Gdk::Window> window, CursorShape shape);
|
||||
static void setCursorOfMainWindow (Glib::RefPtr<Gdk::Window> 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<std::string, Glib::RefPtr<Gdk::Pixbuf>> pixbufCache;
|
||||
-
|
||||
-}
|
||||
+std::map<std::string, Glib::RefPtr<Gdk::Pixbuf>> 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<std::string, Glib::RefPtr<Gdk::Pixbuf>> 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);
|
|
@ -1,14 +0,0 @@
|
|||
Fixes high idle CPU usage with libomp
|
||||
https://github.com/Beep6581/RawTherapee/issues/5105
|
||||
|
||||
--- rtengine/previewimage.cc.orig 2018-12-18 19:27:33 UTC
|
||||
+++ rtengine/previewimage.cc
|
||||
@@ -119,7 +119,7 @@ PreviewImage::PreviewImage (const Glib::ustring &fname
|
||||
rawImage.getImage (wb, TR_NONE, &image, pp, params.toneCurve, params.raw);
|
||||
rtengine::Image8 output(fw, fh);
|
||||
rawImage.convertColorSpace(&image, params.icm, wb);
|
||||
- #pragma omp parallel for schedule(dynamic, 10)
|
||||
+ #pragma omp parallel for
|
||||
for (int i = 0; i < fh; ++i)
|
||||
for (int j = 0; j < fw; ++j) {
|
||||
image.r(i, j) = Color::gamma2curve[image.r(i, j)];
|
|
@ -1,14 +0,0 @@
|
|||
LLVM doesn't have a libatomic, it's all in compiler-rt
|
||||
--- rtgui/CMakeLists.txt.orig 2018-12-18 19:27:46 UTC
|
||||
+++ rtgui/CMakeLists.txt
|
||||
@@ -226,10 +226,6 @@ else()
|
||||
)
|
||||
endif()
|
||||
|
||||
-if(OPENMP_FOUND AND NOT APPLE)
|
||||
- set(EXTRA_LIB_RTGUI ${EXTRA_LIB_RTGUI} "atomic")
|
||||
-endif()
|
||||
-
|
||||
# Create config.h which defines where data are stored
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/config.h")
|
||||
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue