scripts/package in rvm-0.1.39 vs scripts/package in rvm-0.1.40

- old
+ new

@@ -1,35 +1,19 @@ #!/usr/bin/env bash +rvm_base_except="selector" +source "$rvm_scripts_path/base" -# -# ruby dependency packages: -# +# Tools to make managing ruby dependencies inside of rvm easier. -for rvmrc in /etc/rvmrc $HOME/.rvmrc ; do - if [[ -f "$rvmrc" ]] ; then - if grep -q '^\s*rvm .*$' $rvmrc ; then - $rvm_scripts_path/log "error" "$rvmrc is for rvm settings only.\nrvm CLI may NOT be called from within $rvmrc. \nSkipping the loading of $rvmrc" - return 1 - else - source "$rvmrc" - fi - fi -done - -source $rvm_scripts_path/initialize -source $rvm_scripts_path/utility -__rvm_load_rvmrc - -trap "rm -f $rvm_tmp_path/$$* > /dev/null 2>&1 ; exit" 0 1 2 3 15 -if [[ ! -z "$rvm_trace_flag" ]] ; then set -x ; export rvm_trace_flag ; fi - action="$(echo "$*" | awk '{print $1}')" library="$(echo "$*" | awk '{print $2}')" args=$(echo "$*" | awk '{$1="" ; $2="" ; print}' | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') install_package() { + __rvm_db "${package}_url" "package_url" + if [[ ! -z "$rvm_make_flags_flag" ]] ; then __rvm_make_flags ; fi __rvm_pushpop $rvm_src_path $rvm_scripts_path/log "info" "Fetching $package-$version.$archive_format to $rvm_archives_path" @@ -58,38 +42,36 @@ else __rvm_run "$package/make" "/usr/bin/make $rvm_make_flags" "Compiling $package in $rvm_src_path/$package-$version." __rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_usr_path" fi - __rvm_pushpop + touch "$rvm_config_path/packages" + $rvm_scripts_path/db "$rvm_config_path/packages" "${package}" "${version}" + __rvm_pushpop } readline() { package="readline" ; archive_format="tar.gz" - package_url="ftp://ftp.gnu.org/gnu/readline" for version in 5.2 6.0 ; do configure_flags="--disable-dependency-tracking --disable-static --enable-shared" install_package done } iconv() { package="libiconv" ; version=1.13.1 ; archive_format="tar.gz" - package_url="http://ftp.gnu.org/pub/gnu/libiconv" install_package } curl() { package="curl" ; version=7.19.7 ; archive_format="tar.gz" - package_url="http://curl.haxx.se/download" install_package } openssl() { package="openssl" ; version="0.9.8n" ; archive_format="tar.gz" - package_url="http://www.openssl.org/source" if [[ "Darwin" = "$(uname)" ]] ; then if $rvm_scripts_path/match "$rvm_archflags" "x86_64" ; then export openssl_os="os/compiler darwin64-x86_64-cc" else export openssl_os="os/compiler darwin-i386-cc" @@ -104,54 +86,46 @@ install_package } zlib() { package="zlib" ; version="1.2.5" ; archive_format="tar.gz" - package_url="http://www.zlib.net" install_package } autoconf() { - package_url="ftp.gnu.org/gnu/autoconf" package="autoconf" ; version="2.65" ; archive_format="tar.gz" - prefix_path="${rvm_bin_path:-"${rvm_path:-"$HOME/.rvm"}"}" install_package } ncurses() { - package_url="http://ftp.gnu.org/pub/gnu/ncurses" package="ncurses" ; version="5.7" ; archive_format="tar.gz" configure_flags="--with-shared --disable-rpath --without-debug --without-ada --enable-safe-sprintf --enable-sigwinch --without-progs" install_package } pkgconfig() { - package_url="http://pkgconfig.freedesktop.org/releases" package="pkg-config" ; version="0.23" archive_format="tar.gz" install_package } gettext() { - package_url="ftp://ftp.gnu.org/pub/gnu/gettext" package="gettext" ; version="0.17" ; archive_format="tar.gz" install_package } libxml2() { - package_url="ftp://xmlsoft.org/libxml2/" package="libxml2" ; version="2.7.3" ; archive_format="tar.gz" if [[ "Darwin" = "$(uname)" ]] ; then configure="./configure --prefix=${rvm_usr_path} --build=i686-apple-darwin$(uname -r) --host=i686-apple-darwin$(uname -r)" fi install_package unset prefix_path } glib() { package="glib" ; version="2.23.1" ; archive_format="tar.gz" - package_url="http://ftp.gnome.org/pub/gnome/sources/glib/2.23" configure="CC=\"cc -L$rvm_usr_path/lib\" ./configure --prefix=$rvm_usr_path" install_package } @@ -160,20 +134,20 @@ pkgconfig glib __rvm_mono_env package="mono" ; version="2.6.1" ; archive_format="tar.bz2" - packge_url="http://ftp.novell.com/pub/mono/sources/mono/" - install_package } llvm() { + package="llvm" ; version="89156" if [[ ! -z "$rvm_make_flags_flag" ]] ; then __rvm_make_flags ; fi __rvm_pushpop $rvm_src_path if [[ ! -d "$rvm_src_path/llvm/.svn" ]] ; then + __rvm_db "${package}_url" "package_url" rm -rf "$rvm_src_path/llvm" - svn co -r 89156 https://llvm.org/svn/llvm-project/llvm/trunk llvm + svn co -r "$version" "$package_url" llvm builtin cd "$rvm_src_path/llvm" ./configure --enable-bindings=none UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" ENABLE_OPTIMIZED=1 make -j2 sudo env UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" ENABLE_OPTIMIZED=1 make install fi