gwenview: fix build with versioned kImageAnnotator
This commit is contained in:
parent
f922d82714
commit
416c9181cd
3 changed files with 62 additions and 2 deletions
|
@ -13,7 +13,7 @@ IF YOUR PACKAGE IS NOT LISTED IN `./srcs.nix`, IT DOES NOT GO HERE.
|
|||
Many of the packages released upstream are not yet built in Nixpkgs due to lack
|
||||
of demand. To add a Nixpkgs build for an upstream package, copy one of the
|
||||
existing packages here and modify it as necessary. A simple example package that
|
||||
still shows most of the available features is in `./gwenview.nix`.
|
||||
still shows most of the available features is in `./gwenview`.
|
||||
|
||||
# Updates
|
||||
|
||||
|
@ -92,7 +92,7 @@ let
|
|||
ghostwriter = callPackage ./ghostwriter.nix {};
|
||||
granatier = callPackage ./granatier.nix {};
|
||||
grantleetheme = callPackage ./grantleetheme {};
|
||||
gwenview = callPackage ./gwenview.nix {};
|
||||
gwenview = callPackage ./gwenview {};
|
||||
incidenceeditor = callPackage ./incidenceeditor.nix {};
|
||||
itinerary = callPackage ./itinerary.nix {};
|
||||
juk = callPackage ./juk.nix {};
|
||||
|
|
|
@ -16,6 +16,10 @@ mkDerivation {
|
|||
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
|
56
pkgs/applications/kde/gwenview/kimageannotator.patch
Normal file
56
pkgs/applications/kde/gwenview/kimageannotator.patch
Normal file
|
@ -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()
|
||||
|
Loading…
Reference in a new issue