forked from pool/hugin
Accepting request 264132 from home:dimstar:boost
Fix build with boost 1.56.0 OBS-URL: https://build.opensuse.org/request/show/264132 OBS-URL: https://build.opensuse.org/package/show/graphics/hugin?expand=0&rev=57
This commit is contained in:
parent
4b5813ef98
commit
0e4bc7c35e
85
hugin-boost-1.56.0.patch
Normal file
85
hugin-boost-1.56.0.patch
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
Index: hugin-2014.0.0/src/tools/ParseExp.cpp
|
||||||
|
===================================================================
|
||||||
|
--- hugin-2014.0.0.orig/src/tools/ParseExp.cpp
|
||||||
|
+++ hugin-2014.0.0/src/tools/ParseExp.cpp
|
||||||
|
@@ -34,6 +34,7 @@
|
||||||
|
#include <limits>
|
||||||
|
#include <iterator>
|
||||||
|
|
||||||
|
+#define BOOST_SPIRIT_USE_PHOENIX_V3 1
|
||||||
|
#include <boost/spirit/version.hpp>
|
||||||
|
#if !defined(SPIRIT_VERSION) || SPIRIT_VERSION < 0x2010
|
||||||
|
#error "At least Spirit version 2.1 required"
|
||||||
|
@@ -50,11 +51,9 @@ namespace Parser
|
||||||
|
//power function
|
||||||
|
struct lazy_pow_
|
||||||
|
{
|
||||||
|
- template <typename X, typename Y>
|
||||||
|
- struct result { typedef X type; };
|
||||||
|
+ typedef double result_type;
|
||||||
|
|
||||||
|
- template <typename X, typename Y>
|
||||||
|
- X operator()(X x, Y y) const
|
||||||
|
+ double operator()(double x, double y) const
|
||||||
|
{
|
||||||
|
return std::pow(x, y);
|
||||||
|
}
|
||||||
|
@@ -63,11 +62,9 @@ struct lazy_pow_
|
||||||
|
// modulus for double values
|
||||||
|
struct lazy_mod_
|
||||||
|
{
|
||||||
|
- template <typename X, typename Y>
|
||||||
|
- struct result { typedef X type; };
|
||||||
|
+ typedef double result_type;
|
||||||
|
|
||||||
|
- template <typename X, typename Y>
|
||||||
|
- X operator()(X x, Y y) const
|
||||||
|
+ double operator()(double x, double y) const
|
||||||
|
{
|
||||||
|
return std::fmod(x,y);
|
||||||
|
}
|
||||||
|
@@ -76,37 +73,33 @@ struct lazy_mod_
|
||||||
|
// if statement
|
||||||
|
struct lazy_if_
|
||||||
|
{
|
||||||
|
- template <typename X, typename Y, typename Z>
|
||||||
|
- struct result { typedef Y type; };
|
||||||
|
+ typedef double result_type;
|
||||||
|
|
||||||
|
- template <typename X, typename Y, typename Z>
|
||||||
|
- X operator()(X x, Y y, Z z) const
|
||||||
|
+ double operator()(double x, double y, double z) const
|
||||||
|
{
|
||||||
|
- return x ? y : z;
|
||||||
|
+ return (std::fabs(x)>1e-5) ? y : z;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// wrapper for unary function
|
||||||
|
struct lazy_ufunc_
|
||||||
|
{
|
||||||
|
- template <typename F, typename A1>
|
||||||
|
- struct result { typedef A1 type; };
|
||||||
|
+ typedef double result_type;
|
||||||
|
|
||||||
|
- template <typename F, typename A1>
|
||||||
|
- A1 operator()(F f, A1 a1) const
|
||||||
|
+ double operator()(double (*f)(double), double a1) const
|
||||||
|
{
|
||||||
|
return f(a1);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// convert rad into deg
|
||||||
|
-double deg(const double d)
|
||||||
|
+const double deg(const double d)
|
||||||
|
{
|
||||||
|
return d*180.0/boost::math::constants::pi<double>();
|
||||||
|
};
|
||||||
|
|
||||||
|
// convert deg into rad
|
||||||
|
-double rad(const double d)
|
||||||
|
+const double rad(const double d)
|
||||||
|
{
|
||||||
|
return d*boost::math::constants::pi<double>()/180;
|
||||||
|
};
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Dec 5 10:36:30 UTC 2014 - dimstar@opensuse.org
|
||||||
|
|
||||||
|
- Add hugin-boost-1.56.0.patch: Fix build with Boost 1.56.0. Patch
|
||||||
|
taken from upstream.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Oct 10 11:39:33 NOVT 2014 - salsergey@gmail.com
|
Fri Oct 10 11:39:33 NOVT 2014 - salsergey@gmail.com
|
||||||
|
|
||||||
|
@ -59,6 +59,8 @@ Source: http://downloads.sourceforge.net/project/%{name}/%{name}/%{name}
|
|||||||
# svn co https://hugin.svn.sourceforge.net/svnroot/hugin/hugin/trunk hugin
|
# svn co https://hugin.svn.sourceforge.net/svnroot/hugin/hugin/trunk hugin
|
||||||
#Source: %%{name}-svn2008xxxx.tar.bz2
|
#Source: %%{name}-svn2008xxxx.tar.bz2
|
||||||
Source1: %{name}-svn-dummy
|
Source1: %{name}-svn-dummy
|
||||||
|
# PATCH-FIX-UPSTREAM hugin-boost-1.56.0.patch dimstar@opensuse.org -- Fix build with Boost 1.56.0, taken from http://sourceforge.net/p/hugin/hugin/ci/e237d6d1d87354f974d37a95ba52dbd9666dd310/tree/src/tools/ParseExp.cpp?diff=dde84e96b755646f3390bd9114a76f7c392fd0bf
|
||||||
|
Patch0: hugin-boost-1.56.0.patch
|
||||||
Requires: enblend-enfuse >= 3.2
|
Requires: enblend-enfuse >= 3.2
|
||||||
# needed for photo stiching (bnc#822775)
|
# needed for photo stiching (bnc#822775)
|
||||||
Requires: make
|
Requires: make
|
||||||
@ -79,6 +81,7 @@ detection and extraction of key points.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
# For SVN snapshot:
|
# For SVN snapshot:
|
||||||
#setup -q -n %%{name}
|
#setup -q -n %%{name}
|
||||||
|
Loading…
Reference in New Issue
Block a user