graphics/FreeCAD: Updated for version 0.13.1830.

Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
This commit is contained in:
Matteo Bernardini 2013-11-19 22:27:02 +01:00 committed by Robby Workman
parent d91d6f97f7
commit 46926e4795
7 changed files with 2572 additions and 191 deletions

View file

@ -1,45 +0,0 @@
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

@ -25,7 +25,7 @@
# revision date: 2012/01/04
PRGNAM=FreeCAD
VERSION=${VERSION:-0.12.5284}
VERSION=${VERSION:-0.13.1830}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@ -63,73 +63,55 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.xz
cd $PRGNAM-$VERSION
rm -rf $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.?z*
cd $SRCNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# FreeCAD is ready for OpenCASCADE 6.5.{0,1} - patch for 6.5.2
patch -p1 < $CWD/OpenCASCADE652.patch
# no downloads allowed during the build
patch -p1 < $CWD/no_coin3d_docs.patch
# Fix for gcc-4.7.x
patch -p1 < $CWD/FreeCAD-0.12.5284-gcc47.patch
# thanks to archlinux for these fixes
# compatibility issues with OCC-6.6
for i in $( grep -Rl "BRepTools::OuterShell" * )
do
sed -e "s|BRepTools|BRepClass3d|g" -i "$i"
done
./autogen.sh
# these patch contain some code taken from upstream
# thanks to cbuehler
patch -p1 -i $CWD/freecad-0.13.diff
# Fix references to old boost_*-mt libs
sed -i "/-lboost/s/-mt\"/\"/g" configure
mkdir build
cd build
cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -Wno-cpp" \
-DCMAKE_INSTALL_PREFIX=/opt/$PRGNAM \
-DRESOURCEDIR=/opt/$PRGNAM/share/data \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
-DMAN_INSTALL_DIR=/usr/man \
-DDOCDIR=/usr/doc/$PRGNAM-$VERSION \
-DOCC_INCLUDE_DIR=/usr/include/OpenCASCADE \
-DOCC_LIBRARY=/usr/lib${LIBDIRSUFFIX} \
-DFREECAD_USE_EXTERNAL_PIVY:BOOL=ON \
-DCMAKE_BUILD_TYPE=Release ..
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS -fpermissive" \
./configure \
--prefix=/opt/$PRGNAM \
--libdir=/opt/$PRGNAM/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--with-occ-lib=/usr/lib${LIBDIRSUFFIX} \
--with-occ-include=/usr/include/OpenCASCADE \
--with-qt4-dir=$QT4DIR \
--build=$ARCH-slackware-linux
make V=1
make install DESTDIR=$PKG
cd ..
make
make install DESTDIR=$PKG
### This is for future use. FreeCAD is switching to cmake, but is is not
### 100% operational yet.
### These are the options that *should* do it:
#mkdir build
#cd build
# cmake \
# -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
# -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
# -DCMAKE_INSTALL_PREFIX=/opt/$PRGNAM \
# -DRESOURCEDIR=/opt/$PRGNAM/share/data \
# -DLIB_SUFFIX=${LIBDIRSUFFIX} \
# -DMAN_INSTALL_DIR=/usr/man \
# -DDOCDIR=/usr/doc/$PRGNAM-$VERSION \
# -DOCC_INCLUDE_DIR=/usr/include/OpenCASCADE \
# -DOCC_LIBRARY=/usr/lib${LIBDIRSUFFIX} \
# -DCMAKE_BUILD_TYPE=Release ..
#
# make V=1
# make install DESTDIR=$PKG
#cd ..
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
# Get man page from debian
mkdir -p $PKG/usr/man/man1
cat package/debian/freecad.1 > $PKG/usr/man/man1/FreeCAD.1
gzip -9 $PKG/usr/man/man1/FreeCAD.1
# Copy icon & desktop file
mkdir -p $PKG/usr/share/{applications,pixmaps}
cp $PKG/opt/$PRGNAM/share/freecad.xpm $PKG/usr/share/pixmaps/
mkdir -p $PKG/usr/share/applications $PKG/usr/share/pixmaps
cp $PKG/opt/$PRGNAM/data/freecad.xpm $PKG/usr/share/pixmaps/
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION

View file

@ -1,8 +1,8 @@
PRGNAM="FreeCAD"
VERSION="0.12.5284"
VERSION="0.13.1830"
HOMEPAGE="http://free-cad.sourceforge.net/"
DOWNLOAD="http://www.nielshorn.net/_download/slackware/source/freecad-0.12.5284.tar.xz"
MD5SUM="3b6efa9d97de093e7bb42aabd3bcbc54"
DOWNLOAD="http://downloads.sourceforge.net/free-cad/freecad-0.13.1830.tar.gz"
MD5SUM="13b8fddef12f5f8419dcf4adbab596eb"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="OpenCASCADE Pivy xerces-c"

View file

@ -1,84 +0,0 @@
--- FreeCAD-0.12.5284/src/Mod/Part/App/AppPartPy.cpp 2012-01-02 16:32:09.000000000 -0200
+++ FreeCAD-0.12.5284_patched/src/Mod/Part/App/AppPartPy.cpp 2012-01-02 21:36:18.000000000 -0200
@@ -492,7 +492,7 @@
d.SetCoord(vec.x, vec.y, vec.z);
}
Handle_Geom_Plane aPlane = new Geom_Plane(p, d);
- BRepBuilderAPI_MakeFace Face(aPlane, 0.0, length, 0.0, width);
+ BRepBuilderAPI_MakeFace Face(aPlane, 0.0, length, 0.0, width, Precision::Confusion());
return new TopoShapeFacePy(new TopoShape((Face.Face())));
}
catch (Standard_DomainError) {
--- FreeCAD-0.12.5284/src/Mod/Part/App/GeometrySurfacePyImp.cpp 2012-01-02 16:32:09.000000000 -0200
+++ FreeCAD-0.12.5284_patched/src/Mod/Part/App/GeometrySurfacePyImp.cpp 2012-01-02 22:08:47.000000000 -0200
@@ -79,7 +79,7 @@
s->Bounds(u1,u2,v1,v2);
if (!PyArg_ParseTuple(args, "|dddd", &u1,&u2,&v1,&v2))
return 0;
- BRepBuilderAPI_MakeFace mkBuilder(s, u1, u2, v1, v2);
+ BRepBuilderAPI_MakeFace mkBuilder(s, u1, u2, v1, v2, Precision::Confusion());
TopoDS_Shape sh = mkBuilder.Shape();
return new TopoShapeFacePy(new TopoShape(sh));
}
--- FreeCAD-0.12.5284/src/Mod/Part/App/Geometry.cpp 2012-01-02 16:32:09.000000000 -0200
+++ FreeCAD-0.12.5284_patched/src/Mod/Part/App/Geometry.cpp 2012-01-02 22:37:08.000000000 -0200
@@ -1252,7 +1252,7 @@
Handle_Geom_Surface s = Handle_Geom_Surface::DownCast(handle());
Standard_Real u1,u2,v1,v2;
s->Bounds(u1,u2,v1,v2);
- BRepBuilderAPI_MakeFace mkBuilder(s, u1, u2, v1, v2);
+ BRepBuilderAPI_MakeFace mkBuilder(s, u1, u2, v1, v2, Precision::Confusion());
return mkBuilder.Shape();
}
--- FreeCAD-0.12.5284/src/Mod/Part/App/PrimitiveFeature.cpp 2012-01-02 16:32:09.000000000 -0200
+++ FreeCAD-0.12.5284_patched/src/Mod/Part/App/PrimitiveFeature.cpp 2012-01-02 22:40:21.000000000 -0200
@@ -191,7 +191,7 @@
gp_Pnt pnt(0.0,0.0,0.0);
gp_Dir dir(0.0,0.0,1.0);
Handle_Geom_Plane aPlane = new Geom_Plane(pnt, dir);
- BRepBuilderAPI_MakeFace mkFace(aPlane, 0.0, L, 0.0, W);
+ BRepBuilderAPI_MakeFace mkFace(aPlane, 0.0, L, 0.0, W, Precision::Confusion());
const char *error=0;
switch (mkFace.Error())
--- FreeCAD-0.12.5284/src/Mod/Part/App/TopoShape.cpp 2012-01-02 16:32:09.000000000 -0200
+++ FreeCAD-0.12.5284_patched/src/Mod/Part/App/TopoShape.cpp 2012-01-03 00:19:12.000000000 -0200
@@ -1338,7 +1338,7 @@
double u1,u2,v1,v2;
surf->Bounds(u1,u2,v1,v2);
- BRepBuilderAPI_MakeFace mkBuilder(surf, umin, umax, v1, v2);
+ BRepBuilderAPI_MakeFace mkBuilder(surf, umin, umax, v1, v2, Precision::Confusion());
return mkBuilder.Face();
}
@@ -1391,7 +1391,7 @@
Standard_Real u1,u2,v1,v2;
mySurface->Bounds(u1,u2,v1,v2);
- BRepBuilderAPI_MakeFace mkBuilder(mySurface, u1, u2, v1, v2);
+ BRepBuilderAPI_MakeFace mkBuilder(mySurface, u1, u2, v1, v2, Precision::Confusion());
return mkBuilder.Shape();
}
@@ -1443,7 +1443,7 @@
mkSweep.Perform(tol, Standard_False, GeomAbs_C1, BSplCLib::MaxDegree(), 1000);
const Handle_Geom_Surface& surf = mkSweep.Surface();
- BRepBuilderAPI_MakeFace mkBuilder(surf, umin, umax, vmin, vmax);
+ BRepBuilderAPI_MakeFace mkBuilder(surf, umin, umax, vmin, vmax, Precision::Confusion());
return mkBuilder.Face();
}
--- FreeCAD-0.12.5284/src/Mod/Part/App/TopoShapeFacePyImp.cpp 2012-01-02 16:32:09.000000000 -0200
+++ FreeCAD-0.12.5284_patched/src/Mod/Part/App/TopoShapeFacePyImp.cpp 2012-01-03 00:24:40.000000000 -0200
@@ -135,7 +135,7 @@
return -1;
}
- BRepBuilderAPI_MakeFace mkFace(S);
+ BRepBuilderAPI_MakeFace mkFace(S, Precision::Confusion());
if (bound) {
Py::List list(bound);
for (Py::List::iterator it = list.begin(); it != list.end(); ++it) {

View file

@ -2,4 +2,4 @@ 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.
eigen3 is an optional dependency.

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,17 @@
diff -Naur freecad-0.13.1830.orig/src/Doc/CMakeLists.txt freecad-0.13.1830/src/Doc/CMakeLists.txt
--- freecad-0.13.1830.orig/src/Doc/CMakeLists.txt 2013-02-02 18:09:17.000000000 +0100
+++ freecad-0.13.1830/src/Doc/CMakeLists.txt 2013-11-19 21:23:26.655733113 +0100
@@ -53,13 +53,6 @@
SET(DOXYGEN_IMAGE_PATH ${CMAKE_SOURCE_DIR}/src/Gui/Icons)
SET(DOXYGEN_LAYOUT_FILE ${CMAKE_SOURCE_DIR}/src/Doc/FreecadDoxygenLayout.xml)
- find_package(Coin3DDoc)
- if( COIN3D_DOC_FOUND )
- SET(DOXYGEN_TAGFILES
- ${COIN3D_DOC_TAGFILE}=${COIN3D_DOC_PATH}
- )
- endif( COIN3D_DOC_FOUND )
-
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/BuildDevDoc.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/BuildDevDoc.cfg @ONLY)