2 # Contributor: Jordi De Groof <jordi (dot) degroof (at) gmail (dot) com>
3 # Contributor: manwithgrenade
4 # Contributor: bricem13
10 pkgdesc='A general purpose 3D CAD modeler'
11 arch=('i686' 'x86_64')
12 url='http://sourceforge.net/apps/mediawiki/free-cad/'
14 depends=('boost-libs=1.48.0' 'curl' 'opencascade>=6.5.2' 'pivy-hg' 'python2-pyqt' 'xerces-c' 'libspnav' 'shared-mime-info' 'hicolor-icon-theme')
15 makedepends=('boost=1.48.0' 'eigen3' 'gcc-fortran' 'swig1' 'desktop-file-utils')
17 install=freecad.install
18 source=("http://downloads.sourceforge.net/sourceforge/free-cad/freecad-${pkgver}.tar.gz" "${pkgname}.desktop" "${pkgname}.xml" "occ652.patch")
21 cd "${srcdir}/FreeCAD-${pkgver}/"
23 patch -Np1 -i "${srcdir}/occ652.patch"
26 sed -i -e 's/-lboost\(.*\)-mt/-lboost\1/' acinclude.m4
31 --prefix=/usr/lib/${pkgname} \
32 --datadir=/usr/share/${pkgname} \
33 --includedir=/usr/include/${pkgname} \
34 --docdir=/usr/share/doc/${pkgname} \
35 --with-qt4-dir=/usr/lib/qt/ \
36 --with-qt4-bin=/usr/bin/ \
37 --with-qt4-include=/usr/include/ \
38 --with-qt4-lib=/usr/lib/qt/ \
39 PYTHON=/usr/bin/python2 \
40 --with-python-include=/usr/include/python2.7/ \
41 --with-python-lib=/usr/lib/python2.7/ \
42 --with-boost-include=/usr/include/boost \
43 --with-boost-lib=/usr/lib \
44 --with-occ-lib=/opt/opencascade/lib \
45 --with-occ-include=/opt/opencascade/inc \
52 cd src/Tools/plugins/widget/ || return 1
53 qmake plugin.pro || return 1
58 cd "${srcdir}/FreeCAD-${pkgver}/"
60 # Install main program
61 make DESTDIR=${pkgdir} install
64 mkdir -p ${pkgdir}/usr/bin/
65 ln -sf /usr/lib/${pkgname}/bin/FreeCAD "${pkgdir}/usr/bin/${pkgname}"
66 ln -sf /usr/lib/${pkgname}/bin/FreeCADCmd "${pkgdir}/usr/bin/freecadcmd"
69 install -Dm755 src/Tools/plugins/widget/libFreeCAD_widgets.so "${pkgdir}/usr/lib/qt/plugins/designer/libFreeCAD_widgets.so"
71 # Install pixmaps and desktop shortcut
72 desktop-file-install \
73 --dir="${pkgdir}/usr/share/applications" \
74 "${srcdir}/${pkgname}.desktop"
77 install -D -m644 "${srcdir}/${pkgname}.xml" "${pkgdir}/usr/share/mime/packages/${pkgname}.xml"
78 mkdir -p "${pkgdir}/usr/share/icons/hicolor/48x48/mimetypes/"
79 ln -s /usr/share/${pkgname}/freecad.xpm "${pkgdir}/usr/share/icons/hicolor/48x48/mimetypes/application-x-extension-fcstd.xpm"
82 md5sums=('fcd91286c578a219491ffebb2111bddf'
83 '0d3e92a0cb31f2621e9824a099e8a244'
84 'c2f4154c8e4678825411de8e7fa54c6b'
85 '4bafdb67647fd0f1a2cf827e517e6188')