# $Id: Portfile 70470 2010-08-10 14:39:02Z kimuraw@macports.org $

PortSystem		    1.0
PortGroup		    ruby 1.0

ruby.setup          json_pure 1.4.6 gem {} rubygems
description         This is a JSON implementation in pure Ruby.
long_description    \
    This is a implementation of the JSON specification according to RFC 4627. \
    You can think of it as a low fat alternative to XML, if you want to store \
    data to disk or transmit it over a network rather than use a verbose \
    markup language.
license             Ruby
maintainers         kimuraw openmaintainer
homepage            http://flori.github.com/json/
platforms			darwin
checksums           md5     efc352b7e48263cba1d4e7d96c7721b1 \
                    sha1    9fe74cdffaba077e1209f9222e8b7ddd282966df \
                    rmd160  2ce9c5c4315c330a0f9dac5592e4c8d6c134efc6

# avoid conflict against a command from port:rb-json
post-destroot {
    foreach dir {bin lib/ruby/gems/1.8/bin} {
		foreach cmd {edit_json prettify_json} {
			move "${destroot}${prefix}/${dir}/${cmd}.rb" \
			     "${destroot}${prefix}/${dir}/${cmd}_pure.rb"
		}
	}
}
