diff --git a/srcpkgs/iio-sensor-proxy/patches/fr_FR_locale-test.patch b/srcpkgs/iio-sensor-proxy/patches/fr_FR_locale-test.patch deleted file mode 100644 index 8c6c3d19bf7..00000000000 --- a/srcpkgs/iio-sensor-proxy/patches/fr_FR_locale-test.patch +++ /dev/null @@ -1,101 +0,0 @@ -From fe56bdba1243cc5f6a652eb75d11ae1d1957ff7e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Guido=20G=C3=BCnther?= -Date: Mon, 4 Mar 2024 08:18:54 +0100 -Subject: [PATCH] tests: Skip some test when fr_FR locale isn't available - -Some test require that locale so skip those when it is unavailable. - -Closes: #392 ---- - src/test-mount-matrix.c | 8 ++++++-- - tests/integration-test.py | 20 +++++++++++++++----- - 2 files changed, 21 insertions(+), 7 deletions(-) - -diff --git a/src/test-mount-matrix.c b/src/test-mount-matrix.c -index 0cf6c34..d0b608c 100644 ---- a/src/test-mount-matrix.c -+++ b/src/test-mount-matrix.c -@@ -66,12 +66,16 @@ test_mount_matrix (void) - static void - test_comma_decimal_separator (void) - { -+ const char *fr_locale = "fr_FR.UTF-8"; - char *old_locale; - AccelVec3 *vecs; - -- old_locale = setlocale (LC_ALL, "fr_FR.UTF-8"); -+ old_locale = setlocale (LC_ALL, fr_locale); - /* French locale not available? */ -- g_assert_nonnull (old_locale); -+ if (!old_locale) { -+ g_test_skip_printf ("Local %s not available", fr_locale); -+ return; -+ } - - /* Default matrix */ - g_assert_true (parse_mount_matrix (DEFAULT_MATRIX, &vecs)); -diff --git a/tests/integration-test.py b/tests/integration-test.py -index 20c0e92..4ccabb3 100755 ---- a/tests/integration-test.py -+++ b/tests/integration-test.py -@@ -27,6 +27,7 @@ import tempfile - import psutil - import subprocess - import unittest -+import locale - import time - - try: -@@ -50,6 +51,7 @@ SP_COMPASS = 'net.hadess.SensorProxy.Compass' - SP_COMPASS_PATH = '/net/hadess/SensorProxy/Compass' - - class Tests(dbusmock.DBusTestCase): -+ - @classmethod - def setUpClass(cls): - # run from local build tree if we are in one, otherwise use system instance -@@ -92,6 +94,15 @@ class Tests(dbusmock.DBusTestCase): - cls.dbus = Gio.bus_get_sync(Gio.BusType.SYSTEM, None) - cls.dbus_con = cls.get_dbus(True) - -+ # Some test outputs require the daemon to run under the fr locale: -+ # so check if that's available -+ try: -+ old_loc = locale.setlocale(locale.LC_ALL, 'fr_FR.UTF-8') -+ cls.has_fr = True -+ locale.setlocale(locale.LC_ALL, old_loc) -+ except: -+ cls.has_fr = False -+ - @classmethod - def tearDownClass(cls): - cls.test_bus.down() -@@ -612,10 +623,9 @@ class Tests(dbusmock.DBusTestCase): - mock_file.write(data) - self.proxy.ClaimAccelerometer() - self.assertEventually(lambda: self.have_text_in_log('Accel sent by driver')) -- # If the 2nd test fails, it's likely that fr_FR.UTF-8 locale isn't supported - self.assertEqual(self.have_text_in_log('scale: 0,000000,0,000000,0,000000'), False) -- self.assertEqual(self.have_text_in_log('scale: 0,000010,0,000010,0,000010'), True) -- -+ if self.has_fr: -+ self.assertEqual(self.have_text_in_log('scale: 0,000010,0,000010,0,000010'), True) - self.stop_daemon() - - def test_iio_scale_decimal_separator_offset(self): -@@ -715,9 +725,9 @@ class Tests(dbusmock.DBusTestCase): - - self.proxy.ClaimAccelerometer() - self.assertEventually(lambda: self.have_text_in_log('Accel read from IIO on')) -- # If the 2nd test fails, it's likely that fr_FR.UTF-8 locale isn't supported - self.assertEqual(self.have_text_in_log('scale 1,000000,1,000000,1,000000'), False) -- self.assertEqual(self.have_text_in_log('scale 0,000001,0,000001,0,000001'), True) -+ if self.has_fr: -+ self.assertEqual(self.have_text_in_log('scale 0,000001,0,000001,0,000001'), True) - - self.assertEventually(lambda: self.get_dbus_property('AccelerometerOrientation') == 'normal') - --- -GitLab - - diff --git a/srcpkgs/iio-sensor-proxy/template b/srcpkgs/iio-sensor-proxy/template index e04fa56eb74..59584f38e7e 100644 --- a/srcpkgs/iio-sensor-proxy/template +++ b/srcpkgs/iio-sensor-proxy/template @@ -1,6 +1,6 @@ # Template file for 'iio-sensor-proxy' pkgname=iio-sensor-proxy -version=3.5 +version=3.7 revision=1 build_style=meson configure_args="-Dsystemdsystemunitdir=/usr/lib/systemd/system/ @@ -14,16 +14,12 @@ license="GPL-3.0-or-later" homepage="https://gitlab.freedesktop.org/hadess/iio-sensor-proxy" changelog="https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/raw/master/NEWS" distfiles="https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/archive/${version}/${pkgname}-${version}.tar.gz" -checksum=8689425f2287626a95d95b1e1e5b62e497d09dd08cf411084ed22166d4a49da5 +checksum=4d7eb0ae23506919a9a40bc1aab0e144c218be60457b3137533724814c41997b if [ "$XBPS_CHECK_PKGS" ]; then -configure_args+=" -Dtests=true -Dgtk-tests=true" + configure_args+=" -Dtests=true -Dgtk-tests=true" fi -post_patch() { - vsed -i -e 's/cls.has_fr = True/cls.has_fr = False/' tests/integration-test.py -} - post_install() { vsv iio-sensor-proxy }