Permalink
Browse files

Use a unified and updated patch.

  • Loading branch information...
1 parent aa9ad37 commit e78f38a8455b58827d46dcc41e956b51828856e7 Evan Weaver committed Feb 21, 2009
Showing with 323 additions and 377 deletions.
  1. +2 −0 CHANGELOG
  2. +1 −2 Manifest
  3. +2 −4 ext/build_ruby.rb
  4. +0 −242 ruby/configure.patch
  5. +0 −129 ruby/gc.patch
  6. +318 −0 ruby/ruby.patch
View
@@ -1,4 +1,6 @@
+v4.2. Harden patch/build process. Fix bug.
+
v4.1.1. Update bundled Ruby to patchlevel 230.
v4.1. Support calculating deltas in analyze utility.
View
@@ -13,9 +13,8 @@ LICENSE_BSD
Manifest
Rakefile
README
-ruby/configure.patch
-ruby/gc.patch
ruby/ruby-1.8.6-p286.tar.bz2
+ruby/ruby.patch
ruby/valgrind.patch
test/benchmark/bench.rb
test/test_helper.rb
View
@@ -31,7 +31,7 @@ def which(basename)
end
if which('ruby-bleak-house') and
- (patchlevel = `ruby-bleak-house -e "puts RUBY_PATCHLEVEL"`.to_i) >= 902
+ (patchlevel = `ruby-bleak-house -e "puts RUBY_PATCHLEVEL"`.to_i) >= 903
puts "Binary `ruby-bleak-house` is already available (patchlevel #{patchlevel})"
else
# Build
@@ -60,9 +60,7 @@ def which(basename)
Dir.chdir("ruby-1.8.6-p286") do
puts "Patch, configure, and build"
- ["valgrind", "configure", "gc"].each do |patch|
- execute("patch -p0 < \'#{source_dir}/#{patch}.patch\'")
- end
+ execute("patch -p0 < \'#{source_dir}/ruby.patch\'")
execute("./configure --prefix=#{binary_dir[0..-5]}") # --with-static-linked-ext
View
@@ -1,242 +0,0 @@
-Index: configure
-===================================================================
---- configure (revision 6446)
-+++ configure (working copy)
-@@ -720,6 +720,7 @@
- ARCHFILE
- RDOCTARGET
- XCFLAGS
-+VALGRIND_CFLAGS
- XLDFLAGS
- LIBRUBY_LDSHARED
- LIBRUBY_DLDFLAGS
-@@ -1356,6 +1357,7 @@
- --enable-pthread use pthread library.
- --disable-fastthread do not use the fastthread mutex
- --enable-setreuid use setreuid()/setregid() according to need even if obsolete.
-+ --enable-valgrind use valgrind support
- --disable-rpath embed run path into extension libraries.
- --enable-shared build a shared library for Ruby.
- --enable-install-doc build and install rdoc indexes during install
-@@ -12988,13 +12990,11 @@
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
--#include <sys/types.h> /* for off_t */
-- #include <stdio.h>
-+#include <stdio.h>
- int
- main ()
- {
--int (*fp) (FILE *, off_t, int) = fseeko;
-- return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
-+return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
- ;
- return 0;
- }
-@@ -13034,13 +13034,11 @@
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #define _LARGEFILE_SOURCE 1
--#include <sys/types.h> /* for off_t */
-- #include <stdio.h>
-+#include <stdio.h>
- int
- main ()
- {
--int (*fp) (FILE *, off_t, int) = fseeko;
-- return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
-+return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
- ;
- return 0;
- }
-@@ -15768,6 +15766,172 @@
- fi
- fi
-
-+# Check whether --enable-valgrind was given.
-+if test "${enable_valgrind+set}" = set; then
-+ enableval=$enable_valgrind; want_valgrind=$enableval
-+else
-+ want_valgrind=auto
-+fi
-+
-+
-+if test x"$want_valgrind" != xno; then
-+
-+for ac_header in valgrind/memcheck.h
-+do
-+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-+ { echo "$as_me:$LINENO: checking for $ac_header" >&5
-+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+fi
-+ac_res=`eval echo '${'$as_ac_Header'}'`
-+ { echo "$as_me:$LINENO: result: $ac_res" >&5
-+echo "${ECHO_T}$ac_res" >&6; }
-+else
-+ # Is the header compilable?
-+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+$ac_includes_default
-+#include <$ac_header>
-+_ACEOF
-+rm -f conftest.$ac_objext
-+if { (ac_try="$ac_compile"
-+case "(($ac_try" in
-+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+ *) ac_try_echo=$ac_try;;
-+esac
-+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-+ (eval "$ac_compile") 2>conftest.er1
-+ ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); } && {
-+ test -z "$ac_c_werror_flag" ||
-+ test ! -s conftest.err
-+ } && test -s conftest.$ac_objext; then
-+ ac_header_compiler=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ ac_header_compiler=no
-+fi
-+
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-+echo "${ECHO_T}$ac_header_compiler" >&6; }
-+
-+# Is the header present?
-+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+#include <$ac_header>
-+_ACEOF
-+if { (ac_try="$ac_cpp conftest.$ac_ext"
-+case "(($ac_try" in
-+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+ *) ac_try_echo=$ac_try;;
-+esac
-+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-+ ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); } >/dev/null && {
-+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-+ test ! -s conftest.err
-+ }; then
-+ ac_header_preproc=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ ac_header_preproc=no
-+fi
-+
-+rm -f conftest.err conftest.$ac_ext
-+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-+echo "${ECHO_T}$ac_header_preproc" >&6; }
-+
-+# So? What about this header?
-+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-+ yes:no: )
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-+ ac_header_preproc=yes
-+ ;;
-+ no:yes:* )
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-+
-+ ;;
-+esac
-+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ eval "$as_ac_Header=\$ac_header_preproc"
-+fi
-+ac_res=`eval echo '${'$as_ac_Header'}'`
-+ { echo "$as_me:$LINENO: result: $ac_res" >&5
-+echo "${ECHO_T}$ac_res" >&6; }
-+
-+fi
-+if test `eval echo '${'$as_ac_Header'}'` = yes; then
-+ cat >>confdefs.h <<_ACEOF
-+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
-+ have_valgrind=yes
-+else
-+ have_valgrind=no
-+fi
-+
-+done
-+
-+ if test x"$have_valgrind" = xyes; then
-+ cat >>confdefs.h <<\_ACEOF
-+#define HAVE_VALGRIND 1
-+_ACEOF
-+
-+ VALGRIND_CFLAGS="";
-+ elif test x"$want_valgrind" = xyes -a x"$have_valgrind" = xno; then
-+ { { echo "$as_me:$LINENO: error: valgrind support requested but valgrind not found" >&5
-+echo "$as_me: error: valgrind support requested but valgrind not found" >&2;}
-+ { (exit 1); exit 1; }; }
-+ else
-+ VALGRIND_CFLAGS="";
-+ fi
-+fi
-+
- DEFAULT_KCODE="KCODE_NONE"
-
-
-@@ -17854,6 +18018,7 @@
- ARCHFILE!$ARCHFILE$ac_delim
- RDOCTARGET!$RDOCTARGET$ac_delim
- XCFLAGS!$XCFLAGS$ac_delim
-+VALGRIND_CFLAGS!$VALGRIND_CFLAGS$ac_delim
- XLDFLAGS!$XLDFLAGS$ac_delim
- LIBRUBY_LDSHARED!$LIBRUBY_LDSHARED$ac_delim
- LIBRUBY_DLDFLAGS!$LIBRUBY_DLDFLAGS$ac_delim
-@@ -17887,7 +18052,7 @@
- LTLIBOBJS!$LTLIBOBJS$ac_delim
- _ACEOF
-
-- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 42; then
-+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 43; then
- break
- elif $ac_last_try; then
- { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
Oops, something went wrong.

0 comments on commit e78f38a

Please sign in to comment.