summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Caldas2023-08-23 12:08:21 +0100
committerRenato Caldas2023-08-23 12:08:21 +0100
commit3d8c87f6235a6551516c17153f9b7c24db35eea8 (patch)
tree4f2f377739d617037c7feda61063b8c260e808d6
downloadaur-3d8c87f6235a6551516c17153f9b7c24db35eea8.tar.gz
First import
-rw-r--r--.SRCINFO33
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD67
3 files changed, 101 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..c889978de006
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,33 @@
+pkgbase = basix-git
+ pkgdesc = FEniCS finite element basis evaluation library
+ pkgver = 0.7.0.dev0_r934.571d504
+ pkgrel = 1
+ url = https://fenicsproject.org
+ arch = x86_64
+ groups = dolfinx-git
+ license = MIT
+ makedepends = git
+ makedepends = cmake
+ makedepends = python-build
+ makedepends = python-installer
+ makedepends = python-wheel
+ makedepends = python-setuptools
+ makedepends = pybind11
+ makedepends = python-scikit-build-core
+ makedepends = chrpath
+ conflicts = basix
+ conflicts = fenics-basix-git
+ conflicts = python-fenics-basix
+ conflicts = python-basix-git
+ source = git+https://github.com/FEniCS/basix
+ sha512sums = SKIP
+
+pkgname = basix-git
+ depends = blas
+ depends = lapack
+
+pkgname = python-fenics-basix-git
+ depends = basix-git
+ depends = python-fenics-ufl-git
+ depends = python-numpy
+ optdepends = python-numba: for Numba helper function support
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..72e8ffc0db8a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..dce32b7343af
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,67 @@
+# Maintainer: Renato Caldas <renato@calgera.com>
+# Contributor: Carlos Aznarán <caznaranl@uni.pe>
+pkgname=('basix-git' 'python-fenics-basix-git')
+#pkgbase='python-fenics-basix-git'
+pkgdesc='FEniCS finite element basis evaluation library'
+pkgver="0.7.0.dev0"_r934.571d504
+pkgrel=1
+arch=('x86_64')
+url='https://fenicsproject.org'
+license=('MIT')
+groups=('dolfinx-git')
+makedepends=('git' 'cmake' 'python-build' 'python-installer' 'python-wheel'
+ 'python-setuptools' 'pybind11' 'python-scikit-build-core' 'chrpath')
+conflicts=('basix' 'fenics-basix-git' 'python-fenics-basix' 'python-basix-git')
+source=('git+https://github.com/FEniCS/basix')
+sha512sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/basix"
+ # The main repo unfortunately has no meaningful tags..
+ printf "%s_r%s.%s" "$(sed -n -e 's/^version *= *\(.*\)/\1/p' pyproject.toml)" \
+ "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
+}
+
+prepare() {
+ git -C "${srcdir}/basix" clean -dfx
+}
+
+build() {
+ cd "$srcdir/basix"
+
+ # Build c++ library
+ cmake -DCMAKE_BUILD_TYPE="Release" \
+ -S cpp \
+ -B build \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -Wno-dev
+ cmake --build build
+
+ # HACK: Install to temporary dir, required for building the wheel
+ export DESTDIR="$srcdir/tmp"
+ cmake --install build
+
+ # Build the python wheel
+ export CMAKE_PREFIX_PATH="$srcdir/tmp/usr"
+ python -m build --wheel --no-isolation "$srcdir/basix/python"
+}
+
+package_basix-git() {
+ depends=('blas' 'lapack')
+
+ cd "$srcdir/basix"
+ DESTDIR="$pkgdir" cmake --install build
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/basix-git/LICENSE"
+}
+
+package_python-fenics-basix-git() {
+ depends=('basix-git' 'python-fenics-ufl-git' 'python-numpy')
+ optdepends=('python-numba: for Numba helper function support')
+
+ cd "$srcdir/basix/python"
+ python -m installer --destdir="$pkgdir" dist/*.whl
+ install -Dm644 ../LICENSE "$pkgdir/usr/share/licenses/python-fenics-basix-git/LICENSE"
+
+ # Remove insecure runpath
+ find "$pkgdir" -iname "_basixcpp*so" | xargs chrpath --delete
+}