[arch-commits] Commit in gnucash/trunk (PKGBUILD gnucash-2.2.9-goffice.patch)
Daniel Griffiths
dgriffiths at archlinux.org
Wed Mar 17 03:41:32 UTC 2010
Date: Tuesday, March 16, 2010 @ 23:41:32
Author: dgriffiths
Revision: 72486
FS#18546
Added:
gnucash/trunk/gnucash-2.2.9-goffice.patch
Modified:
gnucash/trunk/PKGBUILD
-----------------------------+
PKGBUILD | 33 ++++----
gnucash-2.2.9-goffice.patch | 166 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 183 insertions(+), 16 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2010-03-16 20:44:49 UTC (rev 72485)
+++ PKGBUILD 2010-03-17 03:41:32 UTC (rev 72486)
@@ -4,7 +4,7 @@
pkgname=gnucash
pkgver=2.2.9
-pkgrel=5
+pkgrel=6
pkgdesc="A personal and small-business financial-accounting application"
arch=('i686' 'x86_64')
url="http://www.gnucash.org"
@@ -18,22 +18,23 @@
options=('!libtool' '!makeflags')
install=gnucash.install
source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz \
- 03_goffice_0-8_support.patch 03_disable_graphing_support.patch)
-md5sums=('570eee09a1ae83c9953ec60a7fc146ed' '57aaf609bb6fe4ed863bfddd03da505a'\
- '87943fbebbcf88488369bf1d3651083f')
-sha1sums=('8f63c67fcceaae93ceb8827143cc6a470e3a096a' '71e16460ac5f8b277d0217244084bc0099529882'\
- '8eb33bc06498cec34a0b4e86806d417210ca032a')
+ ${pkgname}-${pkgver}-goffice.patch)
+md5sums=('570eee09a1ae83c9953ec60a7fc146ed' 'cec6aab50fb139a12f9a0cf9d31e16b0')
+sha1sums=('8f63c67fcceaae93ceb8827143cc6a470e3a096a' '823d5b8ceaeda25793620d0ef3e676316924f7b1')
build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- patch -p1 < ../03_goffice_0-8_support.patch || return 1
- patch -p1 < ../03_disable_graphing_support.patch || return 1
- ./configure --prefix=/usr --mandir=/usr/share/man \
- --sysconfdir=/etc --libexecdir=/usr/lib --enable-ofx || return 1
- make || return 1
- make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install || return 1
+ cd ${srcdir}/${pkgname}-${pkgver}
+ patch -p0 < ${srcdir}/${pkgname}-${pkgver}-goffice.patch || return 1
+ ./configure --prefix=/usr --mandir=/usr/share/man \
+ --sysconfdir=/etc --libexecdir=/usr/lib --enable-ofx || return 1
+ make || return 1
+}
- install -d -m755 "${pkgdir}/usr/share/gconf/schemas"
- gconf-merge-schema "${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas" "${pkgdir}"/etc/gconf/schemas/*.schemas || return 1
- rm -f "${pkgdir}"/etc/gconf/schemas/*.schemas
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR=${pkgdir} install || return 1
+
+ install -dm755 ${pkgdir}/usr/share/gconf/schemas
+ gconf-merge-schema ${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas ${pkgdir}/etc/gconf/schemas/*.schemas || return 1
+ rm -f ${pkgdir}/etc/gconf/schemas/*.schemas
}
Added: gnucash-2.2.9-goffice.patch
===================================================================
--- gnucash-2.2.9-goffice.patch (rev 0)
+++ gnucash-2.2.9-goffice.patch 2010-03-17 03:41:32 UTC (rev 72486)
@@ -0,0 +1,166 @@
+--- src/gnome-utils/gnc-html-graph-gog.c
++++ src/gnome-utils/gnc-html-graph-gog.c
+@@ -46,7 +46,25 @@
+ #ifndef GTKHTML_USES_GTKPRINT
+ # include <goffice/graph/gog-renderer-gnome-print.h>
+ #endif
+-#include <goffice/graph/gog-style.h>
++/* everything inside the following #ifndef can be safely removed when gnucash
++requires libgoffice >= 0.7.5, the contents of the #else block must stay. */
++#ifndef GOG_TYPE_GRAPH
++# define GOG_TYPE_GRAPH GOG_GRAPH_TYPE
++# define GO_TYPE_PLUGIN_LOADER_MODULE GO_PLUGIN_LOADER_MODULE_TYPE
++# define GOG_TYPE_RENDERER GOG_RENDERER_TYPE
++# include <goffice/graph/gog-style.h>
++# define GOStyle GogStyle
++# define go_styled_object_get_style gog_styled_object_get_style
++# define GO_STYLED_OBJECT GOG_STYLED_OBJECT
++# define GO_STYLE_FILL_PATTERN GOG_FILL_STYLE_PATTERN
++# define go_style_set_text_angle gog_style_set_text_angle
++#else
++# include <goffice/utils/go-style.h>
++# include <goffice/utils/go-styled-object.h>
++#endif
++#ifndef GO_COLOR_FROM_GDK
++# define GO_COLOR_FROM_GDK GDK_TO_UINT
++#endif
+ #include <goffice/graph/gog-styled-object.h>
+ #include <goffice/graph/gog-plot.h>
+ #include <goffice/graph/gog-series.h>
+@@ -98,7 +116,7 @@
+ libgoffice_init();
+
+ /* Initialize plugins manager */
+- go_plugins_init (NULL, NULL, NULL, NULL, TRUE, GO_PLUGIN_LOADER_MODULE_TYPE);
++ go_plugins_init (NULL, NULL, NULL, NULL, TRUE, GO_TYPE_PLUGIN_LOADER_MODULE);
+
+ gnc_html_register_object_handler( "gnc-guppi-pie", handle_piechart );
+ gnc_html_register_object_handler( "gnc-guppi-bar", handle_barchart );
+@@ -189,7 +207,7 @@
+ gog_object_update (GOG_OBJECT (graph));
+
+ #if defined(HAVE_GOFFICE_0_5)
+- renderer = GOG_RENDERER (g_object_new (GOG_RENDERER_TYPE,
++ renderer = GOG_RENDERER (g_object_new (GOG_TYPE_RENDERER,
+ "model", graph,
+ NULL));
+ update_status = gog_renderer_update (renderer, eb->width, eb->height);
+@@ -229,7 +247,7 @@
+ GogObject **out_chart,
+ GogPlot **out_plot)
+ {
+- *out_graph = g_object_new(GOG_GRAPH_TYPE, NULL);
++ *out_graph = g_object_new(GOG_TYPE_GRAPH, NULL);
+ *out_chart = gog_object_add_by_name(*out_graph, "Chart", NULL);
+ *out_plot = gog_plot_new_by_name(plot_type_name);
+ if (!*out_plot)
+@@ -363,8 +381,13 @@
+ }
+ gog_object_add_by_name(chart, "Legend", NULL);
+
+- GOG_STYLED_OBJECT(graph)->style->outline.width = 5;
+- GOG_STYLED_OBJECT(graph)->style->outline.color = RGBA_BLACK;
++#ifdef GO_COLOR_BLACK
++ GOG_STYLED_OBJECT(graph)->style->line.width = 5;
++ GOG_STYLED_OBJECT(graph)->style->line.color = GO_COLOR_BLACK;
++#else
++ GO_STYLED_OBJECT(graph)->style->outline.width = 5;
++ GO_STYLED_OBJECT(graph)->style->outline.color = RGBA_BLACK;
++#endif
+
+ series = gog_plot_new_series(plot);
+ labelData = go_data_vector_str_new((char const * const *)labels, datasize, NULL);
+@@ -401,7 +424,7 @@
+ GogObject *graph, *chart;
+ GogPlot *plot;
+ GogSeries *series;
+- GogStyle *style;
++ GOStyle *style;
+ GOData *label_data, *slice_data;
+ int data_rows, data_cols;
+ double *data = NULL;
+@@ -489,11 +512,11 @@
+ gog_series_set_dim (series, 1, slice_data, NULL);
+ go_data_emit_changed (GO_DATA (slice_data));
+
+- style = gog_styled_object_get_style (GOG_STYLED_OBJECT (series));
+- style->fill.type = GOG_FILL_STYLE_PATTERN;
++ style = go_styled_object_get_style (GO_STYLED_OBJECT (series));
++ style->fill.type = GO_STYLE_FILL_PATTERN;
+ if (gdk_color_parse (col_colors[i], &color)) {
+ style->fill.auto_back = FALSE;
+- go_pattern_set_solid (&style->fill.pattern, GDK_TO_UINT (color));
++ go_pattern_set_solid (&style->fill.pattern, GO_COLOR_FROM_GDK (color));
+ } else {
+ g_warning("cannot parse color [%s]", col_colors[i]);
+ }
+@@ -503,8 +526,8 @@
+ if (rotate_row_labels) {
+ GogObject *object = gog_object_get_child_by_role (
+ chart, gog_object_find_role_by_name (chart, "X-Axis"));
+- style = gog_styled_object_get_style (GOG_STYLED_OBJECT (object));
+- gog_style_set_text_angle (style, 90.0);
++ style = go_styled_object_get_style (GO_STYLED_OBJECT (object));
++ go_style_set_text_angle (style, 90.0);
+ }
+
+ set_chart_titles_from_hash (chart, eb);
+@@ -526,7 +549,7 @@
+ GogPlot *plot;
+ GogSeries *series;
+ GOData *sliceData;
+- GogStyle *style;
++ GOStyle *style;
+ int datasize;
+ double *xData, *yData;
+ gchar *marker_str, *color_str;
+@@ -556,7 +579,7 @@
+ }
+
+ series = gog_plot_new_series( plot );
+- style = gog_styled_object_get_style(GOG_STYLED_OBJECT(series));
++ style = go_styled_object_get_style(GO_STYLED_OBJECT(series));
+
+ sliceData = go_data_vector_val_new( xData, datasize, NULL );
+ gog_series_set_dim( series, 0, sliceData, NULL );
+@@ -588,9 +611,9 @@
+ GdkColor color;
+ if (gdk_color_parse(color_str, &color)) {
+ style->marker.auto_outline_color = FALSE;
+- go_marker_set_outline_color(style->marker.mark, GDK_TO_UINT(color));
++ go_marker_set_outline_color(style->marker.mark, GO_COLOR_FROM_GDK(color));
+ style->line.auto_color = FALSE;
+- style->line.color = GDK_TO_UINT(color);
++ style->line.color = GO_COLOR_FROM_GDK(color);
+ } else {
+ g_warning("cannot parse color [%s]", color_str);
+ }
+@@ -602,15 +625,15 @@
+ go_marker_set_fill_color(style->marker.mark,
+ go_marker_get_outline_color(style->marker.mark));
+ } else {
+- GogStyle *chart_style =
+- gog_styled_object_get_style(GOG_STYLED_OBJECT(chart));
++ GOStyle *chart_style =
++ go_styled_object_get_style(GO_STYLED_OBJECT(chart));
+
+- if (chart_style->fill.type == GOG_FILL_STYLE_PATTERN
++ if (chart_style->fill.type == GO_STYLE_FILL_PATTERN
+ && chart_style->fill.pattern.pattern == GO_PATTERN_SOLID) {
+ style->marker.auto_fill_color = FALSE;
+ go_marker_set_fill_color(style->marker.mark,
+ chart_style->fill.pattern.back);
+- } else if (chart_style->fill.type == GOG_FILL_STYLE_PATTERN
++ } else if (chart_style->fill.type == GO_STYLE_FILL_PATTERN
+ && chart_style->fill.pattern.pattern
+ == GO_PATTERN_FOREGROUND_SOLID) {
+ style->marker.auto_fill_color = FALSE;
+@@ -639,7 +662,7 @@
+ {
+ GogGraph *graph = GOG_GRAPH(g_object_get_data(G_OBJECT(eb), "graph"));
+ # ifdef HAVE_GOFFICE_0_5
+- GogRenderer *rend = g_object_new(GOG_RENDERER_TYPE, "model", graph, NULL);
++ GogRenderer *rend = g_object_new(GOG_TYPE_RENDERER, "model", graph, NULL);
+ # else
+ GogRendererCairo *rend = g_object_new(GOG_RENDERER_CAIRO_TYPE, "model", graph,
+ "cairo", cr, "is-vector", TRUE, NULL);
More information about the arch-commits
mailing list