Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107347418
D31918.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D31918.diff
View Options
diff --git a/graphics/Makefile b/graphics/Makefile
--- 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
--- /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
--- /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
--- /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
--- /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
--- /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
--- /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
+
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 13, 8:22 PM (17 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15786773
Default Alt Text
D31918.diff (4 KB)
Attached To
Mode
D31918: graphics/sane-airscan: AirScan backend for SANE
Attached
Detach File
Event Timeline
Log In to Comment