[arch-commits] Commit in (6 files)

Alexander Rødseth arodseth at archlinux.org
Tue Oct 6 14:23:39 UTC 2020


    Date: Tuesday, October 6, 2020 @ 14:23:38
  Author: arodseth
Revision: 719334

Add med, needed for FreeCAD

Added:
  med/
  med/repos/
  med/repos/community-x86_64/
  med/trunk/
  med/trunk/PKGBUILD
  med/trunk/pycompile.patch

-----------------+
 PKGBUILD        |   43 +++++++++++++++++++++++++++++++++++++++++++
 pycompile.patch |   13 +++++++++++++
 2 files changed, 56 insertions(+)

Added: med/trunk/PKGBUILD
===================================================================
--- med/trunk/PKGBUILD	                        (rev 0)
+++ med/trunk/PKGBUILD	2020-10-06 14:23:38 UTC (rev 719334)
@@ -0,0 +1,43 @@
+# Maintainer: Alexander F. Rødseth <xyproto at archlinux.org>
+# Contributor: Guilhem Saurel <guilhem at saurel.me>
+# Contributor: Michel Zou
+# Contributor: Oliver Goethel
+
+pkgname=med
+pkgver=4.0.0
+pkgrel=8
+pkgdesc='Generic pre- and post-processing platform for numerical simulation'
+url="https://www.salome-platform.org/downloads"
+license=(LGPL)
+arch=(x86_64)
+depends=(hdf5 python tk)
+makedepends=(cmake gcc-fortran ninja swig)
+source=("https://files.salome-platform.org/Salome/other/$pkgname-$pkgver.tar.gz"
+        'https://gist.githubusercontent.com/jedbrown/527ef81ff59a0dccf833da40fdd15a47/raw/7482f9a42fdd277f5f9cf0167ea7a3381032ca7a/hdf5-1.12.patch'
+        pycompile.patch)
+sha256sums=('a474e90b5882ce69c5e9f66f6359c53b8b73eb448c5f631fa96e8cd2c14df004'
+            '82d28b6ae2ee6ceb3c6de9acb861a49741e2e759c7c556217f7d284216788206'
+            'fec659efc391376eeb73c2e749d98ae504a178dde2d2e9d7b81d26537a043300')
+
+prepare() {
+  cd $pkgname-$pkgver
+  patch -p1 -i ../hdf5-1.12.patch
+  patch -p1 -i ../pycompile.patch
+}
+
+build() {
+  mkdir build
+  cd build
+  cmake ../$pkgname-$pkgver \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DMEDFILE_BUILD_PYTHON=ON \
+    -DMEDFILE_BUILD_TESTS=OFF \
+    -DMEDFILE_INSTALL_DOC=OFF \
+    -GNinja
+  ninja
+}
+
+package() {
+  DESTDIR="$pkgdir" ninja -C build install
+}

Added: med/trunk/pycompile.patch
===================================================================
--- med/trunk/pycompile.patch	                        (rev 0)
+++ med/trunk/pycompile.patch	2020-10-06 14:23:38 UTC (rev 719334)
@@ -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})


More information about the arch-commits mailing list