diff --git a/gkrellm-sun.spec b/gkrellm-sun.spec index ba6e8dc..699b542 100644 --- a/gkrellm-sun.spec +++ b/gkrellm-sun.spec @@ -3,11 +3,12 @@ Summary: Sun clock plugin for GKrellM Name: gkrellm-sun Version: 1.0.0 -Release: 8 +Release: 9%{?dist} License: GPLv2 Group: Applications/System URL: http://gkrellsun.sourceforge.net/ Source: http://downloads.sf.net/gkrellsun/gkrellsun-%{version}.tar.gz +Patch0: gkrellsun-1.0.0-fixes.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Requires: gkrellm >= 2.2.0 BuildRequires: gkrellm-devel >= 2.2.0 @@ -19,6 +20,7 @@ time, path and current location and so on. %prep %setup -q -n gkrellsun-%{version} +%patch0 -p1 %build @@ -42,6 +44,9 @@ time, path and current location and so on. %changelog +* Tue May 4 2010 Matthias Saou 1.0.0-9 +- Include patch with upstream fixes (hopefully fixes #568893). + * Fri Jul 24 2009 Fedora Release Engineering - 1.0.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild diff --git a/gkrellsun-1.0.0-fixes.patch b/gkrellsun-1.0.0-fixes.patch new file mode 100644 index 0000000..bc10110 --- /dev/null +++ b/gkrellsun-1.0.0-fixes.patch @@ -0,0 +1,111 @@ +diff -Naupr --exclude=CVS gkrellsun-1.0.0/src20/gkrellsun.c tmp/gkrellsun/src20/gkrellsun.c +--- gkrellsun-1.0.0/src20/gkrellsun.c 2006-03-17 14:29:51.000000000 +0100 ++++ tmp/gkrellsun/src20/gkrellsun.c 2006-04-07 18:32:43.000000000 +0200 +@@ -3,7 +3,7 @@ + * Copyright (C) 2001, 2002, 2003 Norman Walsh. Derived from gkrellmoon by + * Dale P. Smith and wmSun by Mike Henderson + * +- * $Id: gkrellsun-1.0.0-fixes.patch,v 1.1 2010/05/04 20:13:37 thias Exp $ ++ * $Id: gkrellsun-1.0.0-fixes.patch,v 1.1 2010/05/04 20:13:37 thias Exp $ + * + */ + #if !defined(WIN32) +@@ -746,7 +746,7 @@ static void drawTextTime(double tod, int + }; + + static void +-sun_update_plugin() ++sun_update_plugin( void ) + { + int image_x_offset, image_y_offset; + int pos_x, pos_y; +@@ -1106,7 +1106,7 @@ static void panel_button_event(/*@unused + } + } + +-static void load_images() ++static void load_images( void ) + { + GkrellmPiximage *image = NULL; + +@@ -1134,7 +1134,7 @@ static void load_images() + /* Since init is only called upon gkrellm startup, set stuff to NULL here in case user enables plugin */ + /* If plubin disabled or when gkrellm2 quits */ + static void +-cb_plugin_disabled() ++cb_plugin_disabled( void ) + { + gint i, j; + +@@ -1362,12 +1362,12 @@ static void sun_create_plugin(GtkWidget + + if (first_create) + { +- (void)gtk_signal_connect(GTK_OBJECT(panel->drawing_area), +- "expose_event", (GtkSignalFunc) panel_expose_event, ++ (void)g_signal_connect(GTK_OBJECT(panel->drawing_area), ++ "expose_event", G_CALLBACK( panel_expose_event ), + NULL); + +- (void)gtk_signal_connect(GTK_OBJECT(panel->drawing_area), +- "button_press_event", (GtkSignalFunc) panel_button_event, ++ (void)g_signal_connect(GTK_OBJECT(panel->drawing_area), ++ "button_press_event", G_CALLBACK( panel_button_event ), + NULL); + + tooltip=gtk_tooltips_new(); +@@ -1672,7 +1672,7 @@ sun_create_tab(GtkWidget *tab_vbox) + plugin_about_text = g_strdup_printf( + _("SunClock %d.%d.%d\n" \ + "GKrellM2 SunClock Plugin\n" \ +- "$Id: gkrellsun-1.0.0-fixes.patch,v 1.1 2010/05/04 20:13:37 thias Exp $\n\n" \ ++ "$Id: gkrellsun-1.0.0-fixes.patch,v 1.1 2010/05/04 20:13:37 thias Exp $\n\n" \ + "Copyright (C) 2001, 2002, 2003, 2004, 2006 Norman Walsh\n" \ + "ndw@nwalsh.com\n\n" \ + "v0.10.0+ Additional code by Kurt V. Hindenburg\n" \ +@@ -1694,7 +1694,7 @@ sun_create_tab(GtkWidget *tab_vbox) + } + + static void +-sun_apply_config() ++sun_apply_config( void ) + { + gint sun, time, whichSun; + +@@ -1823,7 +1823,7 @@ __declspec(dllexport) GkrellmMonitor * + gkrellm_init_plugin(win32_plugin_callbacks* calls) + #else + GkrellmMonitor * +-gkrellm_init_plugin() ++gkrellm_init_plugin( void ) + #endif + { + gint sun, time; +diff -Naupr --exclude=CVS gkrellsun-1.0.0/src20/Moon.c tmp/gkrellsun/src20/Moon.c +--- gkrellsun-1.0.0/src20/Moon.c 2004-03-06 07:35:41.000000000 +0100 ++++ tmp/gkrellsun/src20/Moon.c 2006-04-07 19:01:06.000000000 +0200 +@@ -363,8 +363,7 @@ gdouble * AGE) + + gdouble NewMoon(gdouble ax, gdouble bx, gdouble cx) + { +- +- gdouble f1, f2, x0, x1, x2, x3, Moon(); ++ gdouble f1, f2, x0, x1, x2, x3; + gdouble L, B, Rad, AGE, tol = 1e-7; + + x0 = ax; +diff -Naupr --exclude=CVS gkrellsun-1.0.0/src20/MoonRise.c tmp/gkrellsun/src20/MoonRise.c +--- gkrellsun-1.0.0/src20/MoonRise.c 2006-03-16 19:47:37.000000000 +0100 ++++ tmp/gkrellsun/src20/MoonRise.c 2006-04-07 19:01:06.000000000 +0200 +@@ -63,10 +63,8 @@ Interp(gdouble ym, gdouble y0, gdouble y + + static gdouble SinH(CTrans * c, gdouble UT) + { +- + gdouble TU, TU2, TU3, LambdaMoon, BetaMoon, R, AGE; +- gdouble RA_Moon, DEC_Moon, gmst, lmst, Tau, epsilon, Moon(); +- gdouble angle2pi(); ++ gdouble RA_Moon, DEC_Moon, gmst, lmst, Tau, epsilon; + + TU = (jd(c->year, c->month, c->day, UT) - 2451545.0) / 36525.0; +