summaryrefslogtreecommitdiff
path: root/app-misc/piper
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-11-14 12:50:42 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-11-14 12:50:42 +0000
commit7d58bf45ea7b2d8f188fd2aa40484a8c9a3381a7 (patch)
tree74a135cfbc172935bc5b36a9e7c29915932b5445 /app-misc/piper
parentafa8da78d8135ca28150730e9c60af9d875f0a5b (diff)
gentoo auto-resync : 14:11:2022 - 12:50:41
Diffstat (limited to 'app-misc/piper')
-rw-r--r--app-misc/piper/Manifest11
-rw-r--r--app-misc/piper/files/piper-0.5.1-disable-flake8-linting.patch17
-rw-r--r--app-misc/piper/files/piper-0.6-fix-tests.patch68
-rw-r--r--app-misc/piper/files/piper-0.7-fix-tests.patch66
-rw-r--r--app-misc/piper/metadata.xml34
-rw-r--r--app-misc/piper/piper-0.6.ebuild6
-rw-r--r--app-misc/piper/piper-0.7.ebuild (renamed from app-misc/piper/piper-0.5.1-r2.ebuild)28
7 files changed, 188 insertions, 42 deletions
diff --git a/app-misc/piper/Manifest b/app-misc/piper/Manifest
index cd51b2fd5637..b91d92c5e127 100644
--- a/app-misc/piper/Manifest
+++ b/app-misc/piper/Manifest
@@ -1,6 +1,7 @@
-AUX piper-0.5.1-disable-flake8-linting.patch 525 BLAKE2B 18d51cbf8c8a2f79d119b0d1a2afb2242bc2acff617de4f13c008c78edb41db0dabf05dd0a97f6d0f661d01200b08ca40b972c0b1a7972f27a1fe40e22562229 SHA512 cd5cc7be096cce6a2cafe5f27739e73f3c9c7df4b9ff6f2908d87eebb90663f25b424a34ccb1d135a0ed3517622f02345a74f076e887eecbab9051bf0684cbc5
-DIST piper-0.5.1.tar.gz 234944 BLAKE2B 1df33ca6e2d0dae95b34f8e3a98c6829a8f113ae68fb60980ff40374090b9272f86d69103c33fe0a4e1b0ac21a84724e7cabccca4ce8dd23d02f6d56e67d072b SHA512 13368521a9c32b2dc3300b129ed3bb07a6204623fa750f8f75ca31d2a3b60f43ae5f5066ef755814960d4890a489bdfd21b0e1b8f456b3445e0ba35ac06bc877
+AUX piper-0.6-fix-tests.patch 3225 BLAKE2B 17c04a07581ee097ab828bcff67dac74d236ba6b3f6f35307fb51bbbd6b5331f4d2bb49a1605f5bb92c1dfe03d0815c66d449c579d59f66511f6b42faa099168 SHA512 5767a9a4745c9ff8c0d44f69d10c843d8494eeff2c1281809d356d6854652a73e2d713c3376733de9afc2413b5c6faaaf6995a1092f777ddcbb7341f42700342
+AUX piper-0.7-fix-tests.patch 3238 BLAKE2B 289ef09b85964cee3085403e1f26dca52ee29e685c67f46cebf393798712e24b68eec1e325ce506a0961501064e888d7babd4c2a2159b8a5cbc8674fe08531c9 SHA512 0075e11f27172b753977eec0f94a3197a9cd68e3f55c6e18b91a0577440555bc940bb61eae56a778fa943e2a3c54ef21dee8c619efde49653b71fc436c5b1ce8
DIST piper-0.6.tar.gz 254653 BLAKE2B ea621e556e2ee6a98e334f2e61df70d700a9cb371dcd5bddc690b4a4c97543a6957bc339bddbde2cf91ac3b201d3bd70fe336974f17e36cfdcbb4895257af993 SHA512 9d76cbc5f3a91c68d10355a1b429c05873effcaa80086fb51c7d4a7bdbbb3e0faf42ec8ccad611a15f5c954d3014a8416e4a497c86167c227818771a24d108a0
-EBUILD piper-0.5.1-r2.ebuild 1153 BLAKE2B 313ca6154136fa60a804c8586fea181200d867aa97a18cf16a3b0b03a94eb68a52306ca6985673d9662c3667e0fe09406e9e786698840095c99b1aaf4bcef80d SHA512 a3e549552348a35d95944d79293f8959ea2eca07e9ae01d531642c20aec47e6e5de3f235a9153e28bd57fa1f57ff3517809db26df0afda9dbd73f1de01a8fbae
-EBUILD piper-0.6.ebuild 1265 BLAKE2B 240ed91dfe985ac11f7c6e72b04c0dd299e9c26fdfafcd6a7a490b58973db24dfd1241f74e0539b89bdf9d0414f37df889154e8baef168ed3a6709e33c7857f6 SHA512 bfce934f15e1b1832bd1cd7596520a976013d5831acd4b21d48b2a88c3c741de9ea3cc61a410efbd3116bb99090c7bf1005370093c22bc8fa94693b233f6a85c
-MISC metadata.xml 486 BLAKE2B 7f1a14adbeb4637d1a2eb04f148b71366a3a2caff2fe734e99ac1433f6b85d6830e7cb79d9f8911fe5f58fa52dc68d599b7f815429e5fe58f8405592bd4895d2 SHA512 96b7ae4493c05bdaba1441391c308fe69430d2c932d460c68e622b973133c26603e546209c6ac538337bdc02e5a9670cd4d258e0039e3b7071c84f5766e38e2a
+DIST piper-0.7.tar.gz 271658 BLAKE2B 8d3d411cc771a286ae0d7654b6d70f394e11edb182924619195b947d0d54df4db308e94aceebe0754ddd446538f1dce2ccb88dbf1cd44595b614d852e7394698 SHA512 fcbc30a4954ea6b0aa67c66052eab1e6b2d3039c927eeddcfc8b03d00f1c91e8f0ae80788ba0e4f053a612b03f594e74fd119dd11f52dd47608c99602e7e4940
+EBUILD piper-0.6.ebuild 1313 BLAKE2B 99c7b734eb169f6e49afc95904eae5a856b9a4cecae33dadfcf6ded8f7e01d1c88805fe1397782b1a6161cf1d8802a6dbcbcd595da01d85f272a443671376f42 SHA512 59937f28a290202adeb06959c6d08450fb3dea396c3c661ecea38918ef61e163fc3f57040a57e74df6d2f1d7ab50217afc9a111976e0384cabd3daf46d7ab353
+EBUILD piper-0.7.ebuild 1399 BLAKE2B 0a543a75c53cfe033652c3e4f3b85e7830c13d9a10a4a6cc970eb348c286fbdfa4d82f72ef0f3124ccdc000e12faf23ec5fa0d13f1615abffa247aaa78a01f9c SHA512 45d36dcd1720e7cba8a7d8eeb5060603535d6096e001d23c2ae65644bf4a9ae17d11ea3318096ced833e69fce3515e972de2ec6f80b9e2b3d617ddc8bd36a3e3
+MISC metadata.xml 1076 BLAKE2B 4c00bb84f4267ec8cad1f915ca0ed6ef35144aa8039eb8fde7a0674dde5320eb29ffc0ed840dd8dcf68af5663ab9816e779f05b492863bdc73305e878cf90e71 SHA512 44c9ef8d2171a168a116425d05832b58bd8490348e00d3d875fca2a957008cbc154fb7b66add99a4b1ff323aaf4cca716e25d47e3376b12188c85c67971ee70e
diff --git a/app-misc/piper/files/piper-0.5.1-disable-flake8-linting.patch b/app-misc/piper/files/piper-0.5.1-disable-flake8-linting.patch
deleted file mode 100644
index a0ede6671e04..000000000000
--- a/app-misc/piper/files/piper-0.5.1-disable-flake8-linting.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Remove linting test that is broken upstream.
-Bug: https://bugs.gentoo.org/807205
-
---- piper-0.5.1/meson.build
-+++ piper-0.5.1/meson.build
-@@ -119,11 +119,3 @@
- configuration: config_piper_devel)
-
- meson.add_install_script('meson_install.sh')
--
--flake8 = find_program('flake8', required: false)
--if flake8.found()
-- test('flake8', flake8,
-- args: ['--ignore=E501,W504',
-- join_paths(meson.source_root(), 'piper'),
-- join_paths(meson.source_root(), 'piper.in')])
--endif
diff --git a/app-misc/piper/files/piper-0.6-fix-tests.patch b/app-misc/piper/files/piper-0.6-fix-tests.patch
new file mode 100644
index 000000000000..e4a358e0ab59
--- /dev/null
+++ b/app-misc/piper/files/piper-0.6-fix-tests.patch
@@ -0,0 +1,68 @@
+Upstream commit https://github.com/libratbag/piper/commit/603d68726364cea5e71ef1f0153e3641ec889063, backported to 0.6
+Bug: https://bugs.gentoo.org/827510
+Bug: https://bugs.gentoo.org/834967
+
+From 603d68726364cea5e71ef1f0153e3641ec889063 Mon Sep 17 00:00:00 2001
+From: Tobias Kortkamp <tobias.kortkamp@gmail.com>
+Date: Mon, 1 Aug 2022 15:57:28 +0200
+Subject: [PATCH] Fix tests for out-of-source builds
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When the build directory is not _under_ the source directory then
+flake8 cannot find the local config file and it will try to check
+piper.in which fails per 1ed66262b77ebd9fe188894d36842527da39508a
+
+To fix this I propose to
+
+1. pass the config to flake8 explicitly
+2. remove piper.in from the args list since it is excluded in the
+ flake8 config anyway
+3. check the generated $build/piper.devel and $build/piper too per
+ 1ed66262b77ebd9fe188894d36842527da39508a
+4. merge the --ignore in meson.build with the config
+
+Steps to reproduce:
+
+```
+$ meson ../build
+$ ninja -C../build test
+...
+[17/18] Running all tests.
+1/5 piper:all / files-in-git SKIP 0.01s exit status 77
+2/5 piper / validate appdata file OK 0.04s
+3/5 piper / svg-lookup-check OK 0.10s
+4/5 piper / check-svg OK 0.18s
+5/5 piper / flake8 FAIL 1.00s exit status 1
+>>> MALLOC_PERTURB_=32 /gnu/store/yhhvrj6bns3ws85d338ah3bsc8jv4x64-profile/bin/flake8 --ignore=E501,W504 /home/tobias/ghq/github.com/libratbag/piper/piper /home/tobias/ghq/github.com/libratbag/piper/piper.in
+――――――――――――――――――――――――――――――――――――――――――――――― ✀ ―――――――――――――――――――――――――――――――――――――――――――――――
+/home/tobias/ghq/github.com/libratbag/piper/piper.in:11:19: E999 SyntaxError: invalid syntax
+――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
+```
+
+diff --git a/.flake8 b/.flake8
+index 8f1ba6f..170b294 100644
+--- a/.flake8
++++ b/.flake8
+@@ -1,3 +1,3 @@
+ [flake8]
+-ignore = E402,E501
++ignore = E402,E501,W504
+ exclude = .git,__pycache__,build,data,piper/piper.py,piper.in
+diff --git a/meson.build b/meson.build
+index 180a552..a4c73a1 100644
+--- a/meson.build
++++ b/meson.build
+@@ -135,8 +135,9 @@ if enable_tests
+ flake8 = find_program('flake8')
+ if flake8.found()
+ test('flake8', flake8,
+- args: ['--ignore=E501,W504',
++ args: ['--config=' + join_paths(meson.current_source_dir(), '.flake8'),
+ join_paths(meson.source_root(), 'piper'),
+- join_paths(meson.source_root(), 'piper.in')])
++ join_paths(meson.current_build_dir(), 'piper'),
++ join_paths(meson.current_build_dir(), 'piper.devel')])
+ endif
+ endif
diff --git a/app-misc/piper/files/piper-0.7-fix-tests.patch b/app-misc/piper/files/piper-0.7-fix-tests.patch
new file mode 100644
index 000000000000..ffd550c50728
--- /dev/null
+++ b/app-misc/piper/files/piper-0.7-fix-tests.patch
@@ -0,0 +1,66 @@
+Upstream commit https://github.com/libratbag/piper/commit/603d68726364cea5e71ef1f0153e3641ec889063, backported to 0.7
+
+From 603d68726364cea5e71ef1f0153e3641ec889063 Mon Sep 17 00:00:00 2001
+From: Tobias Kortkamp <tobias.kortkamp@gmail.com>
+Date: Mon, 1 Aug 2022 15:57:28 +0200
+Subject: [PATCH] Fix tests for out-of-source builds
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When the build directory is not _under_ the source directory then
+flake8 cannot find the local config file and it will try to check
+piper.in which fails per 1ed66262b77ebd9fe188894d36842527da39508a
+
+To fix this I propose to
+
+1. pass the config to flake8 explicitly
+2. remove piper.in from the args list since it is excluded in the
+ flake8 config anyway
+3. check the generated $build/piper.devel and $build/piper too per
+ 1ed66262b77ebd9fe188894d36842527da39508a
+4. merge the --ignore in meson.build with the config
+
+Steps to reproduce:
+
+```
+$ meson ../build
+$ ninja -C../build test
+...
+[17/18] Running all tests.
+1/5 piper:all / files-in-git SKIP 0.01s exit status 77
+2/5 piper / validate appdata file OK 0.04s
+3/5 piper / svg-lookup-check OK 0.10s
+4/5 piper / check-svg OK 0.18s
+5/5 piper / flake8 FAIL 1.00s exit status 1
+>>> MALLOC_PERTURB_=32 /gnu/store/yhhvrj6bns3ws85d338ah3bsc8jv4x64-profile/bin/flake8 --ignore=E501,W504 /home/tobias/ghq/github.com/libratbag/piper/piper /home/tobias/ghq/github.com/libratbag/piper/piper.in
+――――――――――――――――――――――――――――――――――――――――――――――― ✀ ―――――――――――――――――――――――――――――――――――――――――――――――
+/home/tobias/ghq/github.com/libratbag/piper/piper.in:11:19: E999 SyntaxError: invalid syntax
+――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
+```
+diff --git a/.flake8 b/.flake8
+index 8f1ba6f..170b294 100644
+--- a/.flake8
++++ b/.flake8
+@@ -1,3 +1,3 @@
+ [flake8]
+-ignore = E402,E501
++ignore = E402,E501,W504
+ exclude = .git,__pycache__,build,data,piper/piper.py,piper.in
+diff --git a/piper-0.7/meson.build b/piper-0.7/meson.build
+index 21963d8..03f0c3e 100644
+--- a/meson.build
++++ b/meson.build
+@@ -115,9 +115,10 @@ if enable_tests
+ flake8 = find_program('flake8')
+ if flake8.found()
+ test('flake8', flake8,
+- args: ['--ignore=E501,W504',
++ args: ['--config=' + join_paths(meson.current_source_dir(), '.flake8'),
+ join_paths(meson.current_source_dir(), 'piper'),
+- join_paths(meson.current_source_dir(), 'piper.in')])
++ join_paths(meson.current_build_dir(), 'piper'),
++ join_paths(meson.current_build_dir(), 'piper.devel')])
+ endif
+
+ test_svg_files = find_program('tests/check-svg.py')
diff --git a/app-misc/piper/metadata.xml b/app-misc/piper/metadata.xml
index 3a268846d1c3..ffb5815bc938 100644
--- a/app-misc/piper/metadata.xml
+++ b/app-misc/piper/metadata.xml
@@ -1,15 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person" proxied="yes">
- <email>alex@1stleg.com</email>
- <name>Alex Barker</name>
- </maintainer>
- <maintainer type="project" proxied="proxy">
- <email>proxy-maint@gentoo.org</email>
- <name>Proxy Maintainers</name>
- </maintainer>
- <upstream>
- <remote-id type="github">libratbag/piper</remote-id>
- </upstream>
+ <maintainer type="person" proxied="yes">
+ <email>alex@1stleg.com</email>
+ <name>Alex Barker</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription>
+ Piper is a graphical user interface to configure gaming mice.
+ Configuration options include changing the resolution (DPI) of the
+ mouse, adding and removing profiles, setting LED colors and changing
+ button behaviors.
+
+ Piper requires <pkg>dev-libs/libratbag</pkg>’s ratbagd, the daemon to actually communicate with the
+ mice. Piper is merely a front end to ratbagd, ratbagd must be
+ installed and running when Piper is launched.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">libratbag/piper</remote-id>
+ <bugs-to>https://github.com/libratbag/piper/issues</bugs-to>
+ <doc lang="en">https://github.com/libratbag/piper/wiki</doc>
+ </upstream>
</pkgmetadata>
diff --git a/app-misc/piper/piper-0.6.ebuild b/app-misc/piper/piper-0.6.ebuild
index bc683c50c698..eabda0240c5a 100644
--- a/app-misc/piper/piper-0.6.ebuild
+++ b/app-misc/piper/piper-0.6.ebuild
@@ -3,11 +3,11 @@
EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_COMPAT=( python3_{8..11} )
inherit meson python-single-r1 xdg
-DESCRIPTION="GTK configuration application for libratbag"
+DESCRIPTION="GTK application to configure gaming devices"
HOMEPAGE="https://github.com/libratbag/piper"
SRC_URI="https://github.com/libratbag/piper/archive/${PV}.tar.gz -> ${P}.tar.gz"
@@ -47,6 +47,8 @@ DEPEND="
virtual/libudev
"
+PATCHES=( "${FILESDIR}/${P}-fix-tests.patch" )
+
src_configure() {
python_setup
diff --git a/app-misc/piper/piper-0.5.1-r2.ebuild b/app-misc/piper/piper-0.7.ebuild
index e72e7068ab4e..e888d4b38086 100644
--- a/app-misc/piper/piper-0.5.1-r2.ebuild
+++ b/app-misc/piper/piper-0.7.ebuild
@@ -3,27 +3,38 @@
EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_COMPAT=( python3_{8..11} )
inherit meson python-single-r1 xdg
-DESCRIPTION="GTK configuration application for libratbag"
+DESCRIPTION="GTK application to configure gaming devices"
HOMEPAGE="https://github.com/libratbag/piper"
SRC_URI="https://github.com/libratbag/piper/archive/${PV}.tar.gz -> ${P}.tar.gz"
-LICENSE="MIT"
+LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
+IUSE="test"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+RESTRICT="!test? ( test )"
BDEPEND="
${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ dev-python/lxml[${PYTHON_USEDEP}]
+ ')
virtual/pkgconfig
+ test? (
+ $(python_gen_cond_dep '
+ dev-python/flake8[${PYTHON_USEDEP}]
+ ')
+ dev-libs/appstream
+ )
"
RDEPEND="
${PYTHON_DEPS}
dev-libs/gobject-introspection
- >=dev-libs/libratbag-0.13
+ >=dev-libs/libratbag-0.14
gnome-base/librsvg[introspection]
x11-libs/gdk-pixbuf[introspection]
x11-libs/gtk+:3[introspection]
@@ -40,12 +51,15 @@ DEPEND="
virtual/libudev
"
-PATCHES=(
- "${FILESDIR}"/${P}-disable-flake8-linting.patch
-)
+PATCHES=( "${FILESDIR}/${P}-fix-tests.patch" )
src_configure() {
python_setup
+
+ local emesonargs=(
+ $(meson_use test tests)
+ )
+
meson_src_configure
}