scripts/package in rvm-1.0.13 vs scripts/package in rvm-1.0.14

- old
+ new

@@ -58,12 +58,21 @@ esac builtin cd "$src_path/$package-$version" + if [[ ! -z "$patches" ]] ; then + for patch in $(echo $patches | tr ',' ' ') ; do + __rvm_run "$package/patch" "patch -p0 -f < $patch" "Applying patch '$patch'..." + if [[ $? -gt 0 ]] ; then + $rvm_scripts_path/log "error" "Patch $patch did not apply cleanly... back to the patching board :(" ; exit 1 + fi + done + fi + __rvm_run "$package/configure" \ - "${configure:-"./configure --prefix=${prefix_path:-"$usr_path"}"} $configure_flags" \ + "${configure:-"./configure --prefix=\"${prefix_path:-"$usr_path"}\""} $configure_flags" \ "Configuring $package in $src_path/$package-$version." unset configure_flags if [[ "$action" = "uninstall" ]] ; then @@ -94,14 +103,19 @@ } readline() { package="readline" ; archive_format="tar.gz" - for version in 5.2 6.0 ; do - configure_flags="--disable-dependency-tracking --disable-static --enable-shared" - install_package - done + configure="env CFLAGS=-I${usr_path}/include LDFLAGS=-L${usr_path}/lib ./configure --prefix=${usr_path} --disable-dependency-tracking --disable-static --enable-shared" + + version="5.2" + patches="$rvm_path/patches/$package-$version/shobj-conf.patch" + install_package + + version="6.0" + patches="" + install_package } iconv() { package="libiconv" ; version=1.13.1 ; archive_format="tar.gz" @@ -148,11 +162,11 @@ openssl_os="darwin-i386-cc" fi fi configure_command="./Configure" - patches="$rvm_path/patches/$package/Makefile.org.patch,$rvm_patch/patches/$package/crypto-Makefile.patch" + patches="$rvm_path/patches/$package/Makefile.org.patch,$rvm_path/patches/$package/crypto-Makefile.patch" # Don't use -j option for make OpenSSL if [[ ! -z "$rvm_make_flags" ]] ; then rvm_make_flags=$(echo "$rvm_make_flags" | sed -e "s/-j[[:space:]]*[[0-9]]*//") fi @@ -208,11 +222,11 @@ glib() { pkgconfig gettext package="glib" ; version="2.23.1" ; archive_format="tar.gz" - configure="CC=\"cc -L$usr_path/lib -I$usr_path/include\" PKG_CONFIG=\"$usr_path/bin/pkg-config\" ./configure --prefix=$usr_path" + configure="CC=\"cc -L$usr_path/lib -I$usr_path/include\" PKG_CONFIG=\"$usr_path/bin/pkg-config\" ./configure --prefix=\"$usr_path\"" install_package } mono() @@ -240,10 +254,15 @@ sudo env UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" ENABLE_OPTIMIZED=1 make install fi ) } +reset() +{ + unset package version archive_format patches prefix_path configure configure_flags +} + # Tools to make managing ruby dependencies inside of rvm easier. args=($*) action="${args[0]:-""}" library="${args[1]:-""}" args="$(echo ${args[@]:2})" @@ -256,17 +275,27 @@ case $library in readline|iconv|curl|openssl|zlib|autoconf|ncurses|pkgconfig|gettext|glib|mono|llvm|libxml2) ${library} ;; + ree_dependencies) + for i in zlib ncurses readline openssl iconv; do + ${i} + reset + done + ;; *) "$rvm_path/scripts/log" "error" "Package '${library}' is unknown." ;; esac exit $? else "$rvm_path/scripts/log" "info" \ "Usage: 'rvm package {install,uninstall} {readline,iconv,curl,openssl,zlib,autoconf,ncurses,pkgconfig,gettext,glib,mono,llvm,libxml2}'" + "$rvm_path/scripts/log" "info" \ + " 'ree_dependencies' installs zlib, ncurses, readline, openssl and iconv in this order." + "$rvm_path/scripts/log" "info" \ + " still need to add '-C --with-readline-dir=\$rvm_path/usr,--with-iconv-dir=\$rvm_path/usr,--with-zlib-dir=\$rvm_path/usr,--with-openssl-dir=\$rvm_path/usr' to 'rvm install ree'" exit 1 fi