Consolidated Ruby patches using major and minor versions

Previously we had to remember to apply specific patches for each
version of Ruby, and it was easy to forget. Let's just simplify this
by applying patches for the major and minor versions (e.g. 2.7, 3.0,
etc.).
This commit is contained in:
Stan Hu 2022-11-29 14:49:23 -08:00
parent f0b78cb928
commit 88901ea9ff
No known key found for this signature in database
GPG key ID: 8D3931AD39CC7A20
15 changed files with 4 additions and 1500 deletions

View file

@ -47,11 +47,12 @@ function build_common() {
cd /usr/src/ruby
# Apply patches
if [[ -d "/patches/ruby/$RUBY_VERSION" ]]; then
for i in "/patches/ruby/$RUBY_VERSION"/*.patch; do
ruby_version=`cut -d '.' -f 1,2 <<< $RUBY_VERSION`
if [[ -d "/patches/ruby/$ruby_version" ]]; then
for i in "/patches/ruby/$ruby_version"/*.patch; do
echo "$i..."
patch -p1 -i "$i"
done
done
fi
# Compile