summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1e73f70d4479881027133062b3b0d5214c01e4a9 (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
58
59
60
# Maintainer: Nikolaos Bezirgiannis <bezeria@gmail.com>
# Contributor: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Jachym Barvinek <jachymb@gmail.com>
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: John Proctor <jproctor@prium.net>
# Contributor: Juergen Hoetzel <juergen@archlinux.org>

pkgname=swi-prolog-git
pkgver=7.2.2.r0.ge10fe28
pkgrel=1
pkgdesc='Prolog environment (latest git stable version)'
arch=('x86_64' 'i686')
url='http://www.swi-prolog.org/'
license=('GPL' 'LGPL')
depends=('gmp' 'readline' 'openssl' 'libarchive')
makedepends=('git' 'libxft' 'libjpeg' 'unixodbc' 'libxpm' 'libxinerama')
optdepends=('unixodbc: for using the odbc4pl library'
            'libjpeg: for using the pl2xpce library'
            'libxpm: for using the pl2xpce library'
            'libxinerama: for using the pl2xpce library'
            'libxft: for using the pl2xpce library'
            'java-environment: for interfacing java with the jpl package')
#options=('!makeflags')
source=("git://github.com/SWI-Prolog/swipl")
sha256sums=('SKIP')
conflicts=('swi-prolog')
provides=('swi-prolog')

pkgver() {
  cd "$srcdir/swipl"
  git describe --long | sed -r 's/^V//;s/([^-]*-g)/r\1/;s/-/./g'
}

prepare() {
  cd "$srcdir/swipl"
  # fix submodules url
  sed -i -e 's,\.\.,git://github.com/SWI-Prolog,g' .gitmodules
  git submodule update --init
}

build() {
  cd "${srcdir}/swipl"

  echo 2 | ./configure --prefix=/usr --with-world
  cd src
  ./configure --enable-readline --prefix=/usr

  make -C ..
}

package() {
  cd "${srcdir}/swipl"        
  make DESTDIR="$pkgdir" install

  _tag=$(git describe --abbrev=0 --tags | sed -r 's/^V//g')

  # Fix for FS#20873
  chmod +x "$pkgdir/usr/lib/swipl-${_tag}/library/dialect/sicstus/swipl-lfr.pl"
}