Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
555c464
Add kf5kio port [WIP]
wrobelda Sep 13, 2020
9aeca9d
Fixed kf5kio for windows
hellozee Sep 15, 2020
020ebdf
[kf5*] update to 5.75.0
wrobelda Nov 10, 2020
bcffaee
[kf5kio] fix clang errors on macOS
wrobelda Nov 11, 2020
2e2d353
[kf5kio] add missing dependencies
wrobelda Nov 12, 2020
94101fe
[kf5kio] use current spec
wrobelda Aug 28, 2021
2975288
[kf5kio] install tools, don't remove them
wrobelda Aug 28, 2021
d7fb233
[kf5kio] install data to standard /share location
wrobelda Aug 28, 2021
ff69138
[kf5kio] only remove what's needed
wrobelda Aug 28, 2021
bcb5480
[kf5kio] wrap paths in quotes
wrobelda Aug 28, 2021
28b439b
[kf5kio] use semVer
wrobelda Aug 28, 2021
67ce722
[kf5kio] update versions
wrobelda Aug 28, 2021
6f18321
[kf5kio] update to 5.84.0
wrobelda Aug 30, 2021
9484e4d
[kf5kio] fix libiconv for static builds
wrobelda Aug 30, 2021
f6737db
[kf5kio] libiconv patches only for windows static builds
wrobelda Aug 30, 2021
2eaf64a
[kf5kio] update versions
wrobelda Aug 30, 2021
796ce87
[kf5kio] fix copying tools on Windows
wrobelda Aug 30, 2021
db5991f
[kf5kio] add PACKAGE_NAME to vcpkg_cmake_config_fixup
wrobelda Aug 30, 2021
771874b
[kf5kio] update versions
wrobelda Aug 30, 2021
95c1581
[kf5kio] update versions
wrobelda Aug 30, 2021
abc94b8
[kf5kio] add comment with a link to a PR
wrobelda Aug 30, 2021
3a26833
[kf5kio] update versions
wrobelda Aug 30, 2021
4b03038
[kf5kio] fix CMake Config for static builds
wrobelda Aug 31, 2021
ada44f6
[kf5kio] update versions
wrobelda Aug 31, 2021
941196e
[kf5kio] disable notifications if not explicitly enabled
wrobelda Aug 31, 2021
1acde3e
[kf5kio] add kf5wallet feature
wrobelda Aug 31, 2021
c66c895
[kf5kio] update versions
wrobelda Aug 31, 2021
86b36ef
[kf5kio] knotifications is non-Windows and non-Android
wrobelda Aug 31, 2021
44c165c
[kf5kio] update versions
wrobelda Aug 31, 2021
cb4361c
[kf5io] re-enable parallel configure
wrobelda Sep 28, 2021
0a84d77
[kf5io] use generic, non-semver versioning
wrobelda Sep 28, 2021
ffd7a3b
[kf5kio] update versions
wrobelda Sep 28, 2021
75cac62
[kf5kio] remove the 5.75 version info
wrobelda Oct 8, 2021
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/kf5kio/fix_config_cmake.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
From 0202616076e6b05b7100ae67d7d012e2c22f79fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= <me@dawidwrobel.com>
Date: Tue, 31 Aug 2021 03:40:09 +0200
Subject: [PATCH] Add support for static builds

---
KF5KIOConfig.cmake.in | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/KF5KIOConfig.cmake.in b/KF5KIOConfig.cmake.in
index 41699cb03..05922f769 100644
--- a/KF5KIOConfig.cmake.in
+++ b/KF5KIOConfig.cmake.in
@@ -11,13 +11,22 @@ find_dependency(KF5Config "@KF_DEP_VERSION@")
find_dependency(KF5Service "@KF_DEP_VERSION@")

if (NOT @KIOCORE_ONLY@)
-find_dependency(KF5Bookmarks "@KF_DEP_VERSION@")
-find_dependency(KF5Completion "@KF_DEP_VERSION@")
-find_dependency(KF5ItemViews "@KF_DEP_VERSION@")
-find_dependency(KF5JobWidgets "@KF_DEP_VERSION@")
-find_dependency(KF5Solid "@KF_DEP_VERSION@")
-find_dependency(KF5XmlGui "@KF_DEP_VERSION@")
-find_dependency(KF5WindowSystem "@KF_DEP_VERSION@")
+ find_dependency(KF5Bookmarks "@KF_DEP_VERSION@")
+ find_dependency(KF5Completion "@KF_DEP_VERSION@")
+ find_dependency(KF5ItemViews "@KF_DEP_VERSION@")
+ find_dependency(KF5JobWidgets "@KF_DEP_VERSION@")
+ find_dependency(KF5Solid "@KF_DEP_VERSION@")
+ find_dependency(KF5XmlGui "@KF_DEP_VERSION@")
+ find_dependency(KF5WidgetsAddons "@KF_DEP_VERSION@")
+ find_dependency(KF5WindowSystem "@KF_DEP_VERSION@")
+
+ if (NOT @BUILD_SHARED_LIBS@)
+ find_dependency(KF5ConfigWidgets "@KF_DEP_VERSION@")
+ find_dependency(KF5Crash "@KF_DEP_VERSION@")
+ find_dependency(KF5GuiAddons "@KF_DEP_VERSION@")
+ find_dependency(KF5IconThemes "@KF_DEP_VERSION@")
+ find_dependency(KF5DBusAddons "@KF_DEP_VERSION@")
+ endif()
endif()

find_dependency(Qt5Network "@REQUIRED_QT_VERSION@")
--
GitLab

58 changes: 58 additions & 0 deletions ports/kf5kio/fix_dbusmetatypes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
diff --git a/src/core/kssld_dbusmetatypes.h b/src/core/kssld_dbusmetatypes.h
index 2fb9fa25..958f4ff7 100644
--- a/src/core/kssld_dbusmetatypes.h
+++ b/src/core/kssld_dbusmetatypes.h
@@ -17,7 +17,7 @@
Q_DECLARE_METATYPE(KSslCertificateRule)
Q_DECLARE_METATYPE(QSslError::SslError)

-QDBusArgument &operator<<(QDBusArgument &argument, const QSslCertificate &cert)
+inline QDBusArgument &operator<<(QDBusArgument &argument, const QSslCertificate &cert)
{
argument.beginStructure();
argument << cert.toDer();
@@ -25,7 +25,7 @@ QDBusArgument &operator<<(QDBusArgument &argument, const QSslCertificate &cert)
return argument;
}

-const QDBusArgument &operator>>(const QDBusArgument &argument, QSslCertificate &cert)
+inline const QDBusArgument &operator>>(const QDBusArgument &argument, QSslCertificate &cert)
{
QByteArray data;
argument.beginStructure();
@@ -35,7 +35,7 @@ const QDBusArgument &operator>>(const QDBusArgument &argument, QSslCertificate &
return argument;
}

-QDBusArgument &operator<<(QDBusArgument &argument, const KSslCertificateRule &rule)
+inline QDBusArgument &operator<<(QDBusArgument &argument, const KSslCertificateRule &rule)
{
argument.beginStructure();
argument << rule.certificate() << rule.hostName() << rule.isRejected() << rule.expiryDateTime().toString(Qt::ISODate)
@@ -44,7 +44,7 @@ QDBusArgument &operator<<(QDBusArgument &argument, const KSslCertificateRule &ru
return argument;
}

-const QDBusArgument &operator>>(const QDBusArgument &argument, KSslCertificateRule &rule)
+inline const QDBusArgument &operator>>(const QDBusArgument &argument, KSslCertificateRule &rule)
{
QSslCertificate cert;
QString hostName;
@@ -63,7 +63,7 @@ const QDBusArgument &operator>>(const QDBusArgument &argument, KSslCertificateRu
return argument;
}

-QDBusArgument &operator<<(QDBusArgument &argument, const QSslError::SslError &error)
+inline QDBusArgument &operator<<(QDBusArgument &argument, const QSslError::SslError &error)
{
argument.beginStructure(); // overhead ho!
argument << static_cast<int>(error);
@@ -71,7 +71,7 @@ QDBusArgument &operator<<(QDBusArgument &argument, const QSslError::SslError &er
return argument;
}

-const QDBusArgument &operator>>(const QDBusArgument &argument, QSslError::SslError &error)
+inline const QDBusArgument &operator>>(const QDBusArgument &argument, QSslError::SslError &error)
{
int data;
argument.beginStructure();
202 changes: 202 additions & 0 deletions ports/kf5kio/fix_libiconv.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
diff --git a/src/ioslaves/file/CMakeLists.txt b/src/ioslaves/file/CMakeLists.txt
index 20fca30..bcd795e 100644
--- a/src/ioslaves/file/CMakeLists.txt
+++ b/src/ioslaves/file/CMakeLists.txt
@@ -33,7 +33,9 @@ ecm_qt_export_logging_category(
EXPORT KIO
)

-target_link_libraries(kio_file KF5::KIOCore KF5::I18n KF5::ConfigCore Qt5::DBus Qt5::Network)
+find_package(Iconv REQUIRED)
+include_directories(${Iconv_INCLUDE_DIRS})
+target_link_libraries(kio_file KF5::KIOCore KF5::I18n KF5::ConfigCore Qt5::DBus Qt5::Network ${Iconv_LIBRARIES})

if(UNIX)
target_link_libraries(kio_file Qt5::Network KF5::AuthCore)
diff --git a/src/ioslaves/ftp/CMakeLists.txt b/src/ioslaves/ftp/CMakeLists.txt
index b9602fa..e80f7ce 100644
--- a/src/ioslaves/ftp/CMakeLists.txt
+++ b/src/ioslaves/ftp/CMakeLists.txt
@@ -21,6 +21,8 @@ ecm_qt_export_logging_category(
EXPORT KIO
)

-target_link_libraries(kio_ftp Qt5::Network KF5::KIOCore KF5::I18n KF5::ConfigCore)
+find_package(Iconv REQUIRED)
+include_directories(${Iconv_INCLUDE_DIRS})
+target_link_libraries(kio_ftp Qt5::Network KF5::KIOCore KF5::I18n KF5::ConfigCore ${Iconv_LIBRARIES})

install(TARGETS kio_ftp DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/kio)
diff --git a/src/ioslaves/http/CMakeLists.txt b/src/ioslaves/http/CMakeLists.txt
index 51bd392..db43701 100644
--- a/src/ioslaves/http/CMakeLists.txt
+++ b/src/ioslaves/http/CMakeLists.txt
@@ -37,11 +37,15 @@ target_sources(kio_http_cache_cleaner PRIVATE
http_cache_cleaner.cpp
)

+find_package(Iconv REQUIRED)
+include_directories(${Iconv_INCLUDE_DIRS})
target_link_libraries(kio_http_cache_cleaner
Qt5::DBus
Qt5::Network # QLocalSocket
KF5::KIOCore # KProtocolManager
- KF5::I18n)
+ KF5::I18n
+ ${Iconv_LIBRARIES}
+)

install(TARGETS kio_http_cache_cleaner DESTINATION ${KDE_INSTALL_LIBEXECDIR_KF5} )

@@ -96,6 +100,7 @@ target_link_libraries(kio_http
KF5::KIONTLM
KF5::Archive
KF5::I18n
+ ${Iconv_LIBRARIES}
)
if(GSSAPI_FOUND)
target_link_libraries(kio_http ${GSSAPI_LIBS} )
diff --git a/src/ioslaves/http/kcookiejar/CMakeLists.txt b/src/ioslaves/http/kcookiejar/CMakeLists.txt
index 0f770ae..2600d2d 100644
--- a/src/ioslaves/http/kcookiejar/CMakeLists.txt
+++ b/src/ioslaves/http/kcookiejar/CMakeLists.txt
@@ -13,10 +13,13 @@ target_sources(kcookiejar5 PRIVATE
main.cpp
)

+find_package(Iconv REQUIRED)
+include_directories(${Iconv_INCLUDE_DIRS})
target_link_libraries( kcookiejar5
Qt5::DBus
KF5::I18n
KF5::WidgetsAddons
+ ${Iconv_LIBRARIES}
)

install(TARGETS kcookiejar5 ${KF5_INSTALL_TARGETS_DEFAULT_ARGS} )
@@ -55,6 +58,7 @@ target_link_libraries(kded_kcookiejar
KF5::DBusAddons
KF5::I18n
KF5::WidgetsAddons
+ ${Iconv_LIBRARIES}
)

########### install files ###############
diff --git a/src/ioslaves/remote/CMakeLists.txt b/src/ioslaves/remote/CMakeLists.txt
index 36a97cf..9319a61 100644
--- a/src/ioslaves/remote/CMakeLists.txt
+++ b/src/ioslaves/remote/CMakeLists.txt
@@ -21,4 +21,6 @@ ecm_qt_declare_logging_category(kio_remote
EXPORT KIO
)

-target_link_libraries(kio_remote KF5::KIOCore KF5::I18n KF5::ConfigCore Qt5::Network)
+find_package(Iconv REQUIRED)
+include_directories(${Iconv_INCLUDE_DIRS})
+target_link_libraries(kio_remote KF5::KIOCore KF5::I18n KF5::ConfigCore Qt5::Network ${Iconv_LIBRARIES})
diff --git a/src/ioslaves/remote/kdedmodule/CMakeLists.txt b/src/ioslaves/remote/kdedmodule/CMakeLists.txt
index 4e40d21..7ba0d91 100644
--- a/src/ioslaves/remote/kdedmodule/CMakeLists.txt
+++ b/src/ioslaves/remote/kdedmodule/CMakeLists.txt
@@ -1,7 +1,9 @@
add_library(remotedirnotify MODULE remotedirnotify.cpp remotedirnotifymodule.cpp ../debug.cpp)
kcoreaddons_desktop_to_json(remotedirnotify remotedirnotify.desktop)

-target_link_libraries(remotedirnotify KF5::DBusAddons KF5::KIOCore)
+find_package(Iconv REQUIRED)
+include_directories(${Iconv_INCLUDE_DIRS})
+target_link_libraries(remotedirnotify KF5::DBusAddons KF5::KIOCore ${Iconv_LIBRARIES})
# Rename target to allow co-installability with plasma-workspace <= 5.9
set_target_properties(remotedirnotify PROPERTIES OUTPUT_NAME "remotenotifier")

diff --git a/src/ioslaves/telnet/CMakeLists.txt b/src/ioslaves/telnet/CMakeLists.txt
index ffee12c..0b03c21 100644
--- a/src/ioslaves/telnet/CMakeLists.txt
+++ b/src/ioslaves/telnet/CMakeLists.txt
@@ -2,10 +2,13 @@
add_executable(ktelnetservice5 ktelnetservice.cpp)
ecm_mark_nongui_executable(ktelnetservice5)

+find_package(Iconv REQUIRED)
+include_directories(${Iconv_INCLUDE_DIRS})
target_link_libraries(ktelnetservice5
Qt5::Widgets
KF5::I18n
KF5::KIOGui
+ ${Iconv_LIBRARIES}
)

install(TARGETS ktelnetservice5 ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
diff --git a/src/ioslaves/trash/CMakeLists.txt b/src/ioslaves/trash/CMakeLists.txt
index 80489d9..364ecb4 100644
--- a/src/ioslaves/trash/CMakeLists.txt
+++ b/src/ioslaves/trash/CMakeLists.txt
@@ -55,6 +55,8 @@ else()
)
endif()

+find_package(Iconv REQUIRED)
+include_directories(${Iconv_INCLUDE_DIRS})
target_link_libraries(kio_trash
KF5::ConfigCore
KF5::Solid
@@ -63,6 +65,7 @@ target_link_libraries(kio_trash
Qt5::Network
KF5::I18n
KF5::ConfigCore
+ ${Iconv_LIBRARIES}
)
if(APPLE)
target_link_libraries(kio_trash "-framework DiskArbitration -framework CoreFoundation")
@@ -84,6 +87,7 @@ target_link_libraries(ktrash5
KF5::KIOCore
KF5::I18n
KF5::ConfigCore
+ ${Iconv_LIBRARIES}
)

install(TARGETS ktrash5 ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
diff --git a/src/kioexec/CMakeLists.txt b/src/kioexec/CMakeLists.txt
index 92eeafe..8ae8742 100644
--- a/src/kioexec/CMakeLists.txt
+++ b/src/kioexec/CMakeLists.txt
@@ -19,7 +19,9 @@ ecm_qt_declare_logging_category(kioexecd
EXPORT KIO
)

-target_link_libraries(kioexecd KF5::I18n KF5::DBusAddons KF5::WidgetsAddons KF5::KIOCore)
+find_package(Iconv REQUIRED)
+include_directories(${Iconv_INCLUDE_DIRS})
+target_link_libraries(kioexecd KF5::I18n KF5::DBusAddons KF5::WidgetsAddons KF5::KIOCore ${Iconv_LIBRARIES})

kdbusaddons_generate_dbus_service_file(kiod5 org.kde.kioexecd ${KDE_INSTALL_FULL_LIBEXECDIR_KF5})

@@ -45,6 +47,7 @@ target_link_libraries(kioexec
KF5::WidgetsAddons # KMessageBox
KF5::WindowSystem # KStartupInfo
KF5::DBusAddons # KDBusService
+ ${Iconv_LIBRARIES}
)

if (HAVE_X11)
diff --git a/src/kpasswdserver/CMakeLists.txt b/src/kpasswdserver/CMakeLists.txt
index c268e03..c1a562a 100644
--- a/src/kpasswdserver/CMakeLists.txt
+++ b/src/kpasswdserver/CMakeLists.txt
@@ -39,6 +39,8 @@ ecm_qt_export_logging_category(
EXPORT KIO
)

+find_package(Iconv REQUIRED)
+include_directories(${Iconv_INCLUDE_DIRS})
target_link_libraries(kiod_kpasswdserver
KF5::DBusAddons # KDED Module
Qt5::DBus
@@ -46,6 +48,7 @@ target_link_libraries(kiod_kpasswdserver
KF5::WidgetsAddons # KPasswordDialog
KF5::I18n
KF5::WindowSystem
+ ${Iconv_LIBRARIES}
${WALLET_LIB}
)

68 changes: 68 additions & 0 deletions ports/kf5kio/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
set(PATCHES
fix_dbusmetatypes.patch # https://invent.kde.org/frameworks/kio/-/merge_requests/563
fix_config_cmake.patch # https://invent.kde.org/frameworks/kio/-/merge_requests/565
)

if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL static)
list(APPEND PATCHES fix_libiconv.patch)
endif()

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO KDE/kio
REF v5.84.0
SHA512 6c2d57a31e64ff1475b21d7fb2556d37b061dae319ddfe57a36f0bfc9627db624b1ac8fa4b2851681cb90d218255d0444c1403329d88f34a23e8ddffe99ca5b4
HEAD_REF master
PATCHES ${PATCHES}
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
INVERTED_FEATURES
"kf5notifications" CMAKE_DISABLE_FIND_PACKAGE_KF5Notifications
"kf5wallet" CMAKE_DISABLE_FIND_PACKAGE_KF5Wallet
)

# Prevent KDEClangFormat from writing to source effectively blocking parallel configure
file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n")

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_TESTING=OFF
-DCMAKE_VERBOSE_MAKEFILE=ON
-DKDE_INSTALL_QTPLUGINDIR=plugins
-DKDE_INSTALL_PLUGINDIR=plugins
-DKDE_INSTALL_LIBEXECDIR=bin
${FEATURE_OPTIONS}
MAYBE_UNUSED_VARIABLES CMAKE_DISABLE_FIND_PACKAGE_KF5Notifications
)

vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME KF5KIO CONFIG_PATH lib/cmake/KF5KIO)
vcpkg_copy_pdbs()

set(LIBEXEC_TOOLS kio_http_cache_cleaner kiod5 kioexec kioslave5)

if(NOT VCPKG_TARGET_IS_WINDOWS)
if(NOT VCPKG_TARGET_IS_ANDROID)
list(APPEND LIBEXEC_TOOLS kpac_dhcp_helper)
endif()

list(TRANSFORM LIBEXEC_TOOLS PREPEND "kf5/")
endif()

vcpkg_copy_tools(
TOOL_NAMES kcookiejar5 ktelnetservice5 ktrash5 protocoltojson ${LIBEXEC_TOOLS}
AUTO_CLEAN
)

file(APPEND "${CURRENT_PACKAGES_DIR}/tools/${PORT}/qt.conf" "Data = ../../share")

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")

if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()

file(INSTALL "${SOURCE_PATH}/LICENSES/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright")
Loading