diff options
Diffstat (limited to 'graphics/airsaned/files/patch-CMakeLists.txt')
-rw-r--r-- | graphics/airsaned/files/patch-CMakeLists.txt | 80 |
1 files changed, 33 insertions, 47 deletions
diff --git a/graphics/airsaned/files/patch-CMakeLists.txt b/graphics/airsaned/files/patch-CMakeLists.txt index 34f75f731952..72fce98f6e20 100644 --- a/graphics/airsaned/files/patch-CMakeLists.txt +++ b/graphics/airsaned/files/patch-CMakeLists.txt @@ -1,19 +1,11 @@ ---- CMakeLists.txt.orig 2021-09-18 16:22:32 UTC +--- CMakeLists.txt.orig 2021-02-01 18:41:51 UTC +++ CMakeLists.txt -@@ -20,6 +20,7 @@ endif() - - set(THREADS_PREFER_PTHREAD_FLAG ON) - find_package(Threads REQUIRED) -+include(GNUInstallDirs) - - include_directories(.) - if(APPLE) -@@ -66,6 +67,13 @@ add_executable(${PROJECT_NAME} +@@ -67,6 +67,13 @@ add_executable(${PROJECT_NAME} zeroconf/hotplugnotifier.cpp ${ZEROCONF_FILES} ) + -+if(CMAKE_SYSTEM_NAME STREQUAL FreeBSD) ++if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") + set(USB_LIBRARY usb) +else() + set(USB_LIBRARY usb-1.0) @@ -22,7 +14,7 @@ target_link_libraries( ${PROJECT_NAME} Threads::Threads -@@ -73,7 +81,7 @@ target_link_libraries( +@@ -74,7 +79,7 @@ target_link_libraries( jpeg png ${ZEROCONF_LIBS} @@ -31,41 +23,35 @@ ) if(APPLE) -@@ -105,8 +113,10 @@ install(CODE " - else() +@@ -102,8 +107,31 @@ install(CODE " + endif() + ") - install(TARGETS ${PROJECT_NAME} -- RUNTIME DESTINATION bin -+ RUNTIME DESTINATION ${BINDIR} - ) -+ -+if(CMAKE_SYSTEM_NAME STREQUAL Linux) - install(FILES systemd/airsaned.service - DESTINATION /lib/systemd/system - ) -@@ -114,21 +124,9 @@ install(FILES systemd/airsaned.default - DESTINATION /etc/default - RENAME airsane - ) -+endif() ++elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") --install(CODE " -- if(NOT EXISTS /etc/airsane/ignore.conf) -- file(INSTALL ${CMAKE_SOURCE_DIR}/etc/ignore.conf DESTINATION /etc/airsane) -- endif() --") --install(CODE " -- if(NOT EXISTS /etc/airsane/options.conf) -- file(INSTALL ${CMAKE_SOURCE_DIR}/etc/options.conf DESTINATION /etc/airsane) -- endif() --") --install(CODE " -- if(NOT EXISTS /etc/airsane/Gnome-scanner.png) -- file(INSTALL ${CMAKE_SOURCE_DIR}/etc/Gnome-scanner.png DESTINATION /etc/airsane) -- endif() --") -- -+install(FILES etc/ignore.conf etc/options.conf etc/Gnome-scanner.png -+ DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/airsane ++set(STAGEDIR "%%STAGEDIR%%") ++ ++install(TARGETS ${PROJECT_NAME} ++ RUNTIME DESTINATION sbin +) - endif() ++ ++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 |