summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 75669adbb7aaada57650ab4e4899ef63cdccfa31 (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
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Geoffroy Carrier <geoffroy.carrier@koon.fr>
# Contributer: Jason Chu <jchu@xentac.net>

pkgname=gprolog
pkgver=1.5.0
pkgrel=2
pkgdesc="GNU Prolog"
arch=('x86_64')
url="http://www.gprolog.org/"
depends=('glibc')
license=('GPL')
options=('staticlibs' '!lto')
source=("https://ftp.gnu.org/gnu/gprolog/gprolog-$pkgver.tar.gz")
sha256sums=('670642b43c0faa27ebd68961efb17ebe707688f91b6809566ddd606139512c01')

build() {
   cd "$srcdir/gprolog-$pkgver/src"
   CFLAGS+=' -fcommon' # https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common
   ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-c-flags="$CFLAGS -fPIC" --disable-regs
   make
}

package() {
   cd "$srcdir/gprolog-$pkgver/src"
   make install \
	INSTALL_DIR="$pkgdir"/usr/share/gprolog \
	LINKS_DIR="$pkgdir"/usr/bin \
	DOC_DIR="$pkgdir"/usr/share/gprolog/doc \
	HTML_DIR="$pkgdir"/usr/share/gprolog/doc/Html \
	EXAMPLES_DIR="$pkgdir"/usr/share/gprolog \
	sysconfdir="$pkgdir"/etc \
	localstatedir="$pkgdir"/var
   cd "$pkgdir"/usr/bin
   rm *
   ln -s /usr/share/gprolog/bin/fd2c
   ln -s /usr/share/gprolog/bin/gplc
   ln -s /usr/share/gprolog/bin/gprolog
   ln -s /usr/share/gprolog/bin/hexgplc
   ln -s /usr/share/gprolog/bin/ma2asm
   ln -s /usr/share/gprolog/bin/pl2wam
   ln -s /usr/share/gprolog/bin/wam2ma
}