graphics/FreeCAD: Install the qt plugin.

eigen3 is an hard dependency, install mime info

Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
This commit is contained in:
Matteo Bernardini 2013-11-27 15:51:33 +01:00 committed by Robby Workman
parent c208cfd146
commit 1eb1a4df80
8 changed files with 32 additions and 10 deletions

View file

@ -22,11 +22,11 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# revision date: 2012/01/04
# revision date: 2013/11/27
PRGNAM=FreeCAD
VERSION=${VERSION:-0.13.1830}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
SRCNAM=freecad
@ -74,7 +74,7 @@ find -L . \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# no downloads allowed during the build
patch -p1 < $CWD/no_coin3d_docs.patch
patch -p1 < $CWD/files/no_coin3d_docs.patch
# thanks to archlinux for these fixes
# compatibility issues with OCC-6.6
@ -85,7 +85,7 @@ done
# these patch contain some code taken from upstream
# thanks to cbuehler
patch -p1 -i $CWD/freecad-0.13.diff
patch -p1 -i $CWD/files/freecad-0.13.diff
mkdir build
cd build
@ -106,13 +106,26 @@ cd build
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
ln -s /opt/FreeCAD/bin/FreeCAD $PKG/usr/bin/FreeCAD
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
mkdir -p $PKG/usr/share/applications $PKG/usr/share/pixmaps
# 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/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
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 \

View file

@ -5,6 +5,6 @@ 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"
REQUIRES="OpenCASCADE Pivy eigen3 xerces-c"
MAINTAINER="Niels Horn"
EMAIL="niels.horn@gmail.com"

View file

@ -1,5 +1,3 @@
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.

View file

@ -2,3 +2,6 @@ if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
if [ -x /usr/bin/update-mime-database ]; then
/usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
fi

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<mime-type type="application/x-extension-fcstd">
<sub-class-of type="application/zip"/>
<comment>FreeCAD document</comment>
<glob pattern="*.fcstd"/>
</mime-type>
</mime-info>