diff options
author | K900 <me@0upti.me> | 2024-02-28 15:52:35 +0300 |
---|---|---|
committer | K900 <me@0upti.me> | 2024-02-28 18:49:12 +0300 |
commit | 416c9181cd3fc7445f4d334146b0ee460907428b (patch) | |
tree | 06b6a89bd7668c45a67ec805774789370260410e /pkgs/applications/kde/gwenview | |
parent | f922d827149d5d07f0c3cb4ac068f4220200e114 (diff) |
gwenview: fix build with versioned kImageAnnotator
Diffstat (limited to 'pkgs/applications/kde/gwenview')
-rw-r--r-- | pkgs/applications/kde/gwenview/default.nix | 31 | ||||
-rw-r--r-- | pkgs/applications/kde/gwenview/kimageannotator.patch | 56 |
2 files changed, 87 insertions, 0 deletions
diff --git a/pkgs/applications/kde/gwenview/default.nix b/pkgs/applications/kde/gwenview/default.nix new file mode 100644 index 0000000000000..d697778f47267 --- /dev/null +++ b/pkgs/applications/kde/gwenview/default.nix @@ -0,0 +1,31 @@ +{ + mkDerivation, lib, + extra-cmake-modules, kdoctools, + exiv2, lcms2, cfitsio, + baloo, kactivities, kio, kipi-plugins, kitemmodels, kparts, libkdcraw, libkipi, + phonon, qtimageformats, qtsvg, qtx11extras, kinit, kpurpose, kcolorpicker, kimageannotator, + wayland, wayland-protocols +}: + +mkDerivation { + pname = "gwenview"; + meta = { + homepage = "https://apps.kde.org/gwenview/"; + description = "KDE image viewer"; + license = with lib.licenses; [ gpl2Plus fdl12Plus ]; + maintainers = [ lib.maintainers.ttuegel ]; + mainProgram = "gwenview"; + }; + + # Fix build with versioned kImageAnnotator + patches = [./kimageannotator.patch]; + + nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + buildInputs = [ + baloo kactivities kio kitemmodels kparts libkdcraw libkipi phonon + exiv2 lcms2 cfitsio + qtimageformats qtsvg qtx11extras kpurpose kcolorpicker kimageannotator + wayland wayland-protocols + ]; + propagatedUserEnvPkgs = [ kipi-plugins libkipi (lib.getBin kinit) ]; +} diff --git a/pkgs/applications/kde/gwenview/kimageannotator.patch b/pkgs/applications/kde/gwenview/kimageannotator.patch new file mode 100644 index 0000000000000..83cba93e49c15 --- /dev/null +++ b/pkgs/applications/kde/gwenview/kimageannotator.patch @@ -0,0 +1,56 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 01db0fb1..06319c54 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -166,12 +166,12 @@ if(NOT WITHOUT_X11) + endif() + + if (QT_MAJOR_VERSION STREQUAL "5") +- find_package(kImageAnnotator) +- set_package_properties(kImageAnnotator PROPERTIES URL "https://github.com/ksnip/kImageAnnotator" DESCRIPTION "The kImageAnnotator library provides tools to annotate" TYPE REQUIRED) +- if(kImageAnnotator_FOUND) ++ find_package(kImageAnnotator-Qt5) ++ set_package_properties(kImageAnnotator-Qt5 PROPERTIES URL "https://github.com/ksnip/kImageAnnotator" DESCRIPTION "The kImageAnnotator library provides tools to annotate" TYPE REQUIRED) ++ if(kImageAnnotator-Qt5_FOUND) + set(KIMAGEANNOTATOR_FOUND 1) +- find_package(kColorPicker REQUIRED) +- if(NOT kImageAnnotator_VERSION VERSION_LESS 0.5.0) ++ find_package(kColorPicker-Qt5 REQUIRED) ++ if(NOT kImageAnnotator-Qt5_VERSION VERSION_LESS 0.5.0) + set(KIMAGEANNOTATOR_CAN_LOAD_TRANSLATIONS 1) + endif() + endif() +diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt +index 8c136835..ef4cff74 100644 +--- a/app/CMakeLists.txt ++++ b/app/CMakeLists.txt +@@ -157,6 +157,6 @@ target_link_libraries(slideshowfileitemaction + KF${QT_MAJOR_VERSION}::KIOWidgets + KF${QT_MAJOR_VERSION}::Notifications) + +-if(kImageAnnotator_FOUND) ++if(kImageAnnotator-Qt5_FOUND) + target_link_libraries(gwenview kImageAnnotator::kImageAnnotator) + endif() +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index 05a2ea67..4167a1bb 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -157,7 +157,7 @@ set(gwenviewlib_SRCS + touch/touch_helper.cpp + ${GV_JPEG_DIR}/transupp.c + ) +-if (kImageAnnotator_FOUND) ++if (kImageAnnotator-Qt5_FOUND) + set(gwenviewlib_SRCS ${gwenviewlib_SRCS} + annotate/annotatedialog.cpp + annotate/annotateoperation.cpp +@@ -338,7 +338,7 @@ if (GWENVIEW_SEMANTICINFO_BACKEND_BALOO) + ) + endif() + +-if(kImageAnnotator_FOUND) ++if(kImageAnnotator-Qt5_FOUND) + target_link_libraries(gwenviewlib kImageAnnotator::kImageAnnotator) + endif() + |