summaryrefslogtreecommitdiff
path: root/graphics/FreeCAD/FreeCAD.SlackBuild
diff options
context:
space:
mode:
authorDavid Spencer <idlemoor@slackbuilds.org>2016-01-21 23:04:33 +0000
committerDavid Spencer <idlemoor@slackbuilds.org>2016-01-23 01:16:52 +0000
commiteb89d5140e8dbf4ac4044ac728797c380d49baa8 (patch)
tree7a1cb9e0d704a3f209d150266c9ee431f0852493 /graphics/FreeCAD/FreeCAD.SlackBuild
parent8857dc4be0a2188189dad5e9dec811976716f06c (diff)
downloadslackbuilds-eb89d5140e8dbf4ac4044ac728797c380d49baa8.tar.gz
graphics/FreeCAD: Updated for version 0.15.
New maintainer. Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'graphics/FreeCAD/FreeCAD.SlackBuild')
-rw-r--r--graphics/FreeCAD/FreeCAD.SlackBuild54
1 files changed, 17 insertions, 37 deletions
diff --git a/graphics/FreeCAD/FreeCAD.SlackBuild b/graphics/FreeCAD/FreeCAD.SlackBuild
index 3d860cf4dd..35b227e53b 100644
--- a/graphics/FreeCAD/FreeCAD.SlackBuild
+++ b/graphics/FreeCAD/FreeCAD.SlackBuild
@@ -21,15 +21,14 @@
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# revision date: 2013/11/27
+#
+# Maintained by David Spencer <baildon.research@googlemail.com>
PRGNAM=FreeCAD
-VERSION=${VERSION:-0.13.1830}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-0.15}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-SRCNAM=freecad
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -63,56 +62,37 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $SRCNAM-$VERSION
-tar xvf $CWD/$SRCNAM-$VERSION.tar.?z*
-cd $SRCNAM-$VERSION
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/$VERSION.tar.gz
+cd $PRGNAM-$VERSION
chown -R root:root .
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 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# no downloads allowed during the build
-patch -p1 < $CWD/files/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/files/freecad-0.13.diff
+patch -p1 < $CWD/no_coin3d_docs.patch
mkdir build
cd build
cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -Wno-cpp" \
+ -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} \
+ -DOCC_INCLUDE_DIR:PATH=/opt/OpenCASCADE/inc \
+ -DOCC_LIBRARY:PATH=/opt/OpenCASCADE/lib${LIBDIRSUFFIX} \
+ -DCMAKE_SHARED_LINKER_FLAGS:STRING="-L/opt/OpenCASCADE/lib${LIBDIRSUFFIX}" \
+ -DRESOURCEDIR=/opt/$PRGNAM/share/data \
-DFREECAD_USE_EXTERNAL_PIVY:BOOL=ON \
-DCMAKE_BUILD_TYPE=Release ..
-
- make V=1
+ make
make install DESTDIR=$PKG
cd ..
-# build the qt plugin
-( cd src/Tools/plugins/widget
- qmake plugin.pro
- make
- install -m 0755 -D libFreeCAD_widgets.so \
- $PKG/usr/lib$LIBDIRSUFFIX/qt4/plugins/designer/libFreeCAD_widgets.so )
-
# create links in /usr/bin
mkdir -p $PKG/usr/bin
ln -s /opt/FreeCAD/bin/FreeCADCmd $PKG/usr/bin/FreeCADCmd
@@ -124,8 +104,8 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
# Copy icon, desktop file and mime info
mkdir -p $PKG/usr/share/applications $PKG/usr/share/pixmaps $PKG/usr/share/mime/packages
cp $PKG/opt/$PRGNAM/data/freecad.xpm $PKG/usr/share/pixmaps/
-cat $CWD/files/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
-cat $CWD/files/$PRGNAM.xml > $PKG/usr/share/mime/packages/$PRGNAM.xml
+cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
+cat $CWD/$PRGNAM.xml > $PKG/usr/share/mime/packages/$PRGNAM.xml
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \