aports/community/libmedc/APKBUILD
2025-05-31 13:20:59 +00:00

59 lines
2.1 KiB
Text

# Contributor: Aiden Grossman <agrossman154@yahoo.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libmedc
pkgver=5.0.0
pkgrel=0
pkgdesc="Open source library for numerical simulation"
url="https://www.salome-platform.org/"
arch="all"
license="GPL-3.0-or-later"
makedepends="cmake hdf5-dev swig python3-dev samurai"
options="!check" #test suite is nonfunctional with python bindings
subpackages="$pkgname-dev $pkgname-doc $pkgname-python-pyc $pkgname-python:_py"
# Upstream disappeared:
# https://www.salome-platform.org/downloads
# https://files.salome-platform.org/Salome/other/med-4.1.1.tar.gz
#
# Using a fork on GitHub by one of the FreeCAD developers instead.
#
source="
$pkgname-$pkgver.tar.gz::https://github.com/chennes/med/archive/refs/tags/v$pkgver.tar.gz
cmake-config-dir.patch
hdf5-1.14.patch
med-swig-4.3.0.patch
med-py3.13.patch
"
builddir="$srcdir/med-$pkgver"
build() {
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_SKIP_RPATH=ON \
-DMEDFILE_BUILD_PYTHON=ON \
-DMEDFILE_BUILD_TESTS=OFF
cmake --build build
}
check() {
cd build
HDF5_DISABLE_VERSION_CHECK=1 LD_LIBRARY_PATH="$srcdir"/build/src ctest -E '._Python' --output-on-failure
}
package() {
DESTDIR="$pkgdir" cmake --install build
}
_py() {
pkgdesc="Python bindings for libmedc"
depends="python3"
amove usr/lib/python3*
}
sha512sums="
6ebb06bf403dbe32512a42179a42de3da6f264034fcc143fcb2b780c5d564527656d3ef28ebf25d7bde93a9d2a44df0d10a09d60e6f4720ba9d25719a4e30d37 libmedc-5.0.0.tar.gz
8d0f58cd67d205fbacaff0e6da76e2ee5473457b478ede13a551ebe5853c0716c7406b74c3792e1ace33a34d352fccca8dd2940f063a7c060a12529d060a991a cmake-config-dir.patch
78bfbd17a052c039244ce314d53b0d5e5e6ba6773fe7a836999bf7ddf4b6d732dfda95c58681dd9d7e9586e4d36d3dfe7cca15d45fa7d3d453aef72423fcd5c0 hdf5-1.14.patch
833187253fcbebb13f239f1f559333db6a7d3ef87c4f7b896f64970a3e553735ed01a82d6d4a368a2261e33e364b05ea3abbff3fd58c8221515aa72aa52684a7 med-swig-4.3.0.patch
6c993d924257a01b8bce1952ecc34346ab654a103f4374d514c3616cd6cdf94373b2a4d04b91a68933cd5acbc4fc54becab6bd58f32762973bbee8255c5d7a3d med-py3.13.patch
"