packages: libsamplerate/libsamplerate-tests.patch (NEW) - fix for x86_64 bu...

hawk hawk at pld-linux.org
Sat Aug 28 14:40:52 CEST 2010


Author: hawk                         Date: Sat Aug 28 12:40:52 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- fix for x86_64 build, taken from Gentoo which has it from upstream :)

---- Files affected:
packages/libsamplerate:
   libsamplerate-tests.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/libsamplerate/libsamplerate-tests.patch
diff -u /dev/null packages/libsamplerate/libsamplerate-tests.patch:1.1
--- /dev/null	Sat Aug 28 14:40:52 2010
+++ packages/libsamplerate/libsamplerate-tests.patch	Sat Aug 28 14:40:47 2010
@@ -0,0 +1,21 @@
+Patch from Erik (upstream) to fix tests on 64 bits platforms.
+
+Index: libsamplerate-0.1.7/tests/callback_test.c
+===================================================================
+--- libsamplerate-0.1.7.orig/tests/callback_test.c
++++ libsamplerate-0.1.7/tests/callback_test.c
+@@ -137,11 +137,11 @@ callback_test (int converter, double src
+ 
+ 	src_state = src_delete (src_state) ;
+ 
+-	if (fabs (read_total - src_ratio * ARRAY_LEN (test_callback_data.data)) > src_ratio)
++	if (fabs (read_total / src_ratio - ARRAY_LEN (test_callback_data.data)) > 2.0)
+ 	{	printf ("\n\nLine %d : input / output length mismatch.\n\n", __LINE__) ;
+ 		printf ("    input len  : %d\n", ARRAY_LEN (test_callback_data.data)) ;
+-		printf ("    output len : %ld (should be %g +/- %g)\n\n", read_total,
+-					floor (0.5 + src_ratio * ARRAY_LEN (test_callback_data.data)), ceil (src_ratio)) ;
++		printf ("    output len : %ld (should be %g +/- 2)\n\n", read_total,
++					floor (0.5 + src_ratio * ARRAY_LEN (test_callback_data.data))) ;
+ 		exit (1) ;
+ 		} ;
+ 
================================================================


More information about the pld-cvs-commit mailing list