diff options
author | Gonçalo Negrier Duarte <gonegrier.duarte@gmail.com> | 2024-03-06 20:52:39 +0000 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2024-04-20 10:53:48 +0300 |
commit | 0311e48d4d6b911671f7bb784dd268450df09fc9 (patch) | |
tree | 5ef498824970e4952cc25b5dc2437bbb419768e0 /dev-libs/libratbag | |
parent | app-misc/boxes: drop 2.2.0 (diff) | |
download | gentoo-0311e48d4d6b911671f7bb784dd268450df09fc9.tar.gz gentoo-0311e48d4d6b911671f7bb784dd268450df09fc9.tar.bz2 gentoo-0311e48d4d6b911671f7bb784dd268450df09fc9.zip |
dev-libs/libratbag: drop 0.17, add 0.17-r1, 9999 * add 9999
since libratbag is not update often
Signed-off-by: Gonçalo Negrier Duarte <gonegrier.duarte@gmail.com>
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'dev-libs/libratbag')
-rw-r--r-- | dev-libs/libratbag/libratbag-0.17-r1.ebuild (renamed from dev-libs/libratbag/libratbag-0.17.ebuild) | 10 | ||||
-rw-r--r-- | dev-libs/libratbag/libratbag-9999.ebuild | 108 |
2 files changed, 116 insertions, 2 deletions
diff --git a/dev-libs/libratbag/libratbag-0.17.ebuild b/dev-libs/libratbag/libratbag-0.17-r1.ebuild index 79d932aef8d8..e1cf833f0ff6 100644 --- a/dev-libs/libratbag/libratbag-0.17.ebuild +++ b/dev-libs/libratbag/libratbag-0.17-r1.ebuild @@ -9,11 +9,17 @@ 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" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/libratbag/libratbag.git" +else + SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi LICENSE="MIT" SLOT="0" -KEYWORDS="~amd64 ~x86" IUSE="doc elogind systemd test" REQUIRED_USE=" ${PYTHON_REQUIRED_USE} diff --git a/dev-libs/libratbag/libratbag-9999.ebuild b/dev-libs/libratbag/libratbag-9999.ebuild new file mode 100644 index 000000000000..e1cf833f0ff6 --- /dev/null +++ b/dev-libs/libratbag/libratbag-9999.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..11} ) + +inherit meson python-single-r1 systemd udev + +DESCRIPTION="Library to configure gaming mice" +HOMEPAGE="https://github.com/libratbag/libratbag" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/libratbag/libratbag.git" +else + SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="MIT" +SLOT="0" +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-debug/valgrind + $(python_gen_cond_dep ' + dev-python/evdev[${PYTHON_USEDEP}] + dev-python/pygobject:3[${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/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' +} |