summaryrefslogtreecommitdiff
path: root/graphics/FreeCAD/FreeCAD.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/FreeCAD/FreeCAD.SlackBuild')
-rw-r--r--graphics/FreeCAD/FreeCAD.SlackBuild110
1 files changed, 46 insertions, 64 deletions
diff --git a/graphics/FreeCAD/FreeCAD.SlackBuild b/graphics/FreeCAD/FreeCAD.SlackBuild
index c385b59598..2cfa7a1a0b 100644
--- a/graphics/FreeCAD/FreeCAD.SlackBuild
+++ b/graphics/FreeCAD/FreeCAD.SlackBuild
@@ -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 .
-
-# 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 -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
-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 -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 {} \;
+
+# no downloads allowed during the build
+patch -p1 < $CWD/no_coin3d_docs.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
+
+# these patch contain some code taken from upstream
+# thanks to cbuehler
+patch -p1 -i $CWD/freecad-0.13.diff
+
+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 ..
+
+ make V=1
+ make install DESTDIR=$PKG
+cd ..
+
+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