[meshlab] Added patch to fix reading of .ply files in comma separator locales. Added patch for FTBFS due to mi

Eric Smith brouhaha at fedoraproject.org
Thu Aug 4 03:27:19 UTC 2011


commit 47ff6fc27ea5653648cb0a6202299f034ff580dc
Author: Eric Smith <eric at brouhaha.com>
Date:   Wed Aug 3 21:26:28 2011 -0600

    Added patch to fix reading of .ply files in comma separator locales.
    Added patch for FTBFS due to missing include.

 meshlab-1.3.0a-cstddef.patch     |   45 ++++++++++++++++++++++++++++++++++++++
 meshlab-1.3.0a-ply-numeric.patch |   28 +++++++++++++++++++++++
 meshlab.spec                     |   17 ++++++++++++-
 3 files changed, 88 insertions(+), 2 deletions(-)
---
diff --git a/meshlab-1.3.0a-cstddef.patch b/meshlab-1.3.0a-cstddef.patch
new file mode 100644
index 0000000..8b5fc1f
--- /dev/null
+++ b/meshlab-1.3.0a-cstddef.patch
@@ -0,0 +1,45 @@
+From: Teemu Ikonen <tpikonen at gmail.com>
+Subject: Include <cstddef> on files using offsetoff (closes: #625053)
+X-git-branch: p/cstddef
+
+ vcglib/wrap/io_tetramesh/import_ply.h |    1 +
+ vcglib/wrap/io_trimesh/import_ply.h   |    1 +
+ vcglib/wrap/ply/plystuff.h            |    1 +
+ 3 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/vcglib/wrap/io_tetramesh/import_ply.h b/vcglib/wrap/io_tetramesh/import_ply.h
+index 0da4c1f..8370e48 100644
+--- a/vcglib/wrap/io_tetramesh/import_ply.h
++++ b/vcglib/wrap/io_tetramesh/import_ply.h
+@@ -36,6 +36,7 @@ created
+ #include<wrap/ply/io_mask.h>
+ #include<wrap/io_tetramesh/io_ply.h>
+ #include<vcg/complex/tetramesh/allocate.h>
++#include <cstddef>
+ 
+ 
+ 
+diff --git a/vcglib/wrap/io_trimesh/import_ply.h b/vcglib/wrap/io_trimesh/import_ply.h
+index 249a417..0e8c4dc 100644
+--- a/vcglib/wrap/io_trimesh/import_ply.h
++++ b/vcglib/wrap/io_trimesh/import_ply.h
+@@ -157,6 +157,7 @@ Initial commit
+ #include<vcg/complex/trimesh/create/platonic.h>
+ #include<vcg/space/color4.h>
+ #include <vector>
++#include <cstddef>
+ 
+ namespace vcg {
+ namespace tri {
+diff --git a/vcglib/wrap/ply/plystuff.h b/vcglib/wrap/ply/plystuff.h
+index 3e41e63..4761e9f 100644
+--- a/vcglib/wrap/ply/plystuff.h
++++ b/vcglib/wrap/ply/plystuff.h
+@@ -57,6 +57,7 @@ Cleaning of the automatic bbox caching support for ply files. First working vers
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h> 
++#include <cstddef>
+ #ifdef WIN32
+ #include <io.h>
+ #endif
diff --git a/meshlab-1.3.0a-ply-numeric.patch b/meshlab-1.3.0a-ply-numeric.patch
new file mode 100644
index 0000000..d9060ac
--- /dev/null
+++ b/meshlab-1.3.0a-ply-numeric.patch
@@ -0,0 +1,28 @@
+From: Teemu Ikonen <tpikonen at gmail.com>
+Subject: Fix reading of .ply files in locales in comma separator locales
+X-git-branch: p/ply_numeric
+
+ meshlab/src/meshlab/main.cpp |    4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/meshlab/src/meshlab/main.cpp b/meshlab/src/meshlab/main.cpp
+index 6a74830..1fd1c18 100644
+--- a/meshlab/src/meshlab/main.cpp
++++ b/meshlab/src/meshlab/main.cpp
+@@ -25,12 +25,16 @@
+ #include <QMessageBox>
+ #include "mainwindow.h"
+ 
++using namespace std;
++
+ int main(int argc, char *argv[])
+ {
+   QApplication app(argc, argv);
+   QLocale::setDefault(QLocale::C);
+   QCoreApplication::setOrganizationName("VCG");
+   QCoreApplication::setApplicationName("MeshLab");
++
++  std::setlocale(LC_NUMERIC, "C");
+ 	
+ 		if(argc>1)	
+ 		{
diff --git a/meshlab.spec b/meshlab.spec
index ffa5f37..aebc5b3 100644
--- a/meshlab.spec
+++ b/meshlab.spec
@@ -1,6 +1,6 @@
 Summary:	A system for processing and editing unstructured 3D triangular meshes
 Name:		meshlab
-Version:	1.3.0
+Version:	1.3.0a
 Release:	1%{?dist}
 URL:		http://meshlab.sourceforge.net/`
 
@@ -17,6 +17,14 @@ Patch0:		meshlab-1.3.0a-sharedlib.patch
 Patch1:		meshlab-plugin-path.patch
 Patch2:		meshlab-1.3.0a-shader-path.patch
 
+# Patch to fix FTBFS due to missing include
+# from Teemu Ikonen <tpikonen at gmail.com>
+Patch3:		meshlab-1.3.0a-cstddef.patch
+
+# Patch to fix reading of .ply files in comma separator locales
+# from Teemu Ikonen <tpikonen at gmail.com>
+Patch4:		meshlab-1.3.0a-ply-numeric.patch
+
 License:	GPLv2+ and BSD
 Group:		Applications/Multimedia
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -50,6 +58,8 @@ rm -rf meshlab-snapshot-svn3524
 %patch -P 0 -p1 -b .sharedlib
 %patch -P 1 -p1 -b .plugin-path
 %patch -P 2 -p1 -b .shader-path
+%patch -P 3 -p1 -b .ply-numeric
+%patch -P 4 -p1 -b .cstddef
 
 # Turn of execute permissions on source files to avoid rpmlint
 # errors and warnings for the debuginfo package
@@ -173,8 +183,11 @@ rm -rf %{buildroot}
 %{_datadir}/pixmaps/meshlab.png
 
 %changelog
-* Wed Aug 03 2011 Eric Smith <eric at brouhaha.com> - 1.3.0-1
+* Wed Aug 03 2011 Eric Smith <eric at brouhaha.com> - 1.3.0a-1
 - update to latest upstream release
+- added patch from Teemu Ikonen to fix FTBFS
+- added patch from Teemu Ikonen to fix reading of .ply files in comma
+  separator locales
 
 * Tue Oct 05 2010 jkeating - 1.2.2-5.1
 - Rebuilt for gcc bug 634757


More information about the scm-commits mailing list