1 | # $Id: Portfile 60154 2009-11-03 17:41:34Z brett@macports.org $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name jruby |
---|
6 | version 1.4.0 |
---|
7 | |
---|
8 | categories lang ruby |
---|
9 | maintainers gmail.com:ameingast |
---|
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://jruby.kenai.com/downloads/${version}/ |
---|
22 | distname ${name}-src-${version} |
---|
23 | worksrcdir ${name}-${version} |
---|
24 | use_bzip2 no |
---|
25 | checksums md5 a363b6c2ea24f0ef8df478c93ac8cc59 \ |
---|
26 | sha1 3d6f634e16b789a5a086327c0f09710dd29d1ec7 |
---|
27 | |
---|
28 | depends_build bin:ant:apache-ant |
---|
29 | depends_lib bin:java:kaffe |
---|
30 | |
---|
31 | use_configure no |
---|
32 | universal_variant no |
---|
33 | |
---|
34 | build.cmd ant |
---|
35 | build.target jar |
---|
36 | |
---|
37 | variant apidocs description "include API documentation" { |
---|
38 | build.target jar create-apidocs |
---|
39 | } |
---|
40 | |
---|
41 | variant nailgun description "include Nailgun support" { |
---|
42 | build.target jar build-ng |
---|
43 | } |
---|
44 | |
---|
45 | variant default_ruby description "build without j prefix" { |
---|
46 | |
---|
47 | } |
---|
48 | |
---|
49 | destroot { |
---|
50 | # Create the target java directory exists |
---|
51 | xinstall -m 755 -d ${destroot}${prefix}/share/java/${name} |
---|
52 | |
---|
53 | # Copy over the needed elements of our directory tree |
---|
54 | file copy \ |
---|
55 | ${worksrcpath}/bin \ |
---|
56 | ${worksrcpath}/lib \ |
---|
57 | ${destroot}${prefix}/share/java/${name} |
---|
58 | |
---|
59 | if { [variant_isset nailgun] } { |
---|
60 | xinstall -m 755 -d ${destroot}${prefix}/share/java/${name}/tool/nailgun |
---|
61 | file copy ${worksrcpath}/tool/nailgun/ng ${destroot}${prefix}/share/java/${name}/tool/nailgun |
---|
62 | } |
---|
63 | |
---|
64 | if { [variant_isset apidocs] } { |
---|
65 | file copy ${worksrcpath}/docs ${destroot}${prefix}/share/java/${name} |
---|
66 | } |
---|
67 | |
---|
68 | # Remove extraneous bat files |
---|
69 | foreach f [glob -directory ${destroot}${prefix}/share/java/${name}/bin *.bat] { |
---|
70 | file delete $f |
---|
71 | } |
---|
72 | |
---|
73 | set jruby_prefix "" |
---|
74 | |
---|
75 | if { ![variant_isset default_ruby] } { |
---|
76 | set jruby_prefix "j" |
---|
77 | } |
---|
78 | |
---|
79 | foreach f { jruby jirb jrubyc jrubcli jrubysrv } { |
---|
80 | regsub {^j} $f $jruby_prefix dest |
---|
81 | if { ${dest} != ${f} } { |
---|
82 | ln -s ${prefix}/share/java/${name}/bin/${f} ${destroot}${prefix}/bin/${dest} |
---|
83 | } |
---|
84 | ln -s ${prefix}/share/java/${name}/bin/${f} ${destroot}${prefix}/bin/ |
---|
85 | } |
---|
86 | |
---|
87 | foreach f { gem gem_mirror gemri gemwhich rake spec testrb } { |
---|
88 | ln -s ${prefix}/share/java/${name}/bin/${f} \ |
---|
89 | ${destroot}${prefix}/bin/${jruby_prefix}${f} |
---|
90 | } |
---|
91 | } |
---|