#!/bin/sh set -e WORKSPACE=/home/yasuhiro/.atelier/usr/share/ywesee # ruby RUBY_URL=https://cache.ruby-lang.org/pub/ruby RUBY_VERSION=1.8.6-p388 RUBY_TARGET=186 RUBY_SUFFIX=${RUBY_TARGET} # patches ATTACHMENT_URL=http://dev.ywesee.com/uploads/att # oniguruma ONIGURUMA_PATCHES_URL=${ATTACHMENT_URL}/Oniguruma_Patch_Ruby_${RUBY_TARGET}.tar.gz # additional patches for > ruby 1.8.6-p369 RUBY_PATCHE_OPENSSL=${ATTACHMENT_URL}/Openssl_patch.txt RUBY_PATCHE_SYCK=${ATTACHMENT_URL}/Syck_patch.txt cd ${WORKSPACE}/src # ruby if [ ! -f "ruby-${RUBY_VERSION}.tar.gz" ]; then curl -LO ${RUBY_URL}/ruby-${RUBY_VERSION}.tar.gz fi rm -fr ruby-${RUBY_VERSION} tar -zxvf ruby-${RUBY_VERSION}.tar.gz # oniguruma-patches if [ ! -f "oniguruma-patches.tar.gz" ]; then curl -L ${ONIGURUMA_PATCHES_URL} -o oniguruma-patches.tar.gz fi rm -fr oniguruma tar -zxvf oniguruma-patches.tar.gz cd oniguruma export CFLAGS=-fPIC make clean ./configure --with-rubydir=../ruby-${RUBY_VERSION} make $RUBY_TARGET cd ../ # additional ruby patches if [ ! -d "patches_ruby_${RUBY_TARGET}" ]; then mkdir patches_ruby_${RUBY_TARGET} fi cd patches_ruby_${RUBY_TARGET} if [ ! -f "openssl-1.0.patch" ]; then curl -L $RUBY_PATCHE_OPENSSL -o openssl-1.0.patch fi if [ ! -f "syck.patch" ]; then curl -L $RUBY_PATCHE_SYCK -o syck.patch fi cd ../ruby-${RUBY_VERSION} patch -p1 <../patches_ruby_${RUBY_TARGET}/openssl-1.0.patch patch -p1 <../patches_ruby_${RUBY_TARGET}/syck.patch autoconf ./configure \ --prefix=${WORKSPACE} \ --program-suffix=${RUBY_SUFFIX} \ --libdir=${WORKSPACE}/lib make make install