aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2023-02-23 12:32:39 +0000
committerKhem Raj <raj.khem@gmail.com>2023-02-24 08:45:44 -0800
commit224f393f514456d97b077d6413d057be1a531e3e (patch)
tree81548484a079049d6ca6dfaa8822bb7620629006 /meta-oe/recipes-support
parentd051d73bbb7ccba6741c127601dec802e3984f54 (diff)
downloadmeta-openembedded-contrib-224f393f514456d97b077d6413d057be1a531e3e.tar.gz
zchunk: upgrade to 1.2.4
Add a patch submitted upstream to fix the argp detection with clang. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support')
-rw-r--r--meta-oe/recipes-support/zchunk/files/clang.patch35
-rw-r--r--meta-oe/recipes-support/zchunk/zchunk_1.2.0.bb22
-rw-r--r--meta-oe/recipes-support/zchunk/zchunk_1.2.4.bb25
3 files changed, 60 insertions, 22 deletions
diff --git a/meta-oe/recipes-support/zchunk/files/clang.patch b/meta-oe/recipes-support/zchunk/files/clang.patch
new file mode 100644
index 0000000000..86faf4aac7
--- /dev/null
+++ b/meta-oe/recipes-support/zchunk/files/clang.patch
@@ -0,0 +1,35 @@
+From e69d907c3fe8765ce50ce1258648ebc8283ef8a7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 22 Feb 2023 14:55:07 -0800
+Subject: [PATCH] meson: Use global function in argp check
+
+clang is optimizing away parse_opt() since its marked static and not
+used in main(), make life a bit harder for clang :)
+removing static now emits the global symbols to be resolved during link
+and when libargp is missing the error is thrown rightly
+
+riscv64-yoe-linux-musl-ld: /tmp/a-5ba039.o: in function `.Lpcrel_hi0':
+a.c:(.text+0x44): undefined reference to `argp_state_help'
+clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Submitted [https://github.com/zchunk/zchunk/pull/92/]
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 3b92d58..ab54abd 100644
+--- a/meson.build
++++ b/meson.build
+@@ -57,7 +57,7 @@ if host_machine.system() == 'windows'
+ endif
+
+ # argp-standalone dependency (if required)
+-if build_machine.system() == 'windows' or build_machine.system() == 'darwin' or build_machine.system() == 'freebsd' or not cc.links('#include <argp.h>\nstatic error_t parse_opt (int key, char *arg, struct argp_state *state) { argp_usage(state); return 0; }; void main() {}')
++if build_machine.system() == 'windows' or build_machine.system() == 'darwin' or build_machine.system() == 'freebsd' or not cc.links('#include <argp.h>\nerror_t parse_opt (int key, char *arg, struct argp_state *state) { argp_usage(state); return 0; }; void main() {}')
+ argplib = cc.find_library('argp', has_headers : ['argp.h'], required: false)
+ if not argplib.found()
+ argplib = dependency('argp-standalone')
diff --git a/meta-oe/recipes-support/zchunk/zchunk_1.2.0.bb b/meta-oe/recipes-support/zchunk/zchunk_1.2.0.bb
deleted file mode 100644
index 0baea5032a..0000000000
--- a/meta-oe/recipes-support/zchunk/zchunk_1.2.0.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-DESCRIPTION = "A file format designed for highly efficient deltas while maintaining good compression"
-AUTHOR = "Jonathan Dieter"
-
-LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=daf6e68539f564601a5a5869c31e5242"
-
-SRC_URI = "git://github.com/zchunk/zchunk.git;protocol=https;branch=main"
-
-SRCREV = "dd6a30a1e4e8b738b0cafc682f3c00e7706134e5"
-S = "${WORKDIR}/git"
-
-DEPENDS = "\
- curl \
- zstd \
- "
-
-DEPENDS:append:libc-musl = " argp-standalone"
-LDFLAGS:append:libc-musl = " -largp"
-
-inherit meson pkgconfig
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-oe/recipes-support/zchunk/zchunk_1.2.4.bb b/meta-oe/recipes-support/zchunk/zchunk_1.2.4.bb
new file mode 100644
index 0000000000..b4fd027603
--- /dev/null
+++ b/meta-oe/recipes-support/zchunk/zchunk_1.2.4.bb
@@ -0,0 +1,25 @@
+DESCRIPTION = "A file format designed for highly efficient deltas while maintaining good compression"
+AUTHOR = "Jonathan Dieter"
+
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=daf6e68539f564601a5a5869c31e5242"
+
+SRC_URI = "git://github.com/zchunk/zchunk.git;protocol=https;branch=main \
+ file://clang.patch"
+
+SRCREV = "0bed8496262a71beadccd4e562bdac093ef6e06f"
+S = "${WORKDIR}/git"
+
+DEPENDS = "zstd"
+DEPENDS:append:libc-musl = " argp-standalone"
+
+inherit meson pkgconfig lib_package
+
+PACKAGECONFIG ??= "openssl zckdl"
+
+# zckdl gets packaged into zchunk-bin
+PACKAGECONFIG[zckdl] = "-Dwith-curl=enabled,-Dwith-curl=disabled,curl"
+# Use OpenSSL primitives for SHA
+PACKAGECONFIG[openssl] = "-Dwith-openssl=enabled,-Dwith-openssl=disabled,openssl"
+
+BBCLASSEXTEND = "native nativesdk"