-
Notifications
You must be signed in to change notification settings - Fork 1
/
2.3.8
45 lines (41 loc) · 1.74 KB
/
2.3.8
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
# Old config.guess isn't arm64-aware. Pull a new one in from automake.
build_package_freshen_automake_config() {
{
mv tool/config.guess tool/config.guess.dist
mv tool/config.sub tool/config.sub.dist
} >&4 2>&1
}
install_bundler() {
"$PREFIX_PATH"/bin/gem install bundler:1.17.3
}
RUBY_CFLAGS=""
case "$(cc -v 2>&1)" in
*gcc*)
RUBY_CFLAGS+=" -Wno-discarded-qualifiers"
RUBY_CFLAGS+=" -Wno-implicit-int"
RUBY_CFLAGS+=" -Wno-incompatible-pointer-types"
RUBY_CFLAGS+=" -Wno-int-conversion"
RUBY_CFLAGS+=" -Wno-return-type"
;;
*clang*)
RUBY_CFLAGS+=" -Wno-compound-token-split-by-macro"
RUBY_CFLAGS+=" -Wno-implicit-function-declaration"
RUBY_CFLAGS+=" -Wno-implicit-int"
RUBY_CFLAGS+=" -Wno-incompatible-function-pointer-types"
RUBY_CFLAGS+=" -Wno-int-conversion"
RUBY_CFLAGS+=" -Wno-return-type"
;;
esac
export RUBY_CFLAGS
# M1-compatible OpenSSL 1.0 from https://github.com/basecamp/homebrew-dev
if type -p brew >/dev/null; then
brew install basecamp/dev/[email protected]
openssl_prefix_path="$(brew --prefix basecamp/dev/[email protected])"
package_option ruby configure --with-openssl-dir="$openssl_prefix_path"
export PKG_CONFIG_PATH="$openssl_prefix_path/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
else
install_package "openssl-1.0.2u" "https://www.openssl.org/source/openssl-1.0.2u.tar.gz#ecd0c6ffb493dd06707d38b14bb4d8c2288bb7033735606569d8f90f89669d16" openssl --if needs_openssl:0.9.6-1.0.x
fi
package_option ruby configure --with-out-ext=tk --disable-install-doc
install_package "ruby-2.3.8" "https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.8.tar.bz2#4d1a3a88e8cf9aea624eb73843fbfc60a9a281582660f86d5e4e00870397407c" freshen_automake_config ldflags_dirs standard verify_openssl
install_bundler