summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Brasseur <nielzsen@protonmail.com>2022-12-07 23:14:48 +0100
committerViorel Munteanu <ceamac@gentoo.org>2022-12-21 14:21:33 +0200
commit4945b17134ddd01f8a76da37854bd42bb48f4aaa (patch)
tree7cd9014c27191d5255939f685544f5c3f04b55f8 /dev-libs/libratbag
parentdev-embedded/rpi-eeprom: add 13.19_p1 (diff)
downloadgentoo-4945b17134ddd01f8a76da37854bd42bb48f4aaa.tar.gz
gentoo-4945b17134ddd01f8a76da37854bd42bb48f4aaa.tar.bz2
gentoo-4945b17134ddd01f8a76da37854bd42bb48f4aaa.zip
dev-libs/libratbag: add 0.17
Signed-off-by: Roman Brasseur <nielzsen@protonmail.com> Closes: https://github.com/gentoo/gentoo/pull/28593 Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
Diffstat (limited to 'dev-libs/libratbag')
-rw-r--r--dev-libs/libratbag/Manifest1
-rw-r--r--dev-libs/libratbag/libratbag-0.17.ebuild102
2 files changed, 103 insertions, 0 deletions
diff --git a/dev-libs/libratbag/Manifest b/dev-libs/libratbag/Manifest
index 668db94d101e..9c0909368ccd 100644
--- a/dev-libs/libratbag/Manifest
+++ b/dev-libs/libratbag/Manifest
@@ -1,2 +1,3 @@
DIST libratbag-0.15.tar.gz 249492 BLAKE2B 0f5b35800cb9f82cb892dacd5e3b041843cf5513507ee4882ec5b3f8c8aec8a24594736f2eb1c8e373a0ee38ace1e6328cbd4816d6e5b2cd1f2154ebd803a5fa SHA512 add47a6b3d771de77c6307e128a549f5295e216059b5a2375aa6b2b6bbebcf9a93d7bf148181b3f39f855976e9b6f57072dd9198d07828bebe85409f4ad994aa
DIST libratbag-0.16.tar.gz 253080 BLAKE2B ede56838c822519b4fe4c6846f5d6d237104fc06f96fb17aa62b4c712965f00827973ebe732ee5ac9a16f101baf0b63eb445fbb97746df3b8ed24d6e085b34e1 SHA512 b3f2fee39ec85c0e08d257753241fb0e553de53eb7409a3b95f93a0fac3989a9411c53c915e72bef19bcfc5682fe9cdafaeb1f41f2718ab02766859f565415e3
+DIST libratbag-0.17.tar.gz 279273 BLAKE2B 7252afc8bca5d95c24d61dbd68c4e486550df7d6d9fa74a8c9d2a58c6363ed2ee289c0d02cdd72c968618f5c08a0687c97836dd2c47b457ba4228f4716b50cb9 SHA512 80ab5c895d83e28b6b6adcd0669854944d7932ef037c8d64b923a7362399e861475e9d81c5ee2cf814f654d7796b00a81314cc177f34e13c8684d525974068c8
diff --git a/dev-libs/libratbag/libratbag-0.17.ebuild b/dev-libs/libratbag/libratbag-0.17.ebuild
new file mode 100644
index 000000000000..659a42e11112
--- /dev/null
+++ b/dev-libs/libratbag/libratbag-0.17.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+
+inherit meson python-single-r1 systemd udev
+
+DESCRIPTION="Library to configure gaming mice"
+HOMEPAGE="https://github.com/libratbag/libratbag"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc elogind systemd test"
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ ^^ ( elogind systemd )
+"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ ${PYTHON_DEPS}
+ dev-lang/swig
+ virtual/pkgconfig
+ doc? (
+ $(python_gen_cond_dep '
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
+ ')
+ )
+ test? (
+ dev-libs/check
+ dev-libs/gobject-introspection
+ dev-util/valgrind
+ $(python_gen_cond_dep '
+ dev-python/pygobject:3[${PYTHON_USEDEP}]
+ dev-python/python-evdev[${PYTHON_USEDEP}]
+ ')
+ )
+"
+RDEPEND="
+ ${PYTHON_DEPS}
+ acct-group/plugdev
+ dev-libs/glib:2
+ dev-libs/json-glib
+ dev-libs/libevdev
+ dev-libs/libunistring:=
+ virtual/libudev:=
+ $(python_gen_cond_dep '
+ dev-python/pygobject:3[${PYTHON_USEDEP}]
+ dev-python/python-evdev[${PYTHON_USEDEP}]
+ ')
+ elogind? ( sys-auth/elogind )
+ systemd? ( sys-apps/systemd )
+"
+DEPEND="
+ ${RDEPEND}
+ dev-libs/gobject-introspection
+"
+
+src_prepare() {
+ default
+
+ if use elogind ; then
+ # Fix systemd includes for elogind
+ sed -i -e 's@include <systemd@include <elogind@' \
+ ratbagd/ratbag*.c || die
+ fi
+}
+
+src_configure() {
+ python_setup
+
+ local emesonargs=(
+ $(meson_use doc documentation)
+ $(meson_use systemd)
+ $(meson_use test tests)
+ -Ddbus-group="plugdev"
+ -Dlogind-provider=$(usex elogind elogind systemd)
+ -Dsystemd-unit-dir="$(systemd_get_systemunitdir)"
+ -Dudev-dir="${EPREFIX}$(get_udevdir)"
+ )
+
+ meson_src_configure
+}
+
+src_install() {
+ meson_src_install
+ python_fix_shebang "${ED}"/usr/bin/
+ newinitd "${FILESDIR}"/ratbagd.init ratbagd
+}
+
+pkg_postinst() {
+ if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+ elog 'You need to be in "plugdev" group in order to access the'
+ elog 'ratbagd dbus interface'
+ fi
+ elog 'You may be required to create and/or be part of the "games" group if you intend on using piper'
+}