From 5ef44690f8b033efb7a693437f7ee24958b09540 Mon Sep 17 00:00:00 2001 From: Guilherme Amadio Date: Thu, 8 Jun 2023 09:55:18 +0200 Subject: dev-libs/libmacaroons: new package, add 0.3.0 Signed-off-by: Guilherme Amadio --- dev-libs/libmacaroons/Manifest | 1 + .../files/libmacaroons-0.3.0-json-c.patch | 38 +++++++++++++++++++++ dev-libs/libmacaroons/libmacaroons-0.3.0.ebuild | 39 ++++++++++++++++++++++ dev-libs/libmacaroons/metadata.xml | 17 ++++++++++ 4 files changed, 95 insertions(+) create mode 100644 dev-libs/libmacaroons/Manifest create mode 100644 dev-libs/libmacaroons/files/libmacaroons-0.3.0-json-c.patch create mode 100644 dev-libs/libmacaroons/libmacaroons-0.3.0.ebuild create mode 100644 dev-libs/libmacaroons/metadata.xml diff --git a/dev-libs/libmacaroons/Manifest b/dev-libs/libmacaroons/Manifest new file mode 100644 index 000000000000..909446e451c7 --- /dev/null +++ b/dev-libs/libmacaroons/Manifest @@ -0,0 +1 @@ +DIST libmacaroons-0.3.0.tar.gz 47762 BLAKE2B 69371bb69262a88c736121861d9b136fa444b912d2c3a5d603c5897c8af85e9f4af6a6733e35c126ea44c97cfdd1359e1f41ee97452fa7275850769f2134d825 SHA512 79ae2e515bd673949bc1338f06f5f811a0e853ca61ff995bb4cddaf95e5297e77b012c9975b0bb0dba96520b9a24619a4593e3722e64610f1147e131f8c96de0 diff --git a/dev-libs/libmacaroons/files/libmacaroons-0.3.0-json-c.patch b/dev-libs/libmacaroons/files/libmacaroons-0.3.0-json-c.patch new file mode 100644 index 000000000000..f11071d3efff --- /dev/null +++ b/dev-libs/libmacaroons/files/libmacaroons-0.3.0-json-c.patch @@ -0,0 +1,38 @@ + +Fix build with JSON support enabled + +--- a/configure.ac ++++ b/configure.ac +@@ -62,7 +62,7 @@ Please install libjson to continue. + ----------------------------------------]) + fi + +- AC_CHECK_HEADER([json/json.h],,[AC_MSG_ERROR([ ++ AC_CHECK_HEADER([json-c/json.h],,[AC_MSG_ERROR([ + ---------------------------------------- + Macaroons rely upon the libjson library. + Please install libjson to continue. +diff --git a/macaroons.c b/macaroons.c +index ab296c8..654edfc 100644 +--- a/macaroons.c ++++ b/macaroons.c +@@ -32,12 +32,17 @@ + + /* C */ + #include ++#include + #include + #include + ++#define TRUE true ++#define FALSE false ++ + /* json */ + #ifdef MACAROONS_JSON_SUPPORT +-#include ++#include ++#include + #endif + + /* macaroons */ +-- diff --git a/dev-libs/libmacaroons/libmacaroons-0.3.0.ebuild b/dev-libs/libmacaroons/libmacaroons-0.3.0.ebuild new file mode 100644 index 000000000000..a5e65f40f211 --- /dev/null +++ b/dev-libs/libmacaroons/libmacaroons-0.3.0.ebuild @@ -0,0 +1,39 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="C library for generation and use of macaroons authorization credentials" +HOMEPAGE="https://github.com/rescrv/libmacaroons" +SRC_URI="https://github.com/rescrv/libmacaroons/archive/refs/tags/releases/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND=" + dev-libs/json-c + dev-libs/libsodium +" +RDEPEND="${DEPEND}" +BDEPEND="" + +S="${WORKDIR}"/${PN}-releases-${PV} + +PATCHES=( "${FILESDIR}"/${P}-json-c.patch ) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf --disable-python-bindings --enable-json-support +} + +src_install() { + default + find "${ED}" -name '*.la' -delete || die +} diff --git a/dev-libs/libmacaroons/metadata.xml b/dev-libs/libmacaroons/metadata.xml new file mode 100644 index 000000000000..5a6c5e0880cc --- /dev/null +++ b/dev-libs/libmacaroons/metadata.xml @@ -0,0 +1,17 @@ + + + + + amadio@gentoo.org + Guilherme Amadio + + + This library provides an implementation of macaroons, which are flexible + authorization tokens that work great in distributed systems. Like cookies, + macaroons are bearer tokens that enable applications to ascertain whether + their holders' actions are authorized. + + + rescrv/libmacaroons + + -- cgit v1.2.3-65-gdbad