diff options
| -rw-r--r-- | meta-networking/recipes-support/nbdkit/nbdkit/0001-server-Fix-build-when-printf-is-a-macro.patch | 39 | ||||
| -rw-r--r-- | meta-networking/recipes-support/nbdkit/nbdkit_git.bb | 36 |
2 files changed, 75 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/nbdkit/nbdkit/0001-server-Fix-build-when-printf-is-a-macro.patch b/meta-networking/recipes-support/nbdkit/nbdkit/0001-server-Fix-build-when-printf-is-a-macro.patch new file mode 100644 index 0000000000..c7ec41eb9a --- /dev/null +++ b/meta-networking/recipes-support/nbdkit/nbdkit/0001-server-Fix-build-when-printf-is-a-macro.patch | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | From 28f07715ab4d670ce81e12776bbece043305bd83 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sat, 11 Apr 2020 15:08:39 -0700 | ||
| 4 | Subject: [PATCH] server: Fix build when printf is a macro | ||
| 5 | |||
| 6 | clang complains on x86 when building | ||
| 7 | |||
| 8 | main.c:116:2: error: embedding a #include directive within macro arguments is not supported | ||
| 9 | ^ | ||
| 10 | |||
| 11 | convert nesting include into a string assignment, to same effect but | ||
| 12 | making it compatible with clang as well | ||
| 13 | |||
| 14 | Upstream-Status: Submitted [https://github.com/libguestfs/nbdkit/pull/3] | ||
| 15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 16 | --- | ||
| 17 | server/main.c | 5 +++-- | ||
| 18 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
| 19 | |||
| 20 | diff --git a/server/main.c b/server/main.c | ||
| 21 | index 748122f..c0ac874 100644 | ||
| 22 | --- a/server/main.c | ||
| 23 | +++ b/server/main.c | ||
| 24 | @@ -112,9 +112,10 @@ static void | ||
| 25 | usage (void) | ||
| 26 | { | ||
| 27 | /* --{short,long}-options remain undocumented */ | ||
| 28 | - printf ( | ||
| 29 | + char const *opt_list = | ||
| 30 | #include "synopsis.c" | ||
| 31 | - ); | ||
| 32 | + ; | ||
| 33 | + printf ("%s\n", opt_list); | ||
| 34 | printf ("\n" | ||
| 35 | "Please read the nbdkit(1) manual page for full usage.\n"); | ||
| 36 | } | ||
| 37 | -- | ||
| 38 | 2.26.0 | ||
| 39 | |||
diff --git a/meta-networking/recipes-support/nbdkit/nbdkit_git.bb b/meta-networking/recipes-support/nbdkit/nbdkit_git.bb new file mode 100644 index 0000000000..a63e49ec55 --- /dev/null +++ b/meta-networking/recipes-support/nbdkit/nbdkit_git.bb | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | SUMMARY = "nbdkit is a toolkit for creating NBD servers." | ||
| 2 | DESCRIPTION = "NBD — Network Block Device — is a protocol \ | ||
| 3 | for accessing Block Devices (hard disks and disk-like things) \ | ||
| 4 | over a Network. \ | ||
| 5 | \ | ||
| 6 | nbdkit is a toolkit for creating NBD servers." | ||
| 7 | |||
| 8 | HOMEPAGE = "https://github.com/libguestfs/nbdkit" | ||
| 9 | LICENSE = "BSD-3-Clause" | ||
| 10 | LIC_FILES_CHKSUM = "file://LICENSE;md5=4332a97808994cf2133a65b6c6f33eaf" | ||
| 11 | |||
| 12 | SRC_URI = "git://github.com/libguestfs/nbdkit.git;protocol=https \ | ||
| 13 | file://0001-server-Fix-build-when-printf-is-a-macro.patch \ | ||
| 14 | " | ||
| 15 | |||
| 16 | PV = "1.19.6+git${SRCPV}" | ||
| 17 | SRCREV = "257561bc9f2f01eb9f21686bcec4b863d17a26c4" | ||
| 18 | |||
| 19 | S = "${WORKDIR}/git" | ||
| 20 | |||
| 21 | DEPENDS = "curl xz e2fsprogs zlib" | ||
| 22 | |||
| 23 | # autotools-brokensep is needed as nbdkit does not support build in external directory | ||
| 24 | inherit pkgconfig python3native perlnative bash-completion autotools-brokensep | ||
| 25 | |||
| 26 | # Those are required to build standalone | ||
| 27 | EXTRA_OECONF = " --without-libvirt --without-libguestfs --disable-perl" | ||
| 28 | |||
| 29 | # Disable some extended support (not desired for small embedded systems) | ||
| 30 | #EXTRA_OECONF += " --disable-python" | ||
| 31 | #EXTRA_OECONF += " --disable-ocaml" | ||
| 32 | #EXTRA_OECONF += " --disable-rust" | ||
| 33 | #EXTRA_OECONF += " --disable-ruby" | ||
| 34 | #EXTRA_OECONF += " --disable-tcl" | ||
| 35 | #EXTRA_OECONF += " --disable-lua" | ||
| 36 | #EXTRA_OECONF += " --disable-vddk" | ||
