Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-13-2014, 08:32 AM
|
#1
|
Member
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current 32 / 64
Posts: 438
Rep:
|
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 ?
|
|
|
05-13-2014, 09:12 AM
|
#2
|
Senior Member
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,891
|
|
|
|
05-13-2014, 09:38 AM
|
#3
|
Member
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current 32 / 64
Posts: 438
Original Poster
Rep:
|
I have 0.13 onboard, but 0.14 has definitely more features ...
|
|
|
05-15-2014, 03:45 AM
|
#4
|
LQ Newbie
Registered: Oct 2013
Posts: 9
Rep: 
|
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}
|
|
|
05-15-2014, 05:54 AM
|
#5
|
Member
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current 32 / 64
Posts: 438
Original Poster
Rep:
|
Did you succeed with this compilation ?
Is this 0.14 git version running smoothly ?
|
|
|
05-16-2014, 04:09 AM
|
#7
|
Member
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current 32 / 64
Posts: 438
Original Poster
Rep:
|
Quote:
Originally Posted by cnv
|
Compilation succeded ! Thanks !
|
|
|
All times are GMT -5. The time now is 05:38 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|