[packages/rawtherapee] recreated spec for version 4.2

glen glen at pld-linux.org
Sun May 17 18:22:06 CEST 2015


commit 7b2c16ccc5871fb083fe9ee5f9647acef7f607a0
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sun May 17 19:03:41 2015 +0300

    recreated spec for version 4.2
    
    based on fedora package 338adf4

 TODO                                 |  11 ---
 rawtherapee-4.2-appstreamtweak.patch |  41 ++++++++++
 rawtherapee.spec                     | 147 ++++++++++++++++++++++-------------
 rawtherapee_CVE-2015-3885.patch      |  14 ++++
 4 files changed, 148 insertions(+), 65 deletions(-)
---
diff --git a/rawtherapee.spec b/rawtherapee.spec
index 9410d92..7045b55 100644
--- a/rawtherapee.spec
+++ b/rawtherapee.spec
@@ -1,82 +1,121 @@
-#
 Summary:	THe Experimental RAw Photo Editor
 Summary(pl.UTF-8):	THe Experimental RAw Photo Editor - eksperymentalny edytor zdjęć RAW
 Name:		rawtherapee
-Version:	3.0
-%define	_milestone	a1
-%define	_rel		1
-Release:	0.%{_milestone}.%{_rel}
-#Release:	0.1
-License:	GPL
+Version:	4.2
+Release:	1
+License:	GPLv3 and MIT and IJG
 Group:		X11/Applications/Graphics
-Source0:	http://www.rawtherapee.com/%{name}30%{_milestone}.tgz
-# NoSource0-md5:	673056cb7269ac98a762581efe1c8c3b
-#Source0:	http://www.rawtherapee.com/%{name}300.tgz
+Source0:	http://rawtherapee.com/shared/source/%{name}-%{version}.tar.xz
+# Source0-md5:	e6510ed56fdc35aa712b4c0f54c52ac0
 Source1:	%{name}.desktop
-Source2:	TODO
+Patch0:		%{name}-4.2-appstreamtweak.patch
+Patch1:		%{name}_CVE-2015-3885.patch
 URL:		http://www.rawtherapee.com/
+BuildRequires:	appstream-glib
+BuildRequires:	bzip2-devel
+BuildRequires:	cmake >= 2.6
+BuildRequires:	desktop-file-utils
+BuildRequires:	expat-devel
+BuildRequires:	fftw3-devel
+BuildRequires:	fftw3-single-devel
+BuildRequires:	gtk+2-devel >= 2:2.12
+BuildRequires:	gtkmm-devel >= 2.16
+BuildRequires:	lcms2-devel
+BuildRequires:	libcanberra-devel
+BuildRequires:	libcanberra-gtk-devel
+BuildRequires:	libiptcdata-devel
+BuildRequires:	libjpeg-devel
+BuildRequires:	libpng-devel
+BuildRequires:	libsigc++-devel
+BuildRequires:	libtiff-devel
+BuildRequires:	pkgconfig
+BuildRequires:	tar >= 1:1.22
+BuildRequires:	xz
+BuildRequires:	zlib-devel
+Requires:	fftw3
 Requires:	gtk+2 >= 2:2.10
-# this version _requires_ SSE
-Requires:	cpuinfo(sse)
+Requires:	hicolor-icon-theme
 Suggests:	adobe-ICC-profiles
-# because of SSE
-ExclusiveArch:	i686 pentium3 pentium4 athlon
+# https://fedorahosted.org/fpc/ticket/530
+# to find: `grep Revision: rawtherapee-4.2/rtengine/dcraw.c`
+Provides:	bundled(dcraw) = 1.467
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define		_appdir		%{_libdir}/%{name}
-
 %description
-Raw Therapee is a free RAW converter and digital photo processing
-software.
+Rawtherapee is a RAW image processing software. It gives full control
+over many parameters to enhance the raw picture before finally
+exporting it to some common image format.
 
 %description -l pl.UTF-8
 Raw Therapee to darmowy konwerter z formatu RAW oraz narzędzie do
 przetwarzania zdjęć cyfrowych.
 
 %prep
-%setup -q -n RawTherapee30a1
-cp %{SOURCE2} PLD-TODO
-chmod -R u+w *
+%setup -q
+%patch0 -p1
+%patch1 -p1
+
+# fix wrong line endings
+%undos LICENSE.txt
+
+# Remove mercurial dependency and specify version
+cat > rtgui/version.h << EOF
+#ifndef _VERSION_
+#define _VERSION_
+
+#define VERSION "%{version}"
+#define TAGDISTANCE 0
+#define CACHEFOLDERNAME "RawTherapee${CACHE_NAME_SUFFIX}"
+#endif
+EOF
+
+cat > AboutThisBuild.txt << EOF
+See package information
+EOF
+
+%build
+%cmake \
+	-DLIBDIR=%{_libdir} \
+	-DAUTOMATED_BUILD_SYSTEM:BOOL=ON \
+	-DCACHE_NAME_SUFFIX="" \
+	-DCMAKE_BUILD_TYPE=release \
+	-DCMAKE_CXX_FLAGS_RELEASE="%{rpmcxxflags}" \
+	-DCMAKE_C_FLAGS_RELEASE="%{rpmcflags}" \
+	.
+%{__make} VERBOSE=1
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_appdir}%{_libdir},%{_desktopdir},%{_pixmapsdir}} \
-	$RPM_BUILD_ROOT%{_appdir}/{images,languages,profiles,themes}
-
-install options rt *.so $RPM_BUILD_ROOT%{_appdir}
-install images/* $RPM_BUILD_ROOT%{_appdir}/images
-install languages/* $RPM_BUILD_ROOT%{_appdir}/languages
-install profiles/* $RPM_BUILD_ROOT%{_appdir}/profiles
-install themes/* $RPM_BUILD_ROOT%{_appdir}/themes
-
-cat > $RPM_BUILD_ROOT%{_bindir}/%{name} << 'EOF'
-#!/bin/sh
-cd %{_appdir}
-exec ./rt
-EOF
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+desktop-file-validate $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
+appstream-util validate-relax --nonet $RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml
 
-install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
-install images/logoicon32.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
+install -d $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/{16x16,32x32}/apps
+
+# These file are taken from the root already
+rm -r $RPM_BUILD_ROOT%{_docdir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+%update_desktop_database
+%update_icon_cache hicolor
+
+%postun
+%update_desktop_database
+%update_icon_cache hicolor
+
 %files
 %defattr(644,root,root,755)
-%doc PLD-TODO
-%attr(755,root,root) %{_bindir}/*
-%dir %{_appdir}
-%attr(755,root,root) %{_appdir}/rt
-%attr(755,root,root) %{_appdir}/*.so
-# Makes rt crash sometimes.
-#%{_appdir}/options
-%dir %{_appdir}/images
-%{_appdir}/images/*.png
-%dir %{_appdir}/languages
-%{_appdir}/languages/*
-%dir %{_appdir}/profiles
-%{_appdir}/profiles/*.pp2
-%dir %{_appdir}/themes
-%{_appdir}/themes/*
+%doc AUTHORS.txt LICENSE.txt RELEASE_NOTES.txt
+%attr(755,root,root) %{_bindir}/rawtherapee
+%{_mandir}/man1/rawtherapee.1*
+%attr(755,root,root) %{_libdir}/librtengine.so
+%attr(755,root,root) %{_libdir}/librtexif.so
+%{_datadir}/%{name}
 %{_desktopdir}/%{name}.desktop
-%{_pixmapsdir}/*
+%{_datadir}/appdata/%{name}.appdata.xml
+%{_iconsdir}/hicolor/*/apps/%{name}.png
diff --git a/TODO b/TODO
deleted file mode 100644
index 1d9c759..0000000
--- a/TODO
+++ /dev/null
@@ -1,11 +0,0 @@
-# TODO:
-- startup script should respect HOME_ETC
-- switch to build from sources
-- it crashes - find out why (and report it - it's binary-only soft...)
-Program received signal SIGSEGV, Segmentation fault.
-0x36342eff in ?? ()
-(gdb) bt
-#0  0x36342eff in ?? ()
-#1  0xb6b6de16 in png_push_read_IDAT () from /usr/lib/libpng12.so.0
-#2  0x084f9bb0 in ?? ()
-#3  0x00000000 in ?? ()
diff --git a/rawtherapee-4.2-appstreamtweak.patch b/rawtherapee-4.2-appstreamtweak.patch
new file mode 100644
index 0000000..2aba853
--- /dev/null
+++ b/rawtherapee-4.2-appstreamtweak.patch
@@ -0,0 +1,41 @@
+--- rawtherapee-4.2/rawtherapee.appdata.xml.orig	2015-03-24 23:52:09.711700608 +0100
++++ rawtherapee-4.2/rawtherapee.appdata.xml	2015-03-24 23:55:02.381715497 +0100
+@@ -13,20 +13,24 @@
+     <p>
+       All aspects of RawTherapee are documented in the RawPedia wiki. There is also an active forum and IRC channel for interaction with the developers and other users.
+     </p>
+-    Supported input formats:
+-    <ul>
+-      <li>Most raw formats including those from Bayer and X-Trans type sensors</li>
+-      <li>HDR DNG 1.4 with floating-point data</li>
+-      <li>8-bit, 16-bit and 32-bit TIFF (RGB)</li>
+-      <li>8-bit and 16-bit PNG (RGB)</li>
+-      <li>JPEG</li>
+-    </ul>
+-    Supported output formats:
+-    <ul>
+-      <li>JPEG</li>
+-      <li>8-bit and 16-bit TIFF</li>
+-      <li>8-bit and 16-bit PNG</li>
+-    </ul>
++    <p>
++      Supported input formats:
++      <ul>
++        <li>Most raw formats including those from Bayer and X-Trans type sensors</li>
++        <li>HDR DNG 1.4 with floating-point data</li>
++        <li>8-bit, 16-bit and 32-bit TIFF (RGB)</li>
++        <li>8-bit and 16-bit PNG (RGB)</li>
++        <li>JPEG</li>
++      </ul>
++    </p>
++    <p>
++      Supported output formats:
++      <ul>
++        <li>JPEG</li>
++        <li>8-bit and 16-bit TIFF</li>
++        <li>8-bit and 16-bit PNG</li>
++      </ul>
++    </p>
+   </description>
+   <screenshots>
+     <screenshot type="default">http://rawtherapee.com/images/screenshots/rt-42_07-hdr-landscape.jpg</screenshot>
diff --git a/rawtherapee_CVE-2015-3885.patch b/rawtherapee_CVE-2015-3885.patch
new file mode 100644
index 0000000..0893d28
--- /dev/null
+++ b/rawtherapee_CVE-2015-3885.patch
@@ -0,0 +1,14 @@
+# https://code.google.com/p/rawtherapee/issues/detail?id=2773
+
+diff -r 0584e964d98a rtengine/dcraw.cc
+--- a/rtengine/dcraw.cc	Tue May 12 13:20:42 2015 +0200
++++ b/rtengine/dcraw.cc	Tue May 12 16:07:08 2015 +0200
+@@ -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;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rawtherapee.git/commitdiff/7b2c16ccc5871fb083fe9ee5f9647acef7f607a0



More information about the pld-cvs-commit mailing list