summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorGonzalo Exequiel Pedone2024-05-02 20:13:44 -0300
committerGonzalo Exequiel Pedone2024-05-02 20:13:44 -0300
commitf925ad63bbfe111bf0ceb244f0331541398f4fa6 (patch)
tree4e25591598577531112069afacc513c86ddb1b06 /PKGBUILD
downloadaur-f925ad63bbfe111bf0ceb244f0331541398f4fa6.tar.gz
New package.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD54
1 files changed, 54 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..5a3392954c09
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,54 @@
+# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
+# Contributor: Ronald van Haren <ronald@archlinux.org>
+# Contributor: Chirantan Ekbote <chirantan.ekbote at gmail.com>
+# Contributor: Kringel
+
+_android_arch=x86
+
+pkgname=android-${_android_arch}-eigen
+pkgver=3.4.0
+pkgrel=1
+arch=('any')
+pkgdesc="Lightweight C++ template library for vector and matrix math, a.k.a. linear algebra (Android ${_android_arch})"
+url='https://eigen.tuxfamily.org'
+license=('MPL-2.0'
+ 'Apache-2.0'
+ 'BSD-3-Clause'
+ 'Minpack'
+ 'LGPL-2.1-only OR LGPL-2.1-or-later')
+depends=('android-ndk')
+makedepends=('android-cmake'
+ "android-${_android_arch}-fftw"
+ "android-${_android_arch}-boost")
+options=(!strip !buildflags staticlibs !emptydirs)
+source=("https://gitlab.com/libeigen/eigen/-/archive/$pkgver/eigen-$pkgver.tar.gz"
+ 'eigen-vectorized-reduction-half.patch')
+sha256sums=('8586084f71f9bde545ee7fa6d00288b264a2b7ac3607b974e54d13e7162c1c72'
+ 'SKIP')
+
+prepare() {
+ cd "${srcdir}/eigen-$pkgver"
+
+ # Eigen installs all files in source dir, including the backup files of patch.
+ # With the first flag we disable the use of backup files.
+ patch --no-backup-if-mismatch -Np1 -i ../eigen-vectorized-reduction-half.patch
+}
+
+build() {
+ cd "${srcdir}/eigen-$pkgver"
+ source android-env ${_android_arch}
+
+ android-${_android_arch}-cmake \
+ -S . \
+ -B build \
+ -DBUILD_TESTING=OFF \
+ -DEIGEN_BUILD_DOC=OFF
+ make -C build $MAKEFLAGS
+}
+
+package() {
+ cd "${srcdir}/eigen-$pkgver"
+ source android-env ${_android_arch}
+
+ make -C build DESTDIR="$pkgdir" install
+}