#!/usr/bin/env bash # # ruby supporting libraries: # __rvm_readline_install() { __rvm_make_flags __rvm_pushpop $rvm_src_path package="readline" ; version="5.2" ; archive_format="tar.gz" # TODO: Figure out how to list, grab and apply the patches $rvm_scripts_path/log "info" "Retrieving $package-$version.$archive_format" $rvm_scripts_path/fetch "ftp://ftp.gnu.org/gnu/readline/$package-$version.$archive_format" result=$? ; if [[ "$result" -gt 0 ]] ; then return $result ; fi __rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format" builtin cd "$rvm_src_path/$package-$version" if [[ "Darwin" = "$(uname)" ]] ; then #sdk=$(\ls -t /Developer/SDKs/ | head -n 1) #CFLAGS="-isysroot /Developer/SDKs/$sdk -arch i386 -arch x86_64" #LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/$sdk -arch i386 -arch x86_64" #export CFLAGS LDFLAGS __rvm_run "$package/configure" "./configure --prefix=$rvm_path/usr --disable-dependency-tracking --disable-static --enable-shared" "Configuring $package" else __rvm_run "$package/configure" "./configure --prefix=$rvm_path/usr --disable-dependency-tracking --disable-static --enable-shared" "Configuring $package" fi __rvm_run "$package/make" "/usr/bin/make $rvm_make_flags" "Compiling $package" __rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_path/usr" __rvm_pushpop } __rvm_iconv_install() { __rvm_make_flags __rvm_pushpop $rvm_src_path package="libiconv" ; version=1.13.1 ; archive_format="tar.gz" $rvm_scripts_path/log "info" "Retrieving $package-$version.$archive_format" $rvm_scripts_path/fetch "http://ftp.gnu.org/pub/gnu/libiconv/$package-$version.$archive_format" result=$? ; if [[ "$result" -gt 0 ]] ; then return $result ; fi __rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format" builtin cd "$rvm_src_path/$package-$version" __rvm_run "$package/configure" "./configure --prefix=$rvm_path/usr" "Configuring $package." __rvm_run "$package/make" "/usr/bin/make $rvm_make_flags" "Compiling $package" __rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_path/usr" __rvm_pushpop } __rvm_curl_install() { __rvm_make_flags __rvm_pushpop $rvm_src_path package="curl" ; version=7.19.7 ; archive_format="tar.gz" $rvm_scripts_path/log "info" "Retrieving $package-$version.$archive_format" $rvm_scripts_path/fetch "http://curl.haxx.se/download/$package-$version.$archive_format" result=$? ; if [[ "$result" -gt 0 ]] ; then return $result ; fi __rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format" builtin cd "$rvm_src_path/$package-$version" __rvm_run "$package/configure" "./configure --prefix=$rvm_path/usr" "Configuring $package." __rvm_run "$package/make" "/usr/bin/make $rvm_make_flags" "Compiling $package" __rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_path/usr" __rvm_pushpop } __rvm_openssl_install() { __rvm_make_flags if $rvm_scripts_path/match "$rvm_archflags" "x86_64" ; then openssl_os="os/compiler darwin64-x86_64-cc" else openssl_os="os/compiler darwin-i386-cc" fi __rvm_pushpop $rvm_src_path package="openssl" ; version="0.9.8k" ; archive_format="tar.gz" $rvm_scripts_path/log "info" "Retrieving $package-$version.$archive_format" $rvm_scripts_path/fetch "http://www.openssl.org/source/$package-$version.tar.gz" result=$? ; if [[ "$result" -gt 0 ]] ; then return $result ; fi __rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format" builtin cd "$rvm_src_path/$package-$version" __rvm_run "$package/config" "./config --prefix=$rvm_path/usr zlib no-asm no-krb5 shared" "Configuring $package." __rvm_run "$package/make" "/usr/bin/make $rvm_make_flags" "Compiling $package" __rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_path/usr" __rvm_pushpop } __rvm_zlib_install() { __rvm_make_flags __rvm_pushpop $rvm_src_path package="zlib" ; version="1.2.3" ; archive_format="tar.gz" $rvm_scripts_path/log "info" "Retrieving $package-$version.$archive_format" $rvm_scripts_path/fetch "http://www.zlib.net/$package-$version.tar.gz" result=$? ; if [[ "$result" -gt 0 ]] ; then return $result ; fi __rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format" builtin cd "$rvm_src_path/$package-$version" __rvm_run "$package/configure" "./configure --prefix=$rvm_path/usr" "Configuring $package." __rvm_run "$package/make" "/usr/bin/make $rvm_make_flags" "Compiling $package" __rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_path/usr" __rvm_pushpop } __rvm_ncurses_install() { __rvm_make_flags __rvm_pushpop $rvm_src_path package="ncurses" ; version="5.7" ; archive_format="tar.gz" $rvm_scripts_path/log "info" "Retrieving $package" $rvm_scripts_path/fetch "ftp://invisible-island.net/ncurses/ncurses.tar.gz" result=$? ; if [[ "$result" -gt 0 ]] ; then return $result ; fi __rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package.$archive_format -C $rvm_src_path" "Extracting $package.$archive_format" builtin cd "$rvm_src_path/$package-$version" __rvm_run "$package/configure" "./configure --prefix=$rvm_path/usr --with-shared --disable-rpath --without-debug --without-ada --enable-safe-sprintf --enable-sigwinch --without-progs" "Configuring $package." __rvm_run "$package/make" "/usr/bin/make $rvm_make_flags" "Compiling $package" __rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_path/usr" __rvm_pushpop }