tch-src_Standalone_foldercomb.cpp | 6 +- ...-src_Standalone_imageformatsettingscombobox.cpp | 6 +- ...tch-src_Standalone_initdeviceselectcombobox.cpp | 4 +- .../patch-src_Standalone_lengthdoublespinbox.cpp | 4 +- .../files/patch-src_Standalone_mainwindow.cpp | 10 +- .../files/patch-src_Standalone_mainwindow.ui | 10 +- ...ch-src_Standalone_networkdeviceselectdialog.cpp | 4 +- .../files/patch-src_Standalone_rotateimage.cpp | 10 +- .../files/patch-src_Standalone_supervisor.cpp | 34 ++-- .../patch-src_Standalone_widthdoublespinbox.cpp | 4 +- graphics/epsonscan2/pkg-plist | 223 +++++++++++++++++++++ 56 files changed, 576 insertions(+), 269 deletions(-) diff --git a/graphics/epsonscan2/Makefile b/graphics/epsonscan2/Makefile index 24c96cbfcf9f..d983da84389d 100644 --- a/graphics/epsonscan2/Makefile +++ b/graphics/epsonscan2/Makefile @@ -1,8 +1,7 @@ PORTNAME= epsonscan2 -DISTVERSION= 6.6.40.0 -PORTREVISION= 11 +DISTVERSION= 6.7.70.0 CATEGORIES= graphics -MASTER_SITES= https://support.epson.net/linux/src/scanner/epsonscan2/ +MASTER_SITES= https://download3.ebz.epson.net/dsc/f/03/00/16/14/37/7577ee65efdad48ee2d2f38d9eda75418e490552/ DISTNAME= ${PORTNAME}-${PORTVERSION}-1.src MAINTAINER= fbsd@opal.com @@ -14,24 +13,10 @@ LICENSE_FILE= ${WRKSRC}/COPYING BUILD_DEPENDS= sane-config:graphics/sane-backends LIB_DEPENDS= libboost_serialization.so:devel/boost-libs \ - libdouble-conversion.so:devel/double-conversion \ - libfreetype.so:print/freetype2 \ - libglib-2.0.so:devel/glib20 \ - libGL.so:graphics/libglvnd \ - libgraphite2.so:graphics/graphite2 \ - libicuuc.so:devel/icu \ - libiconv.so:converters/libiconv \ - libintl.so:devel/gettext-runtime \ - libharfbuzz.so:print/harfbuzz \ - libpcre.so:devel/pcre \ - libpcre2-16.so:devel/pcre2 \ libpng.so:graphics/png \ - libtiff.so:graphics/tiff \ - libzstd.so:archivers/zstd -RUN_DEPENDS= avahi-browse:net/avahi-app + libtiff.so:graphics/tiff -USES= cmake gettext-runtime gnome jpeg localbase qt:5 xorg -USE_GNOME= glib20 +USES= cmake jpeg localbase qt:5 xorg USE_LDCONFIG= ${PREFIX}/lib/epsonscan2 USE_QT= buildtools:build core gui qmake:build widgets USE_XORG= x11 xau xcb xdmcp @@ -47,6 +32,14 @@ SUB_FILES= pkg-message \ WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-1 +OPTIONS_DEFINE= AVAHI +OPTIONS_DEFAULT= AVAHI +AVAHI_DESC= Use avahi to find scanners +AVAHI_RUN_DEPENDS= avahi-browse:net/avahi-app + +pre-configure: + ${RM} ${WRKSRC}/CMakeCache.txt + post-install: ${RM} -rf ${STAGEDIR}${DOCSDIR} ${MV} ${STAGEDIR}${DOCSDIR}-${EPSON_VERSION}-1 ${STAGEDIR}${DOCSDIR} diff --git a/graphics/epsonscan2/distinfo b/graphics/epsonscan2/distinfo index 29a2e52cc255..f7f6783bf47e 100644 --- a/graphics/epsonscan2/distinfo +++ b/graphics/epsonscan2/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1642131410 -SHA256 (epsonscan2-6.6.40.0-1.src.tar.gz) = 07aa21eab09e945cadddcbef102caa1e42390ab52cc49a2c00e911e3a3340923 -SIZE (epsonscan2-6.6.40.0-1.src.tar.gz) = 2289979 +TIMESTAMP = 1739148296 +SHA256 (epsonscan2-6.7.70.0-1.src.tar.gz) = e141e66e4cd74c06eef0baa163f4cc498c3be4a5db82851c914a1b7f2c50967e +SIZE (epsonscan2-6.7.70.0-1.src.tar.gz) = 56828993 diff --git a/graphics/epsonscan2/files/patch-CMakeLists.txt b/graphics/epsonscan2/files/patch-CMakeLists.txt index 90c8cdb4fce5..56ab81b4c6ee 100644 --- a/graphics/epsonscan2/files/patch-CMakeLists.txt +++ b/graphics/epsonscan2/files/patch-CMakeLists.txt @@ -1,14 +1,14 @@ ---- CMakeLists.txt.orig 2021-11-25 00:57:03 UTC +--- CMakeLists.txt.orig 2024-09-12 07:10:44 UTC +++ CMakeLists.txt -@@ -18,7 +18,6 @@ - # along with this package. If not, see . +@@ -17,7 +17,6 @@ project (epsonscan2) + # CMakeLists.txt -- template and derived ESC/I ESC/I-2 protocol commands project (epsonscan2) -set (CMAKE_INSTALL_PREFIX "/usr") cmake_minimum_required (VERSION 2.8.12.2) include(GNUInstallDirs) -@@ -55,6 +54,14 @@ message(" Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}") +@@ -54,6 +53,14 @@ message(" Boost_LIBRARY_DIRS: ${Boost_LIBRARY_DIRS}") message(" Boost_LIBRARIES: ${Boost_LIBRARIES}") message(" Boost_LIBRARY_DIRS: ${Boost_LIBRARY_DIRS}") @@ -23,7 +23,7 @@ ############################## #### Dependents package ###### -@@ -87,7 +94,11 @@ set(COMMON_ETC_PATH ${CMAKE_INSTALL_FULL_SYSCONFDIR}) +@@ -86,7 +93,11 @@ set(EPSON_SETTINGS_PATH $ENV{HOME}/.epsonscan2/) set(EPSON_WORK_PATH /tmp/epsonWork/) set(EPSON_SETTINGS_PATH $ENV{HOME}/.epsonscan2/) @@ -35,7 +35,7 @@ set(EPSON_INSTALL_PATH ${CMAKE_INSTALL_FULL_LIBDIR}/epsonscan2/) set(COMMON_SHARE_PATH ${CMAKE_INSTALL_FULL_DATAROOTDIR}) -@@ -114,11 +125,19 @@ add_subdirectory(src) +@@ -113,11 +124,19 @@ install(DIRECTORY Resources DESTINATION ${EPSON_INSTAL install(DIRECTORY Resources DESTINATION ${EPSON_INSTALL_ROOT}${EPSON_INSTALL_PATH}) diff --git a/graphics/epsonscan2/files/patch-src_CommonUtility_DbgLog.cpp b/graphics/epsonscan2/files/patch-src_CommonUtility_DbgLog.cpp index b4e8e0bfd21d..334fedb7e724 100644 --- a/graphics/epsonscan2/files/patch-src_CommonUtility_DbgLog.cpp +++ b/graphics/epsonscan2/files/patch-src_CommonUtility_DbgLog.cpp @@ -1,6 +1,6 @@ ---- src/CommonUtility/DbgLog.cpp.orig 2021-11-25 00:56:55 UTC +--- src/CommonUtility/DbgLog.cpp.orig 2024-09-12 07:10:38 UTC +++ src/CommonUtility/DbgLog.cpp -@@ -34,6 +34,9 @@ +@@ -31,6 +31,9 @@ #ifdef __ANDROID__ #include #endif @@ -10,12 +10,12 @@ #if TARGET_OS_IPHONE #include #endif -@@ -87,6 +90,8 @@ GetCurrentThreadId(void) +@@ -84,6 +87,8 @@ GetCurrentThreadId(void) { #if TARGET_OS_IPHONE return (DWORD)pthread_mach_thread_np(pthread_self()); +#elif __FreeBSD__ -+ return pthread_getthreadid_np(); ++ return pthread_getthreadid_np(); #else return syscall(SYS_gettid); #endif diff --git a/graphics/epsonscan2/files/patch-src_CommonUtility_utils_ESAnyCastUtils.h b/graphics/epsonscan2/files/patch-src_CommonUtility_utils_ESAnyCastUtils.h index 805a5c42bbb2..fd82cb8d91b5 100644 --- a/graphics/epsonscan2/files/patch-src_CommonUtility_utils_ESAnyCastUtils.h +++ b/graphics/epsonscan2/files/patch-src_CommonUtility_utils_ESAnyCastUtils.h @@ -1,6 +1,6 @@ ---- src/CommonUtility/utils/ESAnyCastUtils.h.orig 2021-11-25 00:56:55 UTC +--- src/CommonUtility/utils/ESAnyCastUtils.h.orig 2024-09-12 07:10:38 UTC +++ src/CommonUtility/utils/ESAnyCastUtils.h -@@ -141,7 +141,11 @@ const T* SafeAnyDataCPtr( const ESAny& anyIn ) +@@ -138,7 +138,11 @@ T* SafeAnyDataPtr_WithLog( ESAny& anyIn, ES_CHAR_CPTR template< typename T > T* SafeAnyDataPtr_WithLog( ESAny& anyIn, ES_CHAR_CPTR lpszFile = __ES_FILE__, const int nLine = __LINE__ ) { @@ -13,7 +13,7 @@ if(anyIn.empty()){ ES_Warning_Log3( __ES_FUNCTION__, lpszFile, nLine, ES_STRING("Boost Any Cast Warning Empty!!")); } else { -@@ -167,7 +171,11 @@ T* SafeAnyDataPtr_WithLog( ESAny& anyIn, ES_CHAR_CPTR +@@ -164,7 +168,11 @@ const T* SafeAnyDataCPtr_WithLog( const ESAny& anyIn, template< typename T > const T* SafeAnyDataCPtr_WithLog( const ESAny& anyIn, ES_CHAR_CPTR lpszFile = __ES_FILE__, const int nLine = __LINE__ ) { diff --git a/graphics/epsonscan2/files/patch-src_CommonUtility_utils_ESFile.cpp b/graphics/epsonscan2/files/patch-src_CommonUtility_utils_ESFile.cpp index 316223a0ea16..c0e2421698a4 100644 --- a/graphics/epsonscan2/files/patch-src_CommonUtility_utils_ESFile.cpp +++ b/graphics/epsonscan2/files/patch-src_CommonUtility_utils_ESFile.cpp @@ -1,6 +1,6 @@ ---- src/CommonUtility/utils/ESFile.cpp.orig 2021-11-25 00:56:55 UTC +--- src/CommonUtility/utils/ESFile.cpp.orig 2024-09-12 07:10:38 UTC +++ src/CommonUtility/utils/ESFile.cpp -@@ -48,6 +48,9 @@ CESFile* CESFile::CreateFileInstanceWithPath(ESString +@@ -45,6 +45,9 @@ CESFile* CESFile::CreateTempFileInstanceWithPrefix( ES } } CESFile* CESFile::CreateTempFileInstanceWithPrefix( ESString strFolder, ESString strPrefix, ES_OPEN_MODE eOpenMode ){ diff --git a/graphics/epsonscan2/files/patch-src_CommonUtility_utils_PathUtils.cpp b/graphics/epsonscan2/files/patch-src_CommonUtility_utils_PathUtils.cpp index 5ed82c1f98b9..7f5d7dcc2dfe 100644 --- a/graphics/epsonscan2/files/patch-src_CommonUtility_utils_PathUtils.cpp +++ b/graphics/epsonscan2/files/patch-src_CommonUtility_utils_PathUtils.cpp @@ -1,6 +1,25 @@ ---- src/CommonUtility/utils/PathUtils.cpp.orig 2021-11-25 00:56:55 UTC +--- src/CommonUtility/utils/PathUtils.cpp.orig 2024-09-12 07:10:38 UTC +++ src/CommonUtility/utils/PathUtils.cpp -@@ -609,7 +609,6 @@ namespace ES_CMN_FUNCS +@@ -49,7 +49,8 @@ BOOL GetTempFileName(ESString DirName, ESString Prefix + BOOL GetTempFileName(ESString DirName, ESString Prefix, LPTSTR TempFile) + { + size_t path_len = DirName.length() + Prefix.length() + strlen("XXXXXX"); +- char *buf = (char *)malloc(path_len + 1); ++ // +2 for path separator added in ES_AddBackYen ++ char *buf = (char *)malloc(path_len + 2); + buf[path_len] = 0; + ES_CMN_FUNCS::PATH::ES_AddBackYen(DirName); + strcpy(buf, DirName.c_str()); +@@ -61,7 +62,7 @@ BOOL GetTempFileName(ESString DirName, ESString Prefix + return FALSE; + } + FILE* fp = fdopen(fd, "w"); +- memcpy(TempFile, buf, path_len+1); ++ memcpy(TempFile, buf, path_len+2); + fclose(fp); + free(buf); + return TRUE; +@@ -606,7 +607,6 @@ namespace ES_CMN_FUNCS else { bResult = TRUE; diff --git a/graphics/epsonscan2/files/patch-src_Controller_CMakeLists.txt b/graphics/epsonscan2/files/patch-src_Controller_CMakeLists.txt index 3f32ef5a613b..c796f5d5e903 100644 --- a/graphics/epsonscan2/files/patch-src_Controller_CMakeLists.txt +++ b/graphics/epsonscan2/files/patch-src_Controller_CMakeLists.txt @@ -1,6 +1,28 @@ ---- src/Controller/CMakeLists.txt.orig 2021-11-25 00:56:54 UTC +--- src/Controller/CMakeLists.txt.orig 2024-09-12 07:10:30 UTC +++ src/Controller/CMakeLists.txt -@@ -171,7 +171,7 @@ target_link_libraries( epsonscan2 +@@ -171,21 +171,6 @@ ADD_LIBRARY(epsonscan2 SHARED + ../../thirdparty/HaruPDF/hpdf_exdata.c + ../../thirdparty/HaruPDF/hpdf_encoder_utf.c + +-../../thirdparty/zlib/adler32.c +-../../thirdparty/zlib/crc32.c +-../../thirdparty/zlib/gzclose.c +-../../thirdparty/zlib/gzread.c +-../../thirdparty/zlib/infback.c +-../../thirdparty/zlib/inflate.c +-../../thirdparty/zlib/trees.c +-../../thirdparty/zlib/zutil.c +-../../thirdparty/zlib/compress.c +-../../thirdparty/zlib/deflate.c +-../../thirdparty/zlib/gzlib.c +-../../thirdparty/zlib/gzwrite.c +-../../thirdparty/zlib/inffast.c +-../../thirdparty/zlib/inftrees.c +-../../thirdparty/zlib/uncompr.c + ../../thirdparty/sha1/sha1.c + ) + +@@ -194,7 +179,7 @@ target_link_libraries( epsonscan2 dl commonutility ${Boost_LIBRARIES} diff --git a/graphics/epsonscan2/files/patch-src_Controller_Src_EntryPoints.cpp b/graphics/epsonscan2/files/patch-src_Controller_Src_EntryPoints.cpp index 921c107f4320..6cef63a7181a 100644 --- a/graphics/epsonscan2/files/patch-src_Controller_Src_EntryPoints.cpp +++ b/graphics/epsonscan2/files/patch-src_Controller_Src_EntryPoints.cpp @@ -1,6 +1,6 @@ ---- src/Controller/Src/EntryPoints.cpp.orig 2021-11-25 00:56:59 UTC +--- src/Controller/Src/EntryPoints.cpp.orig 2024-09-12 07:10:36 UTC +++ src/Controller/Src/EntryPoints.cpp -@@ -346,6 +346,8 @@ SDIError SDIScannerDriver_GetNextTransferEvent(SDIScan +@@ -343,6 +343,8 @@ SDIError SDIScannerDriver_GetNextTransferEvent(SDIScan } } break; diff --git a/graphics/epsonscan2/files/patch-src_Controller_Src_FileFormat_FFManager.cpp b/graphics/epsonscan2/files/patch-src_Controller_Src_FileFormat_FFManager.cpp index e6403f5cc97d..cb3e8bb2d2cb 100644 --- a/graphics/epsonscan2/files/patch-src_Controller_Src_FileFormat_FFManager.cpp +++ b/graphics/epsonscan2/files/patch-src_Controller_Src_FileFormat_FFManager.cpp @@ -1,12 +1,12 @@ ---- src/Controller/Src/FileFormat/FFManager.cpp.orig 2021-11-25 00:56:58 UTC +--- src/Controller/Src/FileFormat/FFManager.cpp.orig 2024-09-12 07:10:36 UTC +++ src/Controller/Src/FileFormat/FFManager.cpp -@@ -176,6 +176,9 @@ namespace epsonscan +@@ -180,6 +180,9 @@ namespace epsonscan return kFKWriterTypePnm; case kSDIImageFormatBMP: return kFKWriterTypeBmp; -+ case kSDIImageFormatRaw: ++ case kSDIImageFormatRaw: + case kSDIImageFormatColorJpegMonoPNM: + break; + case kSDIImageFormatOFD: + return kFKWriterTypeOFD; } - return kFKWriterTypeBmp; - } diff --git a/graphics/epsonscan2/files/patch-src_Controller_Src_Filter_DTR.cpp b/graphics/epsonscan2/files/patch-src_Controller_Src_Filter_DTR.cpp index 68f1592dd27f..0a9d78c6dfc0 100644 --- a/graphics/epsonscan2/files/patch-src_Controller_Src_Filter_DTR.cpp +++ b/graphics/epsonscan2/files/patch-src_Controller_Src_Filter_DTR.cpp @@ -1,6 +1,6 @@ ---- src/Controller/Src/Filter/DTR.cpp.orig 2021-11-25 00:56:57 UTC +--- src/Controller/Src/Filter/DTR.cpp.orig 2024-09-12 07:10:36 UTC +++ src/Controller/Src/Filter/DTR.cpp -@@ -26,6 +26,9 @@ +@@ -23,6 +23,9 @@ #include #include #include @@ -10,7 +10,7 @@ namespace epsonscan { static const int kMaxBuf = 256; -@@ -409,7 +412,7 @@ ESNumber CustomSkipLevelAsPercent(ESNumber inLevel) +@@ -584,7 +587,7 @@ ESNumber CustomSkipLevelAsPercent(ESNumber inLevel) dtrExecCommand << " "; dtrExecCommand << "0"; dtrExecCommand << " "; diff --git a/graphics/epsonscan2/files/patch-src_Controller_Src_Filter_ProcOrientation.hpp b/graphics/epsonscan2/files/patch-src_Controller_Src_Filter_ProcOrientation.hpp index fff9dd20bb0b..72a07ccaf663 100644 --- a/graphics/epsonscan2/files/patch-src_Controller_Src_Filter_ProcOrientation.hpp +++ b/graphics/epsonscan2/files/patch-src_Controller_Src_Filter_ProcOrientation.hpp @@ -1,6 +1,6 @@ ---- src/Controller/Src/Filter/ProcOrientation.hpp.orig 2021-11-25 00:56:58 UTC +--- src/Controller/Src/Filter/ProcOrientation.hpp.orig 2024-09-12 07:10:36 UTC +++ src/Controller/Src/Filter/ProcOrientation.hpp -@@ -89,6 +89,7 @@ class ProcOrientation : public Filter (private) +@@ -86,6 +86,7 @@ class ProcOrientation : public Filter (private) } break; case kSDIOrientationNone: diff --git a/graphics/epsonscan2/files/patch-src_Controller_Src_Filter_Saving.hpp b/graphics/epsonscan2/files/patch-src_Controller_Src_Filter_Saving.hpp index 03610918c7f1..b4bbf9393af6 100644 --- a/graphics/epsonscan2/files/patch-src_Controller_Src_Filter_Saving.hpp +++ b/graphics/epsonscan2/files/patch-src_Controller_Src_Filter_Saving.hpp @@ -1,20 +1,11 @@ ---- src/Controller/Src/Filter/Saving.hpp.orig 2022-03-20 15:38:28 UTC +--- src/Controller/Src/Filter/Saving.hpp.orig 2024-09-12 07:10:36 UTC +++ src/Controller/Src/Filter/Saving.hpp -@@ -76,8 +76,7 @@ namespace epsonscan - imgFormat = kSDIImageFormatPNM; - } - file = CESFile::CreateTempFileInstanceWithPrefix(ES_CMN_FUNCS::PATH::ES_GetWorkTempPath(), prefixStream.str()); -- file->CloseFile(); -- if(ffMgr.Write(inDataBuf, -+ if(!file || ffMgr.Write(inDataBuf, - file->GetFileName(), - imgFormat, - imageInfo, -@@ -91,6 +90,7 @@ namespace epsonscan - } - } - filePath_ = file->GetFileName(); -+ file->CloseFile(); - delete file; - file = nullptr; - } +@@ -107,7 +107,7 @@ namespace epsonscan + if (imgFormat == kSDIImageFormatRaw) + { + file = CESFile::CreateTempFileInstanceWithPrefix(ES_CMN_FUNCS::PATH::ES_GetWorkTempPath(), prefixStream.str(), CESFile::ES_OPEN_MODE_WRITE_PLUS); +- if(file->WriteData(inDataBuf) == false) ++ if(!file || file->WriteData(inDataBuf) == false) + { + delete file; + file = nullptr; diff --git a/graphics/epsonscan2/files/patch-src_Controller_Src_Finder_Finder.cpp b/graphics/epsonscan2/files/patch-src_Controller_Src_Finder_Finder.cpp new file mode 100644 index 000000000000..08b9f81e839a --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Controller_Src_Finder_Finder.cpp @@ -0,0 +1,12 @@ +--- src/Controller/Src/Finder/Finder.cpp.orig 2024-09-12 07:10:37 UTC ++++ src/Controller/Src/Finder/Finder.cpp +@@ -52,6 +52,9 @@ namespace epsonscan { + } + SDIDeviceInfo* Finder::GetDevicesPointer() + { ++ if (devices_.size() == 0) { ++ return nullptr; ++ } + return &devices_[0]; + } + int32_t Finder::GetDevicesCount() const diff --git a/graphics/epsonscan2/files/patch-src_Controller_Src_Finder_UsbFinder.cpp b/graphics/epsonscan2/files/patch-src_Controller_Src_Finder_UsbFinder.cpp index 5fd43e5515ca..84e1bba397d0 100644 --- a/graphics/epsonscan2/files/patch-src_Controller_Src_Finder_UsbFinder.cpp +++ b/graphics/epsonscan2/files/patch-src_Controller_Src_Finder_UsbFinder.cpp @@ -1,6 +1,6 @@ ---- src/Controller/Src/Finder/UsbFinder.cpp.orig 2021-11-25 00:56:57 UTC +--- src/Controller/Src/Finder/UsbFinder.cpp.orig 2024-09-12 07:10:37 UTC +++ src/Controller/Src/Finder/UsbFinder.cpp -@@ -25,7 +25,11 @@ +@@ -22,7 +22,11 @@ extern "C" { #include "ModelInfo.hpp" #include "Utility.hpp" extern "C" { diff --git a/graphics/epsonscan2/files/patch-src_Controller_Src_KeysValues_All_Resolution.cpp b/graphics/epsonscan2/files/patch-src_Controller_Src_KeysValues_All_Resolution.cpp index b524fde21606..9f58d8dcbd98 100644 --- a/graphics/epsonscan2/files/patch-src_Controller_Src_KeysValues_All_Resolution.cpp +++ b/graphics/epsonscan2/files/patch-src_Controller_Src_KeysValues_All_Resolution.cpp @@ -1,6 +1,6 @@ ---- src/Controller/Src/KeysValues/All/Resolution.cpp.orig 2021-11-25 00:56:58 UTC +--- src/Controller/Src/KeysValues/All/Resolution.cpp.orig 2024-09-12 07:10:35 UTC +++ src/Controller/Src/KeysValues/All/Resolution.cpp -@@ -142,7 +142,7 @@ ESDictionary Resolution::GetSeolutionTable(bool isXRes +@@ -145,7 +145,7 @@ ESDictionary Resolution::GetSeolutionTable(bool isXRes ES_CMN_FUNCS::JSON::JSONFiletoDictionary(resTablePath, resTable); }else { diff --git a/graphics/epsonscan2/files/patch-src_Controller_Src_KeysValues_All_ScanHeightMax.cpp b/graphics/epsonscan2/files/patch-src_Controller_Src_KeysValues_All_ScanHeightMax.cpp index c80cfd057a42..4a177c588a62 100644 --- a/graphics/epsonscan2/files/patch-src_Controller_Src_KeysValues_All_ScanHeightMax.cpp +++ b/graphics/epsonscan2/files/patch-src_Controller_Src_KeysValues_All_ScanHeightMax.cpp @@ -1,6 +1,6 @@ ---- src/Controller/Src/KeysValues/All/ScanHeightMax.cpp.orig 2021-11-25 00:56:58 UTC +--- src/Controller/Src/KeysValues/All/ScanHeightMax.cpp.orig 2024-09-12 07:10:35 UTC +++ src/Controller/Src/KeysValues/All/ScanHeightMax.cpp -@@ -59,6 +59,8 @@ void ScanHeightMax::GetValue(SDIInt& intVal) +@@ -56,6 +56,8 @@ void ScanHeightMax::GetValue(SDIInt& intVal) case kSDIFunctionalUnitDocumentFeeder: intVal = ADFValue(); return; diff --git a/graphics/epsonscan2/files/patch-src_Controller_Src_KeysValues_All_ScanWidthMax.cpp b/graphics/epsonscan2/files/patch-src_Controller_Src_KeysValues_All_ScanWidthMax.cpp index e04ba20df560..a4114aa3a6ac 100644 --- a/graphics/epsonscan2/files/patch-src_Controller_Src_KeysValues_All_ScanWidthMax.cpp +++ b/graphics/epsonscan2/files/patch-src_Controller_Src_KeysValues_All_ScanWidthMax.cpp @@ -1,6 +1,6 @@ ---- src/Controller/Src/KeysValues/All/ScanWidthMax.cpp.orig 2021-11-25 00:56:58 UTC +--- src/Controller/Src/KeysValues/All/ScanWidthMax.cpp.orig 2024-09-12 07:10:35 UTC +++ src/Controller/Src/KeysValues/All/ScanWidthMax.cpp -@@ -58,6 +58,8 @@ void ScanWidthMax::GetValue(SDIInt& intVal) +@@ -55,6 +55,8 @@ void ScanWidthMax::GetValue(SDIInt& intVal) case kSDIFunctionalUnitDocumentFeeder: intVal = ADFValue(); return; diff --git a/graphics/epsonscan2/files/patch-src_Controller_Src_Scanner_Engine.hpp b/graphics/epsonscan2/files/patch-src_Controller_Src_Scanner_Engine.hpp index 38ece0009a89..3cc9f468846a 100644 --- a/graphics/epsonscan2/files/patch-src_Controller_Src_Scanner_Engine.hpp +++ b/graphics/epsonscan2/files/patch-src_Controller_Src_Scanner_Engine.hpp @@ -1,6 +1,6 @@ ---- src/Controller/Src/Scanner/Engine.hpp.orig 2021-11-25 00:56:59 UTC +--- src/Controller/Src/Scanner/Engine.hpp.orig 2024-09-12 07:10:36 UTC +++ src/Controller/Src/Scanner/Engine.hpp -@@ -357,14 +357,14 @@ namespace epsonscan { +@@ -363,14 +363,14 @@ namespace epsonscan { void CALLBACK ScannerDidWarmUp( IESScanner* pScanner ) override; void CALLBACK NetworkScannerDidRequestStartScanning( IESScanner* pScanner ) override; void CALLBACK NetworkScannerDidRequestStopScanning( IESScanner* pScanner ) override; @@ -19,8 +19,8 @@ + void CALLBACK NetworkScannerDidTimeout( IESScanner* pScanner ) override; + void CALLBACK ScannerIsReservedByHost( IESScanner* pScanner, const ES_CHAR* pszAddress ) override; + void CALLBACK ScannerDidPressButton( UInt8 un8ButtonNumber ) override; -+ void CALLBACK ScannerDidRequestStop(IESScanner *pScanner) override; -+ void CALLBACK ScannerDidRequestPushScanConnection(IESScanner *pScanner) override; ++ void CALLBACK ScannerDidRequestStop(IESScanner *pScanner)override; ++ void CALLBACK ScannerDidRequestPushScanConnection(IESScanner *pScanner)override; + void CALLBACK ScannerDidNotifyStatusChange(IESScanner *pScanner) override; }; } diff --git a/graphics/epsonscan2/files/patch-src_Controller_Src_Scanner_Scanner.cpp b/graphics/epsonscan2/files/patch-src_Controller_Src_Scanner_Scanner.cpp index 4d5aefd35aff..57e841ff0658 100644 --- a/graphics/epsonscan2/files/patch-src_Controller_Src_Scanner_Scanner.cpp +++ b/graphics/epsonscan2/files/patch-src_Controller_Src_Scanner_Scanner.cpp @@ -1,6 +1,6 @@ ---- src/Controller/Src/Scanner/Scanner.cpp.orig 2021-11-25 00:56:59 UTC +--- src/Controller/Src/Scanner/Scanner.cpp.orig 2024-09-12 07:10:36 UTC +++ src/Controller/Src/Scanner/Scanner.cpp -@@ -188,7 +188,7 @@ void Scanner::EngineCallBackReceiver(EngineEventType e +@@ -183,7 +183,7 @@ void Scanner::EngineCallBackReceiver(EngineEventType e error == kSDIErrorDataSend || error == kSDIErrorInvalidResponse || error == kSDIErrorDeviceFatalError || @@ -9,7 +9,7 @@ { SDI_TRACE_LOG("communication error occurs"); isOpened_ = false; -@@ -202,13 +202,13 @@ SDIError Scanner::Open() +@@ -197,13 +197,13 @@ SDIError Scanner::Open() SDIError err; if (engine_) { err = engine_->Open(); diff --git a/graphics/epsonscan2/files/patch-src_ES2Command_Linux_CMakeLists.txt b/graphics/epsonscan2/files/patch-src_ES2Command_Linux_CMakeLists.txt index f30d1dd28c88..1688c380ebe7 100644 --- a/graphics/epsonscan2/files/patch-src_ES2Command_Linux_CMakeLists.txt +++ b/graphics/epsonscan2/files/patch-src_ES2Command_Linux_CMakeLists.txt @@ -1,6 +1,6 @@ ---- src/ES2Command/Linux/CMakeLists.txt.orig 2021-11-25 00:56:54 UTC +--- src/ES2Command/Linux/CMakeLists.txt.orig 2024-09-12 07:10:30 UTC +++ src/ES2Command/Linux/CMakeLists.txt -@@ -60,7 +60,7 @@ target_link_libraries( es2command +@@ -78,7 +78,7 @@ target_link_libraries( es2command dl commonutility ${Boost_LIBRARIES} diff --git a/graphics/epsonscan2/files/patch-src_ES2Command_Src_Command_ESCI2_ESCI2Accessor.h b/graphics/epsonscan2/files/patch-src_ES2Command_Src_Command_ESCI2_ESCI2Accessor.h index 5ecc95e2bb57..ade8f4c60452 100644 --- a/graphics/epsonscan2/files/patch-src_ES2Command_Src_Command_ESCI2_ESCI2Accessor.h +++ b/graphics/epsonscan2/files/patch-src_ES2Command_Src_Command_ESCI2_ESCI2Accessor.h @@ -1,6 +1,6 @@ ---- src/ES2Command/Src/Command/ESCI2/ESCI2Accessor.h.orig 2021-11-25 00:56:55 UTC +--- src/ES2Command/Src/Command/ESCI2/ESCI2Accessor.h.orig 2024-09-12 07:10:31 UTC +++ src/ES2Command/Src/Command/ESCI2/ESCI2Accessor.h -@@ -37,7 +37,7 @@ class CESCI2Accessor : public CESCI2Command (protected +@@ -34,7 +34,7 @@ class CESCI2Accessor : public CESCI2Command (protected ESErrorCode SetPanelToPushScanReady( BOOL bPushScanReady ); ESErrorCode UnlockAdministratorLock(); ESErrorCode LockAdministratorLock(); @@ -9,7 +9,7 @@ BOOL IsScannableDeviceConfig(); ESErrorCode CaptureScanner(); ESErrorCode ReleaseScanner(); -@@ -208,7 +208,7 @@ class CESCI2Accessor : public CESCI2Command (protected +@@ -211,7 +211,7 @@ class CESCI2Accessor : public CESCI2Command (protected ESErrorCode _SetColorMatrix( ES_COLOR_MATRIX& matrix ); ESErrorCode SetColorMatrix( ESFloatArray arColorMatrix ); bool IsSkewCorrectionSupported(); @@ -18,21 +18,34 @@ ESErrorCode SetSkewCorrectionEnabled( bool bSkewCorrectionEnabled ); ESAny GetSupportedThreshold(); ESNumber GetThreshold(); -@@ -226,7 +226,7 @@ class CESCI2Accessor : public CESCI2Command (protected - ESNumber GetGammaScale(); - ESErrorCode SetGammaScale( ESNumber nGammaScale ); +@@ -241,7 +241,7 @@ class CESCI2Accessor : public CESCI2Command (protected + virtual bool IsSkipImageEnabled(); + virtual ESErrorCode SetSkipImageEnabled( bool nDetectBlankPageLevel ); ESAny GetSupportedBackGroundRemoval(); - ESNumber GetBackGroundRemoval(); + virtual ESNumber GetBackGroundRemoval() override; ESErrorCode SetBackGroundRemoval( ESNumber nBackGroundRemoval ); - ESAny GetSupportedJPEGQuality(); - ESNumber GetJPEGQuality(); -@@ -235,7 +235,7 @@ class CESCI2Accessor : public CESCI2Command (protected + ESErrorCode DoAutoFocus(ESFloat* pfOutFocus); + bool IsAutoFocusSupported(); +@@ -257,10 +257,10 @@ class CESCI2Accessor : public CESCI2Command (protected ESQuietMode GetQuietMode(); ESErrorCode SetQuietMode( ESNumber nQuietMode); bool IsAutoCroppingSupported(); - bool IsAutoCroppingEnabled(); + virtual bool IsAutoCroppingEnabled() override; ESErrorCode SetAutoCroppingEnabled( bool bAutoCroppingEnabled ); + bool IsAutoCroppingInscribedSupported(); +- bool IsAutoCroppingInscribedEnabled(); ++ bool IsAutoCroppingInscribedEnabled() override; + ESErrorCode SetAutoCroppingInscribedEnabled( bool bAutoCroppingEnabled ); ESAny GetCroppableResolutions(); ESAny GetSupportedCroppingSizes(); +@@ -516,7 +516,7 @@ class CESCI2Accessor : public CESCI2Command (protected + bool IsRetardRollerNearendSupported(); + ESNumber GetRetardRollerNearend(); + ESAny GetSupportedCapability(const UInt32& key); +- ENUM_ES_HASH_TYPE GetMaintenanceHashType(); ++ ENUM_ES_HASH_TYPE GetMaintenanceHashType() override; + private : + template + void ForeachAnyArrayValue(const ESAny &anyValue, Function func) { diff --git a/graphics/epsonscan2/files/patch-src_ES2Command_Src_Command_ESCI2_ESCI2Command.h b/graphics/epsonscan2/files/patch-src_ES2Command_Src_Command_ESCI2_ESCI2Command.h new file mode 100644 index 000000000000..2d68179508cb --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_ES2Command_Src_Command_ESCI2_ESCI2Command.h @@ -0,0 +1,11 @@ +--- src/ES2Command/Src/Command/ESCI2/ESCI2Command.h.orig 2024-09-12 07:10:31 UTC ++++ src/ES2Command/Src/Command/ESCI2/ESCI2Command.h +@@ -59,7 +59,7 @@ class CESCI2Command : public CCommandBase (protected) + virtual bool IsFeedTypeADF() = 0; + virtual bool IsAdfLoadSupported() = 0 ; + virtual bool IsAutoCroppingEnabled() = 0; +- virtual bool IsAutoCroppingInscribedEnabled() = 0; ++ virtual bool IsAutoCroppingInscribedEnabled() = 0; + virtual bool IsSkewCorrectionEnabled() =0; + virtual ESNumber GetBackGroundRemoval() = 0; + private: diff --git a/graphics/epsonscan2/files/patch-src_ES2Command_Src_Interface_ipc_ipcInterfaceImpl.cpp b/graphics/epsonscan2/files/patch-src_ES2Command_Src_Interface_ipc_ipcInterfaceImpl.cpp index d930216e6727..9c675a4cdc9f 100644 --- a/graphics/epsonscan2/files/patch-src_ES2Command_Src_Interface_ipc_ipcInterfaceImpl.cpp +++ b/graphics/epsonscan2/files/patch-src_ES2Command_Src_Interface_ipc_ipcInterfaceImpl.cpp @@ -1,6 +1,17 @@ ---- src/ES2Command/Src/Interface/ipc/ipcInterfaceImpl.cpp.orig 2021-11-25 00:56:54 UTC +--- src/ES2Command/Src/Interface/ipc/ipcInterfaceImpl.cpp.orig 2024-09-12 07:10:32 UTC +++ src/ES2Command/Src/Interface/ipc/ipcInterfaceImpl.cpp -@@ -307,7 +307,7 @@ bool IPCInterfaceImpl::recv_reply(uint32_t* token) +@@ -129,7 +129,9 @@ ESErrorCode IPCInterfaceImpl::Open() + if(!ES_IsExistFile(dat_file)){ + FILE *fp; + fp = fopen(dat_file.c_str(),"w"); +- fclose(fp); ++ if (fp) { ++ fclose(fp); ++ } + } + interrupt_.reset(new ipc_interrupt(delegate_, dat_file, IPC_SHARED_ID, IPC_SEMAHORE_KEY)); + interrupt_->start(); +@@ -305,7 +307,7 @@ bool IPCInterfaceImpl::recv_reply(uint32_t* token) if (placeholder) delete [] placeholder; if (token) *token = hdr_token(hdr); if (hdr_error(hdr) || n < 0) { diff --git a/graphics/epsonscan2/files/patch-src_ES2Command_Src_Interface_usb_usbInterfaceImpl.cpp b/graphics/epsonscan2/files/patch-src_ES2Command_Src_Interface_usb_usbInterfaceImpl.cpp index b7225c97f1b8..acaeeb6465e7 100644 --- a/graphics/epsonscan2/files/patch-src_ES2Command_Src_Interface_usb_usbInterfaceImpl.cpp +++ b/graphics/epsonscan2/files/patch-src_ES2Command_Src_Interface_usb_usbInterfaceImpl.cpp @@ -1,12 +1,12 @@ ---- src/ES2Command/Src/Interface/usb/usbInterfaceImpl.cpp.orig 2021-11-25 00:56:54 UTC +--- src/ES2Command/Src/Interface/usb/usbInterfaceImpl.cpp.orig 2024-09-12 07:10:32 UTC +++ src/ES2Command/Src/Interface/usb/usbInterfaceImpl.cpp -@@ -46,7 +46,8 @@ USBInterfaceImpl::USBInterfaceImpl() +@@ -34,7 +34,8 @@ USBInterfaceImpl::USBInterfaceImpl() sm_ctx = nullptr; throw std::runtime_error("unable to initialise USB support"); } - libusb_set_debug(sm_ctx, 3); -+ // XXX this cannot be left enabled as the debug messages go to stdout which is where the scan image data goes -+ //libusb_set_debug(sm_ctx, 3); ++ // XXX this cannot be left enabled as the debug messages go to stdout which is where the scan image data goes ++ // libusb_set_debug(sm_ctx, 3); } ++sm_nConnectionCount; } diff --git a/graphics/epsonscan2/files/patch-src_ES2Command_Src_Interface_usb_usbInterfaceImpl.h b/graphics/epsonscan2/files/patch-src_ES2Command_Src_Interface_usb_usbInterfaceImpl.h index 247cabd4050e..4956c421b9d4 100644 --- a/graphics/epsonscan2/files/patch-src_ES2Command_Src_Interface_usb_usbInterfaceImpl.h +++ b/graphics/epsonscan2/files/patch-src_ES2Command_Src_Interface_usb_usbInterfaceImpl.h @@ -1,10 +1,9 @@ ---- src/ES2Command/Src/Interface/usb/usbInterfaceImpl.h.orig 2021-11-25 00:56:54 UTC +--- src/ES2Command/Src/Interface/usb/usbInterfaceImpl.h.orig 2024-09-12 07:10:32 UTC +++ src/ES2Command/Src/Interface/usb/usbInterfaceImpl.h -@@ -20,8 +20,11 @@ - // usbInterfaceImpl.h -- template and derived ESC/I ESC/I-2 protocol commands +@@ -18,7 +18,11 @@ #pragma once -- + +#if __FreeBSD__ +#include +#else @@ -12,4 +11,4 @@ +#endif #include "../interfaceImpl.h" #include "../interface.h" - class USBInterfaceImpl : public IInterfaceImpl + #include "CommonUtility/ESCommonTypedef.h" diff --git a/graphics/epsonscan2/files/patch-src_ES2Command_Src_Utils_ESAccessor.h b/graphics/epsonscan2/files/patch-src_ES2Command_Src_Utils_ESAccessor.h index cac14405aa0a..2a2cac695411 100644 --- a/graphics/epsonscan2/files/patch-src_ES2Command_Src_Utils_ESAccessor.h +++ b/graphics/epsonscan2/files/patch-src_ES2Command_Src_Utils_ESAccessor.h @@ -1,6 +1,6 @@ ---- src/ES2Command/Src/Utils/ESAccessor.h.orig 2021-11-25 00:56:55 UTC +--- src/ES2Command/Src/Utils/ESAccessor.h.orig 2024-09-12 07:10:32 UTC +++ src/ES2Command/Src/Utils/ESAccessor.h -@@ -177,7 +177,7 @@ class CESAccessor{ (protected) +@@ -174,7 +174,7 @@ class CESAccessor{ (protected) { } CSetterFunc(const CSetterFunc& rhs) diff --git a/graphics/epsonscan2/files/patch-src_ES2Command_Src_Utils_semaphore.hpp b/graphics/epsonscan2/files/patch-src_ES2Command_Src_Utils_semaphore.hpp index 680ae4f57ab8..9fa181c6ed5d 100644 --- a/graphics/epsonscan2/files/patch-src_ES2Command_Src_Utils_semaphore.hpp +++ b/graphics/epsonscan2/files/patch-src_ES2Command_Src_Utils_semaphore.hpp @@ -1,6 +1,6 @@ ---- src/ES2Command/Src/Utils/semaphore.hpp.orig 2021-11-25 00:56:55 UTC +--- src/ES2Command/Src/Utils/semaphore.hpp.orig 2024-09-12 07:10:32 UTC +++ src/ES2Command/Src/Utils/semaphore.hpp -@@ -23,6 +23,10 @@ +@@ -20,6 +20,10 @@ #include #include @@ -11,7 +11,7 @@ #if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) #else union semun { -@@ -88,9 +92,26 @@ class semaphore (public) +@@ -85,9 +89,26 @@ class semaphore (public) } int wait(int timeout_s) { @@ -38,7 +38,7 @@ operations[0].sem_flg = SEM_UNDO; struct timespec time{}; time.tv_sec = timeout_s; -@@ -98,6 +119,7 @@ class semaphore (public) +@@ -95,6 +116,7 @@ class semaphore (public) return errno; } return 0; @@ -46,7 +46,7 @@ } void lock() { -@@ -128,6 +150,14 @@ class semaphore (public) +@@ -125,6 +147,14 @@ class semaphore (public) } int wait_and_lock(int timeout_s) { @@ -61,7 +61,7 @@ sembuf operations[2]; operations[0].sem_num = 0; operations[0].sem_op = WAIT; -@@ -141,6 +171,7 @@ class semaphore (public) +@@ -138,6 +168,7 @@ class semaphore (public) return errno; } return 0; diff --git a/graphics/epsonscan2/files/patch-src_ES2FileFormat_Header_IO_FKDestination.h b/graphics/epsonscan2/files/patch-src_ES2FileFormat_Header_IO_FKDestination.h index 49ec9593d64d..e857f4093e83 100644 --- a/graphics/epsonscan2/files/patch-src_ES2FileFormat_Header_IO_FKDestination.h +++ b/graphics/epsonscan2/files/patch-src_ES2FileFormat_Header_IO_FKDestination.h @@ -1,6 +1,6 @@ ---- src/ES2FileFormat/Header/IO/FKDestination.h.orig 2021-11-25 00:56:57 UTC +--- src/ES2FileFormat/Header/IO/FKDestination.h.orig 2024-09-12 07:10:33 UTC +++ src/ES2FileFormat/Header/IO/FKDestination.h -@@ -33,12 +33,12 @@ class CFKDestination : public IFKDestination (private) +@@ -30,12 +30,12 @@ class CFKDestination : public IFKDestination (public) public: CFKDestination(); ~CFKDestination(); @@ -12,11 +12,11 @@ - ES_CMN_FUNCS::BUFFER::IESBuffer& GetSource(); - void SetDelegate(IFKDestinationDelegate* piDelegate){ + ES_CMN_FUNCS::BUFFER::IESBuffer& GetSource() override; -+ void SetDelegate(IFKDestinationDelegate* piDelegate) override { ++ void SetDelegate(IFKDestinationDelegate* piDelegate) override{ m_pcDelegate = piDelegate ; } void SetUserData(const ESImageInfo& dictImageInfo){ -@@ -50,10 +50,10 @@ class CFKDestination : public IFKDestination (private) +@@ -47,10 +47,10 @@ class CFKDestination : public IFKDestination (public) virtual void SetUserDataAsJson(ES_CHAR_CPTR pszUserDataAsJson) override; virtual void GetUserDataAsJson(IESResultString& pszUserDataAsJson) override; static IFKDestination* CreateAndInitInstanceWithType( FKDestinationType eType, ES_CMN_FUNCS::BUFFER::IESBuffer& cSource ); @@ -26,7 +26,7 @@ + void NotifyDidEndReceivingForImageInfo( ES_CHAR_CPTR pszImageInfoAsJson ) override; void NotifyReceiveImageData( ES_CMN_FUNCS::BUFFER::IESBuffer& cData, ES_CHAR_CPTR pszImageInfoAsJson ) override; - void Destroy(){ -+ void Destroy() override { ++ void Destroy() override{ delete this; } }; diff --git a/graphics/epsonscan2/files/patch-src_ES2FileFormat_Header_IO_FKSource.h b/graphics/epsonscan2/files/patch-src_ES2FileFormat_Header_IO_FKSource.h index c6dddcda8f9f..593711bfdbdc 100644 --- a/graphics/epsonscan2/files/patch-src_ES2FileFormat_Header_IO_FKSource.h +++ b/graphics/epsonscan2/files/patch-src_ES2FileFormat_Header_IO_FKSource.h @@ -1,6 +1,6 @@ ---- src/ES2FileFormat/Header/IO/FKSource.h.orig 2021-11-25 00:56:57 UTC +--- src/ES2FileFormat/Header/IO/FKSource.h.orig 2024-09-12 07:10:33 UTC +++ src/ES2FileFormat/Header/IO/FKSource.h -@@ -40,7 +40,7 @@ class CFKSource : public IFKSource (public) +@@ -37,7 +37,7 @@ class CFKSource : public IFKSource (public) { return m_bFull; } diff --git a/graphics/epsonscan2/files/patch-src_ES2FileFormat_Header_Reader_FKReader.h b/graphics/epsonscan2/files/patch-src_ES2FileFormat_Header_Reader_FKReader.h index 13ac013b39c3..1a7afda4663f 100644 --- a/graphics/epsonscan2/files/patch-src_ES2FileFormat_Header_Reader_FKReader.h +++ b/graphics/epsonscan2/files/patch-src_ES2FileFormat_Header_Reader_FKReader.h @@ -1,6 +1,6 @@ ---- src/ES2FileFormat/Header/Reader/FKReader.h.orig 2021-11-25 00:56:57 UTC +--- src/ES2FileFormat/Header/Reader/FKReader.h.orig 2024-09-12 07:10:33 UTC +++ src/ES2FileFormat/Header/Reader/FKReader.h -@@ -42,21 +42,21 @@ class CFKReader : public IFKReader (public) +@@ -39,21 +39,21 @@ class CFKReader : public IFKReader (public) m_nValidImageHeight = nHeight; m_bReadOnlyValidData = bReadOnlyValidData; } @@ -28,7 +28,7 @@ + virtual BOOL OpenReaderWithOptionAsJson( ES_CHAR_CPTR pszOptionAsJson, ENUM_FK_ERROR_CODE& eError ) override = 0; + virtual BOOL AppendSourceToReader( IFKSource* pcSource, ENUM_FK_ERROR_CODE& eError ) override = 0; + virtual BOOL CloseReaderWithOptionAsJson( ES_CHAR_CPTR pszOptionAsJson, ENUM_FK_ERROR_CODE& eError ) override = 0; -+ void Destroy() override { ++ void Destroy() override{ delete this; } }; diff --git a/graphics/epsonscan2/files/patch-src_ES2FileFormat_Source_PnmUtil_FKPnmUtil.cpp b/graphics/epsonscan2/files/patch-src_ES2FileFormat_Source_PnmUtil_FKPnmUtil.cpp index f0df1a08cec3..7701c8577475 100644 --- a/graphics/epsonscan2/files/patch-src_ES2FileFormat_Source_PnmUtil_FKPnmUtil.cpp +++ b/graphics/epsonscan2/files/patch-src_ES2FileFormat_Source_PnmUtil_FKPnmUtil.cpp @@ -1,11 +1,11 @@ ---- src/ES2FileFormat/Source/PnmUtil/FKPnmUtil.cpp.orig 2022-02-17 18:20:53 UTC +--- src/ES2FileFormat/Source/PnmUtil/FKPnmUtil.cpp.orig 2024-09-12 07:10:33 UTC +++ src/ES2FileFormat/Source/PnmUtil/FKPnmUtil.cpp -@@ -137,7 +137,7 @@ BOOL CFKPnmEncodeUtil::StartEncodingWithData(IFKDestin +@@ -134,7 +134,7 @@ BOOL CFKPnmEncodeUtil::StartEncodingWithData(IFKDestin ES_ErrorBailWithAction(m_cData.AllocBuffer(nHeaderSize + 4), BAIL, this, eError = kFKMemError, ES_STRING("memory alloc error")); } - memcpy(m_cData.GetBufferPtr(), m_pnmHeader.c_str(), sizeof(m_pnmHeader.c_str())); -+ memcpy(m_cData.GetBufferPtr(), m_pnmHeader.c_str(), strlen(m_pnmHeader.c_str())+1); ++ memcpy(m_cData.GetBufferPtr(), m_pnmHeader.c_str(), strlen(m_pnmHeader.c_str())); m_rowBytes = ES_IMAGE_INFO::GetESImageBytesPerRow(imageInfo); pDest->NotifyDidBeginReceivingForImageInfo(m_strImageJson.c_str()); if (pDest->GetFKDestinationType() == kFKDestinationTypeEmpty){ diff --git a/graphics/epsonscan2/files/patch-src_ES2FileFormat_Source_TiffUtil_FKTiffEncodeUtil.cpp b/graphics/epsonscan2/files/patch-src_ES2FileFormat_Source_TiffUtil_FKTiffEncodeUtil.cpp new file mode 100644 index 000000000000..0f981a5e001b --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_ES2FileFormat_Source_TiffUtil_FKTiffEncodeUtil.cpp @@ -0,0 +1,22 @@ +--- src/ES2FileFormat/Source/TiffUtil/FKTiffEncodeUtil.cpp.orig 2024-09-12 07:10:33 UTC ++++ src/ES2FileFormat/Source/TiffUtil/FKTiffEncodeUtil.cpp +@@ -192,8 +192,8 @@ BAIL:; + BAIL:; + return errorCode == kFKNoError; + } +-BOOL FKTiffEncodeUtil::StartWithPath(ESString& path, ESImageInfo& imageInfo, uint32 compression, +- BOOL appendMode, ESString& iccProfilePath, ENUM_FK_ERROR_CODE& eError,uint32 un32JpegQuality) ++BOOL FKTiffEncodeUtil::StartWithPath(ESString& path, ESImageInfo& imageInfo, uint32_t compression, ++ BOOL appendMode, ESString& iccProfilePath, ENUM_FK_ERROR_CODE& eError,uint32_t un32JpegQuality) + { + eError = kFKNoError; + if (m_bStarted || !OpenOutFileWithPath(&path, appendMode)){ +@@ -210,7 +210,7 @@ BOOL FKTiffEncodeUtil::StartWithPath(ESString& path, E + m_nSamplesPerPixel = samplesPerPixel; + m_nBytesPerLine = ES_IMAGE_INFO::GetESImageBytesPerRow(imageInfo); + m_nCompressionType = compression; +- uint32 colorSpace = GetTiffColorSpace(samplesPerPixel, compression); ++ uint32_t colorSpace = GetTiffColorSpace(samplesPerPixel, compression); + if (TIFFSetField(m_pOutFile, TIFFTAG_IMAGEWIDTH, imageWidth) != 1) { + ES_ErrorBailWithAction(FALSE, BAIL, this, eError = kFKTiffSetFieldError, ES_STRING("TIFFSetField TIFFTAG_IMAGEWIDTH fails")); + } diff --git a/graphics/epsonscan2/files/patch-src_ES2FileFormat_Source_TiffUtil_FKTiffEncodeUtil.h b/graphics/epsonscan2/files/patch-src_ES2FileFormat_Source_TiffUtil_FKTiffEncodeUtil.h new file mode 100644 index 000000000000..2b981aa00a3a --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_ES2FileFormat_Source_TiffUtil_FKTiffEncodeUtil.h @@ -0,0 +1,13 @@ +--- src/ES2FileFormat/Source/TiffUtil/FKTiffEncodeUtil.h.orig 2024-09-12 07:10:33 UTC ++++ src/ES2FileFormat/Source/TiffUtil/FKTiffEncodeUtil.h +@@ -25,8 +25,8 @@ class FKTiffEncodeUtil (public) + public: + FKTiffEncodeUtil(); + virtual ~FKTiffEncodeUtil(); +- BOOL StartWithPath(ESString& path, ESImageInfo& imageInfo, uint32 compression, BOOL appendMode, +- ESString& iccProfilePath, ENUM_FK_ERROR_CODE& eError,uint32 un32JpegQuality); ++ BOOL StartWithPath(ESString& path, ESImageInfo& imageInfo, uint32_t compression, BOOL appendMode, ++ ESString& iccProfilePath, ENUM_FK_ERROR_CODE& eError,uint32_t un32JpegQuality); + virtual BOOL WriteScanlinesWithData(const ES_CMN_FUNCS::BUFFER::IESBuffer& cData, ENUM_FK_ERROR_CODE& eError); + virtual BOOL FinalizeAndReturnError(ENUM_FK_ERROR_CODE& eError); + protected: diff --git a/graphics/epsonscan2/files/patch-src_Platform.cpp b/graphics/epsonscan2/files/patch-src_Platform.cpp index 0e2bdc96e935..ea517ecd15b4 100644 --- a/graphics/epsonscan2/files/patch-src_Platform.cpp +++ b/graphics/epsonscan2/files/patch-src_Platform.cpp @@ -1,6 +1,6 @@ ---- src/Platform.cpp.orig 2021-11-25 00:56:59 UTC +--- src/Platform.cpp.orig 2024-09-12 07:10:37 UTC +++ src/Platform.cpp -@@ -22,6 +22,10 @@ +@@ -19,6 +19,10 @@ #include "Platform.h" #include "CommonUtility/utils/PathUtils.h" #include @@ -11,7 +11,7 @@ #ifndef WIN32 errno_t fopen_s( FILE** pFile, -@@ -105,7 +109,7 @@ DWORD WaitForSingleObject( +@@ -102,7 +106,7 @@ DWORD ES2WaitForSingleObject( case THREAD_HANDLE_ID: { LPTHREAD_HANDLE hThreadHandle = (LPTHREAD_HANDLE) hHandle; @@ -20,7 +20,7 @@ return WAIT_OBJECT_0; } int thread_status = 0; -@@ -121,7 +125,7 @@ DWORD WaitForSingleObject( +@@ -118,7 +122,7 @@ DWORD ES2WaitForSingleObject( { intptr_t lRet = (intptr_t)pStatus; hThreadHandle->dwThreadStatus = (DWORD)lRet; @@ -29,8 +29,8 @@ } } while (EBUSY == thread_status); -@@ -180,7 +184,7 @@ BOOL CloseHandle(HANDLE hObject) - WaitForSingleObject(hObject, INFINITE); +@@ -177,7 +181,7 @@ BOOL CloseHandle(HANDLE hObject) + ES2WaitForSingleObject(hObject, INFINITE); LPTHREAD_HANDLE pThreadHandle = (LPTHREAD_HANDLE)hObject; pThreadHandle->dwThreadStatus = 0; - pThreadHandle->threadID = (int)NULL; @@ -38,19 +38,7 @@ #endif } break; -@@ -347,7 +351,11 @@ DWORD GetModuleFileName(LPTSTR lpFilename, DWORD buf_s - { - DWORD dwRet = 0; - memset(lpFilename, 0, buf_size); -+#ifdef __FreeBSD__ -+ readlink( "/proc/curproc/file", lpFilename, buf_size - 1 ); -+#else - readlink( "/proc/self/exe", lpFilename, buf_size - 1 ); -+#endif - dwRet = (DWORD)strlen(lpFilename); - return dwRet; - } -@@ -397,14 +405,14 @@ errno_t strcat_s( +@@ -325,14 +329,14 @@ errno_t strcat_s( } if (NULL == strSource) { diff --git a/graphics/epsonscan2/files/patch-src_SaneWrapper_backend.cpp b/graphics/epsonscan2/files/patch-src_SaneWrapper_backend.cpp index fdcae3361eca..284ff9fe2498 100644 --- a/graphics/epsonscan2/files/patch-src_SaneWrapper_backend.cpp +++ b/graphics/epsonscan2/files/patch-src_SaneWrapper_backend.cpp @@ -1,37 +1,18 @@ ---- src/SaneWrapper/backend.cpp.orig 2021-11-25 00:56:59 UTC +--- src/SaneWrapper/backend.cpp.orig 2024-09-12 07:10:44 UTC +++ src/SaneWrapper/backend.cpp -@@ -220,7 +220,8 @@ sane_open (SANE_String_Const device_name, SANE_Handle - { - return SANE_STATUS_INVAL; - } -- ((Epson_Scanner*)handle)->out_buffer = NULL; -+ // XXX next causes a SEGV on FreeBSD because out_buffer is not yet allocated -+ //((Epson_Scanner*)handle)->out_buffer = NULL; - if (!epson_backend->sane_dev) - { - const SANE_Device **dev = NULL; -@@ -355,6 +356,7 @@ sane_get_parameters (SANE_Handle handle, SANE_Paramete - unsigned int nSize = 100; - unsigned char* tmp_buf = (unsigned char*)::malloc(nSize); - SDIChar* output_path; +@@ -406,6 +406,7 @@ sane_get_parameters (SANE_Handle handle, SANE_Paramete *** 848 LINES SKIPPED ***