Skip to content

Commit

Permalink
[kf5notifications] new port (#19828)
Browse files Browse the repository at this point in the history
* Add kf5notifications port

* Fixed kf5notifications for windows

* [kf5*] update to 5.75.0

* [kf5notifications] port CONTROL to JSON

* [kf5notifications] remove redundant options

* [kf5notifications] update to current spec

* [kf5notifications] wrap paths in quotes

* [kf5notifications] use semver

* [kf5notifications] update to 5.84.0

* [kf5notifications] update versions

* [kf5notifications] remove bin from static builds

* [kf5notifications] update versions

* [kf5notifications] add kf5windowsystem dependency

* [kf5notifications] update versions

* [kf5notifications] fix CMake config file

* [kf5notifications] update versions

* [kf5notifications] add androidextras dependency

* [kf5notifications] update versions

* [kf5notifications] update versions

* [kf5newstuff] minimize patch size

* [kf5newstuff] use generic, non-semver versioning

* [kf5newstuff] update versions

* [kf5notifications] re-enable parallel configure

* [kf5notifications] update versions

Co-authored-by: Kuntal Majumder <hellozee@disroot.org>
  • Loading branch information
wrobelda and hellozee committed Sep 29, 2021
1 parent 7ce15ca commit a7e7bcd
Show file tree
Hide file tree
Showing 5 changed files with 144 additions and 0 deletions.
55 changes: 55 additions & 0 deletions ports/kf5notifications/fix_config_cmake.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
diff --git a/KF5NotificationsConfig.cmake.in b/KF5NotificationsConfig.cmake.in
index eeded42..6b261c0 100644
--- a/KF5NotificationsConfig.cmake.in
+++ b/KF5NotificationsConfig.cmake.in
@@ -11,5 +11,47 @@ if (@HAVE_DBUS@)
find_dependency(Qt5DBus @REQUIRED_QT_VERSION@)
endif()

+if (NOT @BUILD_SHARED_LIBS@)
+ find_dependency(KF5CoreAddons "@KF_DEP_VERSION@")
+ find_dependency(KF5Config "@KF_DEP_VERSION@")
+
+ if (@HAVE_KWINDOWSYSTEM@)
+ find_dependency(KF5WindowSystem "@KF_DEP_VERSION@")
+ endif()
+
+ if (@WITH_SNORETOAST@)
+ find_dependency(LibSnoreToast)
+ find_dependency(Qt5Network @REQUIRED_QT_VERSION@)
+ endif()
+
+ if (@HAVE_PHONON4QT5@)
+ find_dependency(Phonon4Qt5)
+ endif()
+
+ if (@Canberra_FOUND@)
+ find_dependency(Canberra)
+ endif()
+
+ if (@Qt5TextToSpeech_FOUND@)
+ find_dependency(Qt5TextToSpeech @REQUIRED_QT_VERSION@)
+ endif()
+
+ if(@X11_FOUND@)
+ find_dependency(Qt5X11Extras @REQUIRED_QT_VERSION@)
+ endif()
+
+ if(APPLE)
+ find_dependency(Qt5MacExtras @REQUIRED_QT_VERSION@)
+ endif()
+
+ if(@HAVE_DBUSMENUQT@)
+ find_dependency(dbusmenu-qt5)
+ endif()
+
+ if (ANDROID)
+ find_dependency(Qt5AndroidExtras @REQUIRED_QT_VERSION@)
+ endif()
+endif()
+
include("${CMAKE_CURRENT_LIST_DIR}/KF5NotificationsTargets.cmake")
@PACKAGE_INCLUDE_QCHTARGETS@
--
GitLab

31 changes: 31 additions & 0 deletions ports/kf5notifications/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO KDE/knotifications
REF v5.84.0
SHA512 ee8d2d0531df726f3e372983e30c2365aab887e1a3cdf5fb9c1b788e78b490f984018a44934ce62116bf10827fbf9aeeaf23236a7024a0e3757a1da7e90dca6c
HEAD_REF master
PATCHES
fix_config_cmake.patch
)

# 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
)

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

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

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

file(INSTALL "${SOURCE_PATH}/LICENSES/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright")
45 changes: 45 additions & 0 deletions ports/kf5notifications/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "kf5notifications",
"version": "5.84.0",
"description": "Desktop notifications",
"homepage": "https://api.kde.org/frameworks/knotifications/html/index.html",
"dependencies": [
"ecm",
"kf5config",
"kf5coreaddons",
{
"name": "kf5windowsystem",
"platform": "!android"
},
{
"name": "libcanberra",
"platform": "!(windows | uwp)"
},
{
"name": "libsnoretoast",
"platform": "windows"
},
{
"name": "qt5-androidextras",
"platform": "android"
},
"qt5-base",
{
"name": "qt5-macextras",
"platform": "osx"
},
"qt5-tools",
{
"name": "qt5-x11extras",
"platform": "linux"
},
{
"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 @@ -3048,6 +3048,10 @@
"baseline": "5.84.0",
"port-version": 1
},
"kf5notifications": {
"baseline": "5.84.0",
"port-version": 0
},
"kf5package": {
"baseline": "5.84.0",
"port-version": 1
Expand Down
9 changes: 9 additions & 0 deletions versions/k-/kf5notifications.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "a565cfd79777b605b4e3fc57be5bd2957c498c7f",
"version": "5.84.0",
"port-version": 0
}
]
}

0 comments on commit a7e7bcd

Please sign in to comment.