mirror of
https://github.com/ivabus/pantry
synced 2025-06-08 08:20:32 +03:00
+numactl +libtool (#119)
This commit is contained in:
parent
0a87367017
commit
43037362d6
2 changed files with 53 additions and 0 deletions
15
projects/github.com/numactl/numactl/mynode.c
Normal file
15
projects/github.com/numactl/numactl/mynode.c
Normal file
|
@ -0,0 +1,15 @@
|
|||
#include <numa.h>
|
||||
#include <numaif.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int nd;
|
||||
char *man = numa_alloc(1000);
|
||||
*man = 1;
|
||||
if (get_mempolicy(&nd, NULL, 0, man, MPOL_F_NODE | MPOL_F_ADDR) < 0)
|
||||
perror("get_mempolicy");
|
||||
else
|
||||
printf("my node %d\n", nd);
|
||||
return 0;
|
||||
}
|
38
projects/github.com/numactl/numactl/package.yml
Normal file
38
projects/github.com/numactl/numactl/package.yml
Normal file
|
@ -0,0 +1,38 @@
|
|||
distributable:
|
||||
url: https://github.com/numactl/numactl/archive/refs/tags/v{{ version }}/numactl-{{ version }}.tar.gz
|
||||
strip-components: 1
|
||||
|
||||
versions:
|
||||
github: numactl/numactl
|
||||
|
||||
build:
|
||||
dependencies:
|
||||
tea.xyz/gx/cc: c99
|
||||
tea.xyz/gx/make: '*'
|
||||
gnu.org/autoconf: 2
|
||||
gnu.org/automake: 1
|
||||
gnu.org/libtool: 2
|
||||
gnu.org/m4: 1
|
||||
script: |
|
||||
# numa is linux only
|
||||
if test {{ hw.platform }} != "linux"
|
||||
then
|
||||
mkdir {{ prefix }}/bin
|
||||
touch {{ prefix }}/not-used-on-darwin
|
||||
exit
|
||||
fi
|
||||
|
||||
./autogen.sh
|
||||
./configure --prefix={{ prefix }}
|
||||
make --jobs {{ hw.concurrency }} install
|
||||
env:
|
||||
ACLOCAL_PATH: /opt/gnu.org/libtool/v2/share/aclocal
|
||||
|
||||
test:
|
||||
dependencies:
|
||||
tea.xyz/gx/cc: c99
|
||||
script: |
|
||||
if test {{ hw.platform }} != "linux"; then exit; fi
|
||||
|
||||
cc -lnuma mynode.c
|
||||
./a.out
|
Loading…
Reference in a new issue