From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6617D138359 for ; Sun, 16 Aug 2020 18:11:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A1D58E085A; Sun, 16 Aug 2020 18:11:13 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 794B0E085A for ; Sun, 16 Aug 2020 18:11:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A992C34EFC4 for ; Sun, 16 Aug 2020 18:11:11 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2E1D624C for ; Sun, 16 Aug 2020 18:11:10 +0000 (UTC) From: "David Seifert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Seifert" Message-ID: <1597601455.8b565d4b9e871dbde172da1a2a356a25684a4f68.soap@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/nitrokey-app/files/, app-crypt/nitrokey-app/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-crypt/nitrokey-app/files/nitrokey-app-1.4-Make-BASH_COMPLETION_DIR-user-overridable.patch app-crypt/nitrokey-app/nitrokey-app-1.4-r1.ebuild app-crypt/nitrokey-app/nitrokey-app-1.4.ebuild X-VCS-Directories: app-crypt/nitrokey-app/ app-crypt/nitrokey-app/files/ X-VCS-Committer: soap X-VCS-Committer-Name: David Seifert X-VCS-Revision: 8b565d4b9e871dbde172da1a2a356a25684a4f68 X-VCS-Branch: master Date: Sun, 16 Aug 2020 18:11:10 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b6868571-c548-4706-afb4-b4e083db5b7c X-Archives-Hash: 86c88e4b0c9a1e6f05946381a221961b commit: 8b565d4b9e871dbde172da1a2a356a25684a4f68 Author: David Seifert gentoo org> AuthorDate: Sun Aug 16 18:10:55 2020 +0000 Commit: David Seifert gentoo org> CommitDate: Sun Aug 16 18:10:55 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b565d4b 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 gentoo.org> ...Make-BASH_COMPLETION_DIR-user-overridable.patch | 46 ++++++++++++++++++++++ ...y-app-1.4.ebuild => nitrokey-app-1.4-r1.ebuild} | 4 ++ 2 files changed, 50 insertions(+) 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 00000000000..4acfe55abd0 --- /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 +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 similarity index 85% rename from app-crypt/nitrokey-app/nitrokey-app-1.4.ebuild rename to app-crypt/nitrokey-app/nitrokey-app-1.4-r1.ebuild index 959c79c3378..faf50aa87f4 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 }