diff --git a/ports/kf5notifications/fix_config_cmake.patch b/ports/kf5notifications/fix_config_cmake.patch new file mode 100644 index 00000000000000..318881cfbfaeea --- /dev/null +++ b/ports/kf5notifications/fix_config_cmake.patch @@ -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 + diff --git a/ports/kf5notifications/portfile.cmake b/ports/kf5notifications/portfile.cmake new file mode 100644 index 00000000000000..afff6c000fc71d --- /dev/null +++ b/ports/kf5notifications/portfile.cmake @@ -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") \ No newline at end of file diff --git a/ports/kf5notifications/vcpkg.json b/ports/kf5notifications/vcpkg.json new file mode 100644 index 00000000000000..f2b920c1301801 --- /dev/null +++ b/ports/kf5notifications/vcpkg.json @@ -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 + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 0f7ca3c5d4a3a0..b2ecb817a59ae9 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3044,6 +3044,10 @@ "baseline": "5.84.0", "port-version": 1 }, + "kf5notifications": { + "baseline": "5.84.0", + "port-version": 0 + }, "kf5package": { "baseline": "5.84.0", "port-version": 1 diff --git a/versions/k-/kf5notifications.json b/versions/k-/kf5notifications.json new file mode 100644 index 00000000000000..b837ed00d08145 --- /dev/null +++ b/versions/k-/kf5notifications.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "a565cfd79777b605b4e3fc57be5bd2957c498c7f", + "version": "5.84.0", + "port-version": 0 + } + ] +}