Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 626108

Summary: media-gfx/rawtherapee-5.2 : version bump
Product: Gentoo Linux Reporter: Francesco Riosa <vivo75>
Component: Current packagesAssignee: Francesco Riosa <vivo75>
Severity: normal CC: graphics+disabled, leio, mgorny, neil, proxy-maint, v.pelcak, vivo75
Priority: Normal Keywords: EBUILD
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Attachments: rawtherapee-5.2.ebuild

Description Francesco Riosa 2017-07-24 23:01:20 UTC
Created attachment 486786 [details]

Rawtherapee 5.2 has been released, there are a pair of changes in ebuild compared to 5.1 version, commented below:

pseudodiff --git a/media-gfx/rawtherapee/rawtherapee-5.2.ebuild b/media-gfx/rawtherapee/rawtherapee-5.2.ebuild

As duly noticed in  changelog bzip2 dependancy has been removed
-IUSE="bzip2 openmp"
-RDEPEND="bzip2? ( app-arch/bzip2 )
-       x11-libs/gtk+:3

 src_configure() {

+       # In case we add an ebuild for klt we can (i)use that one,
+       # see
        local mycmakeargs=(
                -DOPTION_OMP=$(usex openmp)
-               -DBZIP=$(usex bzip2)

this line created problems for some users, and we now have gcc-5.4 stable, it should not be needed anymore and does more damage than good, if we really need that append-flags() is the way to go.
-               -DCMAKE_CXX_FLAGS="-std=c++11"

explicitly say that we are using bundled klt
+               -DWITH_SYSTEM_KLT="off"

Ebuild with history on github:

Silent Additions since 5.1
dcp profiles for Nikon D750 and Fujifilm X-T20

Release Notes for 5.2

New features since 5.1:
- GIMP plugin to open raw images in GIMP using RawTherapee - see RawPedia.
- "Remote" mode (-R command line option) to allow opening images ("Open with" or passed as arguments) in a full-fledged instance. The -R mode allows you to open an image in an already-running instance of RawTherapee, if that instance was also started using -R. Opening an image without the -R option will open RawTherapee in "no-File-Browser" mode which lacks the File Browser and Queue tabs, and the Preferences button.

While this release introduced several new features, the main focus was to refine what's already there. Both the speed and stability of various tools and of RawTherapee in general were significantly improved, particularly when dealing with folders containing thousands of images.

Most significant improvements:
- 4x speedup of the Microcontrast tool.
- CIECAM02 curves no longer cause a sudden jump in brightness.
- Improved stability in METM (Multiple Editor Tabs Mode) in Windows.
- Improvement to the MEOW (Multiple Editor Tabs in Own Window) mode.
- LCP files lead to better results.
- Large speedup and stability improvement when opening folders containing hundreds or thousands of images.
- Many memory leaks fixed.
- Pixel Shift speedups, reduction of memory requirements, and motion mask preview accuracy improved.
- The preview of the Tone Mapping tool is now much more accurate at any zoom level.

News Relevant to Package Maintainers
In general:
- Requires GTK+ version >=3.16, though 3.22 is recommended.
- RawTherapee 5 requires GCC-4.9 or higher, or Clang.
- Do not use -ffast-math, it will not make RawTherapee faster but will introduce artifacts.
- Use -O3, it will make RawTherapee faster with no known side-effects.
- For stable releases use -DCACHE_NAME_SUFFIX=""
- For development builds and release-candidates use -DCACHE_NAME_SUFFIX="5-dev"

Changes since 5.1:
- BZIP2 support removed - no more BZIP2 dependency.
- Added possibility to use system KLT library if available, otherwise our shipped version is used.
Comment 1 Mart Raudsepp gentoo-dev 2017-07-24 23:28:49 UTC
> - Use -O3, it will make RawTherapee faster with no known side-effects.

Any implications of that to the packaging? (are CFLAGS honored?)
Comment 2 Francesco Riosa 2017-07-25 17:37:13 UTC
(In reply to Mart Raudsepp from comment #1)
> > - Use -O3, it will make RawTherapee faster with no known side-effects.
> Any implications of that to the packaging? (are CFLAGS honored?)

C*FLAGS are honored, after a discussion with upstream has been decided to warn the user if he/she miss -O3 from cflags.

However some user reported c*flags not respected if DCMAKE_CXX_FLAGS="-std=c++11" was added to config options (but it didn't happened always). With new 5.2 ebuild that option is gone, since stable gcc default to c++11.
Comment 3 neil 2017-08-01 03:14:46 UTC
I just now created an account here for the sole purpose of submitting this exact same version bump, but it looks like someone beat me to it, even though it hasn't actually been added to portage yet.

Even fixed that weird `-DCMAKE_CXX_FLAGS="-std=c++11"` line that was keeping it from using the correct CFLAGS from make.conf and package.env

So I guess there's not much for me to contribute, except to say that I just successfully installed a nearly identical modified ebuild using a local repository made in accordance with ``, and haven't had any issues.

Repoman didn't complain, it built without errors, and it runs just fine. I haven't seen anything that seems like it would be a big obstacle to adding this update to the portage tree so users don't have to resort to rolling their own version bump as I did.

One thing I'll say though, if you want to keep tweaking this before adding the update, is maybe it would be better if it just enabled -O3 automatically instead of warning the user to do so. -O3 is, according to the handbook, unsafe to enable globally, so with the current setup the user needs to set up package-specific overrides using `/etc/portage/package.env` to get rawtherapee optimized correctly. If upstream is saying -O3 is safe to use with their software, then it might just be better to use it automatically. I'm pretty ignorant about all this though, so feel free to ignore me if there's a good reason not to do that.
Comment 4 Mart Raudsepp gentoo-dev 2017-08-01 03:57:07 UTC
Yes, such a warning shouldn't be given, or it must be very explicit that any changes should be done per-package, which would get complicated.

IFF an automatic addition is done, it imho should only be done as an optimization level replacement when -Os or -Og isn't used by user or so; so a replacement of -O2 to -O3 or at most -O1 to -O3. replace-flags in flag-o-matic.eclass exists for that
Comment 5 Francesco Riosa 2017-08-06 01:24:33 UTC ,
Admittedly also upstream would prefer to see -O3 enabled in ebuild, but I feel rather uncomfortable in overriding the user choice, most gentoo users tweak their *FLAGS anyway.
IMHO ebuild override should be kept for those cases where a flag break compilation or cause instability.

For this reason the message in the ebuild is specific for non -O3 users and point to instructions on how to change environment only for rawtherapee:

if [[ $(get-flag -O3) != "-O3" ]] ; then
  ewarn "upstream suggest using {C,CXX}FLAGS+=\"-O3\" for better performances"
  ewarn "see bug#606896#c2"
  ewarn "take a look at"
  ewarn "for suggestion on how to change environment for a single package"
Comment 6 neil 2017-08-06 03:15:55 UTC
As far as that goes, the reason people don't enable -O3 globally (or at least aren't supposed to, according to the handbook) is that it can sometimes break compilation or cause instability.

I can understand what Mart said about not overriding -Os or -Og since those optimize for things besides speed (smaller size and easier debugging, respectively), but since -O2 and -O3 are both speed optimizations, I think most people that use -O2 would probably want it automatically bumped up to -O3 in cases where it's known to be safe.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-08-06 07:00:52 UTC
Except you can't know it to be safe on every platform, every system out there. Furthermore, you can't even be 100% sure it'll be faster than -O2, e.g. depending on cache size and so on.
Comment 8 Francesco Riosa 2017-08-06 12:23:48 UTC
*** Bug 626910 has been marked as a duplicate of this bug. ***
Comment 9 Francesco Riosa 2017-08-06 16:38:10 UTC
see also pull request:
Comment 10 Patrice Clement gentoo-dev 2017-08-06 22:07:04 UTC
commit f4a7cee26469d2116e815c907e618707054a7467 (HEAD -> master, origin/master, origin/HEAD)
Author:     Francesco Riosa <>
AuthorDate: Sun Aug 6 18:30:09 2017 +0200
Commit:     Patrice Clement <>
CommitDate: Mon Aug 7 00:03:10 2017 +0200

media-gfx/rawtherapee-5.2: version bump + cleanup.



media-gfx/rawtherapee/Manifest                     |  3 +-
.../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/metadata.xml                 |  2 +-
media-gfx/rawtherapee/rawtherapee-4.2-r1.ebuild    | 61 ----------------------
...wtherapee-5.0.ebuild => rawtherapee-5.2.ebuild} | 17 +++---
9 files changed, 11 insertions(+), 208 deletions(-)
delete mode 100644 media-gfx/rawtherapee/files/rawtherapee-4.2-CVE-2015-3885.patch
delete mode 100644 media-gfx/rawtherapee/files/rawtherapee-4.2-build-cxx11-2.patch
delete mode 100644 media-gfx/rawtherapee/files/rawtherapee-4.2-build-cxx11.patch
delete mode 100644 media-gfx/rawtherapee/files/rawtherapee-4.2-cxx11.patch
delete mode 100644 media-gfx/rawtherapee/files/rawtherapee-4.2-sigc26.patch
delete mode 100644 media-gfx/rawtherapee/rawtherapee-4.2-r1.ebuild
rename media-gfx/rawtherapee/{rawtherapee-5.0.ebuild => rawtherapee-5.2.ebuild} (83%)

PR merged, thanks!