# $Id: PKGBUILD 239855 2015-05-28 13:37:12Z jgc $
#Maintainer : Ionut Biru <ibiru@archlinux.org>
#Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=seed
pkgver=3.8.1
pkgrel=4
pkgdesc="Library and interpreter for JavaScript with GObject type system bindings."
arch=('i686' 'x86_64')
url="https://wiki.gnome.org/Projects/Seed"
license=('LGPL')
depends=('webkitgtk3' 'gobject-introspection-runtime' 'gnome-js-common' 'mpfr')
makedepends=('intltool' 'gobject-introspection')
source=(http://ftp.gnome.org/pub/GNOME/sources/${pkgname}/3.8/${pkgname}-${pkgver}.tar.xz
        GLib.js rl63.patch)
sha256sums=('80cb4db7fa6f6cf8d3e255fc45a81657388d458bc8bf23e4089e35f69eeaac32'
            '2a8185df661056e12830d0a29155dc539016fc349a823f5aec09dd15bbb9239b'
            '8d91b5c46438350b139609e63f6f863fcd9949d631f87c3c4e267ad4987181a1')

prepare() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  patch -p1 -i ../rl63.patch # Readline 6.3 compat (deprecated typedefs gone)
  cp ../GLib.js extensions/
}

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  ./configure --prefix=/usr --disable-static
  make
}

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