• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

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

作図ソフト dia の改良版


コミットメタ情報

リビジョンceb7265b65ed969698c358a850f8ff3ad42cc9d5 (tree)
日時2014-06-11 04:12:29
作者Gokturk Yuksek <gokturk@bing...>
コミッターHans Breuer

ログメッセージ

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>

変更サマリ

差分

--- 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,21 +34,19 @@
3434 #include <pango/pangocairo.h>
3535 #endif
3636
37-#ifdef HAVE_CAIRO
38-# include <cairo.h>
37+#include <cairo.h>
3938 /* some backend headers, win32 missing in official Cairo */
40-# ifdef CAIRO_HAS_PNG_SURFACE_FEATURE
41-# include <cairo-png.h>
42-# endif
43-# ifdef CAIRO_HAS_PS_SURFACE
44-# include <cairo-ps.h>
45-# endif
46-# ifdef CAIRO_HAS_PDF_SURFACE
47-# include <cairo-pdf.h>
48-# endif
49-# ifdef CAIRO_HAS_SVG_SURFACE
50-# include <cairo-svg.h>
51-# endif
39+#ifdef CAIRO_HAS_PNG_SURFACE_FEATURE
40+#include <cairo-png.h>
41+#endif
42+#ifdef CAIRO_HAS_PS_SURFACE
43+#include <cairo-ps.h>
44+#endif
45+#ifdef CAIRO_HAS_PDF_SURFACE
46+#include <cairo-pdf.h>
47+#endif
48+#ifdef CAIRO_HAS_SVG_SURFACE
49+#include <cairo-svg.h>
5250 #endif
5351
5452 #include "intl.h"
--- a/plug-ins/cairo/diacairo.c
+++ b/plug-ins/cairo/diacairo.c
@@ -30,41 +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
65-# ifdef CAIRO_HAS_SCRIPT_SURFACE
66-# include <cairo-script.h>
67-# 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>
6854 #endif
6955
7056 #ifdef HAVE_PANGOCAIRO_H