[ETL] gcc47 patch.

Jon Ciesla limb at fedoraproject.org
Thu Mar 22 12:21:03 UTC 2012


commit d292d0633b822a04c18025315438094ab2a1a8d9
Author: Jon Ciesla <limburgher at gmail.com>
Date:   Thu Mar 22 07:20:30 2012 -0500

    gcc47 patch.

 ETL-0.04.14-gcc47.patch |   69 +++++++++++++++++++++++++++++++++++++++++++++++
 ETL.spec                |    9 +++++-
 2 files changed, 76 insertions(+), 2 deletions(-)
---
diff --git a/ETL-0.04.14-gcc47.patch b/ETL-0.04.14-gcc47.patch
new file mode 100644
index 0000000..60b92fe
--- /dev/null
+++ b/ETL-0.04.14-gcc47.patch
@@ -0,0 +1,69 @@
+--- ETL/_bezier.h~	2011-07-15 11:44:58.000000000 -0500
++++ ETL/_bezier.h	2012-03-21 14:35:38.829376849 -0500
+@@ -579,15 +579,15 @@
+ 		const time_type inc((s-r)/steps);
+ 		if (!inc) return 0;
+ 		distance_type ret(0);
+-		value_type last(operator()(r));
++		value_type last(this->operator()(r));
+ 
+ 		for(r+=inc;r<s;r+=inc)
+ 		{
+-			const value_type n(operator()(r));
++			const value_type n(this->operator()(r));
+ 			ret+=dist.uncook(dist(last,n));
+ 			last=n;
+ 		}
+-		ret+=dist.uncook(dist(last,operator()(r)))*(s-(r-inc))/inc;
++		ret+=dist.uncook(dist(last,this->operator()(r)))*(s-(r-inc))/inc;
+ 
+ 		return ret;
+ 	}
+--- ETL/_curve_func.h~	2011-07-15 11:44:58.000000000 -0500
++++ ETL/_curve_func.h	2012-03-21 14:44:49.847408403 -0500
+@@ -30,6 +30,7 @@
+ /* === H E A D E R S ======================================================= */
+ 
+ #include <functional>
++#include <math.h>
+ 
+ /* -- C L A S S E S --------------------------------------------------------- */
+ 
+--- ETL/_bezier.h~	2012-03-21 14:45:24.000000000 -0500
++++ ETL/_bezier.h	2012-03-21 14:58:03.935339058 -0500
+@@ -623,16 +623,16 @@
+ 		rt[3] = d;
+ 
+ 		//2nd stage calc
+-		lt[1] = affine_func(a,b,t);
+-		temp = affine_func(b,c,t);
+-		rt[2] = affine_func(c,d,t);
++		lt[1] = this->affine_func(a,b,t);
++		temp = this->affine_func(b,c,t);
++		rt[2] = this->affine_func(c,d,t);
+ 
+ 		//3rd stage calc
+-		lt[2] = affine_func(lt[1],temp,t);
+-		rt[1] = affine_func(temp,rt[2],t);
++		lt[2] = this->affine_func(lt[1],temp,t);
++		rt[1] = this->affine_func(temp,rt[2],t);
+ 
+ 		//last stage calc
+-		lt[3] = rt[0] = affine_func(lt[2],rt[1],t);
++		lt[3] = rt[0] = this->affine_func(lt[2],rt[1],t);
+ 
+ 		//set the time range for l,r (the inside values should be 1, 0 respectively)
+ 		lt.set_r(get_r());
+--- ETL/_bezier.h~	2012-03-21 14:58:27.000000000 -0500
++++ ETL/_bezier.h	2012-03-21 15:15:23.366439235 -0500
+@@ -563,8 +563,8 @@
+ 			for(;i;i--)
+ 			{
+ 				// compare 33% of the way between r and s with 67% of the way between r and s
+-				if(dist(operator()((s-r)*(1.0/3.0)+r), x) <
+-				   dist(operator()((s-r)*(2.0/3.0)+r), x))
++				if(dist(this->operator()((s-r)*(1.0/3.0)+r), x) <
++				   dist(this->operator()((s-r)*(2.0/3.0)+r), x))
+ 					s=t;
+ 				else
+ 					r=t;
diff --git a/ETL.spec b/ETL.spec
index 170f2aa..642cc01 100644
--- a/ETL.spec
+++ b/ETL.spec
@@ -2,7 +2,7 @@
 
 Name:           ETL
 Version:        0.04.14
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Extended Template Library
 
 Group:          Development/Libraries
@@ -11,6 +11,7 @@ URL:            http://synfig.org
 Source0:        http://downloads.sourceforge.net/synfig/ETL-%{version}.tar.gz
 Patch0:         ETL-0.04.13-gcc47.patch
 Patch1:		ETL-0.04.14-disable-tests.patch
+Patch2:		ETL-0.04.14-gcc47.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Buildrequires:  doxygen
 Buildrequires:  autoconf automake
@@ -35,6 +36,7 @@ developing applications that use %{name}.
 %setup -q
 %patch0 -p1
 %patch1 -p0
+%patch2 -p0
 
 %build
 #pushd test
@@ -68,7 +70,10 @@ make check
 
 
 %changelog
-* Thu Feb 16 2012 Jon Ciesla <limburgher at gmail.com> - 0.04.14-1
+* Wed Mar 21 2012 Jon Ciesla <limburgher at gmail.com> - 0.04.14-3
+- Patch for gcc47 builds against ETL.
+
+* Thu Feb 16 2012 Jon Ciesla <limburgher at gmail.com> - 0.04.14-2
 - New upstream to support new synfig, BZ 790249.
 - Disable spline an value tests, per upstream comments.
 


More information about the scm-commits mailing list