3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #155068 from jtojnar/xiphos-cleanup

xiphos: clean up
This commit is contained in:
Jörg Thalheim 2022-01-15 08:10:47 +00:00 committed by GitHub
commit c991351858
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 75 additions and 84 deletions

View file

@ -0,0 +1,38 @@
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

View file

@ -1,50 +1,29 @@
{ lib
, stdenv
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch
, appstream-glib
, at-spi2-core
, biblesync
, brotli
, clucene_core
, cmake
, dbus
, dbus-glib
, desktop-file-utils
, docbook2x
, docbook_xml_dtd_412
, enchant
, gconf
, enchant2
, glib
, gnome-doc-utils
, gtk2
, gtk3
, gtkhtml
, icu
, intltool
, isocodes
, itstool
, libdatrie
, libepoxy
, libglade
, libgsf
, libpsl
, libselinux
, libsepol
, libsysprof-capture
, libthai
, libuuid
, libxkbcommon
, libxslt
, minizip
, pcre
, pkg-config
, python
, scrollkeeper
, sqlite
, sword
, webkitgtk
, wrapGAppsHook
, xorg
, yelp-tools
, zip
}:
@ -60,62 +39,53 @@ stdenv.mkDerivation rec {
hash = "sha256-H5Q+azE2t3fgu77C9DxrkeUCJ7iJz3Cc91Ln4dqLvD8=";
};
patches = [
# GLIB_VERSION_MIN_REQUIRED is not defined.
# https://github.com/crosswire/xiphos/issues/1083#issuecomment-820304874
(fetchpatch {
name ="xiphos-glibc.patch";
url = "https://aur.archlinux.org/cgit/aur.git/plain/xiphos-glibc.patch?h=xiphos&id=bb816f43ba764ffac1287ab1e2a649c2443e3ce8";
sha256 = "he3U7phU2/QCrZidHviupA7YwzudnQ9Jbb8eMZw6/ck=";
extraPrefix = "";
})
# Fix D-Bus build
# https://github.com/crosswire/xiphos/pull/1103
./0001-Add-dbus-glib-dependency-to-main.patch
];
nativeBuildInputs = [
appstream-glib
appstream-glib # for appstream-util
cmake
desktop-file-utils
desktop-file-utils # for desktop-file-validate
docbook2x
docbook_xml_dtd_412
intltool
itstool
libxslt
pkg-config
wrapGAppsHook
yelp-tools
yelp-tools # for yelp-build
zip # for building help epubs
];
buildInputs = [
at-spi2-core
biblesync
brotli
clucene_core
dbus
dbus-glib
docbook2x
docbook_xml_dtd_412
enchant
gconf
enchant2
glib
gnome-doc-utils
gtk2
gtk3
gtkhtml
icu
intltool
isocodes
libdatrie
libepoxy
libglade
libgsf
libpsl
libselinux
libsepol
libsysprof-capture
libthai
libuuid
libxkbcommon
libxslt
minizip
pcre
python
scrollkeeper
sqlite
sword
webkitgtk
zip
]
++ (with xorg; [
libXdmcp
libXtst
]);
];
cmakeFlags = [
"-DDBUS=OFF"
# WebKit-based editor does not build.
"-DGTKHTML=ON"
];
@ -123,22 +93,9 @@ stdenv.mkDerivation rec {
# The build script won't continue without the version saved locally.
echo "${version}" > cmake/source_version.txt
export CLUCENE_HOME=${clucene_core};
export SWORD_HOME=${sword};
'';
patchFlags = [ "-p0" ];
patches = [
# GLIB_VERSION_MIN_REQUIRED is not defined.
# https://github.com/crosswire/xiphos/issues/1083#issuecomment-820304874
(fetchpatch {
name ="xiphos-glibc.patch";
url = "https://aur.archlinux.org/cgit/aur.git/plain/xiphos-glibc.patch?h=xiphos";
sha256 = "sha256-0WadztJKXW2adqsDP8iSAYVShbdqHoDvP+aVJC0cQB0=";
})
];
meta = with lib; {
description = "A GTK Bible study tool";
longDescription = ''

View file

@ -12,11 +12,6 @@ stdenv.mkDerivation rec {
rev = "master";
sha256 = "sha256-jL8YADvhW0o6I/2Uo5FNARMAnSbvtmFp+zWH1yCVvQk=";
};
propagatedBuildInputs = [ gsettings-desktop-schemas gtk3 gnome-icon-theme GConf ];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ intltool enchant isocodes autoreconfHook ];
patchFlags = [ "-p0" ];
patches = [
# Enables enchant2 support.
@ -24,7 +19,12 @@ stdenv.mkDerivation rec {
(fetchpatch {
name ="enchant-2.patch";
url = "https://aur.archlinux.org/cgit/aur.git/plain/enchant-2.patch?h=gtkhtml4&id=0218303a63d64c04d6483a6fe9bb55063fcfaa43";
sha256 = "sha256-jkA/GgIiJZmxkbcBGQ26OZ1nuI502BMPwbPhsZkbgbY=";
sha256 = "f0OToWGHZwxvqf+0qosfA9FfwJ/IXfjIPP5/WrcvArI=";
extraPrefix = "";
})
];
propagatedBuildInputs = [ gsettings-desktop-schemas gtk3 gnome-icon-theme GConf ];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ intltool enchant isocodes autoreconfHook ];
}

View file

@ -29748,11 +29748,7 @@ with pkgs;
};
xiphos = callPackage ../applications/misc/xiphos {
gconf = gnome2.GConf;
inherit (gnome2) libglade scrollkeeper;
gtkhtml = gnome2.gtkhtml4;
python = python27;
enchant = enchant2;
};
xournal = callPackage ../applications/graphics/xournal {