1 | # $Id: Portfile 34697 2008-03-03 07:36:29Z afb@macports.org $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name jruby |
---|
6 | version 1.1.1 |
---|
7 | |
---|
8 | categories lang ruby |
---|
9 | maintainers ameingast@gmail.com |
---|
10 | platforms darwin |
---|
11 | |
---|
12 | description JRuby is an 100% pure-Java implementation of the Ruby \ |
---|
13 | programming language. |
---|
14 | long_description JRuby provides a complete set of core "builtin" classes \ |
---|
15 | and syntax for the Ruby language, as well as most of the \ |
---|
16 | Ruby Standard Libraries. The standard libraries are mostly \ |
---|
17 | Ruby's own complement of .rb files, but a few that depend \ |
---|
18 | on C language-based extensions have been reimplemented. |
---|
19 | homepage http://jruby.codehaus.org/ |
---|
20 | |
---|
21 | master_sites http://dist.codehaus.org/jruby/ |
---|
22 | distname ${name}-src-${version} |
---|
23 | worksrcdir ${name}-${version} |
---|
24 | use_bzip2 no |
---|
25 | checksums md5 94ce5370ada712d2190666bacc6fae21 |
---|
26 | |
---|
27 | depends_build bin:ant:apache-ant |
---|
28 | depends_lib bin:java:kaffe |
---|
29 | |
---|
30 | use_configure no |
---|
31 | universal_variant no |
---|
32 | |
---|
33 | build.cmd ant |
---|
34 | build.target jar |
---|
35 | |
---|
36 | variant apidocs description "include API documentation" { |
---|
37 | build.target jar create-apidocs |
---|
38 | } |
---|
39 | |
---|
40 | variant default_ruby description "build without j prefix" { |
---|
41 | |
---|
42 | } |
---|
43 | |
---|
44 | destroot { |
---|
45 | # Create the target java directory exists |
---|
46 | xinstall -m 755 -d ${destroot}${prefix}/share/java/${name} |
---|
47 | |
---|
48 | # Copy over the needed elements of our directory tree |
---|
49 | file copy \ |
---|
50 | ${worksrcpath}/bin \ |
---|
51 | ${worksrcpath}/lib \ |
---|
52 | ${destroot}${prefix}/share/java/${name} |
---|
53 | |
---|
54 | if { [variant_isset apidocs] } { |
---|
55 | file copy ${worksrcpath}/docs ${destroot}${prefix}/share/java/${name} |
---|
56 | } |
---|
57 | |
---|
58 | # Remove extraneous bat files |
---|
59 | foreach f [glob -directory ${destroot}${prefix}/share/java/${name}/bin *.bat] { |
---|
60 | file delete $f |
---|
61 | } |
---|
62 | |
---|
63 | set jruby_prefix "" |
---|
64 | |
---|
65 | if { ![variant_isset default_ruby] } { |
---|
66 | set jruby_prefix "j" |
---|
67 | } |
---|
68 | |
---|
69 | foreach f { jruby jirb jrubyc jrubcli jrubysrv } { |
---|
70 | regsub {^j} $f $jruby_prefix dest |
---|
71 | if { ${dest} != ${f} } { |
---|
72 | ln -s ${prefix}/share/java/${name}/bin/${f} ${destroot}${prefix}/bin/${dest} |
---|
73 | } |
---|
74 | ln -s ${prefix}/share/java/${name}/bin/${f} ${destroot}${prefix}/bin/ |
---|
75 | } |
---|
76 | |
---|
77 | foreach f { gem gem_mirror gemri gemwhich rake spec testrb } { |
---|
78 | ln -s ${prefix}/share/java/${name}/bin/${f} \ |
---|
79 | ${destroot}${prefix}/bin/${jruby_prefix}${f} |
---|
80 | } |
---|
81 | } |
---|