summaryrefslogtreecommitdiff
path: root/dev-libs/libratbag
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-06-03 00:07:26 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-06-03 00:07:26 +0100
commita3bb28551df94028000fb72308a9e9baa01458b0 (patch)
tree33b14c7bf0dffbd5bb04dbd5b395514ebdda4896 /dev-libs/libratbag
parent6657c680376cedf378fcf328e5fa03ed3b41d580 (diff)
gentoo auto-resync : 03:06:2024 - 00:07:25
Diffstat (limited to 'dev-libs/libratbag')
-rw-r--r--dev-libs/libratbag/Manifest9
-rw-r--r--dev-libs/libratbag/files/libratbag-0.16-musl-error.h.patch69
-rw-r--r--dev-libs/libratbag/files/libratbag-0.17-python3.12-imp.patch38
-rw-r--r--dev-libs/libratbag/libratbag-0.15.ebuild101
-rw-r--r--dev-libs/libratbag/libratbag-0.17-r2.ebuild (renamed from dev-libs/libratbag/libratbag-0.16.ebuild)15
-rw-r--r--dev-libs/libratbag/libratbag-9999.ebuild2
6 files changed, 53 insertions, 181 deletions
diff --git a/dev-libs/libratbag/Manifest b/dev-libs/libratbag/Manifest
index 2d2a789fb7b4..bfb1d005c41d 100644
--- a/dev-libs/libratbag/Manifest
+++ b/dev-libs/libratbag/Manifest
@@ -1,10 +1,7 @@
-AUX libratbag-0.16-musl-error.h.patch 1786 BLAKE2B 80e333dfa7e7e2a6d207885836b3654f01c821a21d1cda233770eb4d5879239b74e0886826f2118b1e7f5674f35e697ec933b79b43f0f415c94a1c62e159594e SHA512 43fd1e68670228a438c68714987d7ff930abfc271dc54abc26e0c7809e2302c7d3d45d3293ae9edfde2887b54a74dcda9eeff372145165eed5cb048672d8c69a
+AUX libratbag-0.17-python3.12-imp.patch 1345 BLAKE2B 8b65589c91e7f8f1b81bb88961eb5b549c12f16bef5ae8d435d9c8fc3c233d44e04d5d94f317fb0e0c0a3bf3b31956457ba0fbaa52fb7323ca48f772f03e7b70 SHA512 6272dcc3ea3b746e1976b985a2dd04c16eb30e950fb1f97e85a163416a0e2aacbb688c6f3e6bcc44b866ed04e48f4646bdc033ca039d9860ab868e5762d410e6
AUX ratbagd.init 336 BLAKE2B c6f2ef095cd7d929c3097a18e912ae4b3615bd0ebbdfdaa9f4151b312614c016af2f3581c2fbb2853472cb70ce47d5f26f254772fb9f3dabba2ce93626b672b7 SHA512 3908b3481b49bcebc84e3023ff911dcbc1773e4322356def0067ed4aa426184cf43e12de702e98210157d17c2806d57c1cb4bc79ddb0b8660036a6fe3974607e
-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
-EBUILD libratbag-0.15.ebuild 2089 BLAKE2B 32577021a0a4033ef11dafa52d602c18edd756c0139bedcced067a830fe66db3e57320026f65edf5c2b8eaf9a5ead02f6260c636916026d63edd59b817aff1b5 SHA512 b28697fe6e63a9a4e0f77fb801bd0e58cb232276412cbffc4af25c3e09f4d2ad643e930dae985eea2249174aaa283c7514f38f6d08db6faabc3b9e27292dba98
-EBUILD libratbag-0.16.ebuild 2147 BLAKE2B 01f7df46baa647ca78d387e311292f70622bcb511699bb9da683bad33f0cc72e1a841d5ee326d5a8700e6ace862c3d0223921bf9005af620180eee7117c84b0f SHA512 8345e54c264f4fa9e41cda1ccc9d5f6d157c438c40dda2b2eb78aeab0696fa0501ed53ff6d67c39e621fe4ef50b58b1aaa24ce823a0e1d792f3df0d5420278d5
EBUILD libratbag-0.17-r1.ebuild 2314 BLAKE2B 41f25df17270fd0f537d91534dade949bac360b80399ce8302b6fcc95c7b5c57d49c8699138756d3396bbf432db746c3ab8835b3181f3e33d79a4af5af68a4fe SHA512 8a5a703725c2dfc7fcf5440d3a3ebf3e35399078bb32a724a0bf8f41147c99b9cbdb8dfcc597c1647bcba12e7c70f42b96265b8f71569dd0e9719e8378a7204c
-EBUILD libratbag-9999.ebuild 2314 BLAKE2B 41f25df17270fd0f537d91534dade949bac360b80399ce8302b6fcc95c7b5c57d49c8699138756d3396bbf432db746c3ab8835b3181f3e33d79a4af5af68a4fe SHA512 8a5a703725c2dfc7fcf5440d3a3ebf3e35399078bb32a724a0bf8f41147c99b9cbdb8dfcc597c1647bcba12e7c70f42b96265b8f71569dd0e9719e8378a7204c
+EBUILD libratbag-0.17-r2.ebuild 2378 BLAKE2B 9d7a0dc9b30be878e69e4147ea230a398ccf8358639bd399a31865356d12447dcfe70de97009d031c6c6f04aecc3c3bdbe164f25571c0a6f64bb422029fd19c6 SHA512 3c10d0316bd84746263b2e872e9de509e5b70d36daa6d20d6daedb85707260cb8d180a4a58df7a771d2a1738917c3bc0f3e298c0f46943ef92fbd720f5de4443
+EBUILD libratbag-9999.ebuild 2314 BLAKE2B 154fbe01378273fc6a0a7c2c4fe4824db1a5de068d8d58930cf32ffd93b40ce9a1b1c697b4de6780b04d0a0a8cf8e0252930f6a9a17547a6303f13a47bb41bc0 SHA512 e66b1202c01d54ecb458128bd52bc064e3519725c872867e72e068be4af0084efb5bce809022bbf7cd333444bac3eb90267f7dc2eda0dcec639d34b51f490072
MISC metadata.xml 490 BLAKE2B 1acac7162603488b92a2a99c2bf9ee12971b79d62b48ebea2bc6fdbb5e45f351002cb932cd6a8222fcd23acdffa77d4cd708b71459a5f557f668a9687da66efa SHA512 e55ba297fed6952b379b92bf14adfe02fd4a90a7f305d70126fb28ff12c63e64ff2781f378c279bd17392bf917d31f4ed2b3679b308ecf0e713e42eccbc9d1a0
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/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..6ded679b1bad
--- /dev/null
+++ b/dev-libs/libratbag/files/libratbag-0.17-python3.12-imp.patch
@@ -0,0 +1,38 @@
+https://bugs.gentoo.org/929423
+https://github.com/libratbag/libratbag/pull/1569
+https://github.com/libratbag/libratbag/commit/27b0d4a2d9cd21fa9f11a0770d94c578db6324d1
+--- 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-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.17-r2.ebuild
index ad08ddd3c6db..7620f30d382d 100644
--- a/dev-libs/libratbag/libratbag-0.16.ebuild
+++ b/dev-libs/libratbag/libratbag-0.17-r2.ebuild
@@ -3,17 +3,23 @@
EAPI=8
-PYTHON_COMPAT=( python3_10 )
+PYTHON_COMPAT=( python3_{10..12} )
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}
@@ -62,7 +68,7 @@ DEPEND="
"
PATCHES=(
- "${FILESDIR}"/${PN}-0.16-musl-error.h.patch
+ "${FILESDIR}"/libratbag-0.17-python3.12-imp.patch
)
src_prepare() {
@@ -102,4 +108,5 @@ pkg_postinst() {
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'
}
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