summaryrefslogtreecommitdiff
path: root/dev-libs/libmacaroons
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-06-08 15:45:39 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-06-08 15:45:39 +0100
commitd5599da3055bf9b900513a61c3c6e4bdbb524503 (patch)
treeb64a792286dd490c9d4fc2c46bbbaa64804efc61 /dev-libs/libmacaroons
parentcfeee79886441e92c8ee094e45b9bcdc9c79137a (diff)
gentoo auto-resync : 08:06:2023 - 15:45:39
Diffstat (limited to 'dev-libs/libmacaroons')
-rw-r--r--dev-libs/libmacaroons/Manifest4
-rw-r--r--dev-libs/libmacaroons/files/libmacaroons-0.3.0-json-c.patch38
-rw-r--r--dev-libs/libmacaroons/libmacaroons-0.3.0.ebuild39
-rw-r--r--dev-libs/libmacaroons/metadata.xml17
4 files changed, 98 insertions, 0 deletions
diff --git a/dev-libs/libmacaroons/Manifest b/dev-libs/libmacaroons/Manifest
new file mode 100644
index 000000000000..2ecd389cb1f9
--- /dev/null
+++ b/dev-libs/libmacaroons/Manifest
@@ -0,0 +1,4 @@
+AUX libmacaroons-0.3.0-json-c.patch 832 BLAKE2B dce0d7ef4be20972a1da7b218d7f66372e25b77d307cd18bc7d70a2893ae0fac8d97e3d71ea83882ce408b642244deb78a92a86035e81047dab07e4e3057e18c SHA512 c258effe1bd9eed548350a066352f358795de16a6dd04be32422874b602226f18114e91a51d803309433bb08d404ece9022dfe68c73de719264aa9665688b6f7
+DIST libmacaroons-0.3.0.tar.gz 47762 BLAKE2B 69371bb69262a88c736121861d9b136fa444b912d2c3a5d603c5897c8af85e9f4af6a6733e35c126ea44c97cfdd1359e1f41ee97452fa7275850769f2134d825 SHA512 79ae2e515bd673949bc1338f06f5f811a0e853ca61ff995bb4cddaf95e5297e77b012c9975b0bb0dba96520b9a24619a4593e3722e64610f1147e131f8c96de0
+EBUILD libmacaroons-0.3.0.ebuild 763 BLAKE2B efb054789e066ef5d665cb3915ae819be3dc1ee6f8e8d01c18d985b27418f2db35810d395534211a241155f52078fa4aa4f74fc8f59c4e5aa4faa0208b4b9313 SHA512 10140b22704e0ad6e8fc3dac49a7e87d64ac295473a4d060dbf5463ca5fd0ddf81942af100068c628804c66abfcba97efa9382dc0bc64a2b0b4055033e7490f1
+MISC metadata.xml 664 BLAKE2B 94ec73791cac9442622243a129d918336340e74768e7c7342cfed73227236fb3a05ad3051b2d76c0daeac5928d3b7a87ddf3b43bdb856ed069609ab3ae0a9129 SHA512 4ddd1a7e9981d50de6737734d7f0708450c4f36949bc3ec43c5c3b0b7da56b2e3f40d3e15edd489f347ad7599d232549904268e8b4a87ff9f4826d948ca1c295
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 <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 */
+--
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 @@
+<?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>