mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-19 14:20:19 +00:00
xiphos: 4.3.2 -> 4.4.0, biblesync 2.1.0 -> 2.2.0 (#548658)
This commit is contained in:
@@ -2,38 +2,46 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
pkg-config,
|
||||
cmake,
|
||||
libuuid,
|
||||
gettext,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
pname = "biblesync";
|
||||
version = "2.1.0";
|
||||
version = "2.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "karlkleinpaste";
|
||||
repo = "biblesync";
|
||||
tag = finalAttrs.version;
|
||||
sha256 = "0prmd12jq2cjdhsph5v89y38j7hhd51dr3r1hivgkhczr3m5hf4s";
|
||||
sha256 = "sha256-8CPP0ndrnJrGhNR7Y3lX3td5jXNE8VuwEiD8C2D4K5I=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix cmake-4 support
|
||||
(fetchpatch {
|
||||
name = "cmake-4.patch";
|
||||
url = "https://github.com/karlkleinpaste/biblesync/commit/4b00f9fd3d0c858947eee18206ef44f9f6bd2283.patch?full_index=1";
|
||||
hash = "sha256-CVYhYBDneLN3Ogvye01EQCc9zxjSwaKBzk1fBaKINug=";
|
||||
})
|
||||
];
|
||||
# `bind` is pulled from std::bind because of `using namespace std;`, so we
|
||||
# pin that here.
|
||||
# On Darwin, uuid/uuid.h and uuid_generate() are provided by the system
|
||||
# (libSystem). The bundled FindUUID.cmake would otherwise locate uuid/uuid.h
|
||||
# in the Apple SDK and add the SDK's include root as a plain -I path, which
|
||||
# breaks libc++'s header search order. Skip the lookup entirely.
|
||||
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
substituteInPlace src/biblesync.cc \
|
||||
--replace-fail "if (bind(server_fd" "if (::bind(server_fd"
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail 'FIND_PACKAGE(UUID REQUIRED)' "" \
|
||||
--replace-fail 'INCLUDE_DIRECTORIES("''${UUID_INCLUDE_DIRS}")' "" \
|
||||
--replace-fail 'TARGET_LINK_LIBRARIES(biblesync "''${UUID_LIBRARIES}")' ""
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
cmake
|
||||
];
|
||||
buildInputs = [ libuuid ];
|
||||
buildInputs =
|
||||
lib.optional (!stdenv.hostPlatform.isDarwin) libuuid
|
||||
++ lib.optional (stdenv.hostPlatform.isWindows || stdenv.hostPlatform.isDarwin) gettext;
|
||||
|
||||
meta = {
|
||||
homepage = "https://wiki.crosswire.org/BibleSync";
|
||||
@@ -49,6 +57,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
'';
|
||||
license = lib.licenses.publicDomain;
|
||||
maintainers = [ ];
|
||||
platforms = lib.platforms.linux;
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
})
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
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
|
||||
@@ -77,6 +77,17 @@
|
||||
PkgConfig::Biblesync
|
||||
)
|
||||
|
||||
+IF (DBUS)
|
||||
+ target_include_directories (main
|
||||
+ PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
|
||||
+ PkgConfig::DBus
|
||||
+ )
|
||||
+ target_link_libraries(main
|
||||
+ PRIVATE
|
||||
+ PkgConfig::DBus
|
||||
+ )
|
||||
+ENDIF (DBUS)
|
||||
+
|
||||
if(WK_FOUND)
|
||||
target_compile_definitions(main
|
||||
PRIVATE
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -2,15 +2,13 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
appstream-glib,
|
||||
appstream,
|
||||
biblesync,
|
||||
cmake,
|
||||
dbus-glib,
|
||||
desktop-file-utils,
|
||||
docbook2x,
|
||||
docbook_xml_dtd_412,
|
||||
glib,
|
||||
gtkhtml,
|
||||
icu,
|
||||
intltool,
|
||||
itstool,
|
||||
@@ -18,6 +16,7 @@
|
||||
libxslt,
|
||||
minizip,
|
||||
pkg-config,
|
||||
speechd-minimal,
|
||||
sword,
|
||||
webkitgtk_4_1,
|
||||
wrapGAppsHook3,
|
||||
@@ -27,23 +26,17 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "xiphos";
|
||||
version = "4.3.2";
|
||||
version = "4.4.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "crosswire";
|
||||
repo = "xiphos";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-HTndBWfze8tV4G9npLYB7SkgpJNQcQBZqHKjxhZU6JY=";
|
||||
hash = "sha256-csbhlYSn/TFxZV/pGHgJT4Hnqa26BZQUKD/CBHhxi/U=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix D-Bus build
|
||||
# https://github.com/crosswire/xiphos/pull/1103
|
||||
./0001-Add-dbus-glib-dependency-to-main.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
appstream-glib # for appstream-util
|
||||
appstream
|
||||
cmake
|
||||
desktop-file-utils # for desktop-file-validate
|
||||
docbook2x
|
||||
@@ -59,19 +52,17 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
buildInputs = [
|
||||
biblesync
|
||||
dbus-glib
|
||||
glib
|
||||
gtkhtml
|
||||
icu
|
||||
libuuid
|
||||
minizip
|
||||
speechd-minimal
|
||||
sword
|
||||
webkitgtk_4_1
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
# WebKit-based editor does not build.
|
||||
"-DGTKHTML=ON"
|
||||
"-DGTKTVEDITOR=ON"
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
|
||||
Reference in New Issue
Block a user