Add ruby-xmlparser, a Ruby module to access James Clark's

XML Parser ToolKit. ("expat")
This commit is contained in:
Akinori MUSHA 2000-08-10 18:50:00 +00:00
parent 2d8fae5264
commit dba8d1b921
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=31484
9 changed files with 218 additions and 0 deletions

View File

@ -78,6 +78,7 @@
SUBDIR += rman
SUBDIR += ruby-html-parser
SUBDIR += ruby-rdtool
SUBDIR += ruby-xmlparser
SUBDIR += sarep
SUBDIR += se-ispell
SUBDIR += sgmlformat

View File

@ -0,0 +1,85 @@
# New ports collection makefile for: Ruby-xmlparser
# Date created: 9 Aug 2000
# Whom: Akinori MUSHA aka knu <knu@idaemons.org>
#
# $FreeBSD$
#
PORTNAME= xmlparser
PORTVERSION= 0.5.19
CATEGORIES= textproc # ruby
MASTER_SITES= http://www.bekkoame.ne.jp/~yoshidam/
PKGNAMEPREFIX= ruby-
DIST_SUBDIR= ruby
MAINTAINER= knu@FreeBSD.org
BUILD_DEPENDS= ruby:${PORTSDIR}/lang/ruby \
${PERL_ARCHLIB}/XML/Parser/Expat.pm:${PORTSDIR}/textproc/p5-XML-Parser
LIB_DEPENDS= expat.1:${PORTSDIR}/textproc/expat
RUN_DEPENDS= ruby:${PORTSDIR}/lang/ruby \
${PERL_ARCHLIB}/XML/Parser/Expat.pm:${PORTSDIR}/textproc/p5-XML-Parser
# to utilize encoding maps included in p5-XML-Parser
.if !defined(NOPORTDOCS)
BUILD_DEPENDS+= rd2:${PORTSDIR}/textproc/ruby-rdtool
.endif
PERL_ARCHLIB= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/mach
WRKSRC= ${WRKDIR}/${PORTNAME}
INSTALL_TARGET= site-install
PLIST_SUB= RUBY_VER="${RUBY_VER}" RUBY_ARCH="${RUBY_ARCH}"
RUBY= ${LOCALBASE}/bin/ruby
RUBY_VER= 1.4
RUBY_ARCH= ${ARCH}-freebsd${OSREL}
EXAMPLES_EN= dtd/ext1.dtd dtd/ext2.dtd dtd/extdtd.rb dtd/extdtd.xml \
namespaces/namespace1.rb namespaces/namespace1.xml \
namespaces/namespace2.rb namespaces/namespace2.xml \
digesttest.rb idattrtest.rb my-html.rb saxtest.rb \
visitortest.rb writer.rb xmlcomments.rb xmlstats.rb
EXAMPLES_JA= buildertest.rb buildertest2.rb digesttest2.rb document.dtd \
gtktree.rb index_euc.xml index_jis.xml index_noenc.xml \
index_sjis.xml index_u16.xml index_u8.xml treetest.rb \
videolist.dtd videolist.rb videolist.xml visitor.rb \
xmlcheck.rb xmlevent.rb xmlgrep.rb xmliter.rb \
xpointer.rb xpointertest.rb
RD_DOCS= xmltree.rb xmltreebuilder.rb xmltreevisitor.rb
post-patch:
${PERL} -i -pe 's,%%PERL_ARCHLIB%%,${PERL_ARCHLIB},g' ${WRKSRC}/extconf.rb
${PERL} -i -pe 's,%%PREFIX%%,${PREFIX},g' ${WRKSRC}/lib/wget.rb
do-configure:
@cd ${WRKSRC}; \
${SETENV} ${CONFIGURE_ENV} ${RUBY} extconf.rb
post-install:
${MKDIR} ${PREFIX}/share/examples/ruby/xmlparser/dtd
${MKDIR} ${PREFIX}/share/examples/ruby/xmlparser/namespaces
${MKDIR} ${PREFIX}/share/examples/ruby/xmlparser/ja
.for f in ${EXAMPLES_EN}
${INSTALL_DATA} ${WRKSRC}/samples/${f} \
${PREFIX}/share/examples/ruby/xmlparser/${f}
.endfor
.for f in ${EXAMPLES_JA}
${INSTALL_DATA} ${WRKSRC}/samples/${f} \
${PREFIX}/share/examples/ruby/xmlparser/ja/${f}
.endfor
.if !defined(NOPORTDOCS)
.for f in ${RD_DOCS}
@cd ${WRKSRC}/lib; \
rd2 ${f} > ${f:S/.rb$/.html/}
.endfor
${MKDIR} ${PREFIX}/share/doc/ruby/xmlparser/ja
${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/ruby/xmlparser/
${INSTALL_DATA} ${WRKSRC}/README.ja ${PREFIX}/share/doc/ruby/xmlparser/ja/
.for f in ${RD_DOCS:S/.rb$/.html/}
${INSTALL_DATA} ${WRKSRC}/lib/${f} ${PREFIX}/share/doc/ruby/xmlparser/
.endfor
.endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>

View File

@ -0,0 +1 @@
MD5 (ruby/xmlparser-0.5.19.tar.gz) = bb14ede4eeefcdfe7e1d7747917f4b20

View File

@ -0,0 +1,27 @@
--- extconf.rb.orig Wed Aug 18 08:38:36 1999
+++ extconf.rb Wed Aug 9 20:24:40 2000
@@ -4,19 +4,19 @@
## Encoding maps may be stored in $perl_archlib/XML/Parser/Encodins/
#perl_archlib = '/usr/lib/perl5/site_perl/5.005/i586-linux'
-perl_archlib = '/usr/local/lib'
+perl_archlib = '%%PERL_ARCHLIB%%'
xml_enc_path = perl_archlib + "/XML/Parser/Encodings"
##$CFLAGS="-I#{cwd}/expat/xmlparse -I#{cwd}/expat/xmltok" +
## ' -DXML_ENC_PATH=getenv\(\"XML_ENC_PATH\"\)' +
## " -DNEW_EXPAT"
-$CFLAGS="-I#{cwd}/expat/xmlparse -I#{cwd}/expat/xmltok" +
+$CFLAGS="-I#{CONFIG['prefix']}/include/xml" +
" -DXML_ENC_PATH=\\\"#{xml_enc_path}\\\""
-$LDFLAGS="-L#{cwd}/expat"
+$LDFLAGS="-L#{CONFIG['prefix']}/lib"
if have_header("xmlparse.h")
- if have_library("xmltok", "XML_ParserCreate")
-# if have_library("expat", "XML_ParserCreate")
+# if have_library("xmltok", "XML_ParserCreate")
+ if have_library("expat", "XML_ParserCreate")
if have_func("XML_SetNotStandaloneHandler")
$CFLAGS += " -DNEW_EXPAT"
end

View File

@ -0,0 +1,35 @@
--- lib/wget.rb.orig Tue Mar 23 17:30:30 1999
+++ lib/wget.rb Fri Aug 11 03:23:28 2000
@@ -19,17 +19,18 @@
if url =~ /^\/|^\./ || (url !~ /^http:|^ftp:/ && FileTest.exist?(url))
File::open(url, *rest)
else
- ENV['http_proxy'] = PARAM['http_proxy'] if PARAM['http_proxy']
- ENV['ftp_proxy'] = PARAM['ftp_proxy'] if PARAM['ftp_proxy']
+ ENV['HTTP_PROXY'] = ENV['http_proxy'] = PARAM['http_proxy'] if PARAM['http_proxy']
+ ENV['FTP_PROXY'] = ENV['ftp_proxy'] = PARAM['ftp_proxy'] if PARAM['ftp_proxy']
IO::popen(PARAM['wget'] + ' ' + PARAM['opts'] + ' ' + url)
end
end
module_function :open
end
-[ '/usr/local/bin/wget', '/usr/bin/wget',
- '/usr/local/bin/lynx', '/usr/bin/lynx',
- '/usr/local/bin/lwp-request', '/usr/bin/lwp-request' ].each do |p|
+[ '%%PREFIX%%/bin/wget',
+ '%%PREFIX%%/bin/lynx',
+ '%%PREFIX%%/bin/lwp-request',
+ '/usr/bin/fetch' ].each do |p|
if FileTest.executable?(p)
WGET::PARAM['wget'] = p
case p
@@ -39,6 +40,8 @@
WGET::PARAM['opts'] = '-source'
when /lwp-request$/
WGET::PARAM['opts'] = '-m GET'
+ when /fetch$/
+ WGET::PARAM['opts'] = '-o -'
end
break
end

View File

@ -0,0 +1 @@
Ruby module to access James Clark's XML Parser ToolKit ("expat")

View File

@ -0,0 +1,3 @@
This is a Ruby module to access James Clark's XML Parser ToolKit. ("expat")
WWW: http://www.bekkoame.ne.jp/~yoshidam/Ruby.html#xmlparser

View File

@ -0,0 +1,5 @@
************************************************************
If you want to deal with Japanese text, you might need
japanese/ruby-uconv to convert between Unicode and EUC-JP or
CP932.
************************************************************

View File

@ -0,0 +1,60 @@
lib/ruby/site_ruby/%%RUBY_VER%%/sax.rb
lib/ruby/site_ruby/%%RUBY_VER%%/saxdriver.rb
lib/ruby/site_ruby/%%RUBY_VER%%/wget.rb
lib/ruby/site_ruby/%%RUBY_VER%%/xmldigest.rb
lib/ruby/site_ruby/%%RUBY_VER%%/xmlencoding-ja.rb
lib/ruby/site_ruby/%%RUBY_VER%%/xmlparser.rb
lib/ruby/site_ruby/%%RUBY_VER%%/xmltree.rb
lib/ruby/site_ruby/%%RUBY_VER%%/xmltreebuilder-ja.rb
lib/ruby/site_ruby/%%RUBY_VER%%/xmltreebuilder.rb
lib/ruby/site_ruby/%%RUBY_VER%%/xmltreevisitor.rb
lib/ruby/site_ruby/%%RUBY_VER%%/%%RUBY_ARCH%%/xmlparser.so
share/examples/ruby/xmlparser/dtd/ext1.dtd
share/examples/ruby/xmlparser/dtd/ext2.dtd
share/examples/ruby/xmlparser/dtd/extdtd.rb
share/examples/ruby/xmlparser/dtd/extdtd.xml
share/examples/ruby/xmlparser/namespaces/namespace1.rb
share/examples/ruby/xmlparser/namespaces/namespace1.xml
share/examples/ruby/xmlparser/namespaces/namespace2.rb
share/examples/ruby/xmlparser/namespaces/namespace2.xml
share/examples/ruby/xmlparser/ja/buildertest.rb
share/examples/ruby/xmlparser/ja/buildertest2.rb
share/examples/ruby/xmlparser/ja/digesttest2.rb
share/examples/ruby/xmlparser/ja/document.dtd
share/examples/ruby/xmlparser/ja/gtktree.rb
share/examples/ruby/xmlparser/ja/index_euc.xml
share/examples/ruby/xmlparser/ja/index_jis.xml
share/examples/ruby/xmlparser/ja/index_noenc.xml
share/examples/ruby/xmlparser/ja/index_sjis.xml
share/examples/ruby/xmlparser/ja/index_u16.xml
share/examples/ruby/xmlparser/ja/index_u8.xml
share/examples/ruby/xmlparser/ja/treetest.rb
share/examples/ruby/xmlparser/ja/videolist.dtd
share/examples/ruby/xmlparser/ja/videolist.rb
share/examples/ruby/xmlparser/ja/videolist.xml
share/examples/ruby/xmlparser/ja/visitor.rb
share/examples/ruby/xmlparser/ja/xmlcheck.rb
share/examples/ruby/xmlparser/ja/xmlevent.rb
share/examples/ruby/xmlparser/ja/xmlgrep.rb
share/examples/ruby/xmlparser/ja/xmliter.rb
share/examples/ruby/xmlparser/ja/xpointer.rb
share/examples/ruby/xmlparser/ja/xpointertest.rb
share/examples/ruby/xmlparser/digesttest.rb
share/examples/ruby/xmlparser/idattrtest.rb
share/examples/ruby/xmlparser/my-html.rb
share/examples/ruby/xmlparser/saxtest.rb
share/examples/ruby/xmlparser/visitortest.rb
share/examples/ruby/xmlparser/writer.rb
share/examples/ruby/xmlparser/xmlcomments.rb
share/examples/ruby/xmlparser/xmlstats.rb
@dirrm share/examples/ruby/xmlparser/ja
@dirrm share/examples/ruby/xmlparser/namespaces
@dirrm share/examples/ruby/xmlparser/dtd
@dirrm share/examples/ruby/xmlparser
share/doc/ruby/xmlparser/ja/README.ja
share/doc/ruby/xmlparser/README
share/doc/ruby/xmlparser/xmltree.html
share/doc/ruby/xmlparser/xmltreebuilder.html
share/doc/ruby/xmlparser/xmltreevisitor.html
@dirrm share/doc/ruby/xmlparser/ja
@dirrm share/doc/ruby/xmlparser