-
Notifications
You must be signed in to change notification settings - Fork 1
/
1.8.7-p374
64 lines (58 loc) · 2.1 KB
/
1.8.7-p374
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
# Old config.guess isn't arm64-aware. Pull a new one in from automake.
build_package_freshen_automake_config() {
{
brew install automake
cp `brew --prefix automake`/share/automake-*/config.{guess,sub} .
} >&4 2>&1
}
# https://bugs.ruby-lang.org/issues/1382
build_package_patch_lex_c99() {
patch -p1 --force <<EOF
diff --git a/lex.c b/lex.c
index a15309d502..35a2f03052 100644
--- a/lex.c
+++ b/lex.c
@@ -68,7 +68,7 @@ hash (str, len)
#ifdef __GNUC__
__inline
#endif
-struct kwtable *
+static struct kwtable *
rb_reserved_word (str, len)
register const char *str;
register unsigned int len;
EOF
}
install_bundler() {
"$PREFIX_PATH"/bin/gem install bundler -v 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/openssl@1.0
package_option ruby configure --with-openssl-dir="$(brew --prefix basecamp/dev/openssl@1.0)"
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
require_gcc
install_package "ruby-1.8.7-p374" "https://cache.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p374.tar.bz2#b4e34703137f7bfb8761c4ea474f7438d6ccf440b3d35f39cc5e4d4e239c07e3" freshen_automake_config patch_lex_c99 auto_tcltk standard
install_package "rubygems-1.8.23" "https://rubygems.org/rubygems/rubygems-1.8.23.tgz#e4a1c6bbaac411eaab94deae78228b7584033a1f10a022f52bffa9613aa29061" ruby
install_bundler