source: trunk/dports/lang/jruby/Portfile

Last change on this file was 106528, checked in by ciserlohn@…, 4 years ago

jruby: update to version 1.7.4

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.4 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 106528 2013-05-29 22:43:37Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                jruby
7version             1.7.4
8                   
9categories          lang ruby
10maintainers         ciserlohn
11platforms           darwin
12                   
13description         JRuby is an 100% pure-Java implementation of the Ruby \
14                    programming language.
15long_description    JRuby provides a complete set of core "builtin" classes \
16                    and syntax for the Ruby language, as well as most of the \
17                    Ruby Standard Libraries. The standard libraries are mostly \
18                    Ruby's own complement of .rb files, but a few that depend \
19                    on C language-based extensions have been reimplemented.
20       
21conflicts           jruby-devel
22                   
23homepage            http://jruby.org/
24                   
25master_sites        http://jruby.org.s3.amazonaws.com/downloads/${version}/
26distname            ${name}-src-${version}
27worksrcdir          ${name}-${version}
28                   
29checksums           rmd160  3087fe2ec99b5b79fd3ea352ddc6f5e2a547ed7e \
30                    sha256  88dbd10303691dde6433f14b4974758b9de0823fa436901b4acbaa89b6e10d27
31                   
32depends_build       port:apache-ant
33depends_lib         bin:java:kaffe
34                   
35use_configure       no
36universal_variant   no
37                   
38build.cmd           ant
39build.target        jar
40
41variant apidocs description "include API documentation" {
42    build.target-append  apidocs
43}
44
45variant nailgun description "include Nailgun support" {
46    build.target-append  build-ng
47    post-destroot {
48        xinstall -m 755 -d ${destroot}${prefix}/share/java/${name}/tool/nailgun
49        copy ${worksrcpath}/tool/nailgun/ng ${destroot}${prefix}/share/java/${name}/tool/nailgun
50    }
51}
52
53variant default_ruby description "build without j prefix" {}
54
55destroot {
56    # Create the target java directory exists
57    xinstall -m 755 -d ${destroot}${prefix}/share/java/${name}
58
59    # Copy over the needed elements of our directory tree
60    file copy \
61        ${worksrcpath}/bin \
62        ${worksrcpath}/lib \
63        ${destroot}${prefix}/share/java/${name}
64
65    if { [variant_isset apidocs] } {
66        file copy ${worksrcpath}/docs ${destroot}${prefix}/share/java/${name}
67    }
68
69    # Remove extraneous .bat, .exe and .dll files
70    foreach f [glob -directory ${destroot}${prefix}/share/java/${name}/bin *.bat] {
71        file delete $f
72    }
73    foreach f [glob -directory ${destroot}${prefix}/share/java/${name}/bin *.exe] {
74        file delete $f
75    }
76    foreach f [glob -directory ${destroot}${prefix}/share/java/${name}/bin *.dll] {
77        file delete $f
78    }
79
80    set jruby_prefix ""
81
82    if { ![variant_isset default_ruby] } {
83        set jruby_prefix "j"
84    }
85
86    foreach f { jruby jirb jrubyc jirb_swing } {
87        regsub {^j} $f $jruby_prefix dest
88        if { ${dest} != ${f} } {
89            ln -s ${prefix}/share/java/${name}/bin/${f} ${destroot}${prefix}/bin/${dest}
90        }
91        ln -s ${prefix}/share/java/${name}/bin/${f} ${destroot}${prefix}/bin/
92    }
93
94    foreach f { ast gem rdoc ri testrb } {
95        ln -s ${prefix}/share/java/${name}/bin/${f} \
96            ${destroot}${prefix}/bin/${jruby_prefix}${f}
97    }
98}
99
100livecheck.type      regex
101livecheck.url       ${homepage}/download
102livecheck.regex     {Download the latest release.*<strong>(.*)</strong>}
Note: See TracBrowser for help on using the repository browser.