mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-24 18:58:08 -07:00
dev-libs/libmacaroons: new package, add 0.3.0
Signed-off-by: Guilherme Amadio <amadio@gentoo.org>
This commit is contained in:
1
dev-libs/libmacaroons/Manifest
Normal file
1
dev-libs/libmacaroons/Manifest
Normal file
@@ -0,0 +1 @@
|
||||
DIST libmacaroons-0.3.0.tar.gz 47762 BLAKE2B 69371bb69262a88c736121861d9b136fa444b912d2c3a5d603c5897c8af85e9f4af6a6733e35c126ea44c97cfdd1359e1f41ee97452fa7275850769f2134d825 SHA512 79ae2e515bd673949bc1338f06f5f811a0e853ca61ff995bb4cddaf95e5297e77b012c9975b0bb0dba96520b9a24619a4593e3722e64610f1147e131f8c96de0
|
||||
38
dev-libs/libmacaroons/files/libmacaroons-0.3.0-json-c.patch
Normal file
38
dev-libs/libmacaroons/files/libmacaroons-0.3.0-json-c.patch
Normal file
@@ -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 <assert.h>
|
||||
+#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
+#define TRUE true
|
||||
+#define FALSE false
|
||||
+
|
||||
/* json */
|
||||
#ifdef MACAROONS_JSON_SUPPORT
|
||||
-#include <json/json.h>
|
||||
+#include <json-c/json.h>
|
||||
+#include <json-c/json_object.h>
|
||||
#endif
|
||||
|
||||
/* macaroons */
|
||||
--
|
||||
39
dev-libs/libmacaroons/libmacaroons-0.3.0.ebuild
Normal file
39
dev-libs/libmacaroons/libmacaroons-0.3.0.ebuild
Normal file
@@ -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
|
||||
}
|
||||
17
dev-libs/libmacaroons/metadata.xml
Normal file
17
dev-libs/libmacaroons/metadata.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>amadio@gentoo.org</email>
|
||||
<name>Guilherme Amadio</name>
|
||||
</maintainer>
|
||||
<longdescription lang="en">
|
||||
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.
|
||||
</longdescription>
|
||||
<upstream>
|
||||
<remote-id type="github">rescrv/libmacaroons</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
Reference in New Issue
Block a user