diff --git a/graphics/Makefile b/graphics/Makefile index 8d0ce3dcf3d8..a9df4c0a0080 100644 --- a/graphics/Makefile +++ b/graphics/Makefile @@ -1,1182 +1,1184 @@ COMMENT = Graphics tools and libraries SUBDIR += 4va SUBDIR += Coin SUBDIR += GraphicsMagick SUBDIR += Hermes SUBDIR += IPA SUBDIR += ImageMagick6 SUBDIR += ImageMagick6-nox11 SUBDIR += ImageMagick7 SUBDIR += ImageMagick7-nox11 SUBDIR += O2-tools SUBDIR += R-cran-DiagrammeR SUBDIR += R-cran-GDD SUBDIR += R-cran-RColorBrewer SUBDIR += R-cran-colorspace SUBDIR += R-cran-diagram SUBDIR += R-cran-dichromat SUBDIR += R-cran-dygraphs SUBDIR += R-cran-farver SUBDIR += R-cran-ggplot2 SUBDIR += R-cran-ggrepel SUBDIR += R-cran-gridBase SUBDIR += R-cran-gridExtra SUBDIR += R-cran-jpeg SUBDIR += R-cran-munsell SUBDIR += R-cran-pROC SUBDIR += R-cran-pixmap SUBDIR += R-cran-png SUBDIR += R-cran-qcc SUBDIR += R-cran-rgdal SUBDIR += R-cran-rtiff SUBDIR += R-cran-s2 SUBDIR += R-cran-scales SUBDIR += R-cran-shape SUBDIR += R-cran-viridis SUBDIR += R-cran-viridisLite SUBDIR += R-cran-visNetwork SUBDIR += SciPlot SUBDIR += a2png SUBDIR += aalib SUBDIR += aaphoto SUBDIR += acidwarp SUBDIR += acidwarp-sdl SUBDIR += agg SUBDIR += airsaned SUBDIR += akira SUBDIR += alembic SUBDIR += aloadimage SUBDIR += alpng SUBDIR += ampasACES-container SUBDIR += ampasCTL SUBDIR += animorph SUBDIR += ansilove SUBDIR += anttweakbar SUBDIR += aoi SUBDIR += apngasm SUBDIR += apngdis SUBDIR += appleseed SUBDIR += argyllcms SUBDIR += art SUBDIR += asciio SUBDIR += aseprite SUBDIR += atril SUBDIR += atril-lite SUBDIR += autopano-sift-c SUBDIR += autotrace SUBDIR += aview SUBDIR += avir SUBDIR += azpainter SUBDIR += azpainterb SUBDIR += barcode SUBDIR += batik SUBDIR += birdfont SUBDIR += bitmap SUBDIR += blend2d SUBDIR += blender SUBDIR += blender-doc SUBDIR += blender-lts28 SUBDIR += blender-lts29 SUBDIR += bmeps SUBDIR += bmp2html SUBDIR += bonzomatic SUBDIR += box SUBDIR += brunsli SUBDIR += bsd-plotutils SUBDIR += c-a-i-r SUBDIR += cadubi SUBDIR += cairo SUBDIR += cairomm SUBDIR += cal3d SUBDIR += camera SUBDIR += camerakit SUBDIR += cbonsai SUBDIR += cbviewer SUBDIR += cegui SUBDIR += cenon SUBDIR += cfdg SUBDIR += chafa SUBDIR += charls SUBDIR += cimg SUBDIR += cloudcompare SUBDIR += clutter SUBDIR += clutter-gtk3 SUBDIR += cluttermm SUBDIR += cogl SUBDIR += colmap SUBDIR += colord SUBDIR += colord-gtk SUBDIR += comical SUBDIR += compupic SUBDIR += converseen SUBDIR += corrupter SUBDIR += cosmoplayer SUBDIR += cptutils SUBDIR += crw SUBDIR += curator SUBDIR += curtail SUBDIR += cuttlefish SUBDIR += darktable SUBDIR += dataplot SUBDIR += dbow2 SUBDIR += dc20pack SUBDIR += dcmtk SUBDIR += dcp2icc SUBDIR += dcraw SUBDIR += dcraw-m SUBDIR += delaboratory SUBDIR += derelict-gl3 SUBDIR += devil SUBDIR += dia SUBDIR += diff-pdf SUBDIR += diffpdf SUBDIR += digikam SUBDIR += dilay SUBDIR += ditaa SUBDIR += djview4 SUBDIR += djvulibre SUBDIR += dmtx-utils SUBDIR += drawing SUBDIR += drawpile SUBDIR += drm-current-kmod SUBDIR += drm-devel-kmod SUBDIR += drm-fbsd12.0-kmod SUBDIR += drm-fbsd13-kmod SUBDIR += drm-kmod SUBDIR += drm_info SUBDIR += dspdfviewer SUBDIR += dssim SUBDIR += duhdraw SUBDIR += dust3d SUBDIR += dynamechs SUBDIR += ebsynth SUBDIR += edje_viewer SUBDIR += egl-wayland SUBDIR += eglexternalplatform SUBDIR += electricsheep SUBDIR += elementary-photos SUBDIR += embree SUBDIR += enblend SUBDIR += engauge-digitizer SUBDIR += entangle SUBDIR += eog SUBDIR += eog-plugins SUBDIR += eom SUBDIR += eos-movrec SUBDIR += epdfview SUBDIR += ephoto SUBDIR += epix SUBDIR += eps2png + SUBDIR += epsonscan2 + SUBDIR += epsonscan2-non-free-plugin SUBDIR += epstool SUBDIR += eterm-bg SUBDIR += evince SUBDIR += evolvotron SUBDIR += exif SUBDIR += exifprobe SUBDIR += exiftags SUBDIR += exiftran SUBDIR += exiv2 SUBDIR += exrtools SUBDIR += f3d SUBDIR += facedetect SUBDIR += farbfeld SUBDIR += feh SUBDIR += fig2sxd SUBDIR += figurine SUBDIR += filmulator SUBDIR += flam3 SUBDIR += flasm SUBDIR += flif SUBDIR += flphoto SUBDIR += fly SUBDIR += fortytwo SUBDIR += fotofix SUBDIR += fotoxx SUBDIR += founts SUBDIR += fpc-cairo SUBDIR += fpc-graph SUBDIR += fpc-hermes SUBDIR += fpc-imagemagick SUBDIR += fpc-libgd SUBDIR += fpc-libpng SUBDIR += fpc-ncurses SUBDIR += fpc-opengl SUBDIR += fpc-pasjpeg SUBDIR += fpc-proj4 SUBDIR += fpc-rsvg SUBDIR += fpc-svgalib SUBDIR += fpc-vcl-compat SUBDIR += fracplanet SUBDIR += fractgen SUBDIR += fraqtive SUBDIR += freeglut SUBDIR += freeimage SUBDIR += freetype-gl SUBDIR += frei0r SUBDIR += frei0r-plugins SUBDIR += frei0r-plugins-gavl SUBDIR += frei0r-plugins-opencv SUBDIR += frogr SUBDIR += ftgl SUBDIR += fusefs-gphotofs SUBDIR += fv SUBDIR += fyre SUBDIR += g2 SUBDIR += gauche-gl SUBDIR += gcolor2 SUBDIR += gcolor3 SUBDIR += gd SUBDIR += gdal SUBDIR += gdchart SUBDIR += gdk-pixbuf2 SUBDIR += gdtclft SUBDIR += geeqie SUBDIR += gegl SUBDIR += geoapi SUBDIR += geomorph SUBDIR += geomview SUBDIR += geos SUBDIR += geoserver SUBDIR += gexiv2 SUBDIR += giblib SUBDIR += giflib SUBDIR += gifmerge SUBDIR += gifsicle SUBDIR += gifski SUBDIR += giftool SUBDIR += gimageview SUBDIR += gimmage SUBDIR += gimp SUBDIR += gimp-app SUBDIR += gimp-beautify-plugin SUBDIR += gimp-data-extras SUBDIR += gimp-gmic-plugin SUBDIR += gimp-jxl-plugin SUBDIR += gimp-lensfun-plugin SUBDIR += gimp-lqr-plugin SUBDIR += gimp-refocus-plugin SUBDIR += gimp-resynthesizer SUBDIR += gkrellkam2 SUBDIR += glad SUBDIR += glaxnimate SUBDIR += glbinding SUBDIR += gle SUBDIR += glee SUBDIR += glew SUBDIR += glew-wayland SUBDIR += glexcess SUBDIR += glfw SUBDIR += glfw2 SUBDIR += gliv SUBDIR += glosm SUBDIR += glpng SUBDIR += glslang SUBDIR += gltt SUBDIR += glx-utils SUBDIR += gmic SUBDIR += gmic-qt SUBDIR += gmt SUBDIR += gmt-dcw SUBDIR += gmt-gshhg SUBDIR += gnash SUBDIR += gnome-color-manager SUBDIR += gnome-video-effects SUBDIR += gocr SUBDIR += goocanvas SUBDIR += goocanvas2 SUBDIR += goocanvas3 SUBDIR += goocanvasmm2 SUBDIR += goom SUBDIR += gource SUBDIR += gpaint SUBDIR += gphoto2 SUBDIR += gpicview SUBDIR += gpsmanshp SUBDIR += gpu-firmware-kmod SUBDIR += gpxsee SUBDIR += gracula SUBDIR += grads SUBDIR += grafx2 SUBDIR += graphene SUBDIR += graphite2 SUBDIR += graphos SUBDIR += graphviz SUBDIR += grx SUBDIR += gscan2pdf SUBDIR += gstreamer1-plugins-aalib SUBDIR += gstreamer1-plugins-cairo SUBDIR += gstreamer1-plugins-gdkpixbuf SUBDIR += gstreamer1-plugins-gl SUBDIR += gstreamer1-plugins-jpeg SUBDIR += gstreamer1-plugins-kms SUBDIR += gstreamer1-plugins-libcaca SUBDIR += gstreamer1-plugins-libvisual SUBDIR += gstreamer1-plugins-opencv SUBDIR += gstreamer1-plugins-openexr SUBDIR += gstreamer1-plugins-openjpeg SUBDIR += gstreamer1-plugins-png SUBDIR += gstreamer1-plugins-qt SUBDIR += gstreamer1-plugins-rsvg SUBDIR += gstreamer1-plugins-vulkan SUBDIR += gstreamer1-plugins-webp SUBDIR += gstreamer1-plugins-zbar SUBDIR += gthumb SUBDIR += gtimelapse SUBDIR += gtk-update-icon-cache SUBDIR += gtkam SUBDIR += gts SUBDIR += guetzli SUBDIR += guile-cairo SUBDIR += guilib SUBDIR += gwenview SUBDIR += h3 SUBDIR += hdr_tools SUBDIR += heimer SUBDIR += hiptext SUBDIR += hobbes-icons-xpm SUBDIR += hppsmtools SUBDIR += hugin SUBDIR += icat SUBDIR += icc-profiles-adobe-cs4 SUBDIR += icc-profiles-basiccolor SUBDIR += icc-profiles-openicc SUBDIR += iccxml SUBDIR += icon-slicer SUBDIR += icontact SUBDIR += icoutils SUBDIR += ida SUBDIR += iec16022 SUBDIR += iiview SUBDIR += ikona SUBDIR += imageindex SUBDIR += imageviewer SUBDIR += imageworsener SUBDIR += imc SUBDIR += imlib2 SUBDIR += imlib2-jxl SUBDIR += imlib2-webp SUBDIR += imlib2_loaders SUBDIR += impressive SUBDIR += imv SUBDIR += inkscape SUBDIR += instant-meshes SUBDIR += intel-backlight SUBDIR += intergif SUBDIR += ipe SUBDIR += jalbum SUBDIR += jasper SUBDIR += jave6 SUBDIR += jbig2dec SUBDIR += jbigkit SUBDIR += jdraw SUBDIR += jgraph SUBDIR += jhead SUBDIR += jogamp-jogl SUBDIR += jogl SUBDIR += jp SUBDIR += jp2a SUBDIR += jpatch SUBDIR += jpeg-turbo SUBDIR += jpeginfo SUBDIR += jpegoptim SUBDIR += jpgtn SUBDIR += jslice SUBDIR += kamera SUBDIR += kamerka SUBDIR += katarakt SUBDIR += kcolorchooser SUBDIR += kcolorpicker SUBDIR += kdegraphics SUBDIR += kdegraphics-mobipocket SUBDIR += kdegraphics-svgpart SUBDIR += kdegraphics-thumbnailers SUBDIR += kdiagram SUBDIR += kf5-kimageformats SUBDIR += kf5-kplotting SUBDIR += kf5-kquickcharts SUBDIR += kf5-prison SUBDIR += kgeotag SUBDIR += kgraphviewer SUBDIR += kimageannotator SUBDIR += kimagemapeditor SUBDIR += kipi-plugins SUBDIR += klatexformula SUBDIR += kludge3d SUBDIR += kmscube SUBDIR += knotter SUBDIR += kolourpaint SUBDIR += kontrast SUBDIR += kooka SUBDIR += kphotoalbum SUBDIR += kqtquickcharts SUBDIR += kquickimageeditor SUBDIR += krita SUBDIR += kseexpr SUBDIR += ksnip SUBDIR += kxstitch SUBDIR += l2p SUBDIR += largetifftools SUBDIR += laternamagica SUBDIR += lazpaint SUBDIR += lcdtest SUBDIR += lcms SUBDIR += lcms2 SUBDIR += leafpak SUBDIR += lensfun SUBDIR += lepton SUBDIR += leptonica SUBDIR += lerc SUBDIR += lfview SUBDIR += lib3ds SUBDIR += libGLU SUBDIR += libQGLViewer SUBDIR += libafterimage SUBDIR += libansilove SUBDIR += libart_lgpl SUBDIR += libavif SUBDIR += libboard SUBDIR += libbpg SUBDIR += libcaca SUBDIR += libcdr01 SUBDIR += libchamplain SUBDIR += libdmtx SUBDIR += libdrm SUBDIR += libecwj2 SUBDIR += libemf SUBDIR += libepoxy SUBDIR += libetonyek01 SUBDIR += libexif SUBDIR += libexif-gtk SUBDIR += libfpx SUBDIR += libfreehand SUBDIR += libgeotiff SUBDIR += libgfx SUBDIR += libgltext SUBDIR += libgltf SUBDIR += libglvnd SUBDIR += libgnomecanvas SUBDIR += libgnomecanvasmm26 SUBDIR += libgphoto2 SUBDIR += libgxps SUBDIR += libheif SUBDIR += libimagequant SUBDIR += libimg SUBDIR += libiptcdata SUBDIR += libjpeg-turbo SUBDIR += libjxl SUBDIR += libjxr SUBDIR += libkdcraw SUBDIR += libkexiv2 SUBDIR += libkipi SUBDIR += libksane SUBDIR += libliftoff SUBDIR += liblqr-1 SUBDIR += liblug SUBDIR += libmng SUBDIR += libmorph SUBDIR += libmypaint SUBDIR += libnsbmp SUBDIR += libnsgif SUBDIR += libopenraw SUBDIR += libosmesa SUBDIR += libpano13 SUBDIR += libpcd SUBDIR += libpgf SUBDIR += libpillowfight SUBDIR += libplacebo SUBDIR += libpotrace SUBDIR += libprojectm SUBDIR += libpuzzle SUBDIR += libqrencode SUBDIR += librasterlite2 SUBDIR += libraw SUBDIR += librsvg2 SUBDIR += librsvg2-rust SUBDIR += librtprocess SUBDIR += libsixel SUBDIR += libspiro SUBDIR += libspng SUBDIR += libsvg SUBDIR += libsvg-cairo SUBDIR += libvisual SUBDIR += libvisual04 SUBDIR += libvisual04-plugins SUBDIR += libwmf SUBDIR += libwmf-nox11 SUBDIR += libwpg03 SUBDIR += libyuv SUBDIR += libzmf SUBDIR += lightzone SUBDIR += linplasma SUBDIR += linux-c7-cairo SUBDIR += linux-c7-cairo-gobject SUBDIR += linux-c7-dri SUBDIR += linux-c7-gdk-pixbuf2 SUBDIR += linux-c7-glx-utils SUBDIR += linux-c7-graphite2 SUBDIR += linux-c7-jasper SUBDIR += linux-c7-jbigkit SUBDIR += linux-c7-jpeg SUBDIR += linux-c7-libdrm SUBDIR += linux-c7-libepoxy SUBDIR += linux-c7-libglvnd SUBDIR += linux-c7-librsvg2 SUBDIR += linux-c7-png SUBDIR += linux-c7-sdl_image SUBDIR += linux-c7-sdl_ttf SUBDIR += linux-c7-tiff SUBDIR += linux-c7-wayland SUBDIR += lua-gd SUBDIR += lux SUBDIR += luminance-qt5 SUBDIR += lximage-qt SUBDIR += magnum SUBDIR += magnum-examples SUBDIR += magnum-extras SUBDIR += magnum-plugins SUBDIR += mahotas SUBDIR += maim SUBDIR += mandelbulber SUBDIR += mapcache SUBDIR += mapserver SUBDIR += mapyrus SUBDIR += matplotplusplus SUBDIR += megapov SUBDIR += meh SUBDIR += mesa-demos SUBDIR += mesa-devel SUBDIR += mesa-dri SUBDIR += mesa-gallium-va SUBDIR += mesa-gallium-vdpau SUBDIR += mesa-gallium-xa SUBDIR += mesa-libs SUBDIR += metacam SUBDIR += metapixel SUBDIR += milton SUBDIR += minder SUBDIR += ming SUBDIR += mirtk SUBDIR += movit SUBDIR += mozjpeg SUBDIR += mscgen SUBDIR += mtpaint SUBDIR += multican SUBDIR += mupdf SUBDIR += mxp SUBDIR += mypaint SUBDIR += mypaint-brushes SUBDIR += mypaint-brushes2 SUBDIR += nanort SUBDIR += nanosvg SUBDIR += netpbm SUBDIR += nip2 SUBDIR += nomacs SUBDIR += nplot SUBDIR += npretty SUBDIR += nsxiv SUBDIR += nurbs++ SUBDIR += nvidia-texture-tools SUBDIR += ocaml-images SUBDIR += ocaml-lablgl SUBDIR += ocrad SUBDIR += ogre3d SUBDIR += ogre3d19 SUBDIR += oidn SUBDIR += okular SUBDIR += open3d SUBDIR += opencollada SUBDIR += opencolorio SUBDIR += opencolorio-tools SUBDIR += opencoloriov1 SUBDIR += opencsg SUBDIR += opencv SUBDIR += opendx SUBDIR += openexr SUBDIR += openfx-arena SUBDIR += openfx-misc SUBDIR += opengl-man SUBDIR += opengv SUBDIR += openicc-config SUBDIR += openimageio SUBDIR += openimageio-ociov1 SUBDIR += openjpeg SUBDIR += openjpeg15 SUBDIR += openjph SUBDIR += openjump SUBDIR += opennurbs SUBDIR += openorienteering-mapper SUBDIR += openrm SUBDIR += openshadinglanguage SUBDIR += opensubdiv SUBDIR += openvkl SUBDIR += optar SUBDIR += optipng SUBDIR += osg SUBDIR += osg34 SUBDIR += osgearth SUBDIR += ospray SUBDIR += ospray-studio SUBDIR += ossim SUBDIR += oyranos SUBDIR += p5-Acme-Steganography-Image-Png SUBDIR += p5-Algorithm-Line-Bresenham SUBDIR += p5-Alien-Gimp SUBDIR += p5-Barcode-ZBar SUBDIR += p5-CAD-Drawing SUBDIR += p5-CAD-Drawing-Template SUBDIR += p5-Cairo SUBDIR += p5-Captcha-reCAPTCHA SUBDIR += p5-Captcha-reCAPTCHA-Mailhide SUBDIR += p5-Chart SUBDIR += p5-Chart-Clicker SUBDIR += p5-Chart-Gnuplot SUBDIR += p5-Chart-Graph SUBDIR += p5-Chart-PNGgraph SUBDIR += p5-Color-Calc SUBDIR += p5-Color-Library SUBDIR += p5-Color-Palette SUBDIR += p5-Color-Rgb SUBDIR += p5-Color-Scheme SUBDIR += p5-Convert-Color SUBDIR += p5-Convert-Color-XTerm SUBDIR += p5-Data-Google-Visualization-DataSource SUBDIR += p5-Data-Google-Visualization-DataTable SUBDIR += p5-GD SUBDIR += p5-GD-Arrow SUBDIR += p5-GD-Barcode SUBDIR += p5-GD-Graph SUBDIR += p5-GD-Graph-histogram SUBDIR += p5-GD-Graph-ohlc SUBDIR += p5-GD-Graph3d SUBDIR += p5-GD-SVG SUBDIR += p5-GD-TextUtil SUBDIR += p5-GD-Thumbnail SUBDIR += p5-Geo-EOP SUBDIR += p5-Geo-GDAL SUBDIR += p5-Geo-GDAL-FFI SUBDIR += p5-Geo-GML SUBDIR += p5-Geo-Gpx SUBDIR += p5-Geometry-Primitive SUBDIR += p5-Gimp SUBDIR += p5-Google-Chart SUBDIR += p5-Graph-Easy SUBDIR += p5-Graph-ReadWrite SUBDIR += p5-Graph-SocialMap SUBDIR += p5-Graph-Writer-GraphViz SUBDIR += p5-GraphViz SUBDIR += p5-GraphViz-Data-Structure SUBDIR += p5-GraphViz-Traverse SUBDIR += p5-GraphViz2 SUBDIR += p5-GraphViz2-DBI SUBDIR += p5-GraphViz2-Data-Grapher SUBDIR += p5-GraphViz2-Parse-ISA SUBDIR += p5-GraphViz2-Parse-RecDescent SUBDIR += p5-GraphViz2-Parse-XML SUBDIR += p5-Graphics-Color SUBDIR += p5-Graphics-ColorNames SUBDIR += p5-Graphics-ColorNames-WWW SUBDIR += p5-Graphics-ColorUtils SUBDIR += p5-Graphics-GnuplotIF SUBDIR += p5-Graphics-Primitive SUBDIR += p5-Graphics-Primitive-Driver-Cairo SUBDIR += p5-Graphics-TIFF SUBDIR += p5-Image-Base SUBDIR += p5-Image-Base-SVG SUBDIR += p5-Image-Caa SUBDIR += p5-Image-Compare SUBDIR += p5-Image-ExifTool SUBDIR += p5-Image-ExifTool-devel SUBDIR += p5-Image-Grab SUBDIR += p5-Image-Heatmap SUBDIR += p5-Image-IPTCInfo SUBDIR += p5-Image-Imgur SUBDIR += p5-Image-Imlib2 SUBDIR += p5-Image-Info SUBDIR += p5-Image-LibExif SUBDIR += p5-Image-Magick-Iterator SUBDIR += p5-Image-Math-Constrain SUBDIR += p5-Image-MetaData-GQview SUBDIR += p5-Image-MetaData-JPEG SUBDIR += p5-Image-OCR-Tesseract SUBDIR += p5-Image-ObjectDetect SUBDIR += p5-Image-PBMlib SUBDIR += p5-Image-PNG-Libpng SUBDIR += p5-Image-PNG-QRCode SUBDIR += p5-Image-Pngslimmer SUBDIR += p5-Image-Sane SUBDIR += p5-Image-Scale SUBDIR += p5-Image-Size SUBDIR += p5-Imager SUBDIR += p5-Imager-Graph SUBDIR += p5-Imager-Plot SUBDIR += p5-Imager-QRCode SUBDIR += p5-Imlib2 SUBDIR += p5-Layout-Manager SUBDIR += p5-OpenGL SUBDIR += p5-PGPLOT SUBDIR += p5-SVG-DOM2 SUBDIR += p5-SVG-Graph SUBDIR += p5-SVG-Metadata SUBDIR += p5-SWF-Builder SUBDIR += p5-SWF-File SUBDIR += p5-Sane SUBDIR += p5-SpringGraph SUBDIR += p5-Tk-JPEG-Lite SUBDIR += p5-URI-GoogleChart SUBDIR += p5-VCG SUBDIR += p5-Visio SUBDIR += p5-feedgnuplot SUBDIR += p5-ming SUBDIR += panoglview SUBDIR += panomatic SUBDIR += partio SUBDIR += pastel SUBDIR += pcl-pointclouds SUBDIR += pdf2svg SUBDIR += pdfpc SUBDIR += pear-Horde_Image SUBDIR += pear-Image_3D SUBDIR += pear-Image_Barcode SUBDIR += pear-Image_Barcode2 SUBDIR += pear-Image_Canvas SUBDIR += pear-Image_Color SUBDIR += pear-Image_Graph SUBDIR += pear-Image_GraphViz SUBDIR += pear-Image_Transform SUBDIR += pecl-imagick SUBDIR += pecl-imagick-im7 SUBDIR += pecl-qrencode SUBDIR += pecl-vips SUBDIR += pencil2d SUBDIR += peps SUBDIR += perceptualdiff SUBDIR += peruse SUBDIR += pfstools SUBDIR += pgplot SUBDIR += pho SUBDIR += photivo SUBDIR += photoflare SUBDIR += photoflow SUBDIR += photopc SUBDIR += photoqt SUBDIR += phototonic SUBDIR += php-facedetect SUBDIR += php-geos SUBDIR += php74-exif SUBDIR += php74-gd SUBDIR += php80-exif SUBDIR += php80-gd SUBDIR += php81-exif SUBDIR += php81-gd SUBDIR += phplot SUBDIR += picpuz SUBDIR += piddle SUBDIR += piglit SUBDIR += pikchr SUBDIR += pikopixel SUBDIR += pinpoint SUBDIR += pinta SUBDIR += pixd SUBDIR += pixelize SUBDIR += pixen SUBDIR += pixie SUBDIR += plasma-kmod SUBDIR += plotutils SUBDIR += png SUBDIR += png++ SUBDIR += png2html SUBDIR += png2ico SUBDIR += pngcheck SUBDIR += pngcrush SUBDIR += pnglite SUBDIR += pngnq SUBDIR += pngquant SUBDIR += pngrewrite SUBDIR += pngwriter SUBDIR += podofo SUBDIR += polyclipping SUBDIR += poppler SUBDIR += poppler-data SUBDIR += poppler-glib SUBDIR += poppler-qt5 SUBDIR += poppler-utils SUBDIR += potrace SUBDIR += povray-meta SUBDIR += povray36 SUBDIR += povray37 SUBDIR += povray38 SUBDIR += ppmcaption SUBDIR += ppminfo SUBDIR += ppsei SUBDIR += pqiv SUBDIR += preview SUBDIR += price SUBDIR += processing SUBDIR += proj SUBDIR += proj-data SUBDIR += pstoedit SUBDIR += ptex SUBDIR += py-OWSLib SUBDIR += py-PyOpenGL SUBDIR += py-PyOpenGL-accelerate SUBDIR += py-actdiag SUBDIR += py-altair SUBDIR += py-asciitree SUBDIR += py-beziers SUBDIR += py-blockdiag SUBDIR += py-blockdiagcontrib-cisco SUBDIR += py-box2d-py SUBDIR += py-cairo SUBDIR += py-cairocffi SUBDIR += py-cairosvg SUBDIR += py-cartopy SUBDIR += py-cogdumper SUBDIR += py-colour SUBDIR += py-descartes SUBDIR += py-django-easy-thumbnails SUBDIR += py-djvulibre SUBDIR += py-exifread SUBDIR += py-face_recognition SUBDIR += py-face_recognition_models SUBDIR += py-fiona SUBDIR += py-freeimagepy SUBDIR += py-gdal SUBDIR += py-geomdl SUBDIR += py-geopandas SUBDIR += py-giddy SUBDIR += py-gizeh SUBDIR += py-glfw SUBDIR += py-glooey SUBDIR += py-gphoto2 SUBDIR += py-graphviz SUBDIR += py-graphy SUBDIR += py-gvgen SUBDIR += py-h3 SUBDIR += py-hiplot SUBDIR += py-imageio SUBDIR += py-imageio-ffmpeg SUBDIR += py-imagesize SUBDIR += py-img2pdf SUBDIR += py-leather SUBDIR += py-mapclassify SUBDIR += py-mayavi SUBDIR += py-mcomix SUBDIR += py-mgwr SUBDIR += py-ming SUBDIR += py-momepy SUBDIR += py-mpl-interactions SUBDIR += py-mpl-scatter-density SUBDIR += py-nwdiag SUBDIR += py-open3d-python SUBDIR += py-opencolorio SUBDIR += py-openimageio SUBDIR += py-openshadinglanguage SUBDIR += py-osmnet SUBDIR += py-pandana SUBDIR += py-photocollage SUBDIR += py-piexif SUBDIR += py-pillow SUBDIR += py-pivy SUBDIR += py-plotly SUBDIR += py-png SUBDIR += py-pointpats SUBDIR += py-pycha SUBDIR += py-pycollada SUBDIR += py-pydot SUBDIR += py-pydotplus SUBDIR += py-pyepsg SUBDIR += py-pygal SUBDIR += py-pyganim SUBDIR += py-pygeoapi SUBDIR += py-pygeos SUBDIR += py-pyglet SUBDIR += py-pyglet150 SUBDIR += py-pygraph SUBDIR += py-pygraphviz SUBDIR += py-pyinsane2 SUBDIR += py-pymaging SUBDIR += py-pymaging-png SUBDIR += py-pyocr SUBDIR += py-pypillowfight SUBDIR += py-pyproj SUBDIR += py-pyqrcode SUBDIR += py-pyqtgraph SUBDIR += py-pyrsgis SUBDIR += py-pytesseract SUBDIR += py-python-poppler-qt5 SUBDIR += py-pyvips SUBDIR += py-pyx SUBDIR += py-qrencode SUBDIR += py-railroad-diagrams SUBDIR += py-rasterio SUBDIR += py-rasterstats SUBDIR += py-rawkit SUBDIR += py-s2 SUBDIR += py-scikit-image SUBDIR += py-seqdiag SUBDIR += py-sorl-thumbnail SUBDIR += py-spectra SUBDIR += py-svg.path SUBDIR += py-svgwrite SUBDIR += py-termtosvg SUBDIR += py-tifffile SUBDIR += py-toyplot SUBDIR += py-traitsui SUBDIR += py-ueberzug SUBDIR += py-urbanaccess SUBDIR += py-urbansim SUBDIR += py-utm SUBDIR += py-vecrec SUBDIR += py-visvis SUBDIR += py-wand SUBDIR += py-webcolors SUBDIR += py-willow SUBDIR += py-yaswfp SUBDIR += py-zbar-py SUBDIR += qcomicbook SUBDIR += qcustomplot-qt5 SUBDIR += qgis SUBDIR += qgis-ltr SUBDIR += qiv SUBDIR += qr-code-generator SUBDIR += qt5-3d SUBDIR += qt5-graphicaleffects SUBDIR += qt5-imageformats SUBDIR += qt5-opengl SUBDIR += qt5-pixeltool SUBDIR += qt5-svg SUBDIR += qt5-wayland SUBDIR += qtawesome SUBDIR += qtpbfimageplugin SUBDIR += qtqr SUBDIR += quat SUBDIR += quat-gui SUBDIR += quesa SUBDIR += quesoglc SUBDIR += quickqanava SUBDIR += qvge SUBDIR += radius-engine SUBDIR += rapid-photo-downloader SUBDIR += raster3d SUBDIR += rawstudio SUBDIR += rawtherapee SUBDIR += rayshade SUBDIR += reactphysics3d SUBDIR += reallyslick SUBDIR += realsr-ncnn-vulkan SUBDIR += recastnavigation SUBDIR += recoverjpeg SUBDIR += renrot SUBDIR += repng2jpeg SUBDIR += rgbpaint SUBDIR += rigsofrods-caelum SUBDIR += rigsofrods-pagedgeometry SUBDIR += ristretto SUBDIR += rlottie SUBDIR += ruby-gd SUBDIR += rubygem-cairo SUBDIR += rubygem-captcha SUBDIR += rubygem-chunky_png SUBDIR += rubygem-clutter SUBDIR += rubygem-clutter-gdk SUBDIR += rubygem-clutter-gtk SUBDIR += rubygem-dragonfly SUBDIR += rubygem-emoji SUBDIR += rubygem-exifr SUBDIR += rubygem-ezprint SUBDIR += rubygem-fastimage SUBDIR += rubygem-flamegraph SUBDIR += rubygem-gd2 SUBDIR += rubygem-gdk_pixbuf2 SUBDIR += rubygem-gemojione SUBDIR += rubygem-gemojione32 SUBDIR += rubygem-geokit SUBDIR += rubygem-gitlab_emoji SUBDIR += rubygem-gruff SUBDIR += rubygem-histogram SUBDIR += rubygem-image_processing SUBDIR += rubygem-image_science SUBDIR += rubygem-imagesize SUBDIR += rubygem-invisible_captcha SUBDIR += rubygem-mini_magick SUBDIR += rubygem-mini_magick410 SUBDIR += rubygem-objectdetect SUBDIR += rubygem-opengl SUBDIR += rubygem-pdfkit SUBDIR += rubygem-png SUBDIR += rubygem-railroad SUBDIR += rubygem-red-colors SUBDIR += rubygem-rmagick SUBDIR += rubygem-rsvg2 SUBDIR += rubygem-ruby-graphviz SUBDIR += rubygem-ruby-vips SUBDIR += rubygem-scruffy SUBDIR += rubygem-tanuki_emoji SUBDIR += rx SUBDIR += s10sh SUBDIR += s2 SUBDIR += s2tc SUBDIR += sage SUBDIR += sam2p SUBDIR += sampleicc SUBDIR += sane-airscan SUBDIR += sane-backends SUBDIR += sane-epkowa SUBDIR += scale2x SUBDIR += scantailor SUBDIR += scr2png SUBDIR += scrot SUBDIR += scwm-icons SUBDIR += sdl2_gfx SUBDIR += sdl2_image SUBDIR += sdl2_ttf SUBDIR += sdl_gfx SUBDIR += sdl_image SUBDIR += sdl_ttf SUBDIR += sdump SUBDIR += seejpeg SUBDIR += seexpr SUBDIR += sekrit-twc-zimg SUBDIR += seom SUBDIR += separate SUBDIR += seq2gif SUBDIR += shaderc SUBDIR += shared-color-profiles SUBDIR += sharpconstruct SUBDIR += shotwell SUBDIR += showimage SUBDIR += silgraphite SUBDIR += simage SUBDIR += simple-scan SUBDIR += simpleviewer SUBDIR += skanlite SUBDIR += skanpage SUBDIR += spectacle SUBDIR += spirv-tools SUBDIR += springgraph SUBDIR += squish SUBDIR += ssocr SUBDIR += sswf SUBDIR += stamp SUBDIR += svg2pdf SUBDIR += svg2png SUBDIR += svgalib SUBDIR += svgbob SUBDIR += swappy SUBDIR += swfmill SUBDIR += swftools SUBDIR += synaesthesia SUBDIR += synfig SUBDIR += synfigstudio SUBDIR += tachyon SUBDIR += telak SUBDIR += tesseract SUBDIR += tesseract-data SUBDIR += tgif SUBDIR += tif22pnm SUBDIR += tiff SUBDIR += tiffgt SUBDIR += tifmerge SUBDIR += tikzit SUBDIR += tiled SUBDIR += timeless SUBDIR += timg SUBDIR += tintfu SUBDIR += tinyows SUBDIR += tkpng SUBDIR += togl SUBDIR += tslib SUBDIR += ttygif SUBDIR += ttyplot SUBDIR += tumble SUBDIR += tweeny SUBDIR += ufraw SUBDIR += unpaper SUBDIR += urho3d SUBDIR += urt SUBDIR += vapoursynth-fmtconv SUBDIR += vapoursynth-waifu2x-ncnn-vulkan SUBDIR += vapoursynth-waifu2x-w2xc SUBDIR += variety SUBDIR += vcg SUBDIR += viewnior SUBDIR += vigra SUBDIR += vips SUBDIR += visprint SUBDIR += viu SUBDIR += vkd3d SUBDIR += volpack SUBDIR += vp SUBDIR += vpaint SUBDIR += vulkan-caps-viewer SUBDIR += vulkan-extension-layer SUBDIR += vulkan-headers SUBDIR += vulkan-loader SUBDIR += vulkan-tools SUBDIR += vulkan-validation-layers SUBDIR += vv SUBDIR += waffle SUBDIR += waifu2x-converter-cpp SUBDIR += waifu2x-ncnn-vulkan SUBDIR += wayland SUBDIR += wayland-protocols SUBDIR += wayland-utils SUBDIR += waylandpp SUBDIR += wdune SUBDIR += webp SUBDIR += webp-pixbuf-loader SUBDIR += wings SUBDIR += wmicons SUBDIR += wrapland SUBDIR += wxsvg SUBDIR += xaos SUBDIR += xbmbrowser SUBDIR += xcftools SUBDIR += xd3d SUBDIR += xdgagrab SUBDIR += xface.el SUBDIR += xfig SUBDIR += xfpovray SUBDIR += xfractint SUBDIR += xglurbules SUBDIR += xgrasp SUBDIR += xli SUBDIR += xmedcon SUBDIR += xmlgraphics-commons SUBDIR += xmountains SUBDIR += xnview SUBDIR += xoris SUBDIR += xournal SUBDIR += xournalpp SUBDIR += xpaint SUBDIR += xpdf SUBDIR += xpdf3 SUBDIR += xpdf4 SUBDIR += xpeps SUBDIR += xpx SUBDIR += xsane SUBDIR += xsvg SUBDIR += xtexcad SUBDIR += xv SUBDIR += xv-m17n SUBDIR += xviewer SUBDIR += xwpick SUBDIR += xzgv SUBDIR += yacreader SUBDIR += yafaray SUBDIR += yed SUBDIR += yukon SUBDIR += zathura SUBDIR += zathura-cb SUBDIR += zathura-djvu SUBDIR += zathura-pdf-mupdf SUBDIR += zathura-pdf-poppler SUBDIR += zathura-ps SUBDIR += zbar SUBDIR += zgv SUBDIR += zimg SUBDIR += zint SUBDIR += zphoto .include 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 +0x1129 ET-4750 [WorkForce ET-4750 EcoTank All-in-One] +0x112A +0x112B +0x112C +0x112D +0x112E +0x112F +0x1130 +0x1131 +0x1132 +0x1133 +0x1134 +0x1135 +0x1136 +0x1137 +0x1138 +0x1139 +0x113A +0x113B +0x113C +0x113D +0x113E +0x113F +0x1140 +0x1141 +0x1142 +0x1143 +0x1145 +0x1146 +0x1147 +0x1148 +0x1149 +0x114A +0x114B +0x114C +0x114D +0x114E +0x114F +0x1150 +0x1151 +0x1152 +0x1153 +0x1154 +0x1155 WorkForce ST-3000 Series +0x1156 +0x1157 +0x1158 +0x1159 +0x115A +0x115B +0x115C +0x115D +0x115E +0x115F +0x1160 +0x1161 +0x1162 +0x1163 +0x1164 +0x1165 +0x1166 +0x1167 +0x1168 Workforce WF-7820/7840 Series +0x1169 +0x116A +0x116B +0x116C +0x116D +0x116E +0x116F +0x1170 +0x1171 +0x1172 +0x1173 +0x1174 +0x1175 +0x1176 +0x1177 +0x117A +0x117B +0x117C +0x117D +0x117E +0x117F +0x1180 +0x1181 +0x1182 +0x1183 +0x1184 +0x1185 +0x1186 +0x1187 +0x1188 +0x1189 +0x118A +0x118B +0x118C +0x118D +0x118E +0x118F +0x1190 +0x1191 +0x1192 +0x1193 +0x1194 +0x1195 +0x1196 +0x1197 +0x1198 +0x1199 +0x119A +0x119B +0x119C +0x119D +0x119E +0x119F +0x11A0 +0x11A1 +0x11A2 +0x11A3 +0x11A4 +0x11A5 +0x11A6 +0x11A7 +0x11A8 +0x11A9 +0x11AA +0x11AB +0x11AE +0x11AF +0x11B0 +0x11B1 +0x11B2 +0x11B3 + +End diff --git a/graphics/epsonscan2/files/patch-CMakeLists.txt b/graphics/epsonscan2/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..90c8cdb4fce5 --- /dev/null +++ b/graphics/epsonscan2/files/patch-CMakeLists.txt @@ -0,0 +1,57 @@ +--- CMakeLists.txt.orig 2021-11-25 00:57:03 UTC ++++ CMakeLists.txt +@@ -18,7 +18,6 @@ + # along with this package. If not, see . + + 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}") + message(" Boost_LIBRARIES: ${Boost_LIBRARIES}") + message(" Boost_LIBRARY_DIRS: ${Boost_LIBRARY_DIRS}") + ++### USB library ############## ++ ++if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") ++set(usb_LIBRARY "usb") ++else() ++set(usb_LIBRARY "usb-1.0") ++endif() ++ + ############################## + + #### Dependents package ###### +@@ -87,7 +94,11 @@ set(COMMON_ETC_PATH ${CMAKE_INSTALL_FULL_SYSCONFDIR}) + set(EPSON_WORK_PATH /tmp/epsonWork/) + set(EPSON_SETTINGS_PATH $ENV{HOME}/.epsonscan2/) + ++if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") ++set (CMAKE_INSTALL_PREFIX /usr/local) ++else() + SET (CMAKE_INSTALL_PREFIX /usr) ++endif() + set(EPSON_INSTALL_PATH ${CMAKE_INSTALL_FULL_LIBDIR}/epsonscan2/) + set(COMMON_SHARE_PATH ${CMAKE_INSTALL_FULL_DATAROOTDIR}) + +@@ -114,11 +125,19 @@ add_subdirectory(src) + + install(DIRECTORY Resources DESTINATION ${EPSON_INSTALL_ROOT}${EPSON_INSTALL_PATH}) + ++if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") ++install(FILES epsonscan2.rules DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/udev/rules.d/ RENAME 60-epsonscan2.rules) ++install(FILES epsonscan2 DESTINATION ${CMAKE_INSTALL_PREFIX}/etc/sane.d/dll.d) ++install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory $ENV{STAGEDIR}${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_FULL_LIBDIR}/sane/)") ++install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ../epsonscan2/libsane-epsonscan2.so $ENV{STAGEDIR}${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_FULL_LIBDIR}/sane/libsane-epsonscan2.so.1)") ++install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ../epsonscan2/libsane-epsonscan2.so $ENV{STAGEDIR}${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_FULL_LIBDIR}/sane/libsane-epsonscan2.so.1.0.0)") ++else() + install(FILES epsonscan2.rules DESTINATION ${EPSON_INSTALL_ROOT}/lib/udev/rules.d/ RENAME 60-epsonscan2.rules) + install(FILES epsonscan2 DESTINATION ${EPSON_INSTALL_ROOT}/etc/sane.d/dll.d) + install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_FULL_LIBDIR}/sane/)") + install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ../epsonscan2/libsane-epsonscan2.so ${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_FULL_LIBDIR}/sane/libsane-epsonscan2.so.1)") + install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ../epsonscan2/libsane-epsonscan2.so ${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_FULL_LIBDIR}/sane/libsane-epsonscan2.so.1.0.0)") ++endif() + + install(FILES changelog.Debian DESTINATION ${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_PREFIX}/share/doc/epsonscan2${EPSON_VERSION}) + diff --git a/graphics/epsonscan2/files/patch-src_CommonUtility_DbgLog.cpp b/graphics/epsonscan2/files/patch-src_CommonUtility_DbgLog.cpp new file mode 100644 index 000000000000..b4e8e0bfd21d --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_CommonUtility_DbgLog.cpp @@ -0,0 +1,21 @@ +--- src/CommonUtility/DbgLog.cpp.orig 2021-11-25 00:56:55 UTC ++++ src/CommonUtility/DbgLog.cpp +@@ -34,6 +34,9 @@ + #ifdef __ANDROID__ + #include + #endif ++#if __FreeBSD__ ++#include ++#endif + #if TARGET_OS_IPHONE + #include + #endif +@@ -87,6 +90,8 @@ GetCurrentThreadId(void) + { + #if TARGET_OS_IPHONE + return (DWORD)pthread_mach_thread_np(pthread_self()); ++#elif __FreeBSD__ ++ 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 new file mode 100644 index 000000000000..805a5c42bbb2 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_CommonUtility_utils_ESAnyCastUtils.h @@ -0,0 +1,28 @@ +--- src/CommonUtility/utils/ESAnyCastUtils.h.orig 2021-11-25 00:56:55 UTC ++++ src/CommonUtility/utils/ESAnyCastUtils.h +@@ -141,7 +141,11 @@ const T* SafeAnyDataCPtr( const ESAny& anyIn ) + template< typename T > + T* SafeAnyDataPtr_WithLog( ESAny& anyIn, ES_CHAR_CPTR lpszFile = __ES_FILE__, const int nLine = __LINE__ ) + { +- if( anyIn.empty() || (anyIn.type() != typeid(T)) ){ ++ // XXX changed to a string comparison of the type name here because, on FreeBSD, the hash_code()s for anyIn.type() and typeid(T) are differing for T = ESDictionary ++ // even though the names of the types are the same! ++ // It should work as it was. It is not efficient now. Why are the type hash_code()s different on FreeBSD?? ++ // was: if( anyIn.empty() || (anyIn.type() != typeid(T)) ){ ++ if( anyIn.empty() || ES_CMN_FUNCS::STRING::ToESString(anyIn.type().name()).compare(ES_CMN_FUNCS::STRING::ToESString(typeid(T).name())) != 0 ){ + 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 + template< typename T > + const T* SafeAnyDataCPtr_WithLog( const ESAny& anyIn, ES_CHAR_CPTR lpszFile = __ES_FILE__, const int nLine = __LINE__ ) + { +- if( anyIn.empty() || (anyIn.type() != typeid(T)) ){ ++ // XXX changed to a string comparison of the type name here because, on FreeBSD, the hash_code()s for anyIn.type() and typeid(T) are differing for T = ESDictionary ++ // even though the names of the types are the same! ++ // It should work as it was. It is not efficient now. Why are the type hash_code()s different on FreeBSD?? ++ // was: if( anyIn.empty() || (anyIn.type() != typeid(T)) ){ ++ if( anyIn.empty() || ES_CMN_FUNCS::STRING::ToESString(anyIn.type().name()).compare(ES_CMN_FUNCS::STRING::ToESString(typeid(T).name())) != 0 ){ + if(anyIn.empty()){ + ES_Warning_Log3( __ES_FUNCTION__, lpszFile, nLine, ES_STRING("Boost Any Cast Warning Empty!!")); + } else { diff --git a/graphics/epsonscan2/files/patch-src_CommonUtility_utils_ESFile.cpp b/graphics/epsonscan2/files/patch-src_CommonUtility_utils_ESFile.cpp new file mode 100644 index 000000000000..316223a0ea16 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_CommonUtility_utils_ESFile.cpp @@ -0,0 +1,12 @@ +--- src/CommonUtility/utils/ESFile.cpp.orig 2021-11-25 00:56:55 UTC ++++ src/CommonUtility/utils/ESFile.cpp +@@ -48,6 +48,9 @@ CESFile* CESFile::CreateFileInstanceWithPath(ESString + } + } + CESFile* CESFile::CreateTempFileInstanceWithPrefix( ESString strFolder, ESString strPrefix, ES_OPEN_MODE eOpenMode ){ ++ if (!ES_CMN_FUNCS::PATH::ES_IsWritableFolder(strFolder)) { ++ return FALSE; ++ } + try { + CESFile* pcFile = new CESFile(); + if( !pcFile->CreateTempFile(strFolder, strPrefix, eOpenMode) ){ diff --git a/graphics/epsonscan2/files/patch-src_CommonUtility_utils_PathUtils.cpp b/graphics/epsonscan2/files/patch-src_CommonUtility_utils_PathUtils.cpp new file mode 100644 index 000000000000..5ed82c1f98b9 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_CommonUtility_utils_PathUtils.cpp @@ -0,0 +1,10 @@ +--- src/CommonUtility/utils/PathUtils.cpp.orig 2021-11-25 00:56:55 UTC ++++ src/CommonUtility/utils/PathUtils.cpp +@@ -609,7 +609,6 @@ namespace ES_CMN_FUNCS + else + { + bResult = TRUE; +- break; + } + } + #endif diff --git a/graphics/epsonscan2/files/patch-src_Controller_CMakeLists.txt b/graphics/epsonscan2/files/patch-src_Controller_CMakeLists.txt new file mode 100644 index 000000000000..3f32ef5a613b --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Controller_CMakeLists.txt @@ -0,0 +1,11 @@ +--- src/Controller/CMakeLists.txt.orig 2021-11-25 00:56:54 UTC ++++ src/Controller/CMakeLists.txt +@@ -171,7 +171,7 @@ target_link_libraries( epsonscan2 + dl + commonutility + ${Boost_LIBRARIES} +- usb-1.0 ++ ${usb_LIBRARY} + ) + + install(TARGETS epsonscan2 DESTINATION ${EPSON_INSTALL_ROOT}${EPSON_INSTALL_PATH}) diff --git a/graphics/epsonscan2/files/patch-src_Controller_Src_EntryPoints.cpp b/graphics/epsonscan2/files/patch-src_Controller_Src_EntryPoints.cpp new file mode 100644 index 000000000000..921c107f4320 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Controller_Src_EntryPoints.cpp @@ -0,0 +1,11 @@ +--- src/Controller/Src/EntryPoints.cpp.orig 2021-11-25 00:56:59 UTC ++++ src/Controller/Src/EntryPoints.cpp +@@ -346,6 +346,8 @@ SDIError SDIScannerDriver_GetNextTransferEvent(SDIScan + } + } + break; ++ case kEventTypePaperJam: ++ break; + } + if (outError) + { diff --git a/graphics/epsonscan2/files/patch-src_Controller_Src_FileFormat_FFManager.cpp b/graphics/epsonscan2/files/patch-src_Controller_Src_FileFormat_FFManager.cpp new file mode 100644 index 000000000000..e6403f5cc97d --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Controller_Src_FileFormat_FFManager.cpp @@ -0,0 +1,12 @@ +--- src/Controller/Src/FileFormat/FFManager.cpp.orig 2021-11-25 00:56:58 UTC ++++ src/Controller/Src/FileFormat/FFManager.cpp +@@ -176,6 +176,9 @@ namespace epsonscan + return kFKWriterTypePnm; + case kSDIImageFormatBMP: + return kFKWriterTypeBmp; ++ case kSDIImageFormatRaw: ++ case kSDIImageFormatColorJpegMonoPNM: ++ break; + } + 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 new file mode 100644 index 000000000000..68f1592dd27f --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Controller_Src_Filter_DTR.cpp @@ -0,0 +1,21 @@ +--- src/Controller/Src/Filter/DTR.cpp.orig 2021-11-25 00:56:57 UTC ++++ src/Controller/Src/Filter/DTR.cpp +@@ -26,6 +26,9 @@ + #include + #include + #include ++#if __FreeBSD__ ++#include ++#endif + namespace epsonscan + { + static const int kMaxBuf = 256; +@@ -409,7 +412,7 @@ ESNumber CustomSkipLevelAsPercent(ESNumber inLevel) + dtrExecCommand << " "; + dtrExecCommand << "0"; + dtrExecCommand << " "; +- dtrExecCommand << (keyMgr->GetValueInt(kSDIAutoColorPixelTypeKey) == kSDIAutoColorPixelTypeAuto) ? 1 : 0; ++ dtrExecCommand << ((keyMgr->GetValueInt(kSDIAutoColorPixelTypeKey) == kSDIAutoColorPixelTypeAuto) ? 1 : 0); + dtrExecCommand << " "; + dtrExecCommand << keyMgr->GetValueInt(kSDIAutoColorPixelLevelKey); + SDI_TRACE_LOG("dtrExecCommand = %s", dtrExecCommand.str().c_str()); diff --git a/graphics/epsonscan2/files/patch-src_Controller_Src_Filter_ProcOrientation.hpp b/graphics/epsonscan2/files/patch-src_Controller_Src_Filter_ProcOrientation.hpp new file mode 100644 index 000000000000..fff9dd20bb0b --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Controller_Src_Filter_ProcOrientation.hpp @@ -0,0 +1,10 @@ +--- src/Controller/Src/Filter/ProcOrientation.hpp.orig 2021-11-25 00:56:58 UTC ++++ src/Controller/Src/Filter/ProcOrientation.hpp +@@ -89,6 +89,7 @@ class ProcOrientation : public Filter (private) + } + break; + case kSDIOrientationNone: ++ case kSDIOrientationAuto: + break; + } + inDataBuf.FreeBuffer(); diff --git a/graphics/epsonscan2/files/patch-src_Controller_Src_Filter_Saving.hpp b/graphics/epsonscan2/files/patch-src_Controller_Src_Filter_Saving.hpp new file mode 100644 index 000000000000..03610918c7f1 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Controller_Src_Filter_Saving.hpp @@ -0,0 +1,20 @@ +--- src/Controller/Src/Filter/Saving.hpp.orig 2022-03-20 15:38:28 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; + } diff --git a/graphics/epsonscan2/files/patch-src_Controller_Src_Finder_UsbFinder.cpp b/graphics/epsonscan2/files/patch-src_Controller_Src_Finder_UsbFinder.cpp new file mode 100644 index 000000000000..5fd43e5515ca --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Controller_Src_Finder_UsbFinder.cpp @@ -0,0 +1,14 @@ +--- src/Controller/Src/Finder/UsbFinder.cpp.orig 2021-11-25 00:56:57 UTC ++++ src/Controller/Src/Finder/UsbFinder.cpp +@@ -25,7 +25,11 @@ + #include "ModelInfo.hpp" + #include "Utility.hpp" + extern "C" { ++#if __FreeBSD__ ++#include ++#else + #include ++#endif + } + #include + #include 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 new file mode 100644 index 000000000000..b524fde21606 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Controller_Src_KeysValues_All_Resolution.cpp @@ -0,0 +1,11 @@ +--- src/Controller/Src/KeysValues/All/Resolution.cpp.orig 2021-11-25 00:56:58 UTC ++++ src/Controller/Src/KeysValues/All/Resolution.cpp +@@ -142,7 +142,7 @@ ESDictionary Resolution::GetSeolutionTable(bool isXRes + ES_CMN_FUNCS::JSON::JSONFiletoDictionary(resTablePath, resTable); + }else + { +- SDI_TRACE_LOG("resolution faile does not found"); ++ SDI_TRACE_LOG("resolution file not found"); + } + } + catch (boost::bad_any_cast) { 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 new file mode 100644 index 000000000000..c80cfd057a42 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Controller_Src_KeysValues_All_ScanHeightMax.cpp @@ -0,0 +1,11 @@ +--- src/Controller/Src/KeysValues/All/ScanHeightMax.cpp.orig 2021-11-25 00:56:58 UTC ++++ src/Controller/Src/KeysValues/All/ScanHeightMax.cpp +@@ -59,6 +59,8 @@ void ScanHeightMax::GetValue(SDIInt& intVal) + case kSDIFunctionalUnitDocumentFeeder: + intVal = ADFValue(); + return; ++ case kSDIFunctionalUnitCarrierSheet: ++ break; + } + } + void ScanHeightMax::GetCapability(SDICapability &capability) 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 new file mode 100644 index 000000000000..e04ba20df560 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Controller_Src_KeysValues_All_ScanWidthMax.cpp @@ -0,0 +1,11 @@ +--- src/Controller/Src/KeysValues/All/ScanWidthMax.cpp.orig 2021-11-25 00:56:58 UTC ++++ src/Controller/Src/KeysValues/All/ScanWidthMax.cpp +@@ -58,6 +58,8 @@ void ScanWidthMax::GetValue(SDIInt& intVal) + case kSDIFunctionalUnitDocumentFeeder: + intVal = ADFValue(); + return; ++ case kSDIFunctionalUnitCarrierSheet: ++ break; + } + } + void ScanWidthMax::GetCapability(SDICapability &capability) diff --git a/graphics/epsonscan2/files/patch-src_Controller_Src_Scanner_Engine.hpp b/graphics/epsonscan2/files/patch-src_Controller_Src_Scanner_Engine.hpp new file mode 100644 index 000000000000..38ece0009a89 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Controller_Src_Scanner_Engine.hpp @@ -0,0 +1,26 @@ +--- src/Controller/Src/Scanner/Engine.hpp.orig 2021-11-25 00:56:59 UTC ++++ src/Controller/Src/Scanner/Engine.hpp +@@ -357,14 +357,14 @@ namespace epsonscan { + void CALLBACK ScannerDidWarmUp( IESScanner* pScanner ) override; + void CALLBACK NetworkScannerDidRequestStartScanning( IESScanner* pScanner ) override; + void CALLBACK NetworkScannerDidRequestStopScanning( IESScanner* pScanner ) override; +- void CALLBACK ScannerDidDisconnect( IESScanner* pScanner ) ; +- void CALLBACK NetworkScannerDidReceiveServerError(IESScanner* pScanner) ; +- BOOL CALLBACK NetworkScannerShouldPreventTimeout( IESScanner* pScanner ) ; +- void CALLBACK NetworkScannerDidTimeout( IESScanner* pScanner ) ; +- void CALLBACK ScannerIsReservedByHost( IESScanner* pScanner, const ES_CHAR* pszAddress ) ; +- void CALLBACK ScannerDidPressButton( UInt8 un8ButtonNumber ) ; +- void CALLBACK ScannerDidRequestStop(IESScanner *pScanner); +- void CALLBACK ScannerDidRequestPushScanConnection(IESScanner *pScanner); +- void CALLBACK ScannerDidNotifyStatusChange(IESScanner *pScanner) ; ++ void CALLBACK ScannerDidDisconnect( IESScanner* pScanner ) override; ++ void CALLBACK NetworkScannerDidReceiveServerError(IESScanner* pScanner) override; ++ BOOL CALLBACK NetworkScannerShouldPreventTimeout( IESScanner* pScanner ) override; ++ 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 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 new file mode 100644 index 000000000000..4d5aefd35aff --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Controller_Src_Scanner_Scanner.cpp @@ -0,0 +1,27 @@ +--- src/Controller/Src/Scanner/Scanner.cpp.orig 2021-11-25 00:56:59 UTC ++++ src/Controller/Src/Scanner/Scanner.cpp +@@ -188,7 +188,7 @@ void Scanner::EngineCallBackReceiver(EngineEventType e + error == kSDIErrorDataSend || + error == kSDIErrorInvalidResponse || + error == kSDIErrorDeviceFatalError || +- error == kESErrorDeviceOpenError ) ++ error == (SDIError) kESErrorDeviceOpenError ) + { + SDI_TRACE_LOG("communication error occurs"); + isOpened_ = false; +@@ -202,13 +202,13 @@ SDIError Scanner::Open() + SDIError err; + if (engine_) { + err = engine_->Open(); +- if(err != kSDIErrorNone){ ++ if(err != kSDIErrorNone && err != kSDIErrorDeviceOpen){ + return err; + } + } + if (engineSecond_) { + err = engineSecond_->Open(); +- if(err != kSDIErrorNone){ ++ if(err != kSDIErrorNone && err != kSDIErrorDeviceOpen){ + return err; + } + } diff --git a/graphics/epsonscan2/files/patch-src_ES2Command_Linux_CMakeLists.txt b/graphics/epsonscan2/files/patch-src_ES2Command_Linux_CMakeLists.txt new file mode 100644 index 000000000000..f30d1dd28c88 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_ES2Command_Linux_CMakeLists.txt @@ -0,0 +1,11 @@ +--- src/ES2Command/Linux/CMakeLists.txt.orig 2021-11-25 00:56:54 UTC ++++ src/ES2Command/Linux/CMakeLists.txt +@@ -60,7 +60,7 @@ target_link_libraries( es2command + dl + commonutility + ${Boost_LIBRARIES} +- usb-1.0 ++ ${usb_LIBRARY} + ) + + install(TARGETS es2command DESTINATION ${EPSON_INSTALL_ROOT}${EPSON_INSTALL_PATH}) 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 new file mode 100644 index 000000000000..5ecc95e2bb57 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_ES2Command_Src_Command_ESCI2_ESCI2Accessor.h @@ -0,0 +1,38 @@ +--- src/ES2Command/Src/Command/ESCI2/ESCI2Accessor.h.orig 2021-11-25 00:56:55 UTC ++++ src/ES2Command/Src/Command/ESCI2/ESCI2Accessor.h +@@ -37,7 +37,7 @@ class CESCI2Accessor : public CESCI2Command (protected + ESErrorCode SetPanelToPushScanReady( BOOL bPushScanReady ); + ESErrorCode UnlockAdministratorLock(); + ESErrorCode LockAdministratorLock(); +- bool RequestingUnlockAdminLock(); ++ virtual bool RequestingUnlockAdminLock() override; + BOOL IsScannableDeviceConfig(); + ESErrorCode CaptureScanner(); + ESErrorCode ReleaseScanner(); +@@ -208,7 +208,7 @@ class CESCI2Accessor : public CESCI2Command (protected + ESErrorCode _SetColorMatrix( ES_COLOR_MATRIX& matrix ); + ESErrorCode SetColorMatrix( ESFloatArray arColorMatrix ); + bool IsSkewCorrectionSupported(); +- bool IsSkewCorrectionEnabled(); ++ bool IsSkewCorrectionEnabled() override; + ESErrorCode SetSkewCorrectionEnabled( bool bSkewCorrectionEnabled ); + ESAny GetSupportedThreshold(); + ESNumber GetThreshold(); +@@ -226,7 +226,7 @@ class CESCI2Accessor : public CESCI2Command (protected + ESNumber GetGammaScale(); + ESErrorCode SetGammaScale( ESNumber nGammaScale ); + 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 + ESQuietMode GetQuietMode(); + ESErrorCode SetQuietMode( ESNumber nQuietMode); + bool IsAutoCroppingSupported(); +- bool IsAutoCroppingEnabled(); ++ virtual bool IsAutoCroppingEnabled() override; + ESErrorCode SetAutoCroppingEnabled( bool bAutoCroppingEnabled ); + ESAny GetCroppableResolutions(); + ESAny GetSupportedCroppingSizes(); 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 new file mode 100644 index 000000000000..d930216e6727 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_ES2Command_Src_Interface_ipc_ipcInterfaceImpl.cpp @@ -0,0 +1,11 @@ +--- src/ES2Command/Src/Interface/ipc/ipcInterfaceImpl.cpp.orig 2021-11-25 00:56:54 UTC ++++ src/ES2Command/Src/Interface/ipc/ipcInterfaceImpl.cpp +@@ -307,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) { +- ES_ERROR_LOG(ES_STRING("recv_reply err.(%d, %d, n)"), hdr_error(hdr), hdr_token(hdr), n); ++ ES_ERROR_LOG(ES_STRING("recv_reply err.(%d, %d, %ld)"), hdr_error(hdr), hdr_token(hdr), n); + return false; + } + return true; 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 new file mode 100644 index 000000000000..b7225c97f1b8 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_ES2Command_Src_Interface_usb_usbInterfaceImpl.cpp @@ -0,0 +1,12 @@ +--- src/ES2Command/Src/Interface/usb/usbInterfaceImpl.cpp.orig 2021-11-25 00:56:54 UTC ++++ src/ES2Command/Src/Interface/usb/usbInterfaceImpl.cpp +@@ -46,7 +46,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); + } + ++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 new file mode 100644 index 000000000000..247cabd4050e --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_ES2Command_Src_Interface_usb_usbInterfaceImpl.h @@ -0,0 +1,15 @@ +--- src/ES2Command/Src/Interface/usb/usbInterfaceImpl.h.orig 2021-11-25 00:56:54 UTC ++++ src/ES2Command/Src/Interface/usb/usbInterfaceImpl.h +@@ -20,8 +20,11 @@ + // usbInterfaceImpl.h -- template and derived ESC/I ESC/I-2 protocol commands + #pragma once + +- ++#if __FreeBSD__ ++#include ++#else + #include ++#endif + #include "../interfaceImpl.h" + #include "../interface.h" + class USBInterfaceImpl : public IInterfaceImpl diff --git a/graphics/epsonscan2/files/patch-src_ES2Command_Src_Utils_semaphore.hpp b/graphics/epsonscan2/files/patch-src_ES2Command_Src_Utils_semaphore.hpp new file mode 100644 index 000000000000..680ae4f57ab8 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_ES2Command_Src_Utils_semaphore.hpp @@ -0,0 +1,71 @@ +--- src/ES2Command/Src/Utils/semaphore.hpp.orig 2021-11-25 00:56:55 UTC ++++ src/ES2Command/Src/Utils/semaphore.hpp +@@ -23,6 +23,10 @@ + + #include + #include ++#ifdef __FreeBSD__ ++#include ++#include ++#endif + #if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) + #else + union semun { +@@ -88,9 +92,26 @@ class semaphore (public) + } + int wait(int timeout_s) + { ++#ifdef __FreeBSD__ ++ int err; + sembuf operations[1]; + operations[0].sem_num = 0; + operations[0].sem_op = WAIT; ++ operations[0].sem_flg = SEM_UNDO | IPC_NOWAIT; ++ for (int i = 0; i < timeout_s * 100; i++) { ++ err = semop(sem_id_, operations, 1); ++ if (err == EAGAIN) { ++ std::this_thread::sleep_for(std::chrono::milliseconds(10)); ++ } ++ else { ++ return err; ++ } ++ } ++ return ETIMEDOUT; ++#else ++ sembuf operations[1]; ++ operations[0].sem_num = 0; ++ operations[0].sem_op = WAIT; + operations[0].sem_flg = SEM_UNDO; + struct timespec time{}; + time.tv_sec = timeout_s; +@@ -98,6 +119,7 @@ class semaphore (public) + return errno; + } + return 0; ++#endif + } + void lock() + { +@@ -128,6 +150,14 @@ class semaphore (public) + } + int wait_and_lock(int timeout_s) + { ++#ifdef __FreeBSD__ ++ int err; ++ if ((err = wait(timeout_s)) == 0) { ++ lock(); ++ return 0; ++ } ++ return err; ++#else + sembuf operations[2]; + operations[0].sem_num = 0; + operations[0].sem_op = WAIT; +@@ -141,6 +171,7 @@ class semaphore (public) + return errno; + } + return 0; ++#endif + } + private: + key_t key_; diff --git a/graphics/epsonscan2/files/patch-src_ES2FileFormat_Header_IO_FKDestination.h b/graphics/epsonscan2/files/patch-src_ES2FileFormat_Header_IO_FKDestination.h new file mode 100644 index 000000000000..49ec9593d64d --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_ES2FileFormat_Header_IO_FKDestination.h @@ -0,0 +1,32 @@ +--- src/ES2FileFormat/Header/IO/FKDestination.h.orig 2021-11-25 00:56:57 UTC ++++ src/ES2FileFormat/Header/IO/FKDestination.h +@@ -33,12 +33,12 @@ class CFKDestination : public IFKDestination (private) + public: + CFKDestination(); + ~CFKDestination(); +- FKDestinationType GetFKDestinationType() ++ FKDestinationType GetFKDestinationType() override + { + return m_eFKDestinationType; + } +- ES_CMN_FUNCS::BUFFER::IESBuffer& GetSource(); +- void SetDelegate(IFKDestinationDelegate* piDelegate){ ++ ES_CMN_FUNCS::BUFFER::IESBuffer& GetSource() override; ++ void SetDelegate(IFKDestinationDelegate* piDelegate) override { + m_pcDelegate = piDelegate ; + } + void SetUserData(const ESImageInfo& dictImageInfo){ +@@ -50,10 +50,10 @@ class CFKDestination : public IFKDestination (private) + 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 ); +- void NotifyDidBeginReceivingForImageInfo( ES_CHAR_CPTR pszImageInfoAsJson ); +- void NotifyDidEndReceivingForImageInfo( ES_CHAR_CPTR pszImageInfoAsJson ); ++ void NotifyDidBeginReceivingForImageInfo( ES_CHAR_CPTR pszImageInfoAsJson ) override; ++ 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 { + 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 new file mode 100644 index 000000000000..c6dddcda8f9f --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_ES2FileFormat_Header_IO_FKSource.h @@ -0,0 +1,11 @@ +--- src/ES2FileFormat/Header/IO/FKSource.h.orig 2021-11-25 00:56:57 UTC ++++ src/ES2FileFormat/Header/IO/FKSource.h +@@ -40,7 +40,7 @@ class CFKSource : public IFKSource (public) + { + return m_bFull; + } +- ES_CMN_FUNCS::BUFFER::IESBuffer& GetSource( ); ++ ES_CMN_FUNCS::BUFFER::IESBuffer& GetSource( ) override; + static IFKSource* CreateAndInitInstanceWithType(FKSourceType eSourceType, ES_CMN_FUNCS::BUFFER::IESBuffer& vpSource, BOOL bIsFull); + void Destroy() override{ + delete this; diff --git a/graphics/epsonscan2/files/patch-src_ES2FileFormat_Header_Reader_FKReader.h b/graphics/epsonscan2/files/patch-src_ES2FileFormat_Header_Reader_FKReader.h new file mode 100644 index 000000000000..13ac013b39c3 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_ES2FileFormat_Header_Reader_FKReader.h @@ -0,0 +1,34 @@ +--- src/ES2FileFormat/Header/Reader/FKReader.h.orig 2021-11-25 00:56:57 UTC ++++ src/ES2FileFormat/Header/Reader/FKReader.h +@@ -42,21 +42,21 @@ class CFKReader : public IFKReader (public) + m_nValidImageHeight = nHeight; + m_bReadOnlyValidData = bReadOnlyValidData; + } +- IFKDestination* GetCFkDestionation() ++ IFKDestination* GetCFkDestionation() override + { + return m_piFkDestination; + } + ESImageInfo& GetImageInfo(void); + virtual void GetImageInfoAsJson(IESResultString& strJson) override; +- BOOL OpenWithDestination( IFKDestination* pcDestination, ENUM_FK_ERROR_CODE& eError ); +- BOOL OpenWithDestinationAsJson( IFKDestination* pcDestination, ES_CHAR_CPTR pszOptionAsJson, ENUM_FK_ERROR_CODE& eError ); +- virtual BOOL AppendSource(IFKSource* source, ENUM_FK_ERROR_CODE& eError); +- BOOL CloseAndReturnError( ENUM_FK_ERROR_CODE& eError ); +- BOOL CloseWithOptionAsJson( ES_CHAR_CPTR pszOptionAsJson, ENUM_FK_ERROR_CODE& eError ); +- virtual BOOL OpenReaderWithOptionAsJson( ES_CHAR_CPTR pszOptionAsJson, ENUM_FK_ERROR_CODE& eError ) = 0; +- virtual BOOL AppendSourceToReader( IFKSource* pcSource, ENUM_FK_ERROR_CODE& eError ) = 0; +- virtual BOOL CloseReaderWithOptionAsJson( ES_CHAR_CPTR pszOptionAsJson, ENUM_FK_ERROR_CODE& eError ) = 0; +- void Destroy(){ ++ BOOL OpenWithDestination( IFKDestination* pcDestination, ENUM_FK_ERROR_CODE& eError ) override; ++ BOOL OpenWithDestinationAsJson( IFKDestination* pcDestination, ES_CHAR_CPTR pszOptionAsJson, ENUM_FK_ERROR_CODE& eError ) override; ++ virtual BOOL AppendSource(IFKSource* source, ENUM_FK_ERROR_CODE& eError) override; ++ BOOL CloseAndReturnError( ENUM_FK_ERROR_CODE& eError ) override; ++ BOOL CloseWithOptionAsJson( ES_CHAR_CPTR pszOptionAsJson, ENUM_FK_ERROR_CODE& eError ) override; ++ 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 { + 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 new file mode 100644 index 000000000000..f0df1a08cec3 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_ES2FileFormat_Source_PnmUtil_FKPnmUtil.cpp @@ -0,0 +1,11 @@ +--- src/ES2FileFormat/Source/PnmUtil/FKPnmUtil.cpp.orig 2022-02-17 18:20:53 UTC ++++ src/ES2FileFormat/Source/PnmUtil/FKPnmUtil.cpp +@@ -137,7 +137,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); + 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_Platform.cpp b/graphics/epsonscan2/files/patch-src_Platform.cpp new file mode 100644 index 000000000000..0e2bdc96e935 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Platform.cpp @@ -0,0 +1,69 @@ +--- src/Platform.cpp.orig 2021-11-25 00:56:59 UTC ++++ src/Platform.cpp +@@ -22,6 +22,10 @@ + #include "Platform.h" + #include "CommonUtility/utils/PathUtils.h" + #include ++#ifdef __FreeBSD__ ++#include ++#define pthread_tryjoin_np(tid,st) pthread_peekjoin_np(tid,st) ++#endif + #ifndef WIN32 + errno_t fopen_s( + FILE** pFile, +@@ -105,7 +109,7 @@ DWORD WaitForSingleObject( + case THREAD_HANDLE_ID: + { + LPTHREAD_HANDLE hThreadHandle = (LPTHREAD_HANDLE) hHandle; +- if( (int)NULL == hThreadHandle->threadID ) { ++ if( 0 == hThreadHandle->threadID ) { + return WAIT_OBJECT_0; + } + int thread_status = 0; +@@ -121,7 +125,7 @@ DWORD WaitForSingleObject( + { + intptr_t lRet = (intptr_t)pStatus; + hThreadHandle->dwThreadStatus = (DWORD)lRet; +- hThreadHandle->threadID = (int)NULL; ++ hThreadHandle->threadID = 0; + } + } + while (EBUSY == thread_status); +@@ -180,7 +184,7 @@ BOOL CloseHandle(HANDLE hObject) + WaitForSingleObject(hObject, INFINITE); + LPTHREAD_HANDLE pThreadHandle = (LPTHREAD_HANDLE)hObject; + pThreadHandle->dwThreadStatus = 0; +- pThreadHandle->threadID = (int)NULL; ++ pThreadHandle->threadID = 0; + #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( + } + if (NULL == strSource) + { +- strDestination[0] = (char)NULL; ++ strDestination[0] = '\0'; + return EINVAL; + } + if ( (0 == numberOfElements) + || (numberOfElements <= (strlen(strDestination) + strlen(strSource))) + ) + { +- strDestination[0] = (char)NULL; ++ strDestination[0] = '\0'; + return ERANGE; + } + strcat(strDestination, strSource); diff --git a/graphics/epsonscan2/files/patch-src_SaneWrapper_backend.cpp b/graphics/epsonscan2/files/patch-src_SaneWrapper_backend.cpp new file mode 100644 index 000000000000..fdcae3361eca --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_SaneWrapper_backend.cpp @@ -0,0 +1,37 @@ +--- src/SaneWrapper/backend.cpp.orig 2021-11-25 00:56:59 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; ++ SDIError outError = kSDIErrorNone; + if(tmp_buf){ + memset(tmp_buf, 0, nSize); + }else { +@@ -363,7 +365,6 @@ sane_get_parameters (SANE_Handle handle, SANE_Paramete + goto ERROR_2; + } + output_path = (SDIChar*)tmp_buf; +- SDIError outError; + s->hw->sv->SDIImage_CreatePtr_(&s->outImageData); + s->hw->sv->SDIScannerDriver_GetNextTransferEventPtr_(s->hw->sv->driver, + &outType, +@@ -442,7 +443,7 @@ sane_get_parameters (SANE_Handle handle, SANE_Paramete + } + }else { + status = SANE_STATUS_INVAL; +- fclose(fp); ++ //fclose(fp); // shouldn't try to close file that isn't open! + goto ERROR; + } + if(s->hw->sv->device_data.ColorType.select == kSDIColorTypeMono1){ diff --git a/graphics/epsonscan2/files/patch-src_SaneWrapper_defines.h b/graphics/epsonscan2/files/patch-src_SaneWrapper_defines.h new file mode 100644 index 000000000000..cedff91f63d6 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_SaneWrapper_defines.h @@ -0,0 +1,33 @@ +--- src/SaneWrapper/defines.h.orig 2021-11-25 00:56:59 UTC ++++ src/SaneWrapper/defines.h +@@ -36,14 +36,30 @@ typedef enum { + } bool; + #endif + #include ++#undef _assert + #define _assert(type,condition) \ + if (!(condition)) \ + { \ + exit (EXIT_FAILURE); \ + } ++#ifndef __FreeBSD__ + #define require(condition) _assert ("require", condition) + #define promise(condition) _assert ("promise", condition) ++#else ++#define require(condition) \ ++ if (!(condition)) \ ++ { \ ++ exit (EXIT_FAILURE); \ ++ } ++#define promise(condition) \ ++ if (!(condition)) \ ++ { \ ++ exit (EXIT_FAILURE); \ ++ } ++#endif ++#ifndef __FreeBSD__ + #include ++#endif + #include + #define t_alloca(sz,t) ((t *) alloca ((sz) * sizeof (t))) + #define t_calloc(sz,t) ((t *) calloc ((sz) , sizeof (t))) diff --git a/graphics/epsonscan2/files/patch-src_SaneWrapper_epsonscan.cpp b/graphics/epsonscan2/files/patch-src_SaneWrapper_epsonscan.cpp new file mode 100644 index 000000000000..9b1aa22fa616 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_SaneWrapper_epsonscan.cpp @@ -0,0 +1,29 @@ +--- src/SaneWrapper/epsonscan.cpp.orig 2021-11-25 00:56:59 UTC ++++ src/SaneWrapper/epsonscan.cpp +@@ -859,7 +859,7 @@ sane_start (SANE_Handle handle) + select_current_doc_size(s, s->hw->sv->device_data); + handle_scan_area (s, (char *) s->hw->cur_doc_size); + } +- if(sane_app_compatible("simple-scan")){ ++ if(sane_app_compatible((SANE_String)"simple-scan")){ + double max_x = s->hw->sv->device_data.ScanArea.MaxScanAreaWidth.select / 100.0 * s->hw->sv->device_data.Resolution.select; + double max_y = s->hw->sv->device_data.ScanArea.MaxScanAreaHeight.select / 100.0 * s->hw->sv->device_data.Resolution.select; + if(max_x <= s->hw->sv->device_data.ScanArea.ScanAreaWidth.select && +@@ -1265,7 +1265,7 @@ set_epson_value (Epson_Scanner *s, SANE_Int option, vo + gamma_range.min) != SANE_STATUS_GOOD){ + return SANE_STATUS_INVAL; + } +- log_call("gamma = %d", value); ++ log_call("gamma = %d", *((SANE_Word *)value)); + handle_gamma (s, (SANE_UNFIX(*((SANE_Int *) value))*10)); + break; + case OPT_MODE: +@@ -1285,7 +1285,7 @@ set_epson_value (Epson_Scanner *s, SANE_Int option, vo + brightness_range.min) != SANE_STATUS_GOOD){ + return SANE_STATUS_INVAL; + } +- log_call("brightne = %d", value); ++ log_call("brightne = %d", *((SANE_Word *)value)); + handle_brightness (s, *((SANE_Word *) value)); + break; + case OPT_CONTRAST: diff --git a/graphics/epsonscan2/files/patch-src_ScanSDK_Src_SDK_supervisor.cpp b/graphics/epsonscan2/files/patch-src_ScanSDK_Src_SDK_supervisor.cpp new file mode 100644 index 000000000000..0140eaa7e40f --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_ScanSDK_Src_SDK_supervisor.cpp @@ -0,0 +1,29 @@ +--- src/ScanSDK/Src/SDK/supervisor.cpp.orig 2021-11-25 00:56:59 UTC ++++ src/ScanSDK/Src/SDK/supervisor.cpp +@@ -282,7 +282,7 @@ bool Supervisor::DeviceInfoResolve(SDIDeviceInfo* devI + } + bool Supervisor::CheckScanningError(SDIError outError) + { +- if(outEventType == 10 ){ ++ if(outEventType == (SDITransferEventType)10 ){ + if(outError != kSDIErrorNone){ + m_LastError = outError; + return false; +@@ -2541,7 +2541,7 @@ bool Supervisor::Set_All_Value(void) + } + { + SDIInt current; +- if(device_data.ScanArea.FixedSize == USER_DEFINE){ ++ if(device_data.ScanArea.FixedSize == (DocumentSize)USER_DEFINE){ + current = device_data.ScanArea.PaperEndDetection.select; + }else { + current = false; +@@ -3487,7 +3487,7 @@ bool Supervisor::Set_Exclusion_Value(void) + } + { + SDIInt current; +- if(device_data.ScanArea.FixedSize == USER_DEFINE){ ++ if(device_data.ScanArea.FixedSize == (DocumentSize)USER_DEFINE){ + current = device_data.ScanArea.PaperEndDetection.select; + }else { + current = false; diff --git a/graphics/epsonscan2/files/patch-src_Standalone_CMakeLists.txt b/graphics/epsonscan2/files/patch-src_Standalone_CMakeLists.txt new file mode 100644 index 000000000000..f8c0fea55f1f --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Standalone_CMakeLists.txt @@ -0,0 +1,9 @@ +--- src/Standalone/CMakeLists.txt.orig 2021-11-25 00:56:54 UTC ++++ src/Standalone/CMakeLists.txt +@@ -142,5 +142,5 @@ target_link_libraries(es2standalone ${QT_LIBRARIES} + ) + + QT5_USE_MODULES(es2standalone Widgets) +-install(TARGETS es2standalone DESTINATION "${EPSON_INSTALL_ROOT}/usr/bin") ++install(TARGETS es2standalone DESTINATION "${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_PREFIX}/bin") + diff --git a/graphics/epsonscan2/files/patch-src_Standalone_addeditpagedialog.cpp b/graphics/epsonscan2/files/patch-src_Standalone_addeditpagedialog.cpp new file mode 100644 index 000000000000..4aebb2aed4d4 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Standalone_addeditpagedialog.cpp @@ -0,0 +1,8 @@ +--- src/Standalone/addeditpagedialog.cpp.orig 2021-11-25 00:56:56 UTC ++++ src/Standalone/addeditpagedialog.cpp +@@ -89,4 +89,5 @@ bool addeditpageDialog::EditDialog(std::list temp_list = {}; + m_jumpImageEditDialog->getInfoList(&temp_list); + *result_list = temp_list; ++ return true; + } diff --git a/graphics/epsonscan2/files/patch-src_Standalone_commandlinemode.cpp b/graphics/epsonscan2/files/patch-src_Standalone_commandlinemode.cpp new file mode 100644 index 000000000000..5d325fb07e7b --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Standalone_commandlinemode.cpp @@ -0,0 +1,20 @@ +--- src/Standalone/commandlinemode.cpp.orig 2021-11-25 00:56:56 UTC ++++ src/Standalone/commandlinemode.cpp +@@ -538,7 +538,7 @@ void CommandLineMode::ErrorMessage(SDIError outError) + }else if(outError == kSDIErrorPaperProtect){ + error_message = "ERROR : A paper jam has occurred. See the documentation for instructions on removing your originals."; + }else if(outError == kSDIErrorDeviceInBusy){ +- error_message = "kSDIErrorDeviceInBusy"; ++ error_message = "ERROR : kSDIErrorDeviceInBusy"; + }else if(outError == kSDIErrorCoverOpen){ + error_message = "ERROR : ADF or ADF cover is open. Close it and reload the originals."; + }else if(outError == kSDIErrorTrayClose){ +@@ -559,6 +559,8 @@ void CommandLineMode::ErrorMessage(SDIError outError) + error_message = "ERROR : Device is not found..."; + }else if(outError == kSDIErrorUserAuthEnabled){ + error_message = "ERROR : Scanning from Epson Scan 2 is not allowed because the authentication function for the scanner is enabled."; ++ }else if(outError == kSDIErrorInvalidResponse){ ++ error_message = "ERROR : kSDIErrorInvalidResponse"; + }else { + error_message = "ERROR : An unexpected error occurred. Epson Scan 2 will close."; + } diff --git a/graphics/epsonscan2/files/patch-src_Standalone_custommessagebox.cpp b/graphics/epsonscan2/files/patch-src_Standalone_custommessagebox.cpp new file mode 100644 index 000000000000..f16ca1c876b6 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Standalone_custommessagebox.cpp @@ -0,0 +1,11 @@ +--- src/Standalone/custommessagebox.cpp.orig 2021-11-25 00:56:56 UTC ++++ src/Standalone/custommessagebox.cpp +@@ -153,7 +153,7 @@ void CustomMessageBox::ErrorMessageBox(Supervisor* sv, + type = Critical; + error_message = TranslationString::GetString().translation_str.E_ENV_001; + sv->scanning_status = ERROR; +- }else if(sv->m_LastError == kSDITransferEventTypeCancel){ ++ }else if(sv->m_LastError == (SDIError)kSDITransferEventTypeCancel){ + return; + }else if(sv->m_LastError == kSDIErrorDataSend){ + type = Critical; diff --git a/graphics/epsonscan2/files/patch-src_Standalone_detectionareamindoublespinbox.cpp b/graphics/epsonscan2/files/patch-src_Standalone_detectionareamindoublespinbox.cpp new file mode 100644 index 000000000000..278454fffec4 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Standalone_detectionareamindoublespinbox.cpp @@ -0,0 +1,11 @@ +--- src/Standalone/detectionareamindoublespinbox.cpp.orig 2021-11-25 00:56:56 UTC ++++ src/Standalone/detectionareamindoublespinbox.cpp +@@ -100,7 +100,7 @@ bool DetectionAreaMinDoubleSpinBox::isUnit_inchi(void) + Units units = config.config_para.units; + if(units == unit_inchi){ + return true; +- }else if(units == unit_mm){ ++ }else{ + return false; + } + } diff --git a/graphics/epsonscan2/files/patch-src_Standalone_deviceconnectiondialog.cpp b/graphics/epsonscan2/files/patch-src_Standalone_deviceconnectiondialog.cpp new file mode 100644 index 000000000000..0f474b0b3ea5 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Standalone_deviceconnectiondialog.cpp @@ -0,0 +1,28 @@ +--- src/Standalone/deviceconnectiondialog.cpp.orig 2022-02-17 18:43:44 UTC ++++ src/Standalone/deviceconnectiondialog.cpp +@@ -110,11 +110,10 @@ void DetectAlertGlassDirty(SDIScannerDriver* driver, S + #endif + QString arg2(TranslationString::GetString().translation_str.A_UI_006); + QString arg3(TranslationString::GetString().translation_str.VERSION_003); +- QString executable = exeapp + " " + arg1 + " " + "\"" + arg2 + "\"" + " " + arg3 + " " + "A_UI_006" + " " + std::to_string( 1).c_str(); + dir_name = dir_name + "A_UI_006"; + if(!tmpdir.exists(dir_name.c_str())){ + if(!tmpdir.exists(dir_name.c_str())) tmpdir.mkdir(dir_name.c_str()); +- if(!QProcess::startDetached(executable)){ ++ if(!QProcess::startDetached(exeapp, {arg1, arg2, arg3, "A_UI_006", std::to_string( 1).c_str()})){ + qCritical() << "Cannot start program"; + } + } +@@ -129,11 +128,10 @@ void DetectAlertGlassDirty(SDIScannerDriver* driver, S + #endif + QString arg2(TranslationString::GetString().translation_str.A_UNIT_008); + QString arg3(TranslationString::GetString().translation_str.VERSION_003); +- QString executable = exeapp + " " + arg1 + " " + "\"" + arg2 + "\"" + " " + arg3 + " " + "A_UNIT_008" + " " + std::to_string( 2).c_str(); + dir_name = dir_name + "A_UNIT_008"; + if(!tmpdir.exists(dir_name.c_str())){ + if(!tmpdir.exists(dir_name.c_str())) tmpdir.mkdir(dir_name.c_str()); +- if(!QProcess::startDetached(executable)){ ++ if(!QProcess::startDetached(exeapp, {arg1, arg2, arg3, "A_UNIT_008", std::to_string( 2).c_str()})){ + qCritical() << "Cannot start program"; + } + } diff --git a/graphics/epsonscan2/files/patch-src_Standalone_documentsize.cpp b/graphics/epsonscan2/files/patch-src_Standalone_documentsize.cpp new file mode 100644 index 000000000000..e52b6bf88930 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Standalone_documentsize.cpp @@ -0,0 +1,23 @@ +--- src/Standalone/documentsize.cpp.orig 2021-11-25 00:56:55 UTC ++++ src/Standalone/documentsize.cpp +@@ -333,9 +333,9 @@ void Document_Size::CreateComboBoxToolTip(DocumentSize + message = ""; + }else if(current_item == Auto_Detect_long){ + message = ""; +- }else if(current_item == OPTIONS){ ++ }else if(current_item == (DocumentSize)OPTIONS){ + message = ""; +- }else if(current_item == USER_DEFINE){ ++ }else if(current_item == (DocumentSize)USER_DEFINE){ + create_custom_size(&message); + }else if(current_item == Maximum_Size){ + create_maximum_size(&message, scan_area_para); +@@ -774,7 +774,7 @@ void Document_Size::StandardSizeToPixel() + }else if(current_item == Maximum_Size){ + current_pixel_x = max_pixel_x / 100 * this->base_resolution; + current_pixel_y = max_pixel_y / 100 * this->base_resolution; +- }else if(current_item == USER_DEFINE){ ++ }else if(current_item == (DocumentSize)USER_DEFINE){ + Configuration& config = Configuration::GetConfiguration(); + Units units = config.config_para.units; + if(units == unit_inchi){ diff --git a/graphics/epsonscan2/files/patch-src_Standalone_foldercomb.cpp b/graphics/epsonscan2/files/patch-src_Standalone_foldercomb.cpp new file mode 100644 index 000000000000..9ee9f57add99 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Standalone_foldercomb.cpp @@ -0,0 +1,20 @@ +--- src/Standalone/foldercomb.cpp.orig 2021-11-25 00:56:57 UTC ++++ src/Standalone/foldercomb.cpp +@@ -31,7 +31,7 @@ void FolderComb::initialize(SCANPARA dev_data, CustomM + changed = true; + current_item = (Folder)dev_data.Folder; + user_define_path = dev_data.UserDefinePath.c_str(); +- if(current_item == USER_DEFINE){ ++ if(current_item == (Folder)USER_DEFINE){ + QString qStr = user_define_path; + this->setToolTip(qStr); + } +@@ -117,7 +117,7 @@ void FolderComb::item_event(int value, SCANPARA* path_ + this->setToolTip(qStr); + }else if(select_item == OPTIONS){ + this->item_event_options(); +- if(current_item == USER_DEFINE){ ++ if(current_item == (Folder)USER_DEFINE){ + qStr = user_define_path; + path_data->UserDefinePath = (user_define_path.toLocal8Bit()).constData(); + select_item = old_select; diff --git a/graphics/epsonscan2/files/patch-src_Standalone_imageformatsettingscombobox.cpp b/graphics/epsonscan2/files/patch-src_Standalone_imageformatsettingscombobox.cpp new file mode 100644 index 000000000000..59a9bc0b4514 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Standalone_imageformatsettingscombobox.cpp @@ -0,0 +1,11 @@ +--- src/Standalone/imageformatsettingscombobox.cpp.orig 2021-11-25 00:56:56 UTC ++++ src/Standalone/imageformatsettingscombobox.cpp +@@ -68,7 +68,7 @@ void ImageFormatSettingsCombobox::add_item(ImageFormat + }else if(img_format_list[i] == ImageFormatColorJpegMonoRaw){ + this->insertItem(i, TranslationString::GetString().translation_str.FILESAVESETTING_007, ImageFormatColorJpegMonoRaw); + i++; +- }else if(img_format_list[i] == OPTIONS){ ++ }else if(img_format_list[i] == (ImageFormat)OPTIONS){ + break; + } + } diff --git a/graphics/epsonscan2/files/patch-src_Standalone_imageformatsettingsdialog.ui b/graphics/epsonscan2/files/patch-src_Standalone_imageformatsettingsdialog.ui new file mode 100644 index 000000000000..e236f749d7c3 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Standalone_imageformatsettingsdialog.ui @@ -0,0 +1,38 @@ +--- src/Standalone/imageformatsettingsdialog.ui.orig 2022-02-17 18:27:50 UTC ++++ src/Standalone/imageformatsettingsdialog.ui +@@ -112,7 +112,7 @@ + IMAGEFORMATOPTION_JPG_006 + + +- ++ + + + 220 +@@ -160,7 +160,7 @@ + : + + +- ++ + + + 11 +@@ -345,7 +345,7 @@ + 999 + + +- ++ + + + 150 +@@ -422,7 +422,7 @@ + IMAGEFORMATOPTION_JPG_006 + + +- ++ + + + 20 diff --git a/graphics/epsonscan2/files/patch-src_Standalone_initdeviceselectcombobox.cpp b/graphics/epsonscan2/files/patch-src_Standalone_initdeviceselectcombobox.cpp new file mode 100644 index 000000000000..11d277951e30 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Standalone_initdeviceselectcombobox.cpp @@ -0,0 +1,11 @@ +--- src/Standalone/initdeviceselectcombobox.cpp.orig 2022-01-21 22:27:00 UTC ++++ src/Standalone/initdeviceselectcombobox.cpp +@@ -80,7 +80,7 @@ void InitDeviceSelectCombobox::add_manu_ip() + int i = this->count(); + int dev_index = DeviceList::device_list.size(); + while(i <= list_size){ +- this->CreateDisplayName("Network Scanner", device->ipAddress, i, dev_index); ++ this->CreateDisplayName((char *)"Network Scanner", device->ipAddress, i, dev_index); + ++device; + i++; + dev_index++; diff --git a/graphics/epsonscan2/files/patch-src_Standalone_lengthdoublespinbox.cpp b/graphics/epsonscan2/files/patch-src_Standalone_lengthdoublespinbox.cpp new file mode 100644 index 000000000000..47345249feef --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Standalone_lengthdoublespinbox.cpp @@ -0,0 +1,11 @@ +--- src/Standalone/lengthdoublespinbox.cpp.orig 2021-11-25 00:56:57 UTC ++++ src/Standalone/lengthdoublespinbox.cpp +@@ -127,7 +127,7 @@ bool LengthDoubleSpinBox::isUnit_inchi(void) + Units units = config.config_para.units; + if(units == unit_inchi){ + return true; +- }else if(units == unit_mm){ ++ }else{ + return false; + } + } diff --git a/graphics/epsonscan2/files/patch-src_Standalone_mainwindow.cpp b/graphics/epsonscan2/files/patch-src_Standalone_mainwindow.cpp new file mode 100644 index 000000000000..0c7439e62e31 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Standalone_mainwindow.cpp @@ -0,0 +1,38 @@ +--- src/Standalone/mainwindow.cpp.orig 2021-11-25 00:56:57 UTC ++++ src/Standalone/mainwindow.cpp +@@ -682,7 +682,7 @@ bool MainWindow::SelectionRestrictions(int value){ + limit_resolution = 300; + } + if(obj == ui->Resolution_comb){ +- if(ui->Document_size_comb->current_item == USER_DEFINE){ ++ if(ui->Document_size_comb->current_item == (DocumentSize)USER_DEFINE){ + return UserDefineSizeRestrictions(); + }else if(ui->Document_size_comb->current_item == Auto_Detect_long){ + if(ui->Resolution_comb->currentText().toInt() > limit_resolution){ +@@ -1234,7 +1234,7 @@ bool MainWindow::CheckAutoFunctionalUnit(bool isPrevie + if(this->m_viewPreviewWindow){ + if(isPreview && sv->device_data.FunctionalUnit_Auto){ + if(sv->GetPaperLoadedStatus()){ +- if(sv->m_Preview_FunctionalUnit == kSDIFunctionalUnitDocumentFeeder){ ++ if(sv->m_Preview_FunctionalUnit == (FunctionalUnit)kSDIFunctionalUnitDocumentFeeder){ + sv->device_data.FunctionalUnit.select = kSDIFunctionalUnitDocumentFeeder; + }else { + if(m_messageBox->CreateSelectableMessageBox(TranslationString::GetString().translation_str.C_UI_005, Warning)){ +@@ -1247,7 +1247,7 @@ bool MainWindow::CheckAutoFunctionalUnit(bool isPrevie + } + } + }else { +- if(sv->m_Preview_FunctionalUnit == kSDIFunctionalUnitFlatbed){ ++ if(sv->m_Preview_FunctionalUnit == (FunctionalUnit)kSDIFunctionalUnitFlatbed){ + sv->device_data.FunctionalUnit.select = kSDIFunctionalUnitFlatbed; + }else { + if(m_messageBox->CreateSelectableMessageBox(TranslationString::GetString().translation_str.C_UI_005, Warning)){ +@@ -1332,7 +1332,7 @@ bool MainWindow::CheckBeforeScan() + } + } + if(!sv->device_data.DNShow_LongPaperWarning_dialog){ +- if(ui->Document_size_comb->current_item == USER_DEFINE){ ++ if(ui->Document_size_comb->current_item == (DocumentSize)USER_DEFINE){ + if(this->CheckLongPaperMode()){ + sv->device_data.DNShow_LongPaperWarning_dialog = m_messageBox->CreateMessageBox(TranslationString::GetString().translation_str.A_UI_005, TranslationString::GetString().translation_str.VERSION_003, Information, true); + } diff --git a/graphics/epsonscan2/files/patch-src_Standalone_mainwindow.ui b/graphics/epsonscan2/files/patch-src_Standalone_mainwindow.ui new file mode 100644 index 000000000000..099d85cee591 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Standalone_mainwindow.ui @@ -0,0 +1,38 @@ +--- src/Standalone/mainwindow.ui.orig 2022-02-17 18:30:36 UTC ++++ src/Standalone/mainwindow.ui +@@ -1653,7 +1653,7 @@ + 0 + + +- ++ + + + 13 +@@ -1719,7 +1719,7 @@ + + + +- ++ + + + 11 +@@ -1786,7 +1786,7 @@ + + + +- ++ + + + 10 +@@ -1856,7 +1856,7 @@ + + + +- ++ + + + 10 diff --git a/graphics/epsonscan2/files/patch-src_Standalone_networkdeviceselectdialog.cpp b/graphics/epsonscan2/files/patch-src_Standalone_networkdeviceselectdialog.cpp new file mode 100644 index 000000000000..4c116c4c2c24 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Standalone_networkdeviceselectdialog.cpp @@ -0,0 +1,11 @@ +--- src/Standalone/networkdeviceselectdialog.cpp.orig 2021-11-25 00:56:56 UTC ++++ src/Standalone/networkdeviceselectdialog.cpp +@@ -183,7 +183,7 @@ bool NetworkDeviceSelectDialog::UpdateNetworkSettingFi + ES_Trace_Log(this, "Exist network setting file"); + #else + ES_Trace_Log(this, "Exist file : .epsonscan2/Network/epsonscan2.conf"); +-#endif*/ ++#endif + std::string work_path = ES_CMN_FUNCS::PATH::ES_GetWorkTempPath(); + QDir tmpdir("/tmp"); + if (!tmpdir.exists(work_path.c_str())) tmpdir.mkdir(work_path.c_str()); diff --git a/graphics/epsonscan2/files/patch-src_Standalone_rotateimage.cpp b/graphics/epsonscan2/files/patch-src_Standalone_rotateimage.cpp new file mode 100644 index 000000000000..b5d946dea87f --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Standalone_rotateimage.cpp @@ -0,0 +1,47 @@ +--- src/Standalone/rotateimage.cpp.orig 2021-11-25 00:56:56 UTC ++++ src/Standalone/rotateimage.cpp +@@ -28,34 +28,34 @@ RotateImage::RotateImage(ColorType type) + void RotateImage::Rotate(std::string image_path, int angle, ImageFormat format, bool multiTiffEnabled) + { + std::string file_format; +- if (format == kSDIImageFormatJPEG) ++ if (format == (ImageFormat)kSDIImageFormatJPEG) + { + file_format = "JPG"; +- }else if (format == ImageFormatColorJpegMonoRaw) ++ }else if (format == (ImageFormat)ImageFormatColorJpegMonoRaw) + { + if(m_type == ColorTypeMono1){ + file_format = "PBM"; + }else { + file_format = "JPG"; + } +- }else if (format == kSDIImageFormatPNM && !multiTiffEnabled) ++ }else if (format == (ImageFormat)kSDIImageFormatPNM && !multiTiffEnabled) + { + file_format = "PPM"; +- }else if (format == kSDIImageFormatTIFF) ++ }else if (format == (ImageFormat)kSDIImageFormatTIFF) + { + file_format = "TIFF"; +- }else if (format == kSDIImageFormatPNG) ++ }else if (format == (ImageFormat)kSDIImageFormatPNG) + { + file_format = "PNG"; +- }else if (format == kSDIImageFormatPNM && multiTiffEnabled) ++ }else if (format == (ImageFormat)kSDIImageFormatPNM && multiTiffEnabled) + { + file_format = "PPM"; + } + QImage srcImg(image_path.c_str()); + QPoint center = srcImg.rect().center(); +- QMatrix matrix; +- matrix.translate(center.x(), center.y()); +- matrix.rotate(angle); +- QImage dstImg = srcImg.transformed(matrix); ++ QTransform transform; ++ transform.translate(center.x(), center.y()); ++ transform.rotate(angle); ++ QImage dstImg = srcImg.transformed(transform); + dstImg.save(QString::fromStdString(image_path), file_format.c_str(), -1); + } diff --git a/graphics/epsonscan2/files/patch-src_Standalone_supervisor.cpp b/graphics/epsonscan2/files/patch-src_Standalone_supervisor.cpp new file mode 100644 index 000000000000..9e5450e47478 --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Standalone_supervisor.cpp @@ -0,0 +1,29 @@ +--- src/Standalone/supervisor.cpp.orig 2021-11-25 00:56:57 UTC ++++ src/Standalone/supervisor.cpp +@@ -270,7 +270,7 @@ bool Supervisor::DeviceInfoResolve(SDIDeviceInfo* devI + } + bool Supervisor::CheckScanningError(SDIError outError) + { +- if(outEventType == 10 ){ ++ if(outEventType == (SDITransferEventType)10 ){ + if(outError != kSDIErrorNone){ + m_LastError = outError; + return false; +@@ -2632,7 +2632,7 @@ bool Supervisor::Set_All_Value(void) + } + { + SDIInt current; +- if(device_data.ScanArea.FixedSize == USER_DEFINE){ ++ if(device_data.ScanArea.FixedSize == (DocumentSize)USER_DEFINE){ + current = device_data.ScanArea.PaperEndDetection.select; + }else { + current = false; +@@ -3712,7 +3712,7 @@ bool Supervisor::Set_Exclusion_Value(void) + } + { + SDIInt current; +- if(device_data.ScanArea.FixedSize == USER_DEFINE){ ++ if(device_data.ScanArea.FixedSize == (DocumentSize)USER_DEFINE){ + current = device_data.ScanArea.PaperEndDetection.select; + }else { + current = false; diff --git a/graphics/epsonscan2/files/patch-src_Standalone_widthdoublespinbox.cpp b/graphics/epsonscan2/files/patch-src_Standalone_widthdoublespinbox.cpp new file mode 100644 index 000000000000..b161bf14beee --- /dev/null +++ b/graphics/epsonscan2/files/patch-src_Standalone_widthdoublespinbox.cpp @@ -0,0 +1,11 @@ +--- src/Standalone/widthdoublespinbox.cpp.orig 2021-11-25 00:56:56 UTC ++++ src/Standalone/widthdoublespinbox.cpp +@@ -116,7 +116,7 @@ bool WidthDoubleSpinBox::isUnit_inchi(void) + Units units = config.config_para.units; + if(units == unit_inchi){ + return true; +- }else if(units == unit_mm){ ++ }else{ + return false; + } + } diff --git a/graphics/epsonscan2/files/patch-thirdparty_zlib_gzread.c b/graphics/epsonscan2/files/patch-thirdparty_zlib_gzread.c new file mode 100644 index 000000000000..850344020819 --- /dev/null +++ b/graphics/epsonscan2/files/patch-thirdparty_zlib_gzread.c @@ -0,0 +1,10 @@ +--- thirdparty/zlib/gzread.c.orig 2021-11-25 00:56:54 UTC ++++ thirdparty/zlib/gzread.c +@@ -4,6 +4,7 @@ + */ + + #include "gzguts.h" ++#include + + /* Local functions */ + local int gz_load OF((gz_statep, unsigned char *, unsigned, unsigned *)); diff --git a/graphics/epsonscan2/files/patch-thirdparty_zlib_gzwrite.c b/graphics/epsonscan2/files/patch-thirdparty_zlib_gzwrite.c new file mode 100644 index 000000000000..66ce0365b2e1 --- /dev/null +++ b/graphics/epsonscan2/files/patch-thirdparty_zlib_gzwrite.c @@ -0,0 +1,10 @@ +--- thirdparty/zlib/gzwrite.c.orig 2021-11-25 00:56:54 UTC ++++ thirdparty/zlib/gzwrite.c +@@ -4,6 +4,7 @@ + */ + + #include "gzguts.h" ++#include + + /* Local functions */ + local int gz_init OF((gz_statep)); diff --git a/graphics/epsonscan2/files/pkg-message.in b/graphics/epsonscan2/files/pkg-message.in new file mode 100644 index 000000000000..033d2a8f2f4a --- /dev/null +++ b/graphics/epsonscan2/files/pkg-message.in @@ -0,0 +1,17 @@ +[ +{ type: install + message: <