Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libzip: add version 1.11.1 #25328

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions recipes/libzip/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
sources:
"1.11.1":
url:
- "https://libzip.org/download/libzip-1.11.1.tar.gz"
- "https://github.com/nih-at/libzip/releases/download/v1.11.1/libzip-1.11.1.tar.gz"
sha256: "c0e6fa52a62ba11efd30262290dc6970947aef32e0cc294ee50e9005ceac092a"
"1.10.1":
url:
- "https://libzip.org/download/libzip-1.10.1.tar.gz"
Expand All @@ -20,6 +25,13 @@ sources:
- "https://github.com/nih-at/libzip/releases/download/v1.7.3/libzip-1.7.3.tar.gz"
sha256: "0e2276c550c5a310d4ebf3a2c3dfc43fb3b4602a072ff625842ad4f3238cb9cc"
patches:
"1.11.1":
- patch_file: "patches/1.7.3-0001-cmake-install-bundle.patch"
patch_description: "fix installation path of utilities"
patch_type: "conan"
- patch_file: "patches/1.11.1-0002-remove-rpath.patch"
patch_description: "remove rpath feature"
patch_type: "conan"
"1.10.1":
- patch_file: "patches/1.7.3-0001-cmake-install-bundle.patch"
patch_description: "fix installation path of utilities"
Expand Down
2 changes: 1 addition & 1 deletion recipes/libzip/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
class LibZipConan(ConanFile):
name = "libzip"
description = "A C library for reading, creating, and modifying zip archives"
license = "BSD-3-Clause"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/nih-at/libzip"
license = "BSD-3-Clause"
topics = ("zip", "zip-archives", "zip-editing")
package_type = "library"
settings = "os", "arch", "compiler", "build_type"
Expand Down Expand Up @@ -44,19 +44,19 @@
export_conandata_patches(self)

def config_options(self):
if self.settings.os == "Windows":

Check failure on line 47 in recipes/libzip/all/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

del self.options.fPIC
if not self._has_zstd_support:
del self.options.with_zstd
# Default crypto backend on windows
if self.settings.os == "Windows":

Check failure on line 52 in recipes/libzip/all/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

self.options.crypto = "win32"

def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")
self.settings.rm_safe("compiler.libcxx")

Check failure on line 58 in recipes/libzip/all/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

Instance of 'list' has no 'rm_safe' member. Please, check https://github.com/conan-io/conan-center-index/blob/master/docs/v2_linter.md
self.settings.rm_safe("compiler.cppstd")

Check failure on line 59 in recipes/libzip/all/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

Instance of 'list' has no 'rm_safe' member. Please, check https://github.com/conan-io/conan-center-index/blob/master/docs/v2_linter.md

def layout(self):
cmake_layout(self, src_folder="src")
Expand All @@ -79,11 +79,11 @@
self.requires("mbedtls/3.5.0")

def validate(self):
if self.options.crypto == "win32" and self.settings.os != "Windows":

Check failure on line 82 in recipes/libzip/all/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

raise ConanInvalidConfiguration("Windows is required to use win32 crypto libraries")

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)

Check failure on line 86 in recipes/libzip/all/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

Instance of 'LibZipConan' has no 'conan_data' member. Please, check https://github.com/conan-io/conan-center-index/blob/master/docs/v2_linter.md

def generate(self):
tc = CMakeToolchain(self)
Expand Down Expand Up @@ -125,7 +125,7 @@

# TODO: back to global scope in conan v2 once cmake_find_package* generators removed
self.cpp_info.components["_libzip"].libs = ["zip"]
if self.settings.os == "Windows":

Check failure on line 128 in recipes/libzip/all/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

self.cpp_info.components["_libzip"].system_libs = ["advapi32"]
if self.options.crypto == "win32":
self.cpp_info.components["_libzip"].system_libs.append("bcrypt")
Expand Down
13 changes: 13 additions & 0 deletions recipes/libzip/all/patches/1.11.1-0002-remove-rpath.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8d019b9..5cd6a81 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -290,7 +290,7 @@ if(WIN32)
endif(WIN32)

# rpath handling: use rpath in installed binaries
-if(NOT CMAKE_SYSTEM_NAME MATCHES Linux)
+if(0)
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
endif()
2 changes: 2 additions & 0 deletions recipes/libzip/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"1.11.1":
folder: all
"1.10.1":
folder: all
"1.9.2":
Expand Down
Loading