Ticket #19097: Portfile

File Portfile, 2.8 KB (added by max@…, 16 years ago)

Updated Portfile

Line 
1# $Id$
2
3PortSystem                      1.0
4
5name                            MacRuby
6version                         0.4
7revision                        0
8categories                      lang ruby
9
10maintainers                     inmachina.com:max openmaintainer
11description                     Ruby1.9 VM on top of OS X core technologies
12long_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
19fetch.type                      svn
20svn.url                     http://svn.macosforge.org/repository/ruby/MacRuby/tags/${version}
21
22worksrcdir                      ${version}
23set macruby_bin_dir ${frameworks_dir}/${name}.framework/Versions/${version}/usr/bin
24
25platforms                       darwin
26
27depends_build-append    bin:rake:rb-rake
28patchfiles-append               patch-ripper-depend.diff patch-Rakefile.diff
29use_configure                   no
30
31build.env-append       CC=${configure.cc} DESTDIR=${destroot}
32build.cmd              rake
33build.args             framework_instdir=${frameworks_dir}
34
35destroot.env-append    CC=${configure.cc} DESTDIR=${destroot}
36destroot.cmd           rake
37destroot.args          sym_instdir=${prefix}
38
39livecheck.check        regex
40livecheck.url              http://svn.macosforge.org/repository/ruby/MacRuby/tags
41livecheck.regex            <dir name=\"(.*)\" href
42
43# by default, do not install Xcode templates.
44variant xcode description {install project templates for Xcode} {
45        destroot.violate_mtree yes
46}
47
48post-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
70post-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}