diff options
Diffstat (limited to 'graphics/airsaned/files')
-rw-r--r-- | graphics/airsaned/files/airsaned.in | 24 | ||||
-rw-r--r-- | graphics/airsaned/files/patch-CMakeLists.txt | 89 | ||||
-rw-r--r-- | graphics/airsaned/files/patch-imageformats-pngencoder.cpp | 20 | ||||
-rw-r--r-- | graphics/airsaned/files/patch-server-mainserver.cpp | 16 | ||||
-rw-r--r-- | graphics/airsaned/files/patch-server_server.cpp | 20 | ||||
-rw-r--r-- | graphics/airsaned/files/patch-web-httpserver.cpp | 12 | ||||
-rw-r--r-- | graphics/airsaned/files/patch-zeroconf-hotplugnotifier.cpp | 14 |
7 files changed, 60 insertions, 135 deletions
diff --git a/graphics/airsaned/files/airsaned.in b/graphics/airsaned/files/airsaned.in deleted file mode 100644 index 02b9a57251ac..000000000000 --- a/graphics/airsaned/files/airsaned.in +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -# PROVIDE: airsaned -# REQUIRE: LOGIN -# KEYWORD: shutdown -# -# Add the following line to /etc/rc.conf[.local] to enable airsaned: -# airsaned_enable="YES" - -. /etc/rc.subr - -name=airsaned -rcvar=airsaned_enable - -load_rc_config airsane - -: ${airsaned_enable:="NO"} -: ${airsaned_args:=""} - -command="%%PREFIX%%/sbin/${name}" -command_args="${airsaned_args} &" -sig_stop="KILL" - -run_rc_command "$1" diff --git a/graphics/airsaned/files/patch-CMakeLists.txt b/graphics/airsaned/files/patch-CMakeLists.txt index 72fce98f6e20..f9d9f430c839 100644 --- a/graphics/airsaned/files/patch-CMakeLists.txt +++ b/graphics/airsaned/files/patch-CMakeLists.txt @@ -1,57 +1,48 @@ ---- CMakeLists.txt.orig 2021-02-01 18:41:51 UTC +--- CMakeLists.txt.orig 2021-10-19 16:15:25 UTC +++ CMakeLists.txt -@@ -67,6 +67,13 @@ add_executable(${PROJECT_NAME} - zeroconf/hotplugnotifier.cpp - ${ZEROCONF_FILES} - ) -+ -+if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") -+ set(USB_LIBRARY usb) +@@ -113,7 +113,6 @@ install(CODE " + endif() + ") + +- + elseif(CMAKE_SYSTEM_NAME STREQUAL FreeBSD) + + if ($ENV{PREFIX}) +@@ -122,27 +121,33 @@ else() + # default is "/usr/local" + endif() + ++if ($ENV{STAGEDIR}) ++ set(CMAKE_INSTALL_STAGEDIR $ENV{STAGEDIR}) +else() -+ set(USB_LIBRARY usb-1.0) ++ set(CMAKE_INSTALL_STAGEDIR "../stage") +endif() + - target_link_libraries( - ${PROJECT_NAME} - Threads::Threads -@@ -74,7 +79,7 @@ target_link_libraries( - jpeg - png - ${ZEROCONF_LIBS} -- usb-1.0 -+ ${USB_LIBRARY} + install(TARGETS ${PROJECT_NAME} + RUNTIME DESTINATION sbin ) - if(APPLE) -@@ -102,8 +107,31 @@ install(CODE " + install(CODE " +- if(NOT EXISTS ${CMAKE_INSTALL_PREFIX}/etc/airsane/ignore.conf) ++ if(NOT EXISTS ${CMAKE_INSTALL_STAGEDIR}/${CMAKE_INSTALL_PREFIX}/etc/airsane/ignore.conf) + file(INSTALL ${CMAKE_SOURCE_DIR}/etc/ignore.conf DESTINATION ${CMAKE_INSTALL_PREFIX}/etc/airsane) + endif() + ") + install(CODE " +- if(NOT EXISTS ${CMAKE_INSTALL_PREFIX}/etc/airsane/options.conf) ++ if(NOT EXISTS ${CMAKE_INSTALL_STAGEDIR}/${CMAKE_INSTALL_PREFIX}/etc/airsane/options.conf) + file(INSTALL ${CMAKE_SOURCE_DIR}/etc/options.conf DESTINATION ${CMAKE_INSTALL_PREFIX}/etc/airsane) + endif() + ") + install(CODE " +- if(NOT EXISTS ${CMAKE_INSTALL_PREFIX}/etc/airsane/Gnome-scanner.png) ++ if(NOT EXISTS ${CMAKE_INSTALL_STAGEDIR}/${CMAKE_INSTALL_PREFIX}/etc/airsane/Gnome-scanner.png) + file(INSTALL ${CMAKE_SOURCE_DIR}/etc/Gnome-scanner.png DESTINATION ${CMAKE_INSTALL_PREFIX}/etc/airsane) + endif() + ") + install(CODE " +- if(NOT EXISTS ${CMAKE_INSTALL_PREFIX}/etc/rc.d/airsaned) ++ if(NOT EXISTS ${CMAKE_INSTALL_STAGEDIR}/${CMAKE_INSTALL_PREFIX}/etc/rc.d/airsaned) + file(INSTALL ${CMAKE_SOURCE_DIR}/freebsd/airsaned DESTINATION ${CMAKE_INSTALL_PREFIX}/etc/rc.d) endif() ") - -+elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") - -+set(STAGEDIR "%%STAGEDIR%%") -+ -+install(TARGETS ${PROJECT_NAME} -+ RUNTIME DESTINATION sbin -+) -+ -+install(CODE " -+ if(NOT EXISTS ${STAGEDIR}/usr/local/etc/airsane/ignore.conf) -+ file(INSTALL ${CMAKE_SOURCE_DIR}/etc/ignore.conf DESTINATION /usr/local/etc/airsane) -+ endif() -+") -+install(CODE " -+ if(NOT EXISTS ${STAGEDIR}/usr/local/etc/airsane/options.conf) -+ file(INSTALL ${CMAKE_SOURCE_DIR}/etc/options.conf DESTINATION /usr/local/etc/airsane) -+ endif() -+") -+install(CODE " -+ if(NOT EXISTS ${STAGEDIR}/usr/local/etc/airsane/Gnome-scanner.png) -+ file(INSTALL ${CMAKE_SOURCE_DIR}/etc/Gnome-scanner.png DESTINATION /usr/local/etc/airsane) -+ endif() -+") -+ - else() - - install(TARGETS ${PROJECT_NAME} - RUNTIME DESTINATION bin diff --git a/graphics/airsaned/files/patch-imageformats-pngencoder.cpp b/graphics/airsaned/files/patch-imageformats-pngencoder.cpp deleted file mode 100644 index 14d8e66c4d75..000000000000 --- a/graphics/airsaned/files/patch-imageformats-pngencoder.cpp +++ /dev/null @@ -1,20 +0,0 @@ ---- imageformats/pngencoder.cpp.orig 2021-02-01 18:41:51 UTC -+++ imageformats/pngencoder.cpp -@@ -17,11 +17,17 @@ along with this program. If not, see <http://www.gnu. - */ - - #include "pngencoder.h" -+#ifdef __FreeBSD__ -+#include <png.h> -+#else - #include <libpng/png.h> -+#endif - #include <stdexcept> - #include <vector> - #if __APPLE__ - #include <machine/endian.h> -+#elif __FreeBSD__ -+#include <sys/endian.h> - #else - #include <endian.h> - #endif diff --git a/graphics/airsaned/files/patch-server-mainserver.cpp b/graphics/airsaned/files/patch-server-mainserver.cpp deleted file mode 100644 index 5eb30b1a912f..000000000000 --- a/graphics/airsaned/files/patch-server-mainserver.cpp +++ /dev/null @@ -1,16 +0,0 @@ ---- server/mainserver.cpp.orig 2021-02-01 18:41:51 UTC -+++ server/mainserver.cpp -@@ -83,11 +83,11 @@ MainServer::MainServer(int argc, char** argv) - "ignore SANE network scanners", - localonly }, - { "options-file", -- "/etc/airsane/options.conf", -+ "%%PREFIX%%/etc/airsane/options.conf", - "location of device options file", - optionsfile }, - { "ignore-list", -- "/etc/airsane/ignore.conf", -+ "%%PREFIX%%/etc/airsane/ignore.conf", - "location of device ignore list", - ignorelist }, - { "random-uuids", diff --git a/graphics/airsaned/files/patch-server_server.cpp b/graphics/airsaned/files/patch-server_server.cpp new file mode 100644 index 000000000000..d07045495d20 --- /dev/null +++ b/graphics/airsaned/files/patch-server_server.cpp @@ -0,0 +1,20 @@ +--- server/server.cpp.orig 2021-10-19 16:15:25 UTC ++++ server/server.cpp +@@ -104,7 +104,7 @@ Server::Server(int argc, char** argv) + localonly }, + { "options-file", + #ifdef __FreeBSD__ +- "/usr/local/etc/airsane/options.conf", ++ "%%PREFIX%%/etc/airsane/options.conf", + #else + "/etc/airsane/options.conf", + #endif +@@ -112,7 +112,7 @@ Server::Server(int argc, char** argv) + optionsfile }, + { "ignore-list", + #ifdef __FreeBSD__ +- "/usr/local/etc/airsane/ignore.conf", ++ "%%PREFIX%%/etc/airsane/ignore.conf", + #else + "/etc/airsane/ignore.conf", + #endif diff --git a/graphics/airsaned/files/patch-web-httpserver.cpp b/graphics/airsaned/files/patch-web-httpserver.cpp deleted file mode 100644 index cae26d5639a5..000000000000 --- a/graphics/airsaned/files/patch-web-httpserver.cpp +++ /dev/null @@ -1,12 +0,0 @@ ---- web/httpserver.cpp.orig 2021-02-01 18:41:51 UTC -+++ web/httpserver.cpp -@@ -26,6 +26,9 @@ along with this program. If not, see <http://www.gnu. - #include <thread> - - #include <arpa/inet.h> -+#ifdef __FreeBSD__ -+#include <netinet/in.h> -+#endif - #include <ifaddrs.h> - #include <net/if.h> - #include <netdb.h> diff --git a/graphics/airsaned/files/patch-zeroconf-hotplugnotifier.cpp b/graphics/airsaned/files/patch-zeroconf-hotplugnotifier.cpp deleted file mode 100644 index 2b7939c493c9..000000000000 --- a/graphics/airsaned/files/patch-zeroconf-hotplugnotifier.cpp +++ /dev/null @@ -1,14 +0,0 @@ ---- zeroconf/hotplugnotifier.cpp.orig 2021-10-05 12:35:03 UTC -+++ zeroconf/hotplugnotifier.cpp -@@ -20,7 +20,11 @@ along with this program. If not, see <http://www.gnu. - - #include <atomic> - #include <csignal> -+#ifdef __FreeBSD__ -+#include <libusb.h> -+#else - #include <libusb-1.0/libusb.h> -+#endif - #include <pthread.h> - #include <thread> - |