1 | # $Id$ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name MacRuby |
---|
6 | version 0.4 |
---|
7 | revision 0 |
---|
8 | categories lang ruby |
---|
9 | |
---|
10 | maintainers inmachina.com:max openmaintainer |
---|
11 | description Ruby1.9 VM on top of OS X core technologies |
---|
12 | long_description MacRuby is a version of Ruby 1.9, ported to run directly on \ |
---|
13 | top of Mac OS X core technologies such as the Objective-C \ |
---|
14 | common runtime and garbage collector, and the CoreFoundation \ |
---|
15 | framework. The goal of MacRuby is to enable the creation of \ |
---|
16 | full-fledged Mac OS X applications which do not sacrifice \ |
---|
17 | performance in order to enjoy the benefits of using Ruby |
---|
18 | |
---|
19 | fetch.type svn |
---|
20 | svn.url http://svn.macosforge.org/repository/ruby/MacRuby/tags/${version} |
---|
21 | |
---|
22 | worksrcdir ${version} |
---|
23 | set macruby_bin_dir ${frameworks_dir}/${name}.framework/Versions/${version}/usr/bin |
---|
24 | |
---|
25 | platforms darwin |
---|
26 | |
---|
27 | depends_build-append bin:rake:rb-rake |
---|
28 | patchfiles-append patch-ripper-depend.diff patch-Rakefile.diff |
---|
29 | use_configure no |
---|
30 | |
---|
31 | build.env-append CC=${configure.cc} DESTDIR=${destroot} |
---|
32 | build.cmd rake |
---|
33 | build.args framework_instdir=${frameworks_dir} |
---|
34 | |
---|
35 | destroot.env-append CC=${configure.cc} DESTDIR=${destroot} |
---|
36 | destroot.cmd rake |
---|
37 | destroot.args sym_instdir=${prefix} |
---|
38 | |
---|
39 | livecheck.check regex |
---|
40 | livecheck.url http://svn.macosforge.org/repository/ruby/MacRuby/tags |
---|
41 | livecheck.regex <dir name=\"(.*)\" href |
---|
42 | |
---|
43 | # by default, do not install Xcode templates. |
---|
44 | variant xcode description {install project templates for Xcode} { |
---|
45 | destroot.violate_mtree yes |
---|
46 | } |
---|
47 | |
---|
48 | post-destroot { |
---|
49 | # Create link in ${prefix}/bin to executable files in ${macruby_bin_dir}. |
---|
50 | foreach bin [glob -type f -directory ${destroot}${macruby_bin_dir} *] { |
---|
51 | file delete ${destroot}${prefix}/bin/[file tail ${bin}] |
---|
52 | ln -s ${macruby_bin_dir}/[file tail ${bin}] ${destroot}${prefix}/bin |
---|
53 | } |
---|
54 | |
---|
55 | # Move /Developer/Examples to ${prefix}/share/examples |
---|
56 | file mkdir ${destroot}/${prefix}/share/examples |
---|
57 | file rename ${destroot}/Developer/Examples/Ruby/MacRuby \ |
---|
58 | ${destroot}/${prefix}/share/examples/MacRuby |
---|
59 | |
---|
60 | # Move Xcode Templates to share/doc/MacRuby unless +xcode |
---|
61 | # Also delete entries in ${destroot}/Developer/usr/bin |
---|
62 | if {![variant_isset xcode]} { |
---|
63 | file mkdir ${destroot}/${prefix}/share/doc/MacRuby |
---|
64 | file rename ${destroot}/Library/Application\ Support/Developer \ |
---|
65 | ${destroot}/${prefix}/share/doc/MacRuby/project-templates |
---|
66 | file delete -force ${destroot}/Developer/usr/bin |
---|
67 | } |
---|
68 | } |
---|
69 | |
---|
70 | post-install { |
---|
71 | ui_msg "******************************************************" |
---|
72 | ui_msg "* MacRuby is still work in progress. Don't expect" |
---|
73 | ui_msg "* every ruby script to work on it or use MacRuby in a" |
---|
74 | ui_msg "* production environment." |
---|
75 | ui_msg "* For now this port is intended for evaluation" |
---|
76 | ui_msg "* purposes only." |
---|
77 | ui_msg "******************************************************" |
---|
78 | } |
---|