]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
libzip: import recipe from meta-oe
authorIgor Opaniuk <igor.opaniuk@oss.qualcomm.com>
Fri, 24 Jul 2026 13:15:37 +0000 (15:15 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 30 Jul 2026 09:58:19 +0000 (10:58 +0100)
Recent versions of the qdl tool [1], used for flashing and provisioning
Qualcomm-based boards, depend on libzip in order to flash images
directly from zip-compressed flat builds without unpacking them: the
device requests individual images on demand (in Sahara/Firehose
device-driven order), which requires random access to archive members
by name. Neither zlib (byte-stream compression only, no container
format support) nor libarchive (streaming, sequential access only)
covers this use case.

qdl recipes are provided by the Qualcomm BSP layer (e.g. meta-qcom [2])
and board flashing is core BSP functionality. Recipes from other layers
also depend on libzip (libsigrok, idevicerestore and php in meta-oe,
localsearch in meta-gnome), so it makes sense to move libzip to
OE-Core in order to reduce inter-layer dependencies, following the
example of commit 1a0196a794 ("libconfig: import recipe from meta-oe").

Changes between meta-oe and this recipe:
- Added SUMMARY, BUGTRACKER and SECTION
- Fixed the tools and examples PACKAGECONFIGs to use the actual
  BUILD_TOOLS and BUILD_EXAMPLES CMake options (ENABLE_TOOLS and
  ENABLE_EXAMPLES do not exist and were silently ignored)
- Fixed the tests PACKAGECONFIG to use BUILD_REGRESS consistently
- Dropped the mbedtls PACKAGECONFIG, as mbedtls is not in OE-Core
- Extended BBCLASSEXTEND with nativesdk

[1] https://github.com/linux-msm/qdl
[2] https://github.com/qualcomm-linux/meta-qcom

Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/conf/distro/include/maintainers.inc
meta/recipes-extended/libzip/libzip_1.11.4.bb [new file with mode: 0644]

index 1565b18fecd0ef16874439c41b7fb560d6b3a750..c5b701c2447da9317055dc11cbbd2f41ee7b9771 100644 (file)
@@ -470,6 +470,7 @@ RECIPE_MAINTAINER:pn-libxv = "Unassigned <unassigned@yoctoproject.org>"
 RECIPE_MAINTAINER:pn-libxvmc = "Unassigned <unassigned@yoctoproject.org>"
 RECIPE_MAINTAINER:pn-libxxf86vm = "Unassigned <unassigned@yoctoproject.org>"
 RECIPE_MAINTAINER:pn-libyaml = "Wang Mingyu <wangmy@fujitsu.com>"
+RECIPE_MAINTAINER:pn-libzip = "Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>"
 RECIPE_MAINTAINER:pn-lighttpd = "Unassigned <unassigned@yoctoproject.org>"
 RECIPE_MAINTAINER:pn-linux-dummy = "Unassigned <unassigned@yoctoproject.org>"
 RECIPE_MAINTAINER:pn-linux-firmware = "Vivek Puar <vpuar@qti.qualcomm.com>"
diff --git a/meta/recipes-extended/libzip/libzip_1.11.4.bb b/meta/recipes-extended/libzip/libzip_1.11.4.bb
new file mode 100644 (file)
index 0000000..36f7d1f
--- /dev/null
@@ -0,0 +1,30 @@
+SUMMARY = "C library for reading, creating, and modifying zip archives"
+DESCRIPTION = "libzip is a C library for reading, creating, and modifying \
+zip archives. Files can be added from data buffers, files, or compressed \
+data copied directly from other zip archives. Changes made without closing \
+the archive can be reverted."
+HOMEPAGE = "https://libzip.org/"
+BUGTRACKER = "https://github.com/nih-at/libzip/issues"
+SECTION = "libs"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=d8a9d2078f35e61cf1122ccd440687cf"
+
+DEPENDS = "zlib bzip2"
+
+SRC_URI = "https://libzip.org/download/libzip-${PV}.tar.xz"
+SRC_URI[sha256sum] = "8a247f57d1e3e6f6d11413b12a6f28a9d388de110adc0ec608d893180ed7097b"
+
+inherit cmake
+
+PACKAGECONFIG ?= "ssl lzma tools examples"
+
+PACKAGECONFIG[ssl] = "-DENABLE_OPENSSL=ON,-DENABLE_OPENSSL=OFF,openssl"
+PACKAGECONFIG[gnutls] = "-DENABLE_GNUTLS=ON,-DENABLE_GNUTLS=OFF,gnutls nettle"
+PACKAGECONFIG[lzma] = "-DENABLE_LZMA=ON,-DENABLE_LZMA=OFF,xz"
+PACKAGECONFIG[zstd] = "-DENABLE_ZSTD=ON,-DENABLE_ZSTD=OFF,zstd"
+PACKAGECONFIG[tools] = "-DBUILD_TOOLS=ON,-DBUILD_TOOLS=OFF"
+PACKAGECONFIG[examples] = "-DBUILD_EXAMPLES=ON,-DBUILD_EXAMPLES=OFF"
+PACKAGECONFIG[tests] = "-DBUILD_REGRESS=ON,-DBUILD_REGRESS=OFF"
+
+BBCLASSEXTEND = "native nativesdk"