Projects
mass
atmos
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 15
View file
atmos.spec
Changed
@@ -18,6 +18,8 @@ Source: %{name}-%{version}.tar.gz Source1: spectra.tar.gz Source2: crv.tar.gz +Patch0: atmos-r269.diff +Patch1: yalpa-copysign.diff License: GPL Group: Productivity/Scientific/Astronomy BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot @@ -35,6 +37,8 @@ %prep %setup +%patch0 +%patch1 %build CPPFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix} @@ -62,6 +66,7 @@ %changelog * Thu Dec 01 2011 - matwey.kornilov@gmail.com - version 2.97.4 +- patches for boost value_factory * Fri Mar 04 2011 - matwey.kornilov@gmail.com - version 2.97.3 * Fri Feb 04 2011 - matwey.kornilov@gmail.com
View file
atmos-r269.diff
Added
@@ -0,0 +1,43 @@ +--- configure.in (revision 259) ++++ configure.in (revision 269) +@@ -47,6 +47,7 @@ + + AC_CHECK_HEADERS(boost/math/tools/roots.hpp \ + boost/math/tools/tuple.hpp \ ++ boost/functional/value_factory.hpp \ + tr1/tuple) + + AC_CHECK_HEADERS(gsl/gsl_errno.h \ +--- src/caching_factory.h (revision 259) ++++ src/caching_factory.h (revision 269) +@@ -25,8 +25,19 @@ + + #include <map> + +-#include <boost/functional/value_factory.hpp> ++#ifdef HAVE_CONFIG_H ++# include "config.h" ++#else ++# define HAVE_BOOST_FUNCTIONAL_VALUE_FACTORY_HPP ++#endif + ++#ifdef HAVE_BOOST_FUNCTIONAL_VALUE_FACTORY_HPP ++# include <boost/functional/value_factory.hpp> ++# define DEFAULT_CREATE_FACTORY_TOKEN =boost::value_factory<T> ++#else ++# define DEFAULT_CREATE_FACTORY_TOKEN ++#endif ++ + #include <boost/preprocessor/arithmetic/inc.hpp> + #include <boost/preprocessor/repetition/enum_binary_params.hpp> + #include <boost/preprocessor/repetition/enum_params.hpp> +@@ -35,7 +46,8 @@ + namespace utils { + namespace algo { + +-template< class T, class Key, class Create = boost::value_factory<T>, class Container = std::map<Key,T> > class caching_factory { ++template< class T, class Key, class Create DEFAULT_CREATE_FACTORY_TOKEN, class Container = std::map<Key,T> > class caching_factory { ++#undef DEFAULT_CREATE_FACTORY_TOKEN + public: + typedef T value_type; + typedef Key key_type;
View file
yalpa-copysign.diff
Added
@@ -0,0 +1,96 @@ +--- third-party/yalpa/test/io.cpp (revision 0) ++++ third-party/yalpa/test/io.cpp (revision 16) +@@ -0,0 +1,21 @@ ++#include <iostream> ++#include <sstream> ++#include <string> ++ ++#include <yalpa/io.h> ++#include <yalpa/spheric.h> ++ ++int main( int argc, char** argv ){ ++ using namespace yalpa; ++ ++ double ra; ++ ++ std::string str1="-00 02 03"; ++ std::istringstream stm1(str1); ++ ++ stm1 >> std::hours >> std::sexagesimal >> yalpa::make_angle(ra); ++ std::cout << ra << std::endl; ++ std::cout << std::degrees << std::sexagesimal << yalpa::make_angle(ra) << std::endl; ++ ++ return 0; ++} +--- third-party/yalpa/test/Makefile.am (revision 14) ++++ third-party/yalpa/test/Makefile.am (revision 16) +@@ -1,4 +1,4 @@ +-bin_PROGRAMS = convert julian sun ++bin_PROGRAMS = convert julian sun io + convert_SOURCES = convert.cpp + convert_CPPFLAGS = -I @abs_top_srcdir@/include + convert_LDADD = @abs_top_builddir@/src/libyalpa.la +@@ -8,3 +8,6 @@ + sun_SOURCES = sun.cpp + sun_CPPFLAGS = -I @abs_top_srcdir@/include + sun_LDADD = @abs_top_builddir@/src/libyalpa.la ++io_SOURCES = io.cpp ++io_CPPFLAGS = -I @abs_top_srcdir@/include ++io_LDADD = @abs_top_builddir@/src/libyalpa.la +--- third-party/yalpa/include/yalpa/io.h (revision 14) ++++ third-party/yalpa/include/yalpa/io.h (revision 16) +@@ -23,6 +23,8 @@ + #include <iosfwd> + #include <iostream> + ++#include <boost/math/special_functions/sign.hpp> ++ + namespace yalpa { + + template<class T> struct angle { +@@ -81,14 +83,16 @@ + if( is_degrees(stm) ){ + T degree = val()/M_PI*180; + if( is_sexagesimal(stm) ) { +- stm << int(degree) << stm.fill() << int(std::abs(60*std::fmod(degree,1.0))) << stm.fill() << std::abs((3600*std::fmod(degree,1.0/60.0))); ++ if( val() < 0 ) { stm << "-"; } ++ stm << int(std::abs(degree)) << stm.fill() << int(std::abs(60*std::fmod(degree,1.0))) << stm.fill() << std::abs((3600*std::fmod(degree,1.0/60.0))); + } else { + stm << degree; + } + }else if( is_hours(stm) ){ + T hour = val()/M_PI*12; + if( is_sexagesimal(stm) ) { +- stm << int(hour) << stm.fill() << int(std::abs(60*std::fmod(hour,1.0))) << stm.fill() << std::abs((3600*std::fmod(hour,1.0/60.0))); ++ if( val() < 0 ) { stm << "-"; } ++ stm << int(std::abs(hour)) << stm.fill() << int(std::abs(60*std::fmod(hour,1.0))) << stm.fill() << std::abs((3600*std::fmod(hour,1.0/60.0))); + } else { + stm << hour; + } +@@ -99,6 +103,8 @@ + return stm; + } + template<class T> std::istream& operator>>( std::istream& stm, yalpa::angle<T> val ) { ++ using boost::math::copysign; ++ + std::istream::sentry se(stm); + if( se ){ + if( is_degrees(stm) ){ +@@ -106,7 +112,7 @@ + if( is_sexagesimal(stm) ) { + T deg,min,sec; + stm >> deg >> min >> sec; +- val() = ( deg < 0 ? -1 : 1 ) * ( std::abs(deg) + min/60.0 + sec/3600.0 ) / 180.0 * M_PI; ++ val() = copysign( ( std::abs(deg) + min/60.0 + sec/3600.0 ) / 180.0 * M_PI, deg ); + } else { + stm >> degree; + val() = degree / 180.0 * M_PI; +@@ -116,7 +122,7 @@ + if( is_sexagesimal(stm) ) { + T hour,min,sec; + stm >> hour >> min >> sec; +- val() = ( hour < 0 ? -1 : 1 ) * ( std::abs(hour) + min/60.0 + sec/3600.0 ) / 12.0 * M_PI; ++ val() = copysign( ( std::abs(hour) + min/60.0 + sec/3600.0 ) / 12.0 * M_PI, hour ); + } else { + stm >> hour; + val() = hour / 12.0 * M_PI;
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.