summaryrefslogtreecommitdiff
path: root/extra/ffcall/PKGBUILD
blob: e727b0dcd109bd4100a2826c02eb35d16571c50d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# $Id: PKGBUILD 128452 2011-06-24 01:23:15Z eric $
# Maintainer: Vesa Kaihlavirta <vegai@iki.fi>
# Contributor: Michael Baehr <usemike@spamblocked.com>

pkgname=ffcall
pkgver=1.10
pkgrel=4
pkgdesc="C library for implementing foreign function calls in embedded interpreters"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.gnu.org/software/libffcall/"
license=('GPL2')
options=('!libtool' '!makeflags')
source=(http://www.haible.de/bruno/gnu/${pkgname}-${pkgver}.tar.gz
        mipsn32.patch)
md5sums=('2db95007e901f3bc2ae7e5a9fe9ebea4'
         '64045515f2664b5544943c6754bf2737')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  [ "$CARCH" = "x86_64" ] && CONFIGFLAG="--with-pic"
  [ "$CARCH" = "mips64el" ] && {
    CONFIGFLAG="--with-pic"
    patch -Np0 -i "$srcdir/mipsn32.patch"
  }

  ./configure --prefix=/usr --mandir=/usr/share/man $CONFIGFLAG

  make
}

check() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make check
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  install -d "${pkgdir}"/usr/share/{man,doc/ffcall}
  make DESTDIR="${pkgdir}" htmldir=/usr/share/doc/ffcall install
}