updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / salome-med / PKGBUILD
blob81e2fb9a9fea7af8464866a92f23140513bc6a3b
1 # Maintainer: Michele Mocciola <mickele>
3 pkgname=salome-med
4 pkgver=5.1.4
5 pkgrel=1
6 pkgdesc="SALOME provides a generic platform for Pre and Post-Processing for numerical simulation. MED Module."
7 url="http://www.salome-platform.org"
8 depends=('salome-kernel' 'salome-gui' 'python' 'qt' 'boost' 'opencascade' 'omniorb' 'omniorbpy' 'omninotify' 'swig' 'hdf5' 'med' 'vtk>=5.6' 'graphviz' 'scotch' 'metis' 'sip' 'cppunit' 'flex' 'bison' 'sed')
9 makedepends=('gcc' 'automake' 'autoconf' 'libtool' 'make' 'doxygen' 'docutils' 'patch' 'coreutils')
10 arch=('i686' 'x86_64')
11 conflicts=()
12 provides=()
13 license=('LGPL')
14 source=("http://files.opencascade.com/Salome/Salome${pkgver}/src${pkgver}.tar.gz" "salome-med-5.1.4_med_int.diff" "salome-med-5.1.4_scotch-metis.diff" "salome-med-5.1.4_missing-link.diff" "${pkgname}.profile")
16 _source=src${pkgver}
17 _installdir=/opt/salome/med
18 _pythonver=2.6
19 _vtkver=5.6
21 build() {
22   source /etc/profile.d/salome-kernel.sh || return 1
23   source /etc/profile.d/salome-gui.sh || return 1
25   export LDFLAGS="${LDFLAGS//-Wl,--as-needed}"
26   export LDFLAGS="${LDFLAGS//,--as-needed}"
27   export LDFLAGS="${LDFLAGS//--as-needed}"
29   if [ "$CARCH" = "x86_64" ]; then
30      # to solve compatibility problem with libmed
31      export CPPFLAGS="${CPPFLAGS} -DHAVE_F77INT64"
32   fi
34   # flag usefull to solve link problems
35   # export LDFLAGS="-Wl,--no-undefined ${LDFLAGS}"
37   cd ${srcdir}/${_source}/MED_SRC_${pkgver} || return 1
39   patch -Np1 -i ${srcdir}/salome-med-5.1.4_med_int.diff || return 1
40   patch -Np1 -i ${srcdir}/salome-med-5.1.4_missing-link.diff || return 1
41   patch -Np1 -i ${srcdir}/salome-med-5.1.4_scotch-metis.diff || return 1
43   # Builds and install
44   ./clean_configure || return 1
45   ./build_configure || return 1
46   ./configure --prefix=${_installdir} \
47               --with-python-site=/usr/lib/python-${_pythonver}/site-packages/salome \
48               --with-python-site-exec=/usr/lib/python-${_pythonver}/site-packages/salome \
49               --with-qt=/usr \
50               --with-vtk=/usr \
51               --with-vtk-version=-${_vtkver} \
52               --with-scotch=/usr \
53               --with-metis=/usr \
54               --enable-production || return 1
56   make || return 1
59 package() {
60   cd ${srcdir}/${_source}/MED_SRC_${pkgver} || return 1
62   make DESTDIR="${pkgdir}" install || return 1
64   install -D -m755 "${srcdir}/${pkgname}.profile" \
65                    "${pkgdir}/etc/profile.d/${pkgname}.sh" || return 1
69 md5sums=('ec363b2ff2dbdb889c973e9e19b2970f'
70          'a1e136d250d40fe74973a28341ad3dc4'
71          '5023e1aca8908e8df1bf2fb70ed863fa'
72          '7a0eab93cfb114f18f46288af83c04c9'
73          '99a82599773abf8f0c77c18c7466af54')