From: Marek Szuba Date: Mon, 30 Mar 2020 14:28:49 +0000 (+0100) Subject: dev-libs/libjcat: new package X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c9213e24cceac0fa9c9ad94b8cedd107698c1c80;p=gentoo.git dev-libs/libjcat: new package An upcoming dependency of sys-apps/fwupd. Signed-off-by: Marek Szuba --- diff --git a/dev-libs/libjcat/Manifest b/dev-libs/libjcat/Manifest new file mode 100644 index 000000000000..12536faba64c --- /dev/null +++ b/dev-libs/libjcat/Manifest @@ -0,0 +1 @@ +DIST libjcat-0.1.0.tar.gz 60808 BLAKE2B 384e5a846fb7c49c8a6d6ace5f2b17715693d7e9ecfce020859c6fb5d96f9b9398606a2161a2c9f795c16c90e8b7a0e9d08970c1f81e4412783097f4ca599083 SHA512 2172fd621c86b3a2d507c3bb8fcc5f40a46656a5352f4963a014c76642bb2c34e316bb8608c121fa7d728d63dc2593ed28d3e3478e1ec5bcf32daeffc43627fd diff --git a/dev-libs/libjcat/files/libjcat-0.1.0-disable_installed_tests.patch b/dev-libs/libjcat/files/libjcat-0.1.0-disable_installed_tests.patch new file mode 100644 index 000000000000..823d713b7918 --- /dev/null +++ b/dev-libs/libjcat/files/libjcat-0.1.0-disable_installed_tests.patch @@ -0,0 +1,45 @@ +--- a/data/tests/colorhug/meson.build ++++ b/data/tests/colorhug/meson.build +@@ -1,9 +1,11 @@ ++if false + install_data([ + 'firmware.bin', + 'firmware.bin.asc', + ], + install_dir: installed_test_datadir, + ) ++endif + + if get_option('pkcs7') + # generate self-signed detached signature +@@ -16,7 +18,7 @@ + '--load-certificate', pkcs7_certificate, + '--infile', '@INPUT@', + '--outfile', '@OUTPUT@'], +- install: true, ++ install: false, + install_dir: installed_test_datadir, + ) + endif +--- a/data/tests/meson.build ++++ b/data/tests/meson.build +@@ -2,7 +2,7 @@ + input : 'libjcat.test.in', + output : 'libjcat.test', + configuration : conf, +- install: true, ++ install: false, + install_dir: installed_test_datadir, + ) + +--- a/libjcat/meson.build ++++ b/libjcat/meson.build +@@ -225,7 +225,7 @@ + '-DTESTDATADIR_SRC="' + testdatadir_src + '"', + '-DTESTDATADIR_DST="' + testdatadir_dst + '"', + ], +- install : true, ++ install : false, + install_dir : installed_test_bindir + ) + test('jcat-self-test', e) diff --git a/dev-libs/libjcat/libjcat-0.1.0.ebuild b/dev-libs/libjcat/libjcat-0.1.0.ebuild new file mode 100644 index 000000000000..32863148cd11 --- /dev/null +++ b/dev-libs/libjcat/libjcat-0.1.0.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit meson vala xdg-utils + +DESCRIPTION="Library and tool for reading and writing Jcat files " +HOMEPAGE="https://github.com/hughsie/libjcat" +SRC_URI="https://github.com/hughsie/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="LGPL-2.1+" +SLOT="0" +KEYWORDS="~amd64" +IUSE="gpg gtk-doc +introspection +man pkcs7 test" + +RDEPEND="dev-libs/glib:2 + dev-libs/json-glib:= + gpg? ( + app-crypt/gpgme + dev-libs/libgpg-error + ) + introspection? ( dev-libs/gobject-introspection:= ) + pkcs7? ( net-libs/gnutls ) + dev-lang/vala:=" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig + gtk-doc? ( dev-util/gtk-doc ) + man? ( sys-apps/help2man ) + test? ( net-libs/gnutls[tools] )" + +RESTRICT="!test? ( test )" + +PATCHES=( + "${FILESDIR}"/${PN}-0.1.0-disable_installed_tests.patch +) + +src_prepare() { + xdg_environment_reset +# TODO: make vala optional + vala_src_prepare + default +} + +src_configure() { + local emesonargs=( + $(meson_use gtk-doc gtkdoc) + $(meson_use gpg) + $(meson_use introspection) + $(meson_use man) + $(meson_use pkcs7) + $(meson_use test tests) + ) + meson_src_configure +} diff --git a/dev-libs/libjcat/metadata.xml b/dev-libs/libjcat/metadata.xml new file mode 100644 index 000000000000..8d98279081e4 --- /dev/null +++ b/dev-libs/libjcat/metadata.xml @@ -0,0 +1,23 @@ + + + + + marecki@gentoo.org + Marek Szuba + + + This library allows reading and writing gzip-compressed JSON catalog files, + which can be used to store GPG, PKCS-7 and SHA-256 checksums for each file. + + This provides equivalent functionality to the catalog files supported + in Microsoft Windows. + + + Enable GPG verification support via app-crypt/gpgme + Generate and install man pages + Enable PKCS7 verification support via net-libs/gnutls + + + hughsie/libjcat + +