summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8d0f7dce83f64b33c19a65e768493df2d92c3664 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Contributor: Louis-Guillaume Gagnon <louis.guillaume.gagnon@gmail.com>
# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>

pkgname=gambit-c-git
pkgver=4.9.5.r5.gf1fbe9aa
pkgrel=1
pkgdesc="Scheme R5RS interpreter and compiler (via C) - git version"
arch=('i686' 'x86_64')
url="http://gambitscheme.org"
license=('Apache' 'LGPL2.1')
depends=('bash')
makedepends=('git')
checkdepends=('git')
provides=('gambit-c')
conflicts=('gambit-c')
options=('staticlibs' '!lto' '!buildflags' '!makeflags')
source=(gambit-scheme::git+https://github.com/gambit/gambit.git math.h.patch)
md5sums=('SKIP'
         '59f7a342d87e0970a6b3a222d4c954cb')

pkgver() {
  cd gambit-scheme
  git describe --tags|sed 's+-+.r+'| sed 's+-+.+' | cut -c2-
}

prepare() {
  cd gambit-scheme
  patch -Np1 < "$srcdir"/math.h.patch
}

build() {
  cd gambit-scheme
  export CFLAGS=`echo " $CFLAGS " | sed -e "s/-O1 / /g" -e "s/ -O2 / /g" -e "s/ -O3 / /g"`
  export CXXFLAGS=`echo " $CXXFLAGS " | sed -e "s/-O1 / /g" -e "s/ -O2 / /g" -e "s/ -O3 / /g"`

  ./configure --prefix=/usr \
      --docdir=/usr/share/gambit-c \
      --infodir=/usr/share/info \
      --libdir=/usr/lib/gambit-c \
      --disable-shared \
      --enable-compiler-name=gambitc \
      --enable-interpreter-name=gambiti \
      --enable-single-host
  make
  make doc 
}

check() {
  cd gambit-scheme
  make check || true
}

package() {
  cd gambit-scheme
  make DESTDIR="$pkgdir/" install
  ln -sf /usr/bin/gambitc "$pkgdir"/usr/bin/gsc-script
}