source: trunk/dports/lang/ruby21/Portfile

Last change on this file was 147285, checked in by kimuraw@…, 20 months ago

lang/ruby21: upgrade to 2.1.9

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.1 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 147285 2016-04-01 13:04:24Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           select 1.0
6
7name                ruby21
8version             2.1.9
9revision            0
10
11categories          lang ruby
12maintainers         kimuraw openmaintainer
13platforms           darwin
14
15description         Powerful and clean object-oriented scripting language
16long_description    Ruby is the interpreted scripting language for quick \
17                    and easy object-oriented programming. It has many \
18                    features to process text files and to do system \
19                    management tasks (as in Perl). It is simple, \
20                    straight-forward, extensible, and portable.
21
22homepage            http://www.ruby-lang.org/
23license             {Ruby BSD}
24
25master_sites        ruby:2.1
26use_bzip2           yes
27distname            ruby-${version}
28
29checksums           md5 62bd1cbfcbc22e4d137462bce992f6d1 \
30                    rmd160 ba54bd691e5ac9c5f1379b8687894735b1afe18b \
31                    sha1 39524185b580a3390a3b5019819c8b28d3249766 \
32                    sha256 4f21376aa11e09b499c3254bbd839e68e053c0d18e28d61c428a32347269036e
33use_parallel_build  no
34
35depends_lib         port:readline \
36                    path:lib/libssl.dylib:openssl \
37                    port:zlib \
38                    port:libyaml \
39                    port:libffi \
40                    port:gdbm
41depends_run         port:ruby_select
42depends_build       port:pkgconfig
43depends_skip_archcheck pkgconfig
44
45select.group        ruby
46select.file         ${filespath}/ruby21
47
48configure.args      --enable-shared \
49                    --disable-install-doc \
50                    --mandir="${prefix}/share/man" \
51                    --enable-pthread \
52                    --without-tk \
53                    --without-gmp \
54                    --with-opt-dir="${prefix}" \
55                    --program-suffix=2.1 \
56                    --with-rubylibprefix="${prefix}/lib/ruby2.1"
57
58# Ignore minor version for archdir, like i686-darwin9.
59# Port "ruby" and "ruby19" does the same.
60configure.env-append UNAME_RELEASE=${os.major}
61
62# Add the architecture flag as required
63if {[info exists build_arch] && ${build_arch} != ""} {
64    configure.args-append "--with-arch=${build_arch}"
65}
66
67post-destroot {
68    foreach type {site vendor} {
69            set libdir ${destroot}${prefix}/lib/ruby2.1/${type}_ruby/2.1.0
70            xinstall -m 0755 -d ${libdir}
71    }
72
73    foreach subdir [exec find ${libdir} -type d -empty] {
74            destroot.keepdirs-append ${subdir}
75    }
76
77    # install destination of commands from port:rb21-*
78    xinstall -m 0755 -d ${destroot}${prefix}/libexec/ruby2.1
79    destroot.keepdirs-append ${destroot}${prefix}/libexec/ruby2.1
80}
81
82variant doc description "Install rdoc indexes and C API documents" {
83        configure.args-delete   --disable-install-doc
84}
85
86# note: ruby/tk does not support tk-8.6.
87#
88#variant tk conflicts mactk description "Build using MacPorts Tk" {
89#        configure.args-delete   --without-tk
90#        configure.args-append   --with-tk --disable-tcltk-framework
91#        depends_lib-append      port:tcl \
92#                                port:tk
93#}
94
95variant mactk description "Build using Mac OS X Tk Framework" {
96        configure.args-delete   --without-tk
97        configure.args-append   --enable-tcltk-framework
98}
99
100variant gmp description "use gmp" {
101        configure.args-delete   --without-gmp
102        depends_lib-append      port:gmp
103}
104
105variant universal {
106        # use ruby built-in universal mechanism.
107        configure.args-append   --with-arch=[join ${universal_archs} ,]
108        # clear macports' universal flags
109        configure.universal_cflags
110        configure.universal_cppflags
111        configure.universal_cxxflags
112        configure.universal_ldflags
113}
114
115variant relative description "Enable relative loading of libraries to allow for relocation of binaries." {
116        #enable relative loading
117        configure.args-append  --enable-load-relative
118}
119
120livecheck.type  regex
121livecheck.url   http://cache.ruby-lang.org/pub/ruby/2.1/
122livecheck.regex ruby-(${version})${extract.suffix}
123
Note: See TracBrowser for help on using the repository browser.