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

[kf5newstuff] new port #20198

Merged
merged 23 commits into from
Oct 16, 2021
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
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
49 changes: 49 additions & 0 deletions ports/kf5newstuff/fix_static_builds.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
diff --git a/KF5NewStuffConfig.cmake.in b/KF5NewStuffConfig.cmake.in
index e4ef2944..063b83ca 100644
--- a/KF5NewStuffConfig.cmake.in
+++ b/KF5NewStuffConfig.cmake.in
@@ -10,5 +10,25 @@ find_dependency(KF5Service "@KF_DEP_VERSION@")
find_dependency(KF5NewStuffCore "@KF_VERSION@")
find_dependency(KF5NewStuffQuick "@KF_VERSION@")

+if (NOT @BUILD_SHARED_LIBS@)
+ find_dependency(Qt5Qml @REQUIRED_QT_VERSION@)
+ find_dependency(Qt5Quick @REQUIRED_QT_VERSION@)
+ find_dependency(Qt5Gui @REQUIRED_QT_VERSION@)
+
+ find_dependency(KF5KIO "@KF_DEP_VERSION@")
+ find_dependency(KF5Completion "@KF_DEP_VERSION@")
+ find_dependency(KF5I18n "@KF_DEP_VERSION@")
+ find_dependency(KF5ItemViews "@KF_DEP_VERSION@")
+ find_dependency(KF5IconThemes "@KF_DEP_VERSION@")
+ find_dependency(KF5TextWidgets "@KF_DEP_VERSION@")
+ find_dependency(KF5Archive "@KF_DEP_VERSION@")
+ find_dependency(KF5Package "@KF_DEP_VERSION@")
+ find_dependency(KF5Config "@KF_DEP_VERSION@")
+
+ if(@KF5Syndication_FOUND@)
+ find_dependency(KF5Syndication "@KF_VERSION@")
+ endif()
+endif()
+
include("${CMAKE_CURRENT_LIST_DIR}/KF5NewStuffTargets.cmake")
@PACKAGE_INCLUDE_QCHTARGETS@
--
GitLab

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c7022663..d2ead74a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,7 +18,7 @@ include(KDECMakeSettings)
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)

set(REQUIRED_QT_VERSION 5.15.0)
-find_package(Qt5 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED COMPONENTS Widgets Xml)
+find_package(Qt5 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED COMPONENTS Gui Widgets Xml)
find_package(Qt5 ${REQUIRED_QT_VERSION} NO_MODULE COMPONENTS Qml Quick)

find_package(KF5Archive ${KF_DEP_VERSION} REQUIRED)
--
GitLab

53 changes: 53 additions & 0 deletions ports/kf5newstuff/fix_static_builds2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
diff --git a/KF5NewStuffConfig.cmake.in b/KF5NewStuffConfig.cmake.in
index 063b83ca..1be53741 100644
--- a/KF5NewStuffConfig.cmake.in
+++ b/KF5NewStuffConfig.cmake.in
@@ -13,7 +13,6 @@ find_dependency(KF5NewStuffQuick "@KF_VERSION@")
if (NOT @BUILD_SHARED_LIBS@)
find_dependency(Qt5Qml @REQUIRED_QT_VERSION@)
find_dependency(Qt5Quick @REQUIRED_QT_VERSION@)
- find_dependency(Qt5Gui @REQUIRED_QT_VERSION@)

find_dependency(KF5KIO "@KF_DEP_VERSION@")
find_dependency(KF5Completion "@KF_DEP_VERSION@")
@@ -21,13 +20,6 @@ if (NOT @BUILD_SHARED_LIBS@)
find_dependency(KF5ItemViews "@KF_DEP_VERSION@")
find_dependency(KF5IconThemes "@KF_DEP_VERSION@")
find_dependency(KF5TextWidgets "@KF_DEP_VERSION@")
- find_dependency(KF5Archive "@KF_DEP_VERSION@")
- find_dependency(KF5Package "@KF_DEP_VERSION@")
- find_dependency(KF5Config "@KF_DEP_VERSION@")
-
- if(@KF5Syndication_FOUND@)
- find_dependency(KF5Syndication "@KF_VERSION@")
- endif()
endif()

include("${CMAKE_CURRENT_LIST_DIR}/KF5NewStuffTargets.cmake")
diff --git a/KF5NewStuffCoreConfig.cmake.in b/KF5NewStuffCoreConfig.cmake.in
index c65c7c42..b395f8cd 100644
--- a/KF5NewStuffCoreConfig.cmake.in
+++ b/KF5NewStuffCoreConfig.cmake.in
@@ -3,6 +3,19 @@
include(CMakeFindDependencyMacro)
find_dependency(KF5Attica "@KF_DEP_VERSION@")

+if (NOT @BUILD_SHARED_LIBS@)
+ find_dependency(Qt5Gui @REQUIRED_QT_VERSION@)
+
+ find_dependency(KF5I18n "@KF_DEP_VERSION@")
+ find_dependency(KF5Archive "@KF_DEP_VERSION@")
+ find_dependency(KF5Package "@KF_DEP_VERSION@")
+ find_dependency(KF5Config "@KF_DEP_VERSION@")
+
+ if(@KF5Syndication_FOUND@)
+ find_dependency(KF5Syndication "@KF_VERSION@")
+ endif()
+endif()
+
set(KDE_INSTALL_KNSRCDIR "@KDE_INSTALL_DATADIR@/knsrcfiles")

include("${CMAKE_CURRENT_LIST_DIR}/KF5NewStuffCoreTargets.cmake")
--
GitLab

39 changes: 39 additions & 0 deletions ports/kf5newstuff/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO KDE/knewstuff
REF v5.84.0
SHA512 107f8c7915f5a7656ed729d03b59e5f53f8751d771487b96e517358f1149801981e27d5cafdf86f759be539305fc8f847c51a28a35947766200cc912072f5c8d
HEAD_REF master
PATCHES
fix_static_builds.patch # https://invent.kde.org/frameworks/knewstuff/-/merge_requests/139
fix_static_builds2.patch # https://invent.kde.org/frameworks/knewstuff/-/merge_requests/140
)

vcpkg_cmake_configure(
DISABLE_PARALLEL_CONFIGURE
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_TESTING=OFF
-DKDE_INSTALL_QMLDIR=qml
-DBUNDLE_INSTALL_DIR=bin
)

vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME KF5NewStuff CONFIG_PATH lib/cmake/KF5NewStuff DO_NOT_DELETE_PARENT_CONFIG_PATH)
vcpkg_cmake_config_fixup(PACKAGE_NAME KF5NewStuffCore CONFIG_PATH lib/cmake/KF5NewStuffCore DO_NOT_DELETE_PARENT_CONFIG_PATH)
vcpkg_cmake_config_fixup(PACKAGE_NAME KF5NewStuffQuick CONFIG_PATH lib/cmake/KF5NewStuffQuick)
vcpkg_copy_pdbs()

vcpkg_copy_tools(
TOOL_NAMES knewstuff-dialog
AUTO_CLEAN
)

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")
40 changes: 40 additions & 0 deletions ports/kf5newstuff/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "kf5newstuff",
"version": "5.84.0",
"description": "Framework for downloading and sharing additional application data",
"homepage": "https://api.kde.org/frameworks/knewstuff/html/index.html",
"dependencies": [
"ecm",
{
"name": "gettext",
"host": true,
"features": [
"tools"
]
},
"kf5archive",
"kf5attica",
"kf5completion",
"kf5config",
"kf5coreaddons",
"kf5i18n",
"kf5iconthemes",
"kf5itemviews",
"kf5kio",
"kf5package",
"kf5service",
"kf5textwidgets",
"kf5widgetsaddons",
"kf5xmlgui",
"qt5-base",
"qt5-tools",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3064,6 +3064,10 @@
"baseline": "5.84.0",
"port-version": 0
},
"kf5newstuff": {
"baseline": "5.84.0",
"port-version": 0
},
"kf5notifications": {
"baseline": "5.84.0",
"port-version": 0
Expand Down
9 changes: 9 additions & 0 deletions versions/k-/kf5newstuff.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "f14367471ecd4c8d592ff8f413b556e5647cd86f",
"version": "5.84.0",
"port-version": 0
}
]
}