1 |
commit: 35347b119f54654434e1d2f2fec9c07327b3e6e2 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Aug 10 20:17:42 2019 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Aug 10 20:17:42 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35347b11 |
7 |
|
8 |
app-crypt/libnitrokey: Fix tests when git is not installed |
9 |
|
10 |
Closes: https://bugs.gentoo.org/689614 |
11 |
Package-Manager: Portage-2.3.71, Repoman-2.3.17 |
12 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
13 |
|
14 |
.../files/libnitrokey-3.5-tests-version-gitless.patch | 18 ++++++++++++++++++ |
15 |
app-crypt/libnitrokey/libnitrokey-3.5.ebuild | 2 ++ |
16 |
2 files changed, 20 insertions(+) |
17 |
|
18 |
diff --git a/app-crypt/libnitrokey/files/libnitrokey-3.5-tests-version-gitless.patch b/app-crypt/libnitrokey/files/libnitrokey-3.5-tests-version-gitless.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..99fc5af0378 |
21 |
--- /dev/null |
22 |
+++ b/app-crypt/libnitrokey/files/libnitrokey-3.5-tests-version-gitless.patch |
23 |
@@ -0,0 +1,18 @@ |
24 |
+--- a/CMakeLists.txt |
25 |
++++ b/CMakeLists.txt |
26 |
+@@ -129,7 +129,14 @@ |
27 |
+ ERROR_QUIET |
28 |
+ ) |
29 |
+ ENDIF() |
30 |
+-IF((NOT ${ADD_GIT_INFO}) OR (${PROJECT_VERSION_GIT_RETURN_CODE})) |
31 |
++# the version.h generation logic is tricky in a number of ways: |
32 |
++# 1. git describe on a release tarball will always fail with |
33 |
++# a non-zero return code, usually 128 |
34 |
++# 2. If git is not installed, PROJECT_VERSION_GIT_RETURN_CODE |
35 |
++# will contain the string 'No such file or directory' |
36 |
++# Hence fallback to PROJECT_VERSION when the return code is NOT 0. |
37 |
++IF((NOT ${ADD_GIT_INFO}) OR (NOT ${PROJECT_VERSION_GIT_RETURN_CODE} STREQUAL "0")) |
38 |
++ MESSAGE(STATUS "Setting fallback Git library version") |
39 |
+ SET(PROJECT_VERSION_GIT "v${PROJECT_VERSION}") |
40 |
+ ENDIF() |
41 |
+ MESSAGE(STATUS "Setting Git library version to: " ${PROJECT_VERSION_GIT} ) |
42 |
|
43 |
diff --git a/app-crypt/libnitrokey/libnitrokey-3.5.ebuild b/app-crypt/libnitrokey/libnitrokey-3.5.ebuild |
44 |
index 35712a33722..7d6ebab8f99 100644 |
45 |
--- a/app-crypt/libnitrokey/libnitrokey-3.5.ebuild |
46 |
+++ b/app-crypt/libnitrokey/libnitrokey-3.5.ebuild |
47 |
@@ -32,6 +32,8 @@ DEPEND=" |
48 |
test? ( >=dev-cpp/catch-2.5.0:0 )" |
49 |
BDEPEND="virtual/pkgconfig" |
50 |
|
51 |
+PATCHES=( "${FILESDIR}"/${PN}-3.5-tests-version-gitless.patch ) |
52 |
+ |
53 |
src_configure() { |
54 |
local mycmakeargs=( |
55 |
-DCMAKE_INSTALL_UDEVRULESDIR="$(get_udevdir)"/rules.d |