#! /bin/sh /usr/share/dpatch/dpatch-run
## 01_libgdchart-gd2-noxpm-dev.dpatch by  <jfs@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.

@DPATCH@
diff -urNad openvas-client-2.0.1~/nessus/html_graph_output.c openvas-client-2.0.1/nessus/html_graph_output.c
--- openvas-client-2.0.1~/nessus/html_graph_output.c	2009-01-02 01:59:16.000000000 +0100
+++ openvas-client-2.0.1/nessus/html_graph_output.c	2009-01-02 02:12:30.000000000 +0100
@@ -69,6 +69,10 @@
 #include <includes.h>
 #include "nessus_i18n.h"
 #ifndef NO_GDCHART
+#ifndef HAVE_LIBFREETYPE
+/* prevent undefined references in gdc (http://bugs.debian.org/242936) */
+# define HAVE_LIBFREETYPE 0
+#endif
 #include <gdc.h>
 #include <gdchart.h>
 #include <gdcpie.h>
@@ -737,7 +741,7 @@
     GDCPIE_label_dist = 15;
     GDCPIE_LineColor = 0x000000L;
     GDCPIE_PlotColor =  0xC0C0C0L;
-    GDCPIE_EdgeColor = 0x000000L;
+    GDCPIE_EdgeColor = GDC_NOCOLOR; /* http://bugs.debian.org/326502 */
     GDCPIE_label_size = GDC_SMALL;
     GDCPIE_title_size = GDC_MEDBOLD;
     GDCPIE_3d_angle  = 45;
@@ -747,6 +751,7 @@
     GDC_generate_gif = TRUE;
     GDC_hold_img = GDC_DESTROY_IMAGE;
     GDC_image = NULL;
+    GDC_image_type = GDC_GIF;
     GDCPIE_missing = NULL;
     GDCPIE_percent_labels = GDCPIE_PCT_RIGHT;
 
@@ -888,9 +893,11 @@
     GDCPIE_explode   = expl;
     GDCPIE_Color = clr;
     GDCPIE_BGColor = 0xFFFFFFL;
-    GDCPIE_EdgeColor = 0x000000L;
+    GDCPIE_EdgeColor = GDC_NOCOLOR; /* http://bugs.debian.org/326502 */
     GDCPIE_missing = NULL;
     GDCPIE_percent_labels = GDCPIE_PCT_RIGHT;
+    GDCPIE_percent_fmt = " (%.0f%%)";
+    GDC_image_type = GDC_GIF;
     pie_gif(480, 360, pie, GDC_3DPIE, num_risks, lbl, risks_f);
     fclose(pie);
     insert_img(f, "pie_risks.gif");
@@ -923,6 +930,7 @@
      GDC_BGColor   = 0xFFFFFFL;                  /* backgound color (white) */
      GDC_LineColor = 0x000000L;                  /* line color      (black) */
      GDC_SetColor = &(color);
+     GDC_image_type = GDC_GIF;
      out_graph(480, 360, chart, GDC_3DBAR, num, services, 1, value);
      fclose(chart);
      insert_img(f, "chart_dangerous_services.gif");
@@ -956,6 +964,7 @@
      GDC_BGColor   = 0xFFFFFFL;                  /* backgound color (white) */
      GDC_LineColor = 0x000000L;                  /* line color      (black) */
      GDC_SetColor = color;
+     GDC_image_type = GDC_GIF;
      out_graph(480, 360, chart, GDC_3DBAR, num, services, 1, value);
      fclose(chart);
      insert_img(f, "chart_services_occurences.gif");
@@ -987,6 +996,7 @@
      GDC_BGColor   = 0xFFFFFFL;                  /* backgound color (white) */
      GDC_LineColor = 0x000000L;                  /* line color      (black) */
      GDC_SetColor = &(color);
+     GDC_image_type = GDC_GIF;
      out_graph(480, 360, chart, GDC_3DBAR, num, oses, 1, value);
      fclose(chart);
      insert_img(f, "chart_operating_systems.gif");
@@ -1039,9 +1049,11 @@
     GDCPIE_explode   = expl;
     GDCPIE_Color = clr;
     GDCPIE_BGColor = 0xFFFFFFL;
-    GDCPIE_EdgeColor = 0x000000L;
+    GDCPIE_EdgeColor = GDC_NOCOLOR; /* http://bugs.debian.org/326502 */
     GDCPIE_missing = NULL;
     GDCPIE_percent_labels = GDCPIE_PCT_RIGHT;
+    GDCPIE_percent_fmt = " (%.0f%%)";
+    GDC_image_type = GDC_GIF;
     pie_gif(480, 360, pie, GDC_3DPIE, 2,names, values);
     fclose(pie);
     insert_img(f, "pie_most.gif");
