Gentoo Archives: gentoo-commits

From: Haelwenn Monnier <contact@×××××××××.me>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:master commit in: dev-cpp/scitokens-cpp/files/, dev-cpp/scitokens-cpp/
Date: Thu, 23 Jun 2022 18:34:09
Message-Id: 1655928938.0adf577bc2cca5743b5bfaade63ed7a1a96a6a0d.lanodan@gentoo
1 commit: 0adf577bc2cca5743b5bfaade63ed7a1a96a6a0d
2 Author: Oliver Freyermuth <o.freyermuth <AT> googlemail <DOT> com>
3 AuthorDate: Wed Jun 22 20:15:38 2022 +0000
4 Commit: Haelwenn Monnier <contact <AT> hacktivis <DOT> me>
5 CommitDate: Wed Jun 22 20:15:38 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0adf577b
7
8 dev-cpp/scitokens-cpp: add 0.7.1
9
10 Signed-off-by: Oliver Freyermuth <o.freyermuth <AT> googlemail.com>
11
12 dev-cpp/scitokens-cpp/Manifest | 1 +
13 .../scitokens-cpp-0.7.1-fix-external-gtest.patch | 20 ++++++++
14 dev-cpp/scitokens-cpp/scitokens-cpp-0.7.1.ebuild | 55 ++++++++++++++++++++++
15 3 files changed, 76 insertions(+)
16
17 diff --git a/dev-cpp/scitokens-cpp/Manifest b/dev-cpp/scitokens-cpp/Manifest
18 index c935ffbbe..76d04dd3c 100644
19 --- a/dev-cpp/scitokens-cpp/Manifest
20 +++ b/dev-cpp/scitokens-cpp/Manifest
21 @@ -1 +1,2 @@
22 DIST scitokens-cpp-0.7.0.tar.gz 98971 BLAKE2B 3429ff89b5a5202f9892fc68fc558c8b64276977a396981af845f05f8eb3f638602cedd30ea97f3ab5e6d188de7249247854dd6281aeb138d6e304b5aa006bb9 SHA512 1be8a84b7d88c10ab7336c3c6bc8d7e7be5feb3253ef618cba1f3ed908aad3fc480f30dd2a292aa2774ec88ceba370af3fa7d96f228cba3df8f78b6face6991b
23 +DIST scitokens-cpp-0.7.1.tar.gz 99411 BLAKE2B b89c63ad35105a064e6f8ecd7596ba51de43096828a756b7c64669a352784c56bcb9295638f173cdbeac833e9dfc14828daf775d60a6cd124abf639125cf5842 SHA512 5c73fcccfb2db92916caced118e2ab4e110f7a8331a9bd84d06bd059da5258d7e8423822356e1833bbce7b047d7f31e2cd20cf4c0eb064dc2d248d9febab35b5
24
25 diff --git a/dev-cpp/scitokens-cpp/files/scitokens-cpp-0.7.1-fix-external-gtest.patch b/dev-cpp/scitokens-cpp/files/scitokens-cpp-0.7.1-fix-external-gtest.patch
26 new file mode 100644
27 index 000000000..baa4a08f5
28 --- /dev/null
29 +++ b/dev-cpp/scitokens-cpp/files/scitokens-cpp-0.7.1-fix-external-gtest.patch
30 @@ -0,0 +1,20 @@
31 +Bug: https://github.com/scitokens/scitokens-cpp/pull/89
32 +
33 +---
34 + test/CMakeLists.txt | 4 +++-
35 + 1 file changed, 3 insertions(+), 1 deletion(-)
36 +
37 +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
38 +index 22f86a6..2083bff 100644
39 +--- a/test/CMakeLists.txt
40 ++++ b/test/CMakeLists.txt
41 +@@ -1,6 +1,8 @@
42 +
43 + add_executable(scitokens-gtest main.cpp)
44 +-add_dependencies(scitokens-gtest gtest)
45 ++if( NOT SCITOKENS_EXTERNAL_GTEST )
46 ++ add_dependencies(scitokens-gtest gtest)
47 ++endif()
48 + include_directories("${PROJECT_SOURCE_DIR}/vendor/gtest/googletest/include")
49 +
50 + if(SCITOKENS_EXTERNAL_GTEST)
51
52 diff --git a/dev-cpp/scitokens-cpp/scitokens-cpp-0.7.1.ebuild b/dev-cpp/scitokens-cpp/scitokens-cpp-0.7.1.ebuild
53 new file mode 100644
54 index 000000000..5d3e16ae9
55 --- /dev/null
56 +++ b/dev-cpp/scitokens-cpp/scitokens-cpp-0.7.1.ebuild
57 @@ -0,0 +1,55 @@
58 +# Copyright 1999-2022 Gentoo Authors
59 +# Distributed under the terms of the GNU General Public License v2
60 +
61 +EAPI=8
62 +
63 +inherit cmake
64 +
65 +if [[ ${PV} == *9999* ]]; then
66 + inherit git-r3
67 + EGIT_REPO_URI="https://github.com/scitokens/scitokens-cpp"
68 +else
69 + SRC_URI="https://github.com/scitokens/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
70 + KEYWORDS="~amd64"
71 +fi
72 +
73 +DESCRIPTION=" A C++ implementation of the SciTokens library with a C library interface"
74 +HOMEPAGE="https://scitokens.org/"
75 +
76 +LICENSE="Apache-2.0"
77 +SLOT="0"
78 +IUSE="test"
79 +
80 +DEPEND="${RDEPEND}
81 + <dev-cpp/jwt-cpp-0.5.0
82 + dev-db/sqlite
83 + dev-libs/openssl
84 + net-misc/curl
85 + sys-apps/util-linux
86 + test? ( dev-cpp/gtest )"
87 +BDEPEND="virtual/pkgconfig"
88 +RESTRICT="!test? ( test )"
89 +
90 +PATCHES=(
91 + "${FILESDIR}"/"${PN}"-0.7.1-fix-external-gtest.patch
92 +)
93 +
94 +src_prepare() {
95 + # Unbundle dev-cpp/gtest, dev-cpp/jwt-cpp
96 + rm -rvf vendor
97 + # Fix include path for picojson.
98 + find src/ \( -name '*.cpp' -o -name '*.h' \) -type f -print0 | xargs -0 sed -r -e "s:picojson/picojson\.h:picojson.h:g" -i || die
99 + cmake_src_prepare
100 +}
101 +
102 +src_configure() {
103 + local mycmakeargs=(
104 + -DSCITOKENS_BUILD_UNITTESTS="$(usex test)"
105 + -DSCITOKENS_EXTERNAL_GTEST=YES
106 + )
107 + cmake_src_configure
108 +}
109 +
110 +src_test() {
111 + cmake_run_in "${BUILD_DIR}" ctest --verbose || die
112 +}