[chrome-gnome-shell] cmake: do not install redundand files for FreeBSD.



commit f13aa7a6aa7802d5433deff80563387a9611d401
Author: Yuri Konotopov <ykonotopov gnome org>
Date:   Sun Sep 3 23:57:30 2017 +0400

    cmake: do not install redundand files for FreeBSD.
    
    Thanks to Carlos J. Puga Medina.

 CMakeLists.txt |   20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4c3eed4..a21448d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -183,8 +183,17 @@ if(BUILD_CONNECTOR)
                                        install ${DISTUTILS_EXTRA_ARGS}
                                                --root \"\${DESTDIR}\"
                                                --prefix \"${CMAKE_INSTALL_PREFIX}\")")
-       install(FILES "${CMAKE_BINARY_DIR}/org.gnome.chrome_gnome_shell.json" DESTINATION 
"/etc/chromium/native-messaging-hosts/")
-       install(FILES "${CMAKE_BINARY_DIR}/org.gnome.chrome_gnome_shell.json" DESTINATION 
"/etc/opt/chrome/native-messaging-hosts/")
+
+       if(NOT CMAKE_SYSTEM_NAME MATCHES "DragonFly.*|FreeBSD")
+           install(FILES "${CMAKE_BINARY_DIR}/org.gnome.chrome_gnome_shell.json" DESTINATION 
"/etc/chromium/native-messaging-hosts/")
+           install(FILES "${CMAKE_BINARY_DIR}/org.gnome.chrome_gnome_shell.json" DESTINATION 
"/etc/opt/chrome/native-messaging-hosts/")
+    else(NOT CMAKE_SYSTEM_NAME MATCHES "DragonFly.*|FreeBSD")
+           # FreeBSD uses patch that forces Chromium to look into undocumented
+           # "/usr/local/etc/chrome/native-messaging-hosts" folder for native messaging host manifest.
+           # 
https://github.com/freebsd/freebsd-ports/blob/master/www/chromium/files/patch-chrome_common_chrome__paths.cc
+               install(FILES "${CMAKE_BINARY_DIR}/org.gnome.chrome_gnome_shell.json" DESTINATION 
"/usr/local/etc/chrome/native-messaging-hosts/")
+       endif(NOT CMAKE_SYSTEM_NAME MATCHES "DragonFly.*|FreeBSD")
+
        install(FILES "${CMAKE_BINARY_DIR}/org.gnome.chrome_gnome_shell.firefox.json"
                        DESTINATION "${CMAKE_INSTALL_LIBDIR}/mozilla/native-messaging-hosts/"
                        RENAME "org.gnome.chrome_gnome_shell.json")
@@ -201,13 +210,6 @@ if(BUILD_CONNECTOR)
        install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/extension/icons/GnomeLogo-128.png"
                DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/gnome/128x128/apps/"
                RENAME org.gnome.ChromeGnomeShell.png)
-
-       # There is wrong patch in FreeBSD that forces Chromium to look into
-       # /usr/local/etc/chrome/native-messaging-hosts for native messaging host manifest.
-       # https://svn0.us-east.freebsd.org/ports/head/www/chromium/files/patch-chrome_common_chrome__paths.cc
-       if(CMAKE_SYSTEM_NAME MATCHES "DragonFly.*|FreeBSD")
-               install(FILES "${CMAKE_BINARY_DIR}/org.gnome.chrome_gnome_shell.json" DESTINATION 
"/usr/local/etc/chrome/native-messaging-hosts/")
-       endif(CMAKE_SYSTEM_NAME MATCHES "DragonFly.*|FreeBSD")
 endif(BUILD_CONNECTOR)
 
 if(BUILD_SOURCE_PACKAGE)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]