Skip to content

Instantly share code, notes, and snippets.

@dbr
Created December 5, 2013 12:20
Show Gist options
  • Save dbr/7804348 to your computer and use it in GitHub Desktop.
Save dbr/7804348 to your computer and use it in GitHub Desktop.
Incomplete Vagrant VM config for testing OpenColorIO with GCC 4.1.2
#!/bin/sh
echo "Install gcc-4.1.2"
sudo -u vagrant bash <<EOF
# Avoid silly errors
set -o pipefail
set -o errtrace
set -o nounset
function install_gcc_412(){
# Provides "makeinfo" required for gcc build
sudo yum -y install texinfo
# Ensure in correct directory
cd ~/
# Extract GCC source (about 52MB)
wget --continue http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-4.1.2/gcc-4.1.2.tar.gz
tar -xf gcc-4.1.2.tar.gz
# Make build dir
mkdir build-gcc-4.1.2
cd build-gcc-4.1.2
# Configure, build and install
../gcc-4.1.2/configure \
--prefix=/opt/gcc-4.1.2 \
--program-suffix=-4.1.2 \
--enable-languages=c,c++ \
--enable-shared \
--enable-threads=posix \
--enable-checking=release \
--disable-libunwind-exceptions \
--enable-__cxa_atexit \
--disable-multilib
make bootstrap-lean # Lean to clean up stage1/stage2/stage3 dirs as the build goes
sudo make install
}
if [ ! -f /opt/gcc-4.1.2/bin/gcc-4.1.2 ]; then
install_gcc_412
fi
EOF
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "centos-64-x64"
config.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210-nocm.box"
config.vm.customize ["modifyvm", :id, "--ioapic", "on"]
config.vm.customize ["modifyvm", :id, "--cpus", "2"]
config.vm.provision :shell, :path => "install.sh"
# config.vm.boot_mode = :gui
# config.vm.network :hostonly, "192.168.33.10"
# config.vm.network :bridged
# config.vm.forward_port 80, 8080
# config.vm.share_folder "v-data", "/vagrant_data", "../data"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment