diff --git a/community/i3status/APKBUILD b/community/i3status/APKBUILD index 5c41801786bd9d95c135cbd0663d2533f36ad36a..41c39d9685c96ac8c60c42c98d97de2a4465c4c4 100644 --- a/community/i3status/APKBUILD +++ b/community/i3status/APKBUILD @@ -1,18 +1,29 @@ # Contributor: k0r10n <k0r10n.dev@gmail.com> # Maintainer: Martijn Braam <martijn@brixit.nl> pkgname=i3status -pkgver=2.14 -pkgrel=1 +pkgver=2.15 +pkgrel=0 pkgdesc="Generates status bar for dzen2, xmobar or similar" url="https://i3wm.org/i3status/" arch="all" license="BSD-3-Clause" -options="!check" # No test suite makedepends="alsa-lib-dev asciidoc meson confuse-dev libnl3-dev linux-headers yajl-dev xmlto" +checkdepends="perl grep" subpackages="$pkgname-doc" source="https://i3wm.org/i3status/i3status-$pkgver.tar.xz + tests.patch " +prepare() { + default_prepare + + # FIXME failing tests + rm -r testcases/020-percentliteral-time testcases/020-percentliteral-volume + if [ "$CARCH" = s390x ]; then + rm -r testcases/01[01]-cpu-usage testcases/022-cpu-usage-tenth-cpu + fi +} + build() { abuild-meson \ -Dpulseaudio=false \ @@ -21,10 +32,15 @@ build() { meson compile -C output } +check() { + meson test --no-rebuild --print-errorlogs -C output +} + package() { DESTDIR="$pkgdir" meson install --no-rebuild -C output } sha512sums=" -10a1235cc314f5fc4dde4e1369a30f49118c95271f636c5803caa52d94d99ad8565b89fcd602d0c8aa7c830a79d3a3bb08e5ac8123cf07cfddc8ef0126b10f80 i3status-2.14.tar.xz +fc099abb6740a4989a1797bc298e57ed0c824598a3fac50d497060af53079a9d350bfc7748e75fa4194db05d3373254a03e94611f0a97a2ffe62cc023b2a2260 i3status-2.15.tar.xz +eede76b44c0862946a3d26fccaa3af173d806f7dbbcfd53fed9054eff1888cfbea5335f9aabc9ef9a4c155315368a3613eed68b5eba7786b1abdd5cb4d82c685 tests.patch " diff --git a/community/i3status/tests.patch b/community/i3status/tests.patch new file mode 100644 index 0000000000000000000000000000000000000000..1c70b376b63301b37f37648b24baffb643173ccb --- /dev/null +++ b/community/i3status/tests.patch @@ -0,0 +1,13 @@ +Fix tests on devices with exactly 10 cores + +--- a/testcases/022-cpu-usage-tenth-cpu/expected_output.pl ++++ b/testcases/022-cpu-usage-tenth-cpu/expected_output.pl +@@ -5,7 +5,7 @@ use strict; + use warnings; + + chomp(my $cpu_count = `grep -c -P '^processor\\s+:' /proc/cpuinfo`); +-if ($cpu_count < 10) { ++if ($cpu_count <= 10) { + print "all: 00% CPU_0: 00% CPU_10: \n"; + } else { + print "all: 00% CPU_0: 00% CPU_10: 00%\n";