libe-book: build with latest icu version

Fix compatibility with the latest icu version and refactor the
derivation slightly.

Updates the fetcher to use the sourceforge mirror over the unresolvable
kent mirror.

Remove icu58 workaround, it is not required anymore.
This commit is contained in:
Martin Weinelt 2023-06-15 01:19:45 +02:00
parent d4317fa943
commit a07a127237
No known key found for this signature in database
GPG key ID: 87C1E9888F856759
2 changed files with 14 additions and 10 deletions

View file

@ -15,11 +15,20 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libe-book"; pname = "libe-book";
version = "0.1.3"; version = "0.1.3";
src = fetchurl { src = fetchurl {
url = "https://kent.dl.sourceforge.net/project/libebook/libe-book-${version}/libe-book-${version}.tar.xz"; url = "mirror://sourceforge/libebook/libe-book-${version}/libe-book-${version}.tar.xz";
sha256 = "sha256-fo2P808ngxrKO8b5zFMsL5DSBXx3iWO4hP89HjTf4fk="; hash = "sha256-fo2P808ngxrKO8b5zFMsL5DSBXx3iWO4hP89HjTf4fk=";
}; };
# restore compatibility with icu68+
postPatch = ''
substituteInPlace src/lib/EBOOKCharsetConverter.cpp --replace \
"TRUE, TRUE, &status)" \
"true, true, &status)"
'';
nativeBuildInputs = [ pkg-config ]; nativeBuildInputs = [ pkg-config ];
buildInputs = [ buildInputs = [
gperf gperf
librevenge librevenge
@ -30,12 +39,9 @@ stdenv.mkDerivation rec {
zlib zlib
liblangtag liblangtag
]; ];
# Boost 1.59 compatibility fix
# Attempt removing when updating
postPatch = ''
sed -i 's,^CPPFLAGS.*,\0 -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED,' src/lib/Makefile.in
'';
env.NIX_CFLAGS_COMPILE = "-Wno-error=unused-function"; env.NIX_CFLAGS_COMPILE = "-Wno-error=unused-function";
meta = with lib; { meta = with lib; {
description = "Library for import of reflowable e-book formats"; description = "Library for import of reflowable e-book formats";
license = licenses.lgpl21Plus; license = licenses.lgpl21Plus;

View file

@ -22040,9 +22040,7 @@ with pkgs;
liblscp = callPackage ../development/libraries/liblscp { }; liblscp = callPackage ../development/libraries/liblscp { };
libe-book = callPackage ../development/libraries/libe-book { libe-book = callPackage ../development/libraries/libe-book { };
icu = icu67;
};
libemf2svg = callPackage ../development/libraries/libemf2svg { }; libemf2svg = callPackage ../development/libraries/libemf2svg { };