utsushi: 3.59.2 -> unstable-2020-11-10
+ master should be roughly equivalent to 3.62.0 + moving to the community repo because they are way better at fixing things, while upstream epson almost never merges fixes + great thanks to @mwilsoncoding for debugging the problem: + `autoconf-archive` was missing
This commit is contained in:
parent
1ce26aacd1
commit
f89b4dc450
@ -1,20 +1,32 @@
|
|||||||
{ stdenv, fetchFromGitLab, autoreconfHook, pkg-config, boost, gtkmm2
|
{ stdenv, writeScriptBin, fetchFromGitLab, autoreconfHook, pkg-config
|
||||||
, imagemagick, sane-backends, tesseract4, udev, libusb1}:
|
, autoconf-archive, libxslt, boost , gtkmm2 , imagemagick, sane-backends
|
||||||
|
, tesseract4, udev, libusb1, gnum4 }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
|
let
|
||||||
|
fakegit = writeScriptBin "git" ''
|
||||||
|
#! ${stdenv.shell} -e
|
||||||
|
if [ "$1" = "describe" ]; then
|
||||||
|
[ -r .rev ] && cat .rev || true
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
in stdenv.mkDerivation rec {
|
||||||
pname = "utsushi";
|
pname = "utsushi";
|
||||||
version = "3.59.2";
|
version = "unstable-2020-11-10";
|
||||||
|
|
||||||
src = fetchFromGitLab{
|
src = fetchFromGitLab {
|
||||||
owner = pname;
|
owner = pname;
|
||||||
repo = "imagescan";
|
repo = pname;
|
||||||
rev = version;
|
rev = "04700043e2d16062eb8bd27f4efff3024f387d32";
|
||||||
sha256 = "06gp97dfnf43l6kb988scmm66q9n5rc7ndwv3rykrdpyhy8rbi05";
|
sha256 = "0rxv5n0985d414i6hwichsn7hybwgwsimpy5s4hmcsvxqcpks4li";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
autoreconfHook
|
autoreconfHook
|
||||||
pkg-config
|
pkg-config
|
||||||
|
autoconf-archive
|
||||||
|
fakegit
|
||||||
|
libxslt
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
@ -26,19 +38,21 @@ stdenv.mkDerivation rec {
|
|||||||
libusb1.dev
|
libusb1.dev
|
||||||
];
|
];
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations -Wno-error=parentheses -Wno-error=unused-variable";
|
NIX_CFLAGS_COMPILE = [
|
||||||
|
"-Wno-error=deprecated-declarations"
|
||||||
|
"-Wno-error=parentheses"
|
||||||
|
"-Wno-error=unused-variable"
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
# remove vendored dependencies
|
|
||||||
rm -r upstream/boost
|
|
||||||
|
|
||||||
# create fake udev and sane config
|
# create fake udev and sane config
|
||||||
mkdir -p $out/etc/{sane.d,udev/rules.d}
|
mkdir -p $out/etc/{sane.d,udev/rules.d}
|
||||||
touch $out/etc/sane.d/dll.conf
|
touch $out/etc/sane.d/dll.conf
|
||||||
|
# absolute paths to convert & tesseract
|
||||||
# absolute paths to conver & tesseract
|
sed -i '/\[AC_DEFINE(\[HAVE_IMAGE_MAGICK\], \[1\])/a \ MAGICK_CONVERT="${imagemagick}/bin/convert"' configure.ac
|
||||||
substituteInPlace filters/magick.cpp \
|
substituteInPlace filters/magick.cpp \
|
||||||
--replace '"convert' '"${imagemagick}/bin/convert'
|
--replace 'convert ' '${imagemagick}/bin/convert '
|
||||||
substituteInPlace filters/reorient.cpp \
|
substituteInPlace filters/reorient.cpp \
|
||||||
--replace '"tesseract' '"${tesseract4}/bin/tesseract'
|
--replace '"tesseract' '"${tesseract4}/bin/tesseract'
|
||||||
substituteInPlace filters/get-text-orientation \
|
substituteInPlace filters/get-text-orientation \
|
||||||
@ -61,7 +75,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
doInstallCheck = true;
|
doInstallCheck = false;
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "SANE utsushi backend for some Epson scanners";
|
description = "SANE utsushi backend for some Epson scanners";
|
||||||
|
Loading…
Reference in New Issue
Block a user