# $Id: Portfile 50984 2009-05-14 21:08:43Z and.damore@macports.org $ PortSystem 1.0 name jruby version 1.2.0 categories lang ruby maintainers gmail.com:ameingast platforms darwin description JRuby is an 100% pure-Java implementation of the Ruby \ programming language. long_description JRuby provides a complete set of core "builtin" classes \ and syntax for the Ruby language, as well as most of the \ Ruby Standard Libraries. The standard libraries are mostly \ Ruby's own complement of .rb files, but a few that depend \ on C language-based extensions have been reimplemented. homepage http://jruby.codehaus.org/ master_sites http://dist.codehaus.org/jruby/${version}/ distname ${name}-src-${version} worksrcdir ${name}-${version} use_bzip2 no checksums md5 10fbbc0477e19be4aeda04865984bed3 \ sha1 69f13b5ec216a7e615f4077730908217a6a9f1fc \ rmd160 a12d9243eb7e5338f1674c0bc9f874bc617c2662 depends_build bin:ant:apache-ant depends_lib bin:java:kaffe use_configure no universal_variant no build.cmd ant build.target jar variant apidocs description "include API documentation" { build.target jar create-apidocs } variant default_ruby description "build without j prefix" { } destroot { # Create the target java directory exists xinstall -m 755 -d ${destroot}${prefix}/share/java/${name} # Copy over the needed elements of our directory tree file copy \ ${worksrcpath}/bin \ ${worksrcpath}/lib \ ${destroot}${prefix}/share/java/${name} if { [variant_isset apidocs] } { file copy ${worksrcpath}/docs ${destroot}${prefix}/share/java/${name} } # Remove extraneous bat files foreach f [glob -directory ${destroot}${prefix}/share/java/${name}/bin *.bat] { file delete $f } set jruby_prefix "" if { ![variant_isset default_ruby] } { set jruby_prefix "j" } foreach f { jruby jirb jrubyc jrubcli jrubysrv } { regsub {^j} $f $jruby_prefix dest if { ${dest} != ${f} } { ln -s ${prefix}/share/java/${name}/bin/${f} ${destroot}${prefix}/bin/${dest} } ln -s ${prefix}/share/java/${name}/bin/${f} ${destroot}${prefix}/bin/ } foreach f { gem gem_mirror gemri gemwhich rake spec testrb } { ln -s ${prefix}/share/java/${name}/bin/${f} \ ${destroot}${prefix}/bin/${jruby_prefix}${f} } }