diff options
author | David Seifert <soap@gentoo.org> | 2020-08-16 20:10:55 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2020-08-16 20:10:55 +0200 |
commit | 8b565d4b9e871dbde172da1a2a356a25684a4f68 (patch) | |
tree | 477023d83442638d6de93967f7aa6425f1cb8d1b /app-crypt | |
parent | dev-perl/Cpanel-JSON-XS: Bump to version 4.210.0 (diff) | |
download | gentoo-8b565d4b9e871dbde172da1a2a356a25684a4f68.tar.gz gentoo-8b565d4b9e871dbde172da1a2a356a25684a4f68.tar.bz2 gentoo-8b565d4b9e871dbde172da1a2a356a25684a4f68.zip |
app-crypt/nitrokey-app: Fix installing bash auto-completion
Closes: https://bugs.gentoo.org/736956
Package-Manager: Portage-3.0.2, Repoman-2.3.23
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'app-crypt')
-rw-r--r-- | app-crypt/nitrokey-app/files/nitrokey-app-1.4-Make-BASH_COMPLETION_DIR-user-overridable.patch | 46 | ||||
-rw-r--r-- | app-crypt/nitrokey-app/nitrokey-app-1.4-r1.ebuild (renamed from app-crypt/nitrokey-app/nitrokey-app-1.4.ebuild) | 4 |
2 files changed, 50 insertions, 0 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 new file mode 100644 index 000000000000..4acfe55abd05 --- /dev/null +++ b/app-crypt/nitrokey-app/files/nitrokey-app-1.4-Make-BASH_COMPLETION_DIR-user-overridable.patch @@ -0,0 +1,46 @@ +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 + diff --git a/app-crypt/nitrokey-app/nitrokey-app-1.4.ebuild b/app-crypt/nitrokey-app/nitrokey-app-1.4-r1.ebuild index 959c79c33783..faf50aa87f42 100644 --- a/app-crypt/nitrokey-app/nitrokey-app-1.4.ebuild +++ b/app-crypt/nitrokey-app/nitrokey-app-1.4-r1.ebuild @@ -36,6 +36,10 @@ BDEPEND=" dev-qt/linguist-tools:5 virtual/pkgconfig" +PATCHES=( "${FILESDIR}"/${P}-Make-BASH_COMPLETION_DIR-user-overridable.patch ) + +mycmakeargs=( -DBASH_COMPLETION_PATH=share/bash-completion/completions ) + pkg_postinst() { xdg_icon_cache_update } |