summaryrefslogtreecommitdiff
path: root/librsvg
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2012-11-06 18:08:16 +0200
committerTor Lillqvist <tml@iki.fi>2012-11-06 18:59:44 +0200
commite10124b20efb8cb7caf0f02fc537147a6505aa1d (patch)
tree4b1590fccf7d083da11a2e7e5b197af34d30b8f4 /librsvg
parent7b58bf4c0bd6614e8ebf8d4fee880a235834323c (diff)
Goodbye gettext, glib, gdk-pixbuf, pango, libcroco, libgsf and librsvg
Now with librsvg no longer used, and liblangtag no longer using glib, a bunch of bundled (in some configurations, always on some platforms) 3rd-party libraries are no longer needed. Initial work by rene, continued by tml. Change-Id: I76edd7aea5452e3487499f0b9ed9f767cf760194
Diffstat (limited to 'librsvg')
-rw-r--r--librsvg/ExternalPackage_librsvg.mk18
-rw-r--r--librsvg/ExternalProject_librsvg.mk35
-rw-r--r--librsvg/Library_librsvg-2-2.mk75
-rw-r--r--librsvg/Makefile7
-rw-r--r--librsvg/Module_librsvg.mk28
-rw-r--r--librsvg/README4
-rw-r--r--librsvg/UnpackedTarball_rsvg.mk29
-rw-r--r--librsvg/config.h27
-rw-r--r--librsvg/librsvg-2.32.1-win32.patch380
-rw-r--r--librsvg/librsvg-2.32.1.patch60
-rw-r--r--librsvg/prj/build.lst2
-rw-r--r--librsvg/prj/d.lst0
12 files changed, 0 insertions, 665 deletions
diff --git a/librsvg/ExternalPackage_librsvg.mk b/librsvg/ExternalPackage_librsvg.mk
deleted file mode 100644
index 0337c366c1ce..000000000000
--- a/librsvg/ExternalPackage_librsvg.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_ExternalPackage_ExternalPackage,librsvg,rsvg))
-
-$(eval $(call gb_ExternalPackage_use_external_project,librsvg,librsvg))
-
-$(eval $(call gb_ExternalPackage_add_files,librsvg,lib,\
- .libs/librsvg-2.2.dylib \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/librsvg/ExternalProject_librsvg.mk b/librsvg/ExternalProject_librsvg.mk
deleted file mode 100644
index f0bcff604fa8..000000000000
--- a/librsvg/ExternalProject_librsvg.mk
+++ /dev/null
@@ -1,35 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_ExternalProject_ExternalProject,librsvg))
-
-$(eval $(call gb_ExternalProject_use_unpacked,librsvg,rsvg))
-
-$(eval $(call gb_ExternalProject_register_targets,librsvg,\
- build \
-))
-
-$(call gb_ExternalProject_get_state_target,librsvg,build) :
- cd $(EXTERNAL_WORKDIR) \
- && ./configure --disable-gtk-theme --disable-tools --with-croco --with-svgz \
- --disable-pixbuf-loader --disable-dependency-tracking \
- $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
- LIBCROCO_CFLAGS="-I$(OUTDIR)/inc/external/libcroco-0.6" \
- LIBCROCO_LIBS="-lcroco-0.6" \
- GTHREAD_CFLAGS="-I$(OUTDIR)/inc/external/glib-2.0" \
- GTHREAD_LIBS="-lgthread-2.0" \
- GDK_PIXBUF_CFLAGS="-I$(OUTDIR)/inc/external/gdk-pixbuf-2.0" \
- GDK_PIXBUF_LIBS="-lgdk_pixbuf-2.0" \
- LIBRSVG_CFLAGS="-I$(OUTDIR)/inc/external/glib-2.0 -I$(OUTDIR)/inc/external/gdk-pixbuf-2.0 -I$(OUTDIR)/inc/external/pango-1.0 -I$(OUTDIR)/inc/cairo $(if $(filter YES,$(SYSTEM_LIBXML)),$(LIBXML_CFLAGS),-I$(OUTDIR)/inc/externel/libxml)" \
- LIBRSVG_LIBS="-L$(OUTDIR)/lib -lgdk_pixbuf-2.0 -lpango-1.0 -lpangocairo-1.0 -lgthread-2.0 -lgio-2.0 -lgmodule-2.0 -lgobject-2.0 -lglib-2.0 $(if $(filter YES,$(SYSTEM_LIBXML)),$(LIBXML_LIBS),-lxml2) -lcairo -lintl" \
- CFLAGS="-I$(OUTDIR)/inc/external -I$(OUTDIR)/inc/external/glib-2.0 -I$(OUTDIR)/inc/external/gdk-pixbuf-2.0 -I$(OUTDIR)/inc/external/pango-1.0 -I$(OUTDIR)/inc/cairo" \
- LDFLAGS="$(foreach lib,cairo.2 gio-2.0.0 glib-2.0.0 gmodule-2.0.0 gobject-2.0.0 gthread-2.0.0 intl.8 pango-1.0.0,-Wl,-dylib_file,@loader_path/lib$(lib).dylib:$(OUTDIR)/lib/lib$(lib).dylib) $(if $(filter YES,$(SYSTEM_LIBXML)),,-Wl,-dylib_file,@loader_path/../ure-link/lib/libxml2.2.dylib:$(OUTDIR)/lib/libxml2.2.dylib)" \
- && PATH=$(OUTDIR_FOR_BUILD)/bin:$$PATH $(MAKE) \
- && touch $@
-# vim: set noet sw=4 ts=4:
diff --git a/librsvg/Library_librsvg-2-2.mk b/librsvg/Library_librsvg-2-2.mk
deleted file mode 100644
index 66e1d12b30cf..000000000000
--- a/librsvg/Library_librsvg-2-2.mk
+++ /dev/null
@@ -1,75 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_Library_Library,librsvg-2-2))
-
-$(eval $(call gb_Library_use_unpacked,librsvg-2-2,rsvg))
-
-$(eval $(call gb_Library_use_externals,librsvg-2-2,\
- gobject \
- gio \
- glib \
- gthread \
- cairo \
- libxml2 \
- croco \
- pango \
- gsf \
- pixbuf \
-))
-
-ifeq ($(COM),MSC)
-$(eval $(call gb_Library_add_ldflags,librsvg-2-2,\
- /EXPORT:rsvg_init \
- /EXPORT:rsvg_handle_new_from_data \
- /EXPORT:rsvg_handle_set_dpi_x_y \
- /EXPORT:rsvg_handle_get_dimensions \
- /EXPORT:rsvg_handle_render_cairo \
-))
-endif
-
-$(eval $(call gb_Library_add_defs,librsvg-2-2,\
- -DHAVE_GSF \
- -DHAVE_LIBCROCO \
-))
-
-$(eval $(call gb_Library_set_warnings_not_errors,librsvg-2-2))
-
-$(eval $(call gb_Library_add_generated_cobjects,librsvg-2-2,\
- UnpackedTarball/rsvg/librsvg-enum-types \
- UnpackedTarball/rsvg/librsvg-features \
- UnpackedTarball/rsvg/rsvg-affine \
- UnpackedTarball/rsvg/rsvg-base-file-util \
- UnpackedTarball/rsvg/rsvg-base \
- UnpackedTarball/rsvg/rsvg-bpath-util \
- UnpackedTarball/rsvg/rsvg-cairo-clip \
- UnpackedTarball/rsvg/rsvg-cairo-draw \
- UnpackedTarball/rsvg/rsvg-cairo-render \
- UnpackedTarball/rsvg/rsvg-cond \
- UnpackedTarball/rsvg/rsvg-convert \
- UnpackedTarball/rsvg/rsvg-css \
- UnpackedTarball/rsvg/rsvg-defs \
- UnpackedTarball/rsvg/rsvg-file-util \
- UnpackedTarball/rsvg/rsvg-filter \
- UnpackedTarball/rsvg/rsvg-gobject \
- UnpackedTarball/rsvg/rsvg-image \
- UnpackedTarball/rsvg/rsvg-marker \
- UnpackedTarball/rsvg/rsvg-mask \
- UnpackedTarball/rsvg/rsvg-paint-server \
- UnpackedTarball/rsvg/rsvg-path \
- UnpackedTarball/rsvg/rsvg-shapes \
- UnpackedTarball/rsvg/rsvg-structure \
- UnpackedTarball/rsvg/rsvg-styles \
- UnpackedTarball/rsvg/rsvg-text \
- UnpackedTarball/rsvg/rsvg-xml \
- UnpackedTarball/rsvg/rsvg \
-))
-
-
-# vim: set noet sw=4 ts=4:
diff --git a/librsvg/Makefile b/librsvg/Makefile
deleted file mode 100644
index ccb1c85a04da..000000000000
--- a/librsvg/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-
-module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
-
-include $(module_directory)/../solenv/gbuild/partial_build.mk
-
-# vim: set noet sw=4 ts=4:
diff --git a/librsvg/Module_librsvg.mk b/librsvg/Module_librsvg.mk
deleted file mode 100644
index 2fe57946bc58..000000000000
--- a/librsvg/Module_librsvg.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_Module_Module,librsvg))
-
-ifeq ($(SYSTEM_LIBRSVG),NO)
-$(eval $(call gb_Module_add_targets,librsvg,\
- UnpackedTarball_rsvg \
-))
-ifeq ($(OS),MACOSX)
-$(eval $(call gb_Module_add_targets,librsvg,\
- ExternalPackage_librsvg \
- ExternalProject_librsvg \
-))
-else ifeq ($(OS),WNT)
-$(eval $(call gb_Module_add_targets,librsvg,\
- Library_librsvg-2-2 \
-))
-endif
-endif
-
-# vim: set noet sw=4 ts=4:
diff --git a/librsvg/README b/librsvg/README
deleted file mode 100644
index 6b8b64156b5d..000000000000
--- a/librsvg/README
+++ /dev/null
@@ -1,4 +0,0 @@
-Rapid Rendering of SVG files to screen or to other more conventional filetypes, such as JPEG and PNG.
-
-From:
-[http://librsvg.sourceforge.net/]
diff --git a/librsvg/UnpackedTarball_rsvg.mk b/librsvg/UnpackedTarball_rsvg.mk
deleted file mode 100644
index 599af982380f..000000000000
--- a/librsvg/UnpackedTarball_rsvg.mk
+++ /dev/null
@@ -1,29 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_UnpackedTarball_UnpackedTarball,rsvg))
-
-$(eval $(call gb_UnpackedTarball_set_tarball,rsvg,$(LIBRSVG_TARBALL)))
-
-#$(eval $(call gb_UnpackedTarball_set_patchlevel,rsvg,3))
-
-ifeq ($(OS),MACOSX)
-$(eval $(call gb_UnpackedTarball_add_patches,rsvg,\
- librsvg/librsvg-2.32.1.patch \
-))
-else ifeq ($(OS),WNT)
-$(eval $(call gb_UnpackedTarball_add_patches,rsvg,\
- librsvg/librsvg-2.32.1-win32.patch \
-))
-$(eval $(call gb_UnpackedTarball_add_files,rsvg,,\
- librsvg/config.h \
-))
-endif
-
-# vim: set noet sw=4 ts=4: \ No newline at end of file
diff --git a/librsvg/config.h b/librsvg/config.h
deleted file mode 100644
index 6e87dac42dbd..000000000000
--- a/librsvg/config.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#define HAVE_FLOAT_H 1
-/* #undef ENABLE_XEMBED */
-/* #undef HAVE_BASENAME */
-/* #undef HAVE_DLFCN_H */
-#define HAVE_GIO 1
-/* #undef HAVE_INTTYPES_H */
-/* #undef HAVE_LC_MESSAGES */
-#define HAVE_LOCALE_H 1
-#define HAVE_MEMORY_H 1
-/* #undef HAVE_STDINT_H */
-#define HAVE_STDLIB_H 1
-/* #undef HAVE_STRINGS_H */
-#define HAVE_STRING_H 1
-/* #undef HAVE_STRTOK_R */
-#define HAVE_SYS_STAT_H 1
-#define HAVE_SYS_TYPES_H 1
-/* #undef HAVE_UNISTD_H */
-
-#define PACKAGE "librsvg"
-#define PACKAGE_BUGREPORT ""
-#define PACKAGE_NAME ""
-#define PACKAGE_STRING ""
-#define PACKAGE_TARNAME ""
-#define PACKAGE_VERSION ""
-#define VERSION "2.32.1"
-#define STDC_HEADERS 1
-#define X_DISPLAY_MISSING 1 \ No newline at end of file
diff --git a/librsvg/librsvg-2.32.1-win32.patch b/librsvg/librsvg-2.32.1-win32.patch
deleted file mode 100644
index d3a342e8a8f5..000000000000
--- a/librsvg/librsvg-2.32.1-win32.patch
+++ /dev/null
@@ -1,380 +0,0 @@
---- misc/librsvg-2.32.1/librsvg-features.h 2010-11-13 11:52:49.000000000 +0100
-+++ misc/build/librsvg-2.32.1/librsvg-features.h 2011-03-28 16:29:01.357827800 +0200
-@@ -11,7 +11,7 @@
- (LIBRSVG_MAJOR_VERSION == (major) && LIBRSVG_MINOR_VERSION > (minor)) || \
- (LIBRSVG_MAJOR_VERSION == (major) && LIBRSVG_MINOR_VERSION == (minor) && LIBRSVG_MICRO_VERSION >= (micro)))
-
--#define LIBRSVG_HAVE_SVGZ (1)
-+#define LIBRSVG_HAVE_SVGZ (0)
- #define LIBRSVG_HAVE_CSS (1)
-
- #define LIBRSVG_CHECK_FEATURE(FEATURE) (defined(LIBRSVG_HAVE_##FEATURE) && LIBRSVG_HAVE_##FEATURE)
---- misc/librsvg-2.32.1/rsvg-image.c 2010-09-27 19:18:35.000000000 +0200
-+++ misc/build/librsvg-2.32.1/rsvg-image.c 2011-03-28 20:14:53.630005800 +0200
-@@ -22,8 +22,8 @@
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-
-- Authors: Raph Levien <raph@artofcode.com>,
-- Dom Lachowicz <cinamod@hotmail.com>,
-+ Authors: Raph Levien <raph@artofcode.com>,
-+ Dom Lachowicz <cinamod@hotmail.com>,
- Caleb Moore <c.moore@student.unsw.edu.au>
- */
-
-@@ -34,15 +34,167 @@
- #include <math.h>
- #include <errno.h>
- #include "rsvg-css.h"
-+#ifdef HAVE_GIO
- #include <gio/gio.h>
-+#endif
-+
-+static const char s_UTF8_B64Alphabet[64] = {
-+ 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
-+ 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, /* A-Z */
-+ 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
-+ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, /* a-z */
-+ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, /* 0-9 */
-+ 0x2b, /* + */
-+ 0x2f /* / */
-+};
-+static const char utf8_b64_pad = 0x3d;
-+
-+static gboolean
-+b64_decode_char (char c, int *b64)
-+{
-+ if ((c >= 0x41) && (c <= 0x5a)) {
-+ *b64 = c - 0x41;
-+ return TRUE;
-+ }
-+ if ((c >= 0x61) && (c <= 0x7a)) {
-+ *b64 = c - (0x61 - 26);
-+ return TRUE;
-+ }
-+ if ((c >= 0x30) && (c <= 0x39)) {
-+ *b64 = c + (52 - 0x30);
-+ return TRUE;
-+ }
-+ if (c == 0x2b) {
-+ *b64 = 62;
-+ return TRUE;
-+ }
-+ if (c == 0x2f) {
-+ *b64 = 63;
-+ return TRUE;
-+ }
-+ return FALSE;
-+}
-+
-+static gboolean
-+utf8_base64_decode (guchar ** binptr, size_t * binlen, const char *b64ptr, size_t b64len)
-+{
-+ gboolean decoded = TRUE;
-+ gboolean padding = FALSE;
-+
-+ int i = 0;
-+ glong ucs4_len, j;
-+
-+ unsigned char byte1 = 0;
-+ unsigned char byte2;
-+
-+ gunichar ucs4, *ucs4_str;
-+
-+ if (b64len == 0)
-+ return TRUE;
-+
-+ if ((binptr == 0) || (b64ptr == 0))
-+ return FALSE;
-+
-+ ucs4_str = g_utf8_to_ucs4_fast (b64ptr, b64len, &ucs4_len);
-+
-+ for (j = 0; j < ucs4_len; j++) {
-+ ucs4 = ucs4_str[j];
-+ if ((ucs4 & 0x7f) == ucs4) {
-+ int b64;
-+ char c = (char) (ucs4);
-+
-+ if (b64_decode_char (c, &b64)) {
-+ if (padding || (*binlen == 0)) {
-+ decoded = FALSE;
-+ break;
-+ }
-+
-+ switch (i) {
-+ case 0:
-+ byte1 = (unsigned char) (b64) << 2;
-+ i++;
-+ break;
-+ case 1:
-+ byte2 = (unsigned char) (b64);
-+ byte1 |= byte2 >> 4;
-+ *(*binptr)++ = (char) (byte1);
-+ (*binlen)--;
-+ byte1 = (byte2 & 0x0f) << 4;
-+ i++;
-+ break;
-+ case 2:
-+ byte2 = (unsigned char) (b64);
-+ byte1 |= byte2 >> 2;
-+ *(*binptr)++ = (char) (byte1);
-+ (*binlen)--;
-+ byte1 = (byte2 & 0x03) << 6;
-+ i++;
-+ break;
-+ default:
-+ byte1 |= (unsigned char) (b64);
-+ *(*binptr)++ = (char) (byte1);
-+ (*binlen)--;
-+ i = 0;
-+ break;
-+ }
-+
-+ if (!decoded)
-+ break;
-+
-+ continue;
-+ } else if (c == utf8_b64_pad) {
-+ switch (i) {
-+ case 0:
-+ case 1:
-+ decoded = FALSE;
-+ break;
-+ case 2:
-+ if (*binlen == 0)
-+ decoded = FALSE;
-+ else {
-+ *(*binptr)++ = (char) (byte1);
-+ (*binlen)--;
-+ padding = TRUE;
-+ }
-+ i++;
-+ break;
-+ default:
-+ if (!padding) {
-+ if (*binlen == 0)
-+ decoded = FALSE;
-+ else {
-+ *(*binptr)++ = (char) (byte1);
-+ (*binlen)--;
-+ padding = TRUE;
-+ }
-+ }
-+ i = 0;
-+ break;
-+ }
-+ if (!decoded)
-+ break;
-+
-+ continue;
-+ }
-+ }
-+ if (g_unichar_isspace (ucs4))
-+ continue;
-+
-+ decoded = FALSE;
-+ break;
-+ }
-+
-+ g_free (ucs4_str);
-+ return decoded;
-+}
-
- static GByteArray *
- rsvg_acquire_base64_resource (const char *data, GError ** error)
- {
-- GByteArray *array = NULL;
-- gsize data_len, written_len;
-- int state = 0;
-- guint save = 0;
-+ GByteArray *array;
-+
-+ guchar *bufptr;
-+ size_t buffer_len, buffer_max_len, data_len;
-
- rsvg_return_val_if_fail (data != NULL, NULL, error);
-
-@@ -51,10 +203,19 @@
- break;
-
- data_len = strlen (data);
-- array = g_byte_array_sized_new (data_len / 4 * 3);
-- written_len = g_base64_decode_step (data, data_len, array->data,
-- &state, &save);
-- g_byte_array_set_size (array, written_len);
-+
-+ buffer_max_len = ((data_len >> 2) + 1) * 3;
-+ buffer_len = buffer_max_len;
-+
-+ array = g_byte_array_sized_new (buffer_max_len);
-+ bufptr = array->data;
-+
-+ if (!utf8_base64_decode (&bufptr, &buffer_len, data, data_len)) {
-+ g_byte_array_free (array, TRUE);
-+ return NULL;
-+ }
-+
-+ array->len = buffer_max_len - buffer_len;
-
- return array;
- }
-@@ -75,7 +236,7 @@
- if (base_filename != NULL) {
- tmpcdir = g_path_get_dirname (base_filename);
- g_free (base_filename);
-- } else
-+ } else
- return NULL;
- } else
- tmpcdir = g_get_current_dir ();
-@@ -92,8 +253,10 @@
- {
- GByteArray *array;
- gchar *path;
-- gchar *data = NULL;
-- gsize length;
-+
-+ guchar buffer[4096];
-+ int length;
-+ FILE *f;
-
- rsvg_return_val_if_fail (filename != NULL, NULL, error);
-
-@@ -101,20 +264,53 @@
- if (path == NULL)
- return NULL;
-
-- if (!g_file_get_contents (path, &data, &length, error)) {
-- g_free (path);
-+ f = fopen (path, "rb");
-+ g_free (path);
-+
-+ if (!f) {
-+ g_set_error (error,
-+ G_FILE_ERROR,
-+ g_file_error_from_errno (errno),
-+ _("Failed to open file '%s': %s"), filename, g_strerror (errno));
- return NULL;
- }
-
-+ /* TODO: an optimization is to use the file's size */
- array = g_byte_array_new ();
-
-- g_byte_array_append (array, (guint8 *)data, length);
-- g_free (data);
-- g_free (path);
-+ while (!feof (f)) {
-+ length = fread (buffer, 1, sizeof (buffer), f);
-+ if (length > 0) {
-+ if (g_byte_array_append (array, buffer, length) == NULL) {
-+ fclose (f);
-+ g_byte_array_free (array, TRUE);
-+ return NULL;
-+ }
-+ } else if (ferror (f)) {
-+ fclose (f);
-+ g_byte_array_free (array, TRUE);
-+ return NULL;
-+ }
-+ }
-+
-+ fclose (f);
-
- return array;
- }
-
-+#ifdef HAVE_GIO
-+
-+static void
-+rsvg_free_error (GError ** err)
-+{
-+ if (err) {
-+ if (*err) {
-+ g_error_free (*err);
-+ *err = NULL;
-+ }
-+ }
-+}
-+
- static GByteArray *
- rsvg_acquire_vfs_resource (const char *filename, const char *base_uri, GError ** error)
- {
-@@ -133,19 +329,19 @@
- if (base_uri != NULL) {
- GFile *base;
-
-- g_clear_error (error);
--
-- g_object_unref (file);
-+ rsvg_free_error(error);
-+
-+ g_object_unref (file);
-
- base = g_file_new_for_uri (base_uri);
- file = g_file_resolve_relative_path (base, filename);
- g_object_unref (base);
-
-- res = g_file_load_contents (file, NULL, &data, &size, NULL, error);
-+ res = g_file_load_contents (file, NULL, &data, &size, NULL, error);
- }
- }
-
-- g_object_unref (file);
-+ g_object_unref (file);
-
- if (res) {
- array = g_byte_array_new ();
-@@ -158,6 +354,7 @@
-
- return array;
- }
-+#endif
-
- GByteArray *
- _rsvg_acquire_xlink_href_resource (const char *href, const char *base_uri, GError ** err)
-@@ -173,8 +370,10 @@
- if (!arr)
- arr = rsvg_acquire_file_resource (href, base_uri, NULL);
-
-+#ifdef HAVE_GIO
- if (!arr)
- arr = rsvg_acquire_vfs_resource (href, base_uri, NULL);
-+#endif
-
- return arr;
- }
-@@ -274,10 +473,9 @@
- RsvgNodeImage *z = (RsvgNodeImage *) self;
- rsvg_state_finalize (z->super.state);
- g_free (z->super.state);
-- z->super.state = NULL;
- if (z->img)
-- g_object_unref (z->img);
-- _rsvg_node_free(self);
-+ g_object_unref (G_OBJECT (z->img));
-+ g_free (z);
- }
-
- static void
-@@ -300,7 +498,7 @@
-
- rsvg_push_discrete_layer (ctx);
-
-- if (!rsvg_current_state (ctx)->overflow && (aspect_ratio & RSVG_ASPECT_RATIO_SLICE)) {
-+ if (!rsvg_current_state(ctx)->overflow && (aspect_ratio & RSVG_ASPECT_RATIO_SLICE)) {
- rsvg_add_clipping_rect (ctx, x, y, w, h);
- }
-
-@@ -357,10 +555,11 @@
- RsvgNodeImage *image;
- image = g_new (RsvgNodeImage, 1);
- _rsvg_node_init (&image->super);
-- g_assert (image->super.state);
- image->img = NULL;
- image->preserve_aspect_ratio = RSVG_ASPECT_RATIO_XMID_YMID;
- image->x = image->y = image->w = image->h = _rsvg_css_parse_length ("0");
-+ image->super.state = g_new (RsvgState, 1);
-+ rsvg_state_init (image->super.state);
- image->super.free = rsvg_node_image_free;
- image->super.draw = rsvg_node_image_draw;
- image->super.set_atts = rsvg_node_image_set_atts;
diff --git a/librsvg/librsvg-2.32.1.patch b/librsvg/librsvg-2.32.1.patch
deleted file mode 100644
index 2d9fc0fc216a..000000000000
--- a/librsvg/librsvg-2.32.1.patch
+++ /dev/null
@@ -1,60 +0,0 @@
---- misc/librsvg-2.32.1/configure 2010-11-13 11:52:19.000000000 +0100
-+++ misc/build/librsvg-2.32.1/configure 2011-03-03 14:28:12.000000000 +0100
-@@ -12288,8 +12288,8 @@
-
-
-
--GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
--
-+#GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
-+GLIB_MKENUMS=glib-mkenums
-
-
- pkg_failed=no
-@@ -12562,6 +12562,7 @@
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gio 2.24 is available" >&5
- $as_echo_n "checking whether gio 2.24 is available... " >&6; }
-+if false; then
- if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= 2.24.0\""; } >&5
- ($PKG_CONFIG --exists --print-errors "gio-2.0 >= 2.24.0") 2>&5
-@@ -12572,6 +12573,9 @@
- else
- have_gio_2_24=no
- fi
-+else
-+ have_gio_2_24=yes
-+fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gio_2_24" >&5
- $as_echo "$have_gio_2_24" >&6; }
-
-@@ -12695,8 +12699,8 @@
-
-
-
--LIBCROCO_CFLAGS=""
--LIBCROCO_LIBS=""
-+#LIBCROCO_CFLAGS=""
-+#LIBCROCO_LIBS=""
- LIBCROCOPKG=""
-
- test_croco=true
-@@ -13376,13 +13380,13 @@
-
-
-
--GLIB_PREFIX=$($PKG_CONFIG --variable=prefix glib-2.0)
-+#GLIB_PREFIX=$($PKG_CONFIG --variable=prefix glib-2.0)
-
--GDK_PIXBUF_PREFIX=$($PKG_CONFIG --variable=prefix gdk-pixbuf-2.0)
-+#GDK_PIXBUF_PREFIX=$($PKG_CONFIG --variable=prefix gdk-pixbuf-2.0)
-
--GTK_PREFIX=$($PKG_CONFIG --variable=prefix gdk-pixbuf-2.0)
-+#GTK_PREFIX=$($PKG_CONFIG --variable=prefix gdk-pixbuf-2.0)
-
--CAIRO_PREFIX=$($PKG_CONFIG --variable=prefix cairo)
-+#CAIRO_PREFIX=$($PKG_CONFIG --variable=prefix cairo)
-
-
-
diff --git a/librsvg/prj/build.lst b/librsvg/prj/build.lst
deleted file mode 100644
index a3f12079fbdc..000000000000
--- a/librsvg/prj/build.lst
+++ /dev/null
@@ -1,2 +0,0 @@
-rg librsvg : LIBXML2:libxml2 PANGO:pango LIBCROCO:libcroco LIBGSF:libgsf CAIRO:cairo GDK_PIXBUF:gdk-pixbuf GLIB:glib GETTEXT:gettext soltools NULL
-rg librsvg\prj nmake - all rg_librsvg NULL
diff --git a/librsvg/prj/d.lst b/librsvg/prj/d.lst
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/librsvg/prj/d.lst
+++ /dev/null