2023-03-10 18:47:02 +03:00
|
|
|
distributable:
|
|
|
|
url: https://gitlab.freedesktop.org/slirp/libslirp/-/archive/v{{ version }}/libslirp-v{{ version }}.tar.gz
|
|
|
|
strip-components: 1
|
|
|
|
|
|
|
|
versions:
|
2023-05-01 20:14:59 +03:00
|
|
|
gitlab: gitlab.freedesktop.org:slirp/libslirp
|
2023-03-10 18:47:02 +03:00
|
|
|
|
|
|
|
dependencies:
|
|
|
|
gnome.org/glib: ^2
|
|
|
|
|
|
|
|
build:
|
|
|
|
dependencies:
|
|
|
|
mesonbuild.com: ^0.63
|
|
|
|
ninja-build.org: 1
|
|
|
|
freedesktop.org/pkg-config: ^0.29
|
|
|
|
script: |
|
|
|
|
meson build $ARGS
|
|
|
|
ninja -C build install all
|
|
|
|
env:
|
|
|
|
ARGS:
|
2023-10-02 03:41:57 +03:00
|
|
|
- -Ddefault_library=both
|
2023-03-10 18:47:02 +03:00
|
|
|
- --prefix={{ prefix }}
|
|
|
|
- --libdir={{ prefix }}/lib
|
|
|
|
- --buildtype=release
|
|
|
|
- --wrap-mode=nofallback
|
|
|
|
|
|
|
|
test:
|
|
|
|
script: |
|
|
|
|
mv $FIXTURE test.c
|
|
|
|
gcc test.c -lslirp -o test
|
|
|
|
./test
|
|
|
|
fixture: |
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <slirp/libslirp.h>
|
|
|
|
int main() {
|
|
|
|
SlirpConfig cfg;
|
|
|
|
memset(&cfg, 0, sizeof(cfg));
|
|
|
|
cfg.version = 1;
|
|
|
|
cfg.in_enabled = true;
|
|
|
|
cfg.vhostname = "testServer";
|
|
|
|
Slirp* ctx = slirp_new(&cfg, NULL, NULL);
|
|
|
|
return 0;
|
|
|
|
}
|