Created attachment 213294 [details]
shar for the new port
This is an Apple AirScan (eSCL) driver for Scanner Access Now Easy (SANE). It automatically discovers AirScan-compatible scanners in the local network, and makes them available to the SANE framework.
Personally, I used it successfully with my Canon TS9020 printer.
Created attachment 213295 [details]
poudriere log for 11.3/i386
Created attachment 213296 [details]
poudriere log for 12.1/amd64
The latest version of sane-backends already comes with an escl driver
when built with AVAHI=on. How is this different and do we really need
Strictly speaking, we don't: they provide mostly the same functionality (driver for eSCL scanners). However, we don't restrict port collection to "only 1 port for a feature", right?
I tried to enable escl backend and it didnt' work, then I moved to this backend. However I noticed later that it's not installed by default. After rebuilding with AVAHI=on, it worked, although the airscan backend still have some advantage over it:
* It shows the device name, instead of IP, in device selection.
* It defaults to 300dpi which makes more sense.
* It shows geometry in a more reasonable unit (mm).
These are minor points, so they aren't different fundamentally.
So, if you say "we only want one backend, and that's the escl backend", then fine, please enable AVAHI by default, which may help other people as well, as they don't need to research on why their scanners don't "just work". Otherwise, people may at least find this port and find it useful.
I want to notify everybody who may be interested, that I've recently released a new version of sane-airscan with added WSD protocol support.
The detailed announce can be found in the sane-devel mail list.
This version may be more difficult to port to FreeBSD, because it uses some Linux-specific stuff like rtnetlink (WS-Discovery code needs notifications when network interfaces are enabled or disabled).
Don't hesitate to contact me if you need some help
I can confirm that this allows one to use scanners that are announced on the local network with Microsoft WSD ("Web Services for Devices"), also known as WS-Scan. This is very useful for devices that support WSD but do not support eSCL.
Using this, I was successfully able to scan from a HP LaserJet 200 colorMFP M276n using Xsane and skanlite on FreeBSD, which was otherwise not possible.
This is very useful, it would be great to see a port and a package for this.
Thank you very much Alexander Pevzner for making this driver and for working with me to get it to compile on FreeBSD.
Relevant FreeBSD specific build topic:
^Triage: To progress this issue:
- Provide an updated patch if a "new version" (per comment 5) is appropriate, that is QA'd (with portlint, poudriere at least), in particular given "may be more difficult to port to FreeBSD" (has it been ported?), OR ...
- Confirmation, or not, from reporter/author whether or not the existing patch is (still) appropriate in its existing form without further changes for inclusion in ports, per question in comment 3 and response in comment 4
The most recent (git) version of sane-airscan supports FreeBSD "natively", just a matter of gmake; make ginstall (assuming that you have all required libraries installed).
I'm currently waiting for confirmation that FreeBSD-specific changes didn't break something on OpenBSD. As soon as I will get this confirmation, I'll create the next, 0.99.23 release.
So patch is probably not required.
Created attachment 221725 [details]
shar for the new port
* Updated to 0.99.23
Almost all patches are not needed. The only remaining patch is for fixing build on i386 (reported upstream: https://github.com/alexpevzner/sane-airscan/issues/117).
* Now it depends on gnutls and libpng.
* The manpage is now installed to /usr/local/share/man. I noticed some ports install there (like ncurses), while others install to /usr/local/man. Both seem to work. Is this the correct place?
Created attachment 222316 [details]
updated to 0.99.24
Updated to 0.99.24. The new version includes the patch for i386, so it can be removed.
Created attachment 222317 [details]
fixed patch for new version
Didn't notice that it added some new files. Fixed.
Created attachment 222318 [details]
Poudriere log for 12.2-RELEASE-p2/amd64
Created attachment 222320 [details]
Poudriere log for 12.2-RELEASE-p2/i386
Updated the port, and now it builds without patch.
A few things that can be improved
Please sort USES= in alphabetical order
Make use of USES= instead of LIB_DEPENDS
jpeg-turbo --> https://svnweb.freebsd.org/ports/head/Mk/Uses/jpeg.mk?revision=556784&view=markup
libxml2 --> https://svnweb.freebsd.org/ports/head/Mk/Uses/gnome.mk?revision=564196&view=markup
Framework CFLAGS gets overridden by ones set by the port (needs fixing)
Does it pass portlint?
Created attachment 222357 [details]
Updated according to comments:
* moved libxml2 to USE_GNOME
* moved jpeg to USE
* sorted USE
* patched Makefile to use external CFLAGS. Kept -pthread and $(CPPFLAGS)