source: trunk/dports/lang/ruby20/Portfile

Last change on this file was 146513, checked in by kimuraw@…, 17 months ago

lang/ruby23, ruby22, ruby21, ruby20, ruby19: revbump for openssl (#50834)

  • 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 146513 2016-03-10 13:37:25Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           select 1.0
6
7name                ruby20
8version             2.0.0-p648
9revision            1
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.0
26use_bzip2           yes
27distname            ruby-${version}
28
29checksums           md5 3544031334f4665aa2eb1414babc9345 \
30                    rmd160 3b6fd5d89e6e53fb71f512f44b710148698a6e29 \
31                    sha1 504be2eae6cdfe93aa7ed02ec55e35043d067ad5 \
32                    sha256 087ad4dec748cfe665c856dbfbabdee5520268e94bb81a1d8565d76c3cc62166
33use_parallel_build  no
34
35depends_lib         port:readline \
36                    path:lib/libssl.dylib:openssl \
37                    port:zlib \
38                    port:ncurses \
39                    port:libyaml \
40                    port:libffi \
41                    port:gdbm
42depends_run         port:ruby_select
43depends_build       port:pkgconfig
44depends_skip_archcheck pkgconfig
45
46select.group        ruby
47select.file         ${filespath}/ruby20
48
49configure.args      --enable-shared \
50                    --disable-install-doc \
51                    --mandir="${prefix}/share/man" \
52                    --enable-pthread \
53                    --without-tk \
54                    --with-opt-dir="${prefix}" \
55                    --program-suffix=2.0 \
56                    --with-rubylibprefix=${prefix}/lib/ruby2.0
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# ext/tk/extconf.rb: fix build error with tk variant
63patchfiles          patch-ext-tk-extconf.rb.diff
64
65# Add the architecture flag as required
66if {[info exists build_arch] && ${build_arch} ne ""} {
67    configure.args-append "--with-arch=${build_arch}"
68}
69
70post-destroot {
71    foreach type {site vendor} {
72            set libdir ${destroot}${prefix}/lib/ruby2.0/${type}_ruby/2.0.0
73            xinstall -m 0755 -d ${libdir}
74    }
75
76    foreach subdir [exec find ${libdir} -type d -empty] {
77            destroot.keepdirs-append ${subdir}
78    }
79
80    # install destination of commands from port:rb-*
81    xinstall -m 0755 -d ${destroot}${prefix}/libexec/ruby2.0
82    destroot.keepdirs-append ${destroot}${prefix}/libexec/ruby2.0
83}
84
85variant doc description "Install rdoc indexes and C API documents" {
86        configure.args-delete   --disable-install-doc
87}
88
89variant tk conflicts mactk description "Build using MacPorts Tk" {
90        configure.args-delete   --without-tk
91        configure.args-append   --with-tk --disable-tcltk-framework
92        depends_lib-append      port:tcl \
93                                port:tk
94}
95
96variant mactk conflicts tk description "Build using Mac OS X Tk Framework" {
97        configure.args-delete   --without-tk
98        configure.args-append   --enable-tcltk-framework
99}
100
101variant universal {
102        # use ruby built-in universal mechanism.
103        configure.args-append   --with-arch=[join ${universal_archs} ,]
104        # clear macports' universal flags
105        configure.universal_cflags
106        configure.universal_cppflags
107        configure.universal_cxxflags
108        configure.universal_ldflags
109}
110
111variant relative description "Enable relative loading of libraries to allow for relocation of binaries." {
112        #enable relative loading
113        configure.args-append  --enable-load-relative
114}
115
116livecheck.type  regex
117livecheck.url   http://ftp.ruby-lang.org/pub/ruby/2.0/
118livecheck.regex ruby-(${version})${extract.suffix}
119
Note: See TracBrowser for help on using the repository browser.