coupa-libxml-ruby 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +488 -0
- data/LICENSE +22 -0
- data/README +161 -0
- data/Rakefile +188 -0
- data/doc/css/normal.css +182 -0
- data/doc/img/raze-tiny.png +0 -0
- data/doc/img/red-cube.jpg +0 -0
- data/doc/img/xml-ruby.png +0 -0
- data/doc/index.xml +43 -0
- data/doc/install.xml +77 -0
- data/doc/layout.rhtml +38 -0
- data/doc/layout.xsl +67 -0
- data/doc/license.xml +32 -0
- data/doc/log/changelog.xml +1324 -0
- data/doc/log/changelog.xsl +42 -0
- data/doc/rdoc/classes/LibXML.html +207 -0
- data/doc/rdoc/classes/LibXML/XML.html +407 -0
- data/doc/rdoc/classes/LibXML/XML/Attr.html +521 -0
- data/doc/rdoc/classes/LibXML/XML/AttrDecl.html +360 -0
- data/doc/rdoc/classes/LibXML/XML/Attributes.html +149 -0
- data/doc/rdoc/classes/LibXML/XML/Document.html +460 -0
- data/doc/rdoc/classes/LibXML/XML/Error.html +129 -0
- data/doc/rdoc/classes/LibXML/XML/HTMLParser.html +263 -0
- data/doc/rdoc/classes/LibXML/XML/Namespace.html +248 -0
- data/doc/rdoc/classes/LibXML/XML/Namespaces.html +200 -0
- data/doc/rdoc/classes/LibXML/XML/Node.html +1351 -0
- data/doc/rdoc/classes/LibXML/XML/Parser.html +328 -0
- data/doc/rdoc/classes/LibXML/XML/Reader.html +172 -0
- data/doc/rdoc/classes/LibXML/XML/SaxParser.html +232 -0
- data/doc/rdoc/classes/LibXML/XML/SaxParser/Callbacks.html +506 -0
- data/doc/rdoc/classes/LibXML/XML/SaxParser/VerboseCallbacks.html +555 -0
- data/doc/rdoc/classes/LibXML/XML/XPath.html +111 -0
- data/doc/rdoc/classes/LibXML/XML/XPath/Object.html +162 -0
- data/doc/rdoc/classes/cXMLDtd.html +114 -0
- data/doc/rdoc/classes/cXMLNode.html +114 -0
- data/doc/rdoc/created.rid +1 -0
- data/doc/rdoc/files/CHANGES.html +794 -0
- data/doc/rdoc/files/LICENSE.html +131 -0
- data/doc/rdoc/files/README.html +343 -0
- data/doc/rdoc/files/ext/libxml/libxml_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_attr_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_attr_decl_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_attributes_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_cbg_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_document_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_dtd_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_encoding_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_error_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_html_parser_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_html_parser_context_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_html_parser_options_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_input_cbg_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_io_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_namespace_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_namespaces_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_node_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_parser_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_parser_context_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_parser_options_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_reader_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_relaxng_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_sax2_handler_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_sax_parser_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_schema_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_xinclude_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_context_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_expression_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_object_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpointer_c.html +101 -0
- data/doc/rdoc/files/lib/libxml/attr_decl_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/attr_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/attributes_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/document_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/error_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/hpricot_rb.html +192 -0
- data/doc/rdoc/files/lib/libxml/html_parser_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/namespace_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/namespaces_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/node_rb.html +108 -0
- data/doc/rdoc/files/lib/libxml/ns_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/parser_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/properties_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/reader_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/sax_callbacks_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/sax_parser_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/tree_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/xpath_object_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml_rb.html +133 -0
- data/doc/rdoc/files/lib/xml/libxml_rb.html +124 -0
- data/doc/rdoc/files/lib/xml_rb.html +134 -0
- data/doc/rdoc/fr_class_index.html +46 -0
- data/doc/rdoc/fr_file_index.html +84 -0
- data/doc/rdoc/fr_method_index.html +155 -0
- data/doc/rdoc/index.html +24 -0
- data/doc/rdoc/rdoc-style.css +208 -0
- data/ext/libxml/Makefile +157 -0
- data/ext/libxml/build.log +4 -0
- data/ext/libxml/extconf.h +5 -0
- data/ext/libxml/extconf.rb +278 -0
- data/ext/libxml/libxml.c +77 -0
- data/ext/libxml/libxml.o +0 -0
- data/ext/libxml/libxml_ruby.bundle +0 -0
- data/ext/libxml/mkmf.log +228 -0
- data/ext/libxml/ruby_libxml.h +93 -0
- data/ext/libxml/ruby_xml.c +893 -0
- data/ext/libxml/ruby_xml.h +10 -0
- data/ext/libxml/ruby_xml.o +0 -0
- data/ext/libxml/ruby_xml_attr.c +352 -0
- data/ext/libxml/ruby_xml_attr.h +14 -0
- data/ext/libxml/ruby_xml_attr.o +0 -0
- data/ext/libxml/ruby_xml_attr_decl.c +171 -0
- data/ext/libxml/ruby_xml_attr_decl.h +13 -0
- data/ext/libxml/ruby_xml_attr_decl.o +0 -0
- data/ext/libxml/ruby_xml_attributes.c +277 -0
- data/ext/libxml/ruby_xml_attributes.h +17 -0
- data/ext/libxml/ruby_xml_attributes.o +0 -0
- data/ext/libxml/ruby_xml_cbg.c +86 -0
- data/ext/libxml/ruby_xml_cbg.o +0 -0
- data/ext/libxml/ruby_xml_document.c +1006 -0
- data/ext/libxml/ruby_xml_document.c.old +936 -0
- data/ext/libxml/ruby_xml_document.h +17 -0
- data/ext/libxml/ruby_xml_document.o +0 -0
- data/ext/libxml/ruby_xml_dtd.c +257 -0
- data/ext/libxml/ruby_xml_dtd.h +9 -0
- data/ext/libxml/ruby_xml_dtd.o +0 -0
- data/ext/libxml/ruby_xml_encoding.c +134 -0
- data/ext/libxml/ruby_xml_encoding.h +12 -0
- data/ext/libxml/ruby_xml_encoding.o +0 -0
- data/ext/libxml/ruby_xml_error.c +1004 -0
- data/ext/libxml/ruby_xml_error.h +14 -0
- data/ext/libxml/ruby_xml_error.o +0 -0
- data/ext/libxml/ruby_xml_html_parser.c +92 -0
- data/ext/libxml/ruby_xml_html_parser.h +12 -0
- data/ext/libxml/ruby_xml_html_parser.o +0 -0
- data/ext/libxml/ruby_xml_html_parser_context.c +308 -0
- data/ext/libxml/ruby_xml_html_parser_context.h +12 -0
- data/ext/libxml/ruby_xml_html_parser_context.o +0 -0
- data/ext/libxml/ruby_xml_html_parser_options.c +40 -0
- data/ext/libxml/ruby_xml_html_parser_options.h +12 -0
- data/ext/libxml/ruby_xml_html_parser_options.o +0 -0
- data/ext/libxml/ruby_xml_input_cbg.c +191 -0
- data/ext/libxml/ruby_xml_input_cbg.h +20 -0
- data/ext/libxml/ruby_xml_input_cbg.o +0 -0
- data/ext/libxml/ruby_xml_io.c +30 -0
- data/ext/libxml/ruby_xml_io.h +9 -0
- data/ext/libxml/ruby_xml_io.o +0 -0
- data/ext/libxml/ruby_xml_namespace.c +170 -0
- data/ext/libxml/ruby_xml_namespace.h +12 -0
- data/ext/libxml/ruby_xml_namespace.o +0 -0
- data/ext/libxml/ruby_xml_namespaces.c +295 -0
- data/ext/libxml/ruby_xml_namespaces.h +11 -0
- data/ext/libxml/ruby_xml_namespaces.o +0 -0
- data/ext/libxml/ruby_xml_node.c +1386 -0
- data/ext/libxml/ruby_xml_node.h +13 -0
- data/ext/libxml/ruby_xml_node.o +0 -0
- data/ext/libxml/ruby_xml_parser.c +94 -0
- data/ext/libxml/ruby_xml_parser.h +14 -0
- data/ext/libxml/ruby_xml_parser.o +0 -0
- data/ext/libxml/ruby_xml_parser_context.c +982 -0
- data/ext/libxml/ruby_xml_parser_context.h +12 -0
- data/ext/libxml/ruby_xml_parser_context.o +0 -0
- data/ext/libxml/ruby_xml_parser_options.c +68 -0
- data/ext/libxml/ruby_xml_parser_options.h +14 -0
- data/ext/libxml/ruby_xml_parser_options.o +0 -0
- data/ext/libxml/ruby_xml_reader.c +1002 -0
- data/ext/libxml/ruby_xml_reader.h +14 -0
- data/ext/libxml/ruby_xml_reader.o +0 -0
- data/ext/libxml/ruby_xml_relaxng.c +111 -0
- data/ext/libxml/ruby_xml_relaxng.h +10 -0
- data/ext/libxml/ruby_xml_relaxng.o +0 -0
- data/ext/libxml/ruby_xml_sax2_handler.c +322 -0
- data/ext/libxml/ruby_xml_sax2_handler.h +12 -0
- data/ext/libxml/ruby_xml_sax2_handler.o +0 -0
- data/ext/libxml/ruby_xml_sax_parser.c +137 -0
- data/ext/libxml/ruby_xml_sax_parser.h +12 -0
- data/ext/libxml/ruby_xml_sax_parser.o +0 -0
- data/ext/libxml/ruby_xml_schema.c +159 -0
- data/ext/libxml/ruby_xml_schema.h +11 -0
- data/ext/libxml/ruby_xml_schema.o +0 -0
- data/ext/libxml/ruby_xml_version.h +9 -0
- data/ext/libxml/ruby_xml_xinclude.c +18 -0
- data/ext/libxml/ruby_xml_xinclude.h +13 -0
- data/ext/libxml/ruby_xml_xinclude.o +0 -0
- data/ext/libxml/ruby_xml_xpath.c +107 -0
- data/ext/libxml/ruby_xml_xpath.h +12 -0
- data/ext/libxml/ruby_xml_xpath.o +0 -0
- data/ext/libxml/ruby_xml_xpath_context.c +387 -0
- data/ext/libxml/ruby_xml_xpath_context.h +11 -0
- data/ext/libxml/ruby_xml_xpath_context.o +0 -0
- data/ext/libxml/ruby_xml_xpath_expression.c +83 -0
- data/ext/libxml/ruby_xml_xpath_expression.h +12 -0
- data/ext/libxml/ruby_xml_xpath_expression.o +0 -0
- data/ext/libxml/ruby_xml_xpath_object.c +336 -0
- data/ext/libxml/ruby_xml_xpath_object.h +19 -0
- data/ext/libxml/ruby_xml_xpath_object.o +0 -0
- data/ext/libxml/ruby_xml_xpointer.c +101 -0
- data/ext/libxml/ruby_xml_xpointer.h +13 -0
- data/ext/libxml/ruby_xml_xpointer.o +0 -0
- data/ext/mingw/Rakefile +34 -0
- data/ext/mingw/build.rake +41 -0
- data/ext/vc/libxml_ruby.sln +26 -0
- data/lib/libxml.rb +30 -0
- data/lib/libxml/attr.rb +111 -0
- data/lib/libxml/attr_decl.rb +78 -0
- data/lib/libxml/attributes.rb +12 -0
- data/lib/libxml/document.rb +190 -0
- data/lib/libxml/error.rb +88 -0
- data/lib/libxml/hpricot.rb +76 -0
- data/lib/libxml/html_parser.rb +94 -0
- data/lib/libxml/namespace.rb +60 -0
- data/lib/libxml/namespaces.rb +36 -0
- data/lib/libxml/node.rb +385 -0
- data/lib/libxml/ns.rb +20 -0
- data/lib/libxml/parser.rb +365 -0
- data/lib/libxml/properties.rb +21 -0
- data/lib/libxml/reader.rb +27 -0
- data/lib/libxml/sax_callbacks.rb +178 -0
- data/lib/libxml/sax_parser.rb +56 -0
- data/lib/libxml/tree.rb +27 -0
- data/lib/libxml/xpath_object.rb +14 -0
- data/lib/xml.rb +14 -0
- data/lib/xml/libxml.rb +8 -0
- data/setup.rb +1585 -0
- data/test/etc_doc_to_s.rb +19 -0
- data/test/ets_doc_file.rb +15 -0
- data/test/ets_doc_to_s.rb +21 -0
- data/test/ets_gpx.rb +26 -0
- data/test/ets_node_gc.rb +21 -0
- data/test/ets_test.xml +2 -0
- data/test/ets_tsr.rb +9 -0
- data/test/model/atom.xml +13 -0
- data/test/model/bands.xml +5 -0
- data/test/model/books.xml +146 -0
- data/test/model/merge_bug_data.xml +58 -0
- data/test/model/ruby-lang.html +238 -0
- data/test/model/rubynet.xml +79 -0
- data/test/model/rubynet_project +1 -0
- data/test/model/shiporder.rnc +28 -0
- data/test/model/shiporder.rng +86 -0
- data/test/model/shiporder.xml +23 -0
- data/test/model/shiporder.xsd +31 -0
- data/test/model/soap.xml +27 -0
- data/test/model/xinclude.xml +5 -0
- data/test/tc_attr.rb +170 -0
- data/test/tc_attr_decl.rb +131 -0
- data/test/tc_attributes.rb +133 -0
- data/test/tc_deprecated_require.rb +11 -0
- data/test/tc_document.rb +113 -0
- data/test/tc_document_write.rb +118 -0
- data/test/tc_dtd.rb +123 -0
- data/test/tc_error.rb +136 -0
- data/test/tc_html_parser.rb +138 -0
- data/test/tc_namespace.rb +59 -0
- data/test/tc_namespaces.rb +174 -0
- data/test/tc_node.rb +181 -0
- data/test/tc_node_cdata.rb +49 -0
- data/test/tc_node_comment.rb +30 -0
- data/test/tc_node_copy.rb +40 -0
- data/test/tc_node_edit.rb +158 -0
- data/test/tc_node_text.rb +69 -0
- data/test/tc_node_write.rb +83 -0
- data/test/tc_node_xlink.rb +26 -0
- data/test/tc_parser.rb +330 -0
- data/test/tc_parser_context.rb +186 -0
- data/test/tc_properties.rb +36 -0
- data/test/tc_reader.rb +284 -0
- data/test/tc_relaxng.rb +51 -0
- data/test/tc_sax_parser.rb +274 -0
- data/test/tc_schema.rb +51 -0
- data/test/tc_traversal.rb +220 -0
- data/test/tc_xinclude.rb +19 -0
- data/test/tc_xml.rb +224 -0
- data/test/tc_xpath.rb +193 -0
- data/test/tc_xpath_context.rb +78 -0
- data/test/tc_xpath_expression.rb +35 -0
- data/test/tc_xpointer.rb +72 -0
- data/test/test_suite.rb +33 -0
- metadata +376 -0
data/ext/libxml/Makefile
ADDED
@@ -0,0 +1,157 @@
|
|
1
|
+
|
2
|
+
SHELL = /bin/sh
|
3
|
+
|
4
|
+
#### Start of system configuration section. ####
|
5
|
+
|
6
|
+
srcdir = /Users/victor/code/libxml-ruby/ext/libxml
|
7
|
+
topdir = /opt/local/lib/ruby/1.8/i686-darwin10
|
8
|
+
hdrdir = $(topdir)
|
9
|
+
VPATH = $(srcdir):$(topdir):$(hdrdir)
|
10
|
+
exec_prefix = $(prefix)
|
11
|
+
prefix = $(DESTDIR)/opt/local
|
12
|
+
sharedstatedir = $(prefix)/com
|
13
|
+
mandir = $(DESTDIR)/opt/local/share/man
|
14
|
+
psdir = $(docdir)
|
15
|
+
oldincludedir = $(DESTDIR)/usr/include
|
16
|
+
localedir = $(datarootdir)/locale
|
17
|
+
bindir = $(exec_prefix)/bin
|
18
|
+
libexecdir = $(exec_prefix)/libexec
|
19
|
+
sitedir = $(libdir)/ruby/site_ruby
|
20
|
+
htmldir = $(docdir)
|
21
|
+
vendorarchdir = $(vendorlibdir)/$(sitearch)
|
22
|
+
includedir = $(prefix)/include
|
23
|
+
infodir = $(datarootdir)/info
|
24
|
+
vendorlibdir = $(vendordir)/$(ruby_version)
|
25
|
+
sysconfdir = $(prefix)/etc
|
26
|
+
libdir = $(exec_prefix)/lib
|
27
|
+
sbindir = $(exec_prefix)/sbin
|
28
|
+
rubylibdir = $(libdir)/ruby/$(ruby_version)
|
29
|
+
docdir = $(datarootdir)/doc/$(PACKAGE)
|
30
|
+
dvidir = $(docdir)
|
31
|
+
vendordir = $(DESTDIR)/opt/local/lib/ruby/vendor_ruby
|
32
|
+
datarootdir = $(prefix)/share
|
33
|
+
pdfdir = $(docdir)
|
34
|
+
archdir = $(rubylibdir)/$(arch)
|
35
|
+
sitearchdir = $(sitelibdir)/$(sitearch)
|
36
|
+
datadir = $(datarootdir)
|
37
|
+
localstatedir = $(prefix)/var
|
38
|
+
sitelibdir = $(sitedir)/$(ruby_version)
|
39
|
+
|
40
|
+
CC = /usr/bin/gcc-4.2
|
41
|
+
LIBRUBY = $(LIBRUBY_SO)
|
42
|
+
LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
|
43
|
+
LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
|
44
|
+
LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
|
45
|
+
|
46
|
+
RUBY_EXTCONF_H = extconf.h
|
47
|
+
CFLAGS = -fno-common -O2 -arch x86_64 -fno-common -pipe -fno-common $(cflags) -I/opt/local/include/libxml2 -I. -I/opt/local/lib/ruby/1.8/i686-darwin10 -I/Users/victor/code/libxml-ruby/ext/libxml -I/usr/local/include -arch x86_64
|
48
|
+
INCFLAGS = -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin10 -I/Users/victor/code/libxml-ruby/ext/libxml -I/usr/local/include
|
49
|
+
DEFS =
|
50
|
+
CPPFLAGS = -DRUBY_EXTCONF_H=\"$(RUBY_EXTCONF_H)\" -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/opt/local/include
|
51
|
+
CXXFLAGS = $(CFLAGS)
|
52
|
+
ldflags = -L. -L/opt/local/lib
|
53
|
+
dldflags =
|
54
|
+
archflag = -arch x86_64
|
55
|
+
DLDFLAGS = $(ldflags) $(dldflags) $(archflag)
|
56
|
+
LDSHARED = $(CC) -dynamic -bundle -undefined suppress -flat_namespace
|
57
|
+
AR = ar
|
58
|
+
EXEEXT =
|
59
|
+
|
60
|
+
RUBY_INSTALL_NAME = ruby
|
61
|
+
RUBY_SO_NAME = ruby
|
62
|
+
arch = i686-darwin10
|
63
|
+
sitearch = i686-darwin10
|
64
|
+
ruby_version = 1.8
|
65
|
+
ruby = /opt/local/bin/ruby
|
66
|
+
RUBY = $(ruby)
|
67
|
+
RM = rm -f
|
68
|
+
MAKEDIRS = mkdir -p
|
69
|
+
INSTALL = /usr/bin/install -c
|
70
|
+
INSTALL_PROG = $(INSTALL) -m 0755
|
71
|
+
INSTALL_DATA = $(INSTALL) -m 644
|
72
|
+
COPY = cp
|
73
|
+
|
74
|
+
#### End of system configuration section. ####
|
75
|
+
|
76
|
+
preload =
|
77
|
+
|
78
|
+
libpath = . $(libdir) /opt/local/lib
|
79
|
+
LIBPATH = -L. -L$(libdir) -L/opt/local/lib
|
80
|
+
DEFFILE =
|
81
|
+
|
82
|
+
CLEANFILES = mkmf.log
|
83
|
+
DISTCLEANFILES =
|
84
|
+
|
85
|
+
extout =
|
86
|
+
extout_prefix =
|
87
|
+
target_prefix =
|
88
|
+
LOCAL_LIBS =
|
89
|
+
LIBS = $(LIBRUBYARG_SHARED) -L/opt/local/lib -lxml2 -lz -lpthread -liconv -lm -liconv -lz -lm -lpthread -ldl -lobjc
|
90
|
+
SRCS = libxml.c ruby_xml.c ruby_xml_attr.c ruby_xml_attr_decl.c ruby_xml_attributes.c ruby_xml_cbg.c ruby_xml_document.c ruby_xml_dtd.c ruby_xml_encoding.c ruby_xml_error.c ruby_xml_html_parser.c ruby_xml_html_parser_context.c ruby_xml_html_parser_options.c ruby_xml_input_cbg.c ruby_xml_io.c ruby_xml_namespace.c ruby_xml_namespaces.c ruby_xml_node.c ruby_xml_parser.c ruby_xml_parser_context.c ruby_xml_parser_options.c ruby_xml_reader.c ruby_xml_relaxng.c ruby_xml_sax2_handler.c ruby_xml_sax_parser.c ruby_xml_schema.c ruby_xml_xinclude.c ruby_xml_xpath.c ruby_xml_xpath_context.c ruby_xml_xpath_expression.c ruby_xml_xpath_object.c ruby_xml_xpointer.c
|
91
|
+
OBJS = libxml.o ruby_xml.o ruby_xml_attr.o ruby_xml_attr_decl.o ruby_xml_attributes.o ruby_xml_cbg.o ruby_xml_document.o ruby_xml_dtd.o ruby_xml_encoding.o ruby_xml_error.o ruby_xml_html_parser.o ruby_xml_html_parser_context.o ruby_xml_html_parser_options.o ruby_xml_input_cbg.o ruby_xml_io.o ruby_xml_namespace.o ruby_xml_namespaces.o ruby_xml_node.o ruby_xml_parser.o ruby_xml_parser_context.o ruby_xml_parser_options.o ruby_xml_reader.o ruby_xml_relaxng.o ruby_xml_sax2_handler.o ruby_xml_sax_parser.o ruby_xml_schema.o ruby_xml_xinclude.o ruby_xml_xpath.o ruby_xml_xpath_context.o ruby_xml_xpath_expression.o ruby_xml_xpath_object.o ruby_xml_xpointer.o
|
92
|
+
TARGET = libxml_ruby
|
93
|
+
DLLIB = $(TARGET).bundle
|
94
|
+
EXTSTATIC =
|
95
|
+
STATIC_LIB =
|
96
|
+
|
97
|
+
BINDIR = $(bindir)
|
98
|
+
RUBYCOMMONDIR = $(sitedir)$(target_prefix)
|
99
|
+
RUBYLIBDIR = $(sitelibdir)$(target_prefix)
|
100
|
+
RUBYARCHDIR = $(sitearchdir)$(target_prefix)
|
101
|
+
|
102
|
+
TARGET_SO = $(DLLIB)
|
103
|
+
CLEANLIBS = $(TARGET).bundle $(TARGET).il? $(TARGET).tds $(TARGET).map
|
104
|
+
CLEANOBJS = *.o *.a *.s[ol] *.pdb *.exp *.bak
|
105
|
+
|
106
|
+
all: $(DLLIB)
|
107
|
+
static: $(STATIC_LIB)
|
108
|
+
|
109
|
+
clean:
|
110
|
+
@-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)
|
111
|
+
|
112
|
+
distclean: clean
|
113
|
+
@-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
|
114
|
+
@-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
|
115
|
+
|
116
|
+
realclean: distclean
|
117
|
+
install: install-so install-rb
|
118
|
+
|
119
|
+
install-so: $(RUBYARCHDIR)
|
120
|
+
install-so: $(RUBYARCHDIR)/$(DLLIB)
|
121
|
+
$(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
|
122
|
+
$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
|
123
|
+
install-rb: pre-install-rb install-rb-default
|
124
|
+
install-rb-default: pre-install-rb-default
|
125
|
+
pre-install-rb: Makefile
|
126
|
+
pre-install-rb-default: Makefile
|
127
|
+
$(RUBYARCHDIR):
|
128
|
+
$(MAKEDIRS) $@
|
129
|
+
|
130
|
+
site-install: site-install-so site-install-rb
|
131
|
+
site-install-so: install-so
|
132
|
+
site-install-rb: install-rb
|
133
|
+
|
134
|
+
.SUFFIXES: .c .m .cc .cxx .cpp .C .o
|
135
|
+
|
136
|
+
.cc.o:
|
137
|
+
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
138
|
+
|
139
|
+
.cxx.o:
|
140
|
+
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
141
|
+
|
142
|
+
.cpp.o:
|
143
|
+
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
144
|
+
|
145
|
+
.C.o:
|
146
|
+
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
147
|
+
|
148
|
+
.c.o:
|
149
|
+
$(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) -c $<
|
150
|
+
|
151
|
+
$(DLLIB): $(OBJS) Makefile
|
152
|
+
@-$(RM) $@
|
153
|
+
$(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
$(OBJS): ruby.h defines.h $(RUBY_EXTCONF_H)
|
@@ -0,0 +1,278 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'rbconfig'
|
4
|
+
|
5
|
+
def method_missing(s, *args)
|
6
|
+
if v = Config::CONFIG[s] || Config::CONFIG[s.upcase]
|
7
|
+
return v
|
8
|
+
else
|
9
|
+
puts "missing: #{s}"
|
10
|
+
super
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
require 'mkmf'
|
15
|
+
|
16
|
+
if defined?(CFLAGS)
|
17
|
+
if CFLAGS.index(CONFIG['CCDLFLAGS'])
|
18
|
+
$CFLAGS = CFLAGS + ' ' + CONFIG['CCDLFLAGS']
|
19
|
+
else
|
20
|
+
$CFLAGS = CFLAGS
|
21
|
+
end
|
22
|
+
else
|
23
|
+
$CFLAGS = CONFIG['CFLAGS']
|
24
|
+
end
|
25
|
+
$LDFLAGS = CONFIG['LDFLAGS']
|
26
|
+
$LIBPATH.push(Config::CONFIG['libdir'])
|
27
|
+
|
28
|
+
def crash(str)
|
29
|
+
printf(" extconf failure: %s\n", str)
|
30
|
+
exit 1
|
31
|
+
end
|
32
|
+
|
33
|
+
dir_config('iconv')
|
34
|
+
dir_config('zlib')
|
35
|
+
|
36
|
+
have_library('socket','socket')
|
37
|
+
have_library('nsl','gethostbyname')
|
38
|
+
|
39
|
+
unless have_library('m', 'atan')
|
40
|
+
# try again for gcc 4.0
|
41
|
+
saveflags = $CFLAGS
|
42
|
+
$CFLAGS += ' -fno-builtin'
|
43
|
+
unless have_library('m', 'atan')
|
44
|
+
crash('need libm')
|
45
|
+
end
|
46
|
+
$CFLAGS = saveflags
|
47
|
+
end
|
48
|
+
|
49
|
+
unless have_library('z', 'inflate') or
|
50
|
+
have_library('zlib', 'inflate') or
|
51
|
+
have_library('zlib1', 'inflate')
|
52
|
+
crash('need zlib')
|
53
|
+
else
|
54
|
+
$defs.push('-DHAVE_ZLIB_H')
|
55
|
+
end
|
56
|
+
|
57
|
+
unless have_library('iconv','iconv_open') or
|
58
|
+
have_library('iconv','libiconv_open') or
|
59
|
+
have_library('libiconv', 'libiconv_open') or
|
60
|
+
have_library('libiconv', 'iconv_open') or
|
61
|
+
have_library('c','iconv_open') or
|
62
|
+
have_library('recode','iconv_open') or
|
63
|
+
have_library('iconv')
|
64
|
+
crash(<<EOL)
|
65
|
+
need libiconv.
|
66
|
+
|
67
|
+
Install the libiconv or try passing one of the following options
|
68
|
+
to extconf.rb:
|
69
|
+
|
70
|
+
--with-iconv-dir=/path/to/iconv
|
71
|
+
--with-iconv-lib=/path/to/iconv/lib
|
72
|
+
--with-iconv-include=/path/to/iconv/include
|
73
|
+
EOL
|
74
|
+
end
|
75
|
+
|
76
|
+
if (xc = with_config('xml2-config')) or RUBY_PLATFORM.match(/darwin/i) then
|
77
|
+
xc = 'xml2-config' if xc == true or xc.nil?
|
78
|
+
cflags = `#{xc} --cflags`.chomp
|
79
|
+
if $? != 0
|
80
|
+
cflags = nil
|
81
|
+
else
|
82
|
+
libs = `#{xc} --libs`.chomp
|
83
|
+
if $? != 0
|
84
|
+
libs = nil
|
85
|
+
else
|
86
|
+
$CFLAGS += ' ' + cflags
|
87
|
+
$libs = libs + " " + $libs
|
88
|
+
end
|
89
|
+
end
|
90
|
+
else
|
91
|
+
dir_config('xml2')
|
92
|
+
end
|
93
|
+
|
94
|
+
unless (cflags and libs) or
|
95
|
+
(have_library('xml2', 'xmlParseDoc') or
|
96
|
+
have_library('libxml2', 'xmlParseDoc') or
|
97
|
+
find_library('xml2', 'xmlParseDoc', '/opt/lib', '/usr/local/lib', '/usr/lib')) and
|
98
|
+
(have_header('libxml/xmlversion.h') or
|
99
|
+
find_header('libxml/xmlversion.h',
|
100
|
+
"#{CONFIG['prefix']}/include",
|
101
|
+
"#{CONFIG['prefix']}/include/libxml2",
|
102
|
+
'/opt/include/libxml2',
|
103
|
+
'/usr/local/include/libxml2',
|
104
|
+
'/usr/include/libxml2'))
|
105
|
+
crash(<<EOL)
|
106
|
+
need libxml2.
|
107
|
+
|
108
|
+
Install the library or try one of the following options to extconf.rb:
|
109
|
+
|
110
|
+
--with-xml2-config=/path/to/xml2-config
|
111
|
+
--with-xml2-dir=/path/to/libxml2
|
112
|
+
--with-xml2-lib=/path/to/libxml2/lib
|
113
|
+
--with-xml2-include=/path/to/libxml2/include
|
114
|
+
EOL
|
115
|
+
end
|
116
|
+
|
117
|
+
# For FreeBSD add /usr/local/include
|
118
|
+
$INCFLAGS << " -I/usr/local/include"
|
119
|
+
|
120
|
+
$CFLAGS << ' ' << $INCFLAGS
|
121
|
+
#$INSTALLFILES = [["libxml.rb", "$(RUBYLIBDIR)", "../xml"]]
|
122
|
+
|
123
|
+
create_header()
|
124
|
+
create_makefile('libxml_ruby')
|
125
|
+
|
126
|
+
__END__
|
127
|
+
|
128
|
+
SHELL = /bin/sh
|
129
|
+
|
130
|
+
#### Start of system configuration section. ####
|
131
|
+
|
132
|
+
# I think we can remove all the parts related to the install target
|
133
|
+
# since setup.rb and RubyGems handles that on their own. Correct?
|
134
|
+
|
135
|
+
srcdir = .
|
136
|
+
topdir = #{archdir} #/usr/lib/ruby/1.8/x86_64-linux
|
137
|
+
hdrdir = $(topdir)
|
138
|
+
VPATH = $(srcdir):$(topdir):$(hdrdir)
|
139
|
+
prefix = $(DESTDIR)/usr
|
140
|
+
exec_prefix = $(DESTDIR)/usr
|
141
|
+
sitedir = $(DESTDIR)/usr/local/lib/site_ruby
|
142
|
+
rubylibdir = $(libdir)/ruby/$(ruby_version)
|
143
|
+
docdir = $(datarootdir)/doc/$(PACKAGE)
|
144
|
+
dvidir = $(docdir)
|
145
|
+
datarootdir = $(prefix)/share
|
146
|
+
archdir = $(rubylibdir)/$(arch)
|
147
|
+
sbindir = $(exec_prefix)/sbin
|
148
|
+
psdir = $(docdir)
|
149
|
+
localedir = $(datarootdir)/locale
|
150
|
+
htmldir = $(docdir)
|
151
|
+
datadir = $(datarootdir)
|
152
|
+
includedir = $(prefix)/include
|
153
|
+
infodir = $(prefix)/share/info
|
154
|
+
sysconfdir = $(DESTDIR)/etc
|
155
|
+
mandir = $(prefix)/share/man
|
156
|
+
libdir = $(DESTDIR)/usr/lib
|
157
|
+
sharedstatedir = $(prefix)/com
|
158
|
+
oldincludedir = $(DESTDIR)/usr/include
|
159
|
+
pdfdir = $(docdir)
|
160
|
+
sitearchdir = $(sitelibdir)/$(sitearch)
|
161
|
+
bindir = $(exec_prefix)/bin
|
162
|
+
localstatedir = $(DESTDIR)/var
|
163
|
+
sitelibdir = $(sitedir)/$(ruby_version)
|
164
|
+
libexecdir = $(prefix)/lib/ruby1.8
|
165
|
+
|
166
|
+
CC = cc
|
167
|
+
LIBRUBY = $(LIBRUBY_SO)
|
168
|
+
LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
|
169
|
+
LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
|
170
|
+
LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
|
171
|
+
|
172
|
+
RUBY_EXTCONF_H = extconf.h
|
173
|
+
CFLAGS = -fPIC -fno-strict-aliasing -g -O2 -fPIC -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -I/usr/include/libxml2
|
174
|
+
INCFLAGS = -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -I/usr/include/libxml2
|
175
|
+
CPPFLAGS = -DRUBY_EXTCONF_H=\"$(RUBY_EXTCONF_H)\"
|
176
|
+
CXXFLAGS = $(CFLAGS)
|
177
|
+
DLDFLAGS = -L. -rdynamic -Wl,-export-dynamic
|
178
|
+
LDSHARED = $(CC) -shared
|
179
|
+
AR = ar
|
180
|
+
EXEEXT =
|
181
|
+
|
182
|
+
RUBY_INSTALL_NAME = ruby1.8
|
183
|
+
RUBY_SO_NAME = ruby1.8
|
184
|
+
arch = x86_64-linux
|
185
|
+
sitearch = x86_64-linux
|
186
|
+
ruby_version = 1.8
|
187
|
+
ruby = /usr/bin/ruby1.8
|
188
|
+
RUBY = $(ruby)
|
189
|
+
RM = rm -f
|
190
|
+
MAKEDIRS = mkdir -p
|
191
|
+
INSTALL = /usr/bin/install -c
|
192
|
+
INSTALL_PROG = $(INSTALL) -m 0755
|
193
|
+
INSTALL_DATA = $(INSTALL) -m 644
|
194
|
+
COPY = cp
|
195
|
+
|
196
|
+
preload =
|
197
|
+
|
198
|
+
libpath = . $(libdir) /usr/lib
|
199
|
+
LIBPATH = -L"." -L"$(libdir)" -L"/usr/lib"
|
200
|
+
DEFFILE =
|
201
|
+
|
202
|
+
CLEANFILES =
|
203
|
+
DISTCLEANFILES =
|
204
|
+
|
205
|
+
extout =
|
206
|
+
extout_prefix =
|
207
|
+
target_prefix = /xml
|
208
|
+
LOCAL_LIBS =
|
209
|
+
LIBS = $(LIBRUBYARG_SHARED) -lxml2 -lc -lz -lm -lnsl -lpthread -ldl -lcrypt -lm -lc
|
210
|
+
|
211
|
+
SRCS = #{srcs.join(' ')}
|
212
|
+
OBJS = #{objs.join(' ')}
|
213
|
+
|
214
|
+
TARGET = #{target}
|
215
|
+
DLLIB = $(TARGET).so
|
216
|
+
EXTSTATIC =
|
217
|
+
STATIC_LIB =
|
218
|
+
|
219
|
+
RUBYCOMMONDIR = $(sitedir)$(target_prefix)
|
220
|
+
RUBYLIBDIR = $(sitelibdir)$(target_prefix)
|
221
|
+
RUBYARCHDIR = $(sitearchdir)$(target_prefix)
|
222
|
+
|
223
|
+
TARGET_SO = $(DLLIB)
|
224
|
+
CLEANLIBS = $(TARGET).so $(TARGET).il? $(TARGET).tds $(TARGET).map
|
225
|
+
CLEANOBJS = *.o *.a *.s[ol] *.pdb *.exp *.bak
|
226
|
+
|
227
|
+
all: $(DLLIB)
|
228
|
+
static: $(STATIC_LIB)
|
229
|
+
|
230
|
+
clean:
|
231
|
+
@-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)
|
232
|
+
|
233
|
+
distclean: clean
|
234
|
+
@-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
|
235
|
+
@-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
|
236
|
+
|
237
|
+
realclean: distclean
|
238
|
+
install: install-so install-rb
|
239
|
+
|
240
|
+
install-so: $(RUBYARCHDIR)
|
241
|
+
install-so: $(RUBYARCHDIR)/$(DLLIB)
|
242
|
+
$(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
|
243
|
+
$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
|
244
|
+
install-rb: pre-install-rb install-rb-default
|
245
|
+
install-rb-default: pre-install-rb-default
|
246
|
+
pre-install-rb: Makefile
|
247
|
+
pre-install-rb-default: Makefile
|
248
|
+
$(RUBYARCHDIR):
|
249
|
+
$(MAKEDIRS) $@
|
250
|
+
|
251
|
+
site-install: site-install-so site-install-rb
|
252
|
+
site-install-so: install-so
|
253
|
+
site-install-rb: install-rb
|
254
|
+
|
255
|
+
.SUFFIXES: .c .m .cc .cxx .cpp .C .o
|
256
|
+
|
257
|
+
.cc.o:
|
258
|
+
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
259
|
+
|
260
|
+
.cxx.o:
|
261
|
+
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
262
|
+
|
263
|
+
.cpp.o:
|
264
|
+
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
265
|
+
|
266
|
+
.C.o:
|
267
|
+
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
268
|
+
|
269
|
+
.c.o:
|
270
|
+
$(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) -c $<
|
271
|
+
|
272
|
+
$(DLLIB): $(OBJS)
|
273
|
+
@-$(RM) $@
|
274
|
+
$(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
|
275
|
+
|
276
|
+
|
277
|
+
$(OBJS): ruby.h defines.h $(RUBY_EXTCONF_H)
|
278
|
+
|
data/ext/libxml/libxml.c
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
#include "ruby_libxml.h"
|
2
|
+
|
3
|
+
#if RUBY_INTERN_H
|
4
|
+
#include <ruby/util.h>
|
5
|
+
#else
|
6
|
+
#include <util.h>
|
7
|
+
#endif
|
8
|
+
|
9
|
+
VALUE mLibXML;
|
10
|
+
|
11
|
+
static void rxml_init_memory(void)
|
12
|
+
{
|
13
|
+
/* Disable for now - broke attributes.
|
14
|
+
xmlGcMemSetup(
|
15
|
+
(xmlFreeFunc)ruby_xfree,
|
16
|
+
(xmlMallocFunc)ruby_xmalloc,
|
17
|
+
(xmlMallocFunc)ruby_xmalloc,
|
18
|
+
(xmlReallocFunc)ruby_xrealloc,
|
19
|
+
(xmlStrdupFunc)ruby_strdup
|
20
|
+
);*/
|
21
|
+
}
|
22
|
+
|
23
|
+
#if defined(_WIN32)
|
24
|
+
__declspec(dllexport)
|
25
|
+
#endif
|
26
|
+
void Init_libxml_ruby(void)
|
27
|
+
{
|
28
|
+
/* The libxml gem provides Ruby language bindings for GNOME's Libxml2
|
29
|
+
* XML toolkit. To get started you may:
|
30
|
+
*
|
31
|
+
* require 'xml'
|
32
|
+
* document = XML::Document.new
|
33
|
+
*
|
34
|
+
* However, when creating an application or library you plan to
|
35
|
+
* redistribute, it is best to not add the LibXML module to the global
|
36
|
+
* namespace, in which case you can either write your code like this:
|
37
|
+
*
|
38
|
+
* require 'libxml'
|
39
|
+
* document = LibXML::XML::Document.new
|
40
|
+
*
|
41
|
+
* Refer to the README file to get started and the LICENSE file for
|
42
|
+
* copyright and distribution information.
|
43
|
+
*/
|
44
|
+
mLibXML = rb_define_module("LibXML");
|
45
|
+
|
46
|
+
rxml_init_memory();
|
47
|
+
rxml_init_xml();
|
48
|
+
rxml_init_io();
|
49
|
+
rxml_init_error();
|
50
|
+
rxml_init_encoding();
|
51
|
+
rxml_init_parser();
|
52
|
+
rxml_init_parser_context();
|
53
|
+
rxml_init_parser_options();
|
54
|
+
rxml_init_node();
|
55
|
+
rxml_init_attributes();
|
56
|
+
rxml_init_attr();
|
57
|
+
rxml_init_attr_decl();
|
58
|
+
rxml_init_document();
|
59
|
+
rxml_init_namespaces();
|
60
|
+
rxml_init_namespace();
|
61
|
+
rxml_init_sax_parser();
|
62
|
+
rxml_init_sax2_handler();
|
63
|
+
rxml_init_xinclude();
|
64
|
+
rxml_init_xpath();
|
65
|
+
rxml_init_xpath_object();
|
66
|
+
rxml_init_xpath_context();
|
67
|
+
rxml_init_xpath_expression();
|
68
|
+
rxml_init_xpointer();
|
69
|
+
rxml_init_html_parser();
|
70
|
+
rxml_init_html_parser_options();
|
71
|
+
rxml_init_html_parser_context();
|
72
|
+
rxml_init_input_callbacks();
|
73
|
+
rxml_init_dtd();
|
74
|
+
rxml_init_schema();
|
75
|
+
rxml_init_relaxng();
|
76
|
+
rxml_init_reader();
|
77
|
+
}
|