mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
epsonscan2: 6.7.63.0 -> 6.7.70.0 (#365687)
This commit is contained in:
commit
dcbfd146c4
4 changed files with 71 additions and 38 deletions
|
@ -64,20 +64,20 @@ index 387561e..15448ad 100644
|
|||
static const int kMaxBuf = 256;
|
||||
|
||||
diff --git a/src/Controller/Src/Scanner/Engine.cpp b/src/Controller/Src/Scanner/Engine.cpp
|
||||
index 9489d4b..670bad9 100644
|
||||
index 8bd842e..d011329 100755
|
||||
--- a/src/Controller/Src/Scanner/Engine.cpp
|
||||
+++ b/src/Controller/Src/Scanner/Engine.cpp
|
||||
@@ -263,8 +263,8 @@ SDIError Engine::Open()
|
||||
//kill es2netif
|
||||
//kill es2intif
|
||||
|
||||
- system("killall -9 -q es2netif > /dev/null");
|
||||
- system("killall -9 -q es2intif > /dev/null");
|
||||
+ system("@KILLALL@ -9 -q es2netif > /dev/null");
|
||||
+ system("@KILLALL@ -9 -q es2intif > /dev/null");
|
||||
|
||||
if (engine_) {
|
||||
return ExchangeError(engine_->Open());
|
||||
@@ -210,8 +210,8 @@ bool Engine::InitWithDeviceInfoDict(const char *deviceInfo) {
|
||||
SDIError Engine::Open()
|
||||
{
|
||||
SDI_TRACE_LOG("Enter");
|
||||
- system("killall -9 -q es2netif > /dev/null");
|
||||
- system("killall -9 -q es2intif > /dev/null");
|
||||
+ system("@KILLALL@ -9 -q es2netif > /dev/null");
|
||||
+ system("@KILLALL@ -9 -q es2intif > /dev/null");
|
||||
if (engine_) {
|
||||
return ExchangeError(engine_->Open());
|
||||
}
|
||||
diff --git a/src/Standalone/CMakeLists.txt b/src/Standalone/CMakeLists.txt
|
||||
index eff3dd3..c2b3803 100644
|
||||
--- a/src/Standalone/CMakeLists.txt
|
37
pkgs/by-name/ep/epsonscan2/gcc14.patch
Normal file
37
pkgs/by-name/ep/epsonscan2/gcc14.patch
Normal file
|
@ -0,0 +1,37 @@
|
|||
diff --git a/thirdparty/zlib/gzlib.c b/thirdparty/zlib/gzlib.c
|
||||
index 4105e6a..eae3a38 100644
|
||||
--- a/thirdparty/zlib/gzlib.c
|
||||
+++ b/thirdparty/zlib/gzlib.c
|
||||
@@ -3,6 +3,7 @@
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
+#include <unistd.h>
|
||||
#include "gzguts.h"
|
||||
|
||||
#if defined(_WIN32) && !defined(__BORLANDC__) && !defined(__MINGW32__)
|
||||
diff --git a/thirdparty/zlib/gzread.c b/thirdparty/zlib/gzread.c
|
||||
index 956b91e..66089b6 100644
|
||||
--- a/thirdparty/zlib/gzread.c
|
||||
+++ b/thirdparty/zlib/gzread.c
|
||||
@@ -3,6 +3,7 @@
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
+#include <unistd.h>
|
||||
#include "gzguts.h"
|
||||
|
||||
/* Local functions */
|
||||
diff --git a/thirdparty/zlib/gzwrite.c b/thirdparty/zlib/gzwrite.c
|
||||
index c7b5651..e685f3e 100644
|
||||
--- a/thirdparty/zlib/gzwrite.c
|
||||
+++ b/thirdparty/zlib/gzwrite.c
|
||||
@@ -3,6 +3,7 @@
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
+#include <unistd.h>
|
||||
#include "gzguts.h"
|
||||
|
||||
/* Local functions */
|
||||
|
|
@ -25,26 +25,20 @@
|
|||
let
|
||||
pname = "epsonscan2";
|
||||
description = "Epson Scan 2 scanner driver for many modern Epson scanners and multifunction printers";
|
||||
version = "6.7.63.0";
|
||||
version = "6.7.70.0";
|
||||
|
||||
system = stdenv.hostPlatform.system;
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://download3.ebz.epson.net/dsc/f/03/00/15/17/69/0ef02802c476a6564f13cac929859c394f40326a/epsonscan2-6.7.63.0-1.src.tar.gz";
|
||||
hash = "sha256-ZLnbIk0I7g6ext5anPD+/lD4qNlk6f2fL0xdIWLcfbY=";
|
||||
url = "https://download3.ebz.epson.net/dsc/f/03/00/16/14/37/7577ee65efdad48ee2d2f38d9eda75418e490552/epsonscan2-6.7.70.0-1.src.tar.gz";
|
||||
hash = "sha256-y7XGxrOpVou/ZSfUffV3qv+SsFFpTiU7pWvtfsiLZWc=";
|
||||
};
|
||||
bundle =
|
||||
{
|
||||
"i686-linux" = fetchzip {
|
||||
name = "${pname}-bundle";
|
||||
url = "https://download3.ebz.epson.net/dsc/f/03/00/15/17/67/ceae6a02aaa81cb61012899987fbb5ab891b6ab2/epsonscan2-bundle-6.7.63.0.i686.deb.tar.gz";
|
||||
hash = "sha256-h9beAzNdjOhTlZqW0rJbSQXGOpvFRGvTcWw0ZtOqiYY=";
|
||||
};
|
||||
|
||||
"x86_64-linux" = fetchzip {
|
||||
name = "${pname}-bundle";
|
||||
url = "https://download3.ebz.epson.net/dsc/f/03/00/15/17/68/050e5a55ed90f4efb4ca3bdd34e5797b149443ca/epsonscan2-bundle-6.7.63.0.x86_64.deb.tar.gz";
|
||||
hash = "sha256-+S17FfS2h4zZCvE6W+yZvdJb6+OWYTt0ZWCA+pe1NZc=";
|
||||
url = "https://download3.ebz.epson.net/dsc/f/03/00/16/14/38/7b1780ace96e2c6033bbb667c7f3ed281e4e9f38/epsonscan2-bundle-6.7.70.0.x86_64.deb.tar.gz";
|
||||
hash = "sha256-fPNNFgW/VU/YG+jjmSvPZ0WsHibsXY1TNp164GxLHKw=";
|
||||
};
|
||||
}
|
||||
."${system}" or (throw "Unsupported system: ${system}");
|
||||
|
@ -55,26 +49,29 @@ stdenv.mkDerivation {
|
|||
|
||||
patches = [
|
||||
./build.patch
|
||||
./gcc14.patch
|
||||
(fetchpatch {
|
||||
url = "https://github.com/flathub/net.epson.epsonscan2/raw/master/patches/epsonscan2-crash.patch";
|
||||
hash = "sha256-srMxlFfnZuJ3ed5veFcJIiZuW27F/3xOS0yr4ywn4FI=";
|
||||
url = "https://raw.githubusercontent.com/flathub/net.epson.epsonscan2/a489ac2f8cbd03afeda86673930cc17663c31a53/patches/0002-Fix-crash.patch";
|
||||
hash = "sha256-rNsFnHq//CJcIZl0M6RLRkIY3YhnJZbikO8SeeC2ktg=";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/flathub/net.epson.epsonscan2/master/patches/epsonscan2-oob-container.patch";
|
||||
hash = "sha256-FhXZT0bIBYwdFow2USRJl8Q7j2eqpq98Hh0lHFQlUQY=";
|
||||
url = "https://raw.githubusercontent.com/flathub/net.epson.epsonscan2/a489ac2f8cbd03afeda86673930cc17663c31a53/patches/0004-Fix-a-crash-on-an-OOB-container-access.patch";
|
||||
hash = "sha256-WmA8pmPSJ1xUdeBbE8Jzi6w9p96aIOm0erF3T4EQ6VA=";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/flathub/net.epson.epsonscan2/master/patches/epsonscan2-xdg-open.patch";
|
||||
hash = "sha256-4ih3vZjPwWiiAxKfpLIwbbsk1K2oXSuxGbT5PVwfUsc=";
|
||||
url = "https://raw.githubusercontent.com/flathub/net.epson.epsonscan2/a489ac2f8cbd03afeda86673930cc17663c31a53/patches/0003-Use-XDG-open-to-open-the-directory.patch";
|
||||
hash = "sha256-H3lle1SXkkpbBkozYEwiX0z9oTUubTpB+l91utxH03M=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
rm CMakeCache.txt
|
||||
|
||||
substituteInPlace src/Controller/Src/Scanner/Engine.cpp \
|
||||
--replace '@KILLALL@' ${killall}/bin/killall
|
||||
--replace-fail '@KILLALL@' ${killall}/bin/killall
|
||||
|
||||
substituteInPlace src/Controller/Src/Filter/GetOrientation.cpp \
|
||||
--replace '@OCR_ENGINE_GETROTATE@' $out/libexec/epsonscan2-ocr/ocr-engine-getrotate
|
||||
--replace-fail '@OCR_ENGINE_GETROTATE@' $out/libexec/epsonscan2-ocr/ocr-engine-getrotate
|
||||
'';
|
||||
|
||||
nativeBuildInputs =
|
||||
|
@ -127,8 +124,8 @@ stdenv.mkDerivation {
|
|||
+ lib.optionalString withGui ''
|
||||
# The icon file extension is .ico but it's actually a png!
|
||||
mkdir -p $out/share/icons/hicolor/{48x48,128x128}/apps
|
||||
convert $src/Resources/Icons/escan2_app.ico -resize 48x48 $out/share/icons/hicolor/48x48/apps/epsonscan2.png
|
||||
convert $src/Resources/Icons/escan2_app.ico -resize 128x128 $out/share/icons/hicolor/128x128/apps/epsonscan2.png
|
||||
magick $src/Resources/Icons/escan2_app.ico -resize 48x48 -delete 1,2,3 $out/share/icons/hicolor/48x48/apps/epsonscan2.png
|
||||
magick $src/Resources/Icons/escan2_app.ico -resize 128x128 -delete 1,2,3 $out/share/icons/hicolor/128x128/apps/epsonscan2.png
|
||||
''
|
||||
+ lib.optionalString withNonFreePlugins ''
|
||||
ar xf ${bundle}/plugins/epsonscan2-non-free-plugin_*.deb
|
||||
|
@ -170,10 +167,7 @@ stdenv.mkDerivation {
|
|||
</literal>
|
||||
'';
|
||||
homepage = "https://support.epson.net/linux/en/epsonscan2.php";
|
||||
platforms = [
|
||||
"i686-linux"
|
||||
"x86_64-linux"
|
||||
];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
sourceProvenance =
|
||||
with lib.sourceTypes;
|
||||
[ fromSource ] ++ lib.optionals withNonFreePlugins [ binaryNativeCode ];
|
|
@ -17848,7 +17848,9 @@ with pkgs;
|
|||
|
||||
cups-pk-helper = callPackage ../misc/cups/cups-pk-helper.nix { };
|
||||
|
||||
epsonscan2 = pkgs.libsForQt5.callPackage ../misc/drivers/epsonscan2 { };
|
||||
epsonscan2 = callPackage ../by-name/ep/epsonscan2/package.nix {
|
||||
inherit (qt5) wrapQtAppsHook qtbase;
|
||||
};
|
||||
|
||||
foomatic-db-ppds-withNonfreeDb = callPackage ../by-name/fo/foomatic-db-ppds/package.nix { withNonfreeDb = true; };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue