Projects
Multimedia
synfig
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 17
View file
synfig.spec
Changed
@@ -40,6 +40,8 @@ Patch0: synfig-1.0.2_debug.patch # PATCH-FIX-UPSTREAM c++11.patch onlyjob@member.fsf.org [gh#synfig/synfig/#219] -- Fix906 c++11 support Patch1: synfig-1.0.2_c++11.patch +Patch2: synfig-math_h.patch +Patch3: synfig-isnan.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: boost-devel >= 1.53.0 @@ -145,6 +147,8 @@ %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 +%patch3 -p1 # Don't compile in DATE and TIME BUILDDATE=$(LC_ALL=C date -ur %{_sourcedir}/%{name}.changes +'%b %d %Y')
View file
synfig-isnan.patch
Added
@@ -0,0 +1,422 @@ +--- a/src/synfig/vector.h ++++ b/src/synfig/vector.h +@@ -34,29 +34,6 @@ + + /* === M A C R O S ========================================================= */ + +-// For some reason isnan() isn't working on macosx any more. +-// This is a quick fix. +-#if defined(__APPLE__) && !defined(SYNFIG_ISNAN_FIX) +-#ifdef isnan +-#undef isnan +-#endif +-inline bool isnan(double x) { return x != x; } +-inline bool isnan(float x) { return x != x; } +-#define SYNFIG_ISNAN_FIX 1 +-#ifdef isinf +-#undef isinf +-#endif +-inline bool isinf(double x) { return !isnan(x) && isnan(x - x); } +-inline bool isinf(float x) { return !isnan(x) && isnan(x - x); } +-#define SYNFIG_ISINF_FIX 1 +-#else +-#ifndef isnan +-#define isnan(x) (std::isnan)(x) +-#endif +-#ifndef isinf +-#define isinf(x) (std::isinf)(x) +-#endif +-#endif + + + /* === T Y P E D E F S ===================================================== */ +@@ -84,8 +61,8 @@ public: + _y(radius*Angle::sin(angle).get()) + { }; + +- bool is_valid()const { return !(isnan(_x) || isnan(_y)); } +- bool is_nan_or_inf()const { return isnan(_x) || isnan(_y) || isinf(_x) || isinf(_y); } ++ bool is_valid()const { return !(std::isnan(_x) || std::isnan(_y)); } ++ bool is_nan_or_inf()const { return std::isnan(_x) || std::isnan(_y) || std::isinf(_x) || std::isinf(_y); } + + value_type & + operator[](const int& i) +--- a/src/modules/lyr_std/curvewarp.cpp ++++ b/src/modules/lyr_std/curvewarp.cpp +@@ -567,7 +567,7 @@ CurveWarp::accelerated_render(Context co + tmp=transform(pos); + u=(tmp[0]-src_tl[0])/src_pw; + v=(tmp[1]-src_tl[1])/src_ph; +- if(u<0 || v<0 || u>=src_w || v>=src_h || isnan(u) || isnan(v)) ++ if(u<0 || v<0 || u>=src_w || v>=src_h || std::isnan(u) || std::isnan(v)) + (*surface)[y][x]=context.get_color(tmp); + else + (*surface)[y][x]=source.cubic_sample(u,v); +@@ -582,7 +582,7 @@ CurveWarp::accelerated_render(Context co + tmp=transform(pos); + u=(tmp[0]-src_tl[0])/src_pw; + v=(tmp[1]-src_tl[1])/src_ph; +- if(u<0 || v<0 || u>=src_w || v>=src_h || isnan(u) || isnan(v)) ++ if(u<0 || v<0 || u>=src_w || v>=src_h || std::isnan(u) || std::isnan(v)) + (*surface)[y][x]=context.get_color(tmp); + else + (*surface)[y][x]=source.linear_sample(u,v); +@@ -597,7 +597,7 @@ CurveWarp::accelerated_render(Context co + tmp=transform(pos); + u=(tmp[0]-src_tl[0])/src_pw; + v=(tmp[1]-src_tl[1])/src_ph; +- if(u<0 || v<0 || u>=src_w || v>=src_h || isnan(u) || isnan(v)) ++ if(u<0 || v<0 || u>=src_w || v>=src_h || std::isnan(u) || std::isnan(v)) + (*surface)[y][x]=context.get_color(tmp); + else + (*surface)[y][x]=source[floor_to_int(v)][floor_to_int(u)]; +@@ -770,7 +770,7 @@ if (along > max_along) max_along = along + tmp=transform(pos); + u=(tmp[0]-src_tl[0])/src_pw; + v=(tmp[1]-src_tl[1])/src_ph; +- if(u<0 || v<0 || u>=src_w || v>=src_h || isnan(u) || isnan(v)) ++ if(u<0 || v<0 || u>=src_w || v>=src_h || std::isnan(u) || std::isnan(v)) + result[y][x]=CairoColor(context.get_color(tmp)).premult_alpha(); + else + result[y][x]=source.cubic_sample_cooked(u,v); +@@ -785,7 +785,7 @@ if (along > max_along) max_along = along + tmp=transform(pos); + u=(tmp[0]-src_tl[0])/src_pw; + v=(tmp[1]-src_tl[1])/src_ph; +- if(u<0 || v<0 || u>=src_w || v>=src_h || isnan(u) || isnan(v)) ++ if(u<0 || v<0 || u>=src_w || v>=src_h || std::isnan(u) || std::isnan(v)) + result[y][x]=CairoColor(context.get_color(tmp)).premult_alpha(); + else + result[y][x]=source.linear_sample_cooked(u,v); +@@ -800,7 +800,7 @@ if (along > max_along) max_along = along + tmp=transform(pos); + u=(tmp[0]-src_tl[0])/src_pw; + v=(tmp[1]-src_tl[1])/src_ph; +- if(u<0 || v<0 || u>=src_w || v>=src_h || isnan(u) || isnan(v)) ++ if(u<0 || v<0 || u>=src_w || v>=src_h || std::isnan(u) || std::isnan(v)) + result[y][x]=CairoColor(context.get_color(tmp)).premult_alpha(); + else + result[y][x]=source[floor_to_int(v)][floor_to_int(u)]; +--- a/src/modules/lyr_std/insideout.cpp ++++ b/src/modules/lyr_std/insideout.cpp +@@ -127,7 +127,7 @@ public: + Point origin=layer->param_origin.get(Point()); + Point pos(x-origin); + Real inv_mag=pos.inv_mag(); +- if(!isnan(inv_mag)) ++ if(!std::isnan(inv_mag)) + return (pos*(inv_mag*inv_mag)+origin); + return x; + } +@@ -137,7 +137,7 @@ public: + Point origin=layer->param_origin.get(Point()); + Point pos(x-origin); + Real inv_mag=pos.inv_mag(); +- if(!isnan(inv_mag)) ++ if(!std::isnan(inv_mag)) + return (pos*(inv_mag*inv_mag)+origin); + return x; + } +--- a/src/modules/lyr_std/warp.cpp ++++ b/src/modules/lyr_std/warp.cpp +@@ -742,7 +742,7 @@ Warp::accelerated_render(Context context + u=(tmp[0]-tl[0])*src_pw; + v=(tmp[1]-tl[1])*src_ph; + +- if(u<0 || v<0 || u>=source.get_w() || v>=source.get_h() || isnan(u) || isnan(v)) ++ if(u<0 || v<0 || u>=source.get_w() || v>=source.get_h() || std::isnan(u) || std::isnan(v)) + (*surface)[y][x]=context.get_color(tmp); + else + (*surface)[y][x]=source.cubic_sample(u,v); +@@ -776,7 +776,7 @@ Warp::accelerated_render(Context context + u=(tmp[0]-tl[0])*src_pw; + v=(tmp[1]-tl[1])*src_ph; + +- if(u<0 || v<0 || u>=source.get_w() || v>=source.get_h() || isnan(u) || isnan(v)) ++ if(u<0 || v<0 || u>=source.get_w() || v>=source.get_h() || std::isnan(u) || std::isnan(v)) + (*surface)[y][x]=context.get_color(tmp); + else + (*surface)[y][x]=source.linear_sample(u,v); +@@ -809,7 +809,7 @@ Warp::accelerated_render(Context context + u=(tmp[0]-tl[0])*src_pw; + v=(tmp[1]-tl[1])*src_ph; + +- if(u<0 || v<0 || u>=source.get_w() || v>=source.get_h() || isnan(u) || isnan(v)) ++ if(u<0 || v<0 || u>=source.get_w() || v>=source.get_h() || std::isnan(u) || std::isnan(v)) + (*surface)[y][x]=context.get_color(tmp); + else + //pen.set_value(source[v][u]); +@@ -1094,7 +1094,7 @@ Warp::accelerated_cairorender(Context co + u=(tmp[0]-tl[0])*src_pw; + v=(tmp[1]-tl[1])*src_ph; + +- if(u<0 || v<0 || u>=sourcew || v>=sourceh || isnan(u) || isnan(v)) ++ if(u<0 || v<0 || u>=sourcew || v>=sourceh || std::isnan(u) || std::isnan(v)) + csurface[y][x]=context.get_cairocolor(tmp); + else + { +--- a/src/modules/mod_filter/colorcorrect.cpp ++++ b/src/modules/mod_filter/colorcorrect.cpp +@@ -117,9 +117,9 @@ Layer_ColorCorrect::correct_color(const + } + } + +- assert(!isnan(ret.get_r())); +- assert(!isnan(ret.get_g())); +- assert(!isnan(ret.get_b())); ++ assert(!std::isnan(ret.get_r())); ++ assert(!std::isnan(ret.get_g())); ++ assert(!std::isnan(ret.get_b())); + + if(exposure!=0.0) + { +--- a/src/modules/mod_particle/plant.cpp ++++ b/src/modules/mod_particle/plant.cpp +@@ -280,7 +280,7 @@ Plant::sync()const + if((((i+1)*sprouts + steps/2) / steps) > branch_count) { + Vector branch_velocity(deriv(f).norm()*velocity + deriv(f).perp().norm()*perp_velocity); + +- if (isnan(branch_velocity[0]) || isnan(branch_velocity[1])) ++ if (std::isnan(branch_velocity[0]) || std::isnan(branch_velocity[1])) + continue; + + branch_velocity[0] += random_factor * random(Random::SMOOTH_COSINE, 1, f*splits, 0.0f, 0.0f); +@@ -595,7 +595,7 @@ Plant::draw_particles(Surface *dest_surf + const Real pw = (br[0] - tl[0]) / w; + const Real ph = (br[1] - tl[1]) / h; + +- if (isinf(pw) || isinf(ph)) ++ if (std::isinf(pw) || std::isinf(ph)) + return; + + if (particle_list.begin() != particle_list.end()) +--- a/src/synfig/color/cairocoloraccumulator.h ++++ b/src/synfig/color/cairocoloraccumulator.h +@@ -113,7 +113,7 @@ public: + { return CairoColorAccumulator(-r_,-g_,-b_,-a_); } + + bool is_valid()const +- { return !isnan(r_) && !isnan(g_) && !isnan(b_) && !isnan(a_); }
View file
synfig-math_h.patch
Added
@@ -0,0 +1,32 @@ +--- a/src/synfig/matrix.h ++++ b/src/synfig/matrix.h +@@ -32,7 +32,7 @@ + #include "vector.h" + #include "string.h" + #include <cassert> +-#include <math.h> ++#include <cmath> + #include <iostream> + #include <ETL/stringf> + +--- a/src/synfig/time.cpp ++++ b/src/synfig/time.cpp +@@ -41,7 +41,6 @@ + #include <algorithm> + #include <cstdio> + #include <ctype.h> +-#include <math.h> + + + // For some reason isnan() isn't working on macosx any more. +--- a/src/synfig/widthpoint.cpp ++++ b/src/synfig/widthpoint.cpp +@@ -30,7 +30,7 @@ + # include <config.h> + #endif + +-#include <math.h> ++#include <cmath> + #include "widthpoint.h" + + #endif
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
.