diff --git a/0001-Unified-inclusion-of-exiv2-library-1828925.patch b/0001-Unified-inclusion-of-exiv2-library-1828925.patch new file mode 100644 index 0000000..b13cd9f --- /dev/null +++ b/0001-Unified-inclusion-of-exiv2-library-1828925.patch @@ -0,0 +1,127 @@ +From 20020250a02e3e6c5813a24012bb7454a6195f51 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20Br=C3=BCns?= +Date: Sun, 14 Jul 2019 19:00:49 +0200 +Subject: [PATCH] Unified inclusion of exiv2 library [1828925] + +Before only the needed include files were used. This is depreacated. +Exiv2 wants only to include the main file +--- + src/hugin1/hugin/AboutDialog.cpp | 2 +- + src/hugin1/hugin/PanoOperation.cpp | 3 +-- + src/hugin1/hugin/RawImport.cpp | 5 +---- + src/hugin1/hugin/TextureManager.cpp | 3 +-- + src/hugin1/ptbatcher/FindPanoDialog.cpp | 3 +-- + src/hugin_base/panodata/Exiv2Helper.cpp | 5 ++--- + src/hugin_base/panodata/SrcPanoImage.cpp | 4 +--- + 7 files changed, 8 insertions(+), 17 deletions(-) + +diff --git a/src/hugin1/hugin/AboutDialog.cpp b/src/hugin1/hugin/AboutDialog.cpp +index 5603957..d1291aa 100755 +--- a/src/hugin1/hugin/AboutDialog.cpp ++++ b/src/hugin1/hugin/AboutDialog.cpp +@@ -42,7 +42,7 @@ extern "C" + // workaround for a conflict between exiv2 and wxWidgets/CMake built + #define HAVE_PID_T 1 + #endif +-#include "exiv2/exiv2.hpp" ++#include + #include "lensdb/LensDB.h" + #include "sqlite3.h" + #include +diff --git a/src/hugin1/hugin/PanoOperation.cpp b/src/hugin1/hugin/PanoOperation.cpp +index cf7a6c3..7a3f0d7 100755 +--- a/src/hugin1/hugin/PanoOperation.cpp ++++ b/src/hugin1/hugin/PanoOperation.cpp +@@ -36,8 +36,7 @@ + // workaround for a conflict between exiv2 and wxWidgets/CMake built + #define HAVE_PID_T 1 + #endif +-#include +-#include ++#include + #include "base_wx/LensTools.h" + #include "base_wx/wxLensDB.h" + #include "hugin/ResetDialog.h" +diff --git a/src/hugin1/hugin/RawImport.cpp b/src/hugin1/hugin/RawImport.cpp +index 2dd4eb9..73bb143 100755 +--- a/src/hugin1/hugin/RawImport.cpp ++++ b/src/hugin1/hugin/RawImport.cpp +@@ -35,10 +35,7 @@ + // workaround for a conflict between exiv2 and wxWidgets/CMake built + #define HAVE_PID_T 1 + #endif +-#include +-#include +-#include +-#include ++#include + #ifdef __WXMSW__ + #include + #endif +diff --git a/src/hugin1/hugin/TextureManager.cpp b/src/hugin1/hugin/TextureManager.cpp +index 0d2f5da..9a0822a 100755 +--- a/src/hugin1/hugin/TextureManager.cpp ++++ b/src/hugin1/hugin/TextureManager.cpp +@@ -65,8 +65,7 @@ + // workaround for a conflict between exiv2 and wxWidgets/CMake built + #define HAVE_PID_T 1 + #endif +-#include "exiv2/exiv2.hpp" +-#include "exiv2/preview.hpp" ++#include + + TextureManager::TextureManager(HuginBase::Panorama *pano, ViewState *view_state_in) + { +diff --git a/src/hugin1/ptbatcher/FindPanoDialog.cpp b/src/hugin1/ptbatcher/FindPanoDialog.cpp +index 64774fb..96cd762 100755 +--- a/src/hugin1/ptbatcher/FindPanoDialog.cpp ++++ b/src/hugin1/ptbatcher/FindPanoDialog.cpp +@@ -36,8 +36,7 @@ + // workaround for a conflict between exiv2 and wxWidgets/CMake built + #define HAVE_PID_T 1 + #endif +-#include "exiv2/exiv2.hpp" +-#include "exiv2/preview.hpp" ++#include + #ifdef _WIN32 + #include + #endif +diff --git a/src/hugin_base/panodata/Exiv2Helper.cpp b/src/hugin_base/panodata/Exiv2Helper.cpp +index bc4c12a..5f8bcea 100755 +--- a/src/hugin_base/panodata/Exiv2Helper.cpp ++++ b/src/hugin_base/panodata/Exiv2Helper.cpp +@@ -28,8 +28,7 @@ + #include "Exiv2Helper.h" + #include "hugin_math/hugin_math.h" + #include "hugin_utils/utils.h" +-#include "exiv2/easyaccess.hpp" +-#include "exiv2/version.hpp" ++#include + + namespace HuginBase + { +@@ -601,4 +600,4 @@ namespace HuginBase + }; + + }; //namespace Exiv2Helper +-}; //namespace HuginBase +\ No newline at end of file ++}; //namespace HuginBase +diff --git a/src/hugin_base/panodata/SrcPanoImage.cpp b/src/hugin_base/panodata/SrcPanoImage.cpp +index cc6a565..8484dd9 100755 +--- a/src/hugin_base/panodata/SrcPanoImage.cpp ++++ b/src/hugin_base/panodata/SrcPanoImage.cpp +@@ -40,9 +40,7 @@ + #include + #include + #include +-#include +-#include +-#include ++#include + #include + #include "Exiv2Helper.h" + +-- +2.22.0 + diff --git a/hugin-2018.0.0.tar.bz2 b/hugin-2018.0.0.tar.bz2 deleted file mode 100644 index d22062e..0000000 --- a/hugin-2018.0.0.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d3af0d066ac50e3bb243a175a64ecda136d87178419457e8822e11bcf0e565cb -size 9838518 diff --git a/hugin-2019.0.0.tar.bz2 b/hugin-2019.0.0.tar.bz2 new file mode 100644 index 0000000..250577d --- /dev/null +++ b/hugin-2019.0.0.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f94717c5035b776a552163bac5815916e0662008fabefafd790fa54b352e22d1 +size 10297887 diff --git a/hugin-exiv2-0.27.patch b/hugin-exiv2-0.27.patch deleted file mode 100644 index 0f158ed..0000000 --- a/hugin-exiv2-0.27.patch +++ /dev/null @@ -1,20 +0,0 @@ -Index: hugin-2018.0.0/src/hugin_base/panodata/Exiv2Helper.cpp -=================================================================== ---- hugin-2018.0.0.orig/src/hugin_base/panodata/Exiv2Helper.cpp -+++ hugin-2018.0.0/src/hugin_base/panodata/Exiv2Helper.cpp -@@ -28,7 +28,7 @@ - #include "Exiv2Helper.h" - #include "hugin_math/hugin_math.h" - #include "hugin_utils/utils.h" --#include "exiv2/easyaccess.hpp" -+#include "exiv2/exiv2.hpp" - - namespace HuginBase - { -@@ -600,4 +600,4 @@ namespace HuginBase - }; - - }; //namespace Exiv2Helper --}; //namespace HuginBase -\ No newline at end of file -+}; //namespace HuginBase diff --git a/hugin-svn-dummy b/hugin-svn-dummy deleted file mode 100644 index b224b77..0000000 --- a/hugin-svn-dummy +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -# This is a dummy SVN command, which allows to build the package without network access. -case "$*" in - "info $RPM_BUILD_DIR/hugin" ) - cat < + +- update to version 2019.0.0 + * Added raw import: It converts the RAW images to TIFF using a + raw converter. This can be done by dcraw (requires additional + exiftool), RawTherapee or darktable. These programs needs to be + installed externally. + * Fixes for align_image_stack with EXR images. + * Added option for range compression. Can be helpful for LDR + panoramas to brighten the shadows before merging, because at this + stage the blender has some more information which can be helpful. + * New hotkeys for mask editor (change zoom level with 0, 1 and 2). + * Expression parser (pto_var and "manipulate image variables" in + GUI) can now read also all image variables. + * line_find: Ignore lines with low distance to each other to get + better coverage. Also use only central part of the panorama for + searching for line control points (ignoring zenit/nadir near areas). + * pano_modify: Added new switch --projection-parameter to set + projection parameters. + * Store program settings according to XDG base dir specification + (Linux only, needs to compile with wxWidgets 3.1.1 or later). +- Enable parallel build, use memory-constraints +- Replace hugin-exiv2-0.27.patch with upstream patch, + 0001-Unified-inclusion-of-exiv2-library-1828925.patch +- Cleanup spec file: + * Drop obsolete SDL and freeglut BuildRequires + * Remove obsolete references to SVN (hugin uses mercurial) + * Minor cleanups, remove obsolete comments etc. + ------------------------------------------------------------------- Wed Mar 13 10:55:00 UTC 2019 - Adam Majer diff --git a/hugin.spec b/hugin.spec index df7bf16..5f78eda 100644 --- a/hugin.spec +++ b/hugin.spec @@ -17,12 +17,13 @@ %bcond_with hsi +%bcond_with system_flann +%bcond_without lapack Name: hugin BuildRequires: Mesa-devel BuildRequires: OpenEXR-devel -BuildRequires: SDL-devel -%if 0%{?suse_version} > 1325 +%if 0%{?suse_version} > 1325 || 0%{?sle_version} >= 150000 BuildRequires: libboost_filesystem-devel BuildRequires: libboost_system-devel %else @@ -33,42 +34,43 @@ BuildRequires: desktop-file-utils BuildRequires: exiftool BuildRequires: fdupes BuildRequires: fftw3-devel -BuildRequires: freeglut-devel +%if %{with system_flann} +BuildRequires: flann-devel +%endif BuildRequires: gcc-c++ BuildRequires: glew-devel -BuildRequires: lapack +%if %{with lapack} +BuildRequires: lapack-devel +%endif BuildRequires: libexiv2-devel BuildRequires: libjpeg-devel -BuildRequires: liblapack3 BuildRequires: liblcms2-devel BuildRequires: libpano-devel >= 2.9.19 +BuildRequires: libpng-devel BuildRequires: libtiff-devel -BuildRequires: libxml2 +BuildRequires: memory-constraints %if %{with hsi} BuildRequires: python-wxWidgets >= 3 -%endif -BuildRequires: sqlite3-devel BuildRequires: swig +%endif +BuildRequires: pkg-config +BuildRequires: sqlite3-devel BuildRequires: update-desktop-files BuildRequires: vigra-devel BuildRequires: wxWidgets-devel >= 3 -BuildRequires: zip -%define mversion 2018.0 -Version: 2018.0.0 +%define mversion 2019.0 +Version: 2019.0.0 Release: 0 Summary: Toolchain for Stitching of Images and Creating Panoramas License: GPL-2.0-or-later Group: Productivity/Graphics/Other Url: http://hugin.sourceforge.net/ Source: http://downloads.sourceforge.net/project/%{name}/%{name}/%{name}-%{mversion}/%{name}-%{version}.tar.bz2 -# For SVN snapshot: -# svn co https://hugin.svn.sourceforge.net/svnroot/hugin/hugin/trunk hugin -#Source: %%{name}-svn2008xxxx.tar.bz2 -Source1: %{name}-svn-dummy # This script is a combined appdata.prov and desktop-file.prov to enable hugin to provide appdata.xml and desktop files see boo#952324 -Source2: find-hugin-provides.prov +Source1: find-hugin-provides.prov Patch0: hugin.appdata.patch -Patch1: hugin-exiv2-0.27.patch +# PATCH-FIX-UPSTREAM https://sourceforge.net/p/hugin/hugin/ci/01e87b730bb3d2fba65e5738e4e20c25900d7ab0/ +Patch1: 0001-Unified-inclusion-of-exiv2-library-1828925.patch Requires: enblend-enfuse >= 3.2 # needed for photo stiching (bnc#822775) Requires: make @@ -76,7 +78,7 @@ Recommends: autopano-sift Recommends: exiftool BuildRoot: %{_tmppath}/%{name}-%{version}-build -%define __find_provides %{SOURCE2} +%define __find_provides %{SOURCE1} #%%debug_package %description @@ -95,34 +97,22 @@ detection and extraction of key points. chmod -x AUTHORS authors.txt Changes.txt README TODO COPYING.txt -# For SVN snapshot: -#setup -q -n %%{name} -# Rename Catalan in Spain to Catalan (translation removed in version 2014.0.0). -#mv src/translations/ca_ES.po src/translations/ca.po # Rename Czech in Czech Republic to Czech. mv src/translations/cs_CZ.po src/translations/cs.po #sed -i "s/ca_ES/ca/;s/cs_CZ/cs/" src/hugin/po/LINGUAS -# For SVN snapshot: -#mkdir bin -#cp %%{SOURCE1} bin/svn -#chmod +x bin/svn -chmod 0755 %{SOURCE2} +chmod 0755 %{SOURCE1} %build echo -n be8da0221960 > rev.txt -export PATH=$PWD/bin:$PATH -export CFLAGS="%{optflags}" -export CXXFLAGS="$CFLAGS" -# FIXME: This is an ugly hack. Build system should be fixed instead! Remove as soon as upstream fixes it (bnc#846944). -export LDFLAGS="-Wl,-rpath -Wl,%{_libdir}/hugin" %cmake \ - -DENABLE_LAPACK=ON \ + -DENABLE_LAPACK=%{?with_lapack:ON}%{!?with_lapack:OFF} \ -DBUILD_HSI=%{?with_hsi:ON}%{!?with_hsi:OFF} \ -DCMAKE_SKIP_RPATH:BOOL=OFF \ .. -# parallel make kills our workers -make VERBOSE=1 %{?_smp_mflags} -j1 + +%limit_build +%cmake_build %install pushd . @@ -134,8 +124,12 @@ popd %suse_update_desktop_file calibrate_lens_gui 2DGraphics # locales %{find_lang} %{name} -# Use better place for MIME icons. -mv -f %{buildroot}%{_datadir}/icons/gnome %{buildroot}%{_datadir}/icons/hicolor + +# Use better place for MIME icon. +mkdir -p %{buildroot}%{_datadir}/icons/hicolor/48x48/mimetypes +mv -f %{buildroot}%{_datadir}/icons/{gnome/48x48/mimetypes/gnome-mime-,hicolor/48x48/mimetypes/}application-x-ptoptimizer-script.png +rmdir -p --ignore-fail-on-non-empty %{buildroot}%{_datadir}/icons/gnome/48x48/mimetypes + # Install manually so it can be dedup'ed with the one in the program resources install -m644 -D -t %{buildroot}%{_licensedir}/hugin/ COPYING.txt %fdupes %{buildroot} @@ -157,8 +151,9 @@ install -m644 -D -t %{buildroot}%{_licensedir}/hugin/ COPYING.txt %{_datadir}/hugin %{_datadir}/applications/*.desktop %{_datadir}/icons/hicolor/48x48/mimetypes/*.png +%{_datadir}/icons/hicolor/*/apps/*.png +%{_datadir}/icons/hicolor/scalable/apps/*.svg %{_datadir}/mime/packages/*.xml -%{_datadir}/pixmaps/*.png %dir %{_datadir}/appdata %{_datadir}/appdata/*xml %dir %{_libdir}/hugin