mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-04 20:06:43 +02:00
testing/9base: new abuild
The port for s390x is as recommended on https://plan9port-review.googlesource.com/1030 Closes !299
This commit is contained in:
parent
ead7994005
commit
d7536614fd
55
testing/9base/APKBUILD
Normal file
55
testing/9base/APKBUILD
Normal file
@ -0,0 +1,55 @@
|
||||
# Contributor: Joshua Haase <hahj87@gmail.com>
|
||||
# Maintainer: Joshua Haase <hahj87@gmail.com>
|
||||
pkgname="9base"
|
||||
pkgver=6
|
||||
pkgrel=0
|
||||
pkgdesc="A port of various Plan 9 tools for Unix."
|
||||
url="https://tools.suckless.org/9base/"
|
||||
arch="all !armv7 !armhf !aarch64" # Needs arch specific config.mk
|
||||
license="MIT"
|
||||
makedepends="libucontext-dev linux-headers"
|
||||
subpackages="$pkgname-doc $pkgname-troff"
|
||||
options="!check" # No test suite present
|
||||
source="https://dl.suckless.org/tools/9base-$pkgver.tar.gz
|
||||
config.mk.x86_64
|
||||
config.mk.i686
|
||||
config.mk.s390x
|
||||
config.mk.ppc64le
|
||||
dirread.patch
|
||||
s390x.patch"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
cp "$srcdir/config.mk.$(uname -m)" "$builddir/config.mk"
|
||||
}
|
||||
|
||||
build() {
|
||||
make DESTDIR="$pkgdir" all
|
||||
}
|
||||
|
||||
package() {
|
||||
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
||||
make DESTDIR="$pkgdir" install
|
||||
}
|
||||
|
||||
doc() {
|
||||
default_doc
|
||||
mkdir -p "$subpkgdir/usr/lib/9base/share"
|
||||
mv "$pkgdir/usr/lib/9base/share/man" "$subpkgdir/usr/lib/9base/share"
|
||||
}
|
||||
|
||||
troff() {
|
||||
cd "$pkgdir"
|
||||
mkdir -p "$subpkgdir/usr/lib/9base/bin"
|
||||
mv "$pkgdir/usr/lib/9base/bin/troff" "$subpkgdir/usr/lib/9base/bin/troff"
|
||||
mkdir -p "$subpkgdir/usr/lib/9base/lib/troff"
|
||||
mv "$pkgdir/usr/lib/9base/lib/troff" "$subpkgdir/usr/lib/9base/lib/troff"
|
||||
}
|
||||
|
||||
sha512sums="38108a94118b56c6f3982e692beb1068c52f9aecd74447d6b552b77fae5e365eab72b4781bdf07d9696ac89d54371c1cae8cc0363de510b53988302acef50dba 9base-6.tar.gz
|
||||
3a30955d59ad78c1bc4e2fbd0f511eb85624ed48b0aeceef436e3456f685690e064eb1f171a2080a34a0fcb40d874277a282864c720c9e612eca3ad848dec35e config.mk.x86_64
|
||||
7a58d4762c5ec9a0191f2cce15b23b2e60ec9445c357dc2e3925a5b4d5dec1c5eed6fb3565be07a25616c0c2b0768c21737b2d35082deb17bfc7a7f5f0c0d2a6 config.mk.i686
|
||||
61e67a22abf8f7d3dbfadda92cf0836e8726ae8225939318d0bf34dc05b47a12dd41de895f7b5df515ba5cd783dae368cce98706366cc28360a1987b4e7c652c config.mk.s390x
|
||||
dd0f9ff55e103fd16f689f01e41769cf6bc6370201e790bf64236570cda2d0e6ef2954f1b5798feb4ebd65fc1a0563ce71c8a9b7fb05166a8ff28ac8be472dfe config.mk.ppc64le
|
||||
5b47647245366e786059a28747fe9a36fd87d9df2e1a7f68e9a41f4adb7ec96f230a9abe94acbe5f82d62f4f85b061ff7ab7356d32072dd9ef7f677379f456f5 dirread.patch
|
||||
f1f05e2a6081f2a451256de9af669e1ff1e82b6603b376677825421c11bd6ef22a8ab0eb89c15b0589252bada71b58214b6306127bdd379952203105f14e49e9 s390x.patch"
|
||||
24
testing/9base/config.mk.i686
Normal file
24
testing/9base/config.mk.i686
Normal file
@ -0,0 +1,24 @@
|
||||
# Customize to fit your system
|
||||
|
||||
# paths
|
||||
PREFIX = /usr/lib/9base
|
||||
MANPREFIX = ${PREFIX}/share/man
|
||||
|
||||
VERSION = 6
|
||||
OBJTYPE = 386
|
||||
#OBJTYPE = arm
|
||||
#OBJTYPE = x86_64
|
||||
|
||||
# Linux/BSD
|
||||
#CFLAGS += -Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -c -I. -DPREFIX="\"${PREFIX}\""
|
||||
CFLAGS += -c -I. -DPREFIX="\"${PREFIX}\""
|
||||
LDFLAGS += -static
|
||||
|
||||
# Solaris
|
||||
#CFLAGS = -fast -xtarget=ultra -D__sun__ -c -I. -DPREFIX="\"${PREFIX}\""
|
||||
#LDFLAGS = -dn
|
||||
|
||||
# compiler
|
||||
AR = ar rc
|
||||
CC = cc
|
||||
YACC = ../yacc/9yacc
|
||||
22
testing/9base/config.mk.ppc64le
Normal file
22
testing/9base/config.mk.ppc64le
Normal file
@ -0,0 +1,22 @@
|
||||
# Customize to fit your system
|
||||
|
||||
# paths
|
||||
PREFIX = /usr/lib/9base
|
||||
MANPREFIX = ${PREFIX}/share/man
|
||||
|
||||
VERSION = 6
|
||||
OBJTYPE = power
|
||||
|
||||
# Linux/BSD
|
||||
#CFLAGS += -Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -c -I. -DPREFIX="\"${PREFIX}\""
|
||||
CFLAGS += -c -I. -DPREFIX="\"${PREFIX}\""
|
||||
LDFLAGS += -static
|
||||
|
||||
# Solaris
|
||||
#CFLAGS = -fast -xtarget=ultra -D__sun__ -c -I. -DPREFIX="\"${PREFIX}\""
|
||||
#LDFLAGS = -dn
|
||||
|
||||
# compiler
|
||||
AR = ar rc
|
||||
CC = cc
|
||||
YACC = ../yacc/9yacc
|
||||
22
testing/9base/config.mk.s390x
Normal file
22
testing/9base/config.mk.s390x
Normal file
@ -0,0 +1,22 @@
|
||||
# Customize to fit your system
|
||||
|
||||
# paths
|
||||
PREFIX = /usr/lib/9base
|
||||
MANPREFIX = ${PREFIX}/share/man
|
||||
|
||||
VERSION = 6
|
||||
OBJTYPE = s390x
|
||||
|
||||
# Linux/BSD
|
||||
#CFLAGS += -Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -c -I. -DPREFIX="\"${PREFIX}\""
|
||||
CFLAGS += -c -I. -DPREFIX="\"${PREFIX}\""
|
||||
LDFLAGS += -static
|
||||
|
||||
# Solaris
|
||||
#CFLAGS = -fast -xtarget=ultra -D__sun__ -c -I. -DPREFIX="\"${PREFIX}\""
|
||||
#LDFLAGS = -dn
|
||||
|
||||
# compiler
|
||||
AR = ar rc
|
||||
CC = cc
|
||||
YACC = ../yacc/9yacc
|
||||
24
testing/9base/config.mk.x86_64
Normal file
24
testing/9base/config.mk.x86_64
Normal file
@ -0,0 +1,24 @@
|
||||
# Customize to fit your system
|
||||
|
||||
# paths
|
||||
PREFIX = /usr/lib/9base
|
||||
MANPREFIX = ${PREFIX}/share/man
|
||||
|
||||
VERSION = 6
|
||||
#OBJTYPE = 386
|
||||
#OBJTYPE = arm
|
||||
OBJTYPE = x86_64
|
||||
|
||||
# Linux/BSD
|
||||
#CFLAGS += -Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -c -I. -DPREFIX="\"${PREFIX}\""
|
||||
CFLAGS += -c -I. -DPREFIX="\"${PREFIX}\""
|
||||
LDFLAGS += -static
|
||||
|
||||
# Solaris
|
||||
#CFLAGS = -fast -xtarget=ultra -D__sun__ -c -I. -DPREFIX="\"${PREFIX}\""
|
||||
#LDFLAGS = -dn
|
||||
|
||||
# compiler
|
||||
AR = ar rc
|
||||
CC = cc
|
||||
YACC = ../yacc/9yacc
|
||||
17
testing/9base/dirread.patch
Normal file
17
testing/9base/dirread.patch
Normal file
@ -0,0 +1,17 @@
|
||||
--- 9base-6/lib9/dirread.c
|
||||
+++ 9base-6/lib9/dirread.c
|
||||
@@ -10,13 +10,7 @@
|
||||
static int
|
||||
mygetdents(int fd, struct dirent *buf, int n)
|
||||
{
|
||||
- off_t off;
|
||||
- int nn;
|
||||
-
|
||||
- /* This doesn't match the man page, but it works in Debian with a 2.2 kernel */
|
||||
- off = p9seek(fd, 0, 1);
|
||||
- nn = getdirentries(fd, (void*)buf, n, &off);
|
||||
- return nn;
|
||||
+ return getdents(fd, buf, n);
|
||||
}
|
||||
#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
static int
|
||||
10
testing/9base/s390x.patch
Normal file
10
testing/9base/s390x.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- /dev/null
|
||||
+++ 9base-6/lib9/getcallerpc-s390x.c
|
||||
@@ -0,0 +1,7 @@
|
||||
+#include <lib9.h>
|
||||
+
|
||||
+ulong
|
||||
+getcallerpc(void *x)
|
||||
+{
|
||||
+ __builtin_return_address(0);
|
||||
+}
|
||||
Loading…
x
Reference in New Issue
Block a user