pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Add jose.
Module Name: pkgsrc-wip
Committed By: nikita <nikita%NetBSD.org@localhost>
Pushed By: nikita
Date: Mon Jun 20 22:39:33 2022 +0200
Changeset: fff42c66ea27710f1ab0cdbfb5cacd34f12c3e39
Modified Files:
Makefile
Added Files:
jose/DESCR
jose/Makefile
jose/PLIST
jose/buildlink3.mk
jose/distinfo
jose/patches/patch-lib_openssl_hmac.c
Log Message:
Add jose.
Library implementing the Javascript Object Signing and Encryption (JOSE).
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=fff42c66ea27710f1ab0cdbfb5cacd34f12c3e39
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 1 +
jose/DESCR | 1 +
jose/Makefile | 26 +++++++++++++++++++++++
jose/PLIST | 39 +++++++++++++++++++++++++++++++++++
jose/buildlink3.mk | 16 ++++++++++++++
jose/distinfo | 6 ++++++
jose/patches/patch-lib_openssl_hmac.c | 33 +++++++++++++++++++++++++++++
7 files changed, 122 insertions(+)
diffs:
diff --git a/Makefile b/Makefile
index f891855967..c50b572053 100644
--- a/Makefile
+++ b/Makefile
@@ -1907,6 +1907,7 @@ SUBDIR+= jmtpfs
SUBDIR+= jobd
SUBDIR+= john-jumbo
SUBDIR+= joomla
+SUBDIR+= jose
SUBDIR+= jpgtn
SUBDIR+= jpicedt
SUBDIR+= jruby
diff --git a/jose/DESCR b/jose/DESCR
new file mode 100644
index 0000000000..06bd1dfaed
--- /dev/null
+++ b/jose/DESCR
@@ -0,0 +1 @@
+Library implementing the Javascript Object Signing and Encryption (JOSE).
diff --git a/jose/Makefile b/jose/Makefile
new file mode 100644
index 0000000000..3a3cce25ee
--- /dev/null
+++ b/jose/Makefile
@@ -0,0 +1,26 @@
+# $NetBSD$
+
+DISTNAME= v11
+PKGNAME= jose-${DISTNAME:S/v//}
+CATEGORIES= textproc
+MASTER_SITES= ${MASTER_SITE_GITHUB:=latchset/}
+GITHUB_TAG= ${PKGVERSION_NOREV}
+DIST_SUBDIR= jose
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://github.com/latchset/jose/
+COMMENT= C implementation of JOSE
+LICENSE= apache-2.0
+
+USE_TOOLS+= pkg-config cmake
+
+BUILD_DEPENDS+= ninja-build-[0-9]*:../../devel/ninja-build
+
+post-install:
+ rm -rf ${DESTDIR}/usr/pkg/share/licenses/jose
+
+.include "../../devel/meson/build.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../security/openssl/buildlink3.mk"
+.include "../../textproc/jansson/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/jose/PLIST b/jose/PLIST
new file mode 100644
index 0000000000..a4220bccf6
--- /dev/null
+++ b/jose/PLIST
@@ -0,0 +1,39 @@
+@comment $NetBSD$
+bin/jose
+include/jose/b64.h
+include/jose/cfg.h
+include/jose/io.h
+include/jose/jose.h
+include/jose/jwe.h
+include/jose/jwk.h
+include/jose/jws.h
+include/jose/openssl.h
+lib/libjose.so
+lib/libjose.so.0
+lib/libjose.so.0.0.0
+lib/pkgconfig/jose.pc
+man/man1/jose-alg.1
+man/man1/jose-b64-dec.1
+man/man1/jose-b64-enc.1
+man/man1/jose-fmt.1
+man/man1/jose-jwe-dec.1
+man/man1/jose-jwe-enc.1
+man/man1/jose-jwe-fmt.1
+man/man1/jose-jwk-eql.1
+man/man1/jose-jwk-exc.1
+man/man1/jose-jwk-gen.1
+man/man1/jose-jwk-pub.1
+man/man1/jose-jwk-thp.1
+man/man1/jose-jwk-use.1
+man/man1/jose-jws-fmt.1
+man/man1/jose-jws-sig.1
+man/man1/jose-jws-ver.1
+man/man1/jose.1
+man/man3/jose_b64.3
+man/man3/jose_cfg.3
+man/man3/jose_io.3
+man/man3/jose_io_t.3
+man/man3/jose_jwe.3
+man/man3/jose_jwk.3
+man/man3/jose_jws.3
+@pkgdir share/licenses
diff --git a/jose/buildlink3.mk b/jose/buildlink3.mk
new file mode 100644
index 0000000000..aa8f8184c4
--- /dev/null
+++ b/jose/buildlink3.mk
@@ -0,0 +1,16 @@
+# $NetBSD: buildlink3.mk,v 1.2 2020/01/18 21:48:26 jperkin Exp $
+
+BUILDLINK_TREE+= jose
+
+.if !defined(JOSE_BUILDLINK3_MK)
+JOSE_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.jose+= jose>=11
+BUILDLINK_ABI_DEPENDS.jose+= jose>=11
+BUILDLINK_PKGSRCDIR.jose?= ../../wip/jose
+
+.include "../../textproc/jansson/buildlink3.mk"
+.include "../../security/openssl/buildlink3.mk"
+.endif # JOSE_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -jose
diff --git a/jose/distinfo b/jose/distinfo
new file mode 100644
index 0000000000..d1e910a11e
--- /dev/null
+++ b/jose/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.3 2021/10/26 11:21:47 nia Exp $
+
+BLAKE2s (jose/v11.tar.gz) = c6762bd2eabd26c513b2fdd1a31739c348acfdaffbdd7e11e785dceb0b4b687a
+SHA512 (jose/v11.tar.gz) = ffe09000837f79cefa549734d13c5d5d51042a42a055867241777ccbff3a127bac86a6155638fdf5ee52aad3598829e19724fd4e7de541117ed9b1c77c2ce457
+Size (jose/v11.tar.gz) = 841374 bytes
+SHA1 (patch-lib_openssl_hmac.c) = 09cc79373b7881c01abf06b367e3ec96c3042c65
diff --git a/jose/patches/patch-lib_openssl_hmac.c b/jose/patches/patch-lib_openssl_hmac.c
new file mode 100644
index 0000000000..d43ffb252b
--- /dev/null
+++ b/jose/patches/patch-lib_openssl_hmac.c
@@ -0,0 +1,33 @@
+$NetBSD$
+
+The function hmac in hmac.c conflicts with hmac from stdlib on NetBSD.
+
+--- lib/openssl/hmac.c.orig 2022-06-20 21:21:38.997255017 +0200
++++ lib/openssl/hmac.c 2022-06-20 21:22:08.635313366 +0200
+@@ -95,7 +95,7 @@
+ }
+
+ static HMAC_CTX *
+-hmac(const jose_hook_alg_t *alg, jose_cfg_t *cfg,
++jhmac(const jose_hook_alg_t *alg, jose_cfg_t *cfg,
+ const json_t *sig, const json_t *jwk)
+ {
+ uint8_t key[KEYMAX] = {};
+@@ -251,7 +251,7 @@
+
+ i->obj = json_incref(jws);
+ i->sig = json_incref(sig);
+- i->hctx = hmac(alg, cfg, sig, jwk);
++ i->hctx = jhmac(alg, cfg, sig, jwk);
+ if (!i->obj || !i->sig || !i->hctx)
+ return NULL;
+
+@@ -275,7 +275,7 @@
+ io->free = io_free;
+
+ i->sig = json_incref((json_t *) sig);
+- i->hctx = hmac(alg, cfg, sig, jwk);
++ i->hctx = jhmac(alg, cfg, sig, jwk);
+ if (!i->sig || !i->hctx)
+ return NULL;
+
Home |
Main Index |
Thread Index |
Old Index