diff options
Diffstat (limited to 'app-crypt/nitrokey-app/files/nitrokey-app-1.4-Make-BASH_COMPLETION_DIR-user-overridable.patch')
-rw-r--r-- | app-crypt/nitrokey-app/files/nitrokey-app-1.4-Make-BASH_COMPLETION_DIR-user-overridable.patch | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/app-crypt/nitrokey-app/files/nitrokey-app-1.4-Make-BASH_COMPLETION_DIR-user-overridable.patch b/app-crypt/nitrokey-app/files/nitrokey-app-1.4-Make-BASH_COMPLETION_DIR-user-overridable.patch deleted file mode 100644 index 4acfe55abd05..000000000000 --- a/app-crypt/nitrokey-app/files/nitrokey-app-1.4-Make-BASH_COMPLETION_DIR-user-overridable.patch +++ /dev/null @@ -1,46 +0,0 @@ -From e5036fab19c11a09ab350761ec03f54aa5fcb70c Mon Sep 17 00:00:00 2001 -From: David Seifert <soap@gentoo.org> -Date: Sun, 16 Aug 2020 19:54:18 +0200 -Subject: [PATCH] Make BASH_COMPLETION_DIR user overridable - ---- - CMakeLists.txt | 22 +++++++++++++++------- - 1 file changed, 15 insertions(+), 7 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 5feb2c0..1ab3f1a 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -163,14 +163,22 @@ IF(NOT WIN32) - # Removed - should be provided by libnitrokey - - # Install autocompletion scripts -- set(PKG_GET_BASH_COMPLETION ${PKG_CONFIG_EXECUTABLE} --variable=completionsdir bash-completion) -- execute_process(COMMAND ${PKG_GET_BASH_COMPLETION} RESULT_VARIABLE ERR OUTPUT_VARIABLE BASH_COMPLETION_DIR OUTPUT_STRIP_TRAILING_WHITESPACE) -- IF(${ERR}) -- set(BASH_COMPLETION_DIR "etc/bash_completion.d") -+ set(BASH_COMPLETION_PATH "" CACHE STRING "Directory for installing bash autocompletion files. The default (empty) means we will try to autodetect it") -+ -+ IF(BASH_COMPLETION_PATH STREQUAL "") -+ message(STATUS "Trying to autodetect bash autocompletion directory") -+ set(PKG_GET_BASH_COMPLETION ${PKG_CONFIG_EXECUTABLE} --variable=completionsdir bash-completion) -+ execute_process(COMMAND ${PKG_GET_BASH_COMPLETION} RESULT_VARIABLE ERR OUTPUT_VARIABLE BASH_COMPLETION_DIR OUTPUT_STRIP_TRAILING_WHITESPACE) -+ IF(${ERR}) -+ set(BASH_COMPLETION_DIR "etc/bash_completion.d") -+ ENDIF() -+ string(REGEX REPLACE "^/" "" BASH_COMPLETION_DIR "${BASH_COMPLETION_DIR}") -+ string(REGEX REPLACE "^usr/" "" BASH_COMPLETION_DIR "${BASH_COMPLETION_DIR}") # usual prefix is usr/local -+ message(STATUS "Setting bash-completion dir to ${BASH_COMPLETION_DIR}") -+ ELSE() -+ message(STATUS "User-provided bash autocompletion directory: ${BASH_COMPLETION_PATH}") -+ set(BASH_COMPLETION_DIR ${BASH_COMPLETION_PATH}) - ENDIF() -- string(REGEX REPLACE "^/" "" BASH_COMPLETION_DIR "${BASH_COMPLETION_DIR}") -- string(REGEX REPLACE "^usr/" "" BASH_COMPLETION_DIR "${BASH_COMPLETION_DIR}") # usual prefix is usr/local -- message(STATUS "Setting bash-completion dir to ${BASH_COMPLETION_DIR}") - - install(FILES - ${CMAKE_SOURCE_DIR}/data/bash-autocomplete/nitrokey-app --- -2.28.0 - |