diff options
-rw-r--r-- | graphics/Makefile | 1 | ||||
-rw-r--r-- | graphics/sane-airscan/Makefile | 31 | ||||
-rw-r--r-- | graphics/sane-airscan/distinfo | 3 | ||||
-rw-r--r-- | graphics/sane-airscan/files/patch-Makefile | 21 | ||||
-rw-r--r-- | graphics/sane-airscan/pkg-descr | 17 | ||||
-rw-r--r-- | graphics/sane-airscan/pkg-message | 20 | ||||
-rw-r--r-- | graphics/sane-airscan/pkg-plist | 8 |
7 files changed, 101 insertions, 0 deletions
diff --git a/graphics/Makefile b/graphics/Makefile index 67523045893d..11943f963b00 100644 --- a/graphics/Makefile +++ b/graphics/Makefile @@ -1002,6 +1002,7 @@ SUBDIR += sage SUBDIR += sam2p SUBDIR += sampleicc + SUBDIR += sane-airscan SUBDIR += sane-backends SUBDIR += sane-epkowa SUBDIR += scale2x diff --git a/graphics/sane-airscan/Makefile b/graphics/sane-airscan/Makefile new file mode 100644 index 000000000000..c9ffb679beff --- /dev/null +++ b/graphics/sane-airscan/Makefile @@ -0,0 +1,31 @@ +PORTNAME= sane-airscan +DISTVERSION= 0.99.26 +CATEGORIES= graphics + +MAINTAINER= henry.hu.sh@gmail.com +COMMENT= SANE backend for AirScan (eSCL) and WSD document scanners + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/LICENSE + +LIB_DEPENDS= libavahi-client.so:net/avahi-app \ + libpng.so:graphics/png \ + libgnutls.so:security/gnutls +BUILD_DEPENDS= sane-backends>0:graphics/sane-backends + +USES= gmake gnome jpeg pkgconfig +USE_GNOME= libxml2 +USE_GITHUB= yes +GH_ACCOUNT= alexpevzner + +MAKE_ARGS= CC=${CC} PKG_CONFIG=pkgconf + +MANPAGES= sane-airscan.5 airscan-discover.1 + +post-install: + @${MV} ${STAGEDIR}${PREFIX}/etc/sane.d/airscan.conf \ + ${STAGEDIR}${PREFIX}/etc/sane.d/airscan.conf.sample + ${RLN} ${STAGEDIR}${PREFIX}/lib/sane/libsane-airscan.so.1 \ + ${STAGEDIR}${PREFIX}/lib/sane/libsane-airscan.so + +.include <bsd.port.mk> diff --git a/graphics/sane-airscan/distinfo b/graphics/sane-airscan/distinfo new file mode 100644 index 000000000000..4938ddffc27a --- /dev/null +++ b/graphics/sane-airscan/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1630878170 +SHA256 (alexpevzner-sane-airscan-0.99.26_GH0.tar.gz) = f124d51e1510a4950454794eba0ba633e4b58d312cdeb26b80deb192d563ce5e +SIZE (alexpevzner-sane-airscan-0.99.26_GH0.tar.gz) = 196488 diff --git a/graphics/sane-airscan/files/patch-Makefile b/graphics/sane-airscan/files/patch-Makefile new file mode 100644 index 000000000000..2b752b8f48c7 --- /dev/null +++ b/graphics/sane-airscan/files/patch-Makefile @@ -0,0 +1,21 @@ +--- Makefile.orig 2021-04-16 08:52:40 UTC ++++ Makefile +@@ -29,7 +29,8 @@ + + CC = gcc + COMPRESS = gzip -n +-CFLAGS += -O2 -g -W -Wall -Werror -pthread $(CPPFLAGS) ++CFLAGS ?= -O2 -g -W -Wall -Werror ++CFLAGS += -pthread $(CPPFLAGS) + PKG_CONFIG = pkg-config + STRIP = -s + INSTALL = install +@@ -101,7 +102,7 @@ $(OBJDIR)%.o: %.c Makefile airscan.h + + .PHONY: all clean install man + +-all: tags $(BACKEND) $(DISCOVER) test test-decode test-multipart test-zeroconf test-uri ++all: $(BACKEND) $(DISCOVER) test test-decode test-multipart test-zeroconf test-uri + + tags: $(SRC) airscan.h test.c test-decode.c test-multipart.c test-zeroconf.c test-uri.c + -ctags -R . diff --git a/graphics/sane-airscan/pkg-descr b/graphics/sane-airscan/pkg-descr new file mode 100644 index 000000000000..02ff0fce01e9 --- /dev/null +++ b/graphics/sane-airscan/pkg-descr @@ -0,0 +1,17 @@ +SANE backend for AirScan (eSCL) and WSD document scanner + +Similar to how most modern network printers support "driverless" printing, +using the universal vendor-neutral printing protocol, many modern network +scanners and MFPs support "driverless" scanning. + +Driverless scanning comes in two flavors: + +* Apple AirScan or AirPrint scanning (official protocol name is eSCL) +* Microsoft WSD, or WS-Scan (term WSD means "Web Services for Devices) + +This backend implements both protocols, choosing automatically between them. +It was successfully tested with many devices from Brother, Canon, Dell, +Kyocera, Lexmark, Epson, HP, OKI, Panasonic, Pantum, Ricoh, Samsung and +Xerox both in WSD and eSCL modes. + +WWW: https://github.com/alexpevzner/sane-airscan diff --git a/graphics/sane-airscan/pkg-message b/graphics/sane-airscan/pkg-message new file mode 100644 index 000000000000..e3fdc845c2b4 --- /dev/null +++ b/graphics/sane-airscan/pkg-message @@ -0,0 +1,20 @@ +[ +{ type: install + message: <<EOM + To make the automatic discovery work, you need to have avahi-daemon running. + Make sure that + + avahi_daemon_enable="YES" + + is in /etc/rc.conf(.local), and start the avahi-daemon service. Some other + program, such as Firefox, may also bind to the mDNS port (5353), so make sure + that avahi-daemon can bind to the port. + + To quickly check if your scanner can be discovered, run + + avahi-browse -r _uscan._tcp + + You should see your scanner listed in the result. +EOM +} +] diff --git a/graphics/sane-airscan/pkg-plist b/graphics/sane-airscan/pkg-plist new file mode 100644 index 000000000000..6e88c50746a5 --- /dev/null +++ b/graphics/sane-airscan/pkg-plist @@ -0,0 +1,8 @@ +bin/airscan-discover +@sample etc/sane.d/airscan.conf.sample +etc/sane.d/dll.d/airscan +lib/sane/libsane-airscan.so +lib/sane/libsane-airscan.so.1 +share/man/man1/airscan-discover.1.gz +share/man/man5/sane-airscan.5.gz + |