diff --git a/pkgs/additional/koreader-from-src/sources.nix b/pkgs/additional/koreader-from-src/sources.nix index 710fa8d2..b4741225 100644 --- a/pkgs/additional/koreader-from-src/sources.nix +++ b/pkgs/additional/koreader-from-src/sources.nix @@ -129,7 +129,14 @@ in source.url = "https://github.com/DanBloomberg/leptonica.git"; source.rev = "1.74.1"; source.hash = "sha256-SDXKam768xvZZvTbXe3sssvZyeLEEiY97Vrzx8hoc6g="; - # package = leptonica; # k2pdf needs leptonica src. # cp -f /build/koreader/base/thirdparty/libk2pdfopt/build/aarch64-unknown-linux-gnu/libk2pdfopt-prefix/src/libk2pdfopt/leptonica_mod/dewarp2.c + # k2pdf needs leptonica src, because it actually patches it and builds it itself + # `cp -f $(LEPTONICA_MOD)/dewarp2.c $(LEPTONICA_DIR)/src/dewarp2.c` + # i.e. cp -f /build/koreader/base/thirdparty/libk2pdfopt/build/aarch64-unknown-linux-gnu/libk2pdfopt-prefix/src/libk2pdfopt/leptonica_mod/dewarp2.c ... + # k2pdf uses an old leptonica -- like 2015-2017-ish. + # seems it can be at least partially updated, by replacing `numaGetMedianVariation` with `numaGetMedianDevFromMedian` (drop-in replacement) + # and replacing references to `liblept.so` with `libleptonica.so`, + # but eventually this requires patching the tesseract Makefiles. could get intense, idk. + # package = leptonica; }; # libjpeg-turbo = { # source.url = "https://github.com/libjpeg-turbo/libjpeg-turbo.git";