nixpkgs/pkgs/development/libraries/leptonica/default.nix

30 lines
887 B
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, which, gnuplot
leptonica: 1.72 -> 1.74.1 The changes are a bit too big to include it here in the commit message, so if you want the details of what changed, please visit this URL: http://leptonica.org/source/version-notes.html I have also provided openjpeg, giflib and libwebp as dependencies so that Leptonica is able to read/write those file formats. Additionally I've added a patch that uses pkgconfig to resolve all dependencies (except giflib), because unlike AC_CHECK_LIB() the PKG_CHECK_MODULES() macro defines *_LIBS variables to include the linker search path. Unfortunately that patch alone is not enough, because the *_LIBS variable are substituted by the upstream configure.ac to *not* include the linker search paths, so we need to remove the AC_SUBST() calls within PKG_CHECK_MODULES(). The only dependency that's not yet using PKG_CHECK_MODULES() is giflib, because giflib doesn't have a pkg-config description file, therefore we're using substituteInPlace to insert the linker search path after the lept.pc file was generated by configure. Another thing that we no longer need is the dependency on libpng version 1.2, because Leptonica now also works with more recent libpng versions. Tested by building the package itself and also the following packages that immediately depend on leptonica: * k2pdfopt * tesseract * jbig2enc All of these packages succeeded to build on x86_64-linux. The main reason why I'm bumping Leptonica to version 1.74.1 is that we need at least version 1.74 to bump Tesseract to the latest upstream version. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2017-04-07 22:11:14 +00:00
, giflib, libjpeg, libpng, libtiff, libwebp, openjpeg, zlib
}:
leptonica: 1.72 -> 1.74.1 The changes are a bit too big to include it here in the commit message, so if you want the details of what changed, please visit this URL: http://leptonica.org/source/version-notes.html I have also provided openjpeg, giflib and libwebp as dependencies so that Leptonica is able to read/write those file formats. Additionally I've added a patch that uses pkgconfig to resolve all dependencies (except giflib), because unlike AC_CHECK_LIB() the PKG_CHECK_MODULES() macro defines *_LIBS variables to include the linker search path. Unfortunately that patch alone is not enough, because the *_LIBS variable are substituted by the upstream configure.ac to *not* include the linker search paths, so we need to remove the AC_SUBST() calls within PKG_CHECK_MODULES(). The only dependency that's not yet using PKG_CHECK_MODULES() is giflib, because giflib doesn't have a pkg-config description file, therefore we're using substituteInPlace to insert the linker search path after the lept.pc file was generated by configure. Another thing that we no longer need is the dependency on libpng version 1.2, because Leptonica now also works with more recent libpng versions. Tested by building the package itself and also the following packages that immediately depend on leptonica: * k2pdfopt * tesseract * jbig2enc All of these packages succeeded to build on x86_64-linux. The main reason why I'm bumping Leptonica to version 1.74.1 is that we need at least version 1.74 to bump Tesseract to the latest upstream version. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2017-04-07 22:11:14 +00:00
stdenv.mkDerivation rec {
pname = "leptonica";
2021-06-16 14:32:56 +00:00
version = "1.81.1";
2013-06-25 07:17:34 +00:00
src = fetchurl {
url = "http://www.leptonica.org/source/${pname}-${version}.tar.gz";
2021-06-16 14:32:56 +00:00
sha256 = "sha256-D06zFem93deX9MVf3qTh9F/Kfjs1ii/Gk/2VfOLEPKk=";
};
nativeBuildInputs = [ autoreconfHook pkg-config ];
leptonica: 1.72 -> 1.74.1 The changes are a bit too big to include it here in the commit message, so if you want the details of what changed, please visit this URL: http://leptonica.org/source/version-notes.html I have also provided openjpeg, giflib and libwebp as dependencies so that Leptonica is able to read/write those file formats. Additionally I've added a patch that uses pkgconfig to resolve all dependencies (except giflib), because unlike AC_CHECK_LIB() the PKG_CHECK_MODULES() macro defines *_LIBS variables to include the linker search path. Unfortunately that patch alone is not enough, because the *_LIBS variable are substituted by the upstream configure.ac to *not* include the linker search paths, so we need to remove the AC_SUBST() calls within PKG_CHECK_MODULES(). The only dependency that's not yet using PKG_CHECK_MODULES() is giflib, because giflib doesn't have a pkg-config description file, therefore we're using substituteInPlace to insert the linker search path after the lept.pc file was generated by configure. Another thing that we no longer need is the dependency on libpng version 1.2, because Leptonica now also works with more recent libpng versions. Tested by building the package itself and also the following packages that immediately depend on leptonica: * k2pdfopt * tesseract * jbig2enc All of these packages succeeded to build on x86_64-linux. The main reason why I'm bumping Leptonica to version 1.74.1 is that we need at least version 1.74 to bump Tesseract to the latest upstream version. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2017-04-07 22:11:14 +00:00
buildInputs = [ giflib libjpeg libpng libtiff libwebp openjpeg zlib ];
enableParallelBuilding = true;
checkInputs = [ which gnuplot ];
2019-11-07 16:38:49 +00:00
# Fails on pngio_reg for unknown reason
doCheck = false; # !stdenv.isDarwin;
meta = {
description = "Image processing and analysis library";
homepage = "http://www.leptonica.org/";
license = lib.licenses.bsd2; # http://www.leptonica.org/about-the-license.html
platforms = lib.platforms.unix;
};
}