File enblend-enfuse.spec of Package enblend-enfuse.1037

#
# spec file for package enblend-enfuse
#
# Copyright (c) 2012 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/
#


Name:           enblend-enfuse
Url:            http://enblend.sourceforge.net/
Summary:        Tool for Composing Images
License:        GPL-2.0+ ; MIT
Group:          Productivity/Graphics/Other
Version:        4.0
Release:        0
Source:         %{name}-%{version}.tar.bz2
Patch0:         enblend-enfuse-libpng14.patch
Patch1:         use-default-gcc-inlining.diff
BuildRequires:  OpenEXR-devel
BuildRequires:  boost-devel
BuildRequires:  freeglut-devel
BuildRequires:  gcc-c++
BuildRequires:  glew-devel
BuildRequires:  gnuplot
BuildRequires:  liblcms-devel
BuildRequires:  libpng-devel
BuildRequires:  libtiff-devel
BuildRequires:  licenses
BuildRequires:  plotutils-devel
BuildRequires:  sed
BuildRequires:  tidy
BuildRequires:  transfig
Requires:       licenses
Provides:       enblend = %{version}
Provides:       enfuse = %{version}
# package name for < openSUSE 11.1:
Obsoletes:      enblend < 3.2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
PreReq:         %install_info_prereq

%description
Enblend is a tool for compositing images using a Burt & Adelson
multiresolution spline. This technique tries to make the seams between
the input images invisible. The basic idea is that image features
should be blended across a transition zone, proportional in size to the
spatial frequency of the features. For example, objects like trees and
window panes have rapid changes in color. By blending these features in
a narrow zone, you cannot see the seam because the eye already expects
to see color changes at the edge of these features. Clouds and sky are
the opposite. These features must be blended across a wide transition
zone because any sudden change in color is immediately noticeable.


%prep
%setup -q -n enblend-enfuse-4.0-753b534c819d
%patch0 -p1
%patch1
#workaround vigra bug where arithmetic coded JPEG is always created with libjpeg-turbo bnc#786566 - gankov@opensuse.org
sed -i 's/info.arith_code = TRUE/info.arith_code = FALSE/' src/vigra_impex/jpeg.cxx

%build
ACLOCAL="aclocal -I m4" autoreconf -f -i

# The gcc 4.5 performs too poor compiling this package with -O2, can take days.
export CFLAGS="$RPM_OPT_FLAGS"
export CXXFLAGS="$RPM_OPT_FLAGS"
%if 0%{?suse_version} > 1120
%ifarch x86_64
export CFLAGS="$RPM_OPT_FLAGS -Os"
export CXXFLAGS="$RPM_OPT_FLAGS -Os"
%endif
%endif

./configure --prefix=/usr --libdir=%_libdir

%install
%makeinstall
ln -sf /usr/share/doc/licenses/md5/$(md5sum COPYING | sed 's/ .*//') COPYING

%clean
rm -rf $RPM_BUILD_ROOT

%post
%install_info --info-dir=%{_infodir} %{_infodir}/enblend.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/enfuse.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/enfuse-focus-stacking.info.gz

%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/enblend.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/enfuse.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/enfuse-focus-stacking.info.gz

%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README VIGRA_LICENSE
%{_bindir}/*
%doc %{_infodir}/*.*
%doc %{_mandir}/*/*.*

%changelog
openSUSE Build Service is sponsored by