updated on Wed Jan 11 12:00:27 UTC 2012
[aur-mirror.git] / freecad / PKGBUILD
blob60617d1c9908fdd7d35ff5738989a16affdc3a9c
1 # Maintainer: mickele
2 # Contributor: Jordi De Groof <jordi (dot) degroof (at) gmail (dot) com>
3 # Contributor: manwithgrenade
4 # Contributor: bricem13
5 # Contributor: gborzi
7 pkgname=freecad
8 pkgver=0.12.5284
9 pkgrel=2
10 pkgdesc='A general purpose 3D CAD modeler'
11 arch=('i686' 'x86_64')
12 url='http://sourceforge.net/apps/mediawiki/free-cad/'
13 license=('GPL')
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')
16 options=(!libtool)
17 install=freecad.install
18 source=("http://downloads.sourceforge.net/sourceforge/free-cad/freecad-${pkgver}.tar.gz" "${pkgname}.desktop" "${pkgname}.xml" "occ652.patch")
20 build() {
21   cd "${srcdir}/FreeCAD-${pkgver}/"
23   patch -Np1 -i "${srcdir}/occ652.patch"
25   # fix boost*-mt libs
26   sed -i -e 's/-lboost\(.*\)-mt/-lboost\1/' acinclude.m4
28   ./autogen.sh
30   ./configure \
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 \
46     --disable-debug
48   # Build main program
49   make
51   # Builds Qt plugin
52   cd src/Tools/plugins/widget/ || return 1
53   qmake plugin.pro || return 1
54   make || return 1
57 package() {
58   cd "${srcdir}/FreeCAD-${pkgver}/"
60   # Install main program
61   make DESTDIR=${pkgdir} install
63   # Symlink to /usr/bin
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"
68   # Installs Qt plugin
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"
76    # Mime info
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')