[3Depict] * Patch to fix FTBFS due to tighter gcc syntax requirements (narrowing). * Fixes for some gcc 4.7 de
mycae
mycae at fedoraproject.org
Sun Jan 15 20:28:16 UTC 2012
commit 3a37b3c6e46f70d87438f8840c577165d3b69c54
Author: D Haley <nospammycae at yahoo.com>
Date: Sun Dec 18 21:24:43 2011 +0000
* Patch to fix FTBFS due to tighter gcc syntax requirements (narrowing).
* Fixes for some gcc 4.7 detected bugs
3Depict-0.0.9-gcc-4.7.patch | 110 +++++++++++++++++++++++++++++++++++++++++++
3Depict.spec | 7 ++-
2 files changed, 116 insertions(+), 1 deletions(-)
---
diff --git a/3Depict-0.0.9-gcc-4.7.patch b/3Depict-0.0.9-gcc-4.7.patch
new file mode 100644
index 0000000..de3d034
--- /dev/null
+++ b/3Depict-0.0.9-gcc-4.7.patch
@@ -0,0 +1,110 @@
+diff -r 6b379ae667ab src/basics.cpp
+--- src/basics.cpp Sun Dec 18 21:00:25 2011 +0000
++++ src/basics.cpp Sun Dec 18 21:00:47 2011 +0000
+@@ -719,15 +719,12 @@
+ #else
+ const unsigned int NUM_FUZZY_ENTRIES=16;
+ #endif
+- //Sorted sequence of fuzzy times, from biggest to smallest
++ //Sorted sequence of fuzzy, approximate times, from biggest to smallest
+ const time_t TIMESTOPS[] = {
+-#ifndef WIN32
+- (100*365.25*24*60*60), //One century
+-#endif
+- (10*365.25*24*60*60), //One decade
+- (365.25*24*60*60), // One year
+- (365.25/12.0*24*60*60), // One month
+- (7.0*24*60*60), //One week
++ (10*36525*24*6*6), //One decade (factor of 100 taken to prevent invalid C++11 narrowing double)
++ (36525*24*6*6), // One year
++ (36525/12*24*6*6), // One month (factor of 100 taken from minutes and hrs to prevent invalid C++11 narrowing double code)
++ (7*24*60*60), //One week
+ (24*60*60), //One day
+ (60*60), //One hour
+ (45*60),// 45 minutes
+@@ -744,9 +741,6 @@
+
+ //Do these have a meaningful plural?
+ bool HAVE_PLURALS[] = {
+-#ifndef WIN32
+- true,//Century
+-#endif
+ true, //decade
+ true, //year
+ true, //month
+@@ -767,9 +761,6 @@
+
+ //Singular version
+ const char *SINGLE_FUZZY_STRING[] = {
+-#ifndef WIN32
+- NTRANS("a century ago"),
+-#endif
+ NTRANS("a decade ago"),
+ NTRANS("a year ago"),
+ NTRANS("a month ago"),
+diff -r 6b379ae667ab src/effect.h
+--- src/effect.h Sun Dec 18 21:00:25 2011 +0000
++++ src/effect.h Sun Dec 18 21:00:47 2011 +0000
+@@ -70,6 +70,8 @@
+ static BoundCube bc;
+ unsigned int effectType;
+ public:
++ Effect(){};
++ virtual ~Effect() {};
+ virtual void enable(unsigned int pass=0) const =0;
+ virtual void disable() const=0;
+ std::string getName() const;
+@@ -112,7 +114,7 @@
+ void doClip(const Point3D &origin, const Point3D & normal,unsigned int glOffset) const;
+ public:
+ BoxCropEffect(){useCamCoordinates=false;effectType=EFFECT_BOX_CROP;openGLIdStart=0; }
+- ~BoxCropEffect(){};
++ virtual ~BoxCropEffect(){};
+
+ //!Enable the clipping plane. Values *must* be set before calling
+ void enable(unsigned int pass) const;
+diff -r 6b379ae667ab src/glPane.cpp
+--- src/glPane.cpp Sun Dec 18 21:00:25 2011 +0000
++++ src/glPane.cpp Sun Dec 18 21:00:47 2011 +0000
+@@ -517,7 +517,6 @@
+ {
+ if(currentScene.haveTempCam())
+ {
+- wxPoint draggingCurrent = event.GetPosition();
+ currentScene.commitTempCam();
+ dragging=false;
+ }
+diff -r 6b379ae667ab src/mathglPane.cpp
+--- src/mathglPane.cpp Sun Dec 18 21:00:25 2011 +0000
++++ src/mathglPane.cpp Sun Dec 18 21:00:47 2011 +0000
+@@ -807,7 +807,6 @@
+ {
+ if(mouseDragMode == MOUSE_MODE_DRAG_PAN)
+ {
+- wxPoint draggingEnd = event.GetPosition();
+ mouseDragMode=MOUSE_MODE_ENUM_END;
+ //Repaint
+ Refresh();
+diff -r 6b379ae667ab src/plot.h
+--- src/plot.h Sun Dec 18 21:00:25 2011 +0000
++++ src/plot.h Sun Dec 18 21:00:47 2011 +0000
+@@ -122,6 +122,8 @@
+ class PlotBase
+ {
+ public:
++ PlotBase(){};
++ virtual ~PlotBase(){};
+ //The type of plot (ie what class is it?)
+ unsigned int plotType;
+
+diff -r 6b379ae667ab src/xmlHelper.h
+--- src/xmlHelper.h Sun Dec 18 21:00:25 2011 +0000
++++ src/xmlHelper.h Sun Dec 18 21:00:47 2011 +0000
+@@ -27,6 +27,7 @@
+ #include <string>
+ using std::string;
+
++#include "basics.h"
+
+ //These functions return nonzero on failure,
+ //zero on success
diff --git a/3Depict.spec b/3Depict.spec
index 0e402b2..813183d 100644
--- a/3Depict.spec
+++ b/3Depict.spec
@@ -1,6 +1,6 @@
Name: 3Depict
Version: 0.0.9
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Valued 3D point cloud visualization and analysis
Group: Applications/Engineering
@@ -39,6 +39,7 @@ Patch1: %{name}-0.0.9-font-path.patch
#Patch for libpng 1.4.0 removing png_set_gray_1_2_4_to_8
#libpng.sourceforge.net/ANNOUNCE-1.4.0.txt
Patch2: %{name}-0.0.9-png-gray.patch
+Patch3: %{name}-0.0.9-gcc-4.7.patch
%description
This program is designed to help users visualize and analyze 3D point clouds
with an associated real value, in a fast and flexible fashion. It is
@@ -52,6 +53,7 @@ useful for general scalar valued point data purposes.
%patch0
%patch1
%patch2
+%patch3
#Fix permissions erorrs in tarball
chmod a-x src/*.cpp src/*.h
@@ -124,6 +126,9 @@ rm -rf %{buildroot}
%changelog
+* Thu Jan 12 2012 D Haley <mycae(a!t)yahoo.com> - 0.0.9-3
+- Patch to fix FTFBS for gcc 4.7
+
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.0.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
More information about the scm-commits
mailing list