summaryrefslogtreecommitdiff
path: root/dev-cpp/jwt-cpp
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-06-15 13:38:09 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-06-15 13:38:09 +0100
commitdb70871b2044b9bfde346d6f4027dafb0a013c4c (patch)
tree34548aee54e5458d3754bd8c8f987acdb5ee444c /dev-cpp/jwt-cpp
parent1c382dc5dbc52576ac2300fee0498af8af44e7b4 (diff)
gentoo auto-resync : 15:06:2023 - 13:38:09
Diffstat (limited to 'dev-cpp/jwt-cpp')
-rw-r--r--dev-cpp/jwt-cpp/Manifest4
-rw-r--r--dev-cpp/jwt-cpp/files/jwt-cpp-0.6.0-gcc13.patch14
-rw-r--r--dev-cpp/jwt-cpp/jwt-cpp-0.6.0.ebuild82
-rw-r--r--dev-cpp/jwt-cpp/metadata.xml23
4 files changed, 123 insertions, 0 deletions
diff --git a/dev-cpp/jwt-cpp/Manifest b/dev-cpp/jwt-cpp/Manifest
new file mode 100644
index 000000000000..0ea92cc67532
--- /dev/null
+++ b/dev-cpp/jwt-cpp/Manifest
@@ -0,0 +1,4 @@
+AUX jwt-cpp-0.6.0-gcc13.patch 284 BLAKE2B e7ed4329fe924206433c0e6e44136f8e06ded871f7e6fe85c3506901a58b316e9f79690776840ec826ff0f211b5ff72b9c2e68b946e34512afb8deefc99b331c SHA512 8311df0a0c46f5b422acdbb789600c0c1e26a2f87ffe80eb6b968da6a1b62cebe427b8c09ffb5586d48bb26afb1308af6c9524d6d2eb36dafc6849372cab3979
+DIST jwt-cpp-0.6.0.tar.gz 275126 BLAKE2B 4bf9bed9b2aa9584b497b2ab4d1d2582d9b5e4ded402200ea3f70b0e6752338fd4e2ef9c5836c728a6907a0190209c7baeaecd26032ce64dc6bf12a23594f27b SHA512 b6d5ebb3a7eeb6fef9a1d41c707251d1ab05bf47920c280d5203f1b9ee5bf6f8e914cd2ffaed66550cfa6d78c34465d4cf86517a759d5f8739b429faf1c2c0ef
+EBUILD jwt-cpp-0.6.0.ebuild 1988 BLAKE2B 7972ddf9ab53b277b7de34d9d36e739f7898bf4d55d02afefe661d48705ece07b2e82d54cd1e8d4dae0f339e4d8b763e83a3861dd956479be8cbfcf9b99809b6 SHA512 5c8406f025e08b017b1b88f3cb920f81a9c3dcc4dfb6b724d32102540ce749fe7f59bfa04b10ce52e38a4864891dd6c93228e4cbeeb33d815a9e8eb0d81afa80
+MISC metadata.xml 783 BLAKE2B 6c1156aa5c7466acf0dc97db88e228d0dd1a15e9938df61c9ca4d1b4d80fa38aacbc2e3034c91deb4a4b7a4076c61511a34f8f72d4d077987577666c393a7fcc SHA512 3ca38fd435697019e10b292019355786d92e258ba8deb37f035a2d767c0bab9450560a03619b660f383cce794c24bc7bbd6ac23a0a902ca7654afccc432b8121
diff --git a/dev-cpp/jwt-cpp/files/jwt-cpp-0.6.0-gcc13.patch b/dev-cpp/jwt-cpp/files/jwt-cpp-0.6.0-gcc13.patch
new file mode 100644
index 000000000000..3fef24536a86
--- /dev/null
+++ b/dev-cpp/jwt-cpp/files/jwt-cpp-0.6.0-gcc13.patch
@@ -0,0 +1,14 @@
+From: Hannu Lounento <hannu.lounento@vaisala.com>
+Bug: https://github.com/Thalhammer/jwt-cpp/pull/287
+
+Fix build with GCC 13.
+
+--- a/include/jwt-cpp/base.h
++++ b/include/jwt-cpp/base.h
+@@ -3,6 +3,7 @@
+
+ #include <array>
++#include <cstdint>
+ #include <stdexcept>
+ #include <string>
+
diff --git a/dev-cpp/jwt-cpp/jwt-cpp-0.6.0.ebuild b/dev-cpp/jwt-cpp/jwt-cpp-0.6.0.ebuild
new file mode 100644
index 000000000000..8d2bc1f2fe86
--- /dev/null
+++ b/dev-cpp/jwt-cpp/jwt-cpp-0.6.0.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+if [[ ${PV} == *9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/Thalhammer/jwt-cpp.git"
+else
+ SRC_URI="https://github.com/Thalhammer/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="header only library for creating and validating JSON Web Tokens in C++11"
+HOMEPAGE="https://thalhammer.github.io/jwt-cpp/"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="doc +picojson test"
+
+DEPEND="
+ dev-cpp/nlohmann_json
+ dev-libs/openssl
+ picojson? ( dev-cpp/picojson )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+ doc? ( app-doc/doxygen[dot] )
+ test? ( dev-cpp/gtest )
+"
+RESTRICT="
+ !picojson? ( test )
+ !test? ( test )
+"
+PATCHES=(
+ "${FILESDIR}"/"${PN}"-0.6.0-gcc13.patch
+)
+DOCS=( README.md docs/{faqs,ssl,traits}.md )
+
+src_prepare() {
+ # Unbundle dev-cpp/nlohmann_json.
+ rm -vrf include/nhlomann || die
+ # Unbundle dev-cpp/picojson and fix include paths.
+ # See also: https://github.com/Thalhammer/jwt-cpp/issues/213
+ rm -vrf include/picojson || die
+ find -name '*.h' -type f -print0 | xargs -0 sed -r -e "s:picojson/picojson\.h:picojson.h:g" -i || die
+ # Prevent installation of bundled dev-cpp/picojson.
+ sed -i -e 's:^\s*install.*picojson/picojson\.h.*$::' CMakeLists.txt || die
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DJWT_DISABLE_PICOJSON="$(usex !picojson)"
+ # Not useful for now, asks for non-existent CMake module.
+ #-DJWT_EXTERNAL_PICOJSON="$(usex picojson)"
+ # Examples are not installed and for development only.
+ -DJWT_BUILD_EXAMPLES=NO
+ -DJWT_BUILD_TESTS="$(usex test)"
+ -DJWT_CMAKE_FILES_INSTALL_DIR="${EPREFIX}"/usr/share/cmake
+ )
+ cmake_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+ if use doc; then
+ doxygen || die
+ fi
+}
+
+src_test() {
+ "${BUILD_DIR}"/tests/jwt-cpp-test || die
+}
+
+src_install() {
+ cmake_src_install
+ use doc && local HTML_DOCS=(doxy/html/.)
+ einstalldocs
+}
diff --git a/dev-cpp/jwt-cpp/metadata.xml b/dev-cpp/jwt-cpp/metadata.xml
new file mode 100644
index 000000000000..1d76ea260c5a
--- /dev/null
+++ b/dev-cpp/jwt-cpp/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person" proxied="yes">
+ <email>o.freyermuth@googlemail.com</email>
+ <name>Oliver Freyermuth</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>amadio@gentoo.org</email>
+ <name>Guilherme Amadio</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <bugs-to>https://github.com/Thalhammer/jwt-cpp/issues</bugs-to>
+ <remote-id type="github">Thalhammer/jwt-cpp</remote-id>
+ </upstream>
+ <use>
+ <flag name="picojson">Enable use of <pkg>dev-cpp/picojson</pkg></flag>
+ </use>
+</pkgmetadata>