• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

作図ソフト dia の改良版


Commit MetaInfo

Revisionad54cac7c3f62edc5a8f003aa7a48fd998cda39e (tree)
Time2014-07-06 21:57:22
AuthorGokturk Yuksek <gokturk@bing...>
CommiterHans Breuer

Log Message

cairo: do not compile cairo plugin if '--without-cairo' is defined.

Passing '--without-cairo' option to the build system disables
the inclusion of cairo header files but does not prevent the
code from building. As a result the compilation fails with
'implicit declaration of function' errors.

To fix this, modify the Makefile.am so that it does not compile
the plugin if '--without-cairo' is defined. Note that this
option must be passed by the user explicitly as the build system
will always detect libcairo on the system since GTK depends on it.

See: https://bugzilla.gnome.org/show_bug.cgi?id=729668
See: https://bugs.gentoo.org/show_bug.cgi?id=509636

Signed-off-by: Gokturk Yuksek <gokturk@binghamton.edu>
(cherry picked from commit ceb7265b65ed969698c358a850f8ff3ad42cc9d5)

Conflicts:
plug-ins/cairo/diacairo-renderer.c
plug-ins/cairo/diacairo.c

Change Summary

Incremental Difference

--- a/plug-ins/cairo/Makefile.am
+++ b/plug-ins/cairo/Makefile.am
@@ -1,4 +1,4 @@
1-
1+if WITH_CAIRO
22 plugin_sources = \
33 diacairo.c \
44 diacairo.h \
@@ -6,6 +6,9 @@ plugin_sources = \
66 diacairo-renderer.c \
77 diacairo-print.c \
88 diacairo-print.h
9+else
10+plugin_sources =
11+endif
912
1013 pkglib_LTLIBRARIES = libcairo_filter.la
1114
--- a/plug-ins/cairo/diacairo-renderer.c
+++ b/plug-ins/cairo/diacairo-renderer.c
@@ -34,33 +34,18 @@
3434 #include <pango/pangocairo.h>
3535 #endif
3636
37-/*
38- * To me the following looks rather suspicious. Why do we need to compile
39- * the Cairo plug-in at all if we don't have Cairo? As a result we'll
40- * show it in the menus/plugin details and the user expects something
41- * although there isn't any functionality behind it. Urgh.
42- *
43- * With Gtk+-2.7.x cairo must be available so this becomes even more ugly
44- * when the user has choosen to not build the diacairo plug-in. If noone
45- * can come up with a convincing reason to do it this way I'll probably
46- * go back to the dont-build-at-all approach when it breaks the next time.
47- * --hb
48- */
49-#ifdef HAVE_CAIRO
50-# include <cairo.h>
51-/* some backend headers, win32 missing in official Cairo */
52-# ifdef CAIRO_HAS_PNG_SURFACE_FEATURE
53-# include <cairo-png.h>
54-# endif
55-# ifdef CAIRO_HAS_PS_SURFACE
56-# include <cairo-ps.h>
57-# endif
58-# ifdef CAIRO_HAS_PDF_SURFACE
59-# include <cairo-pdf.h>
60-# endif
61-# ifdef CAIRO_HAS_SVG_SURFACE
62-# include <cairo-svg.h>
63-# endif
37+#include <cairo.h>
38+#ifdef CAIRO_HAS_PNG_SURFACE_FEATURE
39+#include <cairo-png.h>
40+#endif
41+#ifdef CAIRO_HAS_PS_SURFACE
42+#include <cairo-ps.h>
43+#endif
44+#ifdef CAIRO_HAS_PDF_SURFACE
45+#include <cairo-pdf.h>
46+#endif
47+#ifdef CAIRO_HAS_SVG_SURFACE
48+#include <cairo-svg.h>
6449 #endif
6550
6651 #include "intl.h"
--- a/plug-ins/cairo/diacairo.c
+++ b/plug-ins/cairo/diacairo.c
@@ -30,38 +30,27 @@
3030 #include <glib.h>
3131 #include <glib/gstdio.h>
3232
33-/*
34- * To me the following looks rather suspicious. Why do we need to compile
35- * the Cairo plug-in at all if we don't have Cairo? As a result we'll
36- * show it in the menus/plugin details and the user expects something
37- * although there isn't any functionality behind it. Urgh.
38- *
39- * With Gtk+-2.7.x cairo must be available so this becomes even more ugly
40- * when the user has choosen to not build the diacairo plug-in. If noone
41- * can come up with a convincing reason to do it this way I'll probably
42- * go back to the dont-build-at-all approach when it breaks the next time.
43- * --hb
44- */
45-#ifdef HAVE_CAIRO
46-# include <cairo.h>
33+#include <cairo.h>
4734 /* some backend headers, win32 missing in official Cairo */
48-# ifdef CAIRO_HAS_PNG_SURFACE_FEATURE
49-# include <cairo-png.h>
50-# endif
51-# ifdef CAIRO_HAS_PS_SURFACE
52-# include <cairo-ps.h>
53-# endif
54-# ifdef CAIRO_HAS_PDF_SURFACE
55-# include <cairo-pdf.h>
56-# endif
57-# ifdef CAIRO_HAS_SVG_SURFACE
58-# include <cairo-svg.h>
59-# endif
60-# ifdef CAIRO_HAS_WIN32_SURFACE
61-# include <cairo-win32.h>
62- /* avoid namespace collisions */
63-# define Rectangle RectangleWin32
64-# endif
35+#ifdef CAIRO_HAS_PNG_SURFACE_FEATURE
36+#include <cairo-png.h>
37+#endif
38+#ifdef CAIRO_HAS_PS_SURFACE
39+#include <cairo-ps.h>
40+#endif
41+#ifdef CAIRO_HAS_PDF_SURFACE
42+#include <cairo-pdf.h>
43+#endif
44+#ifdef CAIRO_HAS_SVG_SURFACE
45+#include <cairo-svg.h>
46+#endif
47+#ifdef CAIRO_HAS_WIN32_SURFACE
48+#include <cairo-win32.h>
49+/* avoid namespace collisions */
50+#define Rectangle RectangleWin32
51+#endif
52+#ifdef CAIRO_HAS_SCRIPT_SURFACE
53+#include <cairo-script.h>
6554 #endif
6655
6756 #ifdef HAVE_PANGOCAIRO_H