nixpkgs/pkgs/applications/misc/xiphos/0001-Add-dbus-glib-dependency-to-main.patch
Jan Tojnar a3720ac9a1 xiphos: clean up dependencies
- Moved build dependencies to native.
- Most of those added in 4.2.1 update are only transitive.
- Switched to GTK 3.
- The GNOME 2 dependencies can me removed as they are not used.
  - Except for GTKHtml since WebKit2-based editor is not implemented.
- Python is not needed either.
- D-Bus functionality requires a patch to build
- gsf was replaced by minizip – https://github.com/crosswire/xiphos/pull/1003
2022-01-15 05:35:27 +01:00

39 lines
1.1 KiB
Diff

From 0e9e686c902935c0f00afdf9d0d45f9635995988 Mon Sep 17 00:00:00 2001
From: Jan Tojnar <jtojnar@gmail.com>
Date: Sat, 15 Jan 2022 05:00:37 +0100
Subject: [PATCH] Add dbus-glib dependency to main
It is required through the ipc header and the build will fail without it on Nix:
In file included from /build/source/src/main/search_sidebar.cc:48:
/build/source/src/gui/ipc.h:26:10: fatal error: dbus/dbus-glib.h: No such file or directory
26 | #include <dbus/dbus-glib.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
---
src/main/CMakeLists.txt | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/main/CMakeLists.txt b/src/main/CMakeLists.txt
index 49b86371..bb8e4bb6 100644
--- a/src/main/CMakeLists.txt
+++ b/src/main/CMakeLists.txt
@@ -74,3 +74,14 @@ target_link_libraries(main
PkgConfig::Sword
PkgConfig::Biblesync
)
+
+IF (DBUS)
+ target_include_directories (main
+ PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
+ PkgConfig::DBus
+ )
+ target_link_libraries(main
+ PRIVATE
+ PkgConfig::DBus
+ )
+ENDIF (DBUS)
--
2.34.1