public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/rawtherapee/, media-gfx/rawtherapee/files/
@ 2015-12-15 20:16 Pacho Ramos
  0 siblings, 0 replies; 5+ messages in thread
From: Pacho Ramos @ 2015-12-15 20:16 UTC (permalink / raw
  To: gentoo-commits

commit:     cc701dd19ce61eaa29889b185ca4c55298b75126
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 15 20:15:39 2015 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Tue Dec 15 20:16:34 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc701dd1

media-gfx/rawtherapee: Fix building with latest glibmm/libsigc++ (#568136), fix CVE-2015-3885

Package-Manager: portage-2.2.26

 .../files/rawtherapee-4.2-CVE-2015-3885.patch      | 28 ++++++++++
 .../files/rawtherapee-4.2-build-cxx11-2.patch      | 14 +++++
 .../files/rawtherapee-4.2-build-cxx11.patch        | 20 +++++++
 .../rawtherapee/files/rawtherapee-4.2-cxx11.patch  | 27 ++++++++++
 .../rawtherapee/files/rawtherapee-4.2-sigc26.patch | 47 ++++++++++++++++
 media-gfx/rawtherapee/rawtherapee-4.2-r1.ebuild    | 62 ++++++++++++++++++++++
 6 files changed, 198 insertions(+)

diff --git a/media-gfx/rawtherapee/files/rawtherapee-4.2-CVE-2015-3885.patch b/media-gfx/rawtherapee/files/rawtherapee-4.2-CVE-2015-3885.patch
new file mode 100644
index 0000000..3de7d7e
--- /dev/null
+++ b/media-gfx/rawtherapee/files/rawtherapee-4.2-CVE-2015-3885.patch
@@ -0,0 +1,28 @@
+Author: Philip Rinn <rinni@inventati.org>
+Description: Fix CVE-2015-3885
+Source: https://github.com/rawstudio/rawstudio/commit/983bda1f0fa5fa86884381208274198a620f006e
+Last-update: 2015-05-14
+--- a/rtengine/dcraw.c
++++ b/rtengine/dcraw.c
+@@ -824,7 +824,8 @@
+ 
+ int CLASS ljpeg_start (struct jhead *jh, int info_only)
+ {
+-  int c, tag, len;
++  int c, tag;
++  ushort len;
+   uchar data[0x10000];
+   const uchar *dp;
+ 
+--- a/rtengine/dcraw.cc
++++ b/rtengine/dcraw.cc
+@@ -787,7 +787,8 @@
+ 
+ int CLASS ljpeg_start (struct jhead *jh, int info_only)
+ {
+-  int c, tag, len;
++  int c, tag;
++  ushort len;
+   uchar data[0x10000];
+   const uchar *dp;
+ 

diff --git a/media-gfx/rawtherapee/files/rawtherapee-4.2-build-cxx11-2.patch b/media-gfx/rawtherapee/files/rawtherapee-4.2-build-cxx11-2.patch
new file mode 100644
index 0000000..0d79e25
--- /dev/null
+++ b/media-gfx/rawtherapee/files/rawtherapee-4.2-build-cxx11-2.patch
@@ -0,0 +1,14 @@
+Author: Philip Rinn <rinni@inventati.org>
+Description: Fix build with C++11 as char is unsigned on some architectures
+Last-update: 2015-11-04
+--- a/rtengine/dcraw.cc
++++ b/rtengine/dcraw.cc
+@@ -2054,7 +2054,7 @@
+ 
+ void CLASS kodak_radc_load_raw()
+ {
+-  static const char src[] = {
++  static const signed char src[] = {
+     1,1, 2,3, 3,4, 4,2, 5,7, 6,5, 7,6, 7,8,
+     1,0, 2,1, 3,3, 4,4, 5,2, 6,7, 7,6, 8,5, 8,8,
+     2,1, 2,3, 3,0, 3,2, 3,4, 4,6, 5,5, 6,7, 6,8,

diff --git a/media-gfx/rawtherapee/files/rawtherapee-4.2-build-cxx11.patch b/media-gfx/rawtherapee/files/rawtherapee-4.2-build-cxx11.patch
new file mode 100644
index 0000000..4832dc3
--- /dev/null
+++ b/media-gfx/rawtherapee/files/rawtherapee-4.2-build-cxx11.patch
@@ -0,0 +1,20 @@
+Author: Philip Rinn <rinni@inventati.org>
+Description: Fix build with C++11
+Last-update: 2015-11-03
+--- a/rtengine/dcraw.cc
++++ b/rtengine/dcraw.cc
+@@ -136,10 +136,10 @@
+ 
+ #define SQR(x) rtengine::SQR(x)
+ #define ABS(x) (((int)(x) ^ ((int)(x) >> 31)) - ((int)(x) >> 31))
+-#define MIN(a,b) rtengine::min(a,static_cast<typeof(a)>(b))
+-#define MAX(a,b) rtengine::max(a,static_cast<typeof(a)>(b))
+-#define LIM(x,min,max) rtengine::LIM(x,static_cast<typeof(x)>(min),static_cast<typeof(x)>(max))
+-#define ULIM(x,y,z) rtengine::ULIM(x,static_cast<typeof(x)>(y),static_cast<typeof(x)>(z))
++#define MIN(a,b) rtengine::min(a,static_cast<__typeof__(a)>(b))
++#define MAX(a,b) rtengine::max(a,static_cast<__typeof__(a)>(b))
++#define LIM(x,min,max) rtengine::LIM(x,static_cast<__typeof__(x)>(min),static_cast<__typeof__(x)>(max))
++#define ULIM(x,y,z) rtengine::ULIM(x,static_cast<__typeof__(x)>(y),static_cast<typeof__(x)>(z))
+ #define CLIP(x) rtengine::CLIP(x)
+ #define SWAP(a,b) { a=a+b; b=a-b; a=a-b; }
+ 

diff --git a/media-gfx/rawtherapee/files/rawtherapee-4.2-cxx11.patch b/media-gfx/rawtherapee/files/rawtherapee-4.2-cxx11.patch
new file mode 100644
index 0000000..48acb5f
--- /dev/null
+++ b/media-gfx/rawtherapee/files/rawtherapee-4.2-cxx11.patch
@@ -0,0 +1,27 @@
+From 39ef59ddeb7679c71274b1da3faadd395b650c73 Mon Sep 17 00:00:00 2001
+From: Adam Reichold <adam.reichold@t-online.de>
+Date: Sun, 29 Nov 2015 11:48:30 +0100
+Subject: [PATCH] Build with '-std=c++11' if libsigc++ version 2.5.1 is used as
+ it does require it.
+
+---
+ CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index dd5fcbc..6153484 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -278,10 +278,10 @@ if (OPTION_OMP)
+     endif (OPENMP_FOUND)
+ endif (OPTION_OMP)
+ 
+-if(USE_EXPERIMENTAL_LANG_VERSIONS)
++if(USE_EXPERIMENTAL_LANG_VERSIONS OR NOT (SIGC_VERSION VERSION_LESS 2.5.1))
+ 	SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu1x")
+ 	SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")
+-endif (USE_EXPERIMENTAL_LANG_VERSIONS)
++endif ()
+ 
+ # find out whether we are building out of source
+ get_filename_component(ABS_SOURCE_DIR "${PROJECT_SOURCE_DIR}" ABSOLUTE)

diff --git a/media-gfx/rawtherapee/files/rawtherapee-4.2-sigc26.patch b/media-gfx/rawtherapee/files/rawtherapee-4.2-sigc26.patch
new file mode 100644
index 0000000..356cee9
--- /dev/null
+++ b/media-gfx/rawtherapee/files/rawtherapee-4.2-sigc26.patch
@@ -0,0 +1,47 @@
+Author: Philip Rinn <rinni@inventati.org>
+Description: Fix build with sigc++ >= 2.5.2
+Last-update: 2015-11-03
+--- a/rtgui/adjuster.cc
++++ b/rtgui/adjuster.cc
+@@ -17,7 +17,7 @@
+  *  along with RawTherapee.  If not, see <http://www.gnu.org/licenses/>.
+  */
+ #include "adjuster.h"
+-#include <sigc++/class_slot.h>
++#include <sigc++/slot.h>
+ #include <cmath>
+ #include "multilangmgr.h"
+ #include "../rtengine/rtengine.h"
+--- a/rtgui/thresholdadjuster.cc
++++ b/rtgui/thresholdadjuster.cc
+@@ -17,7 +17,7 @@
+  *  along with RawTherapee.  If not, see <http://www.gnu.org/licenses/>.
+  */
+ #include "thresholdadjuster.h"
+-#include <sigc++/class_slot.h>
++#include <sigc++/slot.h>
+ #include <cmath>
+ #include "multilangmgr.h"
+ #include "../rtengine/rtengine.h"
+--- a/rtgui/preferences.cc
++++ b/rtgui/preferences.cc
+@@ -16,7 +16,7 @@
+  *  You should have received a copy of the GNU General Public License
+  *  along with RawTherapee.  If not, see <http://www.gnu.org/licenses/>.
+  */
+-#include <sigc++/class_slot.h>
++#include <sigc++/slot.h>
+ #include "preferences.h"
+ #include "multilangmgr.h"
+ #include "splash.h"
+--- a/rtgui/tonecurve.cc
++++ b/rtgui/tonecurve.cc
+@@ -18,7 +18,7 @@
+  */
+ #include "tonecurve.h"
+ #include "adjuster.h"
+-#include <sigc++/class_slot.h>
++#include <sigc++/slot.h>
+ #include <iomanip>
+ #include "ppversion.h"
+ #include "edit.h"

diff --git a/media-gfx/rawtherapee/rawtherapee-4.2-r1.ebuild b/media-gfx/rawtherapee/rawtherapee-4.2-r1.ebuild
new file mode 100644
index 0000000..2723b91
--- /dev/null
+++ b/media-gfx/rawtherapee/rawtherapee-4.2-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils toolchain-funcs
+
+DESCRIPTION="A powerful cross-platform raw image processing program"
+HOMEPAGE="http://www.rawtherapee.com/"
+SRC_URI="http://rawtherapee.com/shared/source/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="bzip2 openmp"
+
+RDEPEND="bzip2? ( app-arch/bzip2 )
+	>=x11-libs/gtk+-2.24.18:2
+	>=dev-cpp/gtkmm-2.12:2.4
+	>=dev-cpp/glibmm-2.16:2
+	dev-libs/expat
+	dev-libs/libsigc++:2
+	media-libs/libcanberra[gtk]
+	media-libs/tiff
+	media-libs/libpng
+	media-libs/libiptcdata
+	media-libs/lcms:2
+	sci-libs/fftw:3.0
+	sys-libs/zlib
+	virtual/jpeg"
+DEPEND="${RDEPEND}
+	app-arch/xz-utils
+	virtual/pkgconfig"
+
+PATCHES=(
+	# Upstream patches for fixing build with current libstdc++
+	# A newer snapshot/version will make this unneeded
+        "${FILESDIR}"/${P}-cxx11.patch
+	"${FILESDIR}"/${P}-CVE-2015-3885.patch
+	"${FILESDIR}"/${P}-build-cxx11.patch
+	"${FILESDIR}"/${P}-build-cxx11-2.patch
+	"${FILESDIR}"/${P}-sigc26.patch
+)
+
+pkg_pretend() {
+	if use openmp ; then
+		tc-has-openmp || die "Please switch to an openmp compatible compiler"
+	fi
+}
+
+src_configure() {
+	local mycmakeargs=(
+		$(cmake-utils_use openmp OPTION_OMP)
+		$(cmake-utils_use_with bzip2 BZIP)
+		-DDOCDIR=/usr/share/doc/${PF}
+		-DCREDITSDIR=/usr/share/${PN}
+		-DLICENCEDIR=/usr/share/${PN}
+		-DCACHE_NAME_SUFFIX=""
+	)
+	cmake-utils_src_configure
+}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/rawtherapee/, media-gfx/rawtherapee/files/
@ 2015-12-15 20:16 Pacho Ramos
  0 siblings, 0 replies; 5+ messages in thread
From: Pacho Ramos @ 2015-12-15 20:16 UTC (permalink / raw
  To: gentoo-commits

commit:     043e8de5728b09812035580454fd9b88123e7a06
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 15 20:07:07 2015 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Tue Dec 15 20:16:32 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=043e8de5

Revert "media-gfx/rawtherapee: Fix building with latest glibmm/libsigc++ (#568136)"

This reverts commit 519fe2b101ec4914e62246b72e9ba6139581e0c8.

 .../rawtherapee/files/rawtherapee-4.2-cxx11.patch  | 27 ----------------------
 media-gfx/rawtherapee/rawtherapee-4.2.ebuild       |  4 ----
 2 files changed, 31 deletions(-)

diff --git a/media-gfx/rawtherapee/files/rawtherapee-4.2-cxx11.patch b/media-gfx/rawtherapee/files/rawtherapee-4.2-cxx11.patch
deleted file mode 100644
index 48acb5f..0000000
--- a/media-gfx/rawtherapee/files/rawtherapee-4.2-cxx11.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 39ef59ddeb7679c71274b1da3faadd395b650c73 Mon Sep 17 00:00:00 2001
-From: Adam Reichold <adam.reichold@t-online.de>
-Date: Sun, 29 Nov 2015 11:48:30 +0100
-Subject: [PATCH] Build with '-std=c++11' if libsigc++ version 2.5.1 is used as
- it does require it.
-
----
- CMakeLists.txt | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index dd5fcbc..6153484 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -278,10 +278,10 @@ if (OPTION_OMP)
-     endif (OPENMP_FOUND)
- endif (OPTION_OMP)
- 
--if(USE_EXPERIMENTAL_LANG_VERSIONS)
-+if(USE_EXPERIMENTAL_LANG_VERSIONS OR NOT (SIGC_VERSION VERSION_LESS 2.5.1))
- 	SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu1x")
- 	SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")
--endif (USE_EXPERIMENTAL_LANG_VERSIONS)
-+endif ()
- 
- # find out whether we are building out of source
- get_filename_component(ABS_SOURCE_DIR "${PROJECT_SOURCE_DIR}" ABSOLUTE)

diff --git a/media-gfx/rawtherapee/rawtherapee-4.2.ebuild b/media-gfx/rawtherapee/rawtherapee-4.2.ebuild
index 6702661..6ae07a5 100644
--- a/media-gfx/rawtherapee/rawtherapee-4.2.ebuild
+++ b/media-gfx/rawtherapee/rawtherapee-4.2.ebuild
@@ -33,10 +33,6 @@ DEPEND="${RDEPEND}
 	app-arch/xz-utils
 	virtual/pkgconfig"
 
-PATCHES=(
-        "${FILESDIR}"/${P}-cxx11.patch # Upstream patch for fixing bug #568136
-)
-
 pkg_pretend() {
 	if use openmp ; then
 		tc-has-openmp || die "Please switch to an openmp compatible compiler"


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/rawtherapee/, media-gfx/rawtherapee/files/
@ 2021-08-11 15:18 Joonas Niilola
  0 siblings, 0 replies; 5+ messages in thread
From: Joonas Niilola @ 2021-08-11 15:18 UTC (permalink / raw
  To: gentoo-commits

commit:     5e84258847804bd1073a078b1a5881accad9d2ee
Author:     Francesco Riosa <vivo75 <AT> gmail <DOT> com>
AuthorDate: Wed Aug 11 15:09:18 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed Aug 11 15:18:18 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e842588

media-gfx/rawtherapee: import some fedora patches to fix gcc:11 comp

GCC 11 in combination with glibc-2.34 braek overloading some functions
see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101747

Closes: https://bugs.gentoo.org/807658
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 media-gfx/rawtherapee/files/RT_5.8_fix_crop.patch | 221 +++++++
 media-gfx/rawtherapee/files/RT_5.8_glibc234.patch | 683 ++++++++++++++++++++++
 media-gfx/rawtherapee/rawtherapee-5.8-r1.ebuild   |  78 +++
 3 files changed, 982 insertions(+)

diff --git a/media-gfx/rawtherapee/files/RT_5.8_fix_crop.patch b/media-gfx/rawtherapee/files/RT_5.8_fix_crop.patch
new file mode 100644
index 00000000000..24cbfdcb41d
--- /dev/null
+++ b/media-gfx/rawtherapee/files/RT_5.8_fix_crop.patch
@@ -0,0 +1,221 @@
+From 15db8cdb57161d57af8307bf85aeda02ea69ddde Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Fl=C3=B6ssie?= <floessie.mail@gmail.com>
+Date: Sun, 5 Apr 2020 11:26:47 +0200
+Subject: [PATCH] Guard accesses to `Crop::crop_ratios` (#5701)
+
+---
+ rtgui/crop.cc | 125 +++++++++++++++++++++++++++++++++++---------------
+ rtgui/crop.h  |  11 ++---
+ 2 files changed, 92 insertions(+), 44 deletions(-)
+
+diff --git a/rtgui/crop.cc b/rtgui/crop.cc
+index d9d496523..f092f07a5 100644
+--- a/rtgui/crop.cc
++++ b/rtgui/crop.cc
+@@ -16,6 +16,8 @@
+  *  You should have received a copy of the GNU General Public License
+  *  along with RawTherapee.  If not, see <https://www.gnu.org/licenses/>.
+  */
++#include <vector>
++
+ #include "crop.h"
+ 
+ #include "options.h"
+@@ -46,39 +48,82 @@ inline void get_custom_ratio(int w, int h, double &rw, double &rh)
+ 
+ } // namespace
+ 
++class Crop::CropRatios final
++{
++public:
++    CropRatios() :
++        ratios{
++            {M("GENERAL_ASIMAGE"), 0.0},
++            {M("GENERAL_CURRENT"), -1.0},
++            {"3:2", 3.0 / 2.0},                 // L1.5,        P0.666...
++            {"4:3", 4.0 / 3.0},                 // L1.333...,   P0.75
++            {"16:9", 16.0 / 9.0},               // L1.777...,   P0.5625
++            {"16:10", 16.0 / 10.0},             // L1.6,        P0.625
++            {"1:1", 1.0 / 1.0},                 // L1,          P1
++            {"2:1", 2.0 / 1.0},                 // L2,          P0.5
++            {"3:1", 3.0 / 1.0},                 // L3,          P0.333...
++            {"4:1", 4.0 / 1.0},                 // L4,          P0.25
++            {"5:1", 5.0 / 1.0},                 // L5,          P0.2
++            {"6:1", 6.0 / 1.0},                 // L6,          P0.1666...
++            {"7:1", 7.0 / 1.0},                 // L7,          P0.142...
++            {"4:5", 4.0 / 5.0},                 // L1.25,       P0.8
++            {"5:7", 5.0 / 7.0},                 // L1.4,        P0.714...
++            {"6:7", 6.0 / 7.0},                 // L1.166...,   P0.857...
++            {"6:17", 6.0 / 17.0},               // L2.833...,   P0.352...
++            {"24:65 - XPAN", 24.0 / 65.0},      // L2.708...,   P0.369...
++            {"1.414 - DIN EN ISO 216", 1.414},  // L1.414,      P0.707...
++            {"3.5:5", 3.5 / 5.0},               // L1.428...,   P0.7
++            {"8.5:11 - US Letter", 8.5 / 11.0}, // L1.294...,   P0.772...
++            {"9.5:12", 9.5 / 12.0},             // L1.263...,   P0.791...
++            {"10:12", 10.0 / 12.0},             // L1.2,        P0.833...
++            {"11:14", 11.0 / 14.0},             // L1.272...,   P0.785...
++            {"11:17 - Tabloid", 11.0 / 17.0},   // L1.545...,   P0.647...
++            {"13:19", 13.0 / 19.0},             // L1.461...,   P0.684...
++            {"17:22", 17.0 / 22.0},             // L1.294...,   P0.772...
++            {"45:35 - ePassport", 45.0 / 35.0}, // L1.285,...   P0.777...
++            {"64:27", 64.0 / 27.0},             // L2.370...,   P0.421...
++        }
++    {
++    }
++
++    std::vector<Glib::ustring> getLabels() const
++    {
++        std::vector<Glib::ustring> res;
++
++        res.reserve(ratios.size());
++
++        for (const auto& ratio : ratios) {
++            res.push_back(ratio.label);
++        }
++
++        return res;
++    }
++
++    double getValue(std::size_t index) const
++    {
++        return
++            index < ratios.size()
++                ? ratios[index].value
++                : ratios[0].value;
++    }
++
++    void updateCurrentRatio(double value)
++    {
++        ratios[1].value = value;
++    }
++
++private:
++    struct CropRatio {
++        Glib::ustring label;
++        double value;
++    };
++
++    std::vector<CropRatio> ratios;
++};
++
+ Crop::Crop():
+     FoldableToolPanel(this, "crop", M("TP_CROP_LABEL"), false, true),
+-    crop_ratios{
+-        {M("GENERAL_ASIMAGE"), 0.0},
+-        {M("GENERAL_CURRENT"), -1.0},
+-        {"3:2", 3.0 / 2.0},                 // L1.5,        P0.666...
+-        {"4:3", 4.0 / 3.0},                 // L1.333...,   P0.75
+-        {"16:9", 16.0 / 9.0},               // L1.777...,   P0.5625
+-        {"16:10", 16.0 / 10.0},             // L1.6,        P0.625
+-        {"1:1", 1.0 / 1.0},                 // L1,          P1
+-        {"2:1", 2.0 / 1.0},                 // L2,          P0.5
+-        {"3:1", 3.0 / 1.0},                 // L3,          P0.333...
+-        {"4:1", 4.0 / 1.0},                 // L4,          P0.25
+-        {"5:1", 5.0 / 1.0},                 // L5,          P0.2
+-        {"6:1", 6.0 / 1.0},                 // L6,          P0.1666...
+-        {"7:1", 7.0 / 1.0},                 // L7,          P0.142...
+-        {"4:5", 4.0 / 5.0},                 // L1.25,       P0.8
+-        {"5:7", 5.0 / 7.0},                 // L1.4,        P0.714...
+-        {"6:7", 6.0 / 7.0},                 // L1.166...,   P0.857...
+-        {"6:17", 6.0 / 17.0},               // L2.833...,   P0.352...
+-        {"24:65 - XPAN", 24.0 / 65.0},      // L2.708...,   P0.369...
+-        {"1.414 - DIN EN ISO 216", 1.414},  // L1.414,      P0.707...
+-        {"3.5:5", 3.5 / 5.0},               // L1.428...,   P0.7
+-        {"8.5:11 - US Letter", 8.5 / 11.0}, // L1.294...,   P0.772...
+-        {"9.5:12", 9.5 / 12.0},             // L1.263...,   P0.791...
+-        {"10:12", 10.0 / 12.0},             // L1.2,        P0.833...
+-        {"11:14", 11.0 / 14.0},             // L1.272...,   P0.785...
+-        {"11:17 - Tabloid", 11.0 / 17.0},   // L1.545...,   P0.647...
+-        {"13:19", 13.0 / 19.0},             // L1.461...,   P0.684...
+-        {"17:22", 17.0 / 22.0},             // L1.294...,   P0.772...
+-        {"45:35 - ePassport", 45.0 / 35.0}, // L1.285,...   P0.777...
+-        {"64:27", 64.0 / 27.0},             // L2.370...,   P0.421...
+-    },
++    crop_ratios(new CropRatios),
+     opt(0),
+     wDirty(true),
+     hDirty(true),
+@@ -229,8 +274,8 @@ Crop::Crop():
+     // ppigrid END
+ 
+     // Populate the combobox
+-    for (const auto& crop_ratio : crop_ratios) {
+-        ratio->append (crop_ratio.label);
++    for (const auto& label : crop_ratios->getLabels()) {
++        ratio->append (label);
+     }
+ 
+     ratio->set_active (0);
+@@ -354,7 +399,10 @@ void Crop::read (const ProcParams* pp, const ParamsEdited* pedited)
+         setDimensions (pp->crop.x + pp->crop.w, pp->crop.y + pp->crop.h);
+     }
+ 
+-    const bool flip_orientation = pp->crop.fixratio && crop_ratios[ratio->get_active_row_number()].value > 0 && crop_ratios[ratio->get_active_row_number()].value < 1.0;
++    const bool flip_orientation =
++        pp->crop.fixratio
++        && crop_ratios->getValue(ratio->get_active_row_number()) > 0
++        && crop_ratios->getValue(ratio->get_active_row_number()) < 1.0;
+ 
+     if (pp->crop.orientation == "Landscape") {
+         orientation->set_active (flip_orientation ? 1 : 0);
+@@ -469,7 +517,10 @@ void Crop::write (ProcParams* pp, ParamsEdited* pedited)
+     }
+ 
+     // for historical reasons we store orientation different if ratio is written as 2:3 instead of 3:2, but in GUI 'landscape' is always long side horizontal regardless of the ratio is written short or long side first.
+-    const bool flip_orientation = fixr->get_active() && crop_ratios[ratio->get_active_row_number()].value > 0 && crop_ratios[ratio->get_active_row_number()].value < 1.0;
++    const bool flip_orientation =
++        fixr->get_active()
++        && crop_ratios->getValue(ratio->get_active_row_number()) > 0
++        && crop_ratios->getValue(ratio->get_active_row_number()) < 1.0;
+ 
+     if (orientation->get_active_row_number() == 0) {
+         pp->crop.orientation = flip_orientation ? "Portrait" : "Landscape";
+@@ -1501,7 +1552,7 @@ double Crop::getRatio () const
+         return r;
+     }
+ 
+-    r = crop_ratios[ratio->get_active_row_number()].value;
++    r = crop_ratios->getValue(ratio->get_active_row_number());
+     if (!r) {
+         r = maxh <= maxw ? float(maxh)/float(maxw) : float(maxw)/float(maxh);
+     }
+@@ -1539,5 +1590,5 @@ void Crop::updateCurrentRatio()
+     double rw, rh;
+     get_custom_ratio(w->get_value(), h->get_value(), rw, rh);
+     customRatioLabel->set_text(Glib::ustring::compose("%1:%2", rw, rh));
+-    crop_ratios[1].value = double(w->get_value())/double(h->get_value());
++    crop_ratios->updateCurrentRatio(static_cast<double>(w->get_value()) / static_cast<double>(h->get_value()));
+ }
+diff --git a/rtgui/crop.h b/rtgui/crop.h
+index b9221a803..c6636b917 100644
+--- a/rtgui/crop.h
++++ b/rtgui/crop.h
+@@ -18,7 +18,7 @@
+  */
+ #pragma once
+ 
+-#include <vector>
++#include <memory>
+ 
+ #include <gtkmm.h>
+ 
+@@ -91,16 +91,13 @@ class Crop final :
+     void rotateCrop         (int deg, bool hflip, bool vflip);
+ 
+ private:
+-    struct CropRatio {
+-        Glib::ustring label;
+-        double value;
+-    };
+-
+-    std::vector<CropRatio> crop_ratios;
++    class CropRatios;
+ 
+     void adjustCropToRatio();
+     void updateCurrentRatio();
+ 
++    const std::unique_ptr<CropRatios> crop_ratios;
++
+     Gtk::CheckButton* fixr;
+     MyComboBoxText* ratio;
+     MyComboBoxText* orientation;

diff --git a/media-gfx/rawtherapee/files/RT_5.8_glibc234.patch b/media-gfx/rawtherapee/files/RT_5.8_glibc234.patch
new file mode 100644
index 00000000000..791183e20d5
--- /dev/null
+++ b/media-gfx/rawtherapee/files/RT_5.8_glibc234.patch
@@ -0,0 +1,683 @@
+diff -udHrN -- a/RT_5.8_glibc234.patch b/RT_5.8_glibc234.patch
+--- a/RT_5.8_glibc234.patch	1970-01-01 01:00:00.000000000 +0100
++++ b/RT_5.8_glibc234.patch	2021-08-04 18:50:22.142646367 +0200
+@@ -0,0 +1,334 @@
++diff --git a/rtengine/canon_cr3_decoder.cc b/rtengine/canon_cr3_decoder.cc
++index ddd4b6172..1132b4e01 100644
++--- a/rtengine/canon_cr3_decoder.cc
+++++ b/rtengine/canon_cr3_decoder.cc
++@@ -670,7 +670,7 @@ std::uint32_t _byteswap_ulong(std::uint32_t x)
++ #endif
++ 
++ struct LibRaw_abstract_datastream {
++-    IMFILE* ifp;
+++    rtengine::IMFILE* ifp;
++ 
++     void lock()
++     {
++diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc
++index ef0b4e8dc..13a6b054a 100644
++--- a/rtengine/dcraw.cc
+++++ b/rtengine/dcraw.cc
++@@ -1963,7 +1963,7 @@ void CLASS phase_one_load_raw_c()
++ #endif
++ {
++     int len[2], pred[2];
++-    IMFILE ifpthr = *ifp;
+++    rtengine::IMFILE ifpthr = *ifp;
++     ifpthr.plistener = nullptr;
++ 
++ #ifdef _OPENMP
++@@ -3317,7 +3317,7 @@ void CLASS sony_arw2_load_raw()
++ {
++     uchar *data = new (std::nothrow) uchar[raw_width + 1];
++     merror(data, "sony_arw2_load_raw()");
++-    IMFILE ifpthr = *ifp;
+++    rtengine::IMFILE ifpthr = *ifp;
++     int pos = ifpthr.pos;
++     ushort pix[16];
++ 
++@@ -6331,7 +6331,7 @@ int CLASS parse_tiff_ifd (int base)
++   unsigned sony_curve[] = { 0,0,0,0,0,4095 };
++   unsigned *buf, sony_offset=0, sony_length=0, sony_key=0;
++   struct jhead jh;
++-/*RT*/  IMFILE *sfp;
+++/*RT*/  rtengine::IMFILE *sfp;
++ /*RT*/  int pana_raw = 0;
++ 
++   if (tiff_nifds >= sizeof tiff_ifd / sizeof tiff_ifd[0])
++@@ -6895,7 +6895,7 @@ it under the terms of the one of two licenses as you choose:
++     fread (buf, sony_length, 1, ifp);
++     sony_decrypt (buf, sony_length/4, 1, sony_key);
++     sfp = ifp;
++-/*RT*/ ifp = fopen (buf, sony_length);
+++/*RT*/ ifp = rtengine::fopen (buf, sony_length);
++ // if ((ifp = tmpfile())) {
++ // fwrite (buf, sony_length, 1, ifp);
++ // fseek (ifp, 0, SEEK_SET);
++@@ -7203,7 +7203,7 @@ void CLASS parse_external_jpeg()
++ {
++   const char *file, *ext;
++   char *jname, *jfile, *jext;
++-/*RT*/  IMFILE *save=ifp;
+++/*RT*/  rtengine::IMFILE *save=ifp;
++ 
++   ext  = strrchr (ifname, '.');
++   file = strrchr (ifname, '/');
++@@ -7231,7 +7231,7 @@ void CLASS parse_external_jpeg()
++       *jext = '0';
++     }
++   if (strcmp (jname, ifname)) {
++-/*RT*/    if ((ifp = fopen (jname))) {
+++/*RT*/    if ((ifp = rtengine::fopen (jname))) {
++ //    if ((ifp = fopen (jname, "rb"))) {
++       if (verbose)
++ 	fprintf (stderr,_("Reading metadata from %s ...\n"), jname);
++diff --git a/rtengine/dcraw.h b/rtengine/dcraw.h
++index 10c7b9ba6..bc009e67c 100644
++--- a/rtengine/dcraw.h
+++++ b/rtengine/dcraw.h
++@@ -73,7 +73,7 @@ public:
++ 
++ protected:
++     int exif_base, ciff_base, ciff_len;
++-    IMFILE *ifp;
+++    rtengine::IMFILE *ifp;
++     FILE *ofp;
++     short order;
++     const char *ifname;
++@@ -125,7 +125,7 @@ protected:
++         int         cur_buf_size;    // buffer size
++         uchar       *cur_buf;        // currently read block
++         int         fillbytes;          // Counter to add extra byte for block size N*16
++-        IMFILE      *input;
+++        rtengine::IMFILE      *input;
++         struct int_pair grad_even[3][41];    // tables of gradients
++         struct int_pair grad_odd[3][41];
++         ushort		*linealloc;
++@@ -278,7 +278,7 @@ void parse_redcine();
++ class getbithuff_t
++ {
++ public:
++-   getbithuff_t(DCraw *p,IMFILE *&i, unsigned &z):parent(p),bitbuf(0),vbits(0),reset(0),ifp(i),zero_after_ff(z){}
+++   getbithuff_t(DCraw *p,rtengine::IMFILE *&i, unsigned &z):parent(p),bitbuf(0),vbits(0),reset(0),ifp(i),zero_after_ff(z){}
++    unsigned operator()(int nbits, ushort *huff);
++ 
++ private:
++@@ -288,7 +288,7 @@ private:
++    DCraw *parent;
++    unsigned bitbuf;
++    int vbits, reset;
++-   IMFILE *&ifp;
+++   rtengine::IMFILE *&ifp;
++    unsigned &zero_after_ff;
++ };
++ getbithuff_t getbithuff;
++@@ -296,7 +296,7 @@ getbithuff_t getbithuff;
++ class nikbithuff_t
++ {
++ public:
++-   explicit nikbithuff_t(IMFILE *&i):bitbuf(0),errors(0),vbits(0),ifp(i){}
+++   explicit nikbithuff_t(rtengine::IMFILE *&i):bitbuf(0),errors(0),vbits(0),ifp(i){}
++    void operator()() {bitbuf = vbits = 0;};
++    unsigned operator()(int nbits, ushort *huff);
++    unsigned errorCount() { return errors; }
++@@ -309,7 +309,7 @@ private:
++    }
++    unsigned bitbuf, errors;
++    int vbits;
++-   IMFILE *&ifp;
+++   rtengine::IMFILE *&ifp;
++ };
++ nikbithuff_t nikbithuff;
++ 
++@@ -377,7 +377,7 @@ void parse_qt (int end);
++ // ph1_bithuff(int nbits, ushort *huff);
++ class ph1_bithuff_t {
++ public:
++-   ph1_bithuff_t(DCraw *p, IMFILE *i, short &o):order(o),ifp(i),bitbuf(0),vbits(0){}
+++   ph1_bithuff_t(DCraw *p, rtengine::IMFILE *i, short &o):order(o),ifp(i),bitbuf(0),vbits(0){}
++    unsigned operator()(int nbits, ushort *huff);
++    unsigned operator()(int nbits);
++    unsigned operator()();
++@@ -411,7 +411,7 @@ private:
++    }
++ 
++    short &order;
++-   IMFILE* const ifp;
+++   rtengine::IMFILE* const ifp;
++    UINT64 bitbuf;
++    int vbits;
++ };
++@@ -429,11 +429,11 @@ void nokia_load_raw();
++ 
++ class pana_bits_t{
++ public:
++-   pana_bits_t(IMFILE *i, unsigned &u, unsigned enc):
+++   pana_bits_t(rtengine::IMFILE *i, unsigned &u, unsigned enc):
++     ifp(i), load_flags(u), vbits(0), encoding(enc) {}
++    unsigned operator()(int nbits, unsigned *bytes=nullptr);
++ private:
++-   IMFILE *ifp;
+++   rtengine::IMFILE *ifp;
++    unsigned &load_flags;
++    uchar buf[0x4000];
++    int vbits;
++diff --git a/rtengine/dfmanager.cc b/rtengine/dfmanager.cc
++index 7dde668eb..e551c9aad 100644
++--- a/rtengine/dfmanager.cc
+++++ b/rtengine/dfmanager.cc
++@@ -540,7 +540,7 @@ std::vector<badPix> *DFManager::getHotPixels ( const std::string &mak, const std
++ 
++ int DFManager::scanBadPixelsFile( Glib::ustring filename )
++ {
++-    FILE *file = fopen( filename.c_str(), "r" );
+++    FILE *file = ::fopen( filename.c_str(), "r" );
++ 
++     if( !file ) {
++         return false;
++diff --git a/rtengine/myfile.cc b/rtengine/myfile.cc
++index 842766dcf..2321d18bb 100644
++--- a/rtengine/myfile.cc
+++++ b/rtengine/myfile.cc
++@@ -70,7 +70,7 @@ int munmap(void *start, size_t length)
++ 
++ #ifdef MYFILE_MMAP
++ 
++-IMFILE* fopen (const char* fname)
+++rtengine::IMFILE* rtengine::fopen (const char* fname)
++ {
++     int fd;
++ 
++@@ -123,13 +123,13 @@ IMFILE* fopen (const char* fname)
++     return mf;
++ }
++ 
++-IMFILE* gfopen (const char* fname)
+++rtengine::IMFILE* rtengine::gfopen (const char* fname)
++ {
++     return fopen(fname);
++ }
++ #else
++ 
++-IMFILE* fopen (const char* fname)
+++rtengine::IMFILE* rtengine::fopen (const char* fname)
++ {
++ 
++     FILE* f = g_fopen (fname, "rb");
++@@ -152,7 +152,7 @@ IMFILE* fopen (const char* fname)
++     return mf;
++ }
++ 
++-IMFILE* gfopen (const char* fname)
+++rtengine::IMFILE* rtengine::gfopen (const char* fname)
++ {
++ 
++     FILE* f = g_fopen (fname, "rb");
++@@ -176,7 +176,7 @@ IMFILE* gfopen (const char* fname)
++ }
++ #endif //MYFILE_MMAP
++ 
++-IMFILE* fopen (unsigned* buf, int size)
+++rtengine::IMFILE* rtengine::fopen (unsigned* buf, int size)
++ {
++ 
++     IMFILE* mf = new IMFILE;
++@@ -190,7 +190,7 @@ IMFILE* fopen (unsigned* buf, int size)
++     return mf;
++ }
++ 
++-void fclose (IMFILE* f)
+++void rtengine::fclose (IMFILE* f)
++ {
++ #ifdef MYFILE_MMAP
++ 
++@@ -207,7 +207,7 @@ void fclose (IMFILE* f)
++     delete f;
++ }
++ 
++-int fscanf (IMFILE* f, const char* s ...)
+++int rtengine::fscanf (IMFILE* f, const char* s ...)
++ {
++     // fscanf not easily wrapped since we have no terminating \0 at end
++     // of file data and vsscanf() won't tell us how many characters that
++@@ -253,7 +253,7 @@ int fscanf (IMFILE* f, const char* s ...)
++ }
++ 
++ 
++-char* fgets (char* s, int n, IMFILE* f)
+++char* rtengine::fgets (char* s, int n, IMFILE* f)
++ {
++ 
++     if (f->pos >= f->size) {
++@@ -270,7 +270,7 @@ char* fgets (char* s, int n, IMFILE* f)
++     return s;
++ }
++ 
++-void imfile_set_plistener(IMFILE *f, rtengine::ProgressListener *plistener, double progress_range)
+++void rtengine::imfile_set_plistener(IMFILE *f, rtengine::ProgressListener *plistener, double progress_range)
++ {
++     f->plistener = plistener;
++     f->progress_range = progress_range;
++@@ -278,7 +278,7 @@ void imfile_set_plistener(IMFILE *f, rtengine::ProgressListener *plistener, doub
++     f->progress_current = 0;
++ }
++ 
++-void imfile_update_progress(IMFILE *f)
+++void rtengine::imfile_update_progress(IMFILE *f)
++ {
++     if (!f->plistener || f->progress_current < f->progress_next) {
++         return;
++diff --git a/rtengine/myfile.h b/rtengine/myfile.h
++index 34b90c525..ae14ce31a 100644
++--- a/rtengine/myfile.h
+++++ b/rtengine/myfile.h
++@@ -30,8 +30,6 @@ namespace rtengine
++ 
++ class ProgressListener;
++ 
++-}
++-
++ struct IMFILE {
++     int fd;
++     ssize_t pos;
++@@ -141,3 +139,5 @@ inline unsigned char* fdata(int offset, IMFILE* f)
++ 
++ int fscanf (IMFILE* f, const char* s ...);
++ char* fgets (char* s, int n, IMFILE* f);
+++
+++}
++diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc
++index 8dc998862..cf500474f 100644
++--- a/rtengine/rtthumbnail.cc
+++++ b/rtengine/rtthumbnail.cc
++@@ -1965,7 +1965,7 @@ bool Thumbnail::writeImage (const Glib::ustring& fname)
++ 
++     Glib::ustring fullFName = fname + ".rtti";
++ 
++-    FILE* f = g_fopen (fullFName.c_str (), "wb");
+++    FILE* f = ::g_fopen (fullFName.c_str (), "wb");
++ 
++     if (!f) {
++         return false;
++@@ -2008,7 +2008,7 @@ bool Thumbnail::readImage (const Glib::ustring& fname)
++         return false;
++     }
++ 
++-    FILE* f = g_fopen(fullFName.c_str (), "rb");
+++    FILE* f = ::g_fopen(fullFName.c_str (), "rb");
++ 
++     if (!f) {
++         return false;
++@@ -2239,7 +2239,7 @@ bool Thumbnail::writeData  (const Glib::ustring& fname)
++         return false;
++     }
++ 
++-    FILE *f = g_fopen (fname.c_str (), "wt");
+++    FILE *f = ::g_fopen (fname.c_str (), "wt");
++ 
++     if (!f) {
++         if (settings->verbose) {
++@@ -2262,7 +2262,7 @@ bool Thumbnail::readEmbProfile  (const Glib::ustring& fname)
++     embProfile = nullptr;
++     embProfileLength = 0;
++ 
++-    FILE* f = g_fopen (fname.c_str (), "rb");
+++    FILE* f = ::g_fopen (fname.c_str (), "rb");
++ 
++     if (f) {
++         if (!fseek (f, 0, SEEK_END)) {
++@@ -2290,7 +2290,7 @@ bool Thumbnail::writeEmbProfile (const Glib::ustring& fname)
++ {
++ 
++     if (embProfileData) {
++-        FILE* f = g_fopen (fname.c_str (), "wb");
+++        FILE* f = ::g_fopen (fname.c_str (), "wb");
++ 
++         if (f) {
++             fwrite (embProfileData, 1, embProfileLength, f);
+diff -udHrN -- a/rtengine/canon_cr3_decoder.cc b/rtengine/canon_cr3_decoder.cc
+--- a/rtengine/canon_cr3_decoder.cc	2020-02-04 07:39:52.000000000 +0100
++++ b/rtengine/canon_cr3_decoder.cc	2021-08-07 11:43:50.725202017 +0200
+@@ -662,7 +662,7 @@
+ #endif
+ 
+ struct LibRaw_abstract_datastream {
+-    IMFILE* ifp;
++    rtengine::IMFILE* ifp;
+ 
+     void lock()
+     {
+diff -udHrN -- a/rtengine/dcraw.cc b/rtengine/dcraw.cc
+--- a/rtengine/dcraw.cc	2020-02-04 07:39:52.000000000 +0100
++++ b/rtengine/dcraw.cc	2021-08-07 11:43:50.736202141 +0200
+@@ -2025,7 +2025,7 @@
+ #endif
+ {
+     int len[2], pred[2];
+-    IMFILE ifpthr = *ifp;
++    rtengine::IMFILE ifpthr = *ifp;
+     ifpthr.plistener = nullptr;
+ 
+ #ifdef _OPENMP
+@@ -3380,7 +3380,7 @@
+ {
+     uchar *data = new (std::nothrow) uchar[raw_width + 1];
+     merror(data, "sony_arw2_load_raw()");
+-    IMFILE ifpthr = *ifp;
++    rtengine::IMFILE ifpthr = *ifp;
+     int pos = ifpthr.pos;
+     ushort pix[16];
+ 
+@@ -6394,7 +6394,7 @@
+   unsigned sony_curve[] = { 0,0,0,0,0,4095 };
+   unsigned *buf, sony_offset=0, sony_length=0, sony_key=0;
+   struct jhead jh;
+-/*RT*/  IMFILE *sfp;
++/*RT*/  rtengine::IMFILE *sfp;
+ /*RT*/  int pana_raw = 0;
+ 
+   if (tiff_nifds >= sizeof tiff_ifd / sizeof tiff_ifd[0])
+@@ -6958,7 +6958,7 @@
+     fread (buf, sony_length, 1, ifp);
+     sony_decrypt (buf, sony_length/4, 1, sony_key);
+     sfp = ifp;
+-/*RT*/ ifp = fopen (buf, sony_length);
++/*RT*/ ifp = rtengine::fopen (buf, sony_length);
+ // if ((ifp = tmpfile())) {
+ // fwrite (buf, sony_length, 1, ifp);
+ // fseek (ifp, 0, SEEK_SET);
+@@ -7264,7 +7264,7 @@
+ {
+   const char *file, *ext;
+   char *jname, *jfile, *jext;
+-/*RT*/  IMFILE *save=ifp;
++/*RT*/  rtengine::IMFILE *save=ifp;
+ 
+   ext  = strrchr (ifname, '.');
+   file = strrchr (ifname, '/');
+@@ -7292,7 +7292,7 @@
+       *jext = '0';
+     }
+   if (strcmp (jname, ifname)) {
+-/*RT*/    if ((ifp = fopen (jname))) {
++/*RT*/    if ((ifp = rtengine::fopen (jname))) {
+ //    if ((ifp = fopen (jname, "rb"))) {
+       if (verbose)
+ 	fprintf (stderr,_("Reading metadata from %s ...\n"), jname);
+diff -udHrN -- a/rtengine/dcraw.h b/rtengine/dcraw.h
+--- a/rtengine/dcraw.h	2020-02-04 07:39:52.000000000 +0100
++++ b/rtengine/dcraw.h	2021-08-07 11:43:50.737202152 +0200
+@@ -73,7 +73,7 @@
+ 
+ protected:
+     int exif_base, ciff_base, ciff_len;
+-    IMFILE *ifp;
++    rtengine::IMFILE *ifp;
+     FILE *ofp;
+     short order;
+     const char *ifname;
+@@ -125,7 +125,7 @@
+         int         cur_buf_size;    // buffer size
+         uchar       *cur_buf;        // currently read block
+         int         fillbytes;          // Counter to add extra byte for block size N*16
+-        IMFILE      *input;
++        rtengine::IMFILE      *input;
+         struct int_pair grad_even[3][41];    // tables of gradients
+         struct int_pair grad_odd[3][41];
+         ushort		*linealloc;
+@@ -278,7 +278,7 @@
+ class getbithuff_t
+ {
+ public:
+-   getbithuff_t(DCraw *p,IMFILE *&i, unsigned &z):parent(p),bitbuf(0),vbits(0),reset(0),ifp(i),zero_after_ff(z){}
++   getbithuff_t(DCraw *p,rtengine::IMFILE *&i, unsigned &z):parent(p),bitbuf(0),vbits(0),reset(0),ifp(i),zero_after_ff(z){}
+    unsigned operator()(int nbits, ushort *huff);
+ 
+ private:
+@@ -288,7 +288,7 @@
+    DCraw *parent;
+    unsigned bitbuf;
+    int vbits, reset;
+-   IMFILE *&ifp;
++   rtengine::IMFILE *&ifp;
+    unsigned &zero_after_ff;
+ };
+ getbithuff_t getbithuff;
+@@ -296,7 +296,7 @@
+ class nikbithuff_t
+ {
+ public:
+-   explicit nikbithuff_t(IMFILE *&i):bitbuf(0),errors(0),vbits(0),ifp(i){}
++   explicit nikbithuff_t(rtengine::IMFILE *&i):bitbuf(0),errors(0),vbits(0),ifp(i){}
+    void operator()() {bitbuf = vbits = 0;};
+    unsigned operator()(int nbits, ushort *huff);
+    unsigned errorCount() { return errors; }
+@@ -309,7 +309,7 @@
+    }
+    unsigned bitbuf, errors;
+    int vbits;
+-   IMFILE *&ifp;
++   rtengine::IMFILE *&ifp;
+ };
+ nikbithuff_t nikbithuff;
+ 
+@@ -378,7 +378,7 @@
+ // ph1_bithuff(int nbits, ushort *huff);
+ class ph1_bithuff_t {
+ public:
+-   ph1_bithuff_t(DCraw *p, IMFILE *i, short &o):order(o),ifp(i),bitbuf(0),vbits(0){}
++   ph1_bithuff_t(DCraw *p, rtengine::IMFILE *i, short &o):order(o),ifp(i),bitbuf(0),vbits(0){}
+    unsigned operator()(int nbits, ushort *huff);
+    unsigned operator()(int nbits);
+    unsigned operator()();
+@@ -412,7 +412,7 @@
+    }
+ 
+    short &order;
+-   IMFILE* const ifp;
++   rtengine::IMFILE* const ifp;
+    UINT64 bitbuf;
+    int vbits;
+ };
+@@ -430,11 +430,11 @@
+ 
+ class pana_bits_t{
+ public:
+-   pana_bits_t(IMFILE *i, unsigned &u, unsigned enc):
++   pana_bits_t(rtengine::IMFILE *i, unsigned &u, unsigned enc):
+     ifp(i), load_flags(u), vbits(0), encoding(enc) {}
+    unsigned operator()(int nbits, unsigned *bytes=nullptr);
+ private:
+-   IMFILE *ifp;
++   rtengine::IMFILE *ifp;
+    unsigned &load_flags;
+    uchar buf[0x4000];
+    int vbits;
+diff -udHrN -- a/rtengine/dfmanager.cc b/rtengine/dfmanager.cc
+--- a/rtengine/dfmanager.cc	2020-02-04 07:39:52.000000000 +0100
++++ b/rtengine/dfmanager.cc	2021-08-07 11:43:50.738202163 +0200
+@@ -540,7 +540,7 @@
+ 
+ int DFManager::scanBadPixelsFile( Glib::ustring filename )
+ {
+-    FILE *file = fopen( filename.c_str(), "r" );
++    FILE *file = ::fopen( filename.c_str(), "r" );
+ 
+     if( !file ) {
+         return false;
+diff -udHrN -- a/rtengine/myfile.cc b/rtengine/myfile.cc
+--- a/rtengine/myfile.cc	2020-02-04 07:39:52.000000000 +0100
++++ b/rtengine/myfile.cc	2021-08-07 11:43:50.738202163 +0200
+@@ -70,7 +70,7 @@
+ 
+ #ifdef MYFILE_MMAP
+ 
+-IMFILE* fopen (const char* fname)
++rtengine::IMFILE* rtengine::fopen (const char* fname)
+ {
+     int fd;
+ 
+@@ -123,13 +123,13 @@
+     return mf;
+ }
+ 
+-IMFILE* gfopen (const char* fname)
++rtengine::IMFILE* rtengine::gfopen (const char* fname)
+ {
+     return fopen(fname);
+ }
+ #else
+ 
+-IMFILE* fopen (const char* fname)
++rtengine::IMFILE* rtengine::fopen (const char* fname)
+ {
+ 
+     FILE* f = g_fopen (fname, "rb");
+@@ -152,7 +152,7 @@
+     return mf;
+ }
+ 
+-IMFILE* gfopen (const char* fname)
++rtengine::IMFILE* rtengine::gfopen (const char* fname)
+ {
+ 
+     FILE* f = g_fopen (fname, "rb");
+@@ -176,7 +176,7 @@
+ }
+ #endif //MYFILE_MMAP
+ 
+-IMFILE* fopen (unsigned* buf, int size)
++rtengine::IMFILE* rtengine::fopen (unsigned* buf, int size)
+ {
+ 
+     IMFILE* mf = new IMFILE;
+@@ -190,7 +190,7 @@
+     return mf;
+ }
+ 
+-void fclose (IMFILE* f)
++void rtengine::fclose (IMFILE* f)
+ {
+ #ifdef MYFILE_MMAP
+ 
+@@ -207,7 +207,7 @@
+     delete f;
+ }
+ 
+-int fscanf (IMFILE* f, const char* s ...)
++int rtengine::fscanf (IMFILE* f, const char* s ...)
+ {
+     // fscanf not easily wrapped since we have no terminating \0 at end
+     // of file data and vsscanf() won't tell us how many characters that
+@@ -253,7 +253,7 @@
+ }
+ 
+ 
+-char* fgets (char* s, int n, IMFILE* f)
++char* rtengine::fgets (char* s, int n, IMFILE* f)
+ {
+ 
+     if (f->pos >= f->size) {
+@@ -270,7 +270,7 @@
+     return s;
+ }
+ 
+-void imfile_set_plistener(IMFILE *f, rtengine::ProgressListener *plistener, double progress_range)
++void rtengine::imfile_set_plistener(IMFILE *f, rtengine::ProgressListener *plistener, double progress_range)
+ {
+     f->plistener = plistener;
+     f->progress_range = progress_range;
+@@ -278,7 +278,7 @@
+     f->progress_current = 0;
+ }
+ 
+-void imfile_update_progress(IMFILE *f)
++void rtengine::imfile_update_progress(IMFILE *f)
+ {
+     if (!f->plistener || f->progress_current < f->progress_next) {
+         return;
+diff -udHrN -- a/rtengine/myfile.h b/rtengine/myfile.h
+--- a/rtengine/myfile.h	2020-02-04 07:39:52.000000000 +0100
++++ b/rtengine/myfile.h	2021-08-07 11:43:50.739202175 +0200
+@@ -30,8 +30,6 @@
+ 
+ class ProgressListener;
+ 
+-}
+-
+ struct IMFILE {
+     int fd;
+     ssize_t pos;
+@@ -141,3 +139,5 @@
+ 
+ int fscanf (IMFILE* f, const char* s ...);
+ char* fgets (char* s, int n, IMFILE* f);
++
++}
+diff -udHrN -- a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc
+--- a/rtengine/rtthumbnail.cc	2020-02-04 07:39:52.000000000 +0100
++++ b/rtengine/rtthumbnail.cc	2021-08-07 12:02:02.091503230 +0200
+@@ -1922,7 +1922,7 @@
+ 
+     Glib::ustring fullFName = fname + ".rtti";
+ 
+-    FILE* f = g_fopen (fullFName.c_str (), "wb");
++    FILE* f = ::g_fopen (fullFName.c_str (), "wb");
+ 
+     if (!f) {
+         return false;
+@@ -1965,7 +1965,7 @@
+         return false;
+     }
+ 
+-    FILE* f = g_fopen(fullFName.c_str (), "rb");
++    FILE* f = ::g_fopen(fullFName.c_str (), "rb");
+ 
+     if (!f) {
+         return false;
+@@ -2191,7 +2191,7 @@
+         return false;
+     }
+ 
+-    FILE *f = g_fopen (fname.c_str (), "wt");
++    FILE *f = ::g_fopen (fname.c_str (), "wt");
+ 
+     if (!f) {
+         if (settings->verbose) {
+@@ -2214,7 +2214,7 @@
+     embProfile = nullptr;
+     embProfileLength = 0;
+ 
+-    FILE* f = g_fopen (fname.c_str (), "rb");
++    FILE* f = ::g_fopen (fname.c_str (), "rb");
+ 
+     if (f) {
+         if (!fseek (f, 0, SEEK_END)) {
+@@ -2242,7 +2242,7 @@
+ {
+ 
+     if (embProfileData) {
+-        FILE* f = g_fopen (fname.c_str (), "wb");
++        FILE* f = ::g_fopen (fname.c_str (), "wb");
+ 
+         if (f) {
+             fwrite (embProfileData, 1, embProfileLength, f);
+@@ -2257,7 +2257,7 @@
+ bool Thumbnail::readAEHistogram  (const Glib::ustring& fname)
+ {
+ 
+-    FILE* f = g_fopen(fname.c_str(), "rb");
++    FILE* f = ::g_fopen(fname.c_str(), "rb");
+ 
+     if (!f) {
+         aeHistogram.reset();
+@@ -2280,7 +2280,7 @@
+ {
+ 
+     if (aeHistogram) {
+-        FILE* f = g_fopen (fname.c_str (), "wb");
++        FILE* f = ::g_fopen (fname.c_str (), "wb");
+ 
+         if (f) {
+             fwrite (&aeHistogram[0], 1, (65536 >> aeHistCompression)*sizeof (aeHistogram[0]), f);

diff --git a/media-gfx/rawtherapee/rawtherapee-5.8-r1.ebuild b/media-gfx/rawtherapee/rawtherapee-5.8-r1.ebuild
new file mode 100644
index 00000000000..8d30e2bd5ad
--- /dev/null
+++ b/media-gfx/rawtherapee/rawtherapee-5.8-r1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MY_P=${P/_rc/-rc}
+inherit cmake flag-o-matic toolchain-funcs xdg-utils
+
+DESCRIPTION="A powerful cross-platform raw image processing program"
+HOMEPAGE="https://www.rawtherapee.com/"
+SRC_URI="https://rawtherapee.com/shared/source/${MY_P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="openmp tcmalloc"
+
+RDEPEND="
+	dev-libs/expat
+	dev-libs/libsigc++:2
+	media-libs/lcms:2
+	media-libs/lensfun
+	media-libs/libcanberra[gtk3]
+	media-libs/libiptcdata
+	media-libs/libpng:0=
+	media-libs/tiff:0
+	sci-libs/fftw:3.0=
+	sys-libs/zlib
+	virtual/jpeg:0
+	x11-libs/gtk+:3
+	tcmalloc? ( dev-util/google-perftools )"
+DEPEND="${RDEPEND}
+	dev-cpp/gtkmm:3.0
+	gnome-base/librsvg"
+BDEPEND="virtual/pkgconfig"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+    "${FILESDIR}/RT_5.8_fix_crop.patch"
+    "${FILESDIR}/RT_5.8_glibc234.patch"
+)
+
+pkg_pretend() {
+	if use openmp ; then
+		tc-has-openmp || die "Please switch to an openmp compatible compiler"
+	fi
+}
+
+src_configure() {
+	# upstream tested that "fast-math" give wrong results, so filter it
+	# https://bugs.gentoo.org/show_bug.cgi?id=606896#c2
+	filter-flags -ffast-math
+	# -Ofast enable "fast-math" both in gcc and clang
+	replace-flags -Ofast -O3
+	# In case we add an ebuild for klt we can (i)use that one,
+	# see http://cecas.clemson.edu/~stb/klt/
+	local mycmakeargs=(
+		-DOPTION_OMP=$(usex openmp)
+		-DDOCDIR=/usr/share/doc/${PF}
+		-DCREDITSDIR=/usr/share/${PN}
+		-DLICENCEDIR=/usr/share/${PN}
+		-DCACHE_NAME_SUFFIX=""
+		-DWITH_SYSTEM_KLT="off"
+		-DENABLE_TCMALLOC=$(usex tcmalloc)
+	)
+	cmake_src_configure
+}
+
+pkg_postinst() {
+	xdg_icon_cache_update
+	xdg_desktop_database_update
+}
+
+pkg_postrm() {
+	xdg_icon_cache_update
+	xdg_desktop_database_update
+}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/rawtherapee/, media-gfx/rawtherapee/files/
@ 2023-02-18 13:55 Andreas Sturmlechner
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2023-02-18 13:55 UTC (permalink / raw
  To: gentoo-commits

commit:     bb7aef31bd067df47065449f3677bae2dd8ceb8f
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Feb  9 13:35:35 2023 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Feb 18 13:55:20 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb7aef31

media-gfx/rawtherapee: drop 5.8-r4

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 media-gfx/rawtherapee/Manifest                    |   1 -
 media-gfx/rawtherapee/files/RT_5.8_fix_crop.patch | 221 -------
 media-gfx/rawtherapee/files/RT_5.8_glibc234.patch | 683 ----------------------
 media-gfx/rawtherapee/rawtherapee-5.8-r4.ebuild   |  85 ---
 4 files changed, 990 deletions(-)

diff --git a/media-gfx/rawtherapee/Manifest b/media-gfx/rawtherapee/Manifest
index b6972135aeee..f0e2ae008708 100644
--- a/media-gfx/rawtherapee/Manifest
+++ b/media-gfx/rawtherapee/Manifest
@@ -1,2 +1 @@
-DIST rawtherapee-5.8.tar.xz 12653148 BLAKE2B f6d4b9b177ad3b6a32b460ecfc7caf5d42a01b5dd4f24da29739f5a2e5936a8d36f9857c0e24bca11f077ab0626f08bbad59ef756792d12f93ef9516427cd2c4 SHA512 bc79586cd937dcaefc053e65faa2162de887d514e44980956d937c157c6d55c4f6e6a7a9b8f91f2d657ed2054814737b96d5d741674c1e5a961d7177433efe4e
 DIST rawtherapee-5.9.tar.xz 16219076 BLAKE2B 32039d6927eb4a4efbb49f3ad2bd019bd9f73c92a5e7125b7c560aaf7b6a42a5f1a2f67b24a713e4b255867539eda2bf63ea4e988453ec9634c917a11432a7fb SHA512 0d848a36293eb5cac3212910eaf1d011315269c6bbe780c4c2e5f91719721e25a7d1678a7e4453fa4a9694618978b04828612dc03e1d50cb9c11ad4d238e7ca8

diff --git a/media-gfx/rawtherapee/files/RT_5.8_fix_crop.patch b/media-gfx/rawtherapee/files/RT_5.8_fix_crop.patch
deleted file mode 100644
index 24cbfdcb41db..000000000000
--- a/media-gfx/rawtherapee/files/RT_5.8_fix_crop.patch
+++ /dev/null
@@ -1,221 +0,0 @@
-From 15db8cdb57161d57af8307bf85aeda02ea69ddde Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Fl=C3=B6ssie?= <floessie.mail@gmail.com>
-Date: Sun, 5 Apr 2020 11:26:47 +0200
-Subject: [PATCH] Guard accesses to `Crop::crop_ratios` (#5701)
-
----
- rtgui/crop.cc | 125 +++++++++++++++++++++++++++++++++++---------------
- rtgui/crop.h  |  11 ++---
- 2 files changed, 92 insertions(+), 44 deletions(-)
-
-diff --git a/rtgui/crop.cc b/rtgui/crop.cc
-index d9d496523..f092f07a5 100644
---- a/rtgui/crop.cc
-+++ b/rtgui/crop.cc
-@@ -16,6 +16,8 @@
-  *  You should have received a copy of the GNU General Public License
-  *  along with RawTherapee.  If not, see <https://www.gnu.org/licenses/>.
-  */
-+#include <vector>
-+
- #include "crop.h"
- 
- #include "options.h"
-@@ -46,39 +48,82 @@ inline void get_custom_ratio(int w, int h, double &rw, double &rh)
- 
- } // namespace
- 
-+class Crop::CropRatios final
-+{
-+public:
-+    CropRatios() :
-+        ratios{
-+            {M("GENERAL_ASIMAGE"), 0.0},
-+            {M("GENERAL_CURRENT"), -1.0},
-+            {"3:2", 3.0 / 2.0},                 // L1.5,        P0.666...
-+            {"4:3", 4.0 / 3.0},                 // L1.333...,   P0.75
-+            {"16:9", 16.0 / 9.0},               // L1.777...,   P0.5625
-+            {"16:10", 16.0 / 10.0},             // L1.6,        P0.625
-+            {"1:1", 1.0 / 1.0},                 // L1,          P1
-+            {"2:1", 2.0 / 1.0},                 // L2,          P0.5
-+            {"3:1", 3.0 / 1.0},                 // L3,          P0.333...
-+            {"4:1", 4.0 / 1.0},                 // L4,          P0.25
-+            {"5:1", 5.0 / 1.0},                 // L5,          P0.2
-+            {"6:1", 6.0 / 1.0},                 // L6,          P0.1666...
-+            {"7:1", 7.0 / 1.0},                 // L7,          P0.142...
-+            {"4:5", 4.0 / 5.0},                 // L1.25,       P0.8
-+            {"5:7", 5.0 / 7.0},                 // L1.4,        P0.714...
-+            {"6:7", 6.0 / 7.0},                 // L1.166...,   P0.857...
-+            {"6:17", 6.0 / 17.0},               // L2.833...,   P0.352...
-+            {"24:65 - XPAN", 24.0 / 65.0},      // L2.708...,   P0.369...
-+            {"1.414 - DIN EN ISO 216", 1.414},  // L1.414,      P0.707...
-+            {"3.5:5", 3.5 / 5.0},               // L1.428...,   P0.7
-+            {"8.5:11 - US Letter", 8.5 / 11.0}, // L1.294...,   P0.772...
-+            {"9.5:12", 9.5 / 12.0},             // L1.263...,   P0.791...
-+            {"10:12", 10.0 / 12.0},             // L1.2,        P0.833...
-+            {"11:14", 11.0 / 14.0},             // L1.272...,   P0.785...
-+            {"11:17 - Tabloid", 11.0 / 17.0},   // L1.545...,   P0.647...
-+            {"13:19", 13.0 / 19.0},             // L1.461...,   P0.684...
-+            {"17:22", 17.0 / 22.0},             // L1.294...,   P0.772...
-+            {"45:35 - ePassport", 45.0 / 35.0}, // L1.285,...   P0.777...
-+            {"64:27", 64.0 / 27.0},             // L2.370...,   P0.421...
-+        }
-+    {
-+    }
-+
-+    std::vector<Glib::ustring> getLabels() const
-+    {
-+        std::vector<Glib::ustring> res;
-+
-+        res.reserve(ratios.size());
-+
-+        for (const auto& ratio : ratios) {
-+            res.push_back(ratio.label);
-+        }
-+
-+        return res;
-+    }
-+
-+    double getValue(std::size_t index) const
-+    {
-+        return
-+            index < ratios.size()
-+                ? ratios[index].value
-+                : ratios[0].value;
-+    }
-+
-+    void updateCurrentRatio(double value)
-+    {
-+        ratios[1].value = value;
-+    }
-+
-+private:
-+    struct CropRatio {
-+        Glib::ustring label;
-+        double value;
-+    };
-+
-+    std::vector<CropRatio> ratios;
-+};
-+
- Crop::Crop():
-     FoldableToolPanel(this, "crop", M("TP_CROP_LABEL"), false, true),
--    crop_ratios{
--        {M("GENERAL_ASIMAGE"), 0.0},
--        {M("GENERAL_CURRENT"), -1.0},
--        {"3:2", 3.0 / 2.0},                 // L1.5,        P0.666...
--        {"4:3", 4.0 / 3.0},                 // L1.333...,   P0.75
--        {"16:9", 16.0 / 9.0},               // L1.777...,   P0.5625
--        {"16:10", 16.0 / 10.0},             // L1.6,        P0.625
--        {"1:1", 1.0 / 1.0},                 // L1,          P1
--        {"2:1", 2.0 / 1.0},                 // L2,          P0.5
--        {"3:1", 3.0 / 1.0},                 // L3,          P0.333...
--        {"4:1", 4.0 / 1.0},                 // L4,          P0.25
--        {"5:1", 5.0 / 1.0},                 // L5,          P0.2
--        {"6:1", 6.0 / 1.0},                 // L6,          P0.1666...
--        {"7:1", 7.0 / 1.0},                 // L7,          P0.142...
--        {"4:5", 4.0 / 5.0},                 // L1.25,       P0.8
--        {"5:7", 5.0 / 7.0},                 // L1.4,        P0.714...
--        {"6:7", 6.0 / 7.0},                 // L1.166...,   P0.857...
--        {"6:17", 6.0 / 17.0},               // L2.833...,   P0.352...
--        {"24:65 - XPAN", 24.0 / 65.0},      // L2.708...,   P0.369...
--        {"1.414 - DIN EN ISO 216", 1.414},  // L1.414,      P0.707...
--        {"3.5:5", 3.5 / 5.0},               // L1.428...,   P0.7
--        {"8.5:11 - US Letter", 8.5 / 11.0}, // L1.294...,   P0.772...
--        {"9.5:12", 9.5 / 12.0},             // L1.263...,   P0.791...
--        {"10:12", 10.0 / 12.0},             // L1.2,        P0.833...
--        {"11:14", 11.0 / 14.0},             // L1.272...,   P0.785...
--        {"11:17 - Tabloid", 11.0 / 17.0},   // L1.545...,   P0.647...
--        {"13:19", 13.0 / 19.0},             // L1.461...,   P0.684...
--        {"17:22", 17.0 / 22.0},             // L1.294...,   P0.772...
--        {"45:35 - ePassport", 45.0 / 35.0}, // L1.285,...   P0.777...
--        {"64:27", 64.0 / 27.0},             // L2.370...,   P0.421...
--    },
-+    crop_ratios(new CropRatios),
-     opt(0),
-     wDirty(true),
-     hDirty(true),
-@@ -229,8 +274,8 @@ Crop::Crop():
-     // ppigrid END
- 
-     // Populate the combobox
--    for (const auto& crop_ratio : crop_ratios) {
--        ratio->append (crop_ratio.label);
-+    for (const auto& label : crop_ratios->getLabels()) {
-+        ratio->append (label);
-     }
- 
-     ratio->set_active (0);
-@@ -354,7 +399,10 @@ void Crop::read (const ProcParams* pp, const ParamsEdited* pedited)
-         setDimensions (pp->crop.x + pp->crop.w, pp->crop.y + pp->crop.h);
-     }
- 
--    const bool flip_orientation = pp->crop.fixratio && crop_ratios[ratio->get_active_row_number()].value > 0 && crop_ratios[ratio->get_active_row_number()].value < 1.0;
-+    const bool flip_orientation =
-+        pp->crop.fixratio
-+        && crop_ratios->getValue(ratio->get_active_row_number()) > 0
-+        && crop_ratios->getValue(ratio->get_active_row_number()) < 1.0;
- 
-     if (pp->crop.orientation == "Landscape") {
-         orientation->set_active (flip_orientation ? 1 : 0);
-@@ -469,7 +517,10 @@ void Crop::write (ProcParams* pp, ParamsEdited* pedited)
-     }
- 
-     // for historical reasons we store orientation different if ratio is written as 2:3 instead of 3:2, but in GUI 'landscape' is always long side horizontal regardless of the ratio is written short or long side first.
--    const bool flip_orientation = fixr->get_active() && crop_ratios[ratio->get_active_row_number()].value > 0 && crop_ratios[ratio->get_active_row_number()].value < 1.0;
-+    const bool flip_orientation =
-+        fixr->get_active()
-+        && crop_ratios->getValue(ratio->get_active_row_number()) > 0
-+        && crop_ratios->getValue(ratio->get_active_row_number()) < 1.0;
- 
-     if (orientation->get_active_row_number() == 0) {
-         pp->crop.orientation = flip_orientation ? "Portrait" : "Landscape";
-@@ -1501,7 +1552,7 @@ double Crop::getRatio () const
-         return r;
-     }
- 
--    r = crop_ratios[ratio->get_active_row_number()].value;
-+    r = crop_ratios->getValue(ratio->get_active_row_number());
-     if (!r) {
-         r = maxh <= maxw ? float(maxh)/float(maxw) : float(maxw)/float(maxh);
-     }
-@@ -1539,5 +1590,5 @@ void Crop::updateCurrentRatio()
-     double rw, rh;
-     get_custom_ratio(w->get_value(), h->get_value(), rw, rh);
-     customRatioLabel->set_text(Glib::ustring::compose("%1:%2", rw, rh));
--    crop_ratios[1].value = double(w->get_value())/double(h->get_value());
-+    crop_ratios->updateCurrentRatio(static_cast<double>(w->get_value()) / static_cast<double>(h->get_value()));
- }
-diff --git a/rtgui/crop.h b/rtgui/crop.h
-index b9221a803..c6636b917 100644
---- a/rtgui/crop.h
-+++ b/rtgui/crop.h
-@@ -18,7 +18,7 @@
-  */
- #pragma once
- 
--#include <vector>
-+#include <memory>
- 
- #include <gtkmm.h>
- 
-@@ -91,16 +91,13 @@ class Crop final :
-     void rotateCrop         (int deg, bool hflip, bool vflip);
- 
- private:
--    struct CropRatio {
--        Glib::ustring label;
--        double value;
--    };
--
--    std::vector<CropRatio> crop_ratios;
-+    class CropRatios;
- 
-     void adjustCropToRatio();
-     void updateCurrentRatio();
- 
-+    const std::unique_ptr<CropRatios> crop_ratios;
-+
-     Gtk::CheckButton* fixr;
-     MyComboBoxText* ratio;
-     MyComboBoxText* orientation;

diff --git a/media-gfx/rawtherapee/files/RT_5.8_glibc234.patch b/media-gfx/rawtherapee/files/RT_5.8_glibc234.patch
deleted file mode 100644
index 791183e20d52..000000000000
--- a/media-gfx/rawtherapee/files/RT_5.8_glibc234.patch
+++ /dev/null
@@ -1,683 +0,0 @@
-diff -udHrN -- a/RT_5.8_glibc234.patch b/RT_5.8_glibc234.patch
---- a/RT_5.8_glibc234.patch	1970-01-01 01:00:00.000000000 +0100
-+++ b/RT_5.8_glibc234.patch	2021-08-04 18:50:22.142646367 +0200
-@@ -0,0 +1,334 @@
-+diff --git a/rtengine/canon_cr3_decoder.cc b/rtengine/canon_cr3_decoder.cc
-+index ddd4b6172..1132b4e01 100644
-+--- a/rtengine/canon_cr3_decoder.cc
-++++ b/rtengine/canon_cr3_decoder.cc
-+@@ -670,7 +670,7 @@ std::uint32_t _byteswap_ulong(std::uint32_t x)
-+ #endif
-+ 
-+ struct LibRaw_abstract_datastream {
-+-    IMFILE* ifp;
-++    rtengine::IMFILE* ifp;
-+ 
-+     void lock()
-+     {
-+diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc
-+index ef0b4e8dc..13a6b054a 100644
-+--- a/rtengine/dcraw.cc
-++++ b/rtengine/dcraw.cc
-+@@ -1963,7 +1963,7 @@ void CLASS phase_one_load_raw_c()
-+ #endif
-+ {
-+     int len[2], pred[2];
-+-    IMFILE ifpthr = *ifp;
-++    rtengine::IMFILE ifpthr = *ifp;
-+     ifpthr.plistener = nullptr;
-+ 
-+ #ifdef _OPENMP
-+@@ -3317,7 +3317,7 @@ void CLASS sony_arw2_load_raw()
-+ {
-+     uchar *data = new (std::nothrow) uchar[raw_width + 1];
-+     merror(data, "sony_arw2_load_raw()");
-+-    IMFILE ifpthr = *ifp;
-++    rtengine::IMFILE ifpthr = *ifp;
-+     int pos = ifpthr.pos;
-+     ushort pix[16];
-+ 
-+@@ -6331,7 +6331,7 @@ int CLASS parse_tiff_ifd (int base)
-+   unsigned sony_curve[] = { 0,0,0,0,0,4095 };
-+   unsigned *buf, sony_offset=0, sony_length=0, sony_key=0;
-+   struct jhead jh;
-+-/*RT*/  IMFILE *sfp;
-++/*RT*/  rtengine::IMFILE *sfp;
-+ /*RT*/  int pana_raw = 0;
-+ 
-+   if (tiff_nifds >= sizeof tiff_ifd / sizeof tiff_ifd[0])
-+@@ -6895,7 +6895,7 @@ it under the terms of the one of two licenses as you choose:
-+     fread (buf, sony_length, 1, ifp);
-+     sony_decrypt (buf, sony_length/4, 1, sony_key);
-+     sfp = ifp;
-+-/*RT*/ ifp = fopen (buf, sony_length);
-++/*RT*/ ifp = rtengine::fopen (buf, sony_length);
-+ // if ((ifp = tmpfile())) {
-+ // fwrite (buf, sony_length, 1, ifp);
-+ // fseek (ifp, 0, SEEK_SET);
-+@@ -7203,7 +7203,7 @@ void CLASS parse_external_jpeg()
-+ {
-+   const char *file, *ext;
-+   char *jname, *jfile, *jext;
-+-/*RT*/  IMFILE *save=ifp;
-++/*RT*/  rtengine::IMFILE *save=ifp;
-+ 
-+   ext  = strrchr (ifname, '.');
-+   file = strrchr (ifname, '/');
-+@@ -7231,7 +7231,7 @@ void CLASS parse_external_jpeg()
-+       *jext = '0';
-+     }
-+   if (strcmp (jname, ifname)) {
-+-/*RT*/    if ((ifp = fopen (jname))) {
-++/*RT*/    if ((ifp = rtengine::fopen (jname))) {
-+ //    if ((ifp = fopen (jname, "rb"))) {
-+       if (verbose)
-+ 	fprintf (stderr,_("Reading metadata from %s ...\n"), jname);
-+diff --git a/rtengine/dcraw.h b/rtengine/dcraw.h
-+index 10c7b9ba6..bc009e67c 100644
-+--- a/rtengine/dcraw.h
-++++ b/rtengine/dcraw.h
-+@@ -73,7 +73,7 @@ public:
-+ 
-+ protected:
-+     int exif_base, ciff_base, ciff_len;
-+-    IMFILE *ifp;
-++    rtengine::IMFILE *ifp;
-+     FILE *ofp;
-+     short order;
-+     const char *ifname;
-+@@ -125,7 +125,7 @@ protected:
-+         int         cur_buf_size;    // buffer size
-+         uchar       *cur_buf;        // currently read block
-+         int         fillbytes;          // Counter to add extra byte for block size N*16
-+-        IMFILE      *input;
-++        rtengine::IMFILE      *input;
-+         struct int_pair grad_even[3][41];    // tables of gradients
-+         struct int_pair grad_odd[3][41];
-+         ushort		*linealloc;
-+@@ -278,7 +278,7 @@ void parse_redcine();
-+ class getbithuff_t
-+ {
-+ public:
-+-   getbithuff_t(DCraw *p,IMFILE *&i, unsigned &z):parent(p),bitbuf(0),vbits(0),reset(0),ifp(i),zero_after_ff(z){}
-++   getbithuff_t(DCraw *p,rtengine::IMFILE *&i, unsigned &z):parent(p),bitbuf(0),vbits(0),reset(0),ifp(i),zero_after_ff(z){}
-+    unsigned operator()(int nbits, ushort *huff);
-+ 
-+ private:
-+@@ -288,7 +288,7 @@ private:
-+    DCraw *parent;
-+    unsigned bitbuf;
-+    int vbits, reset;
-+-   IMFILE *&ifp;
-++   rtengine::IMFILE *&ifp;
-+    unsigned &zero_after_ff;
-+ };
-+ getbithuff_t getbithuff;
-+@@ -296,7 +296,7 @@ getbithuff_t getbithuff;
-+ class nikbithuff_t
-+ {
-+ public:
-+-   explicit nikbithuff_t(IMFILE *&i):bitbuf(0),errors(0),vbits(0),ifp(i){}
-++   explicit nikbithuff_t(rtengine::IMFILE *&i):bitbuf(0),errors(0),vbits(0),ifp(i){}
-+    void operator()() {bitbuf = vbits = 0;};
-+    unsigned operator()(int nbits, ushort *huff);
-+    unsigned errorCount() { return errors; }
-+@@ -309,7 +309,7 @@ private:
-+    }
-+    unsigned bitbuf, errors;
-+    int vbits;
-+-   IMFILE *&ifp;
-++   rtengine::IMFILE *&ifp;
-+ };
-+ nikbithuff_t nikbithuff;
-+ 
-+@@ -377,7 +377,7 @@ void parse_qt (int end);
-+ // ph1_bithuff(int nbits, ushort *huff);
-+ class ph1_bithuff_t {
-+ public:
-+-   ph1_bithuff_t(DCraw *p, IMFILE *i, short &o):order(o),ifp(i),bitbuf(0),vbits(0){}
-++   ph1_bithuff_t(DCraw *p, rtengine::IMFILE *i, short &o):order(o),ifp(i),bitbuf(0),vbits(0){}
-+    unsigned operator()(int nbits, ushort *huff);
-+    unsigned operator()(int nbits);
-+    unsigned operator()();
-+@@ -411,7 +411,7 @@ private:
-+    }
-+ 
-+    short &order;
-+-   IMFILE* const ifp;
-++   rtengine::IMFILE* const ifp;
-+    UINT64 bitbuf;
-+    int vbits;
-+ };
-+@@ -429,11 +429,11 @@ void nokia_load_raw();
-+ 
-+ class pana_bits_t{
-+ public:
-+-   pana_bits_t(IMFILE *i, unsigned &u, unsigned enc):
-++   pana_bits_t(rtengine::IMFILE *i, unsigned &u, unsigned enc):
-+     ifp(i), load_flags(u), vbits(0), encoding(enc) {}
-+    unsigned operator()(int nbits, unsigned *bytes=nullptr);
-+ private:
-+-   IMFILE *ifp;
-++   rtengine::IMFILE *ifp;
-+    unsigned &load_flags;
-+    uchar buf[0x4000];
-+    int vbits;
-+diff --git a/rtengine/dfmanager.cc b/rtengine/dfmanager.cc
-+index 7dde668eb..e551c9aad 100644
-+--- a/rtengine/dfmanager.cc
-++++ b/rtengine/dfmanager.cc
-+@@ -540,7 +540,7 @@ std::vector<badPix> *DFManager::getHotPixels ( const std::string &mak, const std
-+ 
-+ int DFManager::scanBadPixelsFile( Glib::ustring filename )
-+ {
-+-    FILE *file = fopen( filename.c_str(), "r" );
-++    FILE *file = ::fopen( filename.c_str(), "r" );
-+ 
-+     if( !file ) {
-+         return false;
-+diff --git a/rtengine/myfile.cc b/rtengine/myfile.cc
-+index 842766dcf..2321d18bb 100644
-+--- a/rtengine/myfile.cc
-++++ b/rtengine/myfile.cc
-+@@ -70,7 +70,7 @@ int munmap(void *start, size_t length)
-+ 
-+ #ifdef MYFILE_MMAP
-+ 
-+-IMFILE* fopen (const char* fname)
-++rtengine::IMFILE* rtengine::fopen (const char* fname)
-+ {
-+     int fd;
-+ 
-+@@ -123,13 +123,13 @@ IMFILE* fopen (const char* fname)
-+     return mf;
-+ }
-+ 
-+-IMFILE* gfopen (const char* fname)
-++rtengine::IMFILE* rtengine::gfopen (const char* fname)
-+ {
-+     return fopen(fname);
-+ }
-+ #else
-+ 
-+-IMFILE* fopen (const char* fname)
-++rtengine::IMFILE* rtengine::fopen (const char* fname)
-+ {
-+ 
-+     FILE* f = g_fopen (fname, "rb");
-+@@ -152,7 +152,7 @@ IMFILE* fopen (const char* fname)
-+     return mf;
-+ }
-+ 
-+-IMFILE* gfopen (const char* fname)
-++rtengine::IMFILE* rtengine::gfopen (const char* fname)
-+ {
-+ 
-+     FILE* f = g_fopen (fname, "rb");
-+@@ -176,7 +176,7 @@ IMFILE* gfopen (const char* fname)
-+ }
-+ #endif //MYFILE_MMAP
-+ 
-+-IMFILE* fopen (unsigned* buf, int size)
-++rtengine::IMFILE* rtengine::fopen (unsigned* buf, int size)
-+ {
-+ 
-+     IMFILE* mf = new IMFILE;
-+@@ -190,7 +190,7 @@ IMFILE* fopen (unsigned* buf, int size)
-+     return mf;
-+ }
-+ 
-+-void fclose (IMFILE* f)
-++void rtengine::fclose (IMFILE* f)
-+ {
-+ #ifdef MYFILE_MMAP
-+ 
-+@@ -207,7 +207,7 @@ void fclose (IMFILE* f)
-+     delete f;
-+ }
-+ 
-+-int fscanf (IMFILE* f, const char* s ...)
-++int rtengine::fscanf (IMFILE* f, const char* s ...)
-+ {
-+     // fscanf not easily wrapped since we have no terminating \0 at end
-+     // of file data and vsscanf() won't tell us how many characters that
-+@@ -253,7 +253,7 @@ int fscanf (IMFILE* f, const char* s ...)
-+ }
-+ 
-+ 
-+-char* fgets (char* s, int n, IMFILE* f)
-++char* rtengine::fgets (char* s, int n, IMFILE* f)
-+ {
-+ 
-+     if (f->pos >= f->size) {
-+@@ -270,7 +270,7 @@ char* fgets (char* s, int n, IMFILE* f)
-+     return s;
-+ }
-+ 
-+-void imfile_set_plistener(IMFILE *f, rtengine::ProgressListener *plistener, double progress_range)
-++void rtengine::imfile_set_plistener(IMFILE *f, rtengine::ProgressListener *plistener, double progress_range)
-+ {
-+     f->plistener = plistener;
-+     f->progress_range = progress_range;
-+@@ -278,7 +278,7 @@ void imfile_set_plistener(IMFILE *f, rtengine::ProgressListener *plistener, doub
-+     f->progress_current = 0;
-+ }
-+ 
-+-void imfile_update_progress(IMFILE *f)
-++void rtengine::imfile_update_progress(IMFILE *f)
-+ {
-+     if (!f->plistener || f->progress_current < f->progress_next) {
-+         return;
-+diff --git a/rtengine/myfile.h b/rtengine/myfile.h
-+index 34b90c525..ae14ce31a 100644
-+--- a/rtengine/myfile.h
-++++ b/rtengine/myfile.h
-+@@ -30,8 +30,6 @@ namespace rtengine
-+ 
-+ class ProgressListener;
-+ 
-+-}
-+-
-+ struct IMFILE {
-+     int fd;
-+     ssize_t pos;
-+@@ -141,3 +139,5 @@ inline unsigned char* fdata(int offset, IMFILE* f)
-+ 
-+ int fscanf (IMFILE* f, const char* s ...);
-+ char* fgets (char* s, int n, IMFILE* f);
-++
-++}
-+diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc
-+index 8dc998862..cf500474f 100644
-+--- a/rtengine/rtthumbnail.cc
-++++ b/rtengine/rtthumbnail.cc
-+@@ -1965,7 +1965,7 @@ bool Thumbnail::writeImage (const Glib::ustring& fname)
-+ 
-+     Glib::ustring fullFName = fname + ".rtti";
-+ 
-+-    FILE* f = g_fopen (fullFName.c_str (), "wb");
-++    FILE* f = ::g_fopen (fullFName.c_str (), "wb");
-+ 
-+     if (!f) {
-+         return false;
-+@@ -2008,7 +2008,7 @@ bool Thumbnail::readImage (const Glib::ustring& fname)
-+         return false;
-+     }
-+ 
-+-    FILE* f = g_fopen(fullFName.c_str (), "rb");
-++    FILE* f = ::g_fopen(fullFName.c_str (), "rb");
-+ 
-+     if (!f) {
-+         return false;
-+@@ -2239,7 +2239,7 @@ bool Thumbnail::writeData  (const Glib::ustring& fname)
-+         return false;
-+     }
-+ 
-+-    FILE *f = g_fopen (fname.c_str (), "wt");
-++    FILE *f = ::g_fopen (fname.c_str (), "wt");
-+ 
-+     if (!f) {
-+         if (settings->verbose) {
-+@@ -2262,7 +2262,7 @@ bool Thumbnail::readEmbProfile  (const Glib::ustring& fname)
-+     embProfile = nullptr;
-+     embProfileLength = 0;
-+ 
-+-    FILE* f = g_fopen (fname.c_str (), "rb");
-++    FILE* f = ::g_fopen (fname.c_str (), "rb");
-+ 
-+     if (f) {
-+         if (!fseek (f, 0, SEEK_END)) {
-+@@ -2290,7 +2290,7 @@ bool Thumbnail::writeEmbProfile (const Glib::ustring& fname)
-+ {
-+ 
-+     if (embProfileData) {
-+-        FILE* f = g_fopen (fname.c_str (), "wb");
-++        FILE* f = ::g_fopen (fname.c_str (), "wb");
-+ 
-+         if (f) {
-+             fwrite (embProfileData, 1, embProfileLength, f);
-diff -udHrN -- a/rtengine/canon_cr3_decoder.cc b/rtengine/canon_cr3_decoder.cc
---- a/rtengine/canon_cr3_decoder.cc	2020-02-04 07:39:52.000000000 +0100
-+++ b/rtengine/canon_cr3_decoder.cc	2021-08-07 11:43:50.725202017 +0200
-@@ -662,7 +662,7 @@
- #endif
- 
- struct LibRaw_abstract_datastream {
--    IMFILE* ifp;
-+    rtengine::IMFILE* ifp;
- 
-     void lock()
-     {
-diff -udHrN -- a/rtengine/dcraw.cc b/rtengine/dcraw.cc
---- a/rtengine/dcraw.cc	2020-02-04 07:39:52.000000000 +0100
-+++ b/rtengine/dcraw.cc	2021-08-07 11:43:50.736202141 +0200
-@@ -2025,7 +2025,7 @@
- #endif
- {
-     int len[2], pred[2];
--    IMFILE ifpthr = *ifp;
-+    rtengine::IMFILE ifpthr = *ifp;
-     ifpthr.plistener = nullptr;
- 
- #ifdef _OPENMP
-@@ -3380,7 +3380,7 @@
- {
-     uchar *data = new (std::nothrow) uchar[raw_width + 1];
-     merror(data, "sony_arw2_load_raw()");
--    IMFILE ifpthr = *ifp;
-+    rtengine::IMFILE ifpthr = *ifp;
-     int pos = ifpthr.pos;
-     ushort pix[16];
- 
-@@ -6394,7 +6394,7 @@
-   unsigned sony_curve[] = { 0,0,0,0,0,4095 };
-   unsigned *buf, sony_offset=0, sony_length=0, sony_key=0;
-   struct jhead jh;
--/*RT*/  IMFILE *sfp;
-+/*RT*/  rtengine::IMFILE *sfp;
- /*RT*/  int pana_raw = 0;
- 
-   if (tiff_nifds >= sizeof tiff_ifd / sizeof tiff_ifd[0])
-@@ -6958,7 +6958,7 @@
-     fread (buf, sony_length, 1, ifp);
-     sony_decrypt (buf, sony_length/4, 1, sony_key);
-     sfp = ifp;
--/*RT*/ ifp = fopen (buf, sony_length);
-+/*RT*/ ifp = rtengine::fopen (buf, sony_length);
- // if ((ifp = tmpfile())) {
- // fwrite (buf, sony_length, 1, ifp);
- // fseek (ifp, 0, SEEK_SET);
-@@ -7264,7 +7264,7 @@
- {
-   const char *file, *ext;
-   char *jname, *jfile, *jext;
--/*RT*/  IMFILE *save=ifp;
-+/*RT*/  rtengine::IMFILE *save=ifp;
- 
-   ext  = strrchr (ifname, '.');
-   file = strrchr (ifname, '/');
-@@ -7292,7 +7292,7 @@
-       *jext = '0';
-     }
-   if (strcmp (jname, ifname)) {
--/*RT*/    if ((ifp = fopen (jname))) {
-+/*RT*/    if ((ifp = rtengine::fopen (jname))) {
- //    if ((ifp = fopen (jname, "rb"))) {
-       if (verbose)
- 	fprintf (stderr,_("Reading metadata from %s ...\n"), jname);
-diff -udHrN -- a/rtengine/dcraw.h b/rtengine/dcraw.h
---- a/rtengine/dcraw.h	2020-02-04 07:39:52.000000000 +0100
-+++ b/rtengine/dcraw.h	2021-08-07 11:43:50.737202152 +0200
-@@ -73,7 +73,7 @@
- 
- protected:
-     int exif_base, ciff_base, ciff_len;
--    IMFILE *ifp;
-+    rtengine::IMFILE *ifp;
-     FILE *ofp;
-     short order;
-     const char *ifname;
-@@ -125,7 +125,7 @@
-         int         cur_buf_size;    // buffer size
-         uchar       *cur_buf;        // currently read block
-         int         fillbytes;          // Counter to add extra byte for block size N*16
--        IMFILE      *input;
-+        rtengine::IMFILE      *input;
-         struct int_pair grad_even[3][41];    // tables of gradients
-         struct int_pair grad_odd[3][41];
-         ushort		*linealloc;
-@@ -278,7 +278,7 @@
- class getbithuff_t
- {
- public:
--   getbithuff_t(DCraw *p,IMFILE *&i, unsigned &z):parent(p),bitbuf(0),vbits(0),reset(0),ifp(i),zero_after_ff(z){}
-+   getbithuff_t(DCraw *p,rtengine::IMFILE *&i, unsigned &z):parent(p),bitbuf(0),vbits(0),reset(0),ifp(i),zero_after_ff(z){}
-    unsigned operator()(int nbits, ushort *huff);
- 
- private:
-@@ -288,7 +288,7 @@
-    DCraw *parent;
-    unsigned bitbuf;
-    int vbits, reset;
--   IMFILE *&ifp;
-+   rtengine::IMFILE *&ifp;
-    unsigned &zero_after_ff;
- };
- getbithuff_t getbithuff;
-@@ -296,7 +296,7 @@
- class nikbithuff_t
- {
- public:
--   explicit nikbithuff_t(IMFILE *&i):bitbuf(0),errors(0),vbits(0),ifp(i){}
-+   explicit nikbithuff_t(rtengine::IMFILE *&i):bitbuf(0),errors(0),vbits(0),ifp(i){}
-    void operator()() {bitbuf = vbits = 0;};
-    unsigned operator()(int nbits, ushort *huff);
-    unsigned errorCount() { return errors; }
-@@ -309,7 +309,7 @@
-    }
-    unsigned bitbuf, errors;
-    int vbits;
--   IMFILE *&ifp;
-+   rtengine::IMFILE *&ifp;
- };
- nikbithuff_t nikbithuff;
- 
-@@ -378,7 +378,7 @@
- // ph1_bithuff(int nbits, ushort *huff);
- class ph1_bithuff_t {
- public:
--   ph1_bithuff_t(DCraw *p, IMFILE *i, short &o):order(o),ifp(i),bitbuf(0),vbits(0){}
-+   ph1_bithuff_t(DCraw *p, rtengine::IMFILE *i, short &o):order(o),ifp(i),bitbuf(0),vbits(0){}
-    unsigned operator()(int nbits, ushort *huff);
-    unsigned operator()(int nbits);
-    unsigned operator()();
-@@ -412,7 +412,7 @@
-    }
- 
-    short &order;
--   IMFILE* const ifp;
-+   rtengine::IMFILE* const ifp;
-    UINT64 bitbuf;
-    int vbits;
- };
-@@ -430,11 +430,11 @@
- 
- class pana_bits_t{
- public:
--   pana_bits_t(IMFILE *i, unsigned &u, unsigned enc):
-+   pana_bits_t(rtengine::IMFILE *i, unsigned &u, unsigned enc):
-     ifp(i), load_flags(u), vbits(0), encoding(enc) {}
-    unsigned operator()(int nbits, unsigned *bytes=nullptr);
- private:
--   IMFILE *ifp;
-+   rtengine::IMFILE *ifp;
-    unsigned &load_flags;
-    uchar buf[0x4000];
-    int vbits;
-diff -udHrN -- a/rtengine/dfmanager.cc b/rtengine/dfmanager.cc
---- a/rtengine/dfmanager.cc	2020-02-04 07:39:52.000000000 +0100
-+++ b/rtengine/dfmanager.cc	2021-08-07 11:43:50.738202163 +0200
-@@ -540,7 +540,7 @@
- 
- int DFManager::scanBadPixelsFile( Glib::ustring filename )
- {
--    FILE *file = fopen( filename.c_str(), "r" );
-+    FILE *file = ::fopen( filename.c_str(), "r" );
- 
-     if( !file ) {
-         return false;
-diff -udHrN -- a/rtengine/myfile.cc b/rtengine/myfile.cc
---- a/rtengine/myfile.cc	2020-02-04 07:39:52.000000000 +0100
-+++ b/rtengine/myfile.cc	2021-08-07 11:43:50.738202163 +0200
-@@ -70,7 +70,7 @@
- 
- #ifdef MYFILE_MMAP
- 
--IMFILE* fopen (const char* fname)
-+rtengine::IMFILE* rtengine::fopen (const char* fname)
- {
-     int fd;
- 
-@@ -123,13 +123,13 @@
-     return mf;
- }
- 
--IMFILE* gfopen (const char* fname)
-+rtengine::IMFILE* rtengine::gfopen (const char* fname)
- {
-     return fopen(fname);
- }
- #else
- 
--IMFILE* fopen (const char* fname)
-+rtengine::IMFILE* rtengine::fopen (const char* fname)
- {
- 
-     FILE* f = g_fopen (fname, "rb");
-@@ -152,7 +152,7 @@
-     return mf;
- }
- 
--IMFILE* gfopen (const char* fname)
-+rtengine::IMFILE* rtengine::gfopen (const char* fname)
- {
- 
-     FILE* f = g_fopen (fname, "rb");
-@@ -176,7 +176,7 @@
- }
- #endif //MYFILE_MMAP
- 
--IMFILE* fopen (unsigned* buf, int size)
-+rtengine::IMFILE* rtengine::fopen (unsigned* buf, int size)
- {
- 
-     IMFILE* mf = new IMFILE;
-@@ -190,7 +190,7 @@
-     return mf;
- }
- 
--void fclose (IMFILE* f)
-+void rtengine::fclose (IMFILE* f)
- {
- #ifdef MYFILE_MMAP
- 
-@@ -207,7 +207,7 @@
-     delete f;
- }
- 
--int fscanf (IMFILE* f, const char* s ...)
-+int rtengine::fscanf (IMFILE* f, const char* s ...)
- {
-     // fscanf not easily wrapped since we have no terminating \0 at end
-     // of file data and vsscanf() won't tell us how many characters that
-@@ -253,7 +253,7 @@
- }
- 
- 
--char* fgets (char* s, int n, IMFILE* f)
-+char* rtengine::fgets (char* s, int n, IMFILE* f)
- {
- 
-     if (f->pos >= f->size) {
-@@ -270,7 +270,7 @@
-     return s;
- }
- 
--void imfile_set_plistener(IMFILE *f, rtengine::ProgressListener *plistener, double progress_range)
-+void rtengine::imfile_set_plistener(IMFILE *f, rtengine::ProgressListener *plistener, double progress_range)
- {
-     f->plistener = plistener;
-     f->progress_range = progress_range;
-@@ -278,7 +278,7 @@
-     f->progress_current = 0;
- }
- 
--void imfile_update_progress(IMFILE *f)
-+void rtengine::imfile_update_progress(IMFILE *f)
- {
-     if (!f->plistener || f->progress_current < f->progress_next) {
-         return;
-diff -udHrN -- a/rtengine/myfile.h b/rtengine/myfile.h
---- a/rtengine/myfile.h	2020-02-04 07:39:52.000000000 +0100
-+++ b/rtengine/myfile.h	2021-08-07 11:43:50.739202175 +0200
-@@ -30,8 +30,6 @@
- 
- class ProgressListener;
- 
--}
--
- struct IMFILE {
-     int fd;
-     ssize_t pos;
-@@ -141,3 +139,5 @@
- 
- int fscanf (IMFILE* f, const char* s ...);
- char* fgets (char* s, int n, IMFILE* f);
-+
-+}
-diff -udHrN -- a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc
---- a/rtengine/rtthumbnail.cc	2020-02-04 07:39:52.000000000 +0100
-+++ b/rtengine/rtthumbnail.cc	2021-08-07 12:02:02.091503230 +0200
-@@ -1922,7 +1922,7 @@
- 
-     Glib::ustring fullFName = fname + ".rtti";
- 
--    FILE* f = g_fopen (fullFName.c_str (), "wb");
-+    FILE* f = ::g_fopen (fullFName.c_str (), "wb");
- 
-     if (!f) {
-         return false;
-@@ -1965,7 +1965,7 @@
-         return false;
-     }
- 
--    FILE* f = g_fopen(fullFName.c_str (), "rb");
-+    FILE* f = ::g_fopen(fullFName.c_str (), "rb");
- 
-     if (!f) {
-         return false;
-@@ -2191,7 +2191,7 @@
-         return false;
-     }
- 
--    FILE *f = g_fopen (fname.c_str (), "wt");
-+    FILE *f = ::g_fopen (fname.c_str (), "wt");
- 
-     if (!f) {
-         if (settings->verbose) {
-@@ -2214,7 +2214,7 @@
-     embProfile = nullptr;
-     embProfileLength = 0;
- 
--    FILE* f = g_fopen (fname.c_str (), "rb");
-+    FILE* f = ::g_fopen (fname.c_str (), "rb");
- 
-     if (f) {
-         if (!fseek (f, 0, SEEK_END)) {
-@@ -2242,7 +2242,7 @@
- {
- 
-     if (embProfileData) {
--        FILE* f = g_fopen (fname.c_str (), "wb");
-+        FILE* f = ::g_fopen (fname.c_str (), "wb");
- 
-         if (f) {
-             fwrite (embProfileData, 1, embProfileLength, f);
-@@ -2257,7 +2257,7 @@
- bool Thumbnail::readAEHistogram  (const Glib::ustring& fname)
- {
- 
--    FILE* f = g_fopen(fname.c_str(), "rb");
-+    FILE* f = ::g_fopen(fname.c_str(), "rb");
- 
-     if (!f) {
-         aeHistogram.reset();
-@@ -2280,7 +2280,7 @@
- {
- 
-     if (aeHistogram) {
--        FILE* f = g_fopen (fname.c_str (), "wb");
-+        FILE* f = ::g_fopen (fname.c_str (), "wb");
- 
-         if (f) {
-             fwrite (&aeHistogram[0], 1, (65536 >> aeHistCompression)*sizeof (aeHistogram[0]), f);

diff --git a/media-gfx/rawtherapee/rawtherapee-5.8-r4.ebuild b/media-gfx/rawtherapee/rawtherapee-5.8-r4.ebuild
deleted file mode 100644
index 95411c1105e7..000000000000
--- a/media-gfx/rawtherapee/rawtherapee-5.8-r4.ebuild
+++ /dev/null
@@ -1,85 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-MY_P=${P/_rc/-rc}
-inherit cmake flag-o-matic toolchain-funcs xdg-utils
-
-DESCRIPTION="A powerful cross-platform raw image processing program"
-HOMEPAGE="https://www.rawtherapee.com/"
-SRC_URI="https://rawtherapee.com/shared/source/${MY_P}.tar.xz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="amd64 ~riscv x86"
-IUSE="openmp tcmalloc"
-
-RDEPEND="
-	dev-cpp/atkmm:0
-	dev-cpp/cairomm:=
-	dev-cpp/glibmm:=
-	dev-cpp/gtkmm:3.0
-	dev-cpp/pangomm:=
-	dev-libs/expat
-	dev-libs/glib:=
-	dev-libs/libsigc++:2
-	gnome-base/librsvg
-	media-libs/lcms:2
-	media-libs/lensfun
-	media-libs/libcanberra[gtk3]
-	media-libs/libiptcdata
-	media-libs/libjpeg-turbo:=
-	media-libs/libpng:0=
-	media-libs/tiff:=
-	sci-libs/fftw:3.0=
-	sys-libs/zlib
-	x11-libs/gtk+:3
-	tcmalloc? ( dev-util/google-perftools )"
-DEPEND="${RDEPEND}"
-BDEPEND="virtual/pkgconfig"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
-	"${FILESDIR}/RT_5.8_fix_crop.patch"
-	"${FILESDIR}/RT_5.8_glibc234.patch"
-)
-
-pkg_pretend() {
-	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
-}
-
-pkg_setup() {
-	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
-}
-
-src_configure() {
-	# upstream tested that "fast-math" give wrong results, so filter it
-	# https://bugs.gentoo.org/show_bug.cgi?id=606896#c2
-	filter-flags -ffast-math
-	# -Ofast enable "fast-math" both in gcc and clang
-	replace-flags -Ofast -O3
-	# In case we add an ebuild for klt we can (i)use that one,
-	# see http://cecas.clemson.edu/~stb/klt/
-	local mycmakeargs=(
-		-DOPTION_OMP=$(usex openmp)
-		-DDOCDIR=/usr/share/doc/${PF}
-		-DCREDITSDIR=/usr/share/${PN}
-		-DLICENCEDIR=/usr/share/${PN}
-		-DCACHE_NAME_SUFFIX=""
-		-DWITH_SYSTEM_KLT="off"
-		-DENABLE_TCMALLOC=$(usex tcmalloc)
-	)
-	cmake_src_configure
-}
-
-pkg_postinst() {
-	xdg_icon_cache_update
-	xdg_desktop_database_update
-}
-
-pkg_postrm() {
-	xdg_icon_cache_update
-	xdg_desktop_database_update
-}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/rawtherapee/, media-gfx/rawtherapee/files/
@ 2024-10-04 14:52 Ben Kohler
  0 siblings, 0 replies; 5+ messages in thread
From: Ben Kohler @ 2024-10-04 14:52 UTC (permalink / raw
  To: gentoo-commits

commit:     4bd269657c961e89032ca053f62919a912553115
Author:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
AuthorDate: Thu Oct  3 18:53:48 2024 +0000
Commit:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
CommitDate: Fri Oct  4 14:51:36 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4bd26965

media-gfx/rawtherapee: drop 5.10-r1

Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org>

 media-gfx/rawtherapee/Manifest                     |  1 -
 ...rapee-5.10-fix-linking-with-libjpeg-turbo.patch | 63 -----------------
 media-gfx/rawtherapee/rawtherapee-5.10-r1.ebuild   | 82 ----------------------
 3 files changed, 146 deletions(-)

diff --git a/media-gfx/rawtherapee/Manifest b/media-gfx/rawtherapee/Manifest
index 1b8ab516b025..f37bdcec16b2 100644
--- a/media-gfx/rawtherapee/Manifest
+++ b/media-gfx/rawtherapee/Manifest
@@ -1,2 +1 @@
-DIST rawtherapee-5.10.tar.xz 16943724 BLAKE2B 2d1250a03f2902ffcff666514f9785036c808e9883957f674bfdb9545b2feac8f2313ab819e0cb64f39196bd3db36e8084b52bda6194de9197215824e695809c SHA512 79d6d54f90fec6006d3dff53aca00ccd385c398ebede2f06a223905d69e1045c6ab772bd5aca4bde01d9086c3c03183be22c0df521166b1af63b60bd7d0e1cfc
 DIST rawtherapee-5.11.tar.xz 18005652 BLAKE2B d4b4cb45042faf7eadb1c5bfbd7d1db2a452397d10eb12349d1d0a2ae4b9254beb3ee943cf3ddf40380f31abc653ec2c85fb0d4c8e2b1121402bbd41e74afaf0 SHA512 a37af6d99569a6b427379b76b980be8dca5007bf4ec8fc65663e9e8d13850dd2f547e1633f69ee495df105ca6f0f9ab4daf12beec29c9fff63e2e7e5083813b2

diff --git a/media-gfx/rawtherapee/files/rawtherapee-5.10-fix-linking-with-libjpeg-turbo.patch b/media-gfx/rawtherapee/files/rawtherapee-5.10-fix-linking-with-libjpeg-turbo.patch
deleted file mode 100644
index f65309fc64e6..000000000000
--- a/media-gfx/rawtherapee/files/rawtherapee-5.10-fix-linking-with-libjpeg-turbo.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From efdc5bce3b9794847093baeb040937ab55eba86e Mon Sep 17 00:00:00 2001
-From: Richard E Barber <kd6kxr@gmail.com>
-Date: Sun, 19 May 2024 04:27:10 -0700
-Subject: [PATCH] Fix linking with jpeg-turbo
-
-patch via Termux PR
-https://github.com/termux-user-repository/tur/pull/1027
----
- rtengine/jdatasrc.cc | 28 ++--------------------------
- 1 file changed, 2 insertions(+), 26 deletions(-)
-
-diff --git a/rtengine/jdatasrc.cc b/rtengine/jdatasrc.cc
-index fa13b9dd13..a0d12657f2 100644
---- a/rtengine/jdatasrc.cc
-+++ b/rtengine/jdatasrc.cc
-@@ -247,20 +247,6 @@ my_error_exit (j_common_ptr cinfo)
- #endif
- }
- 
--
--#ifdef _WIN32
--#define JVERSION	"6b  27-Mar-1998"
--#define JCOPYRIGHT_SHORT	"(C) 1998, Thomas G. Lane"
--#define JMESSAGE(code,string)	string ,
--
--const char * const jpeg_std_message_table[] = {
--#include "jerror.h"
--  NULL
--};
--#else
--extern const char * const jpeg_std_message_table[];
--#endif
--
- /*
-  * Actual output of an error or trace message.
-  * Applications may override this method to send JPEG messages somewhere
-@@ -409,24 +395,14 @@ reset_error_mgr (j_common_ptr cinfo)
- GLOBAL(struct jpeg_error_mgr *)
- my_jpeg_std_error (struct jpeg_error_mgr * err)
- {
-+    err = jpeg_std_error(err);
- 
-+    /* override these functions */
-     err->error_exit = my_error_exit;
-     err->emit_message = emit_message;
-     err->output_message = output_message;
-     err->format_message = format_message;
-     err->reset_error_mgr = reset_error_mgr;
- 
--    err->trace_level = 0;     /* default = no tracing */
--    err->num_warnings = 0;    /* no warnings emitted yet */
--    err->msg_code = 0;        /* may be useful as a flag for "no error" */
--
--    /* Initialize message table pointers */
--    err->jpeg_message_table = jpeg_std_message_table;
--    err->last_jpeg_message = (int) JMSG_LASTMSGCODE - 1;
--
--    err->addon_message_table = nullptr;
--    err->first_addon_message = 0; /* for safety */
--    err->last_addon_message = 0;
--
-     return err;
- }

diff --git a/media-gfx/rawtherapee/rawtherapee-5.10-r1.ebuild b/media-gfx/rawtherapee/rawtherapee-5.10-r1.ebuild
deleted file mode 100644
index bc3e9aa37d1b..000000000000
--- a/media-gfx/rawtherapee/rawtherapee-5.10-r1.ebuild
+++ /dev/null
@@ -1,82 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-MY_P=${P/_rc/-rc}
-inherit cmake flag-o-matic toolchain-funcs xdg-utils
-
-DESCRIPTION="A powerful cross-platform raw image processing program"
-HOMEPAGE="https://www.rawtherapee.com/"
-SRC_URI="https://rawtherapee.com/shared/source/${MY_P}.tar.xz"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="amd64 ~riscv x86"
-IUSE="openmp tcmalloc"
-
-RDEPEND="
-	dev-cpp/atkmm:0
-	dev-cpp/cairomm:0
-	dev-cpp/glibmm:2
-	dev-cpp/gtkmm:3.0
-	dev-cpp/pangomm:1.4
-	dev-libs/expat
-	dev-libs/glib:2
-	dev-libs/libsigc++:2
-	gnome-base/librsvg:2
-	media-gfx/exiv2:=
-	media-libs/lcms:2
-	media-libs/lensfun
-	media-libs/libcanberra[gtk3]
-	media-libs/libiptcdata
-	media-libs/libjpeg-turbo:=
-	media-libs/libpng:0=
-	media-libs/tiff:=
-	sci-libs/fftw:3.0=
-	sys-libs/zlib
-	x11-libs/gtk+:3
-	tcmalloc? ( dev-util/google-perftools )"
-DEPEND="${RDEPEND}"
-BDEPEND="virtual/pkgconfig"
-
-PATCHES=( "${FILESDIR}"/rawtherapee-5.10-fix-linking-with-libjpeg-turbo.patch )
-
-pkg_pretend() {
-	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
-}
-
-pkg_setup() {
-	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
-}
-
-src_configure() {
-	# upstream tested that "fast-math" give wrong results, so filter it
-	# https://bugs.gentoo.org/show_bug.cgi?id=606896#c2
-	filter-flags -ffast-math
-	# -Ofast enable "fast-math" both in gcc and clang
-	replace-flags -Ofast -O3
-	# In case we add an ebuild for klt we can (i)use that one,
-	# see http://cecas.clemson.edu/~stb/klt/
-	local mycmakeargs=(
-		-DOPTION_OMP=$(usex openmp)
-		-DDOCDIR=/usr/share/doc/${PF}
-		-DCREDITSDIR=/usr/share/${PN}
-		-DLICENCEDIR=/usr/share/${PN}
-		-DCACHE_NAME_SUFFIX=""
-		-DWITH_SYSTEM_KLT="off"
-		-DENABLE_TCMALLOC=$(usex tcmalloc)
-	)
-	cmake_src_configure
-}
-
-pkg_postinst() {
-	xdg_icon_cache_update
-	xdg_desktop_database_update
-}
-
-pkg_postrm() {
-	xdg_icon_cache_update
-	xdg_desktop_database_update
-}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-10-04 14:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-04 14:52 [gentoo-commits] repo/gentoo:master commit in: media-gfx/rawtherapee/, media-gfx/rawtherapee/files/ Ben Kohler
  -- strict thread matches above, loose matches on Subject: below --
2023-02-18 13:55 Andreas Sturmlechner
2021-08-11 15:18 Joonas Niilola
2015-12-15 20:16 Pacho Ramos
2015-12-15 20:16 Pacho Ramos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox