blob: 1c55d46c49d7ca16cee13ba55a583ee77c6344da (
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
|
# Maintainer: Nicola Fontana <ntd@entidi.it>
pkgname=pforth-git
pkgver=20160529
pkgrel=1
pkgdesc='A portable implementation of the Forth programming language written in ANSI C'
arch=(any)
url='http://www.softsynth.com/pforth/'
license=(custom)
depends=()
makedepends=('git')
conflicts=('pforth')
provides=('pforth')
source=()
source=('git+https://github.com/philburk/pforth.git')
md5sums=('SKIP')
pkgver() {
cd "$srcdir/pforth"
git show -s --format="%ci" HEAD | sed -e 's/-//g' -e 's/ .*//'
}
build() {
local cflags='-DPF_DEFAULT_DICTIONARY=\"/usr/share/pforth/pforth.dic\"'
# --std=c89 implicitely declares off_t I/O functions such as ftello
cflags="$cflags --std=c89"
# -D_BSD_SOURCE=1 is defined to avoid the ‘ECHOCTL’ undeclared error
cflags="$cflags -D_BSD_SOURCE=1"
cd "$srcdir/pforth"
make -j 1 -f build/unix/Makefile all \
SRCDIR=. FULL_WARNINGS= DEBUGOPTS= EXTRA_CCOPTS="$cflags"
}
package() {
local prefix="$pkgdir/usr"
cd "$srcdir/pforth"
install -Dm755 pforth "$prefix/bin/pforth"
install -Dm755 pforth_standalone "$prefix/bin/pforth_standalone"
install -Dm644 pforth.dic "$prefix/share/pforth/pforth.dic"
install -Dm644 readme.txt "$prefix/share/pforth/README"
install -Dm644 releases.txt "$prefix/share/pforth/NEWS"
}
# vim:set ts=2 sw=2 et:
|