From nobody Sun Apr 03 08:46:18 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 89D4B1A50BDB; Sun, 3 Apr 2022 08:46:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KWSDp3LhLz4bxM; Sun, 3 Apr 2022 08:46:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648975578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0ypVRcGeQb8D37Wa9qdiIKT/EOsClKPbXCIQ1RmfK+4=; b=fOaz7mug2YELdXOlzhV+biY8wjxD87LUvL/jADwPkkmH6XWpjGAYGD0GfQn1xLCmeiLLzG iZ+R5Rm+/tngBrDCRC/fmyoYzrMta1Kb0xn8o876/HKsAWA2h6Yxkmw2LlSd/0dtlbOXZi J3JneuiP5K7kVe5WZ6UVfIu4znHuZw9vxHxMwXrez4XGEy9Ir2Z5kH6wq8Z3sJSVQ7fB7l HPErXAmfn76MdG5yh+jmrKIMrRld0wkqSVAT7opkYC+AUI6R+iPPHD9LM8fJIXTtfLrMq9 aMVBwvr7YHGxzoIMhGGvrd4YGs/ZdkasR7HzyhVTFj1IB7UG7EZvmIad1xQm/Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5257E1A5EE; Sun, 3 Apr 2022 08:46:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2338kII6057093; Sun, 3 Apr 2022 08:46:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2338kIQq057092; Sun, 3 Apr 2022 08:46:18 GMT (envelope-from git) Date: Sun, 3 Apr 2022 08:46:18 GMT Message-Id: <202204030846.2338kIQq057092@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Rainer Hurling Subject: git: 27df5bce08f3 - main - graphics/epsonscan2: Add new port for Epson Scanners List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rhurlin X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 27df5bce08f3b1d63d5b4275eaf91bc01d1dfa35 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648975578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0ypVRcGeQb8D37Wa9qdiIKT/EOsClKPbXCIQ1RmfK+4=; b=JREH6DFVjqOLNXGhrMkQgyIJm6PZhxxVDs6LhDW2u9lsuSDVx7KVQG4ext+lB2Q9f9LPLu kD7wtkse6S+j4UD7X1Dw4/YhS/jcmDRgFYGVX/u/icVNYYAHDmZVcVRJccPZA+mk6rQpur HxqpAVvVTWJHrrEzhbnVQFCCV6oh/rNhM+1YmiaZDrLnG5fHo4Cxd7Nq/aesEqIaNCcu75 3VW55374tzlQTo+Xw6M5s05ZhW8LdYWq7Gc8TI5sfxhgmBHgSp65tfEfAapjeevpYghJy8 75gXWxEJWVsxF9NDMimpkB4d5DM9kCyV7GErEwjrzVrFnZWr4PsCLcGG6Jd/nA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648975578; a=rsa-sha256; cv=none; b=cpmcNjQW1092QUGnwuokkG86dnAMH23ep4+05z3RxAvW3YWDMShjTGcSOZK9HCahLCFkPc HTVsFzsjSGIQ/jBY0PVEXRzB//qpPHJsTNzPFIDhyOyxg4mjmkqtWwR+w2DwLXr7KsiXRS +Hk1DHDvODV293+smqwcSwgAPuTczSnq+vvVI39r/R++lKWkrjFqbd4qe++pW4rzWUHpzx f7FO22509ZI0RlLYcec//9Pv9oYuK9FGPcijKWWTrxUoXF4jW7MHGli18znIFln3jmX2nC LTN7hPKlt5Lb8sn/xsWtGNyMuTHeOuscznFuQWl+LpZ5n9DPeW3qaNlnByWu3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rhurlin: URL: https://cgit.FreeBSD.org/ports/commit/?id=27df5bce08f3b1d63d5b4275eaf91bc01d1dfa35 commit 27df5bce08f3b1d63d5b4275eaf91bc01d1dfa35 Author: Rainer Hurling AuthorDate: 2022-04-03 08:05:36 +0000 Commit: Rainer Hurling CommitDate: 2022-04-03 08:44:09 +0000 graphics/epsonscan2: Add new port for Epson Scanners This is a port of the Seiko/Epson Epsonscan2 scanner engine and GUI[1]. It provides a complete alternative to sane/xsane with its own scanner engine and GUI. It also provides a sane back-end library (libsane-epsonscan2.so) so that it works with the sane package. There are two parts to this port: - graphics/epsonscan2 - the main scanner engine and GUI that works with (most) USB scanners - graphics/epsonscan2-non-free-plugin - support for Epson's Linux binary that adds network access to scanners and usb access to some particular scanners Please read the file %%PREFIX%%/lib/epsonscan2/Read_me.FreeBSD for notes on how to set this up and use it. [1] https://download.ebz.epson.net/man/linux/epsonscan2_e.html PR: 261891 Reviewed by: (partly) Tatsuki Makino , diizzy@ --- graphics/Makefile | 2 + graphics/epsonscan2-non-free-plugin/Makefile | 102 ++ graphics/epsonscan2-non-free-plugin/distinfo | 9 + .../epsonscan2-non-free-plugin/files/ddeplugin.in | 11 + .../epsonscan2-non-free-plugin/files/dtrplugin.in | 11 + .../epsonscan2-non-free-plugin/files/es2intif.in | 11 + .../epsonscan2-non-free-plugin/files/es2netif.in | 11 + .../epsonscan2-non-free-plugin/files/fitplugin.in | 11 + .../files/pkg-message.in | 16 + graphics/epsonscan2-non-free-plugin/pkg-descr | 7 + graphics/epsonscan2-non-free-plugin/pkg-plist | 52 + graphics/epsonscan2/Makefile | 53 + graphics/epsonscan2/distinfo | 3 + graphics/epsonscan2/files/Read_me.FreeBSD.in | 633 ++++++++ graphics/epsonscan2/files/patch-CMakeLists.txt | 57 + .../files/patch-src_CommonUtility_DbgLog.cpp | 21 + .../patch-src_CommonUtility_utils_ESAnyCastUtils.h | 28 + .../files/patch-src_CommonUtility_utils_ESFile.cpp | 12 + .../patch-src_CommonUtility_utils_PathUtils.cpp | 10 + .../files/patch-src_Controller_CMakeLists.txt | 11 + .../files/patch-src_Controller_Src_EntryPoints.cpp | 11 + ...tch-src_Controller_Src_FileFormat_FFManager.cpp | 12 + .../files/patch-src_Controller_Src_Filter_DTR.cpp | 21 + ...h-src_Controller_Src_Filter_ProcOrientation.hpp | 10 + .../patch-src_Controller_Src_Filter_Saving.hpp | 20 + .../patch-src_Controller_Src_Finder_UsbFinder.cpp | 14 + ...rc_Controller_Src_KeysValues_All_Resolution.cpp | 11 + ...Controller_Src_KeysValues_All_ScanHeightMax.cpp | 11 + ..._Controller_Src_KeysValues_All_ScanWidthMax.cpp | 11 + .../patch-src_Controller_Src_Scanner_Engine.hpp | 26 + .../patch-src_Controller_Src_Scanner_Scanner.cpp | 27 + .../patch-src_ES2Command_Linux_CMakeLists.txt | 11 + ...rc_ES2Command_Src_Command_ESCI2_ESCI2Accessor.h | 38 + ...2Command_Src_Interface_ipc_ipcInterfaceImpl.cpp | 11 + ...2Command_Src_Interface_usb_usbInterfaceImpl.cpp | 12 + ...ES2Command_Src_Interface_usb_usbInterfaceImpl.h | 15 + .../patch-src_ES2Command_Src_Utils_semaphore.hpp | 71 + ...tch-src_ES2FileFormat_Header_IO_FKDestination.h | 32 + .../patch-src_ES2FileFormat_Header_IO_FKSource.h | 11 + ...atch-src_ES2FileFormat_Header_Reader_FKReader.h | 34 + ...-src_ES2FileFormat_Source_PnmUtil_FKPnmUtil.cpp | 11 + graphics/epsonscan2/files/patch-src_Platform.cpp | 69 + .../files/patch-src_SaneWrapper_backend.cpp | 37 + .../files/patch-src_SaneWrapper_defines.h | 33 + .../files/patch-src_SaneWrapper_epsonscan.cpp | 29 + .../files/patch-src_ScanSDK_Src_SDK_supervisor.cpp | 29 + .../files/patch-src_Standalone_CMakeLists.txt | 9 + .../patch-src_Standalone_addeditpagedialog.cpp | 8 + .../files/patch-src_Standalone_commandlinemode.cpp | 20 + .../patch-src_Standalone_custommessagebox.cpp | 11 + ...rc_Standalone_detectionareamindoublespinbox.cpp | 11 + ...patch-src_Standalone_deviceconnectiondialog.cpp | 28 + .../files/patch-src_Standalone_documentsize.cpp | 23 + .../files/patch-src_Standalone_foldercomb.cpp | 20 + ...-src_Standalone_imageformatsettingscombobox.cpp | 11 + ...tch-src_Standalone_imageformatsettingsdialog.ui | 38 + ...tch-src_Standalone_initdeviceselectcombobox.cpp | 11 + .../patch-src_Standalone_lengthdoublespinbox.cpp | 11 + .../files/patch-src_Standalone_mainwindow.cpp | 38 + .../files/patch-src_Standalone_mainwindow.ui | 38 + ...ch-src_Standalone_networkdeviceselectdialog.cpp | 11 + .../files/patch-src_Standalone_rotateimage.cpp | 47 + .../files/patch-src_Standalone_supervisor.cpp | 29 + .../patch-src_Standalone_widthdoublespinbox.cpp | 11 + .../files/patch-thirdparty_zlib_gzread.c | 10 + .../files/patch-thirdparty_zlib_gzwrite.c | 10 + graphics/epsonscan2/files/pkg-message.in | 17 + graphics/epsonscan2/pkg-descr | 5 + graphics/epsonscan2/pkg-plist | 1650 ++++++++++++++++++++ 69 files changed, 3755 insertions(+) diff --git a/graphics/Makefile b/graphics/Makefile index 8d0ce3dcf3d8..a9df4c0a0080 100644 --- a/graphics/Makefile +++ b/graphics/Makefile @@ -168,6 +168,8 @@ SUBDIR += ephoto SUBDIR += epix SUBDIR += eps2png + SUBDIR += epsonscan2 + SUBDIR += epsonscan2-non-free-plugin SUBDIR += epstool SUBDIR += eterm-bg SUBDIR += evince diff --git a/graphics/epsonscan2-non-free-plugin/Makefile b/graphics/epsonscan2-non-free-plugin/Makefile new file mode 100644 index 000000000000..a7f0c8a2956e --- /dev/null +++ b/graphics/epsonscan2-non-free-plugin/Makefile @@ -0,0 +1,102 @@ +PORTNAME= epsonscan2-non-free-plugin +DISTVERSION= 6.6.40.0 +CATEGORIES= graphics +MASTER_SITES= https://download2.ebz.epson.net/${EPSONSCAN2}/common/rpm/x64/:amd64 \ + https://download2.ebz.epson.net/${EPSONSCAN2}/common/deb/arm/:armv7 \ + https://download2.ebz.epson.net/${EPSONSCAN2}/common/deb/arm/:armv7rasb \ + https://download2.ebz.epson.net/${EPSONSCAN2}/common/rpm/x86/:i386 +DISTNAME= ${EPSONSCAN2}-bundle-${DISTVERSION} +DISTFILES_amd64= ${DISTNAME}.${DIST_SUFX}${EXTRACT_SUFX}:amd64 +DISTFILES_armv7= ${DISTNAME}.${DIST_SUFX}${EXTRACT_SUFX}:armv7 +DISTFILES_armv7rasb= ${DISTNAME:S,bundle,bundle-raspbian,}.${DIST_SUFX}${EXTRACT_SUFX}:armv7rasb +DISTFILES_i386= ${DISTNAME}.${DIST_SUFX}${EXTRACT_SUFX}:i386 + +MAINTAINER= fbsd@opal.com +COMMENT= Epson Scan 2 network interface non-free-plugin + +LICENSE= EPSON +LICENSE_NAME= EPSON END USER SOFTWARE LICENSE AGREEMENT +LICENSE_FILE= ${WRKDIR}/usr/share/doc/${PORTNAME}-${EPSON_VERSION}-1/COPYING.EPSON +LICENSE_PERMS= no-dist-mirror no-dist-sell no-pkg-mirror no-pkg-sell + +LEGAL_TEXT= License does not permit public sharing or revenue earning, and restricts exports + +ONLY_FOR_ARCHS= amd64 armv7 armv7rasb i386 + +RUN_DEPENDS= epsonscan2:graphics/epsonscan2 \ + linux_libusb>=13.1.0:devel/linux_libusb + +USES= linux +USE_LDCONFIG= ${LINUXBASE}/usr/${LINUX_LIB}/epsonscan2/libexec \ + ${LINUXBASE}/usr/${LINUX_LIB}/epsonscan2/non-free-exec + +EPSON_VERSION= 1.0.0.5 +EPSONSCAN2= ${PORTNAME:S,-non-free-plugin,,} + +LINUX_WRAPPERS= ddeplugin \ + dtrplugin \ + es2intif \ + es2netif \ + fitplugin + +NO_BUILD= true + +SUB_FILES= pkg-message \ + ${LINUX_WRAPPERS} + +SUB_LIST+= LINUXBASE=${LINUXBASE} \ + LINUX_LIB=${LINUX_LIB} + +PLIST_SUB+= LINUX_LIB=${LINUX_LIB} \ + LINUX_LIB_EXTRA=${LINUX_LIB_EXTRA} + +.include + +.if ((${OSVERSION} >= 1400000 && ${OSVERSION} <= 1400053) || \ + (${OSVERSION} >= 1300000 && ${OSVERSION} <= 1300526) || \ + ${OSVERSION} < 1300000) +.warning epsonscan2-non-free-plugin's es2intif requires FreeBSD 13.x or 14.x +.warning kernel later than 2022/03/05 for operation with scanners shown with +.warning [*] in ${PREFIX}/lib/epsonscan2/Read_me.FreeBSD. +.endif + +.if ${ARCH} == amd64 +DIST_FMT= rpm +DIST_SUFX= x86_64.${DIST_FMT} +LINUX_ARCH= x86_64 +LINUX_FMT= rpm +LINUX_LIB= lib64 +LINUX_LIB_EXTRA= "@comment " +.elif ${ARCH} == armv7 || ${ARCH} == armv7rasb +DIST_FMT= deb +DIST_SUFX= armv7l.${DIST_FMT} +LINUX_ARCH= armhf +LINUX_FMT= deb +LINUX_LIB= lib/arm-linux-gnueabihf +LINUX_LIB_EXTRA= "" +.elif ${ARCH} == i386 +DIST_FMT= rpm +DIST_SUFX= i686.${DIST_FMT} +LINUX_ARCH= i686 +LINUX_FMT= rpm +LINUX_LIB= lib +LINUX_LIB_EXTRA= "@comment " +.endif + +post-extract: +. if ${ARCH} == amd64 || ${ARCH} == i386 + cd ${WRKDIR}; ${TAR} xf ${DISTNAME}.${DIST_SUFX}/plugins/${PORTNAME}-${EPSON_VERSION}-1.${LINUX_ARCH}.${DIST_FMT} && ${RM} -r ${DISTNAME}.${DIST_SUFX} +. elif ${ARCH} == armv7 || ${ARCH} == armv7rasb + cd ${WRKDIR}; ${TAR} xf ${DISTNAME}.${DIST_SUFX}/plugins/${PORTNAME}_${EPSON_VERSION}-1_${LINUX_ARCH}.${DIST_FMT} data.tar.xz && ${RM} -r ${DISTNAME}.${DIST_SUFX} + cd ${WRKDIR}; ${TAR} xf data.tar.xz && ${RM} data.tar.xz +. endif + +do-install: + ${MKDIR} ${STAGEDIR}${LINUXBASE} + cd ${WRKDIR}/usr; ${COPYTREE_SHARE} . ${STAGEDIR}${LINUXBASE}/usr "! -path *-ocr* -a ! -path *.build-id*" + cd ${WRKDIR}/usr/${LINUX_LIB}/${EPSONSCAN2}/non-free-exec; ${INSTALL_KLD} ${LINUX_WRAPPERS} ${STAGEDIR}${LINUXBASE}/usr/${LINUX_LIB}/${EPSONSCAN2}/non-free-exec + ${MKDIR} ${STAGEDIR}${PREFIX}/lib/${EPSONSCAN2}/non-free-exec + cd ${WRKDIR}; ${INSTALL_SCRIPT} ${LINUX_WRAPPERS} ${STAGEDIR}${PREFIX}/lib/${EPSONSCAN2}/non-free-exec + cd ${WRKDIR}/usr/share/doc/${PORTNAME}-${EPSON_VERSION}-1; ${CP} -pr . ${STAGEDIR}${DOCSDIR} + +.include diff --git a/graphics/epsonscan2-non-free-plugin/distinfo b/graphics/epsonscan2-non-free-plugin/distinfo new file mode 100644 index 000000000000..e1cdd7062920 --- /dev/null +++ b/graphics/epsonscan2-non-free-plugin/distinfo @@ -0,0 +1,9 @@ +TIMESTAMP = 1644933572 +SHA256 (epsonscan2-bundle-6.6.40.0.armv7l.deb.tar.gz) = efe070472e662feea572899cdad0300b759edcf84b2f57c51c997df8d2c07171 +SIZE (epsonscan2-bundle-6.6.40.0.armv7l.deb.tar.gz) 18239327 +SHA256 (epsonscan2-bundle-6.6.40.0.i686.rpm.tar.gz) = c7b68d8cd0c0d7ae187d3c44b5edcca1ca625bbcab50db31e754e3d2261787f0 +SIZE (epsonscan2-bundle-6.6.40.0.i686.rpm.tar.gz) = 14582599 +SHA256 (epsonscan2-bundle-6.6.40.0.x86_64.rpm.tar.gz) = 2b9453dba611c6fbadb8105817020334b9ce1db205e6a68f3d1de198ca3d9451 +SIZE (epsonscan2-bundle-6.6.40.0.x86_64.rpm.tar.gz) = 14016602 +SHA256 (epsonscan2-bundle-raspbian-6.6.40.0.armv7l.deb.tar.gz) = 3b373288884ae38febb5eb9343e820d083d8690414c273f6cdf9abc77b3a171e +SIZE (epsonscan2-bundle-raspbian-6.6.40.0.armv7l.deb.tar.gz) = 20669297 diff --git a/graphics/epsonscan2-non-free-plugin/files/ddeplugin.in b/graphics/epsonscan2-non-free-plugin/files/ddeplugin.in new file mode 100644 index 000000000000..02b2ae040bf0 --- /dev/null +++ b/graphics/epsonscan2-non-free-plugin/files/ddeplugin.in @@ -0,0 +1,11 @@ +#!/bin/sh +# This wrapper script sets environment variable LD_LIBRARY_PATH to the list +# of needed Linux library directories, then invokes the Linux binary in the +# Linux directories. + +LINUX_EPSONSCAN2=%%LINUXBASE%%/usr/%%LINUX_LIB%%/epsonscan2 + +PROG=${LINUX_EPSONSCAN2}/non-free-exec/`basename $0` +export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${LINUX_EPSONSCAN2}/non-free-exec:${LINUX_EPSONSCAN2}/libexec + +exec $PROG ${@+"$@"} diff --git a/graphics/epsonscan2-non-free-plugin/files/dtrplugin.in b/graphics/epsonscan2-non-free-plugin/files/dtrplugin.in new file mode 100644 index 000000000000..02b2ae040bf0 --- /dev/null +++ b/graphics/epsonscan2-non-free-plugin/files/dtrplugin.in @@ -0,0 +1,11 @@ +#!/bin/sh +# This wrapper script sets environment variable LD_LIBRARY_PATH to the list +# of needed Linux library directories, then invokes the Linux binary in the +# Linux directories. + +LINUX_EPSONSCAN2=%%LINUXBASE%%/usr/%%LINUX_LIB%%/epsonscan2 + +PROG=${LINUX_EPSONSCAN2}/non-free-exec/`basename $0` +export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${LINUX_EPSONSCAN2}/non-free-exec:${LINUX_EPSONSCAN2}/libexec + +exec $PROG ${@+"$@"} diff --git a/graphics/epsonscan2-non-free-plugin/files/es2intif.in b/graphics/epsonscan2-non-free-plugin/files/es2intif.in new file mode 100644 index 000000000000..02b2ae040bf0 --- /dev/null +++ b/graphics/epsonscan2-non-free-plugin/files/es2intif.in @@ -0,0 +1,11 @@ +#!/bin/sh +# This wrapper script sets environment variable LD_LIBRARY_PATH to the list +# of needed Linux library directories, then invokes the Linux binary in the +# Linux directories. + +LINUX_EPSONSCAN2=%%LINUXBASE%%/usr/%%LINUX_LIB%%/epsonscan2 + +PROG=${LINUX_EPSONSCAN2}/non-free-exec/`basename $0` +export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${LINUX_EPSONSCAN2}/non-free-exec:${LINUX_EPSONSCAN2}/libexec + +exec $PROG ${@+"$@"} diff --git a/graphics/epsonscan2-non-free-plugin/files/es2netif.in b/graphics/epsonscan2-non-free-plugin/files/es2netif.in new file mode 100644 index 000000000000..02b2ae040bf0 --- /dev/null +++ b/graphics/epsonscan2-non-free-plugin/files/es2netif.in @@ -0,0 +1,11 @@ +#!/bin/sh +# This wrapper script sets environment variable LD_LIBRARY_PATH to the list +# of needed Linux library directories, then invokes the Linux binary in the +# Linux directories. + +LINUX_EPSONSCAN2=%%LINUXBASE%%/usr/%%LINUX_LIB%%/epsonscan2 + +PROG=${LINUX_EPSONSCAN2}/non-free-exec/`basename $0` +export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${LINUX_EPSONSCAN2}/non-free-exec:${LINUX_EPSONSCAN2}/libexec + +exec $PROG ${@+"$@"} diff --git a/graphics/epsonscan2-non-free-plugin/files/fitplugin.in b/graphics/epsonscan2-non-free-plugin/files/fitplugin.in new file mode 100644 index 000000000000..02b2ae040bf0 --- /dev/null +++ b/graphics/epsonscan2-non-free-plugin/files/fitplugin.in @@ -0,0 +1,11 @@ +#!/bin/sh +# This wrapper script sets environment variable LD_LIBRARY_PATH to the list +# of needed Linux library directories, then invokes the Linux binary in the +# Linux directories. + +LINUX_EPSONSCAN2=%%LINUXBASE%%/usr/%%LINUX_LIB%%/epsonscan2 + +PROG=${LINUX_EPSONSCAN2}/non-free-exec/`basename $0` +export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${LINUX_EPSONSCAN2}/non-free-exec:${LINUX_EPSONSCAN2}/libexec + +exec $PROG ${@+"$@"} diff --git a/graphics/epsonscan2-non-free-plugin/files/pkg-message.in b/graphics/epsonscan2-non-free-plugin/files/pkg-message.in new file mode 100644 index 000000000000..a2f77a596d3a --- /dev/null +++ b/graphics/epsonscan2-non-free-plugin/files/pkg-message.in @@ -0,0 +1,16 @@ +[ +{ type: install + message: < diff --git a/graphics/epsonscan2/distinfo b/graphics/epsonscan2/distinfo new file mode 100644 index 000000000000..29a2e52cc255 --- /dev/null +++ b/graphics/epsonscan2/distinfo @@ -0,0 +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 diff --git a/graphics/epsonscan2/files/Read_me.FreeBSD.in b/graphics/epsonscan2/files/Read_me.FreeBSD.in new file mode 100644 index 000000000000..a12d2ba98a87 --- /dev/null +++ b/graphics/epsonscan2/files/Read_me.FreeBSD.in @@ -0,0 +1,633 @@ +The FreeBSD port of the Seiko/Epson epsonscan2 driver is mostly working. +Some bugs present in the Linux version have been found and fixed here in +this version. + +There are two ports: + graphics/epsonscan2 Native FreeBSD port of the Epson + scanner engine and the GUI front-end. + This supports scanners connected via + USB cable. + + graphics/epsonscan2-non-free-plugin + Port of the Linux binary that supports + scanner access over networks as well as + USB access to some older scanner models. + This port requires the kernel Linux + emulator modules as well as the userland + Linux libraries. + +The epsonscan2 package provides support for a variety of Seiko/Epson +scanners. The specific model names are stored as hashed strings in the +driver and there does not appear to be a text file listing the supported +models, so it is not possible to know what they all are! However, the +driver does include the USB product ID codes that it supports. A full +list of these USB product ID codes is included at the end of this file. + +The epsonscan2 package provides a complete alternative to the usual +sane/xsane way of doing things. The epsonscan2 command provides both a +full GUI interface as well as a command line interface to the scanner. + +There is also a libsane-epsonscan2.so back-end for sane, and it does +work, but requires some manual configuration first. + +The epsonscan2 package only works with scanners connected via USB cable, +but not even all USB scanners. Some older models also require the +non-free-plugin port for USB access. See the list of USB product IDs +at the end of this file for which models also require the non-free-plugin +for USB access. + +To access a network-connected scanner, the es2netif binary in the +epsonscan2-non-free-plugin port is also required. As mentioned, some +older models require the es2intif binary from this port for USB access. +es2netif and es2intif are Linux binaries that interface between the +epsonscan2 driver and the scanner. es2netif is a program that talks +to a scanner over network sockets and works well. es2intif appears +to provide support for firmware downloads to the scanner device over +USB and may not be fully working at this time. These binaries require +the kernel Linux emulator modules and the Linux userland support in +emulators/linux_base-c7. The kernel Linux modules include: + linux.ko + linux64.ko + linux_common.ko + linprocfs.ko + linsysfs.ko + fdescfs.ko + pty.ko + +Epson provides additional web documentation for epsonscan2 at this URL: + https://download.ebz.epson.net/man/linux/epsonscan2_e.html + + +SYSTEM CONFIGURATION + +To access a USB scanner as a non-root user, you will need to ensure +that the USB devices are readable. Configure as follows: +In /etc/rc.conf: + devfs_system_ruleset="system" + devfs_set_rulesets="%%LINUXBASE%%/dev=system" +In /etc/devfs.rules: + [system=5] + add path 'usb' mode 0755 + add path 'usb/*' mode 0666 + add path 'ugen*' mode 0666 + add path 'usbctl' mode 0666 + + +DETECTING SCANNERS + +You can run: + epsonscan2 -l +to list discovered scanners. + +If your USB scanner is not found, make sure that it is displayed when +you run: + usbconfig dump_device_desc +and that its vendorID and productID are on the list at the bottom of +this file. + +If your network scanner is not found, make sure that it is configured +with an IPv4 address (the epsonscan2 driver ignores IPv6 scanners). +Also make sure that the scanner has mDNS/Bonjour enabled and that when +you run: + avahi-browse -at +you can see the scanner with IPv4 in the domain _scanner._tcp. If your +scanner does not support the mDNS/Bonjour protocol, you can manually +configure the scanner's IP address like this: + epsonscan2 -i ipv4.address + + +SCANNING WITH THE EPSON GUI + +To use with the GUI front-end, just run: + epsonscan2 +It will look for USB and network scanners and list them. Choose the +scanner you want and click Next. The scanning menu will show, allowing +you to set scanning parameters and acquire a preview or scan the image. + +NOTE again, that it might well detect network scanners without the +non-free-module installed, but it will not talk to a network scanner +without that module. + + +SCANNING FROM THE COMMAND-LINE + +The command-line syntax is: + epsonscan2 -s ConfigFile.SF2 + +This will initiate a scan based on the parameters in the configuration +file and save the output where the config directs it. A config file is +created when you use the GUI; look for the file: + ~/.epsonscan2/Settings/MODEL/UserSettings.SF2 + +Alternatively, you can create a config file using: + epsonscan2 -c + +You must then edit the file and set at least the following parameters: + The JpegQuality values are in the range [0..100]. If set to 0, + no image will be produced: + JpegQuality: 30 + JpegQualityForJpeg: 85 + JpegQualityForPdf: 50 + The Resolution is likely to include 75, 150, 200, 300, 600, 1200, + 2400, 9600 but the values are device dependent: + Resolution: 200 + The ScanArea defines where is scanned. It is the page size in + inches multiplied by the Resolution value: + ScanAreaHeight: 2200 + ScanAreaWidth: 1700 + Threshold must also be set: + Threshold: 110 + +NOTE: If Resolution is left at 0, epsonscan2 -s will likely core dump + with a floating point exception! + + +SCANNING WITH SANE + +The epsonscan2 package includes a libsane-epsonscan2.so backend. + +The port creates a sane config file in: + %%PREFIX/etc/sane.d/dll.d/epsonscan2 +but this does not seem to do anything on FreeBSD. You must also edit +the file: + %%PREFIX/etc/sane.d/dll.conf +and add: + epsonscan2 +to that file. To speed device searches up, you can also comment out all +the ones you are not using. + +For a USB scanner, you do not need this next part. For a network scanner, +you do. The libsane-epsonscan2.so module does not use the main epsonscan2 +code that finds network scanners using the mDNS/Bonjour protocol. Instead, +it uses a static hint file telling it where to find network scanners. It +will not find network scanners without this file. Create the hint file +using: + epsonscan2 -i ipv4.address +or edit: + ~/.epsonscan2/Network/epsonscan2.conf +and put in it: + [Network] + ipv4.address +There can be multiple scanner ipv4.address entries, one per line. +E.g.: + [Network] + 192.168.3.30 + 192.168.4.17 + +The libsane-epsonscan2.so backend uses a scanner configuration file in: + ~/.epsonscan2/DefaultSettings.SF2 + +If you have already scanned using epsonscan2, there will be a config +file in: + ~/.epsonscan2/Settings/MODEL/UserSettings.SF2 +Copy or link this file to the DefaultSettings.SF2 path above. Or, +create a new file using "epsonscan2 -c", adjust its parameter values as +described above, and put the file in the DefaultSettings.SF2 path. + +Then, scanimage should work: + Try: + scanimage -o foo.pnm + scanimage --mode Color -o foo.pnm + For A4 paper size: + scanimage --mode Color --scan-area A4 -o foo.pnm + scanimage --mode Color -x 210 -y 297 -o foo.pnm + For US Letter paper size: + scanimage --mode Color --scan-area Letter -o foo.pnm + scanimage --mode Color -x 215.9 -y 279.4 -o foo.pnm + + +SCANNING WITH XSANE + +This doesn't work. See KNOWN PROBLEMS, below. + + +COMMON PROBLEMS + +Read the sections above for fuller details on each of these. + +0. The scanner is not found. + If the scanner is connected bu USB cable, run: + usbconfig dump_device_desc + The following values are supported by this driver: + idVendor = 0x04b8 + idProduct = (see list at end of this file) + + If the scanner is connected by Ethernet or WiFi, and for some + older USB models, the graphics/epsonscan2-non-free-plugin + port must also be installed and the kernel Linux support must + be enabled (see above). + +1. epsonscan2 -s scans but the "img.pdf" file contains a blank image. + Make sure that the config file contains valid settings e.g.: + JpegQuality: 30 + JpegQualityForJpeg: 85 + JpegQualityForPdf: 50 + Resolution: 200 + ScanAreaHeight: 2200 + ScanAreaWidth: 1700 + Threshold: 110 + +2. epsonscan2 -s scans but does not save the file. + Make sure that the config file contains valid settings for: + FileNameOverwrite: "0" to use sequential file + names, "1" to use the same + filename each time + FileNamePrefix: any file name; a number will + be appended if FileNameOverwrite + is set to "0" + UserDefinePath: "./" for the current directory + +3. epsonscan2 -s scans then says "Not enough memory". + Various things can cause this. Usually the problem is an + excessively large scan area or too large values for the image + enhancer. Check the following in your config file: + Resolution: 200 + ScanAreaHeight: 2200 + ScanAreaWidth: 1700 + Threshold: 110 + textEnhance 0 + textEnhanceNoiseReductionLevel 0 + textEnhancePaperCreaseReduction 0 + textEnhanceSensitivity 0 + thresholdAdjustment 0 + +4. epsonscan2 works with USB scanners but not with network scanners. + Make sure that: + a. You have the non-free-plugin port installed and the kernel + Linux emulator enabled. + +5. epsonscan2 scans but then prints: + ERROR : Unable to save scanned files. + /tmp/epsonWork/_12345/: No such file or directory + Make sure that: + a. The working dir, /tmp/epsonWork is writable by the user + running the scan. + +6. scanimage works with USB scanners but not with network scanners. + Make sure that: + a. You have the non-free-plugin port installed and the kernel + Linux emulator enabled. + b. You added the network scanner's IPv4 address to the file: + ~/.epsonscan2/Networks/epsonscan2.conf + +7. scanimage scans but the image is in reverse video. + Specifiy the scan mode using any of: + scanimage --mode Monochrome ... + scanimage --mode Grayscale ... + scanimage --mode Color ... + +KNOWN PROBLEMS + +There are two known problems on FreeBSD at the moment: + +0. es2intif core dumps. + The older scanners that require the es2intif program require a + small patch to the linux_libusb code. Make sure that you have + port devel/linux_libusb-13.1.0 or later and a 13.x or 14.x kernel + newer than 2022/03/05. + +1. xsane scans but then core dumps. + This isn't working. This appears to be a bug in xsane. After + receiving the image data, xsane processes the image in + xsane_read_image_data() which calls xsane_progress_update() to + update a progress bar widget. It core dumps when calling + gtk_main_iteration() from that! Since the xsane port on FreeBSD + is unmaintained, this won't get fixed until someone decides to + take a look at it. + +Good luck! + + +DEBUGGING + +The epsonscan2 driver provides a debugging trace if the directory: + /tmp/epson +exists. It also saves various files in that directory too. + +The sane backend component provides a debugging trace by setting the +following environment variable: + export SANE_DEBUG_EPSONSCAN=IMG + scanimage -L + +The xsane program can be debugged by setting the environment variable: + export XSANE_DEBUG=99 + xsane + + +LIST OF SUPPORTED USB PRODUCT IDs + +The following USB product IDs are supported by the epsonscan2 driver. +Descriptons have been added where they can be determined. + +[*] Models with the [*] require the non-free-plugin port even for USB + access. + +USB +Vendor ID Description +0x04B8 Seiko/Epson Corporation + +Product ID Description +0x0023 +0x0024 +0x0129 ES-10000G [Expression 10000XL] +0x012B ES-H300 [GT-2500] +0x012C GT-X900 [Perfection V700/V750 Photo] +0x0130 GT-X770 [Perfection V500] +0x0133 GT-1500 [GT-D1000] +0x0135 GT-X970 +0x0136 ES-D400 [GT-S80] +0x0137 ES-D200 [GT-S50] +0x0138 ES-H7200 [GT-20000] +0x013A [*] GT-X820 [Perfection V600 Photo] +0x013B [*] +0x013C [*] +0x013D [*] +0x0142 [*] GT-F730 [GT-S630/Perfection V33/V330 Photo] +0x0143 GT-S55 +0x0144 GT-S85 +0x0145 +0x0146 +0x0147 +0x014A [*] +0x014B +0x014C +0x014D +0x0150 +0x0151 Perfection V800 Photo +0x0152 +0x0153 +0x0154 +0x0155 +0x0156 +0x0157 +0x0159 +0x015A +0x015B +0x015C +0x015D +0x015E +0x015F +0x0160 +0x0162 +0x0163 +0x0164 +0x0165 +0x0166 +0x0167 +0x0168 +0x0169 +0x016B +0x016C +0x016D +0x016E +0x016F +0x0170 +0x0171 +0x0172 +0x0173 +0x0176 +0x0177 +0x0178 +0x0179 +0x017A +0x017B +0x017C +0x017D +0x017E +0x017F +0x0180 +0x0181 +0x0182 +0x0183 +0x0184 +0x0185 +0x0186 +0x0187 +0x0188 +0x0189 +0x018A +0x018B +0x018C +0x018D +0x018E +0x018F +0x0190 +0x0191 +0x0192 +0x0869 PX-1600F +0x0879 EP-904A/EP-904F [Artisan 837/Stylus Photo PX830FWD Series] +0x087B EP-804A/EP-804AR/EP-804AW [Stylus Photo PX730WD/Artisan 730 Series] +0x087C PX-1700F +0x087D PX-B750F/WP-4525 Series +0x0899 +0x08A5 +0x08A9 +0x08AA +0x08AC +0x08AD +0x08AE +0x08AF +0x08B0 +0x08B3 +0x08B4 +0x08B5 +0x08B6 +0x08B7 +0x08B8 +0x08B9 +0x08BC +0x08BD +0x08BE +0x08BF +0x08C0 +0x08C1 +0x08C2 +0x08C3 +0x08C4 +0x08C5 +0x08C6 +0x08C7 +0x08C8 +0x08C9 +0x08CA +0x08CC +0x08CD +0x08CE +0x08CF +0x08D0 +0x08D1 +0x08D2 +0x08D3 +0x1101 +0x1102 +0x1103 +0x1104 +0x1105 +0x1106 +0x1107 +0x1108 +0x1109 +0x110A +0x110B +0x110C +0x110D +0x110F +0x1111 +0x1112 +0x1113 +0x1114 XP-440 [Expression Home Small-in-One Printer] +0x1115 +0x1116 +0x1117 +0x1118 +0x1119 +0x111A +0x111B +0x111C +0x111D +0x111E +0x111F +0x1120 +0x1121 +0x1122 +0x1123 +0x1125 +0x1126 +0x1127 +0x1128 *** 3289 LINES SKIPPED ***