# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: Daichi Shinozaki <dsdseg@gmail.com>
# Contributor: Dwight Schauer <dschauer@gmail.com>
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
# Contributor: Christoph Zeiler <archNOSPAM_at_moonblade.dot.org>
# Contributor: Michael 'manveru' Fellinger <m.fellinger@gmail.com>
# Contributor: Caleb McCombs <erdrick016+aur@gmail.com>
# Contributor: Christian Hesse <arch@eworm.de>

pkgname=neko
pkgver=2.2.0
pkgrel=6
pkgdesc='High-level and dynamically typed programming language'
url='https://nekovm.org/'
license=(LGPL)
arch=(x86_64)
depends=(gc gtk2 mariadb-libs mbedtls sqlite)
makedepends=(apache apr cmake git mbedtls ninja)
optdepends=('apache: for extending Apache with mod_neko')
options=(!strip)
source=("git+https://github.com/HaxeFoundation/neko#tag=v${pkgver//./-}")
sha256sums=('SKIP')

prepare() {
  sed -i '/xlocale.h/d' $pkgname/libs/std/sys.c
}

build() {
  mkdir -p build
  cd build
  cmake ../$pkgname \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DRUN_LDCONFIG=OFF \
    -GNinja
  ninja
}

package() {
  DESTDIR="$pkgdir" ninja -C build install
}

# getver: nekovm.org/download
# vim: ts=2 sw=2 et:
