blob: f3f001b99de3cdda23b34ef0bcbcc2af4f9713d7 (
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
|
package netbsd-utils {
description = "small utilities from NetBSD";
version = unversioned;
ccommon = true;
files = {
"col.c";
"getent.c";
"getconf.c";
};
exec = generic {
cross = `
QEMU="qemu-`+linuxArch+` -L `+prefix+`/`+arch+` "
`;
build = `
CC="${CC:-cc} -O3"
LIBBSD="-Wl,-Bstatic $(pkg-config --static --libs --cflags libbsd-overlay) -Wl,-Bdynamic"
mkdir bin
$CC $LIBBSD -o bin/col /extra/col.c
$CC -o bin/getent /extra/getent.c
$CC -o bin/getconf /extra/getconf.c
`;
check = `
T="${QEMU:-} ./bin/"
${T}col <<< 'col ok'
${T}getent passwd cure
${T}getconf PAGE_SIZE
`;
install = `
mkdir /work`+prefix+`
mv bin /work`+prefix+`
`;
};
inputs = [
libmd,
libbsd,
];
runtime = nil;
tools = [ pkg-config ];
native = [ qemu ];
}
|