From c7cb603f86b4d4fb6567e3faa15b916a306f7004 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 3 Apr 2012 00:01:35 +0000 Subject: Tue Apr 3 00:01:35 UTC 2012 --- .../dates/0001-Fix-FTBFS-with-newer-GCC.patch | 39 ++++++ .../dates/0001-Fix-Makefile-whitespace.patch | 20 +++ ...e-calls-to-the-deprecated-functions-e_sou.patch | 155 +++++++++++++++++++++ community-testing/dates/PKGBUILD | 40 ++++++ community-testing/dates/dates.install | 11 ++ 5 files changed, 265 insertions(+) create mode 100644 community-testing/dates/0001-Fix-FTBFS-with-newer-GCC.patch create mode 100644 community-testing/dates/0001-Fix-Makefile-whitespace.patch create mode 100644 community-testing/dates/0001-Replaced-the-calls-to-the-deprecated-functions-e_sou.patch create mode 100644 community-testing/dates/PKGBUILD create mode 100644 community-testing/dates/dates.install (limited to 'community-testing/dates') diff --git a/community-testing/dates/0001-Fix-FTBFS-with-newer-GCC.patch b/community-testing/dates/0001-Fix-FTBFS-with-newer-GCC.patch new file mode 100644 index 000000000..674ec2395 --- /dev/null +++ b/community-testing/dates/0001-Fix-FTBFS-with-newer-GCC.patch @@ -0,0 +1,39 @@ +From f3e8719489fc5db5ae87dd03d39aad176d65762f Mon Sep 17 00:00:00 2001 +From: Paul Wise +Date: Fri, 29 Apr 2011 13:10:15 +0800 +Subject: [PATCH] Fix FTBFS with newer GCC + +--- + configure.ac | 2 +- + src/Makefile.am | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 7f009d9..0181292 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -17,7 +17,7 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package]) + AC_SUBST(GETTEXT_PACKAGE) + AM_GLIB_GNU_GETTEXT + +-PKG_CHECK_MODULES(DATES, glib-2.0 gtk+-2.0 libecal-1.2 gconf-2.0) ++PKG_CHECK_MODULES(DATES, glib-2.0 gtk+-2.0 libecal-1.2 gconf-2.0 pango) + + PKG_CHECK_MODULES(GTK, gtk+-2.0) + AC_SUBST(GTK_CFLAGS) +diff --git a/src/Makefile.am b/src/Makefile.am +index 90c7049..3bb4f32 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -35,7 +35,7 @@ dates_SOURCES = $(platform) \ + gconf-bridge.h \ + gconf-bridge.c + +-dates_LDADD = $(DATES_LIBS) libgtkdatesview.la ++dates_LDADD = libgtkdatesview.la -lm $(DATES_LIBS) + + if USE_OWL + dates_LDADD += $(top_builddir)/libowl/libowl.la +-- +1.7.4.4 + diff --git a/community-testing/dates/0001-Fix-Makefile-whitespace.patch b/community-testing/dates/0001-Fix-Makefile-whitespace.patch new file mode 100644 index 000000000..9feda3915 --- /dev/null +++ b/community-testing/dates/0001-Fix-Makefile-whitespace.patch @@ -0,0 +1,20 @@ +From bc98e2896682ac831cd27142c7e76fe0f8280bee Mon Sep 17 00:00:00 2001 +From: Joshua Lock +Date: Wed, 15 Dec 2010 14:07:50 +0000 +Subject: Fix Makefile whitespace for the new improved strict make 3.82 + +Signed-off-by: Joshua Lock +--- +diff --git a/Makefile.am b/Makefile.am +index e8a3c7f..51b4f1d 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -7,5 +7,5 @@ DISTCLEANFILES = intltool-extract intltool-merge intltool-update + MAINTAINERCLEANFILES = $(DISTCLEANFILES) aclocal.m4 compile config.guess config.sub configure depcomp install-sh ltmain.sh Makefile.in missing + + snapshot: +- $(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"` ++ $(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"` + +-- +cgit v0.9.0.2 diff --git a/community-testing/dates/0001-Replaced-the-calls-to-the-deprecated-functions-e_sou.patch b/community-testing/dates/0001-Replaced-the-calls-to-the-deprecated-functions-e_sou.patch new file mode 100644 index 000000000..e7fce46f3 --- /dev/null +++ b/community-testing/dates/0001-Replaced-the-calls-to-the-deprecated-functions-e_sou.patch @@ -0,0 +1,155 @@ +From 7771e0b3d75b4ba04756d6c6ffc03d644df2db5f Mon Sep 17 00:00:00 2001 +From: Lucas Hermann Negri +Date: Wed, 13 Oct 2010 18:49:20 -0300 +Subject: [PATCH] Replaced the calls to the deprecated functions e_source_{set,get}_color + with the new API (e_source_{set,peek}_color_spec). + +--- + src/dates_gtk.c | 40 ++++++++++++---------------------------- + src/dates_main.c | 2 +- + src/dates_view.c | 10 ++++------ + 3 files changed, 17 insertions(+), 35 deletions(-) + +diff --git a/src/dates_gtk.c b/src/dates_gtk.c +index 78e71bb..403bc25 100644 +--- a/src/dates_gtk.c ++++ b/src/dates_gtk.c +@@ -1016,7 +1016,6 @@ calendar_do_new_dialog (GtkWindow *parent, DatesData *d) + GtkTreeIter iter; + GError *error = NULL; + const gchar *relative_uri; +- guint32 new_colour; + + #ifdef WITH_HILDON + GdkColor *hildon_color; +@@ -1055,7 +1054,8 @@ calendar_do_new_dialog (GtkWindow *parent, DatesData *d) + source = e_source_new (name, relative_uri); + + #ifdef USE_OWL +- new_colour = owl_colour_button_get_colour (OWL_COLOUR_BUTTON (color_button)); ++ guint32 new_colour = owl_colour_button_get_colour (OWL_COLOUR_BUTTON (color_button)); ++ e_source_set_color (source, new_colour); + #else + + #ifdef WITH_HILDON +@@ -1063,17 +1063,11 @@ calendar_do_new_dialog (GtkWindow *parent, DatesData *d) + #else + gtk_color_button_get_color (GTK_COLOR_BUTTON(color_button), &colour); + #endif +- new_colour = (guint8)(colour.red >> 8); +- new_colour <<= 8; +- new_colour |= (guint8)(colour.green >> 8); +- new_colour <<= 8; +- new_colour |= (guint8)(colour.blue >> 8); +- new_colour <<= 8; ++ gchar *n_color = gdk_color_to_string (&colour); ++ e_source_set_color_spec (source, n_color); ++ g_free(n_color); + #endif + +- /* Set the colour */ +- e_source_set_color (source, new_colour); +- + /* Set the group for the source */ + e_source_set_group (source, group); + e_source_group_add_source (group, source, 0); +@@ -1169,7 +1163,6 @@ calendar_do_edit_dialog (GtkWindow *parent, ESource *source, DatesData *d) + ESourceGroup *group; + + GdkColor colour; +- guint32 raw_colour; + + const gchar *name = NULL; + const gchar *uri = NULL; +@@ -1335,12 +1328,8 @@ calendar_do_edit_dialog (GtkWindow *parent, ESource *source, DatesData *d) + gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); + + /* Get the colour from the the source */ +- e_source_get_color (source, &raw_colour); +- +- /* Munge this into something usable */ +- colour.red = (guint16)(((raw_colour & 0xff0000) >> 16) << 8); +- colour.green = (guint16)(((raw_colour & 0xff00) >> 8) << 8); +- colour.blue = (guint16)(((raw_colour & 0xff) << 8)); ++ const gchar* spec = e_source_peek_color_spec(source); ++ gdk_color_parse(spec, &colour); + + /* Now we need to allocate the colour */ + gdk_colormap_alloc_color (gdk_colormap_get_system (), &colour, TRUE, TRUE); +@@ -1440,26 +1429,21 @@ calendar_do_edit_dialog (GtkWindow *parent, ESource *source, DatesData *d) + * Next we need to pack the GDK colour into guint32 + * for eds + */ +- guint32 new_colour = 0; + + GError *error = NULL; + #ifdef USE_OWL +- new_colour = owl_colour_button_get_colour (OWL_COLOUR_BUTTON (color_button)); ++ guint32 new_colour = owl_colour_button_get_colour (OWL_COLOUR_BUTTON (color_button)); ++ e_source_set_color (source, new_colour); + #else + #ifdef WITH_HILDON + hildon_color_button_get_color (HILDON_COLOR_BUTTON(color_button), &colour); + #else + gtk_color_button_get_color (GTK_COLOR_BUTTON(color_button), &colour); + #endif +- new_colour = (guint8)(colour.red >> 8); +- new_colour <<= 8; +- new_colour |= (guint8)(colour.green >> 8); +- new_colour <<= 8; +- new_colour |= (guint8)(colour.blue >> 8); +- new_colour <<= 8; ++ gchar *n_color = gdk_color_to_string (&colour); ++ e_source_set_color_spec (source, n_color); ++ g_free(n_color); + #endif +- /* Update the colour */ +- e_source_set_color (source, new_colour); + + /* And the name */ + e_source_set_name (source, (gtk_entry_get_text (GTK_ENTRY (name_entry)))); +diff --git a/src/dates_main.c b/src/dates_main.c +index ce05fe8..1f7770d 100644 +--- a/src/dates_main.c ++++ b/src/dates_main.c +@@ -112,7 +112,7 @@ dates_load_calendars (DatesData *d) + system_source = e_source_new (_("Personal"), "system"); + + /* Default Evolution colour */ +- e_source_set_color (system_source, 0xBECEDD); ++ e_source_set_color_spec (system_source, "#BECEDD"); + + /* Set the group for the source and put it in the group */ + e_source_set_group (system_source, local_group); +diff --git a/src/dates_view.c b/src/dates_view.c +index d65db2f..9d28a15 100644 +--- a/src/dates_view.c ++++ b/src/dates_view.c +@@ -4846,7 +4846,6 @@ dates_view_add_calendar (DatesView *view, ECal *ecal) + DatesViewPrivate *priv = DATES_VIEW_GET_PRIVATE (view); + DatesViewCalendar *cal; + ESource *source; +- guint32 colour; + /* GError *error = NULL;*/ + + g_return_if_fail (E_IS_CAL (ecal)); +@@ -4876,12 +4875,11 @@ dates_view_add_calendar (DatesView *view, ECal *ecal) + cal->text_gc = gdk_gc_new ( + GDK_DRAWABLE (priv->main->window)); + +- if (e_source_get_color (source, &colour)) { ++ const gchar* spec = e_source_peek_color_spec (source); ++ if (spec) { + GdkColor gcolour, dgcolour, tgcolour; +- gcolour.red = ((colour & 0xFF0000) >> 16) * 0x101; +- gcolour.green = ((colour & 0xFF00) >> 8) * 0x101; +- gcolour.blue = (colour & 0xFF) * 0x101; +- ++ gdk_color_parse(spec, &gcolour); ++ + /* This is simplified sRGB -> LAB conversion; we do not need it + * entirely precise, as we are only going to chose between + * black or white text based on the L value. +-- +1.7.3.1 + diff --git a/community-testing/dates/PKGBUILD b/community-testing/dates/PKGBUILD new file mode 100644 index 000000000..0c6dcf2d1 --- /dev/null +++ b/community-testing/dates/PKGBUILD @@ -0,0 +1,40 @@ +# $Id: PKGBUILD 68786 2012-04-01 22:13:21Z bgyorgy $ +# Maintainer: Balló György + +pkgname=dates +pkgver=0.4.11 +pkgrel=5 +pkgdesc="Small, lightweight GTK+ calendar app" +arch=('i686' 'x86_64') +url="http://pimlico-project.org/dates.html" +license=('GPL') +depends=('gtk2' 'evolution-data-server' 'xdg-utils') +makedepends=('intltool') +options=('!emptydirs') +install=$pkgname.install +source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.bz2 + 0001-Replaced-the-calls-to-the-deprecated-functions-e_sou.patch + 0001-Fix-Makefile-whitespace.patch + 0001-Fix-FTBFS-with-newer-GCC.patch) +sha256sums=('60b0cfe1fa6dee684e255c2a0cd02febafb9d16607ba4b05196e983cd8012c03' + '88ab8de4861253be1a8db1be4432f71307fcffa376be95e9495cff021b7ead62' + 'fc20f51200a78c74881b98f2b2ea9c3ba01f09393fcc2cf38ecab78ee54f4bb4' + '0e32c4d9ac4c604330bf8672e47e44c710ae56d9f6dc496e736166c536a4787e') + +build() { + cd "$srcdir/$pkgname-$pkgver" + patch -Np1 -i "$srcdir/0001-Replaced-the-calls-to-the-deprecated-functions-e_sou.patch" + patch -Np1 -i "$srcdir/0001-Fix-Makefile-whitespace.patch" + patch -Np1 -i "$srcdir/0001-Fix-FTBFS-with-newer-GCC.patch" + + autoreconf -fi + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + --disable-static --enable-owl + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + + make DESTDIR="$pkgdir/" install +} diff --git a/community-testing/dates/dates.install b/community-testing/dates/dates.install new file mode 100644 index 000000000..2c455e952 --- /dev/null +++ b/community-testing/dates/dates.install @@ -0,0 +1,11 @@ +post_install() { + xdg-icon-resource forceupdate +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + post_install $1 +} -- cgit v1.2.3-54-g00ecf