1 |
commit: 47471944d857275e82983460b6cd720257510df7 |
2 |
Author: Oliver Freyermuth <o.freyermuth <AT> googlemail <DOT> com> |
3 |
AuthorDate: Sat Feb 26 17:41:37 2022 +0000 |
4 |
Commit: Florian Schmaus <flow <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 26 17:41:37 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=47471944 |
7 |
|
8 |
dev-cpp/jwt-cpp: New package (0.6.0). |
9 |
|
10 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
11 |
Signed-off-by: Oliver Freyermuth <o.freyermuth <AT> googlemail.com> |
12 |
|
13 |
dev-cpp/jwt-cpp/Manifest | 1 + |
14 |
dev-cpp/jwt-cpp/jwt-cpp-0.6.0.ebuild | 57 ++++++++++++++++++++++++++++++++++++ |
15 |
dev-cpp/jwt-cpp/metadata.xml | 15 ++++++++++ |
16 |
3 files changed, 73 insertions(+) |
17 |
|
18 |
diff --git a/dev-cpp/jwt-cpp/Manifest b/dev-cpp/jwt-cpp/Manifest |
19 |
new file mode 100644 |
20 |
index 000000000..056eade7e |
21 |
--- /dev/null |
22 |
+++ b/dev-cpp/jwt-cpp/Manifest |
23 |
@@ -0,0 +1 @@ |
24 |
+DIST jwt-cpp-0.6.0.tar.gz 275126 BLAKE2B 4bf9bed9b2aa9584b497b2ab4d1d2582d9b5e4ded402200ea3f70b0e6752338fd4e2ef9c5836c728a6907a0190209c7baeaecd26032ce64dc6bf12a23594f27b SHA512 b6d5ebb3a7eeb6fef9a1d41c707251d1ab05bf47920c280d5203f1b9ee5bf6f8e914cd2ffaed66550cfa6d78c34465d4cf86517a759d5f8739b429faf1c2c0ef |
25 |
|
26 |
diff --git a/dev-cpp/jwt-cpp/jwt-cpp-0.6.0.ebuild b/dev-cpp/jwt-cpp/jwt-cpp-0.6.0.ebuild |
27 |
new file mode 100644 |
28 |
index 000000000..5d54b8c45 |
29 |
--- /dev/null |
30 |
+++ b/dev-cpp/jwt-cpp/jwt-cpp-0.6.0.ebuild |
31 |
@@ -0,0 +1,57 @@ |
32 |
+# Copyright 1999-2022 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=8 |
36 |
+ |
37 |
+inherit cmake |
38 |
+ |
39 |
+if [[ ${PV} == 9999 ]]; then |
40 |
+ inherit git-r3 |
41 |
+ EGIT_REPO_URI="https://github.com/Thalhammer/jwt-cpp.git" |
42 |
+ KEYWORDS="" |
43 |
+else |
44 |
+ SRC_URI="https://github.com/Thalhammer/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" |
45 |
+ KEYWORDS="~amd64" |
46 |
+fi |
47 |
+ |
48 |
+DESCRIPTION="header only library for creating and validating JSON Web Tokens in C++11" |
49 |
+HOMEPAGE="https://thalhammer.github.io/jwt-cpp/" |
50 |
+ |
51 |
+LICENSE="MIT" |
52 |
+SLOT="0" |
53 |
+IUSE="doc +picojson test" |
54 |
+ |
55 |
+DEPEND="${RDEPEND} |
56 |
+ dev-cpp/nlohmann_json |
57 |
+ picojson? ( dev-cpp/picojson ) |
58 |
+ doc? ( app-doc/doxygen[dot] )" |
59 |
+RESTRICT="!picojson? ( test )" |
60 |
+ |
61 |
+src_prepare() { |
62 |
+ # Unbundle dev-cpp/nlohmann_json. |
63 |
+ rm -vrf include/nhlomann || die |
64 |
+ # Unbundle dev-cpp/picojson and fix include paths. |
65 |
+ # See also: https://github.com/Thalhammer/jwt-cpp/issues/213 |
66 |
+ rm -vrf include/picojson || die |
67 |
+ find -name '*.h' -type f -print0 | xargs -0 sed -r -e "s:picojson/picojson\.h:picojson.h:g" -i || die |
68 |
+ # Prevent installation of bundled dev-cpp/picojson. |
69 |
+ sed -i -e 's:^\s*install.*picojson/picojson\.h.*$::' CMakeLists.txt || die |
70 |
+ cmake_src_prepare |
71 |
+} |
72 |
+ |
73 |
+src_configure() { |
74 |
+ local mycmakeargs=( |
75 |
+ -DJWT_DISABLE_PICOJSON="$(usex picojson OFF ON)" |
76 |
+ # Not useful for now, asks for non-existend CMake module. |
77 |
+ #-DJWT_EXTERNAL_PICOJSON="$(usex picojson)" |
78 |
+ # Examples are not installed and for development only. |
79 |
+ -DJWT_BUILD_EXAMPLES=NO |
80 |
+ -DJWT_BUILD_TESTS="$(usex test)" |
81 |
+ -DJWT_CMAKE_FILES_INSTALL_DIR="${EPREFIX}"/usr/share/cmake |
82 |
+ ) |
83 |
+ cmake_src_configure |
84 |
+} |
85 |
+ |
86 |
+src_test() { |
87 |
+ "${BUILD_DIR}"/tests/jwt-cpp-test || die |
88 |
+} |
89 |
|
90 |
diff --git a/dev-cpp/jwt-cpp/metadata.xml b/dev-cpp/jwt-cpp/metadata.xml |
91 |
new file mode 100644 |
92 |
index 000000000..71a6e5e73 |
93 |
--- /dev/null |
94 |
+++ b/dev-cpp/jwt-cpp/metadata.xml |
95 |
@@ -0,0 +1,15 @@ |
96 |
+<?xml version="1.0" encoding="UTF-8"?> |
97 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
98 |
+<pkgmetadata> |
99 |
+ <maintainer type="person"> |
100 |
+ <email>o.freyermuth@××××××××××.com</email> |
101 |
+ <name>Oliver Freyermuth</name> |
102 |
+ </maintainer> |
103 |
+ <upstream> |
104 |
+ <bugs-to>https://github.com/Thalhammer/jwt-cpp/issues</bugs-to> |
105 |
+ <remote-id type="github">Thalhammer/jwt-cpp</remote-id> |
106 |
+ </upstream> |
107 |
+ <use> |
108 |
+ <flag name="picojson">Enable use of <pkg>dev-cpp/picojson</pkg></flag> |
109 |
+ </use> |
110 |
+</pkgmetadata> |