From 74c343d243da4fd6b9b974be91c09c6b38c4a576 Mon Sep 17 00:00:00 2001 From: Matteo Bernardini Date: Wed, 12 Sep 2012 11:12:40 +0200 Subject: graphics/FreeCAD: Added a patch and a -fpermissive for gcc-4.7.x. Noted also eigen3 as an optional dependency Signed-off-by: Matteo Bernardini --- graphics/FreeCAD/FreeCAD-0.12.5284-gcc47.patch | 45 ++++++++++++++++++++++++++ graphics/FreeCAD/FreeCAD.SlackBuild | 5 ++- graphics/FreeCAD/README | 2 ++ 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 graphics/FreeCAD/FreeCAD-0.12.5284-gcc47.patch (limited to 'graphics') diff --git a/graphics/FreeCAD/FreeCAD-0.12.5284-gcc47.patch b/graphics/FreeCAD/FreeCAD-0.12.5284-gcc47.patch new file mode 100644 index 000000000000..713228873488 --- /dev/null +++ b/graphics/FreeCAD/FreeCAD-0.12.5284-gcc47.patch @@ -0,0 +1,45 @@ +Patch written by Matteo Bernardini +Just followed the gcc hints ;) + +diff -Naur FreeCAD-0.12.5284.orig/src/Mod/Mesh/App/WildMagic4/Wm4Query2Filtered.inl FreeCAD-0.12.5284/src/Mod/Mesh/App/WildMagic4/Wm4Query2Filtered.inl +--- FreeCAD-0.12.5284.orig/src/Mod/Mesh/App/WildMagic4/Wm4Query2Filtered.inl 2012-01-02 19:31:49.000000000 +0100 ++++ FreeCAD-0.12.5284/src/Mod/Mesh/App/WildMagic4/Wm4Query2Filtered.inl 2012-09-12 07:01:33.501676355 +0200 +@@ -55,7 +55,7 @@ + Real fLen1 = Math::Sqrt(fX1*fX1 + fY1*fY1); + Real fScaledUncertainty = m_fUncertainty*fLen0*fLen1; + +- Real fDet2 = Det2(fX0,fY0,fX1,fY1); ++ Real fDet2 = this->Det2(fX0,fY0,fX1,fY1); + if (Math::FAbs(fDet2) >= fScaledUncertainty) + { + return (fDet2 > (Real)0.0 ? +1 : (fDet2 < (Real)0.0 ? -1 : 0)); +@@ -93,7 +93,7 @@ + Real fLen2 = Math::Sqrt(fD2x*fD2x + fD2y*fD2y + fZ2*fZ2); + Real fScaledUncertainty = m_fUncertainty*fLen0*fLen1*fLen2; + +- Real fDet3 = Det3(fD0x,fD0y,fZ0,fD1x,fD1y,fZ1,fD2x,fD2y,fZ2); ++ Real fDet3 = this->Det3(fD0x,fD0y,fZ0,fD1x,fD1y,fZ1,fD2x,fD2y,fZ2); + if (Math::FAbs(fDet3) >= fScaledUncertainty) + { + return (fDet3 < (Real)0.0 ? 1 : (fDet3 > (Real)0.0 ? -1 : 0)); +diff -Naur FreeCAD-0.12.5284.orig/src/Mod/Mesh/App/WildMagic4/Wm4Query3Filtered.inl FreeCAD-0.12.5284/src/Mod/Mesh/App/WildMagic4/Wm4Query3Filtered.inl +--- FreeCAD-0.12.5284.orig/src/Mod/Mesh/App/WildMagic4/Wm4Query3Filtered.inl 2012-01-02 19:31:49.000000000 +0100 ++++ FreeCAD-0.12.5284/src/Mod/Mesh/App/WildMagic4/Wm4Query3Filtered.inl 2012-09-12 07:03:13.704678326 +0200 +@@ -62,7 +62,7 @@ + Real fLen2 = Math::Sqrt(fX2*fX2 + fY2*fY2 + fZ2*fZ2); + Real fScaledUncertainty = m_fUncertainty*fLen0*fLen1*fLen2; + +- Real fDet3 = Det3(fX0,fY0,fZ0,fX1,fY1,fZ1,fX2,fY2,fZ2); ++ Real fDet3 = this->Det3(fX0,fY0,fZ0,fX1,fY1,fZ1,fX2,fY2,fZ2); + if (Math::FAbs(fDet3) >= fScaledUncertainty) + { + return (fDet3 > (Real)0.0 ? +1 : (fDet3 < (Real)0.0 ? -1 : 0)); +@@ -115,7 +115,7 @@ + Real fLen3 = Math::Sqrt(fD3x*fD3x+fD3y*fD3y+fD3z*fD3z+fW3*fW3); + Real fScaledUncertainty = m_fUncertainty*fLen0*fLen1*fLen2*fLen3; + +- Real fDet4 = Det4(fD0x,fD0y,fD0z,fW0,fD1x,fD1y,fD1z,fW1,fD2x, ++ Real fDet4 = this->Det4(fD0x,fD0y,fD0z,fW0,fD1x,fD1y,fD1z,fW1,fD2x, + fD2y,fD2z,fW2,fD3x,fD3y,fD3z,fW3); + + if (Math::FAbs(fDet4) >= fScaledUncertainty) diff --git a/graphics/FreeCAD/FreeCAD.SlackBuild b/graphics/FreeCAD/FreeCAD.SlackBuild index f893ef1a6af1..c385b59598d8 100644 --- a/graphics/FreeCAD/FreeCAD.SlackBuild +++ b/graphics/FreeCAD/FreeCAD.SlackBuild @@ -72,13 +72,16 @@ chmod -R u+w,go+r-w,a-s . # FreeCAD is ready for OpenCASCADE 6.5.{0,1} - patch for 6.5.2 patch -p1 < $CWD/OpenCASCADE652.patch +# Fix for gcc-4.7.x +patch -p1 < $CWD/FreeCAD-0.12.5284-gcc47.patch + ./autogen.sh # Fix references to old boost_*-mt libs sed -i "/-lboost/s/-mt\"/\"/g" configure CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS -fpermissive" \ ./configure \ --prefix=/opt/$PRGNAM \ --libdir=/opt/$PRGNAM/lib${LIBDIRSUFFIX} \ diff --git a/graphics/FreeCAD/README b/graphics/FreeCAD/README index 61f9828320fa..8cf54e2dda7b 100644 --- a/graphics/FreeCAD/README +++ b/graphics/FreeCAD/README @@ -1,3 +1,5 @@ FreeCAD is a general purpose 3D CAD modeler, aimed at mechanical engineering and product design, but also fits in a wider range of uses around engineering, such as architecture or other engineering specialties. + +Eigen3 is an optional dependency. -- cgit v1.2.3