diff options
author | Michael Lauer <mickey@vanille-media.de> | 2008-02-06 16:42:44 +0000 |
---|---|---|
committer | Michael Lauer <mickey@vanille-media.de> | 2008-02-06 16:42:44 +0000 |
commit | 8f29644efce44f9059fb290b644047caf9146c1b (patch) | |
tree | 48988acb0aae4225fb1ef2c5599dba659ad6744d | |
parent | 670cceb7f604c6ad6edf47431326434574fbf114 (diff) | |
parent | 1b7fb667944736d86e8b483727f87998083e8972 (diff) |
merge of '298797d86056bd55b8e0191685cb8ae42de55f7d'
and 'e3a17e2ff263cac6d4b035034dc79a0e05fc548d'
34 files changed, 175 insertions, 2068 deletions
diff --git a/packages/libglade/libglade-2.0.1/.mtn2git_empty b/contrib/image-convert/.mtn2git_empty index e69de29bb2..e69de29bb2 100644 --- a/packages/libglade/libglade-2.0.1/.mtn2git_empty +++ b/contrib/image-convert/.mtn2git_empty diff --git a/contrib/image-convert/README b/contrib/image-convert/README new file mode 100644 index 0000000000..9daca60703 --- /dev/null +++ b/contrib/image-convert/README @@ -0,0 +1,5 @@ +This directory contains scripts to convert (root) filesystem images from one +format to another. While OpenEmbedded has extensive support for generating +images in various formats, sometimes it may be useful/needed to convert +already existing image. + diff --git a/contrib/image-convert/cpio2tar b/contrib/image-convert/cpio2tar new file mode 100755 index 0000000000..7f2c92fe26 --- /dev/null +++ b/contrib/image-convert/cpio2tar @@ -0,0 +1,9 @@ +#!/bin/sh + +STAGING= #~/linux-ppc/build-oe-angstrom/tmp/staging/i686-linux/bin/ + +${STAGING}fakeroot bash -c " \ +rm -rf scratch; mkdir scratch; \ +cd scratch; gzip -d -c ../$1 | cpio -i --make-directories; \ +cd ..; \ +tar -cj -C scratch -f $(basename $1 .cpio.gz).tar.bz2 ." diff --git a/contrib/image-convert/tar2ext2 b/contrib/image-convert/tar2ext2 new file mode 100755 index 0000000000..d5756a4733 --- /dev/null +++ b/contrib/image-convert/tar2ext2 @@ -0,0 +1,25 @@ +#!/bin/sh + +if [ $# -ne 2 ]; then + echo "Usage: $0 <tarball> <ext2 size>" + exit +fi + +ext=`echo $1 | sed -r -e 's/.+\.([^.]+\.[^.]+)/\1/'` +base=$(basename $1 .$ext) +dir=$(dirname $1) + +if [ "$ext" == "tar.bz2" ]; then + uncompress=j +else + uncompress=z +fi + +rm -rf mnt +mkdir -p mnt + +fakeroot bash -c "\ +tar -x$uncompress -f $1 -C mnt; \ +genext2fs -d mnt -b $(($2 * 1024)) $dir/$base.img; \ +rm -rf mnt; \ +" diff --git a/contrib/image-convert/tar2ext2.mount b/contrib/image-convert/tar2ext2.mount new file mode 100755 index 0000000000..7e23098c4d --- /dev/null +++ b/contrib/image-convert/tar2ext2.mount @@ -0,0 +1,25 @@ +#!/bin/sh + +if [ $# -ne 2 ]; then + echo "Usage: $0 <tarball> <ext2 size>" + exit +fi + +ext=`echo $1 | sed -r -e 's/.+\.([^.]+\.[^.]+)/\1/'` +base=$(basename $1 .$ext) +if [ "$ext" == "tar.bz2" ]; then + uncompress=j +else + uncompress=z +fi + +dd if=/dev/zero of=$base.img bs=1M count=$2 +mkfs.ext2 -F -m1 $base.img + +mkdir -p mnt +mount -o loop $base.img mnt + +tar -x$uncompress -f $1 -C mnt + +umount mnt +rm -rf mnt diff --git a/contrib/image-convert/tar2jffs b/contrib/image-convert/tar2jffs new file mode 100755 index 0000000000..7bf158e4a5 --- /dev/null +++ b/contrib/image-convert/tar2jffs @@ -0,0 +1,8 @@ +#!/bin/sh + +STAGING= #~/linux-ppc/build-oe-angstrom/tmp/staging/i686-linux/bin/ + +${STAGING}fakeroot bash -c " \ +rm -rf scratch; mkdir scratch; \ +tar -xj -f $1 -C scratch; \ +${STAGING}mkfs.jffs2 -x lzo --root=scratch --faketime --output=$(dirname $1)/$(basename $1 .tar.bz2).jffs2" diff --git a/packages/images/initramfs-bootmenu-image.bb b/packages/images/initramfs-bootmenu-image.bb index a495363661..237aecb621 100644 --- a/packages/images/initramfs-bootmenu-image.bb +++ b/packages/images/initramfs-bootmenu-image.bb @@ -1,6 +1,6 @@ # Sample initramfs image -IMAGE_INSTALL = "busybox-static initramfs-module-bootmenu" +IMAGE_INSTALL = "busybox-static initramfs-module-bootmenu initramfs-module-check-modules" IMAGE_LINGUAS = "" # Remove any kernel-image that the kernel-module-* packages may have pulled in. diff --git a/packages/initrdscripts/files/90-check-modules.sh b/packages/initrdscripts/files/90-check-modules.sh new file mode 100644 index 0000000000..2423d7f8c5 --- /dev/null +++ b/packages/initrdscripts/files/90-check-modules.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# Check that modules for the current kernel exist, error out otherwise + +uname=`cat /proc/version` +ver=`expr "x$uname" : 'xLinux version \([^ ]\+\) '` + +if [ -n "$BOOT_ROOT" -a ! -d "$BOOT_ROOT/lib/modules/$ver" ]; then + echo -e "\033[1m====================" + echo "ERROR!" + echo "There are no modules for this kernel" + echo "version ($ver) in the root file " + echo "system, which will lead to boot failure or" + echo "broken functionally. If you performed" + echo "a kernel upgrade, make sure that version" + echo "installed in root filesystem matches" + echo "version used in bootloader." + echo -e "====================\033[0m" + echo + + echo "System halted" + while true; do + sleep 10000 + done +fi diff --git a/packages/initrdscripts/initramfs-module-check-modules_1.0.bb b/packages/initrdscripts/initramfs-module-check-modules_1.0.bb new file mode 100644 index 0000000000..6986316a6f --- /dev/null +++ b/packages/initrdscripts/initramfs-module-check-modules_1.0.bb @@ -0,0 +1,12 @@ +SRC_URI = "file://90-check-modules.sh" +PR = "r0" +DESCRIPTION = "An initramfs module for checking that kernel modules exist in rootfs" +RDEPENDS = "initramfs-uniboot" + +do_install() { + install -d ${D}/initrd.d + install -m 0755 ${WORKDIR}/90-check-modules.sh ${D}/initrd.d/ +} + +PACKAGE_ARCH = "all" +FILES_${PN} += " /initrd.d/* " diff --git a/packages/libglade/libglade-2.4.0/.mtn2git_empty b/packages/libglade/files/.mtn2git_empty index e69de29bb2..e69de29bb2 100644 --- a/packages/libglade/libglade-2.4.0/.mtn2git_empty +++ b/packages/libglade/files/.mtn2git_empty diff --git a/packages/libglade/libglade-2.4.0/glade-cruft.patch b/packages/libglade/files/glade-cruft.patch index 0fceccf0c4..0fceccf0c4 100644 --- a/packages/libglade/libglade-2.4.0/glade-cruft.patch +++ b/packages/libglade/files/glade-cruft.patch diff --git a/packages/libglade/libglade-2.0.1/gtk-2.0.m4 b/packages/libglade/files/gtk-2.0.m4 index a0c53ac11f..a0c53ac11f 100644 --- a/packages/libglade/libglade-2.0.1/gtk-2.0.m4 +++ b/packages/libglade/files/gtk-2.0.m4 diff --git a/packages/libglade/libglade-2.5.1/no-deprecation.patch b/packages/libglade/files/no-deprecation.patch index 9ef8f0738e..9ef8f0738e 100644 --- a/packages/libglade/libglade-2.5.1/no-deprecation.patch +++ b/packages/libglade/files/no-deprecation.patch diff --git a/packages/libglade/libglade-2.4.2/no-xml2.patch b/packages/libglade/files/no-xml2.patch index 1c2e215b8d..1c2e215b8d 100644 --- a/packages/libglade/libglade-2.4.2/no-xml2.patch +++ b/packages/libglade/files/no-xml2.patch diff --git a/packages/libglade/libglade-2.0.1/glade-cruft.patch b/packages/libglade/libglade-2.0.1/glade-cruft.patch deleted file mode 100644 index 2edaa729c6..0000000000 --- a/packages/libglade/libglade-2.0.1/glade-cruft.patch +++ /dev/null @@ -1,97 +0,0 @@ ---- configure.in~ 2002-08-29 13:45:44.000000000 +0100 -+++ configure.in 2004-03-15 19:40:58.000000000 +0000 -@@ -84,6 +84,18 @@ - AM_CONDITIONAL(HAVE_PYTHON, $have_python) - AC_SUBST(PYTHON) - -+AC_MSG_CHECKING([for cruft in libgtk]) -+AC_TRY_LINK([ -+#include <gtk/gtk.h> -+#include <stdio.h> -+], [ gtk_tree_get_type (); return 0; ], -+ [ AC_MSG_RESULT(yes) -+ have_cruft=yes ], -+ [ AC_MSG_RESULT(no) -+ AC_DEFINE(DISABLE_CRUFT,,[leave out support for old, broken widgets]) -+ have_cruft=no ]) -+AC_SUBST(DISABLE_CRUFT) -+ - dnl add debugging options ... - changequote(,)dnl - if test "x$GCC" = xyes; then ---- glade/glade-gtk.c~ 2002-07-30 10:10:36.000000000 +0100 -+++ glade/glade-gtk.c 2004-03-15 19:43:46.000000000 +0000 -@@ -211,6 +211,8 @@ - gtk_clist_column_titles_hide (GTK_CLIST (w)); - } - -+#ifndef DISABLE_CRUFT -+ - static void - tree_set_selection_mode (GladeXML *xml, GtkWidget *w, - const char *name, const char *value) -@@ -236,6 +238,8 @@ - gtk_tree_set_view_lines (GTK_TREE (w), BOOL (value)); - } - -+#endif -+ - static void - list_set_selection_mode (GladeXML *xml, GtkWidget *w, - const char *name, const char *value) -@@ -252,6 +256,7 @@ - gtk_check_menu_item_set_show_toggle (GTK_CHECK_MENU_ITEM (w), BOOL (value)); - } - -+#ifndef DISABLE_CRUFT - static void - text_set_text (GladeXML *xml, GtkWidget *w, - const char *name, const char *value) -@@ -260,6 +265,7 @@ - - gtk_editable_insert_text (GTK_EDITABLE (w), value, -1, &pos); - } -+#endif - - static void - radio_menu_item_set_group (GladeXML *xml, GtkWidget *w, -@@ -1011,13 +1017,17 @@ - glade_register_custom_prop (GTK_TYPE_CLIST, "selection_mode", clist_set_selection_mode); - glade_register_custom_prop (GTK_TYPE_CLIST, "shadow_type", clist_set_shadow_type); - glade_register_custom_prop (GTK_TYPE_CLIST, "show_titles", clist_set_show_titles); -+#ifndef DISABLE_CRUFT - glade_register_custom_prop (GTK_TYPE_TREE, "selection_mode", tree_set_selection_mode); - glade_register_custom_prop (GTK_TYPE_TREE, "view_mode", tree_set_view_mode); - glade_register_custom_prop (GTK_TYPE_TREE, "view_line", tree_set_view_line); -+#endif - glade_register_custom_prop (GTK_TYPE_LIST, "selection_mode", list_set_selection_mode); - glade_register_custom_prop (GTK_TYPE_CHECK_MENU_ITEM, "always_show_toggle", - check_menu_item_set_always_show_toggle); -+#ifndef DISABLE_CRUFT - glade_register_custom_prop (GTK_TYPE_TEXT, "text", text_set_text); -+#endif - glade_register_custom_prop (GTK_TYPE_RADIO_MENU_ITEM, "group", - radio_menu_item_set_group); - glade_register_custom_prop (GTK_TYPE_TOOLBAR, "tooltips", toolbar_set_tooltips); -@@ -1155,8 +1165,10 @@ - glade_standard_build_children, NULL); - glade_register_widget (GTK_TYPE_TEAROFF_MENU_ITEM, glade_standard_build_widget, - NULL, NULL); -+#ifndef DISABLE_CRUFT - glade_register_widget (GTK_TYPE_TEXT, glade_standard_build_widget, - NULL, NULL); -+#endif - glade_register_widget (GTK_TYPE_TEXT_VIEW, glade_standard_build_widget, - NULL, NULL); - glade_register_widget (GTK_TYPE_TIPS_QUERY, glade_standard_build_widget, -@@ -1165,8 +1177,10 @@ - glade_standard_build_children, NULL); - glade_register_widget (GTK_TYPE_TOOLBAR, glade_standard_build_widget, - toolbar_build_children, NULL); -+#ifndef DISABLE_CRUFT - glade_register_widget (GTK_TYPE_TREE, glade_standard_build_widget, - NULL, NULL); -+#endif - glade_register_widget (GTK_TYPE_TREE_VIEW, glade_standard_build_widget, - NULL, NULL); - glade_register_widget (GTK_TYPE_VBUTTON_BOX, glade_standard_build_widget, diff --git a/packages/libglade/libglade-2.4.0/no-xml2.patch b/packages/libglade/libglade-2.4.0/no-xml2.patch deleted file mode 100644 index 797599a821..0000000000 --- a/packages/libglade/libglade-2.4.0/no-xml2.patch +++ /dev/null @@ -1,502 +0,0 @@ ---- libglade/libglade-2.0.pc.in 2001-12-12 14:26:54.000000000 +0000 -+++ libglade/libglade-2.0.pc.in 2004-01-12 20:08:06.000000000 +0000 -@@ -11,8 +11,8 @@ - Name: Libglade - Description: a library for dynamically loading GLADE interface files - Version: @VERSION@ --Requires: gtk+-2.0 libxml-2.0 -+Requires: gtk+-2.0 @PKGCFG_REQUIRE_LIBXML2@ - Libs: -L${libdir} -lglade-2.0 - Cflags: -I${includedir}/libglade-2.0 - - ---- libglade/glade/glade-parser.c.orig 2004-02-11 01:26:01.000000000 +0000 -+++ libglade/glade/glade-parser.c 2005-01-01 11:26:37.000000000 +0000 -@@ -34,7 +34,15 @@ - # define dgettext(Domain, String) (String) - #endif - --#include <libxml/parser.h> -+#ifdef USE_GMARKUP_PARSER -+# include <zlib.h> -+#else -+# include <libxml/parser.h> -+#endif -+ -+#ifdef USE_GMARKUP_PARSER -+# define xmlChar gchar -+#endif - - #include "glade-parser.h" - #include "glade-private.h" -@@ -507,7 +515,9 @@ - case PARSER_START: - if (!strcmp(name, "glade-interface")) { - state->state = PARSER_GLADE_INTERFACE; --#if 0 -+ -+#ifndef USE_GMARKUP_PARSER -+ #if 0 - /* check for correct XML namespace */ - for (i = 0; attrs && attrs[i] != NULL; i += 2) { - if (!strcmp(attrs[i], "xmlns") && -@@ -517,7 +527,9 @@ - g_warning("unknown attribute `%s' for <glade-interface>", - attrs[i]); - } -+ #endif - #endif -+ - } else { - g_warning("Expected <glade-interface>. Got <%s>.", name); - state->prev_state = state->state; -@@ -1056,12 +1068,18 @@ - } - } - -+#ifndef USE_GMARKUP_PARSER -+ - static xmlEntityPtr - glade_parser_get_entity(GladeParseState *state, const xmlChar *name) - { - return xmlGetPredefinedEntity(name); - } - -+#endif /* !defined(USE_GMARKUP_PARSER) */ -+ -+#ifndef USE_GMARKUP_PARSER -+ - static void - glade_parser_warning(GladeParseState *state, const char *msg, ...) - { -@@ -1072,6 +1090,10 @@ - va_end(args); - } - -+#endif /* !defined(USE_GMARKUP_PARSER) */ -+ -+#ifndef USE_GMARKUP_PARSER -+ - static void - glade_parser_error(GladeParseState *state, const char *msg, ...) - { -@@ -1082,6 +1104,10 @@ - va_end(args); - } - -+#endif /* !defined(USE_GMARKUP_PARSER) */ -+ -+#ifndef USE_GMARKUP_PARSER -+ - static void - glade_parser_fatal_error(GladeParseState *state, const char *msg, ...) - { -@@ -1092,6 +1118,10 @@ - va_end(args); - } - -+#endif /* !defined(USE_GMARKUP_PARSER) */ -+ -+#ifndef USE_GMARKUP_PARSER -+ - static xmlSAXHandler glade_parser = { - 0, /* internalSubset */ - 0, /* isStandalone */ -@@ -1119,6 +1149,82 @@ - (fatalErrorSAXFunc)glade_parser_fatal_error, /* fatalError */ - }; - -+#else /* USE_GMARKUP_PARSER */ -+ -+static void -+glade_parser_start_element_wrapper(GMarkupParseContext *context, -+ const gchar *name, -+ const gchar **attr_names, -+ const gchar **attr_values, -+ gpointer state, -+ GError **error) -+{ -+ guint i = 0; -+ -+ /* Pack attribute names/values from two separate -+ * arrays (GMarkupParser style) into one single -+ * array (libxml SAXParser style). This is not -+ * very efficient, but we do it to make the -+ * GMarkupParser code as little invasive as -+ * possible. */ -+ -+ while (attr_names[i] != NULL) { -+ ++i; -+ } -+ -+ if (1) -+ { -+ const gchar *attr[(i*2)+1]; -+ guint j, k; -+ -+ for (j=0, k=0; k < i; j += 2) -+ { -+ attr[j] = attr_names[k]; -+ attr[j+1] = attr_values[k]; -+ ++k; -+ } -+ attr[i*2] = NULL; -+ -+ glade_parser_start_element((GladeParseState*)state, name, attr); -+ } -+} -+ -+static void -+glade_parser_end_element_wrapper(GMarkupParseContext *context, -+ const gchar *name, -+ gpointer state, -+ GError **err) -+{ -+ glade_parser_end_element((GladeParseState*)state, name); -+} -+ -+static void -+glade_parser_characters_wrapper(GMarkupParseContext *context, -+ const gchar *chars, -+ gsize len, -+ gpointer state, -+ GError **err) -+{ -+ glade_parser_characters((GladeParseState*)state, chars, (int) len); -+} -+ -+static void -+glade_parser_error(GMarkupParseContext *context, GError *err, gpointer data) -+{ -+ g_log("Glade-Parser", G_LOG_LEVEL_CRITICAL, "%s", err->message); -+} -+ -+static const GMarkupParser glade_parser = { -+ glade_parser_start_element_wrapper, /* element open */ -+ glade_parser_end_element_wrapper, /* element close */ -+ glade_parser_characters_wrapper, /* text content */ -+ NULL, /* passthrough */ -+ glade_parser_error, /* parse error */ -+}; -+ -+#endif /* USE_GMARKUP_PARSER */ -+ -+ - static void - widget_info_free(GladeWidgetInfo *info) - { -@@ -1182,6 +1288,9 @@ - * - * Returns: the GladeInterface structure for the XML file. - */ -+ -+#ifndef USE_GMARKUP_PARSER -+ - GladeInterface * - glade_parser_parse_file(const gchar *file, const gchar *domain) - { -@@ -1213,6 +1322,31 @@ - return state.interface; - } - -+#else /* defined(USE_GMARKUP_PARSER) */ -+ -+GladeInterface * -+glade_parser_parse_file(const gchar *file, const gchar *domain) -+{ -+ GladeInterface *interface; -+ GError *err = NULL; -+ gchar *content = NULL; -+ gsize clen; -+ -+ if (!g_file_get_contents(file, &content, &clen, &err)) { -+ g_warning("could not load glade file: %s", err->message); -+ g_error_free(err); -+ return NULL; -+ } -+ -+ interface = glade_parser_parse_buffer(content, (gint) clen, domain); -+ -+ g_free(content); -+ -+ return interface; -+} -+ -+#endif /* USE_GMARKUP_PARSER */ -+ - /** - * glade_parser_parse_buffer - * @buffer: a buffer in memory containing XML data. -@@ -1228,6 +1362,9 @@ - * - * Returns: the GladeInterface structure for the XML buffer. - */ -+ -+#ifndef USE_GMARKUP_PARSER -+ - GladeInterface * - glade_parser_parse_buffer(const gchar *buffer, gint len, const gchar *domain) - { -@@ -1254,6 +1391,161 @@ - return state.interface; - } - -+#else /* defined(USE_GMARKUP_PARSER) */ -+ -+ -+static GladeInterface * -+glade_parser_parse_buffer_internal(const gchar *buffer, gint len, const gchar *domain) -+{ -+ GMarkupParseContext *context; -+ GladeParseState state = { 0 }; -+ GError *err = NULL; -+ -+ state.interface = NULL; -+ if (domain) -+ state.domain = domain; -+ else -+ state.domain = textdomain(NULL); -+ -+ /* FIXME: This strstr() is not safe, as it ignores the len -+ * argument and assumes the buffer is NUL-terminated */ -+ if (strstr(buffer, "<?xml") == NULL) { -+ g_warning("No XML header found in document!"); -+ return NULL; -+ } -+ -+ context = g_markup_parse_context_new(&glade_parser, (GMarkupParseFlags) 0, &state, NULL); -+ -+ glade_parser_start_document(&state); -+ -+ if (!g_markup_parse_context_parse(context, buffer, (gssize) len, &err)) { -+ g_warning("document not well formed: %s", err->message); -+ g_error_free(err); -+ if (state.interface) -+ glade_interface_destroy (state.interface); -+ return NULL; -+ } -+ -+ glade_parser_end_document(&state); -+ -+ if (state.state != PARSER_FINISH) { -+ g_warning("did not finish in PARSER_FINISH state!"); -+ -+ if (state.interface) -+ glade_interface_destroy(state.interface); -+ -+ return NULL; -+ } -+ -+ return state.interface; -+} -+ -+struct _gzip_rfc1952_hdr -+{ -+ guint8 id1, id2, cm, flags; -+ guint32 mtime; -+ guint8 xflags; -+ guint8 os; -+}; -+ -+static GladeInterface * -+glade_parser_parse_gzipped_buffer(const gchar *buffer, gint len, const gchar *domain) -+{ -+ struct _gzip_rfc1952_hdr *hdr = (struct _gzip_rfc1952_hdr*)buffer; -+ struct z_stream_s zstream; -+ GladeInterface *interface; -+ const guint8 *cbuf; /* start of compressed data */ -+ guint8 *decompress_buf; -+ gulong decompress_len = 0; -+ gint ret; -+ -+ g_assert(hdr != NULL && hdr->id1 == 0x1f && hdr->id2 == 0x8b); -+ -+ if (hdr->cm != Z_DEFLATED) { -+ g_warning("Unknown decompression method %u", (guint) hdr->cm); -+ return NULL; -+ } -+ -+ /* Uncompressed size (modulo 2^32) is last -+ * 4 bytes of gzipped file, and little endian. -+ * See RFC 1952 */ -+ decompress_len = GUINT32_FROM_LE(*((guint32*)(((guint8*)buffer) + len - 4))); -+ -+ /* paranoid mode: glade files > 5MB are unlikely */ -+ g_return_val_if_fail(decompress_len < 5*1024*1024, NULL); -+ -+ decompress_buf = g_malloc0(decompress_len + 1); /* +1 for NUL-terminator */ -+ -+ /* find start of compressed data, skipping header stuff */ -+ cbuf = (guint8*)buffer + 10; -+ if (hdr->flags & 0x04) { -+ guint16 xlen = GUINT16_FROM_LE(*((guint16*)cbuf)); -+ cbuf += xlen + 2; -+ } -+ if (hdr->flags & 0x08) { -+ guint16 onamelen = strlen(cbuf); -+ cbuf += onamelen + 1; -+ } -+ if (hdr->flags & 0x10) { -+ guint16 commentlen = strlen(cbuf); -+ cbuf += commentlen + 1; -+ } -+ if (hdr->flags & 0x02) -+ { -+ cbuf += 2; /* skip header CRC16 */ -+ } -+ -+ zstream.next_in = (void*)cbuf; -+ zstream.avail_in = (uLongf) len - ((void*)cbuf-(void*)buffer) - 4 - 4 +1; -+ zstream.next_out = decompress_buf; -+ zstream.avail_out= decompress_len; -+ zstream.zalloc = Z_NULL; -+ zstream.zfree = Z_NULL; -+ zstream.opaque = Z_NULL; -+ -+ ret = inflateInit2(&zstream, -MAX_WBITS); -+ -+ if (ret != Z_OK) { -+ g_warning("inflateInit2() failed. zlib error code: %d", ret); -+ g_free(decompress_buf); -+ return NULL; -+ } -+ -+ ret = inflate(&zstream, Z_FINISH); -+ -+ if (ret != Z_STREAM_END) { -+ g_warning("zlib decompression failed. zlib error code: %d", ret); -+ g_free(decompress_buf); -+ return NULL; -+ } -+ -+ interface = glade_parser_parse_buffer_internal(decompress_buf, decompress_len, domain); -+ -+ g_free(decompress_buf); -+ -+ return interface; -+} -+ -+GladeInterface * -+glade_parser_parse_buffer(const gchar *buffer, gint len, const gchar *domain) -+{ -+ g_return_val_if_fail(buffer != NULL, NULL); -+ g_return_val_if_fail(len > 0, NULL); -+ -+ /* Check if buffer is gzipped */ -+ if (buffer[0] == 0x1f && buffer[1] == (gchar)0x8b) { -+ return glade_parser_parse_gzipped_buffer(buffer, len, domain); -+ } -+ -+ /* Buffer is cleartext. */ -+ return glade_parser_parse_buffer_internal(buffer, len, domain); -+} -+ -+#endif /* USE_GMARKUP_PARSER */ -+ -+ -+#ifndef USE_GMARKUP_PARSER -+ - static void - dump_widget(xmlNode *parent, GladeWidgetInfo *info, gint indent) - { -@@ -1373,6 +1665,8 @@ - xmlNodeAddContent(widget, " "); - } - -+#endif /* !defined(USE_GMARKUP_PARSER) */ -+ - /** - * glade_interface_dump - * @interface: the GladeInterface -@@ -1381,6 +1675,9 @@ - * This function dumps the contents of a GladeInterface into a file as - * XML. It is intended mainly as a debugging tool. - */ -+ -+#ifndef USE_GMARKUP_PARSER -+ - void - glade_interface_dump(GladeInterface *interface, const gchar *filename) - { -@@ -1419,6 +1716,17 @@ - xmlFreeDoc(doc); - } - -+#else /* defined(USE_GMARKUP_PARSER) */ -+ -+void -+glade_interface_dump(GladeInterface *interface, const gchar *filename) -+{ -+ g_warning("glade_interface_dump() is only available with libxml2."); -+} -+ -+#endif /* USE_GMARKUP_PARSER */ -+ -+ - #if 0 - int - main(int argc, char **argv) { - - ---- libglade-2.4.0/configure.in.orig 2005-01-01 12:23:37.000000000 +0000 -+++ libglade-2.4.0/configure.in 2005-01-01 12:35:31.000000000 +0000 -@@ -48,13 +48,36 @@ - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - - PKG_CHECK_MODULES(LIBGLADE, [dnl -- libxml-2.0 >= required_libxml_version dnl - atk >= required_atk_version dnl - gtk+-2.0 >= required_gtk_version dnl - glib-2.0 >= required_glib_version]) - AC_SUBST(LIBGLADE_LIBS) - AC_SUBST(LIBGLADE_CFLAGS) - -+ -+disable_xml2=no -+AC_ARG_WITH([libxml2], -+ AC_HELP_STRING([--without-libxml2], [Don't use libxml2, use Glib's GMarkupParser instead]), -+ [disable_xml2=yes], -+ [disable_xml2=no]) -+ -+AC_MSG_CHECKING([if we are using libxml2]) -+if test "x$disable_xml2" == "xno"; then -+ AC_MSG_RESULT(yes) -+ PKG_CHECK_MODULES(XML2, libxml-2.0 >= 2.4.10) -+ PKGCFG_REQUIRE_LIBXML2="libxml-2.0" -+ LIBGLADE_CFLAGS="$LIBGLADE_CFLAGS $XML2_CFLAGS" -+ LIBGLADE_LIBS="$LIBGLADE_LIBS $XML2_LIBS" -+else -+ LIBGLADE_CFLAGS="$LIBGLADE_CFLAGS -DUSE_GMARKUP_PARSER" -+ PKGCFG_REQUIRE_LIBXML2="" -+ AC_MSG_RESULT(no) -+fi -+ -+AC_SUBST(XML2_LIBS) -+AC_SUBST(XML2_CFLAGS) -+AC_SUBST(PKGCFG_REQUIRE_LIBXML2) -+ - AC_MSG_CHECKING([for native Win32]) - case "$host" in - *-*-mingw*) -@@ -114,6 +137,21 @@ - fi - fi - -+if test "x$disable_xml2" == "xyes"; then -+ echo "*****************************************************" -+ echo " You chose to disable libxml2 and use Glib's" -+ echo " GMarkupParser instead." -+ echo -+ echo " Please bear in mind that using libglade with" -+ echo " GMarkupParser is an experimental feature only." -+ echo -+ echo " Please post problems or success stories to" -+ echo " the glade-devel mailing list. Thank you." -+ echo "*****************************************************" -+fi -+ -+ -+ - GTK_DOC_CHECK(1.0) - - dnl gettext stuff ... there is no message catalog for libglade -- libglade diff --git a/packages/libglade/libglade-2.4.2/.mtn2git_empty b/packages/libglade/libglade-2.4.2/.mtn2git_empty deleted file mode 100644 index e69de29bb2..0000000000 --- a/packages/libglade/libglade-2.4.2/.mtn2git_empty +++ /dev/null diff --git a/packages/libglade/libglade-2.4.2/glade-cruft.patch b/packages/libglade/libglade-2.4.2/glade-cruft.patch deleted file mode 100644 index 0fceccf0c4..0000000000 --- a/packages/libglade/libglade-2.4.2/glade-cruft.patch +++ /dev/null @@ -1,100 +0,0 @@ -diff -ur libglade-2.4.0~/configure.in libglade-2.4.0/configure.in ---- libglade-2.4.0~/configure.in 2004-05-17 12:38:31.000000000 +0100 -+++ libglade-2.4.0/configure.in 2004-07-28 16:53:09.000000000 +0100 -@@ -147,6 +147,18 @@ - AM_CONDITIONAL(HAVE_PYTHON, $have_python) - AC_SUBST(PYTHON) - -+AC_MSG_CHECKING([for cruft in libgtk]) -+AC_TRY_LINK([ -+#include <gtk/gtk.h> -+#include <stdio.h> -+], [ gtk_tree_get_type (); return 0; ], -+ [ AC_MSG_RESULT(yes) -+ have_cruft=yes ], -+ [ AC_MSG_RESULT(no) -+ AC_DEFINE(DISABLE_CRUFT,,[leave out support for old, broken widgets]) -+ have_cruft=no ]) -+AC_SUBST(DISABLE_CRUFT) -+ - dnl add debugging options ... - changequote(,)dnl - if test "x$GCC" = xyes; then -Only in libglade-2.4.0: configure.in.orig -diff -ur libglade-2.4.0~/glade/glade-gtk.c libglade-2.4.0/glade/glade-gtk.c ---- libglade-2.4.0~/glade/glade-gtk.c 2004-03-13 13:47:35.000000000 +0000 -+++ libglade-2.4.0/glade/glade-gtk.c 2004-07-28 16:53:52.000000000 +0100 -@@ -213,6 +213,8 @@ - gtk_clist_column_titles_hide (GTK_CLIST (w)); - } - -+#ifndef DISABLE_CRUFT -+ - static void - tree_set_selection_mode (GladeXML *xml, GtkWidget *w, - const char *name, const char *value) -@@ -238,6 +240,8 @@ - gtk_tree_set_view_lines (GTK_TREE (w), BOOL (value)); - } - -+#endif -+ - static void - list_set_selection_mode (GladeXML *xml, GtkWidget *w, - const char *name, const char *value) -@@ -254,6 +258,7 @@ - gtk_check_menu_item_set_show_toggle (GTK_CHECK_MENU_ITEM (w), BOOL (value)); - } - -+#ifndef DISABLE_CRUFT - static void - text_set_text (GladeXML *xml, GtkWidget *w, - const char *name, const char *value) -@@ -262,6 +267,7 @@ - - gtk_editable_insert_text (GTK_EDITABLE (w), value, -1, &pos); - } -+#endif - - static void - radio_menu_item_set_group (GladeXML *xml, GtkWidget *w, -@@ -1125,13 +1131,17 @@ - glade_register_custom_prop (GTK_TYPE_CLIST, "selection_mode", clist_set_selection_mode); - glade_register_custom_prop (GTK_TYPE_CLIST, "shadow_type", clist_set_shadow_type); - glade_register_custom_prop (GTK_TYPE_CLIST, "show_titles", clist_set_show_titles); -+#ifndef DISABLE_CRUFT - glade_register_custom_prop (GTK_TYPE_TREE, "selection_mode", tree_set_selection_mode); - glade_register_custom_prop (GTK_TYPE_TREE, "view_mode", tree_set_view_mode); - glade_register_custom_prop (GTK_TYPE_TREE, "view_line", tree_set_view_line); -+#endif - glade_register_custom_prop (GTK_TYPE_LIST, "selection_mode", list_set_selection_mode); - glade_register_custom_prop (GTK_TYPE_CHECK_MENU_ITEM, "always_show_toggle", - check_menu_item_set_always_show_toggle); -+#ifndef DISABLE_CRUFT - glade_register_custom_prop (GTK_TYPE_TEXT, "text", text_set_text); -+#endif - glade_register_custom_prop (GTK_TYPE_RADIO_MENU_ITEM, "group", - radio_menu_item_set_group); - glade_register_custom_prop (GTK_TYPE_TOOLBAR, "tooltips", toolbar_set_tooltips); -@@ -1288,8 +1298,10 @@ - glade_standard_build_children, NULL); - glade_register_widget (GTK_TYPE_TEAROFF_MENU_ITEM, glade_standard_build_widget, - NULL, NULL); -+#ifndef DISABLE_CRUFT - glade_register_widget (GTK_TYPE_TEXT, glade_standard_build_widget, - NULL, NULL); -+#endif - glade_register_widget (GTK_TYPE_TEXT_VIEW, glade_standard_build_widget, - NULL, NULL); - glade_register_widget (GTK_TYPE_TIPS_QUERY, glade_standard_build_widget, -@@ -1304,8 +1316,10 @@ - glade_standard_build_children, NULL); - glade_register_widget (GTK_TYPE_TOOL_BUTTON, glade_standard_build_widget, - NULL, NULL); -+#ifndef DISABLE_CRUFT - glade_register_widget (GTK_TYPE_TREE, glade_standard_build_widget, - NULL, NULL); -+#endif - glade_register_widget (GTK_TYPE_TREE_VIEW, glade_standard_build_widget, - NULL, NULL); - glade_register_widget (GTK_TYPE_VBUTTON_BOX, glade_standard_build_widget, diff --git a/packages/libglade/libglade-2.5.1/.mtn2git_empty b/packages/libglade/libglade-2.5.1/.mtn2git_empty deleted file mode 100644 index e69de29bb2..0000000000 --- a/packages/libglade/libglade-2.5.1/.mtn2git_empty +++ /dev/null diff --git a/packages/libglade/libglade-2.5.1/glade-cruft.patch b/packages/libglade/libglade-2.5.1/glade-cruft.patch deleted file mode 100644 index 0fceccf0c4..0000000000 --- a/packages/libglade/libglade-2.5.1/glade-cruft.patch +++ /dev/null @@ -1,100 +0,0 @@ -diff -ur libglade-2.4.0~/configure.in libglade-2.4.0/configure.in ---- libglade-2.4.0~/configure.in 2004-05-17 12:38:31.000000000 +0100 -+++ libglade-2.4.0/configure.in 2004-07-28 16:53:09.000000000 +0100 -@@ -147,6 +147,18 @@ - AM_CONDITIONAL(HAVE_PYTHON, $have_python) - AC_SUBST(PYTHON) - -+AC_MSG_CHECKING([for cruft in libgtk]) -+AC_TRY_LINK([ -+#include <gtk/gtk.h> -+#include <stdio.h> -+], [ gtk_tree_get_type (); return 0; ], -+ [ AC_MSG_RESULT(yes) -+ have_cruft=yes ], -+ [ AC_MSG_RESULT(no) -+ AC_DEFINE(DISABLE_CRUFT,,[leave out support for old, broken widgets]) -+ have_cruft=no ]) -+AC_SUBST(DISABLE_CRUFT) -+ - dnl add debugging options ... - changequote(,)dnl - if test "x$GCC" = xyes; then -Only in libglade-2.4.0: configure.in.orig -diff -ur libglade-2.4.0~/glade/glade-gtk.c libglade-2.4.0/glade/glade-gtk.c ---- libglade-2.4.0~/glade/glade-gtk.c 2004-03-13 13:47:35.000000000 +0000 -+++ libglade-2.4.0/glade/glade-gtk.c 2004-07-28 16:53:52.000000000 +0100 -@@ -213,6 +213,8 @@ - gtk_clist_column_titles_hide (GTK_CLIST (w)); - } - -+#ifndef DISABLE_CRUFT -+ - static void - tree_set_selection_mode (GladeXML *xml, GtkWidget *w, - const char *name, const char *value) -@@ -238,6 +240,8 @@ - gtk_tree_set_view_lines (GTK_TREE (w), BOOL (value)); - } - -+#endif -+ - static void - list_set_selection_mode (GladeXML *xml, GtkWidget *w, - const char *name, const char *value) -@@ -254,6 +258,7 @@ - gtk_check_menu_item_set_show_toggle (GTK_CHECK_MENU_ITEM (w), BOOL (value)); - } - -+#ifndef DISABLE_CRUFT - static void - text_set_text (GladeXML *xml, GtkWidget *w, - const char *name, const char *value) -@@ -262,6 +267,7 @@ - - gtk_editable_insert_text (GTK_EDITABLE (w), value, -1, &pos); - } -+#endif - - static void - radio_menu_item_set_group (GladeXML *xml, GtkWidget *w, -@@ -1125,13 +1131,17 @@ - glade_register_custom_prop (GTK_TYPE_CLIST, "selection_mode", clist_set_selection_mode); - glade_register_custom_prop (GTK_TYPE_CLIST, "shadow_type", clist_set_shadow_type); - glade_register_custom_prop (GTK_TYPE_CLIST, "show_titles", clist_set_show_titles); -+#ifndef DISABLE_CRUFT - glade_register_custom_prop (GTK_TYPE_TREE, "selection_mode", tree_set_selection_mode); - glade_register_custom_prop (GTK_TYPE_TREE, "view_mode", tree_set_view_mode); - glade_register_custom_prop (GTK_TYPE_TREE, "view_line", tree_set_view_line); -+#endif - glade_register_custom_prop (GTK_TYPE_LIST, "selection_mode", list_set_selection_mode); - glade_register_custom_prop (GTK_TYPE_CHECK_MENU_ITEM, "always_show_toggle", - check_menu_item_set_always_show_toggle); -+#ifndef DISABLE_CRUFT - glade_register_custom_prop (GTK_TYPE_TEXT, "text", text_set_text); -+#endif - glade_register_custom_prop (GTK_TYPE_RADIO_MENU_ITEM, "group", - radio_menu_item_set_group); - glade_register_custom_prop (GTK_TYPE_TOOLBAR, "tooltips", toolbar_set_tooltips); -@@ -1288,8 +1298,10 @@ - glade_standard_build_children, NULL); - glade_register_widget (GTK_TYPE_TEAROFF_MENU_ITEM, glade_standard_build_widget, - NULL, NULL); -+#ifndef DISABLE_CRUFT - glade_register_widget (GTK_TYPE_TEXT, glade_standard_build_widget, - NULL, NULL); -+#endif - glade_register_widget (GTK_TYPE_TEXT_VIEW, glade_standard_build_widget, - NULL, NULL); - glade_register_widget (GTK_TYPE_TIPS_QUERY, glade_standard_build_widget, -@@ -1304,8 +1316,10 @@ - glade_standard_build_children, NULL); - glade_register_widget (GTK_TYPE_TOOL_BUTTON, glade_standard_build_widget, - NULL, NULL); -+#ifndef DISABLE_CRUFT - glade_register_widget (GTK_TYPE_TREE, glade_standard_build_widget, - NULL, NULL); -+#endif - glade_register_widget (GTK_TYPE_TREE_VIEW, glade_standard_build_widget, - NULL, NULL); - glade_register_widget (GTK_TYPE_VBUTTON_BOX, glade_standard_build_widget, diff --git a/packages/libglade/libglade-2.5.1/no-xml2.patch b/packages/libglade/libglade-2.5.1/no-xml2.patch deleted file mode 100644 index 1c2e215b8d..0000000000 --- a/packages/libglade/libglade-2.5.1/no-xml2.patch +++ /dev/null @@ -1,499 +0,0 @@ -diff -urN libglade-2.4.2.orig/configure.in libglade-2.4.2/configure.in ---- libglade-2.4.2.orig/configure.in 2005-02-11 12:42:58.000000000 +0100 -+++ libglade-2.4.2/configure.in 2005-03-22 01:22:00.000000000 +0100 -@@ -52,11 +52,33 @@ - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - - PKG_CHECK_MODULES(LIBGLADE, [dnl -- libxml-2.0 >= required_libxml_version dnl - atk >= required_atk_version dnl - gtk+-2.0 >= required_gtk_version dnl - glib-2.0 >= required_glib_version]) - -+disable_xml2=no -+AC_ARG_WITH([libxml2], -+ AC_HELP_STRING([--without-libxml2], [Don't use libxml2, use Glib's GMarkupParser instead]), -+ [disable_xml2=yes], -+ [disable_xml2=no]) -+ -+AC_MSG_CHECKING([if we are using libxml2]) -+if test "x$disable_xml2" == "xno"; then -+ AC_MSG_RESULT(yes) -+ PKG_CHECK_MODULES(XML2, libxml-2.0 >= 2.4.10) -+ PKGCFG_REQUIRE_LIBXML2="libxml-2.0" -+ LIBGLADE_CFLAGS="$LIBGLADE_CFLAGS $XML2_CFLAGS" -+ LIBGLADE_LIBS="$LIBGLADE_LIBS $XML2_LIBS" -+else -+ LIBGLADE_CFLAGS="$LIBGLADE_CFLAGS -DUSE_GMARKUP_PARSER" -+ PKGCFG_REQUIRE_LIBXML2="" -+ AC_MSG_RESULT(no) -+fi -+ -+AC_SUBST(XML2_LIBS) -+AC_SUBST(XML2_CFLAGS) -+AC_SUBST(PKGCFG_REQUIRE_LIBXML2) -+ - AC_MSG_CHECKING([for native Win32]) - case "$host" in - *-*-mingw*) -@@ -116,6 +138,21 @@ - fi - fi - -+if test "x$disable_xml2" == "xyes"; then -+ echo "*****************************************************" -+ echo " You chose to disable libxml2 and use Glib's" -+ echo " GMarkupParser instead." -+ echo -+ echo " Please bear in mind that using libglade with" -+ echo " GMarkupParser is an experimental feature only." -+ echo -+ echo " Please post problems or success stories to" -+ echo " the glade-devel mailing list. Thank you." -+ echo "*****************************************************" -+fi -+ -+ -+ - GTK_DOC_CHECK(1.0) - - dnl gettext stuff ... there is no message catalog for libglade -- libglade -diff -urN libglade-2.4.2.orig/glade/glade-parser.c libglade-2.4.2/glade/glade-parser.c ---- libglade-2.4.2.orig/glade/glade-parser.c 2004-11-11 11:56:13.000000000 +0100 -+++ libglade-2.4.2/glade/glade-parser.c 2005-03-22 01:20:00.000000000 +0100 -@@ -34,7 +34,15 @@ - # define dgettext(Domain, String) (String) - #endif - --#include <libxml/parser.h> -+#ifdef USE_GMARKUP_PARSER -+# include <zlib.h> -+#else -+# include <libxml/parser.h> -+#endif -+ -+#ifdef USE_GMARKUP_PARSER -+# define xmlChar gchar -+#endif - - #include "glade-parser.h" - #include "glade-private.h" -@@ -508,7 +516,9 @@ - case PARSER_START: - if (!strcmp(name, "glade-interface")) { - state->state = PARSER_GLADE_INTERFACE; --#if 0 -+ -+#ifndef USE_GMARKUP_PARSER -+ #if 0 - /* check for correct XML namespace */ - for (i = 0; attrs && attrs[i] != NULL; i += 2) { - if (!strcmp(attrs[i], "xmlns") && -@@ -518,7 +528,9 @@ - g_warning("unknown attribute `%s' for <glade-interface>", - attrs[i]); - } -+ #endif - #endif -+ - } else { - g_warning("Expected <glade-interface>. Got <%s>.", name); - state->prev_state = state->state; -@@ -1063,12 +1075,18 @@ - } - } - -+#ifndef USE_GMARKUP_PARSER -+ - static xmlEntityPtr - glade_parser_get_entity(GladeParseState *state, const xmlChar *name) - { - return xmlGetPredefinedEntity(name); - } - -+#endif /* !defined(USE_GMARKUP_PARSER) */ -+ -+#ifndef USE_GMARKUP_PARSER -+ - static void - glade_parser_warning(GladeParseState *state, const char *msg, ...) - { -@@ -1079,6 +1097,10 @@ - va_end(args); - } - -+#endif /* !defined(USE_GMARKUP_PARSER) */ -+ -+#ifndef USE_GMARKUP_PARSER -+ - static void - glade_parser_error(GladeParseState *state, const char *msg, ...) - { -@@ -1089,6 +1111,10 @@ - va_end(args); - } - -+#endif /* !defined(USE_GMARKUP_PARSER) */ -+ -+#ifndef USE_GMARKUP_PARSER -+ - static void - glade_parser_fatal_error(GladeParseState *state, const char *msg, ...) - { -@@ -1099,6 +1125,10 @@ - va_end(args); - } - -+#endif /* !defined(USE_GMARKUP_PARSER) */ -+ -+#ifndef USE_GMARKUP_PARSER -+ - static xmlSAXHandler glade_parser = { - (internalSubsetSAXFunc)NULL, /* internalSubset */ - (isStandaloneSAXFunc)NULL, /* isStandalone */ -@@ -1126,6 +1156,82 @@ - (fatalErrorSAXFunc)glade_parser_fatal_error, /* fatalError */ - }; - -+#else /* USE_GMARKUP_PARSER */ -+ -+static void -+glade_parser_start_element_wrapper(GMarkupParseContext *context, -+ const gchar *name, -+ const gchar **attr_names, -+ const gchar **attr_values, -+ gpointer state, -+ GError **error) -+{ -+ guint i = 0; -+ -+ /* Pack attribute names/values from two separate -+ * arrays (GMarkupParser style) into one single -+ * array (libxml SAXParser style). This is not -+ * very efficient, but we do it to make the -+ * GMarkupParser code as little invasive as -+ * possible. */ -+ -+ while (attr_names[i] != NULL) { -+ ++i; -+ } -+ -+ if (1) -+ { -+ const gchar *attr[(i*2)+1]; -+ guint j, k; -+ -+ for (j=0, k=0; k < i; j += 2) -+ { -+ attr[j] = attr_names[k]; -+ attr[j+1] = attr_values[k]; -+ ++k; -+ } -+ attr[i*2] = NULL; -+ -+ glade_parser_start_element((GladeParseState*)state, name, attr); -+ } -+} -+ -+static void -+glade_parser_end_element_wrapper(GMarkupParseContext *context, -+ const gchar *name, -+ gpointer state, -+ GError **err) -+{ -+ glade_parser_end_element((GladeParseState*)state, name); -+} -+ -+static void -+glade_parser_characters_wrapper(GMarkupParseContext *context, -+ const gchar *chars, -+ gsize len, -+ gpointer state, -+ GError **err) -+{ -+ glade_parser_characters((GladeParseState*)state, chars, (int) len); -+} -+ -+static void -+glade_parser_error(GMarkupParseContext *context, GError *err, gpointer data) -+{ -+ g_log("Glade-Parser", G_LOG_LEVEL_CRITICAL, "%s", err->message); -+} -+ -+static const GMarkupParser glade_parser = { -+ glade_parser_start_element_wrapper, /* element open */ -+ glade_parser_end_element_wrapper, /* element close */ -+ glade_parser_characters_wrapper, /* text content */ -+ NULL, /* passthrough */ -+ glade_parser_error, /* parse error */ -+}; -+ -+#endif /* USE_GMARKUP_PARSER */ -+ -+ - static void - widget_info_free(GladeWidgetInfo *info) - { -@@ -1191,6 +1297,9 @@ - * - * Returns: the GladeInterface structure for the XML file. - */ -+ -+#ifndef USE_GMARKUP_PARSER -+ - GladeInterface * - glade_parser_parse_file(const gchar *file, const gchar *domain) - { -@@ -1222,6 +1331,31 @@ - return state.interface; - } - -+#else /* defined(USE_GMARKUP_PARSER) */ -+ -+GladeInterface * -+glade_parser_parse_file(const gchar *file, const gchar *domain) -+{ -+ GladeInterface *interface; -+ GError *err = NULL; -+ gchar *content = NULL; -+ gsize clen; -+ -+ if (!g_file_get_contents(file, &content, &clen, &err)) { -+ g_warning("could not load glade file: %s", err->message); -+ g_error_free(err); -+ return NULL; -+ } -+ -+ interface = glade_parser_parse_buffer(content, (gint) clen, domain); -+ -+ g_free(content); -+ -+ return interface; -+} -+ -+#endif /* USE_GMARKUP_PARSER */ -+ - /** - * glade_parser_parse_buffer - * @buffer: a buffer in memory containing XML data. -@@ -1237,6 +1371,9 @@ - * - * Returns: the GladeInterface structure for the XML buffer. - */ -+ -+#ifndef USE_GMARKUP_PARSER -+ - GladeInterface * - glade_parser_parse_buffer(const gchar *buffer, gint len, const gchar *domain) - { -@@ -1263,6 +1400,161 @@ - return state.interface; - } - -+#else /* defined(USE_GMARKUP_PARSER) */ -+ -+ -+static GladeInterface * -+glade_parser_parse_buffer_internal(const gchar *buffer, gint len, const gchar *domain) -+{ -+ GMarkupParseContext *context; -+ GladeParseState state = { 0 }; -+ GError *err = NULL; -+ -+ state.interface = NULL; -+ if (domain) -+ state.domain = domain; -+ else -+ state.domain = textdomain(NULL); -+ -+ /* FIXME: This strstr() is not safe, as it ignores the len -+ * argument and assumes the buffer is NUL-terminated */ -+ if (strstr(buffer, "<?xml") == NULL) { -+ g_warning("No XML header found in document!"); -+ return NULL; -+ } -+ -+ context = g_markup_parse_context_new(&glade_parser, (GMarkupParseFlags) 0, &state, NULL); -+ -+ glade_parser_start_document(&state); -+ -+ if (!g_markup_parse_context_parse(context, buffer, (gssize) len, &err)) { -+ g_warning("document not well formed: %s", err->message); -+ g_error_free(err); -+ if (state.interface) -+ glade_interface_destroy (state.interface); -+ return NULL; -+ } -+ -+ glade_parser_end_document(&state); -+ -+ if (state.state != PARSER_FINISH) { -+ g_warning("did not finish in PARSER_FINISH state!"); -+ -+ if (state.interface) -+ glade_interface_destroy(state.interface); -+ -+ return NULL; -+ } -+ -+ return state.interface; -+} -+ -+struct _gzip_rfc1952_hdr -+{ -+ guint8 id1, id2, cm, flags; -+ guint32 mtime; -+ guint8 xflags; -+ guint8 os; -+}; -+ -+static GladeInterface * -+glade_parser_parse_gzipped_buffer(const gchar *buffer, gint len, const gchar *domain) -+{ -+ struct _gzip_rfc1952_hdr *hdr = (struct _gzip_rfc1952_hdr*)buffer; -+ struct z_stream_s zstream; -+ GladeInterface *interface; -+ const guint8 *cbuf; /* start of compressed data */ -+ guint8 *decompress_buf; -+ gulong decompress_len = 0; -+ gint ret; -+ -+ g_assert(hdr != NULL && hdr->id1 == 0x1f && hdr->id2 == 0x8b); -+ -+ if (hdr->cm != Z_DEFLATED) { -+ g_warning("Unknown decompression method %u", (guint) hdr->cm); -+ return NULL; -+ } -+ -+ /* Uncompressed size (modulo 2^32) is last -+ * 4 bytes of gzipped file, and little endian. -+ * See RFC 1952 */ -+ decompress_len = GUINT32_FROM_LE(*((guint32*)(((guint8*)buffer) + len - 4))); -+ -+ /* paranoid mode: glade files > 5MB are unlikely */ -+ g_return_val_if_fail(decompress_len < 5*1024*1024, NULL); -+ -+ decompress_buf = g_malloc0(decompress_len + 1); /* +1 for NUL-terminator */ -+ -+ /* find start of compressed data, skipping header stuff */ -+ cbuf = (guint8*)buffer + 10; -+ if (hdr->flags & 0x04) { -+ guint16 xlen = GUINT16_FROM_LE(*((guint16*)cbuf)); -+ cbuf += xlen + 2; -+ } -+ if (hdr->flags & 0x08) { -+ guint16 onamelen = strlen(cbuf); -+ cbuf += onamelen + 1; -+ } -+ if (hdr->flags & 0x10) { -+ guint16 commentlen = strlen(cbuf); -+ cbuf += commentlen + 1; -+ } -+ if (hdr->flags & 0x02) -+ { -+ cbuf += 2; /* skip header CRC16 */ -+ } -+ -+ zstream.next_in = (void*)cbuf; -+ zstream.avail_in = (uLongf) len - ((void*)cbuf-(void*)buffer) - 4 - 4 +1; -+ zstream.next_out = decompress_buf; -+ zstream.avail_out= decompress_len; -+ zstream.zalloc = Z_NULL; -+ zstream.zfree = Z_NULL; -+ zstream.opaque = Z_NULL; -+ -+ ret = inflateInit2(&zstream, -MAX_WBITS); -+ -+ if (ret != Z_OK) { -+ g_warning("inflateInit2() failed. zlib error code: %d", ret); -+ g_free(decompress_buf); -+ return NULL; -+ } -+ -+ ret = inflate(&zstream, Z_FINISH); -+ -+ if (ret != Z_STREAM_END) { -+ g_warning("zlib decompression failed. zlib error code: %d", ret); -+ g_free(decompress_buf); -+ return NULL; -+ } -+ -+ interface = glade_parser_parse_buffer_internal(decompress_buf, decompress_len, domain); -+ -+ g_free(decompress_buf); -+ -+ return interface; -+} -+ -+GladeInterface * -+glade_parser_parse_buffer(const gchar *buffer, gint len, const gchar *domain) -+{ -+ g_return_val_if_fail(buffer != NULL, NULL); -+ g_return_val_if_fail(len > 0, NULL); -+ -+ /* Check if buffer is gzipped */ -+ if (buffer[0] == 0x1f && buffer[1] == (gchar)0x8b) { -+ return glade_parser_parse_gzipped_buffer(buffer, len, domain); -+ } -+ -+ /* Buffer is cleartext. */ -+ return glade_parser_parse_buffer_internal(buffer, len, domain); -+} -+ -+#endif /* USE_GMARKUP_PARSER */ -+ -+ -+#ifndef USE_GMARKUP_PARSER -+ - static void - dump_widget(xmlNode *parent, GladeWidgetInfo *info, gint indent) - { -@@ -1382,6 +1674,8 @@ - xmlNodeAddContent(widget, " "); - } - -+#endif /* !defined(USE_GMARKUP_PARSER) */ -+ - /** - * glade_interface_dump - * @interface: the GladeInterface -@@ -1390,6 +1684,9 @@ - * This function dumps the contents of a GladeInterface into a file as - * XML. It is intended mainly as a debugging tool. - */ -+ -+#ifndef USE_GMARKUP_PARSER -+ - void - glade_interface_dump(GladeInterface *interface, const gchar *filename) - { -@@ -1428,6 +1725,17 @@ - xmlFreeDoc(doc); - } - -+#else /* defined(USE_GMARKUP_PARSER) */ -+ -+void -+glade_interface_dump(GladeInterface *interface, const gchar *filename) -+{ -+ g_warning("glade_interface_dump() is only available with libxml2."); -+} -+ -+#endif /* USE_GMARKUP_PARSER */ -+ -+ - #if 0 - int - main(int argc, char **argv) { -diff -urN libglade-2.4.2.orig/libglade-2.0.pc.in libglade-2.4.2/libglade-2.0.pc.in ---- libglade-2.4.2.orig/libglade-2.0.pc.in 2001-12-12 15:28:23.000000000 +0100 -+++ libglade-2.4.2/libglade-2.0.pc.in 2005-03-22 01:20:00.000000000 +0100 -@@ -11,7 +11,7 @@ - Name: Libglade - Description: a library for dynamically loading GLADE interface files - Version: @VERSION@ --Requires: gtk+-2.0 libxml-2.0 -+Requires: gtk+-2.0 @PKGCFG_REQUIRE_LIBXML2@ - Libs: -L${libdir} -lglade-2.0 - Cflags: -I${includedir}/libglade-2.0 - diff --git a/packages/libglade/libglade-2.6.2/.mtn2git_empty b/packages/libglade/libglade-2.6.2/.mtn2git_empty deleted file mode 100644 index e69de29bb2..0000000000 --- a/packages/libglade/libglade-2.6.2/.mtn2git_empty +++ /dev/null diff --git a/packages/libglade/libglade-2.6.2/glade-cruft.patch b/packages/libglade/libglade-2.6.2/glade-cruft.patch deleted file mode 100644 index 0fceccf0c4..0000000000 --- a/packages/libglade/libglade-2.6.2/glade-cruft.patch +++ /dev/null @@ -1,100 +0,0 @@ -diff -ur libglade-2.4.0~/configure.in libglade-2.4.0/configure.in ---- libglade-2.4.0~/configure.in 2004-05-17 12:38:31.000000000 +0100 -+++ libglade-2.4.0/configure.in 2004-07-28 16:53:09.000000000 +0100 -@@ -147,6 +147,18 @@ - AM_CONDITIONAL(HAVE_PYTHON, $have_python) - AC_SUBST(PYTHON) - -+AC_MSG_CHECKING([for cruft in libgtk]) -+AC_TRY_LINK([ -+#include <gtk/gtk.h> -+#include <stdio.h> -+], [ gtk_tree_get_type (); return 0; ], -+ [ AC_MSG_RESULT(yes) -+ have_cruft=yes ], -+ [ AC_MSG_RESULT(no) -+ AC_DEFINE(DISABLE_CRUFT,,[leave out support for old, broken widgets]) -+ have_cruft=no ]) -+AC_SUBST(DISABLE_CRUFT) -+ - dnl add debugging options ... - changequote(,)dnl - if test "x$GCC" = xyes; then -Only in libglade-2.4.0: configure.in.orig -diff -ur libglade-2.4.0~/glade/glade-gtk.c libglade-2.4.0/glade/glade-gtk.c ---- libglade-2.4.0~/glade/glade-gtk.c 2004-03-13 13:47:35.000000000 +0000 -+++ libglade-2.4.0/glade/glade-gtk.c 2004-07-28 16:53:52.000000000 +0100 -@@ -213,6 +213,8 @@ - gtk_clist_column_titles_hide (GTK_CLIST (w)); - } - -+#ifndef DISABLE_CRUFT -+ - static void - tree_set_selection_mode (GladeXML *xml, GtkWidget *w, - const char *name, const char *value) -@@ -238,6 +240,8 @@ - gtk_tree_set_view_lines (GTK_TREE (w), BOOL (value)); - } - -+#endif -+ - static void - list_set_selection_mode (GladeXML *xml, GtkWidget *w, - const char *name, const char *value) -@@ -254,6 +258,7 @@ - gtk_check_menu_item_set_show_toggle (GTK_CHECK_MENU_ITEM (w), BOOL (value)); - } - -+#ifndef DISABLE_CRUFT - static void - text_set_text (GladeXML *xml, GtkWidget *w, - const char *name, const char *value) -@@ -262,6 +267,7 @@ - - gtk_editable_insert_text (GTK_EDITABLE (w), value, -1, &pos); - } -+#endif - - static void - radio_menu_item_set_group (GladeXML *xml, GtkWidget *w, -@@ -1125,13 +1131,17 @@ - glade_register_custom_prop (GTK_TYPE_CLIST, "selection_mode", clist_set_selection_mode); - glade_register_custom_prop (GTK_TYPE_CLIST, "shadow_type", clist_set_shadow_type); - glade_register_custom_prop (GTK_TYPE_CLIST, "show_titles", clist_set_show_titles); -+#ifndef DISABLE_CRUFT - glade_register_custom_prop (GTK_TYPE_TREE, "selection_mode", tree_set_selection_mode); - glade_register_custom_prop (GTK_TYPE_TREE, "view_mode", tree_set_view_mode); - glade_register_custom_prop (GTK_TYPE_TREE, "view_line", tree_set_view_line); -+#endif - glade_register_custom_prop (GTK_TYPE_LIST, "selection_mode", list_set_selection_mode); - glade_register_custom_prop (GTK_TYPE_CHECK_MENU_ITEM, "always_show_toggle", - check_menu_item_set_always_show_toggle); -+#ifndef DISABLE_CRUFT - glade_register_custom_prop (GTK_TYPE_TEXT, "text", text_set_text); -+#endif - glade_register_custom_prop (GTK_TYPE_RADIO_MENU_ITEM, "group", - radio_menu_item_set_group); - glade_register_custom_prop (GTK_TYPE_TOOLBAR, "tooltips", toolbar_set_tooltips); -@@ -1288,8 +1298,10 @@ - glade_standard_build_children, NULL); - glade_register_widget (GTK_TYPE_TEAROFF_MENU_ITEM, glade_standard_build_widget, - NULL, NULL); -+#ifndef DISABLE_CRUFT - glade_register_widget (GTK_TYPE_TEXT, glade_standard_build_widget, - NULL, NULL); -+#endif - glade_register_widget (GTK_TYPE_TEXT_VIEW, glade_standard_build_widget, - NULL, NULL); - glade_register_widget (GTK_TYPE_TIPS_QUERY, glade_standard_build_widget, -@@ -1304,8 +1316,10 @@ - glade_standard_build_children, NULL); - glade_register_widget (GTK_TYPE_TOOL_BUTTON, glade_standard_build_widget, - NULL, NULL); -+#ifndef DISABLE_CRUFT - glade_register_widget (GTK_TYPE_TREE, glade_standard_build_widget, - NULL, NULL); -+#endif - glade_register_widget (GTK_TYPE_TREE_VIEW, glade_standard_build_widget, - NULL, NULL); - glade_register_widget (GTK_TYPE_VBUTTON_BOX, glade_standard_build_widget, diff --git a/packages/libglade/libglade-2.6.2/no-xml2.patch b/packages/libglade/libglade-2.6.2/no-xml2.patch deleted file mode 100644 index 1c2e215b8d..0000000000 --- a/packages/libglade/libglade-2.6.2/no-xml2.patch +++ /dev/null @@ -1,499 +0,0 @@ -diff -urN libglade-2.4.2.orig/configure.in libglade-2.4.2/configure.in ---- libglade-2.4.2.orig/configure.in 2005-02-11 12:42:58.000000000 +0100 -+++ libglade-2.4.2/configure.in 2005-03-22 01:22:00.000000000 +0100 -@@ -52,11 +52,33 @@ - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - - PKG_CHECK_MODULES(LIBGLADE, [dnl -- libxml-2.0 >= required_libxml_version dnl - atk >= required_atk_version dnl - gtk+-2.0 >= required_gtk_version dnl - glib-2.0 >= required_glib_version]) - -+disable_xml2=no -+AC_ARG_WITH([libxml2], -+ AC_HELP_STRING([--without-libxml2], [Don't use libxml2, use Glib's GMarkupParser instead]), -+ [disable_xml2=yes], -+ [disable_xml2=no]) -+ -+AC_MSG_CHECKING([if we are using libxml2]) -+if test "x$disable_xml2" == "xno"; then -+ AC_MSG_RESULT(yes) -+ PKG_CHECK_MODULES(XML2, libxml-2.0 >= 2.4.10) -+ PKGCFG_REQUIRE_LIBXML2="libxml-2.0" -+ LIBGLADE_CFLAGS="$LIBGLADE_CFLAGS $XML2_CFLAGS" -+ LIBGLADE_LIBS="$LIBGLADE_LIBS $XML2_LIBS" -+else -+ LIBGLADE_CFLAGS="$LIBGLADE_CFLAGS -DUSE_GMARKUP_PARSER" -+ PKGCFG_REQUIRE_LIBXML2="" -+ AC_MSG_RESULT(no) -+fi -+ -+AC_SUBST(XML2_LIBS) -+AC_SUBST(XML2_CFLAGS) -+AC_SUBST(PKGCFG_REQUIRE_LIBXML2) -+ - AC_MSG_CHECKING([for native Win32]) - case "$host" in - *-*-mingw*) -@@ -116,6 +138,21 @@ - fi - fi - -+if test "x$disable_xml2" == "xyes"; then -+ echo "*****************************************************" -+ echo " You chose to disable libxml2 and use Glib's" -+ echo " GMarkupParser instead." -+ echo -+ echo " Please bear in mind that using libglade with" -+ echo " GMarkupParser is an experimental feature only." -+ echo -+ echo " Please post problems or success stories to" -+ echo " the glade-devel mailing list. Thank you." -+ echo "*****************************************************" -+fi -+ -+ -+ - GTK_DOC_CHECK(1.0) - - dnl gettext stuff ... there is no message catalog for libglade -- libglade -diff -urN libglade-2.4.2.orig/glade/glade-parser.c libglade-2.4.2/glade/glade-parser.c ---- libglade-2.4.2.orig/glade/glade-parser.c 2004-11-11 11:56:13.000000000 +0100 -+++ libglade-2.4.2/glade/glade-parser.c 2005-03-22 01:20:00.000000000 +0100 -@@ -34,7 +34,15 @@ - # define dgettext(Domain, String) (String) - #endif - --#include <libxml/parser.h> -+#ifdef USE_GMARKUP_PARSER -+# include <zlib.h> -+#else -+# include <libxml/parser.h> -+#endif -+ -+#ifdef USE_GMARKUP_PARSER -+# define xmlChar gchar -+#endif - - #include "glade-parser.h" - #include "glade-private.h" -@@ -508,7 +516,9 @@ - case PARSER_START: - if (!strcmp(name, "glade-interface")) { - state->state = PARSER_GLADE_INTERFACE; --#if 0 -+ -+#ifndef USE_GMARKUP_PARSER -+ #if 0 - /* check for correct XML namespace */ - for (i = 0; attrs && attrs[i] != NULL; i += 2) { - if (!strcmp(attrs[i], "xmlns") && -@@ -518,7 +528,9 @@ - g_warning("unknown attribute `%s' for <glade-interface>", - attrs[i]); - } -+ #endif - #endif -+ - } else { - g_warning("Expected <glade-interface>. Got <%s>.", name); - state->prev_state = state->state; -@@ -1063,12 +1075,18 @@ - } - } - -+#ifndef USE_GMARKUP_PARSER -+ - static xmlEntityPtr - glade_parser_get_entity(GladeParseState *state, const xmlChar *name) - { - return xmlGetPredefinedEntity(name); - } - -+#endif /* !defined(USE_GMARKUP_PARSER) */ -+ -+#ifndef USE_GMARKUP_PARSER -+ - static void - glade_parser_warning(GladeParseState *state, const char *msg, ...) - { -@@ -1079,6 +1097,10 @@ - va_end(args); - } - -+#endif /* !defined(USE_GMARKUP_PARSER) */ -+ -+#ifndef USE_GMARKUP_PARSER -+ - static void - glade_parser_error(GladeParseState *state, const char *msg, ...) - { -@@ -1089,6 +1111,10 @@ - va_end(args); - } - -+#endif /* !defined(USE_GMARKUP_PARSER) */ -+ -+#ifndef USE_GMARKUP_PARSER -+ - static void - glade_parser_fatal_error(GladeParseState *state, const char *msg, ...) - { -@@ -1099,6 +1125,10 @@ - va_end(args); - } - -+#endif /* !defined(USE_GMARKUP_PARSER) */ -+ -+#ifndef USE_GMARKUP_PARSER -+ - static xmlSAXHandler glade_parser = { - (internalSubsetSAXFunc)NULL, /* internalSubset */ - (isStandaloneSAXFunc)NULL, /* isStandalone */ -@@ -1126,6 +1156,82 @@ - (fatalErrorSAXFunc)glade_parser_fatal_error, /* fatalError */ - }; - -+#else /* USE_GMARKUP_PARSER */ -+ -+static void -+glade_parser_start_element_wrapper(GMarkupParseContext *context, -+ const gchar *name, -+ const gchar **attr_names, -+ const gchar **attr_values, -+ gpointer state, -+ GError **error) -+{ -+ guint i = 0; -+ -+ /* Pack attribute names/values from two separate -+ * arrays (GMarkupParser style) into one single -+ * array (libxml SAXParser style). This is not -+ * very efficient, but we do it to make the -+ * GMarkupParser code as little invasive as -+ * possible. */ -+ -+ while (attr_names[i] != NULL) { -+ ++i; -+ } -+ -+ if (1) -+ { -+ const gchar *attr[(i*2)+1]; -+ guint j, k; -+ -+ for (j=0, k=0; k < i; j += 2) -+ { -+ attr[j] = attr_names[k]; -+ attr[j+1] = attr_values[k]; -+ ++k; -+ } -+ attr[i*2] = NULL; -+ -+ glade_parser_start_element((GladeParseState*)state, name, attr); -+ } -+} -+ -+static void -+glade_parser_end_element_wrapper(GMarkupParseContext *context, -+ const gchar *name, -+ gpointer state, -+ GError **err) -+{ -+ glade_parser_end_element((GladeParseState*)state, name); -+} -+ -+static void -+glade_parser_characters_wrapper(GMarkupParseContext *context, -+ const gchar *chars, -+ gsize len, -+ gpointer state, -+ GError **err) -+{ -+ glade_parser_characters((GladeParseState*)state, chars, (int) len); -+} -+ -+static void -+glade_parser_error(GMarkupParseContext *context, GError *err, gpointer data) -+{ -+ g_log("Glade-Parser", G_LOG_LEVEL_CRITICAL, "%s", err->message); -+} -+ -+static const GMarkupParser glade_parser = { -+ glade_parser_start_element_wrapper, /* element open */ -+ glade_parser_end_element_wrapper, /* element close */ -+ glade_parser_characters_wrapper, /* text content */ -+ NULL, /* passthrough */ -+ glade_parser_error, /* parse error */ -+}; -+ -+#endif /* USE_GMARKUP_PARSER */ -+ -+ - static void - widget_info_free(GladeWidgetInfo *info) - { -@@ -1191,6 +1297,9 @@ - * - * Returns: the GladeInterface structure for the XML file. - */ -+ -+#ifndef USE_GMARKUP_PARSER -+ - GladeInterface * - glade_parser_parse_file(const gchar *file, const gchar *domain) - { -@@ -1222,6 +1331,31 @@ - return state.interface; - } - -+#else /* defined(USE_GMARKUP_PARSER) */ -+ -+GladeInterface * -+glade_parser_parse_file(const gchar *file, const gchar *domain) -+{ -+ GladeInterface *interface; -+ GError *err = NULL; -+ gchar *content = NULL; -+ gsize clen; -+ -+ if (!g_file_get_contents(file, &content, &clen, &err)) { -+ g_warning("could not load glade file: %s", err->message); -+ g_error_free(err); -+ return NULL; -+ } -+ -+ interface = glade_parser_parse_buffer(content, (gint) clen, domain); -+ -+ g_free(content); -+ -+ return interface; -+} -+ -+#endif /* USE_GMARKUP_PARSER */ -+ - /** - * glade_parser_parse_buffer - * @buffer: a buffer in memory containing XML data. -@@ -1237,6 +1371,9 @@ - * - * Returns: the GladeInterface structure for the XML buffer. - */ -+ -+#ifndef USE_GMARKUP_PARSER -+ - GladeInterface * - glade_parser_parse_buffer(const gchar *buffer, gint len, const gchar *domain) - { -@@ -1263,6 +1400,161 @@ - return state.interface; - } - -+#else /* defined(USE_GMARKUP_PARSER) */ -+ -+ -+static GladeInterface * -+glade_parser_parse_buffer_internal(const gchar *buffer, gint len, const gchar *domain) -+{ -+ GMarkupParseContext *context; -+ GladeParseState state = { 0 }; -+ GError *err = NULL; -+ -+ state.interface = NULL; -+ if (domain) -+ state.domain = domain; -+ else -+ state.domain = textdomain(NULL); -+ -+ /* FIXME: This strstr() is not safe, as it ignores the len -+ * argument and assumes the buffer is NUL-terminated */ -+ if (strstr(buffer, "<?xml") == NULL) { -+ g_warning("No XML header found in document!"); -+ return NULL; -+ } -+ -+ context = g_markup_parse_context_new(&glade_parser, (GMarkupParseFlags) 0, &state, NULL); -+ -+ glade_parser_start_document(&state); -+ -+ if (!g_markup_parse_context_parse(context, buffer, (gssize) len, &err)) { -+ g_warning("document not well formed: %s", err->message); -+ g_error_free(err); -+ if (state.interface) -+ glade_interface_destroy (state.interface); -+ return NULL; -+ } -+ -+ glade_parser_end_document(&state); -+ -+ if (state.state != PARSER_FINISH) { -+ g_warning("did not finish in PARSER_FINISH state!"); -+ -+ if (state.interface) -+ glade_interface_destroy(state.interface); -+ -+ return NULL; -+ } -+ -+ return state.interface; -+} -+ -+struct _gzip_rfc1952_hdr -+{ -+ guint8 id1, id2, cm, flags; -+ guint32 mtime; -+ guint8 xflags; -+ guint8 os; -+}; -+ -+static GladeInterface * -+glade_parser_parse_gzipped_buffer(const gchar *buffer, gint len, const gchar *domain) -+{ -+ struct _gzip_rfc1952_hdr *hdr = (struct _gzip_rfc1952_hdr*)buffer; -+ struct z_stream_s zstream; -+ GladeInterface *interface; -+ const guint8 *cbuf; /* start of compressed data */ -+ guint8 *decompress_buf; -+ gulong decompress_len = 0; -+ gint ret; -+ -+ g_assert(hdr != NULL && hdr->id1 == 0x1f && hdr->id2 == 0x8b); -+ -+ if (hdr->cm != Z_DEFLATED) { -+ g_warning("Unknown decompression method %u", (guint) hdr->cm); -+ return NULL; -+ } -+ -+ /* Uncompressed size (modulo 2^32) is last -+ * 4 bytes of gzipped file, and little endian. -+ * See RFC 1952 */ -+ decompress_len = GUINT32_FROM_LE(*((guint32*)(((guint8*)buffer) + len - 4))); -+ -+ /* paranoid mode: glade files > 5MB are unlikely */ -+ g_return_val_if_fail(decompress_len < 5*1024*1024, NULL); -+ -+ decompress_buf = g_malloc0(decompress_len + 1); /* +1 for NUL-terminator */ -+ -+ /* find start of compressed data, skipping header stuff */ -+ cbuf = (guint8*)buffer + 10; -+ if (hdr->flags & 0x04) { -+ guint16 xlen = GUINT16_FROM_LE(*((guint16*)cbuf)); -+ cbuf += xlen + 2; -+ } -+ if (hdr->flags & 0x08) { -+ guint16 onamelen = strlen(cbuf); -+ cbuf += onamelen + 1; -+ } -+ if (hdr->flags & 0x10) { -+ guint16 commentlen = strlen(cbuf); -+ cbuf += commentlen + 1; -+ } -+ if (hdr->flags & 0x02) -+ { -+ cbuf += 2; /* skip header CRC16 */ -+ } -+ -+ zstream.next_in = (void*)cbuf; -+ zstream.avail_in = (uLongf) len - ((void*)cbuf-(void*)buffer) - 4 - 4 +1; -+ zstream.next_out = decompress_buf; -+ zstream.avail_out= decompress_len; -+ zstream.zalloc = Z_NULL; -+ zstream.zfree = Z_NULL; -+ zstream.opaque = Z_NULL; -+ -+ ret = inflateInit2(&zstream, -MAX_WBITS); -+ -+ if (ret != Z_OK) { -+ g_warning("inflateInit2() failed. zlib error code: %d", ret); -+ g_free(decompress_buf); -+ return NULL; -+ } -+ -+ ret = inflate(&zstream, Z_FINISH); -+ -+ if (ret != Z_STREAM_END) { -+ g_warning("zlib decompression failed. zlib error code: %d", ret); -+ g_free(decompress_buf); -+ return NULL; -+ } -+ -+ interface = glade_parser_parse_buffer_internal(decompress_buf, decompress_len, domain); -+ -+ g_free(decompress_buf); -+ -+ return interface; -+} -+ -+GladeInterface * -+glade_parser_parse_buffer(const gchar *buffer, gint len, const gchar *domain) -+{ -+ g_return_val_if_fail(buffer != NULL, NULL); -+ g_return_val_if_fail(len > 0, NULL); -+ -+ /* Check if buffer is gzipped */ -+ if (buffer[0] == 0x1f && buffer[1] == (gchar)0x8b) { -+ return glade_parser_parse_gzipped_buffer(buffer, len, domain); -+ } -+ -+ /* Buffer is cleartext. */ -+ return glade_parser_parse_buffer_internal(buffer, len, domain); -+} -+ -+#endif /* USE_GMARKUP_PARSER */ -+ -+ -+#ifndef USE_GMARKUP_PARSER -+ - static void - dump_widget(xmlNode *parent, GladeWidgetInfo *info, gint indent) - { -@@ -1382,6 +1674,8 @@ - xmlNodeAddContent(widget, " "); - } - -+#endif /* !defined(USE_GMARKUP_PARSER) */ -+ - /** - * glade_interface_dump - * @interface: the GladeInterface -@@ -1390,6 +1684,9 @@ - * This function dumps the contents of a GladeInterface into a file as - * XML. It is intended mainly as a debugging tool. - */ -+ -+#ifndef USE_GMARKUP_PARSER -+ - void - glade_interface_dump(GladeInterface *interface, const gchar *filename) - { -@@ -1428,6 +1725,17 @@ - xmlFreeDoc(doc); - } - -+#else /* defined(USE_GMARKUP_PARSER) */ -+ -+void -+glade_interface_dump(GladeInterface *interface, const gchar *filename) -+{ -+ g_warning("glade_interface_dump() is only available with libxml2."); -+} -+ -+#endif /* USE_GMARKUP_PARSER */ -+ -+ - #if 0 - int - main(int argc, char **argv) { -diff -urN libglade-2.4.2.orig/libglade-2.0.pc.in libglade-2.4.2/libglade-2.0.pc.in ---- libglade-2.4.2.orig/libglade-2.0.pc.in 2001-12-12 15:28:23.000000000 +0100 -+++ libglade-2.4.2/libglade-2.0.pc.in 2005-03-22 01:20:00.000000000 +0100 -@@ -11,7 +11,7 @@ - Name: Libglade - Description: a library for dynamically loading GLADE interface files - Version: @VERSION@ --Requires: gtk+-2.0 libxml-2.0 -+Requires: gtk+-2.0 @PKGCFG_REQUIRE_LIBXML2@ - Libs: -L${libdir} -lglade-2.0 - Cflags: -I${includedir}/libglade-2.0 - diff --git a/packages/libglade/libglade.inc b/packages/libglade/libglade.inc new file mode 100644 index 0000000000..2aa5df7c95 --- /dev/null +++ b/packages/libglade/libglade.inc @@ -0,0 +1,25 @@ +DESCRIPTION = "Runtime support for GTK interface builder" +HOMEPAGE = "http://glade.gnome.org/" +SECTION = "libs" +PRIORITY = "optional" +LICENSE = "LGPL" +DEPENDS = "gtk+ gtk-doc" + +inherit autotools pkgconfig + +headers = "glade-build.h glade-init.h glade-parser.h glade-xml.h glade.h" + +do_stage () { + oe_libinstall -a -so -C glade libglade-2.0 ${STAGING_LIBDIR} + + mkdir -p ${STAGING_INCDIR}/libglade-2.0/glade + for i in ${headers}; do + install -m 0644 ${S}/glade/$i ${STAGING_INCDIR}/libglade-2.0/glade/$i + done +} + +PACKAGES += " ${PN}-data" +FILES_${PN} = "${libdir}/lib*.so.*" +FILES_${PN}-data = "${datadir}/xml/libglade/glade-2.0.dtd" +FILES_${PN}-dev += "${bindir}/libglade-convert" +#RDEPENDS_${PN} = "${PN}-data" diff --git a/packages/libglade/libglade_2.0.1.bb b/packages/libglade/libglade_2.0.1.bb index 535396c5a0..ea7446b092 100644 --- a/packages/libglade/libglade_2.0.1.bb +++ b/packages/libglade/libglade_2.0.1.bb @@ -1,27 +1,13 @@ -LICENSE = "LGPL" -DESCRIPTION = "Runtime support for GTK interface builder" -SECTION = "libs" -PRIORITY = "optional" -DEPENDS = "libxml2 gtk+" +require libglade.inc + +PR = "r1" +DEPENDS += "libxml2" SRC_URI = "ftp://ftp.gnome.org/pub/GNOME/sources/libglade/2.0/libglade-${PV}.tar.bz2 \ file://glade-cruft.patch;patch=1;pnum=0 \ file://gtk-2.0.m4" -inherit autotools pkgconfig - -headers = "glade-build.h glade-init.h glade-parser.h glade-xml.h glade.h" - do_configure_prepend() { install -d m4 install ${WORKDIR}/gtk-2.0.m4 m4/ } - -do_stage () { - oe_libinstall -a -so -C glade libglade-2.0 ${STAGING_LIBDIR} - - mkdir -p ${STAGING_INCDIR}/libglade-2.0/glade - for i in ${headers}; do - install -m 0644 ${S}/glade/$i ${STAGING_INCDIR}/libglade-2.0/glade/$i - done -} diff --git a/packages/libglade/libglade_2.4.0.bb b/packages/libglade/libglade_2.4.0.bb index f1d76b737d..774331719e 100644 --- a/packages/libglade/libglade_2.4.0.bb +++ b/packages/libglade/libglade_2.4.0.bb @@ -1,30 +1,9 @@ -LICENSE = "LGPL" -DESCRIPTION = "Runtime support for GTK interface builder" -SECTION = "libs" -PRIORITY = "optional" -DEPENDS = "gtk+ gtk-doc" +require libglade.inc -inherit autotools pkgconfig gnome +PR = "r3" -PR = "r2" +inherit gnome SRC_URI += "file://glade-cruft.patch;patch=1 file://no-xml2.patch;patch=1" EXTRA_OECONF += "--without-libxml2" - -PACKAGES += " ${PN}-data" -FILES_${PN} = "${libdir}/lib*.so.*" -FILES_${PN}-data = "${datadir}/xml/libglade/glade-2.0.dtd" -FILES_${PN}-dev += "${bindir}/libglade-convert" -#RDEPENDS_${PN} = "${PN}-data" - -headers = "glade-build.h glade-init.h glade-parser.h glade-xml.h glade.h" - -do_stage () { - oe_libinstall -a -so -C glade libglade-2.0 ${STAGING_LIBDIR} - - mkdir -p ${STAGING_INCDIR}/libglade-2.0/glade - for i in ${headers}; do - install -m 0644 ${S}/glade/$i ${STAGING_INCDIR}/libglade-2.0/glade/$i - done -} diff --git a/packages/libglade/libglade_2.4.2.bb b/packages/libglade/libglade_2.4.2.bb index dce7e5618d..1565563cdf 100644 --- a/packages/libglade/libglade_2.4.2.bb +++ b/packages/libglade/libglade_2.4.2.bb @@ -1,32 +1,11 @@ -LICENSE = "LGPL" -DESCRIPTION = "Runtime support for GTK interface builder" -SECTION = "libs" -PRIORITY = "optional" -DEPENDS = "gtk+ gtk-doc" +require libglade.inc -inherit autotools pkgconfig gnome +PR = "r1" -PR = "r0" +inherit gnome SRC_URI += "file://glade-cruft.patch;patch=1 file://no-xml2.patch;patch=1" EXTRA_OECONF += "--without-libxml2" LDFLAGS += "-lz" - -PACKAGES += " ${PN}-data" -FILES_${PN} = "${libdir}/lib*.so.*" -FILES_${PN}-data = "${datadir}/xml/libglade/glade-2.0.dtd" -FILES_${PN}-dev += "${bindir}/libglade-convert" -#RDEPENDS_${PN} = "${PN}-data" - -headers = "glade-build.h glade-init.h glade-parser.h glade-xml.h glade.h" - -do_stage () { - oe_libinstall -a -so -C glade libglade-2.0 ${STAGING_LIBDIR} - - mkdir -p ${STAGING_INCDIR}/libglade-2.0/glade - for i in ${headers}; do - install -m 0644 ${S}/glade/$i ${STAGING_INCDIR}/libglade-2.0/glade/$i - done -} diff --git a/packages/libglade/libglade_2.5.1.bb b/packages/libglade/libglade_2.5.1.bb index 8d43bc412e..bf6825e03a 100644 --- a/packages/libglade/libglade_2.5.1.bb +++ b/packages/libglade/libglade_2.5.1.bb @@ -1,12 +1,8 @@ -LICENSE = "LGPL" -DESCRIPTION = "Runtime support for GTK interface builder" -SECTION = "libs" -PRIORITY = "optional" -DEPENDS = "gtk+ gtk-doc" +require libglade.inc -inherit autotools pkgconfig gnome +PR = "r2" -PR = "r1" +inherit gnome SRC_URI += "file://glade-cruft.patch;patch=1 file://no-xml2.patch;patch=1 \ file://no-deprecation.patch;patch=1" @@ -14,20 +10,3 @@ SRC_URI += "file://glade-cruft.patch;patch=1 file://no-xml2.patch;patch=1 \ EXTRA_OECONF += "--without-libxml2" LDFLAGS += "-lz" - -PACKAGES += " ${PN}-data" -FILES_${PN} = "${libdir}/lib*.so.*" -FILES_${PN}-data = "${datadir}/xml/libglade/glade-2.0.dtd" -FILES_${PN}-dev += "${bindir}/libglade-convert" -#RDEPENDS_${PN} = "${PN}-data" - -headers = "glade-build.h glade-init.h glade-parser.h glade-xml.h glade.h" - -do_stage () { - oe_libinstall -a -so -C glade libglade-2.0 ${STAGING_LIBDIR} - - mkdir -p ${STAGING_INCDIR}/libglade-2.0/glade - for i in ${headers}; do - install -m 0644 ${S}/glade/$i ${STAGING_INCDIR}/libglade-2.0/glade/$i - done -} diff --git a/packages/libglade/libglade_2.6.2.bb b/packages/libglade/libglade_2.6.2.bb index f0450e644d..dace1d3f31 100644 --- a/packages/libglade/libglade_2.6.2.bb +++ b/packages/libglade/libglade_2.6.2.bb @@ -1,32 +1,11 @@ -LICENSE = "LGPL" -DESCRIPTION = "Runtime support for GTK interface builder" -SECTION = "libs" -PRIORITY = "optional" -DEPENDS = "gtk+ gtk-doc" +require libglade.inc -inherit autotools pkgconfig gnome +PR = "r2" -PR = "r1" +inherit gnome SRC_URI += "file://glade-cruft.patch;patch=1 file://no-xml2.patch;patch=1" EXTRA_OECONF += "--without-libxml2" LDFLAGS += "-lz" - -PACKAGES += " ${PN}-data" -FILES_${PN} = "${libdir}/lib*.so.*" -FILES_${PN}-data = "${datadir}/xml/libglade/glade-2.0.dtd" -FILES_${PN}-dev += "${bindir}/libglade-convert" -#RDEPENDS_${PN} = "${PN}-data" - -headers = "glade-build.h glade-init.h glade-parser.h glade-xml.h glade.h" - -do_stage () { - oe_libinstall -a -so -C glade libglade-2.0 ${STAGING_LIBDIR} - - mkdir -p ${STAGING_INCDIR}/libglade-2.0/glade - for i in ${headers}; do - install -m 0644 ${S}/glade/$i ${STAGING_INCDIR}/libglade-2.0/glade/$i - done -} diff --git a/packages/postgresql/postgresql.inc b/packages/postgresql/postgresql.inc new file mode 100644 index 0000000000..36ec1187aa --- /dev/null +++ b/packages/postgresql/postgresql.inc @@ -0,0 +1,16 @@ +DESCRIPTION = "PostgreSQL is a powerful, open source relational database system." +HOMEPAGE = "http://www.postgresql.com" +LICENSE = "BSD" +DEPENDS = "zlib readline" + +#WARNING: this recipe assumes you have the timezone compiler present in /usr/sbin/zic + +SRC_URI = "ftp://ftp-archives.postgresql.org/pub/source/v${PV}/${P}.tar.bz2" + +inherit autotools pkgconfig + +do_compile_append() { + cp /usr/sbin/zic ${S}/src/timezone/ +} + +FILES_${PN}-doc += "${prefix}/doc/" diff --git a/packages/postgresql/postgresql_8.1.4.bb b/packages/postgresql/postgresql_8.1.4.bb index 083fed5a21..27b067b5cb 100644 --- a/packages/postgresql/postgresql_8.1.4.bb +++ b/packages/postgresql/postgresql_8.1.4.bb @@ -1,20 +1,3 @@ -DESCRIPTION = "PostgreSQL is a powerful, open source relational database system." -HOMEPAGE = "http://www.postgresql.com" -LICENSE = "BSD" -DEPENDS = "zlib readline" - -#WARNING: this recipe assumes you have the timezone compiler present in /usr/sbin/zic - -SRC_URI = "ftp://ftp-archives.postgresql.org/pub/source/v${PV}/${P}.tar.bz2" - - -inherit autotools pkgconfig - -FILES_${PN}-doc += "${prefix}/doc/" - -do_compile_append() { -cp /usr/sbin/zic ${S}/src/timezone/ -} - - +require postgresql.inc +PR = "r1" diff --git a/packages/postgresql/postgresql_8.1.8.bb b/packages/postgresql/postgresql_8.1.8.bb index be44052437..27b067b5cb 100644 --- a/packages/postgresql/postgresql_8.1.8.bb +++ b/packages/postgresql/postgresql_8.1.8.bb @@ -1,20 +1,3 @@ -DESCRIPTION = "PostgreSQL is a powerful, open source relational database system." -HOMEPAGE = "http://www.postgresql.com" -LICENSE = "BSD" -DEPENDS = "zlib readline" - -#WARNING: this recipe assumes you have the timezone compiler present in /usr/sbin/zic - -SRC_URI = "ftp://ftp.us.postgresql.org/pub/mirrors/postgresql/source/v${PV}/${P}.tar.bz2" - - -inherit autotools pkgconfig - -FILES_${PN}-doc += "${prefix}/doc/" - -do_compile_append() { -cp /usr/sbin/zic ${S}/src/timezone/ -} - - +require postgresql.inc +PR = "r1" diff --git a/packages/postgresql/postgresql_8.2.4.bb b/packages/postgresql/postgresql_8.2.4.bb index 3f65a4fd0d..3dc8577c1c 100644 --- a/packages/postgresql/postgresql_8.2.4.bb +++ b/packages/postgresql/postgresql_8.2.4.bb @@ -1,20 +1,7 @@ -DESCRIPTION = "PostgreSQL is a powerful, open source relational database system." -HOMEPAGE = "http://www.postgresql.com" -LICENSE = "BSD" -DEPENDS = "zlib readline" - -#WARNING: this recipe assumes you have the timezone compiler present in /usr/sbin/zic - -SRC_URI = "ftp://ftp.us.postgresql.org/pub/mirrors/postgresql/source/v${PV}/${P}.tar.bz2 \ - file://no-ecpg-test.patch;patch=1" - - -inherit autotools pkgconfig - -FILES_${PN}-doc += "${prefix}/doc/" - -do_compile_append() { -cp /usr/sbin/zic ${S}/src/timezone/ -} +require postgresql.inc +PR = "r1" DEFAULT_PREFERENCE = "-1" + +SRC_URI = "http://ftp.de.postgresql.org/mirror/postgresql/source/v${PV}/${P}.tar.bz2 \ + file://no-ecpg-test.patch;patch=1" |