1 |
commit: c77d34eea058e073a2db9a828ddac4e301dea9f8 |
2 |
Author: Marek Szuba <marecki <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jul 1 12:15:49 2020 +0000 |
4 |
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jul 1 12:28:04 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c77d34ee |
7 |
|
8 |
dev-libs/libjcat: support python3_9, make vala bindings optional |
9 |
|
10 |
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> |
11 |
|
12 |
.../files/libjcat-0.1.3-optional_vala.patch | 28 +++++++++ |
13 |
dev-libs/libjcat/libjcat-0.1.3-r1.ebuild | 66 ++++++++++++++++++++++ |
14 |
2 files changed, 94 insertions(+) |
15 |
|
16 |
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 |
17 |
new file mode 100644 |
18 |
index 00000000000..3c31e63eff5 |
19 |
--- /dev/null |
20 |
+++ b/dev-libs/libjcat/files/libjcat-0.1.3-optional_vala.patch |
21 |
@@ -0,0 +1,28 @@ |
22 |
+Make installation of dev-lang/vala bindings optional. Unfortunately |
23 |
+the option name "vala" is reserved so we must use a different one. |
24 |
+ |
25 |
+--- a/libjcat/meson.build |
26 |
++++ b/libjcat/meson.build |
27 |
+@@ -122,6 +122,7 @@ |
28 |
+ install : true |
29 |
+ ) |
30 |
+ |
31 |
++ if get_option('vala-bindings') |
32 |
+ gnome.generate_vapi('jcat', |
33 |
+ sources : jcat_gir[0], |
34 |
+ packages : [ |
35 |
+@@ -130,6 +131,7 @@ |
36 |
+ ], |
37 |
+ install : true, |
38 |
+ ) |
39 |
++ endif |
40 |
+ |
41 |
+ python = import('python') |
42 |
+ python_interpreter = python.find_installation('python3', |
43 |
+--- a/meson_options.txt |
44 |
++++ b/meson_options.txt |
45 |
+@@ -4,3 +4,4 @@ |
46 |
+ option('gpg', type : 'boolean', value : true, description : 'enable the GPG verification support') |
47 |
+ option('pkcs7', type : 'boolean', value : true, description : 'enable the PKCS7 verification support') |
48 |
+ option('man', type : 'boolean', value : true, description : 'enable man pages') |
49 |
++option('vala-bindings', type : 'boolean', value : true, description : 'enable vala bindings') |
50 |
|
51 |
diff --git a/dev-libs/libjcat/libjcat-0.1.3-r1.ebuild b/dev-libs/libjcat/libjcat-0.1.3-r1.ebuild |
52 |
new file mode 100644 |
53 |
index 00000000000..ccbbdf6c239 |
54 |
--- /dev/null |
55 |
+++ b/dev-libs/libjcat/libjcat-0.1.3-r1.ebuild |
56 |
@@ -0,0 +1,66 @@ |
57 |
+# Copyright 1999-2020 Gentoo Authors |
58 |
+# Distributed under the terms of the GNU General Public License v2 |
59 |
+ |
60 |
+EAPI=7 |
61 |
+ |
62 |
+PYTHON_COMPAT=( python3_{6..9} ) |
63 |
+PYTHON_REQ_USE="xml" |
64 |
+ |
65 |
+inherit meson python-any-r1 vala xdg-utils |
66 |
+ |
67 |
+DESCRIPTION="Library and tool for reading and writing Jcat files " |
68 |
+HOMEPAGE="https://github.com/hughsie/libjcat" |
69 |
+SRC_URI="https://github.com/hughsie/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
70 |
+ |
71 |
+LICENSE="LGPL-2.1+" |
72 |
+SLOT="0" |
73 |
+KEYWORDS="~amd64 ~x86" |
74 |
+IUSE="gpg gtk-doc +introspection +man pkcs7 test vala" |
75 |
+ |
76 |
+RDEPEND="dev-libs/glib:2 |
77 |
+ dev-libs/json-glib:= |
78 |
+ gpg? ( |
79 |
+ app-crypt/gpgme |
80 |
+ dev-libs/libgpg-error |
81 |
+ ) |
82 |
+ introspection? ( dev-libs/gobject-introspection:= ) |
83 |
+ pkcs7? ( net-libs/gnutls ) |
84 |
+ vala? ( dev-lang/vala:= )" |
85 |
+DEPEND="${RDEPEND}" |
86 |
+BDEPEND="virtual/pkgconfig |
87 |
+ $(python_gen_any_dep ' |
88 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
89 |
+ ') |
90 |
+ gtk-doc? ( dev-util/gtk-doc ) |
91 |
+ man? ( sys-apps/help2man ) |
92 |
+ test? ( net-libs/gnutls[tools] )" |
93 |
+ |
94 |
+RESTRICT="!test? ( test )" |
95 |
+ |
96 |
+PATCHES=( |
97 |
+ "${FILESDIR}"/${PN}-0.1.1-disable_installed_tests.patch |
98 |
+ "${FILESDIR}"/${PN}-0.1.3-optional_vala.patch |
99 |
+) |
100 |
+ |
101 |
+python_check_deps() { |
102 |
+ has_version -b "dev-python/setuptools[${PYTHON_USEDEP}]" |
103 |
+} |
104 |
+ |
105 |
+src_prepare() { |
106 |
+ xdg_environment_reset |
107 |
+ use vala && vala_src_prepare |
108 |
+ default |
109 |
+} |
110 |
+ |
111 |
+src_configure() { |
112 |
+ local emesonargs=( |
113 |
+ $(meson_use gtk-doc gtkdoc) |
114 |
+ $(meson_use gpg) |
115 |
+ $(meson_use introspection) |
116 |
+ $(meson_use man) |
117 |
+ $(meson_use pkcs7) |
118 |
+ $(meson_use test tests) |
119 |
+ $(meson_use vala vala-bindings) |
120 |
+ ) |
121 |
+ meson_src_configure |
122 |
+} |