1 # Maintainer: Giuseppe Borzi <gborzi@ieee.org>
2 # Contributor : Omar Lakhdar <omar_lakhdar@hotmail.com>
3 # Contributor: Thomas Dziedzic < gostrc at gmail >
4 # Contributor: Joaquim Coimbra <joaca_rj@yahoo.com.br>
5 # Contributor: Michele Mocciola <mickele>
6 # Contributor : FoolEcho <Archlinux.fr>
7 # Thanks to Werner Mayer for his support
12 pkgdesc='A general purpose 3D CAD modeler'
13 arch=('i686' 'x86_64')
14 url='http://sourceforge.net/apps/mediawiki/free-cad/'
16 depends=('boost-libs=1.48.0' 'opencascade' 'pivy-hg' 'python2-pyqt' 'xerces-c' 'libspnav')
17 makedepends=('boost=1.48.0' 'eigen3' 'gcc-fortran' 'subversion' 'swig1')
18 options=(!libtool !makeflags)
19 source=("${pkgname}.desktop")
20 md5sums=('e7fcfa91beee620117c06482f4df44f8')
23 _svntrunk='https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk'
28 if [ -d $_svnmod/.svn ]; then
29 (cd $_svnmod && svn up -r $pkgver)
31 svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
34 msg "SVN checkout done or server timeout"
35 msg "Starting make..."
37 rm -rf "$srcdir/$_svnmod-build"
38 cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
39 cd "$srcdir/$_svnmod-build"
42 sed -i -e 's/-lboost\(.*\)-mt/-lboost\1/' acinclude.m4
46 --prefix=/usr/lib/${pkgname} \
47 --datadir=/usr/share/${pkgname} \
48 --includedir=/usr/include/${pkgname} \
49 --docdir=/usr/share/doc/${pkgname} \
50 --with-qt4-bin=/usr/bin/ \
51 --with-qt4-include=/usr/include/ \
52 --with-qt4-lib=/usr/lib/ \
53 PYTHON=/usr/bin/python2 \
54 --with-python-include=/usr/include/python2.7/ \
55 --with-python-lib=/usr/lib/python2.7/ \
56 --with-boost-include=/usr/include/boost \
57 --with-boost-lib=/usr/lib \
58 --with-occ-lib=/opt/opencascade/lib \
59 --with-occ-include=/opt/opencascade/inc
61 # prepare for compilation
62 # fix Driver_Document.h problem
63 sed -i -e 's#AM_CPPFLAGS = -I$(OCC_INC) -I$(srcdir)/$(smeshdir)inc/#& -I./inc/#' src/3rdParty/salomesmesh/Makefile
69 cd "$srcdir/$_svnmod-build"
71 make DESTDIR=${pkgdir} install
72 sed -i -e 's_/usr/bin/python_&2_' "$pkgdir/usr/lib/freecad-svn/Mod/Robot/MovieTool.py"
74 install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
75 install -dm755 "${pkgdir}/usr/bin"
76 ln -sf /usr/lib/${pkgname}/bin/FreeCAD "${pkgdir}/usr/bin/${pkgname}"
77 ln -sf /usr/lib/${pkgname}/bin/FreeCADCmd "${pkgdir}/usr/bin/freecadcmd-svn"