LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-13-2014, 08:32 AM   #1
brodo
Member
 
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current 32 / 64
Posts: 406

Rep: Reputation: 30
How to compile FreeCAD unstable 0.14 ?


Here we have instructions for several distros:

http://freecadweb.org/wiki/index.php...=CompileOnUnix

Has anyone compiled FreeCAD 0.14 in Slackware ?
 
Old 05-13-2014, 09:12 AM   #2
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,651

Rep: Reputation: 1772Reputation: 1772Reputation: 1772Reputation: 1772Reputation: 1772Reputation: 1772Reputation: 1772Reputation: 1772Reputation: 1772Reputation: 1772Reputation: 1772
We only have 0.13.x in SBo
http://slackbuilds.org/repository/14.1/graphics/FreeCad
 
Old 05-13-2014, 09:38 AM   #3
brodo
Member
 
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current 32 / 64
Posts: 406

Original Poster
Rep: Reputation: 30
I have 0.13 onboard, but 0.14 has definitely more features ...
 
Old 05-15-2014, 03:45 AM   #4
cnv
LQ Newbie
 
Registered: Oct 2013
Posts: 9

Rep: Reputation: Disabled
I tried to compile development version. It takes several hours.
All of the mentioned requirements are available from SlackBuilds.org

xerces-c
eigen3
Coin
SoQt
Pivy
OpenCASCADE

apiextractor
generatorrunner
shiboken
pyside

FreeCAD
Code:

#!/bin/sh

# Slackware build script for FreeCAD

# Copyright 2010-2012 Niels Horn, Rio de Janeiro, RJ, Brazil
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# 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.

# Edited by cnv 2014

PRGNAM=FreeCAD
VERSION=${VERSION:-git$(date +"%y%m%d")}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}

SRCNAM=freecad

# Check if we have the tarball
if [ ! -r $SRCNAM-git*.tar.bz2 ]; then
  echo ""
  echo "$SRCNAM-$VERSION.tar.bz2 not found. Getting the source code."
  echo ""
  git clone git://git.code.sf.net/p/free-cad/code freecad || exit 1
  cd $SRCNAM || exit 1
  find . -name ".*" -print0 | xargs -0 rm -rf 2> /dev/null
  cd -
  tar -cvjf $SRCNAM-$VERSION.tar.bz2 $SRCNAM || exit 1
  rm -rf $SRCNAM
fi

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i486 ;;
    arm*) ARCH=arm ;;
       *) ARCH=$( uname -m ) ;;
  esac
fi

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

#set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT || exit 1
cd $TMP
rm -rf $SRCNAM
tar xvf $CWD/$SRCNAM-git*.tar.bz2 || exit 1
cd $SRCNAM || exit 1
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 {} \;

# 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

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 || exit 1
  make install DESTDIR=$PKG || exit 1
cd ..

# build the qt plugin
cd src/Tools/plugins/widget
  qmake plugin.pro
  make || exit 1
  install -m 0755 -D libFreeCAD_widgets.so \
    $PKG/usr/lib$LIBDIRSUFFIX/qt4/plugins/designer/libFreeCAD_widgets.so || exit 1
cd -

# create links in /usr/bin
mkdir -p $PKG/usr/bin
ln -s /opt/FreeCAD/bin/FreeCADCmd $PKG/usr/bin/FreeCADCmd || exit 1
ln -s /opt/FreeCAD/bin/FreeCAD $PKG/usr/bin/FreeCAD || exit 1

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

# 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

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
  README.Linux ChangeLog.txt \
  $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc || exit 1
cat $CWD/doinst.sh > $PKG/install/doinst.sh || exit 1

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
 
Old 05-15-2014, 05:54 AM   #5
brodo
Member
 
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current 32 / 64
Posts: 406

Original Poster
Rep: Reputation: 30
Did you succeed with this compilation ?
Is this 0.14 git version running smoothly ?
 
Old 05-16-2014, 12:24 AM   #6
cnv
LQ Newbie
 
Registered: Oct 2013
Posts: 9

Rep: Reputation: Disabled
Compilation was successful. FreeCAD works fine.
http://s28.postimg.org/lq8vr2qbx/freecad.png
 
1 members found this post helpful.
Old 05-16-2014, 04:09 AM   #7
brodo
Member
 
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current 32 / 64
Posts: 406

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by cnv View Post
Compilation was successful. FreeCAD works fine.
http://s28.postimg.org/lq8vr2qbx/freecad.png
Compilation succeded ! Thanks !
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FreeCAD build fail under slackware 14.0 marbangens Slackware 15 11-03-2012 06:39 AM
installing FreeCAD qrange Debian 3 07-28-2011 07:50 AM
[SOLVED] Trying to compile FreeCAD SVN on 64-13.1 ahmadj Slackware 11 12-26-2010 09:58 AM
is ubuntu unstable less unstable than debian unstable? lefty.crupps Ubuntu 9 10-14-2005 01:38 PM
unable to compile wine-20041201 under debian unstable strazce Linux - Software 1 12-09-2004 12:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration