source: trunk/dports/lang/ruby/Portfile @ 62943

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

lang/ruby: 1.8.7-p174_2, add two patches.

fix failure of start drb TCPServer, such as drb, with the following error.

SocketError: getaddrinfo: nodename nor servname provided, or not known

(1) patch-bug15528.diff

reproduce #15528 with Mac OS X 10.6.2 and port:ruby-1.8.7-p174_1
TCPServer.open('localhost', 0) fails on some Mac.

(2) patch-ruby-core21033.diff

backport [ruby-core:21033]
http://redmine.ruby-lang.org/issues/show/1425

The DRb code in drb.rb does not correctly deal with multiple network
families if they're present.

NOTE: ruby-1.8.7-p249 is not stable on Mac OS X 10.6.2.

make test-all occurs many segmentation faults.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.1 KB
Line 
1# $Id: Portfile 62943 2010-01-22 13:59:04Z kimuraw@macports.org $
2
3PortSystem 1.0
4
5name                    ruby
6version                 1.8.7-p174
7revision                2
8
9categories              lang ruby
10maintainers             kimuraw
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.
18homepage                http://www.ruby-lang.org/
19master_sites    ruby:1.8
20                               
21dist_subdir             ruby
22checksums               md5 88c45aaf627b4404e5e4273cb03ba2ee \
23                                rmd160 f854d456003af1e31d50330c88c3cb152c434249 \
24                                sha1 9e84b49ad545ad54b8e7dc3c227eaaefeb1041aa
25
26use_bzip2               yes
27
28platforms               darwin
29
30depends_lib             port:libiconv \
31                                port:readline \
32                                port:openssl \
33                                port:zlib \
34                                port:ncurses
35
36# vendordir: enable vendor-specific.rb
37# #3604: gcc4 fails to detect linking at configure
38# #19050: use $(CC) not cc, this change has been merged at ruby-1.8 trunk
39# #15528: on some Mac, TCPServer.open("localhost", 0) raises SocketError
40#         like "getaddrinfo: nodename nor servname provided, or not
41#         known (SocketError)"
42# #22361: Hash equivalence fails when a value is a Fixnum >= 2**29 or 2**61
43# ruby-core:21033: the DRb code in drb.rb does not correctly deal with
44#                  multiple network families if they're present.
45patchfiles              patch-vendordir.diff \
46                                patch-bug3604.diff \
47                                patch-bug19050.diff \
48                                patch-bug15528.diff \
49                                patch-bug22361.diff \
50                                patch-ruby-core21033.diff
51
52# ignore getcontext() and setcontext()
53# on 10.5, these functions have some problems (SEGV on ppc, slower than 1.8.6)
54# http://chopine.be/lrz/ruby-osx-patches/ignore-gsetcontext.diff
55patchfiles-append patch-node.h.diff
56
57use_parallel_build              yes
58
59configure.args  --enable-shared \
60                                --mandir="${prefix}/share/man" \
61                                --enable-pthread \
62                                --without-tk \
63                                --with-vendordir=${prefix}/lib/ruby/vendor_ruby
64# ignore minor version for archdir, like i686-darwin9
65configure.env   UNAME_RELEASE=${os.major}
66
67if {![variant_isset universal] && [info exists build_arch] && $build_arch != ""} {
68        configure.env-append ARCH_FLAG="-arch ${build_arch}"
69}
70
71destroot.target install install-doc
72post-destroot {
73        foreach type {site vendor} {
74                set libdir ${destroot}${prefix}/lib/ruby/${type}_ruby
75                xinstall -m 0755 -d ${libdir}
76               
77                # special file for installation control of modules
78                xinstall -m 0644 ${filespath}/${type}-specific.rb ${libdir}
79               
80                # prevent empty site/vendor directories from being pruned
81                foreach subdir [exec find ${libdir} -type d -empty] {
82                        destroot.keepdirs-append ${subdir}
83                }
84        }
85    # error at activate, for these case sensitive files
86        foreach rdoc {Exception2MessageMapper/fail-i.yaml \
87                                  REXML/Parsers/XPathParser/predicate-i.yaml} {
88                if {[file exists ${destroot}${prefix}/share/ri/1.8/system/${rdoc}]} {
89                        delete ${destroot}${prefix}/share/ri/1.8/system/${rdoc}
90                }
91        }
92}
93
94variant universal {
95        configure.args-delete --disable-dependency-tracking
96        build.target-append  EXTLDFLAGS="${configure.universal_ldflags}" CFLAGS="${configure.universal_cflags}"
97}
98
99platform darwin {
100        # for proper rdoc/ri creation, make sure to link to destroot libruby.dylib
101        destroot.env    DYLD_LIBRARY_PATH=${destroot}${prefix}/lib
102}
103
104platform darwin 7 {
105        # pthreads is being called with an unavailable function call
106        configure.args-delete   --enable-pthread
107}
108
109variant tk conflicts mactk description "enable tk support" {
110        configure.args-delete   --without-tk
111        configure.args-append   --with-tk
112        depends_lib-append              port:tcl port:tk
113}
114
115variant mactk conflicts tk description "enable MacTk (Tk.framework without X11) support" {
116        configure.args-delete   --without-tk
117        configure.args-append   --enable-tcltk-framework
118}
119
120variant thread_hooks description "apply Apple's thread_hooks patch" {
121        patchfiles-append               patch-thread-hooks.diff
122}
123
124variant no_doc description "do not install rdoc documents" {
125        destroot.target-delete  install-doc
126}
127
128default_variants        +thread_hooks
129
130livecheck.type  regex
131livecheck.url   http://ftp.ruby-lang.org/pub/ruby/1.8/
132livecheck.regex {ruby-(\d+(?:\.\d+)*(?:-p\d+))}
133
134test.run        yes
Note: See TracBrowser for help on using the repository browser.