Skip to content

Instantly share code, notes, and snippets.

@kkirsche
Last active July 29, 2019 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kkirsche/f27582763020ef3b2258e414814dc9c0 to your computer and use it in GitHub Desktop.
Save kkirsche/f27582763020ef3b2258e414814dc9c0 to your computer and use it in GitHub Desktop.
Patch for rbenv's ree-1.8.7-2012.02 Installer
#!/bin/bash
mkdir ~/Downloads/gcc-4.9-deb && cd ~/Downloads/gcc-4.9-deb
wget http://launchpadlibrarian.net/247707088/libmpfr4_3.1.4-1_amd64.deb
wget http://launchpadlibrarian.net/253728424/libasan1_4.9.3-13ubuntu2_amd64.deb
wget http://launchpadlibrarian.net/253728426/libgcc-4.9-dev_4.9.3-13ubuntu2_amd64.deb
wget http://launchpadlibrarian.net/253728314/gcc-4.9-base_4.9.3-13ubuntu2_amd64.deb
wget http://launchpadlibrarian.net/253728399/cpp-4.9_4.9.3-13ubuntu2_amd64.deb
wget http://launchpadlibrarian.net/253728404/gcc-4.9_4.9.3-13ubuntu2_amd64.deb
wget http://launchpadlibrarian.net/253728432/libstdc++-4.9-dev_4.9.3-13ubuntu2_amd64.deb
wget http://launchpadlibrarian.net/253728401/g++-4.9_4.9.3-13ubuntu2_amd64.deb
sudo dpkg -i gcc-4.9-base_4.9.3-13ubuntu2_amd64.deb
sudo dpkg -i libmpfr4_3.1.4-1_amd64.deb
sudo dpkg -i libasan1_4.9.3-13ubuntu2_amd64.deb
sudo dpkg -i libgcc-4.9-dev_4.9.3-13ubuntu2_amd64.deb
sudo dpkg -i cpp-4.9_4.9.3-13ubuntu2_amd64.deb
sudo dpkg -i gcc-4.9_4.9.3-13ubuntu2_amd64.deb
sudo dpkg -i libstdc++-4.9-dev_4.9.3-13ubuntu2_amd64.deb
sudo dpkg -i g++-4.9_4.9.3-13ubuntu2_amd64.deb
cd ~
rm -rf ~/Downloads/gcc-4.9-deb
build_package_patched() {
# These three patches are included when RVM builds REE
cd source
wget 'https://github.com/wayneeseguin/rvm/raw/master/patches/ree/1.8.7/tcmalloc.patch'
wget 'https://github.com/wayneeseguin/rvm/raw/master/patches/ree/1.8.7/stdout-rouge-fix.patch'
# already applied?!: wget 'https://github.com/wayneeseguin/rvm/raw/master/patches/ree/1.8.7/no_sslv2.diff'
patch -p1 < tcmalloc.patch
patch -p1 < stdout-rouge-fix.patch
# patch -p1 < no_sslv2.diff
cd ..
}
require_gcc
install_package "ruby-enterprise-1.8.7-2012.02" "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/rubyenterpriseedition/ruby-enterprise-1.8.7-2012.02.tar.gz" patched warn_eol ree_installer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment