[gnome-games/make-librsvg-compulsary-671925] Even glchess makes use of librsvg-2.0 now so make it compulsary
- From: Chandni Verma <vchandni src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/make-librsvg-compulsary-671925] Even glchess makes use of librsvg-2.0 now so make it compulsary
- Date: Tue, 13 Mar 2012 01:58:42 +0000 (UTC)
commit a37027a54b691f541814602fbdd455aa993c5a54
Author: Chandni Verma <chandniverma2112 gmail com>
Date: Mon Mar 12 23:03:44 2012 +0530
Even glchess makes use of librsvg-2.0 now so make it compulsary
The last and only game not using librsvg-2.0 and causing it to be
installed as an option was glchess which also uses it.
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=671925
configure.ac | 34 +++++++---------------------------
glines/src/Makefile.am | 9 +++------
gnect/src/Makefile.am | 7 ++-----
gnibbles/src/Makefile.am | 7 ++-----
gnobots2/src/Makefile.am | 7 ++-----
gnomine/src/Makefile.am | 11 ++++-------
gnotravex/src/Makefile.am | 9 +++------
gnotski/src/Makefile.am | 9 +++------
gtali/src/Makefile.am | 9 +++------
iagno/src/Makefile.am | 7 ++-----
libgames-support/Makefile.am | 15 ++++++---------
libgames-support/games-preimage.c | 20 --------------------
mahjongg/src/Makefile.am | 9 +++------
quadrapassel/src/Makefile.am | 7 ++-----
14 files changed, 42 insertions(+), 118 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 41be518..3c353d4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -108,7 +108,6 @@ AC_SUBST([gamelist])
# Feature matrix
need_vala=no
-need_rsvg=no
need_sqlite=no
need_opengl=no
need_glx=no
@@ -134,10 +133,6 @@ for game in $gamelist; do
*) ;;
esac
case $game in
- glchess) ;;
- *) need_rsvg=yes ;;
- esac
- case $game in
glchess) need_sqlite=yes ;;
*) ;;
esac
@@ -253,6 +248,7 @@ RSVG_REQUIRED=2.32.0
LIBCANBERRA_GTK_REQUIRED=0.26
GIO_REQUIRED=2.25.7
GSTREAMER_REQUIRED=0.10.11
+CAIRO_REQUIRED=1.10.0
if test "$need_gmenu" = "yes"; then
GTK_REQUIRED=3.3.11
@@ -272,6 +268,12 @@ PKG_CHECK_MODULES([GTK],[gtk+-3.0 >= $GTK_REQUIRED])
AC_SUBST([GTK_CFLAGS])
AC_SUBST([GTK_LIBS])
+PKG_CHECK_MODULES([RSVG],[
+ librsvg-2.0 >= $RSVG_REQUIRED
+ cairo >= $CAIRO_REQUIRED])
+AC_SUBST([RSVG_CFLAGS])
+AC_SUBST([RSVG_LIBS])
+
# GDBus
PKG_CHECK_MODULES([GIO],[gio-2.0 >= $GIO_REQUIRED],[have_gio_2_26=yes],[have_gio_2_26=no])
@@ -282,27 +284,6 @@ AM_CONDITIONAL([HAVE_GIO_2_26],[test "$have_gio_2_26" = "yes"])
m4_ifdef([GLIB_GSETTINGS],[GLIB_GSETTINGS([],[:])])
-# Check for librsvg
-
-have_rsvg=no
-if test "$need_rsvg" = "yes"; then
- have_rsvg=yes
-
- CAIRO_REQUIRED=1.10.0
-
- # Errors out if rsvg is not found
- PKG_CHECK_MODULES([RSVG],[
- librsvg-2.0 >= $RSVG_REQUIRED
- cairo >= $CAIRO_REQUIRED])
-
- AC_SUBST([RSVG_CFLAGS])
- AC_SUBST([RSVG_LIBS])
-
- AC_DEFINE([HAVE_RSVG],[1],[Refine if librsvg is available])
-fi
-
-AM_CONDITIONAL([HAVE_RSVG],[test "$have_rsvg" = "yes"])
-
# Check for SQLite
have_sqlite=no
@@ -601,7 +582,6 @@ Configuration:
echo "
Games to be compiled: ${gamelist}
- Using RSVG: ${have_rsvg}
Using SQLite: ${have_sqlite}
Use setgid binaries: ${enable_setgid}
Scores user: ${scores_user}
diff --git a/glines/src/Makefile.am b/glines/src/Makefile.am
index 110ac04..a1345ad 100644
--- a/glines/src/Makefile.am
+++ b/glines/src/Makefile.am
@@ -12,21 +12,18 @@ glines_CFLAGS = \
-DDATA_DIRECTORY=\"$(datadir)/glines\" \
-DLOCALEDIR=\"$(datadir)/locale\" \
$(GMODULE_CFLAGS) \
- $(GTK_CFLAGS) \
+ $(GTK_CFLAGS) \
+ $(RSVG_CFLAGS) \
$(AM_CFLAGS)
glines_LDADD = \
$(top_builddir)/libgames-support/libgames-support.la \
$(GMODULE_LIBS) \
$(GTK_LIBS) \
+ $(RSVG_LIBS) \
$(INTLLIBS) \
-lm
-if HAVE_RSVG
-glines_CFLAGS += $(RSVG_CFLAGS)
-glines_LDADD += $(RSVG_LIBS)
-endif
-
install-exec-hook:
-if test "$(setgid)" = "true"; then \
chgrp $(scores_group) $(DESTDIR)$(bindir)/glines && chmod 2555 $(DESTDIR)$(bindir)/glines ;\
diff --git a/gnect/src/Makefile.am b/gnect/src/Makefile.am
index 8611ce5..5bfaf50 100644
--- a/gnect/src/Makefile.am
+++ b/gnect/src/Makefile.am
@@ -32,19 +32,16 @@ gnect_CFLAGS = \
-DSOUND_DIRECTORY=\"$(datadir)/gnect/sounds\" \
-DLOCALEDIR=\"$(datadir)/locale\" \
$(GTK_CFLAGS) \
+ $(RSVG_CFLAGS) \
$(CANBERRA_GTK_CFLAGS) \
$(AM_CFLAGS)
gnect_LDADD = \
$(top_builddir)/libgames-support/libgames-support.la \
$(GTK_LIBS) \
+ $(RSVG_LIBS) \
$(CANBERRA_GTK_LIBS) \
$(INTLLIBS) \
-lz
-if HAVE_RSVG
-gnect_CFLAGS += $(RSVG_CFLAGS)
-gnect_LDADD += $(RSVG_LIBS)
-endif
-
-include $(top_srcdir)/git.mk
diff --git a/gnibbles/src/Makefile.am b/gnibbles/src/Makefile.am
index 8bd2a21..928b8fb 100644
--- a/gnibbles/src/Makefile.am
+++ b/gnibbles/src/Makefile.am
@@ -35,6 +35,7 @@ gnibbles_CFLAGS = \
-DSOUND_DIRECTORY=\"$(datadir)/gnibbles/sounds\" \
-DLOCALEDIR=\"$(datadir)/locale\" \
$(GTK_CFLAGS) \
+ $(RSVG_CFLAGS) \
$(CANBERRA_GTK_CFLAGS) \
$(CLUTTER_GTK_CFLAGS) \
$(CLUTTER_CFLAGS) \
@@ -43,16 +44,12 @@ gnibbles_CFLAGS = \
gnibbles_LDADD = \
$(top_builddir)/libgames-support/libgames-support.la \
$(GTK_LIBS) \
+ $(RSVG_LIBS) \
$(CANBERRA_GTK_LIBS) \
$(CLUTTER_GTK_LIBS) \
$(CLUTTER_LIBS) \
$(INTLLIBS)
-if HAVE_RSVG
-gnibbles_CFLAGS += $(RSVG_CFLAGS)
-gnibbles_LDADD += $(RSVG_LIBS)
-endif
-
install-exec-hook:
-if test "$(setgid)" = "true"; then \
chgrp $(scores_group) $(DESTDIR)$(bindir)/gnibbles && chmod 2555 $(DESTDIR)$(bindir)/gnibbles ;\
diff --git a/gnobots2/src/Makefile.am b/gnobots2/src/Makefile.am
index 25f7b62..903036e 100644
--- a/gnobots2/src/Makefile.am
+++ b/gnobots2/src/Makefile.am
@@ -43,21 +43,18 @@ gnobots2_CFLAGS = \
-DSOUND_DIRECTORY=\"$(datadir)/gnobots2/sounds\" \
-DLOCALEDIR=\"$(datadir)/locale\" \
$(GTK_CFLAGS) \
+ $(RSVG_CFLAGS) \
$(CANBERRA_GTK_CFLAGS) \
$(AM_CFLAGS)
gnobots2_LDADD = \
$(top_builddir)/libgames-support/libgames-support.la \
$(GTK_LIBS) \
+ $(RSVG_LIBS) \
$(CANBERRA_GTK_LIBS) \
$(INTLLIBS) \
-lm
-if HAVE_RSVG
-gnobots2_CFLAGS += $(RSVG_CFLAGS)
-gnobots2_LDADD += $(RSVG_LIBS)
-endif
-
install-exec-hook:
-if test "$(setgid)" = "true"; then \
chgrp $(scores_group) $(DESTDIR)$(bindir)/gnobots2 && chmod 2555 $(DESTDIR)$(bindir)/gnobots2 ;\
diff --git a/gnomine/src/Makefile.am b/gnomine/src/Makefile.am
index 836b662..b09bc7d 100644
--- a/gnomine/src/Makefile.am
+++ b/gnomine/src/Makefile.am
@@ -12,7 +12,8 @@ gnomine_CFLAGS = \
-DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \
-DDATA_DIRECTORY=\"$(datadir)/gnomine\" \
-DLOCALEDIR=\"$(datadir)/locale\" \
- $(GTK_CFLAGS)
+ $(GTK_CFLAGS) \
+ $(RSVG_CFLAGS)
gnomine_VALAFLAGS = \
--pkg posix \
@@ -24,12 +25,8 @@ gnomine_VALAFLAGS = \
gnomine_LDADD = \
$(top_builddir)/libgames-support/libgames-support.la \
- $(GTK_LIBS)
-
-if HAVE_RSVG
-gnomine_CFLAGS += $(RSVG_CFLAGS)
-gnomine_LDADD += $(RSVG_LIBS)
-endif
+ $(GTK_LIBS) \
+ $(RSVG_LIBS)
install-exec-hook:
-if test "$(setgid)" = "true"; then \
diff --git a/gnotravex/src/Makefile.am b/gnotravex/src/Makefile.am
index 5424628..c2e4957 100644
--- a/gnotravex/src/Makefile.am
+++ b/gnotravex/src/Makefile.am
@@ -20,19 +20,16 @@ gnotravex_CFLAGS = \
-DDATA_DIRECTORY=\"$(datadir)/gnotravex\" \
-DLOCALEDIR=\"$(datadir)/locale\" \
$(GTK_CFLAGS) \
+ $(RSVG_CFLAGS) \
$(AM_CFLAGS) \
-Wno-unused
-gnotravex_LDADD = \
+gnotravex_LDADD = \
$(top_builddir)/libgames-support/libgames-support.la \
$(GTK_LIBS) \
+ $(RSVG_LIBS) \
$(INTLLIBS)
-if HAVE_RSVG
-gnotravex_CFLAGS += $(RSVG_CFLAGS)
-gnotravex_LDADD += $(RSVG_LIBS)
-endif
-
install-exec-hook:
-if test "$(setgid)" = "true"; then \
chgrp $(scores_group) $(DESTDIR)$(bindir)/gnotravex && chmod 2555 $(DESTDIR)$(bindir)/gnotravex ;\
diff --git a/gnotski/src/Makefile.am b/gnotski/src/Makefile.am
index c11f576..74e1c5f 100644
--- a/gnotski/src/Makefile.am
+++ b/gnotski/src/Makefile.am
@@ -11,19 +11,16 @@ gnotski_CPPFLAGS = \
gnotski_CFLAGS = \
-DDATA_DIRECTORY=\"$(datadir)/gnotski\" \
-DLOCALEDIR=\"$(datadir)/locale\" \
- $(GTK_CFLAGS) \
+ $(GTK_CFLAGS) \
+ $(RSVG_CFLAGS) \
$(AM_CFLAGS)
gnotski_LDADD = \
$(top_builddir)/libgames-support/libgames-support.la \
$(GTK_LIBS) \
+ $(RSVG_LIBS) \
$(INTLLIBS)
-if HAVE_RSVG
-gnotski_CFLAGS += $(RSVG_CFLAGS)
-gnotski_LDADD += $(RSVG_LIBS)
-endif
-
install-exec-hook:
-if test "$(setgid)" = "true"; then \
chgrp $(scores_group) $(DESTDIR)$(bindir)/gnotski && chmod 2555 $(DESTDIR)$(bindir)/gnotski ;\
diff --git a/gtali/src/Makefile.am b/gtali/src/Makefile.am
index 4df0ac6..980adfb 100644
--- a/gtali/src/Makefile.am
+++ b/gtali/src/Makefile.am
@@ -16,19 +16,16 @@ gtali_CPPFLAGS = \
gtali_CFLAGS = \
-DDATA_DIRECTORY=\"$(datadir)/gtali\" \
-DLOCALEDIR=\"$(datadir)/locale\" \
- $(GTK_CFLAGS) \
+ $(GTK_CFLAGS) \
+ $(RSVG_CFLAGS) \
$(AM_CFLAGS)
gtali_LDADD = \
$(top_builddir)/libgames-support/libgames-support.la \
$(GTK_LIBS) \
+ $(RSVG_LIBS) \
$(INTLLIBS)
-if HAVE_RSVG
-gtali_CFLAGS += $(RSVG_CFLAGS)
-gtali_LDADD += $(RSVG_LIBS)
-endif
-
install-exec-hook:
-if test "$(setgid)" = "true"; then \
chgrp $(scores_group) $(DESTDIR)$(bindir)/gtali && chmod 2555 $(DESTDIR)$(bindir)/gtali ;\
diff --git a/iagno/src/Makefile.am b/iagno/src/Makefile.am
index 74235ce..689e98d 100644
--- a/iagno/src/Makefile.am
+++ b/iagno/src/Makefile.am
@@ -15,6 +15,7 @@ iagno_CFLAGS = \
-DSOUND_DIRECTORY=\"$(datadir)/iagno/sounds\" \
-DLOCALEDIR=\"$(datadir)/locale\" \
$(GTK_CFLAGS) \
+ $(RSVG_CFLAGS) \
$(CANBERRA_GTK_CFLAGS)
iagno_VALAFLAGS = \
@@ -28,13 +29,9 @@ iagno_VALAFLAGS = \
iagno_LDADD = \
$(top_builddir)/libgames-support/libgames-support.la \
$(GTK_LIBS) \
+ $(RSVG_LIBS) \
$(CANBERRA_GTK_LIBS)
-if HAVE_RSVG
-iagno_CFLAGS += $(RSVG_CFLAGS)
-iagno_LDADD += $(RSVG_LIBS)
-endif
-
CLEANFILES = \
$(patsubst %.vala,%.c,$(filter %.vala, $(SOURCES))) \
*_vala.stamp
diff --git a/libgames-support/Makefile.am b/libgames-support/Makefile.am
index 7c86f39..2ce5eb7 100644
--- a/libgames-support/Makefile.am
+++ b/libgames-support/Makefile.am
@@ -60,23 +60,20 @@ libgames_support_la_CPPFLAGS = \
-DLOCALE_DIRECTORY="\"$(datadir)/locale\"" \
$(AM_CPPFLAGS)
-libgames_support_la_CFLAGS = \
- $(GTK_CFLAGS) \
+libgames_support_la_CFLAGS = \
+ $(GTK_CFLAGS) \
+ $(RSVG_CFLAGS) \
$(AM_CFLAGS)
-libgames_support_la_LIBADD = \
- $(GTK_LIBS)
+libgames_support_la_LIBADD = \
+ $(GTK_LIBS) \
+ $(RSVG_LIBS)
if HAVE_GIO_2_26
libgames_support_la_CFLAGS += $(GIO_CFLAGS)
libgames_support_la_LIBADD += $(GIO_LIBS)
endif
-if HAVE_RSVG
-libgames_support_la_CFLAGS += $(RSVG_CFLAGS)
-libgames_support_la_LIBADD += $(RSVG_LIBS)
-endif
-
gsettingsschema_in_files = org.gnome.Games.WindowState.gschema.xml.in
gsettings_SCHEMAS = $(gsettingsschema_in_files:.gschema.xml.in=.gschema.xml)
diff --git a/libgames-support/games-preimage.c b/libgames-support/games-preimage.c
index 5b2a046..94ff8ea 100644
--- a/libgames-support/games-preimage.c
+++ b/libgames-support/games-preimage.c
@@ -30,10 +30,8 @@
/* For gdkcairo */
#include <gdk/gdk.h>
-#ifdef HAVE_RSVG
#include <librsvg/rsvg.h>
#include <librsvg/rsvg-cairo.h>
-#endif /* HAVE_RSVG */
#include "games-preimage.h"
@@ -44,10 +42,8 @@ struct _GamesPreimage {
gint width;
gint height;
-#ifdef HAVE_RSVG
RsvgHandle *rsvg_handle;
cairo_font_options_t *font_options;
-#endif
/* raster pixbuf data */
GdkPixbuf *pixbuf;
@@ -70,14 +66,12 @@ games_preimage_finalize (GObject * object)
{
GamesPreimage *preimage = GAMES_PREIMAGE (object);
-#ifdef HAVE_RSVG
if (preimage->rsvg_handle != NULL) {
g_object_unref (preimage->rsvg_handle);
}
if (preimage->font_options) {
cairo_font_options_destroy (preimage->font_options);
}
-#endif
if (preimage->pixbuf != NULL) {
g_object_unref (preimage->pixbuf);
@@ -93,9 +87,7 @@ games_preimage_class_init (GamesPreimageClass * klass)
oclass->finalize = games_preimage_finalize;
-#ifdef HAVE_RSVG
rsvg_init ();
-#endif
}
/**
@@ -117,7 +109,6 @@ games_preimage_render (GamesPreimage * preimage, gint width, gint height)
g_return_val_if_fail (width > 0 && height > 0, NULL);
g_return_val_if_fail (preimage != NULL, NULL);
-#ifdef HAVE_RSVG
if (preimage->scalable) { /* Render vector image */
pixbuf = games_preimage_render_sub (preimage,
NULL,
@@ -129,7 +120,6 @@ games_preimage_render (GamesPreimage * preimage, gint width, gint height)
((double) height) /
((double) preimage->height));
} else
-#endif /* HAVE_RSVG */
{
/* Render raster image */
pixbuf = gdk_pixbuf_scale_simple (preimage->pixbuf,
@@ -158,7 +148,6 @@ games_preimage_render_cairo (GamesPreimage * preimage,
g_return_if_fail (width > 0 && height > 0);
g_return_if_fail (preimage != NULL);
-#ifdef HAVE_RSVG
if (preimage->scalable) { /* Render vector image */
games_preimage_render_cairo_sub (preimage,
cr,
@@ -171,7 +160,6 @@ games_preimage_render_cairo (GamesPreimage * preimage,
((double) height) /
((double) preimage->height));
} else
-#endif /* HAVE_RSVG */
{
GdkPixbuf *pixbuf;
@@ -189,8 +177,6 @@ games_preimage_render_cairo (GamesPreimage * preimage,
}
}
-#ifdef HAVE_RSVG
-
/* This routine is copied from librsvg:
Copyright  2005 Dom Lachowicz <cinamod hotmail com>
Copyright  2005 Caleb Moore <c moore student unsw edu au>
@@ -342,8 +328,6 @@ games_preimage_render_sub (GamesPreimage * preimage,
(GdkPixbufDestroyNotify) g_free, data);
}
-#endif /* HAVE_RSVG */
-
/**
* games_preimage_new_from_file:
* @filename:
@@ -363,7 +347,6 @@ games_preimage_new_from_file (const gchar * filename, GError ** error)
preimage = g_object_new (GAMES_TYPE_PREIMAGE, NULL);
-#ifdef HAVE_RSVG
preimage->rsvg_handle = rsvg_handle_new_from_file (filename, NULL);
if (preimage->rsvg_handle) {
RsvgDimensionData data;
@@ -385,7 +368,6 @@ games_preimage_new_from_file (const gchar * filename, GError ** error)
return preimage;
}
-#endif /* HAVE_RSVG */
/* Not an SVG */
preimage->scalable = FALSE;
@@ -415,7 +397,6 @@ void
games_preimage_set_font_options (GamesPreimage * preimage,
const cairo_font_options_t * font_options)
{
-#ifdef HAVE_RSVG
g_return_if_fail (GAMES_IS_PREIMAGE (preimage));
if (preimage->font_options) {
@@ -427,7 +408,6 @@ games_preimage_set_font_options (GamesPreimage * preimage,
} else {
preimage->font_options = NULL;
}
-#endif /* HAVE_RSVG */
}
/**
diff --git a/mahjongg/src/Makefile.am b/mahjongg/src/Makefile.am
index 9e279da..afce347 100644
--- a/mahjongg/src/Makefile.am
+++ b/mahjongg/src/Makefile.am
@@ -20,18 +20,15 @@ mahjongg_CFLAGS = \
-DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \
-DDATA_DIRECTORY=\"$(datadir)/mahjongg\" \
-DLOCALEDIR=\"$(datadir)/locale\" \
- $(GTK_CFLAGS)
+ $(GTK_CFLAGS) \
+ $(RSVG_CFLAGS)
mahjongg_LDADD = \
$(top_builddir)/libgames-support/libgames-support.la \
$(GTK_LIBS) \
+ $(RSVG_LIBS) \
$(INTLLIBS)
-if HAVE_RSVG
-mahjongg_CFLAGS += $(RSVG_CFLAGS)
-mahjongg_LDADD += $(RSVG_LIBS)
-endif
-
install-exec-hook:
-if test "$(setgid)" = "true"; then \
chgrp $(scores_group) $(DESTDIR)$(bindir)/mahjongg && chmod 2555 $(DESTDIR)$(bindir)/mahjongg ;\
diff --git a/quadrapassel/src/Makefile.am b/quadrapassel/src/Makefile.am
index c63fe4a..f7aedc4 100644
--- a/quadrapassel/src/Makefile.am
+++ b/quadrapassel/src/Makefile.am
@@ -15,6 +15,7 @@ quadrapassel_CFLAGS = \
-DSOUND_DIRECTORY=\"$(datadir)/quadrapassel/sounds\" \
-DLOCALEDIR=\"$(datadir)/locale\" \
$(GTK_CFLAGS) \
+ $(RSVG_CFLAGS) \
$(CANBERRA_GTK_CFLAGS) \
$(CLUTTER_GTK_CFLAGS) \
$(CLUTTER_CFLAGS)
@@ -38,13 +39,9 @@ quadrapassel_LDADD = \
$(CLUTTER_GTK_LIBS) \
$(CLUTTER_LIBS) \
$(GTK_LIBS) \
+ $(RSVG_LIBS) \
$(INTLLIBS)
-if HAVE_RSVG
-quadrapassel_CFLAGS += $(RSVG_CFLAGS)
-quadrapassel_LDADD += $(RSVG_LIBS)
-endif
-
install-exec-hook:
-if test "$(setgid)" = "true"; then \
chgrp $(scores_group) $(DESTDIR)$(bindir)/quadrapassel && chmod 2555 $(DESTDIR)$(bindir)/quadrapassel ;\
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]