wooo need sleep -- all the patches are due to libxml developer haste

to obsolete code that other software (dia) still use in their
5/20/2001 software release >sigh< -- this fixes the reported dia
breakage on ports@
This commit is contained in:
obecian 2001-06-02 11:03:22 +00:00
parent 310cc90c6c
commit fc06355cd1
6 changed files with 80 additions and 93 deletions

View File

@ -1,36 +0,0 @@
# import from dia CVS to not use deprecated calls
# this allows dia to work with libxml2
# - obecian@openbsd.org
--- app/load_save.c.orig Fri Apr 6 22:52:43 2001
+++ app/load_save.c Fri Apr 6 22:55:41 2001
@@ -552,13 +552,14 @@ diagram_data_save(DiagramData *data, con
fclose(file);
doc = xmlNewDoc("1.0");
-
- name_space = xmlNewGlobalNs( doc, "http://www.lysator.liu.se/~alla/dia/",
- "dia" );
-
- doc->root = xmlNewDocNode(doc, name_space, "diagram", NULL);
- tree = xmlNewChild(doc->root, NULL, "diagramdata", NULL);
+ doc->root = xmlNewDocNode(doc, NULL, "diagram", NULL);
+
+ name_space = xmlNewNs(doc->root, "http://www.lysator.liu.se/~alla/dia/", "dia");
+
+ xmlSetNs(doc->root, name_space);
+
+ tree = xmlNewChild(doc->root, name_space, "diagramdata", NULL);
attr = new_attribute((ObjectNode)tree, "background");
data_add_color(attr, &data->bg_color);
@@ -613,7 +614,7 @@ diagram_data_save(DiagramData *data, con
obj_nr = 0;
for (i = 0; i < data->layers->len; i++) {
- layer_node = xmlNewChild(doc->root, NULL, "layer", NULL);
+ layer_node = xmlNewChild(doc->root, name_space, "layer", NULL);
layer = (Layer *) g_ptr_array_index(data->layers, i);
xmlSetProp(layer_node, "name", layer->name);
if (layer->visible)

View File

@ -0,0 +1,29 @@
--- lib/plug-ins.c.orig Fri Jun 1 02:01:37 2001
+++ lib/plug-ins.c Fri Jun 1 02:01:50 2001
@@ -435,7 +435,7 @@ plugin_load_inhibited(const gchar *filen
ensure_pluginrc();
for (node = pluginrc->root->childs; node != NULL; node = node->next) {
- CHAR *node_filename;
+ xmlChar *node_filename;
if (node->type != XML_ELEMENT_NODE || strcmp(node->name, "plugin") != 0)
continue;
@@ -472,7 +472,7 @@ info_fill_from_pluginrc(PluginInfo *info
ensure_pluginrc();
for (node = pluginrc->root->childs; node != NULL; node = node->next) {
- CHAR *node_filename;
+ xmlChar *node_filename;
if (node->type != XML_ELEMENT_NODE || strcmp(node->name, "plugin") != 0)
continue;
@@ -524,7 +524,7 @@ dia_pluginrc_write(void)
datanode = xmlNewChild(pluginnode, NULL, "inhibit-load", NULL);
for (node = pluginrc->root->childs; node != NULL; node = node->next) {
- CHAR *node_filename;
+ xmlChar *node_filename;
if (node->type != XML_ELEMENT_NODE || strcmp(node->name, "plugin") != 0)
continue;

View File

@ -0,0 +1,29 @@
--- objects/custom/shape_info.c.orig Fri Jun 1 02:15:40 2001
+++ objects/custom/shape_info.c Fri Jun 1 02:16:13 2001
@@ -501,7 +501,7 @@ static void
parse_svg_node(ShapeInfo *info, xmlNodePtr node, xmlNsPtr svg_ns,
GraphicStyle *style)
{
- CHAR *str;
+ char *str;
char *old_locale;
/* walk SVG node ... */
@@ -868,7 +868,7 @@ load_shape_info(const gchar *filename)
for (pt_node = node->childs; pt_node != NULL; pt_node = pt_node->next) {
if (pt_node->ns == shape_ns && !strcmp(pt_node->name, "point")) {
Point pt = { 0.0, 0.0 };
- CHAR *str;
+ char *str;
str = xmlGetProp(pt_node, "x");
if (str) {
@@ -891,7 +891,7 @@ load_shape_info(const gchar *filename)
info->connections = (Point *)arr->data;
g_array_free(arr, FALSE);
} else if (node->ns == shape_ns && !strcmp(node->name, "textbox")) {
- CHAR *str;
+ char *str;
str = xmlGetProp(node, "x1");
if (str) {

View File

@ -0,0 +1,11 @@
--- plug-ins/shape/shape-export.c.orig Fri Jun 1 13:38:55 2001
+++ plug-ins/shape/shape-export.c Fri Jun 1 13:39:17 2001
@@ -836,7 +836,7 @@ draw_string(RendererShape *renderer,
Point *pos, Alignment alignment,
Color *colour)
{
- CHAR *enc;
+ xmlChar *enc;
xmlNodePtr node;
char buf[512], *style, *tmp;
real saved_width;

View File

@ -0,0 +1,11 @@
--- plug-ins/svg/render_svg.c.orig Fri Jun 1 13:24:34 2001
+++ plug-ins/svg/render_svg.c Fri Jun 1 13:24:48 2001
@@ -743,7 +743,7 @@ draw_string(RendererSVG *renderer,
Point *pos, Alignment alignment,
Color *colour)
{
- CHAR *enc;
+ xmlChar *enc;
xmlNodePtr node;
char buf[512], *style, *tmp;
real saved_width;

View File

@ -1,57 +0,0 @@
--- po/Makefile.in.in.orig Sun Sep 10 06:48:27 2000
+++ po/Makefile.in.in Sun Sep 10 06:48:27 2000
@@ -111,9 +111,9 @@
install-data-no: all
install-data-yes: all
if test -r "$(MKINSTALLDIRS)"; then \
- $(MKINSTALLDIRS) $(datadir); \
+ $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
else \
- $(SHELL) $(top_srcdir)/mkinstalldirs $(datadir); \
+ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
fi
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
@@ -123,7 +123,7 @@
*) destdir=$(localedir);; \
esac; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
- dir=$$destdir/$$lang/LC_MESSAGES; \
+ dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
if test -r "$(MKINSTALLDIRS)"; then \
$(MKINSTALLDIRS) $$dir; \
else \
@@ -153,12 +153,12 @@
done
if test "$(PACKAGE)" = "gettext"; then \
if test -r "$(MKINSTALLDIRS)"; then \
- $(MKINSTALLDIRS) $(gettextsrcdir); \
+ $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
else \
- $(SHELL) $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
+ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
fi; \
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
- $(gettextsrcdir)/Makefile.in.in; \
+ $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
else \
: ; \
fi
@@ -171,12 +171,12 @@
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
- rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
- rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
- rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
- rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
done
- rm -f $(gettextsrcdir)/po-Makefile.in.in
+ rm -f $(DESTDIR)$(gettextsrcdir)/po-Makefile.in.in
check: all