-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Portfile
145 lines (119 loc) · 4.87 KB
/
Portfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup select 1.0
name ruby26
version 2.6.6
revision 0
categories lang ruby
maintainers {kimuraw @kimuraw} openmaintainer
platforms darwin
description Powerful and clean object-oriented scripting language
long_description Ruby is the interpreted scripting language for quick \
and easy object-oriented programming. It has many \
features to process text files and to do system \
management tasks (as in Perl). It is simple, \
straight-forward, extensible, and portable.
homepage https://www.ruby-lang.org/
license {Ruby BSD}
master_sites ruby:2.6
use_bzip2 yes
distname ruby-${version}
dist_subdir ruby26
checksums md5 abc030870bfbe18ae9c356abebd95cb6 \
rmd160 1360730a1c81be2a3e869a341f899b50ce10a26d \
sha1 62adcc4c465a8790b3df87860551e7ad7d84f23d \
sha256 f08b779079ecd1498e6a2548c39a86144c6c784dcec6f7e8a93208682eb8306e
use_parallel_build no
depends_lib port:readline \
path:lib/libssl.dylib:openssl \
port:zlib \
port:libyaml \
port:libffi \
port:gdbm
depends_run port:ruby_select
depends_build port:pkgconfig
depends_skip_archcheck pkgconfig
select.group ruby
select.file ${filespath}/ruby26
configure.args --enable-shared \
--enable-install-static-library \
--disable-install-doc \
--mandir="${prefix}/share/man" \
--enable-pthread \
--without-gmp \
--with-opt-dir="${prefix}" \
--program-suffix=2.6 \
--with-rubylibprefix="${prefix}/lib/ruby2.6"
# Add the architecture flag as required
if {[info exists build_arch] && ${build_arch} != ""} {
configure.args-append "--with-arch=${build_arch}"
}
post-patch {
# (see rb-bundler) sh "gem build ..." -> sh "gem2.6 build ..."
reinplace -E "s/(gem) (build|install|push)/gem2.6 \\2/g" \
${worksrcpath}/lib/bundler/gem_helper.rb
}
post-destroot {
foreach type {site vendor} {
set libdir ${destroot}${prefix}/lib/ruby2.6/${type}_ruby/2.6.0
xinstall -m 0755 -d ${libdir}
foreach subdir [exec find ${libdir} -type d -empty] {
destroot.keepdirs-append ${subdir}
}
}
# install destination of commands from port:rb26-*
xinstall -m 0755 -d ${destroot}${prefix}/libexec/ruby2.6
destroot.keepdirs-append ${destroot}${prefix}/libexec/ruby2.6
}
variant doc description "Install rdoc indexes and C API documents" {
configure.args-delete --disable-install-doc
}
variant gmp description "use gmp" {
configure.args-delete --without-gmp
depends_lib-append port:gmp
}
variant jemalloc description "use jemalloc" {
configure.args-delete --without-jemalloc
configure.args-append --with-jemalloc
depends_lib-append port:jemalloc
}
variant universal {
# use ruby built-in universal mechanism.
configure.args-append --with-arch=[join ${universal_archs} ,]
# clear macports' universal flags
configure.universal_cflags
configure.universal_cppflags
configure.universal_cxxflags
configure.universal_ldflags
}
variant relative description "Enable relative loading of libraries to allow for relocation of binaries." {
#enable relative loading
configure.args-append --enable-load-relative
}
# legacy systems suport
platform darwin {
# Build requires 10.8 SDK when targeting 10.7
# see https://trac.macports.org/ticket/57986
if {${os.major} == 11} {
set ten_eight_sdkpath ${developer_dir}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
if {[file exists $ten_eight_sdkpath]} {
configure.sdkroot $ten_eight_sdkpath
} else {
pre-fetch {
error "Building $name @${version} on Mac OS X 10.7 requires the MacOSX10.8.sdk to be present in ${developer_dir}/Platforms/MacOSX.platform/Developer/SDKs"
}
}
}
if {${os.major} < 11} {
depends_build-append port:gmake
build.cmd ${prefix}/bin/gmake
configure.args-append --disable-dtrace
configure.cflags-append -std=c99
}
if {${os.major} == 8} {
configure.cppflags-append -DCPU_SUBTYPE_MASK=0xff000000
}
}
livecheck.type regex
livecheck.url https://cache.ruby-lang.org/pub/ruby/2.6/
livecheck.regex ruby-(2\\.6\\.\\d+)[quotemeta ${extract.suffix}]