From a07a127237fc0137fb1d9bc1c48f8ea72a9b7de7 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 15 Jun 2023 01:19:45 +0200 Subject: [PATCH] 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. --- .../libraries/libe-book/default.nix | 20 ++++++++++++------- pkgs/top-level/all-packages.nix | 4 +--- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/pkgs/development/libraries/libe-book/default.nix b/pkgs/development/libraries/libe-book/default.nix index 095fb0ff79d0..f066e470568b 100644 --- a/pkgs/development/libraries/libe-book/default.nix +++ b/pkgs/development/libraries/libe-book/default.nix @@ -15,11 +15,20 @@ stdenv.mkDerivation rec { pname = "libe-book"; version = "0.1.3"; + src = fetchurl { - url = "https://kent.dl.sourceforge.net/project/libebook/libe-book-${version}/libe-book-${version}.tar.xz"; - sha256 = "sha256-fo2P808ngxrKO8b5zFMsL5DSBXx3iWO4hP89HjTf4fk="; + url = "mirror://sourceforge/libebook/libe-book-${version}/libe-book-${version}.tar.xz"; + hash = "sha256-fo2P808ngxrKO8b5zFMsL5DSBXx3iWO4hP89HjTf4fk="; }; + + # restore compatibility with icu68+ + postPatch = '' + substituteInPlace src/lib/EBOOKCharsetConverter.cpp --replace \ + "TRUE, TRUE, &status)" \ + "true, true, &status)" + ''; nativeBuildInputs = [ pkg-config ]; + buildInputs = [ gperf librevenge @@ -30,12 +39,9 @@ stdenv.mkDerivation rec { zlib 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"; + meta = with lib; { description = "Library for import of reflowable e-book formats"; license = licenses.lgpl21Plus; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 25c408635a47..6f647d600126 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22040,9 +22040,7 @@ with pkgs; liblscp = callPackage ../development/libraries/liblscp { }; - libe-book = callPackage ../development/libraries/libe-book { - icu = icu67; - }; + libe-book = callPackage ../development/libraries/libe-book { }; libemf2svg = callPackage ../development/libraries/libemf2svg { };