void-packages/srcpkgs/io.elementary.calendar/patches/01-fix-build-without-locale-command.patch
2022-03-25 23:42:42 +01:00

33 lines
1.4 KiB
Diff

--- a/core/Tests/meson.build
+++ b/core/Tests/meson.build
@@ -18,15 +18,20 @@ util_tests = executable(
)
test('Utils Tests', util_tests, suite: 'core', is_parallel: false)
+locale_prog = find_program('locale', required: false)
# We need these three locales to run the tests
-locales = run_command('locale', '-a').stdout().split('\n')
-if locales.contains ('en_GB.utf8') and locales.contains ('en_US.utf8') and locales.contains ('ar_AE.utf8')
- eventstore_tests = executable(
- tests_name + '-eventstore',
- 'eventstore-tests.vala',
- dependencies: tests_deps
- )
- test('EventStore Tests', eventstore_tests, suite: 'core', is_parallel: false)
+if locale_prog.found()
+ locales = run_command(locale_prog, '-a').stdout().split('\n')
+ if locales.contains ('en_GB.utf8') and locales.contains ('en_US.utf8') and locales.contains ('ar_AE.utf8')
+ eventstore_tests = executable(
+ tests_name + '-eventstore',
+ 'eventstore-tests.vala',
+ dependencies: tests_deps
+ )
+ test('EventStore Tests', eventstore_tests, suite: 'core', is_parallel: false)
+ else
+ message('EventStore Tests have been disabled, a locale is missing in the system.')
+ endif
else
-message('EventStore Tests have been disabled, a locale is missing in the system.')
+ message('EventStore Tests have been disabled, the locale command is missing in the system.')
endif