1 |
commit: c80686ffa38465feef3dc3da17795b80c8d2abe1 |
2 |
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 4 20:42:34 2020 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 4 20:44:53 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c80686ff |
7 |
|
8 |
dev-libs/libevdev: Port to Meson |
9 |
|
10 |
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> |
11 |
|
12 |
dev-libs/libevdev/libevdev-9999.ebuild | 38 +++++++++++++++++++++------------- |
13 |
1 file changed, 24 insertions(+), 14 deletions(-) |
14 |
|
15 |
diff --git a/dev-libs/libevdev/libevdev-9999.ebuild b/dev-libs/libevdev/libevdev-9999.ebuild |
16 |
index ffddd6b0bd1..c975e202b80 100644 |
17 |
--- a/dev-libs/libevdev/libevdev-9999.ebuild |
18 |
+++ b/dev-libs/libevdev/libevdev-9999.ebuild |
19 |
@@ -3,16 +3,16 @@ |
20 |
|
21 |
EAPI=7 |
22 |
|
23 |
-PYTHON_COMPAT=( python{3_6,3_7} ) |
24 |
+PYTHON_COMPAT=( python3_{6,7,8} ) |
25 |
|
26 |
-inherit multilib-minimal python-any-r1 |
27 |
+inherit meson multilib-minimal python-any-r1 |
28 |
|
29 |
DESCRIPTION="Handler library for evdev events" |
30 |
HOMEPAGE="https://www.freedesktop.org/wiki/Software/libevdev/ https://gitlab.freedesktop.org/libevdev/libevdev" |
31 |
|
32 |
if [[ ${PV} == 9999* ]] ; then |
33 |
EGIT_REPO_URI="https://gitlab.freedesktop.org/libevdev/libevdev.git" |
34 |
- inherit autotools git-r3 |
35 |
+ inherit git-r3 |
36 |
else |
37 |
SRC_URI="https://www.freedesktop.org/software/libevdev/${P}.tar.xz" |
38 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
39 |
@@ -20,28 +20,38 @@ fi |
40 |
|
41 |
LICENSE="MIT" |
42 |
SLOT="0" |
43 |
-IUSE="doc static-libs" |
44 |
+IUSE="doc test" |
45 |
|
46 |
+DEPEND="test? ( dev-libs/check[${MULTILIB_USEDEP}] )" |
47 |
BDEPEND=" |
48 |
${PYTHON_DEPS} |
49 |
doc? ( app-doc/doxygen ) |
50 |
- virtual/pkgconfig |
51 |
+ virtual/pkgconfig[${MULTILIB_USEDEP}] |
52 |
" |
53 |
-RESTRICT="test" # Tests need to run as root. |
54 |
+RESTRICT="!test? ( test )" |
55 |
|
56 |
-src_prepare() { |
57 |
- default |
58 |
- [[ ${PV} == 9999* ]] && eautoreconf |
59 |
+multilib_src_configure() { |
60 |
+ local emesonargs=( |
61 |
+ $(meson_feature doc documentation) |
62 |
+ $(meson_feature test tests) |
63 |
+ ) |
64 |
+ meson_src_configure |
65 |
} |
66 |
|
67 |
-multilib_src_configure() { |
68 |
- ECONF_SOURCE="${S}" econf $(use_enable static-libs static) |
69 |
+multilib_src_compile() { |
70 |
+ meson_src_compile |
71 |
+} |
72 |
+ |
73 |
+multilib_src_test() { |
74 |
+ meson_src_test |
75 |
} |
76 |
|
77 |
multilib_src_install() { |
78 |
- default |
79 |
- find "${D}" -name '*.la' -delete || die |
80 |
- if use doc ;then |
81 |
+ meson_src_install |
82 |
+} |
83 |
+ |
84 |
+multilib_src_install_all() { |
85 |
+ if use doc; then |
86 |
local HTML_DOCS=( doc/html/. ) |
87 |
einstalldocs |
88 |
fi |