View | Details | Raw Unified | Return to bug 242144
Collapse All | Expand All

(-)b/graphics/Makefile (+1 lines)
Lines 43-48 Link Here
43
    SUBDIR += acidwarp
43
    SUBDIR += acidwarp
44
    SUBDIR += acidwarp-sdl
44
    SUBDIR += acidwarp-sdl
45
    SUBDIR += agg
45
    SUBDIR += agg
46
    SUBDIR += airsaned
46
    SUBDIR += akira
47
    SUBDIR += akira
47
    SUBDIR += alembic
48
    SUBDIR += alembic
48
    SUBDIR += aloadimage
49
    SUBDIR += aloadimage
(-)b/graphics/airsaned/Makefile (+29 lines)
Added Link Here
1
PORTNAME=	airsaned
2
DISTVERSIONPREFIX=	v
3
DISTVERSION=	0.3.2-50
4
DISTVERSIONSUFFIX=	-gdeab313
5
CATEGORIES=	graphics
6
7
MAINTAINER=	fbsd@opal.com
8
COMMENT=	Apple AirScan compatible SANE web frontend
9
10
LICENSE=	GPLv3
11
LICENSE_FILE=	${WRKSRC}/LICENSE
12
13
LIB_DEPENDS=	libavahi-client.so:net/avahi-app \
14
		libpng.so:graphics/png \
15
		libsane.so:graphics/sane-backends
16
17
USES=		cmake jpeg compiler:c++11-lib localbase:ldflags
18
USE_GITHUB=	yes
19
USE_RC_SUBR=	${PORTNAME}
20
21
GH_ACCOUNT=	SimulPiscator
22
GH_PROJECT=	AirSane
23
24
PLIST_FILES=	sbin/airsaned \
25
		etc/airsane/ignore.conf \
26
		etc/airsane/options.conf \
27
		etc/airsane/Gnome-scanner.png
28
29
.include <bsd.port.mk>
(-)b/graphics/airsaned/distinfo (+3 lines)
Added Link Here
1
TIMESTAMP = 1633432825
2
SHA256 (SimulPiscator-AirSane-v0.3.2-50-gdeab313_GH0.tar.gz) = a9df4ed9de8f59f07fe9d491bf9eb96c8168001ba0025b96bf97c39ac49e35e9
3
SIZE (SimulPiscator-AirSane-v0.3.2-50-gdeab313_GH0.tar.gz) = 115706
(-)b/graphics/airsaned/files/airsaned.in (+24 lines)
Added Link Here
1
#!/bin/sh
2
3
# PROVIDE: airsaned
4
# REQUIRE: LOGIN
5
# KEYWORD: shutdown
6
#
7
# Add the following line to /etc/rc.conf[.local] to enable airsaned:
8
#	airsaned_enable="YES"
9
10
. /etc/rc.subr
11
12
name=airsaned
13
rcvar=airsaned_enable
14
15
load_rc_config airsane
16
17
: ${airsaned_enable:="NO"}
18
: ${airsaned_args:=""}
19
20
command="%%PREFIX%%/sbin/${name}"
21
command_args="${airsaned_args} &"
22
sig_stop="KILL"
23
24
run_rc_command "$1"
(-)b/graphics/airsaned/files/patch-CMakeLists.txt (+59 lines)
Added Link Here
1
--- CMakeLists.txt.orig	2021-09-18 16:22:32 UTC
2
+++ CMakeLists.txt
3
@@ -66,6 +66,7 @@ add_executable(${PROJECT_NAME}
4
     zeroconf/hotplugnotifier.cpp
5
     ${ZEROCONF_FILES}
6
 )
7
+if(CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
8
 target_link_libraries(
9
     ${PROJECT_NAME}
10
     Threads::Threads
11
@@ -73,8 +74,19 @@ target_link_libraries(
12
     jpeg
13
     png
14
     ${ZEROCONF_LIBS}
15
+    usb
16
+)
17
+else()
18
+target_link_libraries(
19
+    ${PROJECT_NAME}
20
+    Threads::Threads
21
+    sane
22
+    jpeg
23
+    png
24
+    ${ZEROCONF_LIBS}
25
     usb-1.0
26
 )
27
+endif()
28
 
29
 if(APPLE)
30
 
31
@@ -101,6 +113,28 @@ install(CODE "
32
     endif()
33
 ")
34
 
35
+
36
+elseif(CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
37
+
38
+install(TARGETS ${PROJECT_NAME}
39
+    RUNTIME DESTINATION sbin
40
+)
41
+
42
+install(CODE "
43
+    if(NOT EXISTS /usr/local/etc/airsane/ignore.conf)
44
+        file(INSTALL ${CMAKE_SOURCE_DIR}/etc/ignore.conf DESTINATION /usr/local/etc/airsane)
45
+    endif()
46
+")
47
+install(CODE "
48
+    if(NOT EXISTS /usr/local/etc/airsane/options.conf)
49
+        file(INSTALL ${CMAKE_SOURCE_DIR}/etc/options.conf DESTINATION /usr/local/etc/airsane)
50
+    endif()
51
+")
52
+install(CODE "
53
+    if(NOT EXISTS /usr/local/etc/airsane/Gnome-scanner.png)
54
+        file(INSTALL ${CMAKE_SOURCE_DIR}/etc/Gnome-scanner.png DESTINATION /usr/local/etc/airsane)
55
+    endif()
56
+")
57
 
58
 else()
59
 
(-)b/graphics/airsaned/files/patch-imageformats-pngencoder.cpp (+18 lines)
Added Link Here
1
--- imageformats/pngencoder.cpp.orig	2021-09-18 16:22:32 UTC
2
+++ imageformats/pngencoder.cpp
3
@@ -17,13 +17,13 @@ along with this program.  If not, see <http://www.gnu.
4
 */
5
 
6
 #include "pngencoder.h"
7
-#include <libpng16/png.h>
8
+#include <png.h>
9
 #include <stdexcept>
10
 #include <vector>
11
 #if __APPLE__
12
 #include <machine/endian.h>
13
 #else
14
-#include <endian.h>
15
+#include <sys/endian.h>
16
 #endif
17
 #include <arpa/inet.h>
18
 
(-)b/graphics/airsaned/files/patch-server-server.cpp (+16 lines)
Added Link Here
1
--- server/server.cpp.orig	2021-09-18 16:22:32 UTC
2
+++ server/server.cpp
3
@@ -103,11 +103,11 @@ Server::Server(int argc, char** argv)
4
       "ignore SANE network scanners",
5
       localonly },
6
     { "options-file",
7
-      "/etc/airsane/options.conf",
8
+      "/usr/local/etc/airsane/options.conf",
9
       "location of device options file",
10
       optionsfile },
11
     { "ignore-list",
12
-      "/etc/airsane/ignore.conf",
13
+      "/usr/local/etc/airsane/ignore.conf",
14
       "location of device ignore list",
15
       ignorelist },
16
     { "debug", "false", "log debug information to stderr", debug },
(-)b/graphics/airsaned/files/patch-web-httpserver.cpp (+10 lines)
Added Link Here
1
--- web/httpserver.cpp.orig	2021-09-18 16:22:32 UTC
2
+++ web/httpserver.cpp
3
@@ -25,6 +25,7 @@ along with this program.  If not, see <http://www.gnu.
4
 #include <thread>
5
 
6
 #include <arpa/inet.h>
7
+#include <netinet/in.h>
8
 #include <ifaddrs.h>
9
 #include <net/if.h>
10
 #include <netdb.h>
(-)b/graphics/airsaned/files/patch-zeroconf-hotplugnotifier.cpp (+11 lines)
Added Link Here
1
--- zeroconf/hotplugnotifier.cpp.orig	2021-09-18 16:22:32 UTC
2
+++ zeroconf/hotplugnotifier.cpp
3
@@ -20,7 +20,7 @@ along with this program.  If not, see <http://www.gnu.
4
 
5
 #include <atomic>
6
 #include <csignal>
7
-#include <libusb-1.0/libusb.h>
8
+#include <libusb.h>
9
 #include <pthread.h>
10
 #include <thread>
11
 
(-)b/graphics/airsaned/pkg-descr (+21 lines)
Added Link Here
1
A SANE WebScan frontend that supports Apple's AirScan protocol.
2
Scanners are detected automatically, and published through mDNS.
3
Though images may be acquired and transferred in JPEG, PNG, and
4
PDF/raster format through a simple web interface, AirSane's intended
5
purpose is to be used with AirScan/eSCL clients such as Apple's
6
Image Capture.
7
8
Images are encoded on-the-fly during acquisition, keeping memory/storage
9
demands low. Thus, AirSane will run fine on a Raspberry Pi or similar
10
device.
11
12
AirSane has been developed by reverse-engineering the communication
13
protocol implemented in Apple's AirScanScanner client (macos 10.12.6,
14
/System/Library/Image Capture/Devices/AirScanScanner.app).
15
16
Authentication and secure communication are not supported.
17
18
If you are looking for a powerful SANE web frontend, AirSane may
19
not be for you. You may be interested in phpSANE instead.
20
21
WWW: https://github.com/SimulPiscator/AirSane

Return to bug 242144