[cairo-commit] libsvg ChangeLog, 1.58, 1.59 configure.in, 1.8, 1.9 libsvg.pc.in, 1.4, 1.5

Phil Blundell commit at pdx.freedesktop.org
Mon Feb 14 09:26:28 PST 2005


Committed by: pb

Update of /cvs/cairo/libsvg
In directory gabe:/tmp/cvs-serv13324

Modified Files:
	ChangeLog configure.in libsvg.pc.in 
Log Message:
2005-02-14  Phil Blundell  <philb at gnu.org>

	* configure.in: Add "--with-expat" flag.
	(LIBSVG_PARSER_BACKEND, LIBSVG_REQUIRES): Define appropriately.
	(EXPAT): New automake conditional.
	* libsvg.pc.in (Requires): Use value from LIBSVG_REQUIRES.
	* src/svgint.h (svg_xml_parser_context_t, svg_hash_table_t,
	_svg_xml_hash_add_entry, _svg_xml_hash_lookup,
	_svg_xml_hash_create, _svg_xml_hash_free, _svg_xml_strdup):
	Declare.
	(struct svg, struct svg_parser): Use svg_hash_table_t and
	svg_xml_parser_context_t.
	* src/svg.c (_svg_init, _svg_deinit, _svg_store_element_by_id,
	_svg_fetch_element_by_id): Replace direct calls to xmlHash
	functions with _svg_xml_hash equivalents.	
	* src/svg_element.c (_svg_element_apply_attributes): Use
	_svg_xml_strdup in place of xmlMemStrdup.
	(_svg_element_init_copy): Likewise.
	* src/svg_parser.c (SVG_PARSER_SAX_HANDLER, _svg_parser_init,
	_svg_parser_deinit, _svg_parser_begin, _svg_parser_parse_chunk,
	_svg_parser_end, _svg_parser_sax_get_entity,
	_svg_parser_sax_entity_decl, _svg_parser_sax_warning,
	_svg_parser_sax_error, _svg_parser_sax_fatal_error): Move to
	new file svg_parser_libxml.c.
	(_svg_parser_sax_start_element, _svg_parser_sax_end_element,
	_svg_parser_sax_characters): Make linkage global.  Move
	declarations to svgint.h.
	* src/svg_parser_expat.c: New file.
	* src/svg_hash.c, src/svg_hash.h: New files.  Code supplied by
	Chris Osgood.	
	* src/Makefile.am (LIBSVG_EXTRA_SOURCES): Select expat or libxml
	parser backend as appropriate.
	(libsvg_la_SOURCES): Include LIBSVG_EXTRA_SOURCES.



Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/libsvg/ChangeLog,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- ChangeLog	13 Feb 2005 13:27:14 -0000	1.58
+++ ChangeLog	14 Feb 2005 17:26:26 -0000	1.59
@@ -1,3 +1,37 @@
+2005-02-14  Phil Blundell  <philb at gnu.org>
+
+	* configure.in: Add "--with-expat" flag.
+	(LIBSVG_PARSER_BACKEND, LIBSVG_REQUIRES): Define appropriately.
+	(EXPAT): New automake conditional.
+	* libsvg.pc.in (Requires): Use value from LIBSVG_REQUIRES.
+	* src/svgint.h (svg_xml_parser_context_t, svg_hash_table_t,
+	_svg_xml_hash_add_entry, _svg_xml_hash_lookup,
+	_svg_xml_hash_create, _svg_xml_hash_free, _svg_xml_strdup):
+	Declare.
+	(struct svg, struct svg_parser): Use svg_hash_table_t and
+	svg_xml_parser_context_t.
+	* src/svg.c (_svg_init, _svg_deinit, _svg_store_element_by_id,
+	_svg_fetch_element_by_id): Replace direct calls to xmlHash
+	functions with _svg_xml_hash equivalents.	
+	* src/svg_element.c (_svg_element_apply_attributes): Use
+	_svg_xml_strdup in place of xmlMemStrdup.
+	(_svg_element_init_copy): Likewise.
+	* src/svg_parser.c (SVG_PARSER_SAX_HANDLER, _svg_parser_init,
+	_svg_parser_deinit, _svg_parser_begin, _svg_parser_parse_chunk,
+	_svg_parser_end, _svg_parser_sax_get_entity,
+	_svg_parser_sax_entity_decl, _svg_parser_sax_warning,
+	_svg_parser_sax_error, _svg_parser_sax_fatal_error): Move to
+	new file svg_parser_libxml.c.
+	(_svg_parser_sax_start_element, _svg_parser_sax_end_element,
+	_svg_parser_sax_characters): Make linkage global.  Move
+	declarations to svgint.h.
+	* src/svg_parser_expat.c: New file.
+	* src/svg_hash.c, src/svg_hash.h: New files.  Code supplied by
+	Chris Osgood.	
+	* src/Makefile.am (LIBSVG_EXTRA_SOURCES): Select expat or libxml
+	parser backend as appropriate.
+	(libsvg_la_SOURCES): Include LIBSVG_EXTRA_SOURCES.
+
 2005-02-13  Carl Worth  <cworth at cworth.org>
 
 	* configure.in: Increment version to 0.1.3-head after tagging the

Index: configure.in
===================================================================
RCS file: /cvs/cairo/libsvg/configure.in,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- configure.in	13 Feb 2005 13:27:14 -0000	1.8
+++ configure.in	14 Feb 2005 17:26:26 -0000	1.9
@@ -38,9 +38,27 @@
 
 dnl ===========================================================================
 
-PKG_CHECK_MODULES(LIBSVG, libxml-2.0 >= 2.4.7 )
+AC_MSG_CHECKING(whether libexpat is requested)
+AC_ARG_WITH(expat, [AC_HELP_STRING([--with-expat], [use expat XML parser])],
+	[with_expat="$withval"], [with_expat=no])
+AC_MSG_RESULT($with_expat)
+
+dnl ===========================================================================
+
+if test $with_expat = "yes"; then
+  LIBSVG_CFLAGS="-DLIBSVG_EXPAT"
+  LIBSVG_LIBS="-lexpat"
+  LIBSVG_PARSER_BACKEND="expat"
+  LIBSVG_REQUIRES=""
+else
+  PKG_CHECK_MODULES(LIBSVG, libxml-2.0 >= 2.4.7 )
+  LIBSVG_PARSER_BACKEND="libxml"
+  LIBSVG_REQUIRES="libxml-2.0"
+fi
 AC_SUBST(LIBSVG_CFLAGS)
 AC_SUBST(LIBSVG_LIBS)
+AC_SUBST(LIBSVG_REQUIRES)
+AM_CONDITIONAL(EXPAT, test $LIBSVG_PARSER_BACKEND = "expat")
 
 dnl ===========================================================================
 

Index: libsvg.pc.in
===================================================================
RCS file: /cvs/cairo/libsvg/libsvg.pc.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- libsvg.pc.in	19 Feb 2003 17:42:37 -0000	1.4
+++ libsvg.pc.in	14 Feb 2005 17:26:26 -0000	1.5
@@ -6,6 +6,6 @@
 Name: libsvg
 Description: library for parsing SVG content
 Version: @VERSION@
-Requires: libxml-2.0
+Requires: @LIBSVG_REQUIRES@
 Libs: -L${libdir} -lsvg -lpng -ljpeg -lz
-Cflags: -I${includedir}
\ No newline at end of file
+Cflags: -I${includedir}




More information about the cairo-commit mailing list