From 2f49986ed11f9e6dfbcebd6e197732dfd3ad44d7 Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Wed, 7 Aug 2013 13:55:32 -0500 Subject: [PATCH] Build samples. --- LibRaw-0.14.7-segfault.patch | 11 ------- LibRaw-0.14.8-errorhandling.patch | 49 ------------------------------- LibRaw.spec | 24 ++++++++++----- 3 files changed, 16 insertions(+), 68 deletions(-) delete mode 100644 LibRaw-0.14.7-segfault.patch delete mode 100644 LibRaw-0.14.8-errorhandling.patch diff --git a/LibRaw-0.14.7-segfault.patch b/LibRaw-0.14.7-segfault.patch deleted file mode 100644 index 6c8a8c0..0000000 --- a/LibRaw-0.14.7-segfault.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- internal/dcraw_common.cpp~ 2012-06-27 11:39:05.000000000 -0500 -+++ internal/dcraw_common.cpp 2013-04-11 07:09:04.594518113 -0500 -@@ -7277,7 +7277,7 @@ - if (table[i].t_black) black = (ushort) table[i].t_black; - if (table[i].t_maximum) maximum = (ushort) table[i].t_maximum; - if (table[i].trans[0]) { -- for (j=0; j < 12; j++) -+ for (j=0; j < 3; j++) - #ifdef LIBRAW_LIBRARY_BUILD - imgdata.color.cam_xyz[0][j] = - #endif diff --git a/LibRaw-0.14.8-errorhandling.patch b/LibRaw-0.14.8-errorhandling.patch deleted file mode 100644 index b71a539..0000000 --- a/LibRaw-0.14.8-errorhandling.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff -U3 -r LibRaw-0.14.8.orig/Changelog.rus LibRaw-0.14.8/Changelog.rus ---- LibRaw-0.14.8.orig/Changelog.rus 2013-05-17 14:54:17.000000000 -0500 -+++ LibRaw-0.14.8/Changelog.rus 2013-05-31 05:31:45.970607271 -0500 -@@ -1,4 +1,8 @@ --2013-05-21 Alex Tutubalin -+2013-05-31 Alex Tutubalin -+ * Исправлена ошибка при обработке поврежденных полноцветных -+ файлов (sRAW, Foveon) -+ -+2013-05-21 Alex Tutubalin - * Исправлена ошибка в коде функции sony_decrypt(), приводившая - к неверному чтению камерного баланса белого на камерах Sony - если LibRaw была собрана gcc 4.8 -diff -U3 -r LibRaw-0.14.8.orig/Changelog.txt LibRaw-0.14.8/Changelog.txt ---- LibRaw-0.14.8.orig/Changelog.txt 2013-05-17 14:54:17.000000000 -0500 -+++ LibRaw-0.14.8/Changelog.txt 2013-05-31 05:31:45.970607271 -0500 -@@ -1,3 +1,7 @@ -+2013-05-31 Alex Tutubalin -+ * Fixed double call to free() on broken legacy-layout images -+ (backport from 0.15.x) -+ - 2013-05-21 Alex Tutubalin - * Fixed undefined behaviour in sony_decrypt() function. - This bug causes incorrect camera WB read for Sony cameras. -diff -U3 -r LibRaw-0.14.8.orig/src/libraw_cxx.cpp LibRaw-0.14.8/src/libraw_cxx.cpp ---- LibRaw-0.14.8.orig/src/libraw_cxx.cpp 2013-05-17 14:54:17.000000000 -0500 -+++ LibRaw-0.14.8/src/libraw_cxx.cpp 2013-05-31 05:31:51.402607149 -0500 -@@ -796,8 +796,8 @@ - S.iheight= S.height; - IO.shrink = 0; - // allocate image as temporary buffer, size -- imgdata.rawdata.raw_alloc = calloc(S.iwidth*S.iheight,sizeof(*imgdata.image)); -- imgdata.image = (ushort (*)[4]) imgdata.rawdata.raw_alloc; -+ imgdata.rawdata.raw_alloc = 0; -+ imgdata.image = (ushort (*)[4]) calloc(S.iwidth*S.iheight,sizeof(*imgdata.image)); - } - - -@@ -807,8 +807,8 @@ - // recover saved - if( decoder_info.decoder_flags & LIBRAW_DECODER_LEGACY) - { -- imgdata.image = 0; -- imgdata.rawdata.color_image = (ushort (*)[4]) imgdata.rawdata.raw_alloc; -+ imgdata.rawdata.raw_alloc = imgdata.rawdata.color_image = imgdata.image; -+ imgdata.image = 0; - } - - // calculate channel maximum diff --git a/LibRaw.spec b/LibRaw.spec index 61a819a..a02259e 100644 --- a/LibRaw.spec +++ b/LibRaw.spec @@ -1,8 +1,7 @@ - Summary: Library for reading RAW files obtained from digital photo cameras Name: LibRaw Version: 0.15.3 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv3+ Group: Development/Libraries URL: http://www.libraw.org @@ -10,12 +9,9 @@ URL: http://www.libraw.org BuildRequires: lcms2-devel BuildRequires: jasper-devel - Source0: http://www.libraw.org/data/%{name}-%{version}.tar.gz Source1: http://www.libraw.org/data/%{name}-demosaic-pack-GPL2-%{version}.tar.gz Source2: http://www.libraw.org/data/%{name}-demosaic-pack-GPL3-%{version}.tar.gz -#Patch0: LibRaw-0.14.7-segfault.patch -#Patch1: LibRaw-0.14.8-errorhandling.patch %description LibRaw is a library for reading RAW files obtained from digital photo @@ -42,13 +38,18 @@ Group: Development/Libraries %description static LibRaw static development libraries. +%package samples +Summary: LibRaw sample programs +Group: Development/Libraries + +%description samples +LibRaw sample programs + %prep %setup -q -a1 -a2 -#%patch0 -p0 -#%patch1 -p1 %build -%configure --enable-examples=no --enable-jasper --enable-lcms \ +%configure --enable-examples=yes --enable-jasper --enable-lcms \ --enable-demosaic-pack-gpl2 --enable-demosaic-pack-gpl3 make %{?_smp_mflags} @@ -80,10 +81,17 @@ make install DESTDIR=%{buildroot} %exclude %{_libdir}/*.la %exclude %{_docdir}/libraw/* +%files samples +%defattr(-,root,root,-) +%{_bindir}/* + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %changelog +* Wed Aug 07 2013 Jon Ciesla - 0.15.3-3 +- Enable samples, BZ 991514, + * Fri Aug 02 2013 Fedora Release Engineering - 0.15.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild