Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 606896 - media-gfx/rawtherapee-5.0 version bump
Summary: media-gfx/rawtherapee-5.0 version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Graphics Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-23 10:41 UTC by DrSlony
Modified: 2017-06-30 18:52 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
rawtherapee-5.0_p1.ebuild (rawtherapee-5.0_p1.ebuild,1.60 KB, text/plain)
2017-03-06 10:30 UTC, Franz Trischberger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description DrSlony 2017-01-23 10:41:55 UTC
media-gfx/rawtherapee-5.0 is released, there is also an ebuild for it made by vivovl/vivo75 here https://github.com/vivo75/vivovl/blob/master/media-gfx/rawtherapee/rawtherapee-5.0.ebuild
Comment 1 Jonas Stein gentoo-dev 2017-01-26 08:09:38 UTC
Thank you for the request and the link.

nb: The vivo75 .ebuild uses the gtk-3 branch the ebuild in the gentoo tree uses gtk-2

we need to rename the SRC_URI for the bump to 5.0:

http://rawtherapee.com/shared/source/
rawtherapee-5.0-gtk2.tar.xz
rawtherapee-5.0-gtk2.tar.xz.sha1
rawtherapee-5.0-gtk3.tar.xz
rawtherapee-5.0-gtk3.tar.xz.sha1


SRC_URI="http://rawtherapee.com/shared/source/${P}-gtk2.tar.xz"
SRC_URI="http://rawtherapee.com/shared/source/${P}-gtk3.tar.xz"
Comment 2 DrSlony 2017-02-03 09:47:58 UTC
Hello

I updated the title to media-gfx/rawtherapee-5.0-r1

Changes and source code links: http://rawtherapee.com/blog/rawtherapee-5.0-revision-1-released

Please note the following:
- 5.0-r1-gtk2 is the last GTK2 version.
- All future releases will drop the "-gtk3" suffix because the only GTK+ supported will be GTK3, so RT5.1 will be tagged simply "5.1".
- We recommend using -o3. I know it's up to the user in Gentoo, but in RawTherapee's case -o3 is highly recommended as it gives significant speed increases and is safe. It does no harm, and a lot of good.
- -ffast-math is NOT recommended - there are negligible speed differences and visible image artifacts when using Color Toning and possibly other tools. It does more harm than good.
- For the 9999 ebuild, switch from using branch "gtk3" to the new branch "dev".
Comment 3 Francesco Riosa 2017-02-03 14:57:20 UTC
(In reply to DrSlony from comment #2)

...
> - We recommend using -o3. I know it's up to the user in Gentoo, but in
> RawTherapee's case -o3 is highly recommended as it gives significant speed
> increases and is safe. It does no harm, and a lot of good.

This is easily done by the users, from /etc/portage/{package.,}env/.
Optionally `get-flag` function can be tested to check -O3 in CFLAGS and print a warning/message to enable it if absent.


> - -ffast-math is NOT recommended - there are negligible speed differences
> and visible image artifacts when using Color Toning and possibly other
> tools. It does more harm than good.

Good to know, the overlay ebuilds now do
`filter-flags -ffast-math`
Comment 4 DrSlony 2017-02-08 21:33:31 UTC
What does "p1" mean?
Comment 5 Franz Trischberger 2017-02-09 14:17:02 UTC
(In reply to DrSlony from comment #4)
> What does "p1" mean?

"-rX" is used for Gentoo revisions, they use the base version but add changes e.g. own patches, USE changes, ... As this is a new upstream version "-r1" would be misleading, hence "_p1" alias "patch release 1".
Comment 6 DrSlony 2017-02-13 20:33:50 UTC
Thank you for the explanation Franz.

Reminder, Gentoo (and therefore Sabayon) still does not ship RT5.
Comment 7 DrSlony 2017-03-03 16:26:58 UTC
Gentoo still does not ship RT5. What's up?
Comment 8 Franz Trischberger 2017-03-06 08:03:00 UTC
Do we want  to support both gtk+:2 and gtk+:3?
I created an ebuild locally based on vivovl's ebuild but using the release tarball. I sticked to gtk+:3 but could also add support for gtk+:2, if it requested.
I also think we should look to get RawTherapee-5 into the tree, it is IMO THE raw converter, many prefer it on Mac and Windows to the proprietary solutions :)

Here is the current diff on latest rawtherapee available in portage:

--- rawtherapee-4.2-r1.ebuild	2015-12-19 10:20:57.479964586 +0100
+++ rawtherapee-5.0_p1.ebuild	2017-03-05 12:01:33.936593065 +0100
@@ -1,55 +1,57 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
 EAPI=5
 
-inherit cmake-utils toolchain-funcs
+inherit cmake-utils toolchain-funcs flag-o-matic
 
 DESCRIPTION="A powerful cross-platform raw image processing program"
 HOMEPAGE="http://www.rawtherapee.com/"
-SRC_URI="http://rawtherapee.com/shared/source/${P}.tar.xz"
+
+MY_P=${P/_p1/-r1}
+SRC_URI="http://rawtherapee.com/shared/source/${MY_P}-gtk3.tar.xz"
 
 LICENSE="GPL-3"
 SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="amd64"
 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
+	x11-libs/gtk+:3
 	dev-libs/expat
 	dev-libs/libsigc++:2
-	media-libs/libcanberra[gtk]
-	media-libs/tiff
-	media-libs/libpng
+	media-libs/libcanberra[gtk3]
+	media-libs/tiff:0
+	media-libs/libpng:0
 	media-libs/libiptcdata
 	media-libs/lcms:2
 	sci-libs/fftw:3.0
 	sys-libs/zlib
-	virtual/jpeg"
+	virtual/jpeg:0"
 DEPEND="${RDEPEND}
 	app-arch/xz-utils
-	virtual/pkgconfig"
+	virtual/pkgconfig
+	dev-cpp/gtkmm:3.0"
 
-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
-)
+S="${WORKDIR}/${MY_P}-gtk3"
 
 pkg_pretend() {
 	if use openmp ; then
 		tc-has-openmp || die "Please switch to an openmp compatible compiler"
 	fi
+	# https://bugs.gentoo.org/show_bug.cgi?id=606896#c2
+	# https://github.com/vivo75/vivovl/issues/2
+	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 https://wiki.gentoo.org/wiki//etc/portage/package.env"
+		ewarn "for suggestion on how to change environment for a single package"
+	fi
 }
 
 src_configure() {
+	filter-flags -ffast-math
 	local mycmakeargs=(
 		$(cmake-utils_use openmp OPTION_OMP)
 		$(cmake-utils_use_with bzip2 BZIP)
@@ -57,6 +59,7 @@
 		-DCREDITSDIR=/usr/share/${PN}
 		-DLICENCEDIR=/usr/share/${PN}
 		-DCACHE_NAME_SUFFIX=""
+		-DCMAKE_CXX_FLAGS="-std=c++11"
 	)
 	cmake-utils_src_configure
 }
Comment 9 DrSlony 2017-03-06 09:40:13 UTC
The GTK2 branch is dead, I wouldn't waste time adding support for a dead branch.
Comment 10 Franz Trischberger 2017-03-06 10:03:53 UTC
(In reply to DrSlony from comment #9)
> The GTK2 branch is dead, I wouldn't waste time adding support for a dead
> branch.

Are you sure? Is there an official statement? Judging from last commit also the gtk3-branch is dead, both have their last commit on Feb. 1 which is the date of the last release (when the 5.0-r1 tag was set).
Comment 11 DrSlony 2017-03-06 10:14:00 UTC
I'm in charge of releasing RawTherapee. Here's the full scoop:
- RawTherapee 5.0-r1 was the last version to support GTK2. As such, we "renamed" the branches to makes things clearer.
- Branches "master" "gtk3" and "gtk2" are dead.
- Branch "dev" is the main development branch, it uses GTK3 only.
- Branch "releases" is where we tag releases, those are also GTK3 only.
- Branch "gtk2" is what used to be the old "master". I tagged the latest release on it, "5.0-r1-gtk2" and that is the end of that, there will be no more GTK2 releases.
- Now when someone clones our repo, they will automatically find themselves on the "dev" branch.
Comment 12 Franz Trischberger 2017-03-06 10:26:41 UTC
Thx for clarification, DrSlony!
Comment 13 Franz Trischberger 2017-03-06 10:30:19 UTC
Created attachment 466118 [details]
rawtherapee-5.0_p1.ebuild

So here is the full ebuild, based on what vivovl has created.
Comment 14 DrSlony 2017-03-18 19:20:14 UTC
Please reassign this issue to a Gentoo portage person who is active.
Comment 15 DrSlony 2017-03-18 19:20:37 UTC
Or explain what the problem is and how we can help.
Comment 16 Francesco Riosa 2017-03-19 23:51:25 UTC
@proxy-maint, may I ask you to proxy me for this package, I'm an ex gentoo developer (also willing to return one day) and actively using rawtherapee with my ebuild
Comment 17 Marek Szuba archtester gentoo-dev 2017-03-20 10:27:41 UTC
There are a couple of issues with the new ebuild. Perhaps you could look into this, Francesco?

The more important matter is that thr x86 keyword has been dropped. Does this version really not work on 32-bit systems (if so, why?), or is it just an omission? In the latter case it would be good to fix this.

There are also several minor issues:
 - the copyright notice is out of date and the $Id$ line should be removed;
 - all keywords should be ~arch;
 - it wouldn't hurt to bump the EAPI version.
Comment 18 Francesco Riosa 2017-03-20 12:07:28 UTC
(In reply to Marek Szuba from comment #17)
> There are a couple of issues with the new ebuild. Perhaps you could look
> into this, Francesco?
> 
> The more important matter is that thr x86 keyword has been dropped. Does
> this version really not work on 32-bit systems (if so, why?), or is it just
> an omission? In the latter case it would be good to fix this.

I'm quite liberal in the use of KEYWORD on my overlay, often using stable or dropping keywords, so, it's an omission,  fixed in the pull request.

> There are also several minor issues:
>  - the copyright notice is out of date and the $Id$ line should be removed;
>  - all keywords should be ~arch;
done
>  - it wouldn't hurt to bump the EAPI version.
bumped to EAPI=6

see
https://github.com/gentoo/gentoo/pull/4255
Comment 19 tt_1 2017-03-20 19:54:28 UTC
during src_configure , portage claims a (non-fatal?) lack of CMP0012 



CMake Warning (dev) at /usr/share/cmake/Modules/FindOpenMP.cmake:179 (if):
  if given arguments:

    "TRUE"

  An argument named "TRUE" appears in a conditional statement.  Policy
  CMP0012 is not set: if() recognizes numbers and boolean constants.  Run
  "cmake --help-policy CMP0012" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindOpenMP.cmake:224 (_OPENMP_GET_SPEC_DATE)
  CMakeLists.txt:298 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

and another one 

CMake Warning (dev) at /usr/share/cmake/Modules/FindOpenMP.cmake:179 (if):
  if given arguments:

    "TRUE"

  An argument named "TRUE" appears in a conditional statement.  Policy
  CMP0012 is not set: if() recognizes numbers and boolean constants.  Run
  "cmake --help-policy CMP0012" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindOpenMP.cmake:266 (_OPENMP_GET_SPEC_DATE)
  CMakeLists.txt:298 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.
Comment 20 Francesco Riosa 2017-03-21 02:54:36 UTC
This would be better fixed upstream adding:

```
if(POLICY CMP0012)
  cmake_policy(SET CMP0012 NEW)
endif()
```
To the cmake file, however if "TRUE" evaluate to False than it's something we need to fix, I'll check tomorrow if that's the case.
Comment 21 Francesco Riosa 2017-03-21 19:16:31 UTC
ok, checked and it's actually harmless, also this bug can be closed now, since the package is in tree.
Comment 22 DrSlony 2017-03-22 10:58:39 UTC
Thank you Francesco!
Comment 23 Guillaume Castagnino 2017-04-01 10:06:11 UTC
Hi,

Just to notice that this bellow change completely eats portage cflags, so results in compiling without -Ox or whatever optimisation set in portage configuration.

(In reply to Franz Fellner from comment #8)
> @@ -57,6 +59,7 @@
>  		-DCREDITSDIR=/usr/share/${PN}
>  		-DLICENCEDIR=/usr/share/${PN}
>  		-DCACHE_NAME_SUFFIX=""
> +		-DCMAKE_CXX_FLAGS="-std=c++11"
>  	)
>  	cmake-utils_src_configure
>  }
Comment 24 Francesco Riosa 2017-04-04 01:00:29 UTC
(In reply to Guillaume Castagnino from comment #23)
> Hi,
> 
> Just to notice that this bellow change completely eats portage cflags, so
> results in compiling without -Ox or whatever optimisation set in portage
> configuration.
> 
> (In reply to Franz Fellner from comment #8)
> > @@ -57,6 +59,7 @@
> >  		-DCREDITSDIR=/usr/share/${PN}
> >  		-DLICENCEDIR=/usr/share/${PN}
> >  		-DCACHE_NAME_SUFFIX=""
> > +		-DCMAKE_CXX_FLAGS="-std=c++11"
> >  	)
> >  	cmake-utils_src_configure
> >  }

Hi Guillaume,
I've extracted one line from the build log and my *FLAGS seems to be there, look for "-O3 -march=corei7 -pipe", however I've not squashed it more than that, so if you still think there is a problem there please be more specific and I'll take a better look.

[ 34%] Building C object rtengine/CMakeFiles/rtengine.dir/cJSON.c.o
cd /var/tmp/portage/media-gfx/rawtherapee-5.0/work/rawtherapee-5.0_build/rtengine && /usr/bin/x86_64-pc-linux-gnu-gcc  -DAUTO_GDK_FLUSH=0 -DBZIP_SUPPORT -DMYFILE_MMAP -DNDEBUG -DSTRICT_MUTEX=1 -DTRACE_MYRWMUTEX=0 -D_DNDEBUG -I/var/tmp/portage/media-gfx/rawtherapee-5.0/work/rawtherapee-5.0_build/rtengine -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/glibmm-2.4 -I/usr/lib64/glibmm-2.4/include -I/usr/include/sigc++-2.0 -I/usr/lib64/sigc++-2.0/include -I/usr/include/libiptcdata -I/usr/include/gtkmm-3.0 -I/usr/lib64/gtkmm-3.0/include -I/usr/include/atkmm-1.6 -I/usr/include/gtk-3.0/unix-print -I/usr/include/gdkmm-3.0 -I/usr/lib64/gdkmm-3.0/include -I/usr/include/giomm-2.4 -I/usr/lib64/giomm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/lib64/pangomm-1.4/include -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/atk-1.0 -I/usr/include/cairomm-1.0 -I/usr/lib64/cairomm-1.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16   -DNDEBUG -O3 -march=corei7 -pipe -std=gnu11    -o CMakeFiles/rtengine.dir/cJSON.c.o -c /var/tmp/portage/media-gfx/rawtherapee-5.0/work/rawtherapee-5.0-gtk3/rtengine/cJSON.c
Comment 25 David Kredba 2017-06-30 18:52:36 UTC
Most of the time there is -std=c++11 only. Maybe it respects C(XX)FLAGS only when -O3 is safe for compilation, but I not checked in detail.

[ 20%] Building CXX object rtengine/CMakeFiles/rtengine.dir/imagedata.cc.o
cd /var/tmp/portage/media-gfx/rawtherapee-5.1/work/rawtherapee-5.1_build/rtengine && /usr/bin/x86_64-pc-linux-gnu-g++ -DAUTO_GDK_FLUSH=0 -DBZIP_SUPPORT -DMYFILE_MMAP -DNDEBUG -DSTRICT_MUTEX=1 -DTRACE_MYRWMUTEX=0 -D_DNDEBUG -I/var/tmp/portage/media-gfx/rawtherapee-5.1/work/rawtherapee-5.1_build/rtengine -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/glibmm-2.4 -I/usr/lib64/glibmm-2.4/include -I/usr/include/sigc++-2.0 -I/usr/lib64/sigc++-2.0/include -I/usr/include/gtkmm-3.0 -I/usr/lib64/gtkmm-3.0/include -I/usr/include/atkmm-1.6 -I/usr/include/gtk-3.0/unix-print -I/usr/include/gdkmm-3.0 -I/usr/lib64/gdkmm-3.0/include -I/usr/include/giomm-2.4 -I/usr/lib64/giomm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/lib64/pangomm-1.4/include -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/atk-1.0 -I/usr/include/cairomm-1.0 -I/usr/lib64/cairomm-1.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/libiptcdata   -DNDEBUG -std=c++11 -std=c++11  -Werror=unused-label -fopenmp -Werror=unknown-pragmas -Wall -Wno-unused-result -Wno-deprecated-declarations   -o CMakeFiles/rtengine.dir/imagedata.cc.o -c /var/tmp/portage/media-gfx/rawtherapee-5.1/work/rawtherapee-5.1/rtengine/imagedata.cc