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 <ponce@slackbuilds.org>
This commit is contained in:
Matteo Bernardini 2012-09-12 11:12:40 +02:00
parent 1fd2cef729
commit 74c343d243
3 changed files with 51 additions and 1 deletions

View file

@ -0,0 +1,45 @@
Patch written by Matteo Bernardini <ponce@slackbuilds.org>
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<Real>::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<Real>::FAbs(fDet2) >= fScaledUncertainty)
{
return (fDet2 > (Real)0.0 ? +1 : (fDet2 < (Real)0.0 ? -1 : 0));
@@ -93,7 +93,7 @@
Real fLen2 = Math<Real>::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<Real>::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<Real>::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<Real>::FAbs(fDet3) >= fScaledUncertainty)
{
return (fDet3 > (Real)0.0 ? +1 : (fDet3 < (Real)0.0 ? -1 : 0));
@@ -115,7 +115,7 @@
Real fLen3 = Math<Real>::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<Real>::FAbs(fDet4) >= fScaledUncertainty)

View file

@ -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} \

View file

@ -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.