* [gentoo-commits] repo/gentoo:master commit in: dev-libs/libratbag/, dev-libs/libratbag/files/
@ 2020-12-14 17:17 Lars Wendler
0 siblings, 0 replies; 3+ messages in thread
From: Lars Wendler @ 2020-12-14 17:17 UTC (permalink / raw
To: gentoo-commits
commit: 64bc2dea286b22f4cce895ece50684affd6bf215
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 14 16:48:13 2020 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon Dec 14 17:17:37 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64bc2dea
dev-libs/libratbag: ebuild enhancements
- use systemd.eclass to determine systemunitdir
- Set plugdev group as the unix group that may access ratbagd via dbus
- (R)DEPEND on acct-group/plugdev
- Add openrc init script for ratbagd
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
dev-libs/libratbag/files/ratbagd.init | 13 +++++++++++++
dev-libs/libratbag/libratbag-0.15.ebuild | 17 ++++++++++++++---
dev-libs/libratbag/metadata.xml | 5 +++++
3 files changed, 32 insertions(+), 3 deletions(-)
diff --git a/dev-libs/libratbag/files/ratbagd.init b/dev-libs/libratbag/files/ratbagd.init
new file mode 100644
index 00000000000..d3e7d08334c
--- /dev/null
+++ b/dev-libs/libratbag/files/ratbagd.init
@@ -0,0 +1,13 @@
+#!/sbin/openrc-run
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+description="system daemon to introspect and modify configurable mice"
+pidfile="/run/${SVCNAME}.pid"
+command="/usr/bin/ratbagd"
+start_stop_daemon_args="--quiet"
+command_background="true"
+
+depend() {
+ need dbus
+}
diff --git a/dev-libs/libratbag/libratbag-0.15.ebuild b/dev-libs/libratbag/libratbag-0.15.ebuild
index 599db86cfd6..bd064182e84 100644
--- a/dev-libs/libratbag/libratbag-0.15.ebuild
+++ b/dev-libs/libratbag/libratbag-0.15.ebuild
@@ -5,7 +5,7 @@ EAPI=7
PYTHON_COMPAT=( python3_{6,7,8} )
-inherit meson python-single-r1 udev
+inherit meson python-single-r1 systemd udev
DESCRIPTION="Library to configure gaming mice"
HOMEPAGE="https://github.com/libratbag/libratbag"
@@ -37,6 +37,7 @@ BDEPEND="
"
RDEPEND="
${PYTHON_DEPS}
+ acct-group/plugdev
dev-libs/gobject-introspection
dev-libs/libevdev
virtual/libudev
@@ -63,10 +64,12 @@ src_configure() {
python_setup
local emesonargs=(
- $(meson_use systemd)
- -Dlogind-provider=$(usex elogind elogind systemd)
$(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)"
)
@@ -76,4 +79,12 @@ 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
}
diff --git a/dev-libs/libratbag/metadata.xml b/dev-libs/libratbag/metadata.xml
index 2ae9cbec355..f0fab9cd91a 100644
--- a/dev-libs/libratbag/metadata.xml
+++ b/dev-libs/libratbag/metadata.xml
@@ -9,6 +9,11 @@
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
+ <maintainer type="person">
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ <description>Proxy maintainer for Alex</description>
+ </maintainer>
<upstream>
<remote-id type="github">libratbag/libratbag</remote-id>
</upstream>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/libratbag/, dev-libs/libratbag/files/
@ 2024-06-02 2:26 Sam James
0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2024-06-02 2:26 UTC (permalink / raw
To: gentoo-commits
commit: c0c8d8ab023fcd17769203ee7af06468bb01e35c
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 2 02:16:08 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun 2 02:16:08 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0c8d8ab
dev-libs/libratbag: enable py3.12
Closes: https://bugs.gentoo.org/929423
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/libratbag-0.17-python3.12-imp.patch | 36 ++++++++++++++++++++++
...ratbag-9999.ebuild => libratbag-0.17-r2.ebuild} | 6 +++-
dev-libs/libratbag/libratbag-9999.ebuild | 2 +-
3 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/dev-libs/libratbag/files/libratbag-0.17-python3.12-imp.patch b/dev-libs/libratbag/files/libratbag-0.17-python3.12-imp.patch
new file mode 100644
index 000000000000..2a6906aabf3d
--- /dev/null
+++ b/dev-libs/libratbag/files/libratbag-0.17-python3.12-imp.patch
@@ -0,0 +1,36 @@
+https://bugs.gentoo.org/929423
+--- a/tools/toolbox.py
++++ b/tools/toolbox.py
+@@ -21,7 +21,8 @@
+ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ # DEALINGS IN THE SOFTWARE.
+
+-import imp
++import importlib.util
++import importlib.machinery
+ import os
+ import subprocess
+ import sys
+@@ -45,8 +46,11 @@ def import_non_standard_path(name, path):
+ # If any of the following calls raises an exception,
+ # there's a problem we can't handle -- let the caller handle it.
+
+- with open(path, 'rb') as fp:
+- module = imp.load_module(name, fp, os.path.basename(path), ('.py', 'rb', imp.PY_SOURCE))
++ loader = importlib.machinery.SourceFileLoader(name, path)
++ spec = importlib.util.spec_from_file_location(name, path, loader=loader)
++ module = importlib.util.module_from_spec(spec)
++ sys.modules[name] = module
++ loader.exec_module(module)
+
+ return module
+
+@@ -107,7 +111,7 @@ def sync_dbus():
+ main_context.iteration(False)
+
+
+-ratbagctl = import_non_standard_path(RATBAGCTL_NAME, RATBAGCTL_PATH)
++import_non_standard_path(RATBAGCTL_NAME, RATBAGCTL_PATH)
+
+ from ratbagctl import open_ratbagd, get_parser, RatbagError, RatbagErrorCapability # NOQA
+
diff --git a/dev-libs/libratbag/libratbag-9999.ebuild b/dev-libs/libratbag/libratbag-0.17-r2.ebuild
similarity index 95%
copy from dev-libs/libratbag/libratbag-9999.ebuild
copy to dev-libs/libratbag/libratbag-0.17-r2.ebuild
index e1cf833f0ff6..7620f30d382d 100644
--- a/dev-libs/libratbag/libratbag-9999.ebuild
+++ b/dev-libs/libratbag/libratbag-0.17-r2.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_COMPAT=( python3_{10..12} )
inherit meson python-single-r1 systemd udev
@@ -67,6 +67,10 @@ DEPEND="
dev-libs/gobject-introspection
"
+PATCHES=(
+ "${FILESDIR}"/libratbag-0.17-python3.12-imp.patch
+)
+
src_prepare() {
default
diff --git a/dev-libs/libratbag/libratbag-9999.ebuild b/dev-libs/libratbag/libratbag-9999.ebuild
index e1cf833f0ff6..47fc210ab543 100644
--- a/dev-libs/libratbag/libratbag-9999.ebuild
+++ b/dev-libs/libratbag/libratbag-9999.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_COMPAT=( python3_{10..12} )
inherit meson python-single-r1 systemd udev
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/libratbag/, dev-libs/libratbag/files/
@ 2024-06-02 2:26 Sam James
0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2024-06-02 2:26 UTC (permalink / raw
To: gentoo-commits
commit: c4ef467cef8871c82e86880082228997d0efcb3f
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 2 01:47:20 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun 2 01:47:20 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4ef467c
dev-libs/libratbag: drop 0.15, 0.16
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-libs/libratbag/Manifest | 2 -
.../files/libratbag-0.16-musl-error.h.patch | 69 --------------
dev-libs/libratbag/libratbag-0.15.ebuild | 101 --------------------
dev-libs/libratbag/libratbag-0.16.ebuild | 105 ---------------------
4 files changed, 277 deletions(-)
diff --git a/dev-libs/libratbag/Manifest b/dev-libs/libratbag/Manifest
index 9c0909368ccd..619b6ab36a94 100644
--- a/dev-libs/libratbag/Manifest
+++ b/dev-libs/libratbag/Manifest
@@ -1,3 +1 @@
-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/files/libratbag-0.16-musl-error.h.patch b/dev-libs/libratbag/files/libratbag-0.16-musl-error.h.patch
deleted file mode 100644
index a3b0b187c154..000000000000
--- a/dev-libs/libratbag/files/libratbag-0.16-musl-error.h.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-# Since musl doesn't provide error.h we need to check before adding it. If
-# error.h is present in system only then we include it else we use err.h.
-# Already there exists a bug report for this upstream [1]. The devs are open to
-# a custom implementation of error but for now this patch for do it.
-#
-# [1]: https://github.com/libratbag/libratbag/issues/1253
-#
-# Closes: https://bugs.gentoo.org/830557
---- a/meson.build
-+++ b/meson.build
-@@ -74,8 +74,13 @@ dep_libevdev = dependency('libevdev')
- dep_glib = dependency('glib-2.0')
- dep_json_glib = dependency('json-glib-1.0')
- dep_lm = cc.find_library('m')
-+error_exists = cc.has_header('error.h')
- dep_unistring = cc.find_library('unistring')
-
-+if error_exists
-+ add_global_arguments('-DHAVE_ERROR_H', language : 'c')
-+endif
-+
- if get_option('logind-provider') == 'elogind'
- dep_logind = dependency('libelogind', version : '>=227')
- else
---- a/tools/hidpp10-dump-page.c
-+++ b/tools/hidpp10-dump-page.c
-@@ -23,7 +23,12 @@
-
- #include <config.h>
- #include <errno.h>
-+#ifdef HAVE_ERROR_H
- #include <error.h>
-+#else
-+#include <err.h>
-+#define error(status, errno, ...) err(status, __VA_ARGS__)
-+#endif
- #include <fcntl.h>
-
- #include <hidpp10.h>
---- a/tools/hidpp20-dump-page.c
-+++ b/tools/hidpp20-dump-page.c
-@@ -23,7 +23,12 @@
-
- #include <config.h>
- #include <errno.h>
-+#ifdef HAVE_ERROR_H
- #include <error.h>
-+#else
-+#include <err.h>
-+#define error(status, errno, ...) err(status, __VA_ARGS__)
-+#endif
- #include <fcntl.h>
-
- #include <hidpp20.h>
---- a/tools/hidpp20-reset.c
-+++ b/tools/hidpp20-reset.c
-@@ -23,7 +23,12 @@
-
- #include <config.h>
- #include <errno.h>
-+#ifdef HAVE_ERROR_H
- #include <error.h>
-+#else
-+#include <err.h>
-+#define error(status, errno, ...) err(status, __VA_ARGS__)
-+#endif
- #include <fcntl.h>
-
- #include <hidpp20.h>
diff --git a/dev-libs/libratbag/libratbag-0.15.ebuild b/dev-libs/libratbag/libratbag-0.15.ebuild
deleted file mode 100644
index ba7c076793e6..000000000000
--- a/dev-libs/libratbag/libratbag-0.15.ebuild
+++ /dev/null
@@ -1,101 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_10 )
-
-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-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
-}
diff --git a/dev-libs/libratbag/libratbag-0.16.ebuild b/dev-libs/libratbag/libratbag-0.16.ebuild
deleted file mode 100644
index ad08ddd3c6db..000000000000
--- a/dev-libs/libratbag/libratbag-0.16.ebuild
+++ /dev/null
@@ -1,105 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_10 )
-
-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-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
-"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-0.16-musl-error.h.patch
-)
-
-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
-}
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-02 2:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-14 17:17 [gentoo-commits] repo/gentoo:master commit in: dev-libs/libratbag/, dev-libs/libratbag/files/ Lars Wendler
-- strict thread matches above, loose matches on Subject: below --
2024-06-02 2:26 Sam James
2024-06-02 2:26 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox