1 |
commit: 6e70941d734c679917ccc15134f5e0e9e0dcda5a |
2 |
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 19 14:28:37 2022 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 19 14:29:01 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e70941d |
7 |
|
8 |
dev-util/umockdev: Add a live ebuild |
9 |
|
10 |
To make upstream testing easier. |
11 |
|
12 |
See https://github.com/martinpitt/umockdev/issues/182 |
13 |
|
14 |
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> |
15 |
|
16 |
dev-util/umockdev/umockdev-9999.ebuild | 59 ++++++++++++++++++++++++++++++++++ |
17 |
1 file changed, 59 insertions(+) |
18 |
|
19 |
diff --git a/dev-util/umockdev/umockdev-9999.ebuild b/dev-util/umockdev/umockdev-9999.ebuild |
20 |
new file mode 100644 |
21 |
index 000000000000..b640c8cd11af |
22 |
--- /dev/null |
23 |
+++ b/dev-util/umockdev/umockdev-9999.ebuild |
24 |
@@ -0,0 +1,59 @@ |
25 |
+# Copyright 1999-2022 Gentoo Authors |
26 |
+# Distributed under the terms of the GNU General Public License v2 |
27 |
+ |
28 |
+EAPI=8 |
29 |
+PYTHON_COMPAT=( python3_{8..10} ) |
30 |
+ |
31 |
+inherit meson-multilib python-any-r1 vala |
32 |
+ |
33 |
+if [[ ${PV} = 9999* ]]; then |
34 |
+ EGIT_REPO_URI="https://github.com/martinpitt/${PN}.git" |
35 |
+ inherit git-r3 |
36 |
+else |
37 |
+ SRC_URI="https://github.com/martinpitt/umockdev/releases/download/${PV}/${P}.tar.xz" |
38 |
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
39 |
+fi |
40 |
+ |
41 |
+DESCRIPTION="Mock hardware devices for creating unit tests" |
42 |
+HOMEPAGE="https://github.com/martinpitt/umockdev/" |
43 |
+ |
44 |
+LICENSE="LGPL-2.1+" |
45 |
+SLOT="0" |
46 |
+IUSE="test" |
47 |
+RESTRICT="!test? ( test )" |
48 |
+ |
49 |
+RDEPEND=" |
50 |
+ net-libs/libpcap[${MULTILIB_USEDEP}] |
51 |
+ virtual/libudev:=[${MULTILIB_USEDEP}] |
52 |
+ >=dev-libs/glib-2.32:2[${MULTILIB_USEDEP}] |
53 |
+ >=dev-libs/gobject-introspection-1.32:= |
54 |
+" |
55 |
+DEPEND="${RDEPEND} |
56 |
+ test? ( |
57 |
+ ${PYTHON_DEPS} |
58 |
+ dev-libs/libgudev:=[${MULTILIB_USEDEP}] |
59 |
+ ) |
60 |
+" |
61 |
+BDEPEND=" |
62 |
+ $(vala_depend) |
63 |
+ app-arch/xz-utils |
64 |
+ virtual/pkgconfig |
65 |
+" |
66 |
+ |
67 |
+pkg_setup() { |
68 |
+ use test && python-any-r1_pkg_setup |
69 |
+} |
70 |
+ |
71 |
+src_prepare() { |
72 |
+ default |
73 |
+ vala_setup |
74 |
+} |
75 |
+ |
76 |
+multilib_src_configure() { |
77 |
+ export VALAC="$(type -P valac-$(vala_best_api_version))" |
78 |
+ meson_src_configure |
79 |
+} |
80 |
+ |
81 |
+multilib_src_test() { |
82 |
+ meson_src_test --no-suite fails-valgrind |
83 |
+} |