[SCM] FreeCAD packaging branch, master, updated. debian/0.11.3729.dfsg-1-22-g9d853e3

Anton Gladky gladky.anton at gmail.com
Wed Jun 8 17:35:22 UTC 2011


The following commit has been merged in the master branch:
commit 97460637770b0839c9c728dee3af6ef196e9d2f4
Author: Anton Gladky <gladky.anton at gmail.com>
Date:   Wed Jun 8 18:42:36 2011 +0200

    Import patch to fix compilation error with GCC-4.6

diff --git a/debian/patches/fix_compilation_with_gcc-4.6.patch b/debian/patches/fix_compilation_with_gcc-4.6.patch
new file mode 100644
index 0000000..ca8ea38
--- /dev/null
+++ b/debian/patches/fix_compilation_with_gcc-4.6.patch
@@ -0,0 +1,69 @@
+Description: fix compilation with GCC-4.6
+Author: Werner Mayer <wmayer at users.sourceforge.net>
+Applied-Upstream: http://free-cad.svn.sourceforge.net/viewvc/free-cad/trunk/?view=log&pathrev=4465
+Last-Update: 2011-06-08
+
+--- a/src/Gui/Application.cpp
++++ b/src/Gui/Application.cpp
+@@ -1317,15 +1317,20 @@
+     Base::Console().Error( errmsg.getString() );
+ }
+ #endif
++// To fix bug #0000345 move Q_INIT_RESOURCE() outside initApplication()
++static void init_resources()
++{
++    // init resources
++    Q_INIT_RESOURCE(resource);
++    Q_INIT_RESOURCE(translation);
++}
+ 
+ void Application::initApplication(void)
+ {
+     try {
+         initTypes();
+         new Base::ScriptProducer( "FreeCADGuiInit", FreeCADGuiInit );
+-        // add resources
+-        Q_INIT_RESOURCE(resource);
+-        Q_INIT_RESOURCE(translation);
++        init_resources();
+         old_qtmsg_handler = qInstallMsgHandler(messageHandler);
+     }
+     catch (...) {
+--- a/src/Gui/MDIView.cpp
++++ b/src/Gui/MDIView.cpp
+@@ -206,6 +206,10 @@
+             }   break;
+     }
+ }
++#if defined(Q_WS_X11)
++// To fix bug #0000345 move function declaration to here
++extern void qt_x11_wait_for_window_manager( QWidget* w ); // defined in qwidget_x11.cpp
++#endif
+ 
+ void MDIView::setCurrentViewMode(ViewMode mode)
+ {
+@@ -246,7 +250,7 @@
+                         showNormal();
+ 
+ #if defined(Q_WS_X11)
+-                    extern void qt_x11_wait_for_window_manager( QWidget* w ); // defined in qwidget_x11.cpp
++                    //extern void qt_x11_wait_for_window_manager( QWidget* w ); // defined in qwidget_x11.cpp
+                     qt_x11_wait_for_window_manager(this);
+ #endif
+                     activateWindow();
+--- a/src/Mod/Mesh/App/Core/MeshIO.cpp
++++ b/src/Mod/Mesh/App/Core/MeshIO.cpp
+@@ -1412,9 +1412,10 @@
+     while (clIter < clEnd) {
+         pclFacet = &(*clIter);
+         // normal
+-        rstrOut.write((const char*)&(pclFacet->GetNormal().x), sizeof(float));
+-        rstrOut.write((const char*)&(pclFacet->GetNormal().y), sizeof(float));
+-        rstrOut.write((const char*)&(pclFacet->GetNormal().z), sizeof(float));
++        Base::Vector3f normal = pclFacet->GetNormal();
++        rstrOut.write((const char*)&(normal.x), sizeof(float));
++        rstrOut.write((const char*)&(normal.y), sizeof(float));
++        rstrOut.write((const char*)&(normal.z), sizeof(float));
+ 
+         // vertices
+         for (i = 0; i < 3; i++) {
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..afaa5e4
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+fix_compilation_with_gcc-4.6.patch

-- 
FreeCAD packaging



More information about the debian-science-commits mailing list