source: trunk/dports/lang/ruby186/Portfile @ 83478

Last change on this file since 83478 was 83478, checked in by kimuraw@…, 9 years ago

lang/ruby186: upgrade to 1.8.6-p420.

  • refactoring verndor patches. gather into one file and let to work without re-autoconf.
  • remove variant thread_hooks. this feature for only rubycocoa(rb-rubycocoa) and rubycocoa requires ruby-1.8.7.
  • remove a patch ignore-gsetcontext.diff. 1.8.6-p420 allows to disable get/setcontext() via configure option.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.2 KB
Line 
1# $Id: Portfile 83478 2011-09-03 02:10:52Z kimuraw@macports.org $
2
3PortSystem 1.0
4
5name                    ruby186
6version                 1.8.6-p420
7revision        0
8
9categories              lang ruby
10maintainers             kimuraw openmaintainer
11
12description             Powerful and clean object-oriented scripting language
13long_description        Ruby is the interpreted scripting language for quick \
14                                        and easy object-oriented programming. It has many \
15                                        features to process text files and to do system \
16                                        management tasks (as in Perl). It is simple, \
17                                        straight-forward, extensible, and portable. \
18                                        Note: this port conflicts with the ruby port, so you \
19                                        can have either that or this one active at one time.
20homepage                http://www.ruby-lang.org/
21license                 {Ruby GPL-2}
22master_sites    ruby:1.8
23use_bzip2               yes
24
25dist_subdir             ruby
26distname                ruby-${version}
27checksums               md5     1c7a978e9ffd4f56dc2ad74bbd2c34f3 \
28                                sha1    00e977ac46df0ccd1545657426439a82f44bf284 \
29                                rmd160  2f76f19e0a3a35d92200769052d4a049c1478c42
30
31platforms               darwin
32
33depends_lib             port:libiconv \
34                                port:readline \
35                                port:openssl \
36                                port:zlib \
37                                port:ncurses \
38                                port:gdbm
39
40# enable vendordir
41patchfiles              patch-vendordir.diff
42
43# bug15528: TCPServer.open('localhost', 0) fails on some Mac
44# [ruby-core:21033]: The DRb code in drb.rb does not correctly deal with
45#                    multiple network families if they're present.
46# #25647: build failure with openssl 1.0.0
47#         patch from http://redmine.ruby-lang.org/issues/show/2022
48# ruby_bug3674: http://redmine.ruby-lang.org/issues/show/3674
49### [ruby-core:25606]: Virtual Timer Expired when forking
50patchfiles-append \
51                                patch-bug15528.diff \
52                                patch-ruby_core21033.diff \
53                                patch-bug25647.diff \
54                                patch-ruby_bug3674.diff
55
56# dot-darwin.diff: avoid "darwin" matches /win/ in lib/rdoc/options.rb
57# etc-irbrc.diff: require /etc/irbrc when the platform is not Windows
58# md5_sha1_commoncrypto.diff: use CommonCrypto when available
59# use-setreugid.diff: use setreuid()/setregid() on 10.5 or later
60# words-bigendian-from-arch.diff: [ruby-core:12895], [ruby-dev:32160]
61patchfiles-append       dot-darwin.diff \
62                                                etc-irbrc.diff \
63                                                md5_sha1_commoncrypto.diff \
64                                                use-setreugid.diff \
65                                                words-bigendian-from-arch.diff
66
67# #30275: ruby built with clang or llvm-gcc does not work
68# see list "MacPorts on Lion (common issues, fixes, and workarounds)"
69# http://lists.macosforge.org/pipermail/macports-dev/2011-July/015263.html
70if {${configure.compiler} == "clang" ||
71    ${configure.compiler} == "llvm-gcc-4.2"} {
72    configure.compiler gcc-4.2
73    if {![file executable ${configure.cc}]} {
74        depends_build-append port:apple-gcc42
75        configure.compiler apple-gcc-4.2
76    }
77}
78
79configure.args  --enable-shared \
80                                --mandir="${prefix}/share/man" \
81                                --enable-pthread \
82                                --without-tk \
83                                --disable-ucontext
84
85if {![variant_isset universal] && [info exists build_arch] && $build_arch != ""} {
86        configure.env-append ARCH_FLAG="-arch ${build_arch}"
87}
88
89destroot.target install install-doc
90post-destroot {
91        foreach type {site vendor} {
92                set libdir ${destroot}${prefix}/lib/ruby/${type}_ruby
93                xinstall -m 0755 -d ${libdir}
94
95                # special file for installation control of modules
96                xinstall -m 0644 ${filespath}/${type}-specific.rb ${libdir}
97
98                # prevent empty site/vendor directories from being pruned
99                foreach subdir [exec find ${libdir} -type d -empty] {
100                        destroot.keepdirs-append ${subdir}
101                }
102        }
103    # error at activate, for these case sensitive files
104        foreach rdoc {Exception2MessageMapper/fail-i.yaml \
105                                  REXML/Parsers/XPathParser/predicate-i.yaml} {
106                if {[file exists ${destroot}${prefix}/share/ri/1.8/system/${rdoc}]} {
107                        delete ${destroot}${prefix}/share/ri/1.8/system/${rdoc}
108                }
109        }
110}
111
112platform darwin {
113        # for proper rdoc/ri creation, make sure to link to destroot libruby.dylib
114        destroot.env    DYLD_LIBRARY_PATH=${destroot}${prefix}/lib
115}
116
117variant tk conflicts mactk description {Enable MacPorts Tk bindings} {
118        configure.args-delete   --without-tk
119        configure.args-append   --with-tk
120        depends_lib-append              port:tcl \
121                                                        port:tk
122}
123
124variant mactk conflicts tk description {Enable Mac OS X Tk framework bindings} {
125        configure.args-delete   --without-tk
126        configure.args-append   --enable-tcltk-framework
127}
128
129livecheck.type  regex
130livecheck.url   http://www.ruby-lang.org/en/downloads/
131livecheck.regex {>Ruby (.*?)</a> \\\(md5:}
132
Note: See TracBrowser for help on using the repository browser.