# $Id$ PortSystem 1.0 name jruby version 1.4.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://jruby.kenai.com/downloads/${version}/ distname ${name}-src-${version} worksrcdir ${name}-${version} use_bzip2 no checksums md5 a363b6c2ea24f0ef8df478c93ac8cc59 \ sha1 3d6f634e16b789a5a086327c0f09710dd29d1ec7 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} } }