File dcraw.spec of Package dcraw

#
# spec file for package dcraw (Version 1.454)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           dcraw
BuildRequires:  libjpeg-devel liblcms-devel libjasper-devel
Version:        9.19
Release:        1
License:        Any permissive
Group:          Productivity/Graphics/Convertors
Url:            http://www.cybercom.net/~dcoffin/dcraw/
Summary:        Raw Digital Photo Decoding
# NOTE: call "sh update_dcraw" to update to latest version.
Source:         http://www.cybercom.net/~dcoffin/dcraw/dcraw.c
Source1:        http://www.cybercom.net/~dcoffin/dcraw/dcraw.1
Source2:        README
Source3:        README.SuSE
Source4:        badpixels
Source5:        http://www.cybercom.net/~dcoffin/dcraw/dcwrap
Source7:        http://www.cybercom.net/~dcoffin/dcraw/fujiturn.c
Source8:        http://www.cybercom.net/~dcoffin/dcraw/parse.c
Source9:        update_dcraw
Patch:          dcraw-omp.patch
Patch2:         sd990.diff
AutoReqProv:    on
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Command line tools for raw digital photo decoding and processing.



Authors:
--------
    Dave Coffin

%prep
%setup -q -n . -D -T 0
  cp -a %SOURCE0 %SOURCE1 %SOURCE2 %SOURCE3 %SOURCE4 %SOURCE5 %SOURCE7 %SOURCE8 .
%patch
%patch2
  mv badpixels .badpixels

%build
  export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -O3 -funroll-loops"
%if 0%{?suse_version} >= 1030
  export CFLAGS="$CFLAGS -Wno-array-bounds" 
%endif
%if 0%{?suse_version} >= 1010
  export CFLAGS="$CFLAGS -ftree-vectorize -fstack-protector-all"
%endif
%if 0%{?suse_version} >= 1140
  export CFLAGS="$CFLAGS -Wno-unused-result"
%endif 
%ifarch i386 x86_64
  export CFLAGS="$CFLAGS -momit-leaf-frame-pointer"
%endif
  for file in *.c ; do
    LDFLAGS=
    if test $file = dcraw.c ; then
	LDFLAGS="-lm -ljpeg -llcms -ljasper"
%if 0%{?suse_version} >= 1100
%ifarch x86_64 %{ix86}
	gcc $CFLAGS -fopenmp -msse3 -o ${file%.c}-omp $file $LDFLAGS
%else
	gcc $CFLAGS -fopenmp -o ${file%.c}-omp $file $LDFLAGS
%endif
%endif
    fi
    gcc $CFLAGS -o ${file%.c} $file $LDFLAGS
  done

%install
  mkdir -p $RPM_BUILD_ROOT/%_bindir
  mkdir -p $RPM_BUILD_ROOT%_mandir/man1
  install -m 0755 dcraw $RPM_BUILD_ROOT/%_bindir/
%if 0%{?suse_version} >= 1100
  install -m 0755 dcraw-omp $RPM_BUILD_ROOT/%_bindir/
%endif
  install -m 0644 dcraw.1 $RPM_BUILD_ROOT/%_mandir/man1/
  install -m 0755 parse $RPM_BUILD_ROOT/%_bindir/dcparse
  install -m 0755 fujiturn $RPM_BUILD_ROOT/%_bindir/

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc README README.SuSE .badpixels dcwrap
%_bindir/*
%doc %_mandir/man*/*

%changelog
* Mon Sep 08 2008 postadal@suse.cz
- updated to RCS 1.404
  * Support the Kodak C603, Nikon D700, Canon EOS 1000D,
  Canon PowerShot SD300, and Olympus E-520, SONY A300
  * Removed useless code from ppg_interpolate()
  * Don't crash on corrupt CR2 files
  * Extract the largest JPEG from any X3F file
  * Fixed camera WB on the A200
  * Set model-specific saturation levels in adobe_coeff()
* Mon Apr 14 2008 postadal@suse.cz
- updated to RCS 1.401
  * Copy GPS data into thumbnails and TIFF output
  * Support the Apple QuickTake 200, Fuji IS-1, Sony DSLR-A350,
  Pentax K20D, Nokia N95, and Canon PowerShots A460, A530, and A650
  Canon EOS 450D, Nikon D60, and Fuji S100FS, Olympus E-420
  * Copied new matrices from Adobe DNG Converter 4.4
  * fixed sRAW support (broke Fuji DNG files)
- added omp.patch to speed up decoding (-fomp disabled by default)
* Tue Feb 12 2008 postadal@suse.cz
- updated to RCS 1.398
  * Added the "-P" and "-S" options
  * Support the Sony DSLR-A200 and the PowerShots A720 and S5 IS
  * Support the Panasonic DMC-L10, added the "-W" option
  * Cropped four columns from the Nikon D3
  * Abolished the getrat() macro, support the Hasselblad H3D
  * Added the Olympus E-3 and adjusted a few maximums
  * Support the AVT F-080C, Canon EOS 40D, Canon EOS-1Ds Mark III,
  Canon PowerShot G9, Nikon Coolpix S6, Nikon D3, Nikon D300,
  Panasonic DMC-FZ18, and Sony DSLR-A700
  * Support the new Canon sRAW CR2 format
  * Added median filtering after interpolation
  * Use fseeko() and ftello() only when needed
  * Reject TIFF files with unsupported Compression tags
* Fri Aug 03 2007 postadal@suse.cz
- updated to RCS 1.390
  * Added Patterned Pixel Grouping interpolation
  * Support 3096x2103 mode for the Panasonic DMC-FZ8.
  * Added "-C" option to correct chromatic aberration.
  * Support the Hasselblad CFV, Kodak EasyShare C330, and Nikon D40X.
  * Use a switch statement for Leica and Panasonic models.
  * Output seven new TIFF tags, including ImageDescription and Artist.
  * Generated color matrices for the Apple QuickTake and Phase One H 20.
  * Copied new matrices from Adobe DNG Converter 4.1.
  * Added "-M" option and improved PPG interpolation.
  * Reports of corruption in 16-bit linear DNGs were false.
  * Support all Lossless JPEG predictors.
  * Reject 8-bit grayscale TIFFs.
  * Decode raw CINE files, which may exceed 2GB.
  * Error-check the "-s" option, and enable "-s all".
  * Support camera WB for the Canon EOS-1D and EOS-1DS.
  * Use full output range for "-H 2".
  * Added color matrix for the Canon PowerShot A640.
  * When they differ, use DateTimeOriginal instead of DateTime.
* Thu May 03 2007 postadal@suse.cz
- updated to RCS 1.379
  * Offer blended highlights with the "-H 2" option
  * Set "shot_order" for ORF and CR2 files
  * Added "-A" option to select a rectangle for white balance
  * Protect against overflow attacks on malloc() or calloc()
  * Nucore raw formats are not used outside Nucore, so drop them
  * Support the Canon PowerShots A630 and A640, Panasonic DMC-FZ8,
  * Sigma SD14, Apple QuickTake 100 & 150, Mamiya ZD, Casio QV-R41,
  Olympus E-410 and Pentax Optio 750Z
- fixed doc permissions
* Wed Apr 25 2007 postadal@suse.cz
- updated to RCS 1.377
  * Added a color matrix for the Fuji S6000fd
  * Set aspect ratio for the Kodak DC20 and DC25
  * Replaced bilateral filter with wavelet denoising
  * Fixed incompatibility between "-f" and "-p"
  * Fixed strange color casts with the Polaroid x530
  * Added Adobe matrices for the Nikon D40 and Pentax K10D
  * Found larger JPEG thumbs for Nikon D100,D1H,D1X,D2H,D2X,E5000,E5700
  * Support the Canon EOS-1D Mark III, Olympus SP550UZ, Fuji FinePix S5Pro
  * Use the "a trous" wavelet transform instead of the JPEG2000 method
  * Apply sqrt() to denoise highlights and shadows evenly
  * Optimized AHD interpolation to take 22%% less time
  * Better detect and reject non-raw TIFFs
- fixed dcraw permission
* Thu Feb 08 2007 postadal@suse.cz
- updated to RCS 1.364
  * Built a color matrix for Canon PowerShot S3 IS, Canon PowerShot A610
  * Added Olympus SP510UZ, Panasonic DMC-L1, Leica Digilux 3,
  Casio EX-Z4, Kodak DCS200, Canon PowerShots A620, S3 IS, Pentax K10D,
  Canon PowerShot A610
  * Suport Olympus E-400, Sinar 4-shot and Sinar IA file format
  * Added "-K" option for dark-frame subtraction
  * Get the Olympus black level from the ORF metadata.
  * Found a more reliable way to identify 4775936-byte images
* Tue Oct 17 2006 postadal@suse.cz
- updated to RCS 1.353
  * added support for Pentax K100D, Nikon D200, D80, E3200,
  Canon EOS 400D, Panasonic DMC-LX2, DMC-FZ50
  * correctly display long exposure times for CRW files
  * added color matrices from Adobe DNG Converter 3.5
  * display the focal length of Canon CRW images
* Thu Aug 17 2006 postadal@suse.cz
- updated to RCS 1.340
  * improved support for the Olympus E-330
* Wed Aug 02 2006 postadal@suse.cz
- updated to RCS 1.338
  * added "-H 2" option for rudimentary highlight recovery
  * new "-T" option provides TIFF output with metadata and ICC profile
  * replaced "-r" and "-l" options with raw white balance
  * added support for Imacon Ixpress 22-Mp, Leaf Aptus 75, Leica D-Lux 2,
  Sony DSLR-A100, Minolta DiMAGE G530, Sinar 4080x4080, Samsung GX-1S
  * fixed camera WB for Canon EOS 10D, 300D, and clones
  * added camera WB for the Kodak DCS Pro SLR models, Imacon Ixpress,
  Kodak P850/P880
* Sun Mar 26 2006 postadal@suse.cz
- updated to RCS 1.319
  * new color matrix for the Nikon E700, E800, and E950
  * new "-D" option to output unscaled raw pixels (totally raw)
  * fixed defective pixels and columns in Phase One images
* Fri Feb 10 2006 dmueller@suse.de
- update to RCS 1.315 (#112733)
* Wed Feb 08 2006 dmueller@suse.de
- update to RCS 1.314:
  Updated color matrices based on Adobe DNG Converter 3.3.
  Added Kodak ProPhoto D65 as an output option.
* Thu Jan 26 2006 sbrabec@suse.cz
- Updated to dcraw v8, RCS 1.313.
- Added simple update_dcraw script.
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Jan 11 2006 adrian@suse.de
- add stack protector compiler flag
* Thu Oct 13 2005 postadal@suse.cz
- update to RCS 1.290
  * added as default new interpolation algorithm AHD
  (Adaptive homogeneity-directed demosaicing algorithm)
  * new Bilateral filtering to remove color noises in CIELAB space
- update dcraw.1, fujiturn, dcparse (parse.c)
- removed crwfixdates (fixdates.c) superseded by "dcraw -z"
* Tue Jun 07 2005 adrian@suse.de
- update to RCS 1.263
- compile with -fno-strict-aliasing to avoid compiler errors
* Fri Jun 03 2005 postadal@suse.cz
- Updated to current version on maintainers website.
  RCS version 1.262.
* Fri Feb 04 2005 meissner@suse.de
- Updated to current version on maintainers website.
  RCS version 1.234.
* Thu Aug 26 2004 sbrabec@suse.cz
- Updated to dcraw RCS version 1.200.
- Added more tools and documentation.
* Wed Jun 16 2004 adrian@suse.de
- initial package of version 1.194