Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libratbag/
Date: Fri, 25 Jun 2021 01:12:27
Message-Id: 1624582926.74e4072b18ba3057de92ba088da1e3bf505d3380.polynomial-c@gentoo
1 commit: 74e4072b18ba3057de92ba088da1e3bf505d3380
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jun 24 22:41:21 2021 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 25 01:02:06 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74e4072b
7
8 dev-libs/libratbag: Bump to version 0.16
9
10 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
11
12 dev-libs/libratbag/Manifest | 1 +
13 dev-libs/libratbag/libratbag-0.16.ebuild | 94 ++++++++++++++++++++++++++++++++
14 2 files changed, 95 insertions(+)
15
16 diff --git a/dev-libs/libratbag/Manifest b/dev-libs/libratbag/Manifest
17 index e8c737a84fa..668db94d101 100644
18 --- a/dev-libs/libratbag/Manifest
19 +++ b/dev-libs/libratbag/Manifest
20 @@ -1 +1,2 @@
21 DIST libratbag-0.15.tar.gz 249492 BLAKE2B 0f5b35800cb9f82cb892dacd5e3b041843cf5513507ee4882ec5b3f8c8aec8a24594736f2eb1c8e373a0ee38ace1e6328cbd4816d6e5b2cd1f2154ebd803a5fa SHA512 add47a6b3d771de77c6307e128a549f5295e216059b5a2375aa6b2b6bbebcf9a93d7bf148181b3f39f855976e9b6f57072dd9198d07828bebe85409f4ad994aa
22 +DIST libratbag-0.16.tar.gz 253080 BLAKE2B ede56838c822519b4fe4c6846f5d6d237104fc06f96fb17aa62b4c712965f00827973ebe732ee5ac9a16f101baf0b63eb445fbb97746df3b8ed24d6e085b34e1 SHA512 b3f2fee39ec85c0e08d257753241fb0e553de53eb7409a3b95f93a0fac3989a9411c53c915e72bef19bcfc5682fe9cdafaeb1f41f2718ab02766859f565415e3
23
24 diff --git a/dev-libs/libratbag/libratbag-0.16.ebuild b/dev-libs/libratbag/libratbag-0.16.ebuild
25 new file mode 100644
26 index 00000000000..91fa0ecda28
27 --- /dev/null
28 +++ b/dev-libs/libratbag/libratbag-0.16.ebuild
29 @@ -0,0 +1,94 @@
30 +# Copyright 1999-2021 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=7
34 +
35 +PYTHON_COMPAT=( python3_{7..9} )
36 +
37 +inherit meson python-single-r1 systemd udev
38 +
39 +DESCRIPTION="Library to configure gaming mice"
40 +HOMEPAGE="https://github.com/libratbag/libratbag"
41 +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
42 +
43 +LICENSE="MIT"
44 +SLOT="0"
45 +KEYWORDS="~amd64 ~x86"
46 +IUSE="doc elogind systemd test"
47 +REQUIRED_USE="
48 + ${PYTHON_REQUIRED_USE}
49 + ^^ ( elogind systemd )
50 +"
51 +RESTRICT="!test? ( test )"
52 +
53 +BDEPEND="
54 + ${PYTHON_DEPS}
55 + dev-lang/swig
56 + virtual/pkgconfig
57 + doc? ( app-doc/doxygen )
58 + test? (
59 + dev-libs/check
60 + dev-libs/gobject-introspection
61 + dev-util/valgrind
62 + $(python_gen_cond_dep '
63 + dev-python/pygobject:3[${PYTHON_MULTI_USEDEP}]
64 + dev-python/python-evdev[${PYTHON_MULTI_USEDEP}]
65 + ')
66 + )
67 +"
68 +RDEPEND="
69 + ${PYTHON_DEPS}
70 + acct-group/plugdev
71 + dev-libs/json-glib
72 + dev-libs/libevdev
73 + virtual/libudev
74 + $(python_gen_cond_dep '
75 + dev-python/pygobject:3[${PYTHON_MULTI_USEDEP}]
76 + dev-python/python-evdev[${PYTHON_MULTI_USEDEP}]
77 + ')
78 + elogind? ( sys-auth/elogind )
79 + systemd? ( sys-apps/systemd )
80 +"
81 +DEPEND="
82 + ${RDEPEND}
83 + dev-libs/gobject-introspection
84 +"
85 +
86 +src_prepare() {
87 + default
88 +
89 + if use elogind ; then
90 + # Fix systemd includes for elogind
91 + sed -i -e 's@include <systemd@include <elogind@' \
92 + ratbagd/ratbag*.c || die
93 + fi
94 +}
95 +
96 +src_configure() {
97 + python_setup
98 +
99 + local emesonargs=(
100 + $(meson_use doc documentation)
101 + $(meson_use systemd)
102 + $(meson_use test tests)
103 + -Ddbus-group="plugdev"
104 + -Dlogind-provider=$(usex elogind elogind systemd)
105 + -Dsystemd-unit-dir="$(systemd_get_systemunitdir)"
106 + -Dudev-dir="${EPREFIX}$(get_udevdir)"
107 + )
108 +
109 + meson_src_configure
110 +}
111 +
112 +src_install() {
113 + meson_src_install
114 + python_fix_shebang "${ED}"/usr/bin/
115 + newinitd "${FILESDIR}"/ratbagd.init ratbagd
116 +}
117 +
118 +pkg_postinst() {
119 + if [[ -z "${REPLACING_VERSIONS}" ]] ; then
120 + elog 'You need to be in "plugdev" group in order to access the'
121 + elog 'ratbagd dbus interface'
122 + fi
123 +}