diff options
| author | Eric Bavier <bavier@member.fsf.org> | 2014-07-10 17:03:42 -0500 |
|---|---|---|
| committer | Eric Bavier <bavier@member.fsf.org> | 2014-07-10 17:03:42 -0500 |
| commit | ca9ea1a849d685db46adcb92449dff36427c48bd (patch) | |
| tree | 5026815a036be59c557069c766e3130538227b22 /gnu/packages | |
| parent | 8360758d5c3e8afdc5daa0b5f557360bd6116562 (diff) | |
gnu: glib: Fix build on i686.
* gnu/packages/patches/glib-tests-timer.patch: New patch.
* gnu-system.am (dist_patch_DATA): Add it.
* gnu/packages/glib.scm: Use it.
Diffstat (limited to 'gnu/packages')
| -rw-r--r-- | gnu/packages/glib.scm | 3 | ||||
| -rw-r--r-- | gnu/packages/patches/glib-tests-timer.patch | 26 |
2 files changed, 28 insertions, 1 deletions
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index c3b0b39f10a..239715ecc76 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm | |||
| @@ -116,7 +116,8 @@ shared NFS home directories.") | |||
| 116 | (base32 "1d98mbqjmc34s8095lkw1j1bwvnnkw9581yfvjaikjvfjsaz29qd")) | 116 | (base32 "1d98mbqjmc34s8095lkw1j1bwvnnkw9581yfvjaikjvfjsaz29qd")) |
| 117 | (patches (list (search-patch "glib-tests-homedir.patch") | 117 | (patches (list (search-patch "glib-tests-homedir.patch") |
| 118 | (search-patch "glib-tests-desktop.patch") | 118 | (search-patch "glib-tests-desktop.patch") |
| 119 | (search-patch "glib-tests-prlimit.patch"))))) | 119 | (search-patch "glib-tests-prlimit.patch") |
| 120 | (search-patch "glib-tests-timer.patch"))))) | ||
| 120 | (build-system gnu-build-system) | 121 | (build-system gnu-build-system) |
| 121 | (outputs '("out" ; everything | 122 | (outputs '("out" ; everything |
| 122 | "bin" ; glib-mkenums, gtester, etc.; depends on Python | 123 | "bin" ; glib-mkenums, gtester, etc.; depends on Python |
diff --git a/gnu/packages/patches/glib-tests-timer.patch b/gnu/packages/patches/glib-tests-timer.patch new file mode 100644 index 00000000000..1ac364fcc10 --- /dev/null +++ b/gnu/packages/patches/glib-tests-timer.patch | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | * On i686 floating-point roundoff errors could sometimes cause this check to | ||
| 2 | fail depending on the elapsed microseconds. Improve rounding by adding a | ||
| 3 | fractional bit. | ||
| 4 | |||
| 5 | * The /timer/stop test fails if compiler optimizations are enabled, which they | ||
| 6 | are by default. Disable that test. | ||
| 7 | |||
| 8 | --- glib-2.40.0/glib/tests/timer.c 2014-03-05 08:05:42.000000000 -0600 | ||
| 9 | +++ glib-2.40.0/glib/tests/timer.c 2014-07-10 16:33:12.746862822 -0500 | ||
| 10 | @@ -35,7 +35,7 @@ | ||
| 11 | elapsed = g_timer_elapsed (timer, µs); | ||
| 12 | |||
| 13 | g_assert_cmpfloat (elapsed, <, 1.0); | ||
| 14 | - g_assert_cmpuint (micros, ==, ((guint64)(elapsed * 1e6)) % 1000000); | ||
| 15 | + g_assert_cmpuint (micros, ==, ((guint64)(elapsed * 1e6 + 0.5)) % 1000000); | ||
| 16 | |||
| 17 | g_timer_destroy (timer); | ||
| 18 | } | ||
| 19 | @@ -204,7 +204,6 @@ | ||
| 20 | g_test_init (&argc, &argv, NULL); | ||
| 21 | |||
| 22 | g_test_add_func ("/timer/basic", test_timer_basic); | ||
| 23 | - g_test_add_func ("/timer/stop", test_timer_stop); | ||
| 24 | g_test_add_func ("/timer/continue", test_timer_continue); | ||
| 25 | g_test_add_func ("/timer/reset", test_timer_reset); | ||
| 26 | g_test_add_func ("/timeval/add", test_timeval_add); | ||
