Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 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
46 changes: 46 additions & 0 deletions ports/kf5archive/23.patch
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")
Comment thread
NancyLi1013 marked this conversation as resolved.
+ endif()
+endif()
Comment thread
NancyLi1013 marked this conversation as resolved.
Outdated
+
include("${CMAKE_CURRENT_LIST_DIR}/KF5ArchiveTargets.cmake")
@PACKAGE_INCLUDE_QCHTARGETS@
--
GitLab

26 changes: 26 additions & 0 deletions ports/kf5archive/5a79756f.patch
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 ports/kf5archive/9ab5f2bf.patch
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

22 changes: 15 additions & 7 deletions ports/kf5archive/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,29 @@ vcpkg_from_github(
REF v5.84.0
SHA512 82926f62424446df0f4fc300f57ae9bd5baf8e13da2ce4135ac56c0c52a0307bffb06f84ac7e8e658e96ace2ae3d530f27e232061284ac87271404f218e9fdd4
HEAD_REF master
PATCHES
9ab5f2bf.patch # https://invent.kde.org/frameworks/karchive/-/commit/9ab5f2bfbe59038b0d0b6ca7f1b22d1c9229c67e
5a79756f.patch # https://invent.kde.org/frameworks/karchive/-/commit/5a79756f381e1a1843cb2171bdc151dad53fb7db
23.patch # https://invent.kde.org/frameworks/karchive/-/merge_requests/23
)

vcpkg_configure_cmake(
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
Comment thread
wrobelda marked this conversation as resolved.
Outdated
INVERTED_FEATURES
"lzma" CMAKE_DISABLE_FIND_PACKAGE_LibLZMA
"zstd" CMAKE_DISABLE_FIND_PACKAGE_PkgConfig
)

vcpkg_cmake_configure(
DISABLE_PARALLEL_CONFIGURE
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DBUILD_HTML_DOCS=OFF
-DBUILD_MAN_DOCS=OFF
-DBUILD_QTHELP_DOCS=OFF
-DBUILD_TESTING=OFF
${FEATURE_OPTIONS}
)

vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5Archive)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/KF5Archive)
vcpkg_copy_pdbs()

if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
Comment thread
NancyLi1013 marked this conversation as resolved.
Expand Down
27 changes: 25 additions & 2 deletions ports/kf5archive/vcpkg.json
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"
]
}
}
}
Comment thread
NancyLi1013 marked this conversation as resolved.
Outdated
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2862,7 +2862,7 @@
},
"kf5archive": {
"baseline": "5.84.0",
"port-version": 0
"port-version": 1
},
"kf5auth": {
"baseline": "5.84.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/k-/kf5archive.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "74b597ff299a1d217cbae6a24d14d161063d5b65",
"version-semver": "5.84.0",
"port-version": 1
},
{
"git-tree": "bc7b88da4daf014c751e4ab246a0104d850f5785",
"version": "5.84.0",
Expand Down