updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / gmsh / PKGBUILD
blob84befc6b37c4a6b9200fc63499332731adc92a6c
1 # Maintainer: gborzi <gborzi@ieee.org>
2 # Contributor: mickele <mimocciola@yahoo.com>
3 pkgname=gmsh
4 pkgver=2.5.0
5 pkgrel=4
6 pkgdesc="An automatic 3D finite element mesh generator with pre and post-processing facilities."
7 arch=('i686' 'x86_64')
8 url="http://www.geuz.org/gmsh/"
9 license=('custom')
10 depends=('fltk' 'lapack' 'med' 'opencascade>=6.5.0' 'lua')
11 #depends=('fltk' 'lapack' 'med' 'lua' 'mesa')
12 makedepends=('cmake' 'desktop-file-utils' 'sed' 'coreutils')
13 optdepends=('gmsh-docs: docs for gmsh')
14 options=(!emptydirs)
15 source=("$url/src/${pkgname}-${pkgver}-source.tgz" gmsh.desktop gmsh.completion
16         CMakeLists.txt.patch opnscs650.patch)
17 md5sums=('afa48c0296dba08641bc6312b0ccabf5'
18          'e63dc24ba025741fc1a82633b475e4a8'
19          '9ee4b5bf27956de5aa412bbc939660d3'
20          'b5df029ce3230b7299c2daef2a75c322'
21          'f0f4e57379c928033d7a51c151184861')
23 build() {
24    cd "${srcdir}/${pkgname}-${pkgver}-source"
26    # patch CMakeLists.txt to work with lapack from extra
27    patch -Np0 -i "${srcdir}/CMakeLists.txt.patch"
28    # patch Geo/OCC_Connect.cpp for OpenCascade 6.5.0
29    patch -Np0 -i "$srcdir/opnscs650.patch"
30    # Help links to local doc (package gmsh-docs)
31    sed -e "s|http://geuz.org/gmsh/doc/texinfo/|file:///usr/share/doc/gmsh/gmsh.html|" \
32        -i Fltk/menuWindow.cpp
33    sed -e "s|http://geuz.org/gmsh/doc/|/usr/share/licenses/gmsh/|" \
34        -i Fltk/aboutWindow.cpp
36    mkdir -p build
38    cd build
40    cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. 
41    #cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DENABLE_OCC=0 .. 
43    make
46 package() {
48    cd "${srcdir}/${pkgname}-${pkgver}-source/build"
49    make DESTDIR=${pkgdir} install
51    install -D -m644 "${srcdir}/${pkgname}-${pkgver}-source/utils/icons/gmsh128x128-smooth.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
53    desktop-file-install --dir="${pkgdir}/usr/share/applications" \
54         "${srcdir}/${pkgname}.desktop"
56    install -D -m 644 "${srcdir}/${pkgname}-${pkgver}-source/doc/LICENSE.txt" "${pkgdir}/usr/share/licenses/$pkgname/LICENSE.txt"
57    install -D -m 644 "${srcdir}/${pkgname}-${pkgver}-source/doc/CREDITS.txt" "${pkgdir}/usr/share/licenses/$pkgname/CREDITS.txt"
58    install -D -m644 $srcdir/gmsh.completion $pkgdir/etc/bash_completion.d/gmsh
60    rm -rf ${pkgdir}/usr/share/doc