commit:     c77d34eea058e073a2db9a828ddac4e301dea9f8
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Wed Jul  1 12:15:49 2020 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Wed Jul  1 12:28:04 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c77d34ee

dev-libs/libjcat: support python3_9, make vala bindings optional

Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 .../files/libjcat-0.1.3-optional_vala.patch        | 28 +++++++++
 dev-libs/libjcat/libjcat-0.1.3-r1.ebuild           | 66 ++++++++++++++++++++++
 2 files changed, 94 insertions(+)

diff --git a/dev-libs/libjcat/files/libjcat-0.1.3-optional_vala.patch 
b/dev-libs/libjcat/files/libjcat-0.1.3-optional_vala.patch
new file mode 100644
index 00000000000..3c31e63eff5
--- /dev/null
+++ b/dev-libs/libjcat/files/libjcat-0.1.3-optional_vala.patch
@@ -0,0 +1,28 @@
+Make installation of dev-lang/vala bindings optional. Unfortunately
+the option name "vala" is reserved so we must use a different one.
+
+--- a/libjcat/meson.build
++++ b/libjcat/meson.build
+@@ -122,6 +122,7 @@
+     install : true
+   )
+ 
++  if get_option('vala-bindings')
+   gnome.generate_vapi('jcat',
+     sources : jcat_gir[0],
+     packages : [
+@@ -130,6 +131,7 @@
+     ],
+     install : true,
+   )
++  endif
+ 
+   python = import('python')
+   python_interpreter = python.find_installation('python3',
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -4,3 +4,4 @@
+ option('gpg', type : 'boolean', value : true, description : 'enable the GPG 
verification support')
+ option('pkcs7', type : 'boolean', value : true, description : 'enable the 
PKCS7 verification support')
+ option('man', type : 'boolean', value : true, description : 'enable man 
pages')
++option('vala-bindings', type : 'boolean', value : true, description : 'enable 
vala bindings')

diff --git a/dev-libs/libjcat/libjcat-0.1.3-r1.ebuild 
b/dev-libs/libjcat/libjcat-0.1.3-r1.ebuild
new file mode 100644
index 00000000000..ccbbdf6c239
--- /dev/null
+++ b/dev-libs/libjcat/libjcat-0.1.3-r1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6..9} )
+PYTHON_REQ_USE="xml"
+
+inherit meson python-any-r1 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 ~x86"
+IUSE="gpg gtk-doc +introspection +man pkcs7 test vala"
+
+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 )
+       vala? ( dev-lang/vala:= )"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig
+       $(python_gen_any_dep '
+               dev-python/setuptools[${PYTHON_USEDEP}]
+       ')
+       gtk-doc? ( dev-util/gtk-doc )
+       man? ( sys-apps/help2man )
+       test? ( net-libs/gnutls[tools] )"
+
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.1.1-disable_installed_tests.patch
+       "${FILESDIR}"/${PN}-0.1.3-optional_vala.patch
+)
+
+python_check_deps() {
+       has_version -b "dev-python/setuptools[${PYTHON_USEDEP}]"
+}
+
+src_prepare() {
+       xdg_environment_reset
+       use vala && 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_use vala vala-bindings)
+       )
+       meson_src_configure
+}

Reply via email to