-
Notifications
You must be signed in to change notification settings - Fork 7.4k
[kf5archive] fix cmake.in to allow consumption by static builds #19194
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
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
d1267f9
[kf5archive] fix cmake.in to allow consumption by static builds
wrobelda 9b8aa5e
[kf5archive] update versions
wrobelda bfd4cc3
[kf5archive] add lzma, zstd features
wrobelda 7852179
[kf5archive] update versions
wrobelda e4ae5a5
[kf5archive] fix MAYBE_UNUSED_VARIABLES usage
wrobelda 0a03cf1
[kf5archive] replace deprecated functions
wrobelda 456960a
[kf5archive] use semVer
wrobelda 89718db
[kf5archive] update versions
wrobelda 7fb0d5a
[kf5archive] add vcpkg_check_features
wrobelda 99c272c
[kf5archive] update versions
wrobelda ebf771b
[kf5archive] remove redundant option
wrobelda d05828c
[kf5archive] wrap all paths in quotes
wrobelda f20d03f
[kf5archive] update versions
wrobelda 86ab6d9
[kf5archive] lookup ZSTD using CMake
wrobelda 01695b2
[kf5archive] update versions
wrobelda 2a2e77a
[kf5archive] fix vcpkg_cmake_config_fixup() usage
wrobelda 6ff43f9
[kf5archive] update versions
wrobelda 566afa9
[kf5archive] rename patch files
wrobelda e60e199
[kf5archive] update versions
wrobelda File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| From 5dc3f846c27ee6d55131db475975e3c24cd0c19c Mon Sep 17 00:00:00 2001 | ||
| From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= <me@dawidwrobel.com> | ||
| Date: Wed, 28 Jul 2021 11:39:30 +0200 | ||
| Subject: [PATCH] Add support for static builds | ||
|
|
||
| --- | ||
| KF5ArchiveConfig.cmake.in | 20 ++++++++++++++++++++ | ||
| 1 file changed, 20 insertions(+) | ||
|
|
||
| diff --git a/KF5ArchiveConfig.cmake.in b/KF5ArchiveConfig.cmake.in | ||
| index 3d32642..0a738c2 100644 | ||
| --- a/KF5ArchiveConfig.cmake.in | ||
| +++ b/KF5ArchiveConfig.cmake.in | ||
| @@ -4,9 +4,29 @@ include(CMakeFindDependencyMacro) | ||
| find_dependency(Qt5Core @REQUIRED_QT_VERSION@) | ||
|
|
||
|
|
||
| +set(KArchive_HAVE_ZLIB "@ZLIB_FOUND@") | ||
| set(KArchive_HAVE_BZIP2 "@BZIP2_FOUND@") | ||
| set(KArchive_HAVE_LZMA "@LIBLZMA_FOUND@") | ||
| set(KArchive_HAVE_ZSTD "@LibZstd_FOUND@") | ||
|
|
||
| +if (NOT @BUILD_SHARED_LIBS@) | ||
| + if (@ZLIB_FOUND@) | ||
| + find_dependency(ZLIB) | ||
| + endif() | ||
| + | ||
| + if (@BZIP2_FOUND@) | ||
| + find_dependency(BZip2) | ||
| + endif() | ||
| + | ||
| + if (@LIBLZMA_FOUND@) | ||
| + find_dependency(LibLZMA) | ||
| + endif() | ||
| + | ||
| + if (@LibZstd_FOUND@) | ||
| + find_package(PkgConfig) | ||
| + pkg_check_modules(LibZstd IMPORTED_TARGET "libzstd") | ||
| + endif() | ||
| +endif() | ||
| + | ||
| include("${CMAKE_CURRENT_LIST_DIR}/KF5ArchiveTargets.cmake") | ||
| @PACKAGE_INCLUDE_QCHTARGETS@ | ||
| -- | ||
| GitLab | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| From 5a79756f381e1a1843cb2171bdc151dad53fb7db Mon Sep 17 00:00:00 2001 | ||
| From: "Friedrich W. H. Kossebau" <kossebau@kde.org> | ||
| Date: Wed, 7 Jul 2021 03:09:38 +0200 | ||
| Subject: [PATCH] Report KArchive_HAVE_ZSTD in CMake Config file to consumers | ||
|
|
||
| Allows users of KArchive to query whether zstd is available, | ||
| in the same way as lzma & bzip2 | ||
| --- | ||
| KF5ArchiveConfig.cmake.in | 1 + | ||
| 1 file changed, 1 insertion(+) | ||
|
|
||
| diff --git a/KF5ArchiveConfig.cmake.in b/KF5ArchiveConfig.cmake.in | ||
| index 0d59d63..3d32642 100644 | ||
| --- a/KF5ArchiveConfig.cmake.in | ||
| +++ b/KF5ArchiveConfig.cmake.in | ||
| @@ -6,6 +6,7 @@ find_dependency(Qt5Core @REQUIRED_QT_VERSION@) | ||
|
|
||
| set(KArchive_HAVE_BZIP2 "@BZIP2_FOUND@") | ||
| set(KArchive_HAVE_LZMA "@LIBLZMA_FOUND@") | ||
| +set(KArchive_HAVE_ZSTD "@LibZstd_FOUND@") | ||
|
|
||
| include("${CMAKE_CURRENT_LIST_DIR}/KF5ArchiveTargets.cmake") | ||
| @PACKAGE_INCLUDE_QCHTARGETS@ | ||
| -- | ||
| GitLab | ||
|
|
27 changes: 27 additions & 0 deletions
27
ports/kf5archive/only_pkg_check_modules_if_pkgconfig_found.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| From 9ab5f2bfbe59038b0d0b6ca7f1b22d1c9229c67e Mon Sep 17 00:00:00 2001 | ||
| From: Dawid Wrobel <me@dawidwrobel.com> | ||
| Date: Fri, 30 Jul 2021 10:23:48 +0000 | ||
| Subject: [PATCH] Only pkg_check_modules() if PkgConfig is found | ||
|
|
||
| --- | ||
| CMakeLists.txt | 4 +++- | ||
| 1 file changed, 3 insertions(+), 1 deletion(-) | ||
|
|
||
| diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| index bab7661..2cdda70 100644 | ||
| --- a/CMakeLists.txt | ||
| +++ b/CMakeLists.txt | ||
| @@ -45,7 +45,9 @@ set_package_properties(LibLZMA PROPERTIES | ||
| ) | ||
|
|
||
| find_package(PkgConfig) | ||
| -pkg_check_modules(LibZstd IMPORTED_TARGET "libzstd") | ||
| +if (PkgConfig_FOUND) | ||
| + pkg_check_modules(LibZstd IMPORTED_TARGET "libzstd") | ||
| +endif() | ||
| add_feature_info(LibZstd LibZstd_FOUND | ||
| "Support for zstd compressed files and data streams" | ||
| ) | ||
| -- | ||
| GitLab | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| From 82fc20234d4cf8abdec1a2b4fea9823154f1aecc Mon Sep 17 00:00:00 2001 | ||
| From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= <me@dawidwrobel.com> | ||
| Date: Fri, 27 Aug 2021 01:48:53 +0200 | ||
| Subject: [PATCH] Use CMake to find ZSTD | ||
|
|
||
| --- | ||
| CMakeLists.txt | 11 +++++------ | ||
| KF5ArchiveConfig.cmake.in | 3 +-- | ||
| 2 files changed, 6 insertions(+), 8 deletions(-) | ||
|
|
||
| diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| index 8ab85f4..ece1f77 100644 | ||
| --- a/CMakeLists.txt | ||
| +++ b/CMakeLists.txt | ||
| @@ -44,12 +44,11 @@ set_package_properties(LibLZMA PROPERTIES | ||
| PURPOSE "Support for xz compressed files and data streams" | ||
| ) | ||
|
|
||
| -find_package(PkgConfig) | ||
| -if (PkgConfig_FOUND) | ||
| - pkg_check_modules(LibZstd IMPORTED_TARGET "libzstd") | ||
| -endif() | ||
| -add_feature_info(LibZstd LibZstd_FOUND | ||
| - "Support for zstd compressed files and data streams" | ||
| +find_package(ZSTD) | ||
| +set_package_properties(LibZstd PROPERTIES | ||
| + URL "http://www.zstd.net" | ||
| + DESCRIPTION "Support for zstd compressed files and data streams" | ||
| + PURPOSE "Support for zstd compressed files and data streams" | ||
| ) | ||
|
|
||
| include(ECMSetupVersion) | ||
| diff --git a/KF5ArchiveConfig.cmake.in b/KF5ArchiveConfig.cmake.in | ||
| index 0a738c2..d868324 100644 | ||
| --- a/KF5ArchiveConfig.cmake.in | ||
| +++ b/KF5ArchiveConfig.cmake.in | ||
| @@ -23,8 +23,7 @@ if (NOT @BUILD_SHARED_LIBS@) | ||
| endif() | ||
|
|
||
| if (@LibZstd_FOUND@) | ||
| - find_package(PkgConfig) | ||
| - pkg_check_modules(LibZstd IMPORTED_TARGET "libzstd") | ||
| + find_dependency(ZSTD) | ||
| endif() | ||
| endif() | ||
|
|
||
| -- | ||
| GitLab | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,35 @@ | ||
| { | ||
| "name": "kf5archive", | ||
| "version": "5.84.0", | ||
| "version-semver": "5.84.0", | ||
| "port-version": 1, | ||
| "description": "File compression", | ||
| "homepage": "https://api.kde.org/frameworks/karchive/html/index.html", | ||
| "dependencies": [ | ||
| "bzip2", | ||
| "ecm", | ||
| "qt5-base", | ||
| { | ||
| "name": "vcpkg-cmake", | ||
| "host": true | ||
| }, | ||
| { | ||
| "name": "vcpkg-cmake-config", | ||
| "host": true | ||
| }, | ||
| "zlib" | ||
| ] | ||
| ], | ||
| "features": { | ||
| "lzma": { | ||
| "description": "Support for xz compressed files and data streams", | ||
| "dependencies": [ | ||
| "liblzma" | ||
| ] | ||
| }, | ||
| "zstd": { | ||
| "description": "Support for zstd compressed files and data streams", | ||
| "dependencies": [ | ||
| "zstd" | ||
| ] | ||
| } | ||
| } | ||
| } | ||
NancyLi1013 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.