Skip to content

Commit

Permalink
epsonscan2: 6.7.63.0 -> 6.7.70.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawn8901 committed Dec 16, 2024
1 parent 8e56405 commit 3a50217
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 35 deletions.
36 changes: 18 additions & 18 deletions pkgs/misc/drivers/epsonscan2/build.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a9daee7..7c6da08 100755
index 4be62e3..b217fcd 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,7 +17,6 @@
Expand Down Expand Up @@ -44,11 +44,11 @@ index c884d83..5ddff0c 100644
add_subdirectory(ScanSDK)

diff --git a/src/Controller/Src/Filter/GetOrientation.cpp b/src/Controller/Src/Filter/GetOrientation.cpp
index 387561e..15448ad 100644
index 8147bd4..549bb01 100755
--- a/src/Controller/Src/Filter/GetOrientation.cpp
+++ b/src/Controller/Src/Filter/GetOrientation.cpp
@@ -12,14 +12,7 @@ namespace epsonscan

@@ -27,14 +27,7 @@ namespace epsonscan
{
static std::string GetExecPath()
{
-#ifdef AKBMODE
Expand All @@ -62,22 +62,22 @@ index 387561e..15448ad 100644
+ return "@OCR_ENGINE_GETROTATE@";
}
static const int kMaxBuf = 256;

void GetOrientation::DoProcess(ESImageInfo& imageInfo, ES_CMN_FUNCS::BUFFER::CESHeapBuffer& inDataBuf)
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
Expand All @@ -88,4 +88,4 @@ index eff3dd3..c2b3803 100644
QT5_USE_MODULES(es2standalone Widgets)
-install(TARGETS es2standalone DESTINATION "${EPSON_INSTALL_ROOT}/usr/bin")
+install(TARGETS es2standalone DESTINATION "${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_FULL_BINDIR}")


37 changes: 20 additions & 17 deletions pkgs/misc/drivers/epsonscan2/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,26 @@
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=";
url = "https://download3.ebz.epson.net/dsc/f/03/00/16/14/39/587bd2656bd16edb8089ecdcb968df13f2adfde9/epsonscan2-bundle-6.7.70.0.i686.deb.tar.gz";
hash = "sha256-EzXXEocS4Wl9qBnAdE6G9zvBmeoHmPkaeGWgaAqJnjs=";
};

"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}");
Expand All @@ -55,26 +55,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://aur.archlinux.org/cgit/aur.git/plain/0002-Fix-crash.patch?h=epsonscan2";
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://aur.archlinux.org/cgit/aur.git/plain/0004-Fix-a-crash-on-an-OOB-container-access.patch?h=epsonscan2";
hash = "sha256-WmA8pmPSJ1xUdeBbE8Jzi6w9p96aIOm0erF3T4EQ6VA=";
})
(fetchpatch {
url = "https://raw.githubusercontent.com/flathub/net.epson.epsonscan2/master/patches/epsonscan2-xdg-open.patch";
hash = "sha256-4ih3vZjPwWiiAxKfpLIwbbsk1K2oXSuxGbT5PVwfUsc=";
url = "https://aur.archlinux.org/cgit/aur.git/plain/0003-Use-XDG-open-to-open-the-directory.patch?h=epsonscan2";
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 =
Expand Down Expand Up @@ -127,8 +130,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
convert $src/Resources/Icons/escan2_app.ico -resize 48x48 -delete 1,2,3 $out/share/icons/hicolor/48x48/apps/epsonscan2.png
convert $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
Expand Down
37 changes: 37 additions & 0 deletions pkgs/misc/drivers/epsonscan2/gcc14.patch
Original file line number Diff line number Diff line change
@@ -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 */

0 comments on commit 3a50217

Please sign in to comment.