# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Arjan Timmerman <arjan@soulfly.nl>

pkgname=genius
pkgver=1.0.26
pkgrel=1
pkgdesc="Advanced calculator including a mathematical programming language"
arch=('x86_64')
license=('GPL')
url="https://www.jirka.org/genius.html"
depends=('mpfr' 'glib2' 'hicolor-icon-theme' 'gtk3' 'amtk' 'vte3' 'gtksourceview4')
makedepends=('intltool' 'gtk-update-icon-cache' 'python')
options=('!makeflags')
source=(https://download.gnome.org/sources/genius/1.0/${pkgname}-${pkgver}.tar.xz)
sha256sums=('e90660656c89086a29bebb9fa084b309d1153c15f23b24ea05be82cd700c9112')

build() {
  cd $pkgname-$pkgver
  autoreconf -fi
  ./configure --prefix=/usr --sysconfdir=/etc \
      --libexecdir=/usr/lib/genius \
      --localstatedir=/var --disable-static \
      --disable-update-mimedb
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="${pkgdir}" install
}
