diff options
author | Michele Mocciola | 2016-11-22 21:48:47 +0100 |
---|---|---|
committer | Michele Mocciola | 2016-11-22 21:48:47 +0100 |
commit | be489623d4fa3fb64861d6eff8fbf04b746617cc (patch) | |
tree | 12c9ae84d2c36d40593c079dd986246483c018df | |
parent | 0ec22ed56456e347c12fd8ccdfe16e25753291d7 (diff) | |
download | aur-be489623d4fa3fb64861d6eff8fbf04b746617cc.tar.gz |
Converted to cmake usage
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 49 |
2 files changed, 40 insertions, 15 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Thu Nov 17 18:16:09 UTC 2016 +# Tue Nov 22 20:47:57 UTC 2016 pkgbase = med-salome pkgdesc = MED stands for Modelisation et Echanges de Donnees, i.e. Data Modelization and Exchanges - This version is built to be linked against salome-med on x86_64 pkgver = 3.2.0 - pkgrel = 1 + pkgrel = 2 url = http://www.code-aster.org/outils/med/ arch = i686 arch = x86_64 @@ -11,7 +11,7 @@ pkgbase = med-salome makedepends = gcc-fortran makedepends = coreutils makedepends = swig - depends = hdf5 + depends = hdf5_18 depends = python2 optdepends = tk provides = med={pkgver} @@ -7,11 +7,11 @@ pkgname=med-salome _pkgname=med pkgver=3.2.0 -pkgrel=1 +pkgrel=2 pkgdesc="MED stands for Modelisation et Echanges de Donnees, i.e. Data Modelization and Exchanges - This version is built to be linked against salome-med on x86_64" url="http://www.code-aster.org/outils/med/" license=('LGPL') -depends=('hdf5' 'python2') +depends=('hdf5_18' 'python2') makedepends=('gcc-fortran' 'coreutils' 'swig') optdepends=('tk') provides=("med={pkgver}") @@ -36,8 +36,17 @@ _installdir=/usr _sharedir=${_installdir}/share/${pkgname} prepare() { + cd "${srcdir}" + + if [ -d build ]; then + rm -rf build + fi + cd ${srcdir}/${_pkgname}-${pkgver} + sed -e "s|\${CMAKE_INSTALL_PREFIX}/\${PYFILELOC}/\${inputname}|\\\\\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/\${PYFILELOC}/\${inputname}|" \ + -i config/cmake_files/medMacros.cmake + # patch H5public_extract.h.in sed -i -e '/^#typedef/ s/#/\/\//' ./include/H5public_extract.h.in @@ -55,21 +64,37 @@ build() { export FC=gfortran export PYTHON="$(which python2)" - cd ${srcdir}/${_pkgname}-${pkgver} + mkdir "${srcdir}/build" + cd "${srcdir}/build" + + # ./configure --with-f90=gfortran --prefix=${_installdir} --with-med_int=int --datadir=${_sharedir} --with-swig=yes + + local python_version=2.7 + local cmake_options="" + cmake_options+=" -DCMAKE_INSTALL_PREFIX=/usr" + cmake_options+=" -DCMAKE_BUILD_TYPE=Release" + cmake_options+=" -DMEDFILE_BUILD_SHARED_LIBS=ON" + cmake_options+=" -DMEDFILE_BUILD_TESTS=OFF" + cmake_options+=" -DMEDFILE_INSTALL_DOC=ON" + cmake_options+=" -DMEDFILE_BUILD_PYTHON=ON" + cmake_options+=" -DPYTHON_INCLUDE_DIR=/usr/include/python${python_version}" + cmake_options+=" -DPYTHON_LIBRARY=/usr/lib/python${python_version}/config/libpython${python_version}.so" + + # hdf5-1.8 + cmake_options+=" -DHDF5_INCLUDE_DIRS:PATH=/usr/include/hdf5_18/" + cmake_options+=" -DHDF5_LIBRARY_DIRS:PATH=/usr/lib/hdf5_18/" + cmake_options+=" -DHDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc_18" + cmake_options+=" -DHDF5_C_LIBRARY_hdf5:FILEPATH=/usr/lib/hdf5_18/libhdf5.so" + cmake_options+=" -DHDF5_DIFF_EXECUTABLE:FILEPATH=/usr/bin/h5diff_18" + + cmake ${cmake_options} \ + ../${_pkgname}-${pkgver} - ./configure --with-f90=gfortran --prefix=${_installdir} --with-med_int=int --datadir=${_sharedir} --with-swig=yes make } package() { - cd ${srcdir}/${_pkgname}-${pkgver} + cd "${srcdir}/build" make DESTDIR=${pkgdir} install - - # now move the testprograms to share, we don't want all the stuff in the bindir - cp -dpr --no-preserve=ownership ${pkgdir}/usr/bin/testc ${pkgdir}${_sharedir}/testc - cp -dpr --no-preserve=ownership ${pkgdir}/usr/bin/testf ${pkgdir}${_sharedir} - cp -dpr --no-preserve=ownership ${pkgdir}/usr/bin/unittests ${pkgdir}${_sharedir} - cp -dpr --no-preserve=ownership ${pkgdir}/usr/bin/usescases ${pkgdir}${_sharedir} - rm -r ${pkgdir}/usr/bin/{usescases,unittests,testf,testc} } |