diff options
author | Markus Meier <maekke@gentoo.org> | 2015-01-02 18:36:29 +0000 |
---|---|---|
committer | Markus Meier <maekke@gentoo.org> | 2015-01-02 18:36:29 +0000 |
commit | 7b5bda2a5ceed5a2a327893dfd270ff84e0f4751 (patch) | |
tree | dd2da4609348adabaa9f6e6a65fb9534cd658508 /media-gfx | |
parent | Remove EAPI1 version. (diff) | |
download | gentoo-2-7b5bda2a5ceed5a2a327893dfd270ff84e0f4751.tar.gz gentoo-2-7b5bda2a5ceed5a2a327893dfd270ff84e0f4751.tar.bz2 gentoo-2-7b5bda2a5ceed5a2a327893dfd270ff84e0f4751.zip |
fix building with dev-libs/boost-1.56, bug #525400
(Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key 072AD062)
Diffstat (limited to 'media-gfx')
-rw-r--r-- | media-gfx/hugin/ChangeLog | 8 | ||||
-rw-r--r-- | media-gfx/hugin/files/hugin-2014.0.0-ParseExp.patch | 527 | ||||
-rw-r--r-- | media-gfx/hugin/hugin-2014.0.0-r1.ebuild | 9 | ||||
-rw-r--r-- | media-gfx/hugin/hugin-2014.0.0.ebuild | 9 |
4 files changed, 545 insertions, 8 deletions
diff --git a/media-gfx/hugin/ChangeLog b/media-gfx/hugin/ChangeLog index 878e2a01aa24..12380f1fd7fb 100644 --- a/media-gfx/hugin/ChangeLog +++ b/media-gfx/hugin/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-gfx/hugin -# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-gfx/hugin/ChangeLog,v 1.155 2014/12/22 10:09:17 pinkbyte Exp $ +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-gfx/hugin/ChangeLog,v 1.156 2015/01/02 18:36:29 maekke Exp $ + + 02 Jan 2015; Markus Meier <maekke@gentoo.org> hugin-2014.0.0.ebuild, + hugin-2014.0.0-r1.ebuild, +files/hugin-2014.0.0-ParseExp.patch: + fix building with dev-libs/boost-1.56, bug #525400 22 Dec 2014; Sergey Popov <pinkbyte@gentoo.org> hugin-2014.0.0.ebuild: Stable on amd64 and x86, wrt bug #528330 diff --git a/media-gfx/hugin/files/hugin-2014.0.0-ParseExp.patch b/media-gfx/hugin/files/hugin-2014.0.0-ParseExp.patch new file mode 100644 index 000000000000..3ee0dee0bff7 --- /dev/null +++ b/media-gfx/hugin/files/hugin-2014.0.0-ParseExp.patch @@ -0,0 +1,527 @@ +Contains revisions 6407:917d117ba6b0 6597:5b768c308932 6688:dde84e96b755 6689:e237d6d1d873 of ParseExp.cpp/h + +diff -r 917d117ba6b0 -r e237d6d1d873 src/tools/ParseExp.cpp +--- a/src/tools/ParseExp.cpp Sun Dec 15 18:20:14 2013 +0100 ++++ b/src/tools/ParseExp.cpp Sat Sep 13 11:22:39 2014 +0200 +@@ -1,262 +1,246 @@ +-// -*- c-basic-offset: 4 -*-
+-
+-/** @file ParseExp.cpp
+- *
+- * @brief functions to parse expressions from strings
+- *
+- * @author T. Modes
+- *
+- */
+-
+-/* This program is free software; you can redistribute it and/or
+- * modify it under the terms of the GNU General Public
+- * License as published by the Free Software Foundation; either
+- * version 2 of the License, or (at your option) any later version.
+- *
+- * This software is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- * General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public
+- * License along with this software; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+- *
+- */
+-
+-// implementation is based on blog at
+-// http://agentzlerich.blogspot.de/2011/06/using-boost-spirit-21-to-evaluate.html
+-// modified to Hugins need
+-// added if statement
+-
+-#include "ParseExp.h"
+-
+-#include <limits>
+-#include <iterator>
+-
+-#include <boost/spirit/version.hpp>
+-#if !defined(SPIRIT_VERSION) || SPIRIT_VERSION < 0x2010
+-#error "At least Spirit version 2.1 required"
+-#endif
+-#include <boost/math/constants/constants.hpp>
+-#include <boost/spirit/include/phoenix.hpp>
+-#include <boost/spirit/include/qi.hpp>
+-
+-namespace Parser
+-{
+-
+-// helper classes to implement operators
+-
+-//power function
+-struct lazy_pow_
+-{
+- template <typename X, typename Y>
+- struct result { typedef X type; };
+-
+- template <typename X, typename Y>
+- X operator()(X x, Y y) const
+- {
+- return std::pow(x, y);
+- }
+-};
+-
+-// modulus for double values
+-struct lazy_mod_
+-{
+- template <typename X, typename Y>
+- struct result { typedef X type; };
+-
+- template <typename X, typename Y>
+- X operator()(X x, Y y) const
+- {
+- return std::fmod(x,y);
+- }
+-};
+-
+-// if statement
+-struct lazy_if_
+-{
+- template <typename X, typename Y, typename Z>
+- struct result { typedef Y type; };
+-
+- template <typename X, typename Y, typename Z>
+- X operator()(X x, Y y, Z z) const
+- {
+- return x ? y : z;
+- }
+-};
+-
+-// wrapper for unary function
+-struct lazy_ufunc_
+-{
+- template <typename F, typename A1>
+- struct result { typedef A1 type; };
+-
+- template <typename F, typename A1>
+- A1 operator()(F f, A1 a1) const
+- {
+- return f(a1);
+- }
+-};
+-
+-// convert rad into deg
+-double deg(const double d)
+-{
+- return d*180.0/boost::math::constants::pi<double>();
+-};
+-
+-// convert deg into rad
+-double rad(const double d)
+-{
+- return d*boost::math::constants::pi<double>()/180;
+-};
+-
+-// the main grammar class
+-struct grammar:boost::spirit::qi::grammar<std::string::const_iterator, double(), boost::spirit::ascii::space_type>
+-{
+-
+- // symbol table for constants like "pi", e.g. image number and value
+- struct constant_ : boost::spirit::qi::symbols<char, double>
+- {
+- constant_(const ConstantMap constMap)
+- {
+- this->add("pi", boost::math::constants::pi<double>());
+- if(constMap.size()>0)
+- {
+- for(ConstantMap::const_iterator it=constMap.begin(); it!=constMap.end(); it++)
+- {
+- this->add(it->first, it->second);
+- };
+- };
+- };
+- };
+-
+- // symbol table for unary functions like "abs"
+- struct ufunc_ : boost::spirit::qi::symbols<char, double(*)(double) >
+- {
+- ufunc_()
+- {
+- this->add
+- ("abs" , (double (*)(double)) std::abs )
+- ("acos" , (double (*)(double)) std::acos )
+- ("asin" , (double (*)(double)) std::asin )
+- ("atan" , (double (*)(double)) std::atan )
+- ("ceil" , (double (*)(double)) std::ceil )
+- ("sin" , (double (*)(double)) std::sin )
+- ("cos" , (double (*)(double)) std::cos )
+- ("tan" , (double (*)(double)) std::tan )
+- ("exp" , (double (*)(double)) std::exp )
+- ("floor" , (double (*)(double)) std::floor)
+- ("sqrt" , (double (*)(double)) std::sqrt )
+- ("deg" , (double (*)(double)) deg )
+- ("rad" , (double (*)(double)) rad )
+- ;
+- }
+- } ufunc;
+-
+- boost::spirit::qi::rule<std::string::const_iterator, double(), boost::spirit::ascii::space_type> expression, term, factor, primary, compExpression, compTerm, numExpression;
+-
+- grammar(const ConstantMap constMap) : grammar::base_type(expression)
+- {
+- using boost::spirit::qi::real_parser;
+- using boost::spirit::qi::real_policies;
+- real_parser<double,real_policies<double> > real;
+-
+- using boost::spirit::qi::_1;
+- using boost::spirit::qi::_2;
+- using boost::spirit::qi::_3;
+- using boost::spirit::qi::no_case;
+- using boost::spirit::qi::_val;
+- struct constant_ constant(constMap);
+-
+- boost::phoenix::function<lazy_pow_> lazy_pow;
+- boost::phoenix::function<lazy_mod_> lazy_mod;
+- boost::phoenix::function<lazy_if_> lazy_if;
+- boost::phoenix::function<lazy_ufunc_> lazy_ufunc;
+-
+- expression =
+- (compExpression >> '\?' >> compExpression >> ':' >> compExpression) [_val = lazy_if(_1, _2, _3)]
+- | compExpression [_val=_1]
+- ;
+-
+- compExpression=
+- compTerm [_val=_1]
+- >> * ( ("&&" >> compTerm [_val = _val && _1] )
+- |("||" >> compTerm [_val = _val || _1] )
+- )
+- ;
+-
+- compTerm =
+- numExpression [_val = _1 ]
+- >>*( ( '<' >> numExpression [_val = _val < _1])
+- |( '>' >> numExpression [_val = _val > _1])
+- |( "<=" >> numExpression [_val = _val <= _1])
+- |( ">=" >> numExpression [_val = _val >= _1])
+- |( "==" >> numExpression [_val = _val == _1])
+- |( "!=" >> numExpression [_val = _val != _1])
+- )
+- ;
+-
+- numExpression =
+- term [_val = _1]
+- >> *( ('+' >> term [_val += _1])
+- | ('-' >> term [_val -= _1])
+- )
+- ;
+-
+- term =
+- factor [_val = _1]
+- >> *( ('*' >> factor [_val *= _1])
+- | ('/' >> factor [_val /= _1])
+- | ('%' >> factor [_val = lazy_mod(_val, _1)])
+- )
+- ;
+-
+- factor =
+- primary [_val = _1]
+- >> *( ('^' >> factor [_val = lazy_pow(_val, _1)]) )
+- ;
+-
+- primary =
+- real [_val = _1]
+- | '(' >> expression [_val = _1] >> ')'
+- | ('-' >> primary [_val = -_1])
+- | ('+' >> primary [_val = _1])
+- | no_case[constant] [_val = _1]
+- | (no_case[ufunc] >> '(' >> expression >> ')') [_val = lazy_ufunc(_1, _2) ]
+- ;
+-
+- };
+-};
+-
+-//template <typename ParserType, typename Iterator>
+-bool parse(std::string::const_iterator &iter,
+- std::string::const_iterator end,
+- const grammar &g,
+- double& result)
+-{
+- if(!boost::spirit::qi::phrase_parse(iter, end, g, boost::spirit::ascii::space, result))
+- {
+- return false;
+- };
+- // we check if the full string could parsed
+- return iter==end;
+-}
+-
+-// the function which exposes the interface to external
+-// version without pre-defined constants
+-bool ParseExpression(const std::string& expression, double& result)
+-{
+- ConstantMap constants;
+- return ParseExpression(expression, result, constants);
+-};
+-
+-// version with pre-defined constants
+-bool ParseExpression(const std::string& expression, double& result, const ConstantMap& constants)
+-{
+- grammar g(constants);
+- std::string::const_iterator it=expression.begin();
+- return parse(it, expression.end(), g, result);
+-};
+-
+-} // namespace
++// -*- c-basic-offset: 4 -*- ++ ++/** @file ParseExp.cpp ++ * ++ * @brief functions to parse expressions from strings ++ * ++ * @author T. Modes ++ * ++ */ ++ ++/* This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This software is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public ++ * License along with this software; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ * ++ */ ++ ++// implementation is based on blog at ++// http://agentzlerich.blogspot.de/2011/06/using-boost-spirit-21-to-evaluate.html ++// modified to Hugins need ++// added if statement ++ ++#include "ParseExp.h" ++ ++#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" ++#endif ++#include <boost/math/constants/constants.hpp> ++#include <boost/spirit/include/phoenix.hpp> ++#include <boost/spirit/include/qi.hpp> ++ ++namespace Parser ++{ ++ ++// helper classes to implement operators ++ ++//power function ++struct lazy_pow_ ++{ ++ typedef double result_type; ++ ++ double operator()(double x, double y) const ++ { ++ return std::pow(x, y); ++ } ++}; ++ ++// modulus for double values ++struct lazy_mod_ ++{ ++ typedef double result_type; ++ ++ double operator()(double x, double y) const ++ { ++ return std::fmod(x,y); ++ } ++}; ++ ++// if statement ++struct lazy_if_ ++{ ++ typedef double result_type; ++ ++ double operator()(double x, double y, double z) const ++ { ++ return (std::fabs(x)>1e-5) ? y : z; ++ } ++}; ++ ++// wrapper for unary function ++struct lazy_ufunc_ ++{ ++ typedef double result_type; ++ ++ double operator()(double (*f)(double), double a1) const ++ { ++ return f(a1); ++ } ++}; ++ ++// convert rad into deg ++const double deg(const double d) ++{ ++ return d*180.0/boost::math::constants::pi<double>(); ++}; ++ ++// convert deg into rad ++const double rad(const double d) ++{ ++ return d*boost::math::constants::pi<double>()/180; ++}; ++ ++// the main grammar class ++struct grammar:boost::spirit::qi::grammar<std::string::const_iterator, double(), boost::spirit::ascii::space_type> ++{ ++ ++ // symbol table for constants like "pi", e.g. image number and value ++ struct constant_ : boost::spirit::qi::symbols<char, double> ++ { ++ constant_(const ConstantMap constMap) ++ { ++ this->add("pi", boost::math::constants::pi<double>()); ++ if (constMap.size()>0) ++ { ++ for (ConstantMap::const_iterator it = constMap.begin(); it != constMap.end(); it++) ++ { ++ this->add(it->first, it->second); ++ }; ++ }; ++ }; ++ }; ++ ++ // symbol table for unary functions like "abs" ++ struct ufunc_ : boost::spirit::qi::symbols<char, double(*)(double) > ++ { ++ ufunc_() ++ { ++ this->add ++ ("abs", (double(*)(double)) std::abs) ++ ("acos", (double(*)(double)) std::acos) ++ ("asin", (double(*)(double)) std::asin) ++ ("atan", (double(*)(double)) std::atan) ++ ("ceil", (double(*)(double)) std::ceil) ++ ("sin", (double(*)(double)) std::sin) ++ ("cos", (double(*)(double)) std::cos) ++ ("tan", (double(*)(double)) std::tan) ++ ("exp", (double(*)(double)) std::exp) ++ ("floor", (double(*)(double)) std::floor) ++ ("sqrt", (double(*)(double)) std::sqrt) ++ ("deg", (double(*)(double)) deg) ++ ("rad", (double(*)(double)) rad) ++ ; ++ } ++ } ufunc; ++ ++ boost::spirit::qi::rule<std::string::const_iterator, double(), boost::spirit::ascii::space_type> expression, term, factor, primary, compExpression, compTerm, numExpression; ++ ++ grammar(const ConstantMap constMap) : grammar::base_type(expression) ++ { ++ using boost::spirit::qi::real_parser; ++ using boost::spirit::qi::real_policies; ++ real_parser<double, real_policies<double> > real; ++ ++ using boost::spirit::qi::_1; ++ using boost::spirit::qi::_2; ++ using boost::spirit::qi::_3; ++ using boost::spirit::qi::no_case; ++ using boost::spirit::qi::_val; ++ struct constant_ constant(constMap); ++ ++ boost::phoenix::function<lazy_pow_> lazy_pow; ++ boost::phoenix::function<lazy_mod_> lazy_mod; ++ boost::phoenix::function<lazy_if_> lazy_if; ++ boost::phoenix::function<lazy_ufunc_> lazy_ufunc; ++ ++ expression = ++ (compExpression >> '\?' >> compExpression >> ':' >> compExpression)[_val = lazy_if(_1, _2, _3)] ++ | compExpression[_val = _1] ++ ; ++ ++ compExpression = ++ compTerm[_val = _1] ++ >> *(("&&" >> compTerm[_val = _val && _1]) ++ | ("||" >> compTerm[_val = _val || _1]) ++ ) ++ ; ++ ++ compTerm = ++ numExpression[_val = _1] ++ >> *(('<' >> numExpression[_val = _val < _1]) ++ | ('>' >> numExpression[_val = _val > _1]) ++ | ("<=" >> numExpression[_val = _val <= _1]) ++ | (">=" >> numExpression[_val = _val >= _1]) ++ | ("==" >> numExpression[_val = _val == _1]) ++ | ("!=" >> numExpression[_val = _val != _1]) ++ ) ++ ; ++ ++ numExpression = ++ term[_val = _1] ++ >> *(('+' >> term[_val += _1]) ++ | ('-' >> term[_val -= _1]) ++ ) ++ ; ++ ++ term = ++ factor[_val = _1] ++ >> *(('*' >> factor[_val *= _1]) ++ | ('/' >> factor[_val /= _1]) ++ | ('%' >> factor[_val = lazy_mod(_val, _1)]) ++ ) ++ ; ++ ++ factor = ++ primary[_val = _1] ++ >> *(('^' >> factor[_val = lazy_pow(_val, _1)])) ++ ; ++ ++ primary = ++ real[_val = _1] ++ | '(' >> expression[_val = _1] >> ')' ++ | ('-' >> primary[_val = -_1]) ++ | ('+' >> primary[_val = _1]) ++ | no_case[constant][_val = _1] ++ | (no_case[ufunc] >> '(' >> expression >> ')')[_val = lazy_ufunc(_1, _2)] ++ ; ++ ++ }; ++}; ++ ++bool parse(std::string::const_iterator& iter, ++ std::string::const_iterator end, ++ const grammar& g, ++ double& result) ++{ ++ if(!boost::spirit::qi::phrase_parse(iter, end, g, boost::spirit::ascii::space, result)) ++ { ++ return false; ++ }; ++ // we check if the full string could parsed ++ return iter==end; ++} ++ ++// version with pre-defined constants ++bool ParseExpression(const std::string& expression, double& result, const ConstantMap& constants) ++{ ++ grammar g(constants); ++ std::string::const_iterator it=expression.begin(); ++ return parse(it, expression.end(), g, result); ++}; ++ ++} // namespace +diff -r 917d117ba6b0 -r e237d6d1d873 src/tools/ParseExp.h +--- a/src/tools/ParseExp.h Sun Dec 15 18:20:14 2013 +0100 ++++ b/src/tools/ParseExp.h Sat Sep 13 11:22:39 2014 +0200 +@@ -33,8 +33,7 @@ + { + typedef std::map<const char*, double> ConstantMap; + +-bool ParseExpression(const std::string& expression, double& result); +-bool ParseExpression(const std::string& expression, double& result, const ConstantMap& constants); ++bool ParseExpression(const std::string& expression, double& result, const ConstantMap& constants=ConstantMap()); + + }; + diff --git a/media-gfx/hugin/hugin-2014.0.0-r1.ebuild b/media-gfx/hugin/hugin-2014.0.0-r1.ebuild index 284490e86230..389a999f0291 100644 --- a/media-gfx/hugin/hugin-2014.0.0-r1.ebuild +++ b/media-gfx/hugin/hugin-2014.0.0-r1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-gfx/hugin/hugin-2014.0.0-r1.ebuild,v 1.3 2014/12/20 16:36:16 maekke Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-gfx/hugin/hugin-2014.0.0-r1.ebuild,v 1.4 2015/01/02 18:36:29 maekke Exp $ EAPI=5 @@ -51,7 +51,10 @@ REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" S=${WORKDIR}/${PN}-$(get_version_component_range 1-3) -PATCHES=( "${FILESDIR}"/${P}-lensfun-0.3.0.patch ) +PATCHES=( + "${FILESDIR}"/${P}-lensfun-0.3.0.patch + "${FILESDIR}"/${P}-ParseExp.patch +) pkg_setup() { DOCS="authors.txt README TODO" diff --git a/media-gfx/hugin/hugin-2014.0.0.ebuild b/media-gfx/hugin/hugin-2014.0.0.ebuild index 527fd4ef8994..458cba2a4886 100644 --- a/media-gfx/hugin/hugin-2014.0.0.ebuild +++ b/media-gfx/hugin/hugin-2014.0.0.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-gfx/hugin/hugin-2014.0.0.ebuild,v 1.5 2014/12/22 10:09:17 pinkbyte Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-gfx/hugin/hugin-2014.0.0.ebuild,v 1.6 2015/01/02 18:36:29 maekke Exp $ EAPI=5 @@ -51,7 +51,10 @@ REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" S=${WORKDIR}/${PN}-$(get_version_component_range 1-3) -PATCHES=( "${FILESDIR}"/${P}-lensfun-0.3.0.patch ) +PATCHES=( + "${FILESDIR}"/${P}-lensfun-0.3.0.patch + "${FILESDIR}"/${P}-ParseExp.patch +) pkg_setup() { DOCS="authors.txt README TODO" |