summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Saurel2020-07-06 09:31:04 +0200
committerGuilhem Saurel2020-07-06 09:31:04 +0200
commitd415a3683f8c9d36d16ab2335632462437535123 (patch)
tree1c0ee866e2aa0998d634b06477f115d148cd2807
parenta4af97614590c7fd3cae62ece0050c5403c79635 (diff)
downloadaur-d415a3683f8c9d36d16ab2335632462437535123.tar.gz
disable tests & fix DESTDIR
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD11
-rw-r--r--pycompile.patch13
3 files changed, 23 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 864d0be5d46..0163b65fc25 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = med-openmpi
pkgdesc = Modelisation et Echanges de Donnees, i.e. Data Modelization and Exchanges - code-aster exchange module linked to hdf5
pkgver = 4.0.0
- pkgrel = 3
+ pkgrel = 4
url = https://www.salome-platform.org/downloads
arch = x86_64
license = LGPL
@@ -14,8 +14,10 @@ pkgbase = med-openmpi
depends = python
source = http://files.salome-platform.org/Salome/other/med-4.0.0.tar.gz
source = https://gist.githubusercontent.com/jedbrown/527ef81ff59a0dccf833da40fdd15a47/raw/7482f9a42fdd277f5f9cf0167ea7a3381032ca7a/hdf5-1.12.patch
+ source = pycompile.patch
sha256sums = a474e90b5882ce69c5e9f66f6359c53b8b73eb448c5f631fa96e8cd2c14df004
sha256sums = 82d28b6ae2ee6ceb3c6de9acb861a49741e2e759c7c556217f7d284216788206
+ sha256sums = fec659efc391376eeb73c2e749d98ae504a178dde2d2e9d7b81d26537a043300
pkgname = med-openmpi
provides = med
diff --git a/PKGBUILD b/PKGBUILD
index 2226e7d34bc..2d792076e2f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,7 +10,7 @@
_pkgname='med'
pkgname=('med-openmpi' 'med-openmpi-docs')
pkgver=4.0.0
-pkgrel=3
+pkgrel=4
pkgdesc="Modelisation et Echanges de Donnees, i.e. Data Modelization and Exchanges - code-aster exchange module linked to hdf5"
url="https://www.salome-platform.org/downloads"
license=('LGPL')
@@ -18,19 +18,22 @@ depends=('hdf5-openmpi' 'tk' 'python')
makedepends=('gcc-fortran' 'swig' 'openmpi' 'cmake')
arch=('x86_64')
source=("http://files.salome-platform.org/Salome/other/${_pkgname}-${pkgver}.tar.gz"
- "https://gist.githubusercontent.com/jedbrown/527ef81ff59a0dccf833da40fdd15a47/raw/7482f9a42fdd277f5f9cf0167ea7a3381032ca7a/hdf5-1.12.patch")
+ "https://gist.githubusercontent.com/jedbrown/527ef81ff59a0dccf833da40fdd15a47/raw/7482f9a42fdd277f5f9cf0167ea7a3381032ca7a/hdf5-1.12.patch"
+ "pycompile.patch")
sha256sums=('a474e90b5882ce69c5e9f66f6359c53b8b73eb448c5f631fa96e8cd2c14df004'
- '82d28b6ae2ee6ceb3c6de9acb861a49741e2e759c7c556217f7d284216788206')
+ '82d28b6ae2ee6ceb3c6de9acb861a49741e2e759c7c556217f7d284216788206'
+ 'fec659efc391376eeb73c2e749d98ae504a178dde2d2e9d7b81d26537a043300')
prepare() {
cd ${_pkgname}-${pkgver}
patch -p1 -i "$srcdir/hdf5-1.12.patch"
+ patch -p1 -i "$srcdir/pycompile.patch"
}
build() {
cd ${_pkgname}-${pkgver}
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr \
- -DMEDFILE_USE_MPI=ON -DMEDFILE_BUILD_PYTHON=ON .
+ -DMEDFILE_USE_MPI=ON -DMEDFILE_BUILD_PYTHON=ON -DMEDFILE_BUILD_TESTS=OFF .
make
}
diff --git a/pycompile.patch b/pycompile.patch
new file mode 100644
index 00000000000..464ff91db98
--- /dev/null
+++ b/pycompile.patch
@@ -0,0 +1,13 @@
+diff --git a/config/cmake_files/medMacros.cmake b/config/cmake_files/medMacros.cmake
+index 7c82cec..f6ca6d0 100644
+--- a/config/cmake_files/medMacros.cmake
++++ b/config/cmake_files/medMacros.cmake
+@@ -457,7 +457,7 @@ MACRO(INSTALL_AND_COMPILE_PYTHON_FILE PYFILE2COMPINST PYFILELOC)
+ GET_FILENAME_COMPONENT(inputname ${input} NAME)
+ INSTALL(FILES ${input} DESTINATION ${CMAKE_INSTALL_PREFIX}/${PYFILELOC})
+ INSTALL(CODE "MESSAGE(STATUS \"py compiling ${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}\")")
+- INSTALL(CODE "SET(CMD \"import py_compile ; py_compile.compile('${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}')\")")
++ INSTALL(CODE "SET(CMD \"import py_compile, os ; py_compile.compile(os.environ.get('DESTDIR', '') + '/' + '${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}', dfile='${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}')\")")
+ INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c \"\${CMD}\")")
+ INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -O -c \"\${CMD}\")")
+ ENDFOREACH(input ${PYFILE2COMPINST})