[vxl] Apply upstream patches for ITK compatibility

mrceresa mrceresa at fedoraproject.org
Mon Mar 4 16:21:30 UTC 2013


commit 37c671ae71c622211e9c7e53a22309eb327656fd
Author: Mario Ceresa <mrceresa at gmail.com>
Date:   Mon Mar 4 17:21:07 2013 +0100

    Apply upstream patches for ITK compatibility

 0025-Legacy-def1-r35963.patch |   37 +++++++++++++++++++++++++++++++++
 0026-Legacy-def2-r36001.patch |   46 +++++++++++++++++++++++++++++++++++++++++
 vxl.spec                      |   11 +++++++++-
 3 files changed, 93 insertions(+), 1 deletions(-)
---
diff --git a/0025-Legacy-def1-r35963.patch b/0025-Legacy-def1-r35963.patch
new file mode 100644
index 0000000..c857dc0
--- /dev/null
+++ b/0025-Legacy-def1-r35963.patch
@@ -0,0 +1,37 @@
+commit 849fcbd56d9e55a59608ea1df8da82dcb5dbeb68
+Author: peter_vanroose <peter_vanroose at 4b17d0e5-ac7a-4109-a8ed-6b3c4e86a14a>
+Date:   Wed Nov 14 13:42:48 2012 +0000
+
+    added back in the vnl_math_* functions, now as #defines to their vnl_math::* counterparts in the "real" vnl_math namespace
+    
+    git-svn-id: https://svn.code.sf.net/p/vxl/svn/trunk@35963 4b17d0e5-ac7a-4109-a8ed-6b3c4e86a14a
+
+diff --git a/core/vnl/vnl_math.h b/core/vnl/vnl_math.h
+index c458dae..adb5fb4 100644
+--- a/core/vnl/vnl_math.h
++++ b/core/vnl/vnl_math.h
+@@ -659,4 +659,24 @@ namespace vnl_math
+ 
+ } // end of namespace vnl_math
+ 
++// Legacy definitions, for backward compatibility:
++#define vnl_math_isnan vnl_math::isnan
++#define vnl_math_isinf vnl_math::isinf
++#define vnl_math_isfinite vnl_math::isfinite
++#define vnl_math_rnd_halfinttoeven vnl_math::rnd_halfinttoeven
++#define vnl_math_rnd_halfintup vnl_math::rnd_halfintup
++#define vnl_math_rnd vnl_math::rnd
++#define vnl_math_floor vnl_math::floor
++#define vnl_math_ceil vnl_math::ceil
++#define vnl_math_abs vnl_math::abs
++#define vnl_math_max vnl_math::max
++#define vnl_math_min vnl_math::min
++#define vnl_math_sqr vnl_math::sqr
++#define vnl_math_cube vnl_math::cube
++#define vnl_math_sgn vnl_math::sgn
++#define vnl_math_sgn0 vnl_math::sgn0
++#define vnl_math_squared_magnitude vnl_math::squared_magnitude
++#define vnl_math_cuberoot vnl_math::cuberoot
++#define vnl_math_hypot vnl_math::hypot
++
+ #endif // vnl_math_h_
diff --git a/0026-Legacy-def2-r36001.patch b/0026-Legacy-def2-r36001.patch
new file mode 100644
index 0000000..d687ed3
--- /dev/null
+++ b/0026-Legacy-def2-r36001.patch
@@ -0,0 +1,46 @@
+commit 528908a1663fc7e38ee8d7e426cd31853039679b
+Author: peter_vanroose <peter_vanroose at 4b17d0e5-ac7a-4109-a8ed-6b3c4e86a14a>
+Date:   Fri Nov 16 12:43:57 2012 +0000
+
+    moved the backward compatibility #defines (vnl_math_floor etc. for vnl_math::floor etc.) inside #if VNL_CONFIG_LEGACY_METHODS; switching that option on will additionally trigger a "deprecated" compile warning
+    
+    git-svn-id: https://svn.code.sf.net/p/vxl/svn/trunk@36001 4b17d0e5-ac7a-4109-a8ed-6b3c4e86a14a
+
+diff --git a/core/vnl/vnl_math.h b/core/vnl/vnl_math.h
+index adb5fb4..34af06b 100644
+--- a/core/vnl/vnl_math.h
++++ b/core/vnl/vnl_math.h
+@@ -35,6 +35,7 @@
+ //   Amitha Perera - 13 Sep 2002 - make constant initialization standards compliant.
+ //   Peter Vanroose -22 Oct 2012 - was a class, now is a namespace
+ //                                 also renamed functions vnl_math_isnan etc. to vnl_math::isnan
++//   Peter Vanroose -15 Nov 2012 - the deprecated vnl_math_* #defines are now only available when VNL_CONFIG_LEGACY_METHODS==1
+ // \endverbatim
+ 
+ #include <vcl_cmath.h>
+@@ -44,6 +45,9 @@
+ #ifdef VNL_CHECK_FPU_ROUNDING_MODE
+ # include <vcl_cassert.h>
+ #endif
++#if VNL_CONFIG_LEGACY_METHODS
++# include <vcl_deprecated.h>
++#endif
+ 
+ // Figure out when the fast implementation can be used
+ #if VNL_CONFIG_ENABLE_SSE2_ROUNDING
+@@ -659,7 +663,7 @@ namespace vnl_math
+ 
+ } // end of namespace vnl_math
+ 
+-// Legacy definitions, for backward compatibility:
++#if VNL_CONFIG_LEGACY_METHODS // Legacy definitions, for backward compatibility; deprecated!
+ #define vnl_math_isnan vnl_math::isnan
+ #define vnl_math_isinf vnl_math::isinf
+ #define vnl_math_isfinite vnl_math::isfinite
+@@ -678,5 +682,6 @@ namespace vnl_math
+ #define vnl_math_squared_magnitude vnl_math::squared_magnitude
+ #define vnl_math_cuberoot vnl_math::cuberoot
+ #define vnl_math_hypot vnl_math::hypot
++#endif // VNL_CONFIG_LEGACY_METHODS
+ 
+ #endif // vnl_math_h_
diff --git a/vxl.spec b/vxl.spec
index 32506d0..f8e59f9 100644
--- a/vxl.spec
+++ b/vxl.spec
@@ -35,6 +35,9 @@ Patch21:	0021-Use-expatpp.h-which-is-provided-by-fedora-repos.patch
 Patch22:	0022-Include-missing-vcl_cstdio.h-header.patch
 Patch23:	0023-Remove-volm-because-of-error-in-function-prototype.patch
 Patch24:	0024-Added-missing-sonames-for-mvl2-and-vepl1.patch
+Patch25:	0025-Legacy-def1-r35963.patch
+Patch26:	0026-Legacy-def2-r36001.patch
+
 
 Patch100:	%{name}-1.17.0-secondary.patch
 
@@ -149,6 +152,8 @@ find contrib/brl/b3p/expatpp -type f ! -name 'CMakeLists.txt' -execdir rm {} +
 %patch22 -p1
 %patch23 -p1
 %patch24 -p1
+%patch25 -p1
+%patch26 -p1
 %patch100 -p1 -b .secondary
 
 
@@ -197,7 +202,8 @@ find . -name "*.txx" | xargs chmod ugo-x
 	-DBUILD_DOCUMENTATION:BOOL=ON \
 	-DCMAKE_BUILD_TYPE:STRING="RelWithDebInfo" \
 	-DCMAKE_CXX_FLAGS:STRING="-fpermissive" \
-	-DPYTHON_LIBRARY=/usr/lib64/libpython2.7.so .
+	-DPYTHON_LIBRARY=/usr/lib64/libpython2.7.so 
+	-DVNL_CONFIG_LEGACY_METHODS=ON .
 
 # Why is expat stated, but not shapelib?
 # DCMDK Cmake -- Included in bundle, but why?
@@ -242,6 +248,9 @@ ctest .
 
 
 %changelog
+* Mon Mar 04 2013 Mario Ceresa mrceresa fedoraproject org vxl 1.17.0-11
+- Applied upstream patches (25, 26) to ensure compatibility with ITK
+
 * Fri Feb 15 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.17.0-10
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 


More information about the scm-commits mailing list