rpms/pigment/devel pigment-0.3.6-unit-test-rounding-fix.patch, NONE, 1.1 .cvsignore, 1.6, 1.7 pigment.spec, 1.7, 1.8 sources, 1.6, 1.7
Matthias Saou (thias)
fedora-extras-commits at redhat.com
Mon Jul 14 14:59:27 UTC 2008
Author: thias
Update of /cvs/extras/rpms/pigment/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31174
Modified Files:
.cvsignore pigment.spec sources
Added Files:
pigment-0.3.6-unit-test-rounding-fix.patch
Log Message:
Update to 0.3.6 (with fixes, fully tested).
pigment-0.3.6-unit-test-rounding-fix.patch:
--- NEW FILE pigment-0.3.6-unit-test-rounding-fix.patch ---
Index: tests/check/pgm/pgmimage.c
===================================================================
--- tests/check/pgm/pgmimage.c (revision 1214)
+++ tests/check/pgm/pgmimage.c (working copy)
@@ -33,7 +33,6 @@
#define TEST_IMAGE_SMALL_FILE "./test-small-image.png"
#define UNEXISTING_FILE "/blah/foo/bar/notexistingfilethatdoesnotexist.png"
-
static void
write_image (const gchar *file_name, guint side_size)
{
@@ -49,7 +48,8 @@
}
pixbuf = gdk_pixbuf_new_from_data (data, GDK_COLORSPACE_RGB, FALSE,
- 8, side_size, side_size, rowstride, NULL, NULL);
+ 8, side_size, side_size, rowstride, NULL,
+ NULL);
gdk_pixbuf_save (pixbuf, file_name, "png", NULL, NULL);
g_object_unref (pixbuf);
@@ -105,7 +105,6 @@
}
PGM_END_TEST;
-
/* test default values */
PGM_START_TEST (test_image_default_values)
{
@@ -148,7 +147,6 @@
}
PGM_END_TEST;
-
/* test set/get correctness */
PGM_START_TEST (test_image_set_get_correctness)
{
@@ -309,7 +307,7 @@
pgm_init (NULL, NULL);
- pgm_thread = g_thread_create ( thread_init, NULL, TRUE, NULL);
+ pgm_thread = g_thread_create (thread_init, NULL, TRUE, NULL);
fail_unless (NULL != pgm_thread, "thread creation");
g_usleep (500000);
@@ -317,8 +315,8 @@
image = pgm_image_new ();
fail_unless (NULL != image, "image creation");
- ASSERT_PGM_SUCCESS (pgm_image_set_from_file ( PGM_IMAGE (image),
- TEST_IMAGE_FILE, 0));
+ ASSERT_PGM_SUCCESS (pgm_image_set_from_file (PGM_IMAGE (image),
+ TEST_IMAGE_FILE, 0));
gst_object_unref (image);
pgm_main_quit ();
@@ -368,20 +366,21 @@
}
PGM_END_TEST
-#define IMAGE_FROM_DRAWABLE_TEST(x_drawable, y_drawable, x_image, y_image) \
- do { \
- ASSERT_PGM_SUCCESS (pgm_image_from_drawable (image, &x, &y, \
- x_drawable, y_drawable)); \
- fail_unless_equals_int (x, x_image); \
- fail_unless_equals_int (y, y_image); \
- }while(0)
+/* Fight against rounding issues using a threshold comparison of 1 */
+#define IMAGE_FROM_DRAWABLE_TEST(x_drb,y_drb,x_img,y_img) \
+ G_STMT_START { \
+ ASSERT_PGM_SUCCESS (pgm_image_from_drawable (image, &x, &y, \
+ x_drb, y_drb)); \
+ fail_unless (abs (x-x_img) <= 1); \
+ fail_unless (abs (y-y_img) <= 1); \
+ } G_STMT_END
#define IMAGE_FROM_DRAWABLE_3_TESTS(x1,y1,x2,y2,x3,y3) \
- do { \
- IMAGE_FROM_DRAWABLE_TEST (0.0f, 0.0f, x1, y1); \
- IMAGE_FROM_DRAWABLE_TEST (2.0f, 1.0f, x2, y2); \
- IMAGE_FROM_DRAWABLE_TEST (-1.0f, -1.0f, x3, y3); \
- }while(0)
+ G_STMT_START { \
+ IMAGE_FROM_DRAWABLE_TEST (0.0f, 0.0f, x1, y1); \
+ IMAGE_FROM_DRAWABLE_TEST (2.0f, 1.0f, x2, y2); \
+ IMAGE_FROM_DRAWABLE_TEST (-1.0f, -1.0f, x3, y3); \
+ } G_STMT_END
PGM_START_TEST (test_image_from_drawable)
{
@@ -469,9 +468,7 @@
ASSERT_PGM_SUCCESS (pgm_image_set_layout (image, PGM_IMAGE_SCALED));
ASSERT_PGM_SUCCESS (pgm_image_set_alignment (image, PGM_IMAGE_RIGHT));
- /* that 3rd param should be 1024 and not 1023, but there's some rounding error
- * happening, not sure this can be fixed without using doubles */
- IMAGE_FROM_DRAWABLE_3_TESTS (-341, 0, 1023, 1024, -1024, -1024);
+ IMAGE_FROM_DRAWABLE_3_TESTS (-341, 0, 1024, 1024, -1024, -1024);
ASSERT_PGM_SUCCESS (pgm_image_set_aspect_ratio (image, old_n, old_d));
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/pigment/devel/.cvsignore,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- .cvsignore 4 Mar 2008 15:10:34 -0000 1.6
+++ .cvsignore 14 Jul 2008 14:58:46 -0000 1.7
@@ -1 +1 @@
-pigment-0.3.5.tar.gz
+pigment-0.3.6.tar.bz2
Index: pigment.spec
===================================================================
RCS file: /cvs/extras/rpms/pigment/devel/pigment.spec,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- pigment.spec 4 Mar 2008 15:10:34 -0000 1.7
+++ pigment.spec 14 Jul 2008 14:58:46 -0000 1.8
@@ -1,11 +1,12 @@
Summary: Media Center Toolkit
Name: pigment
-Version: 0.3.5
-Release: 1%{?dist}
+Version: 0.3.6
+Release: 4%{?dist}
License: LGPLv2+
Group: Applications/Multimedia
URL: http://elisa.fluendo.com/
-Source: http://elisa.fluendo.com/static/download/pigment/pigment-%{version}.tar.gz
+Source: http://elisa.fluendo.com/static/download/pigment/pigment-%{version}.tar.bz2
+Patch0: pigment-0.3.6-unit-test-rounding-fix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: glib2-devel
BuildRequires: gtk2-devel
@@ -16,6 +17,8 @@
BuildRequires: mesa-libGLU-devel
Buildrequires: check
BuildRequires: gtk-doc
+# Temporarily required for autoreconf
+BuildRequires: autoconf, automake, libtool
%description
Pigment is a toolkit for writing Media Center software.
@@ -42,6 +45,9 @@
%prep
%setup -q
+%patch0 -p0
+# Required to get 0.3.6 working. Some lib64 problems.
+autoreconf
%build
@@ -91,6 +97,14 @@
%changelog
+* Mon Jul 14 2008 Matthias Saou <http://freshrpms.net/> 0.3.6-4
+- Include upstream patch to fix "make check".
+- Run "autoreconf", nothing works when libdir is set to /usr/lib64 otherwise.
+
+* Fri Jul 11 2008 Matthias Saou <http://freshrpms.net/> 0.3.6-1
+- Update to 0.3.6.
+- Temporarily disable "make check", as it's broken in this release.
+
* Tue Mar 4 2008 Matthias Saou <http://freshrpms.net/> 0.3.5-1
- Update to 0.3.5.
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/pigment/devel/sources,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- sources 4 Mar 2008 15:10:34 -0000 1.6
+++ sources 14 Jul 2008 14:58:46 -0000 1.7
@@ -1 +1 @@
-d63d4e59741af7aa6b5cf8e032643342 pigment-0.3.5.tar.gz
+fc74b1ca4c9f3f1b9fe4f1f8cd2b43c9 pigment-0.3.6.tar.bz2
More information about the fedora-extras-commits
mailing list