File enblend-enfuse.spec of Package enblend-enfuse

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


%define _build_doc 0

Name:           enblend-enfuse
Url:            http://enblend.sourceforge.net/
Summary:        Tool for Composing Images
License:        GPL-2.0+
Group:          Productivity/Graphics/Other
Version:        4.2
Release:        0
Source:         http://sourceforge.net/projects/enblend/files/%{name}/%{name}-4.2/%{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM enblend-latex-optional.patch sf#1565269 dimstar@opensuse.org -- Make latex optional
Patch0:         enblend-latex-optional.patch
BuildRequires:  OpenEXR-devel
BuildRequires:  automake
%if 0%{?suse_version} > 1325
BuildRequires:  libboost_headers-devel
%else
BuildRequires:  boost-devel >= 1.55
%endif
BuildRequires:  freeglut-devel
BuildRequires:  gcc-c++
BuildRequires:  glew-devel
BuildRequires:  gsl-devel
BuildRequires:  help2man
BuildRequires:  libICE-devel
BuildRequires:  libjpeg-devel
BuildRequires:  liblcms2-devel >= 2.5
BuildRequires:  libpng-devel
BuildRequires:  libtiff-devel
BuildRequires:  libxml2-tools
#BuildRequires:  mathml-dtd
BuildRequires:  perl-TimeDate
BuildRequires:  pkg-config
BuildRequires:  plotutils-devel
BuildRequires:  sed
BuildRequires:  vigra-devel
%if %{_build_doc}
BuildRequires:  ImageMagick
BuildRequires:  gnuplot
BuildRequires:  texinfo
BuildRequires:  texlive-latex-bin-bin
BuildRequires:  tidy
BuildRequires:  transfig
#BuildRequires:  xhtml-dtd
%if 0%{?suse_version} > 1220
BuildRequires:  help2man
%endif
%endif
Provides:       enblend = %{version}
Provides:       enfuse = %{version}
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
%patch0 -p1

%build
ACLOCAL="aclocal -I m4" autoreconf -f -i
# The gcc 4.5 performs too poor compiling this package with -O2, can take days.
# gcc-4.7 still needs too much resources to build on x86_64 with -O2 and OBS virtual engine crashes after a hour.
export CFLAGS="$RPM_OPT_FLAGS -Os"
export CXXFLAGS="$RPM_OPT_FLAGS -Os"
%configure
# NO, do not use this here, it breaks the build due to lack of resources
#make %{?_smp_mflags}
make
# FIXME: We need xhtml-math-svg.dtd https://bugzilla.novell.com/show_bug.cgi?id=799075
#make %{?_smp_mflags} xhtml

%install
%makeinstall
#make install-xhtml DESTDIR=%{buildroot}

%if %{_build_doc}
%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
%endif

%files
%defattr(-,root,root)
# ChangeLog does not contain anything useful
%doc AUTHORS COPYING NEWS README
%if %{_build_doc}
%doc doc/*.pdf
%doc %{_infodir}/*.*
%endif
%{_bindir}/*
%doc %{_mandir}/*/*.*

%changelog
openSUSE Build Service is sponsored by