From ca9cb26aacb207ee39c287445a486ce87dae7c13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 24 Jun 2013 14:14:13 +0200 Subject: [PATCH] Add support for ABRT autoloading. --- ...-additional-preludes-by-configuratio.patch | 43 +++++++++++++++++++ ruby.spec | 18 ++++++++ 2 files changed, 61 insertions(+) create mode 100644 ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch new file mode 100644 index 0000000..3a36f91 --- /dev/null +++ b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch @@ -0,0 +1,43 @@ +diff --git a/Makefile.in b/Makefile.in +index a93a1e6..fb30c19 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -108,6 +108,7 @@ XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@ + XRUBY_RUBYHDRDIR = @XRUBY_RUBYHDRDIR@ + + DEFAULT_PRELUDES = $(@USE_RUBYGEMS@_GEM_PRELUDE) ++OPTIONAL_PRELUDES = @OPTIONAL_PRELUDES@ + + #### End of system configuration section. #### + +diff --git a/common.mk b/common.mk +index e5069e5..ca5e3f9 100644 +--- a/common.mk ++++ b/common.mk +@@ -107,7 +107,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) + + GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT) + +-PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(srcdir)/enc/prelude.rb $(DEFAULT_PRELUDES) ++PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(srcdir)/enc/prelude.rb $(DEFAULT_PRELUDES) $(OPTIONAL_PRELUDES) + GEM_PRELUDE = $(srcdir)/gem_prelude.rb + YES_GEM_PRELUDE = $(GEM_PRELUDE) + NO_GEM_PRELUDE = +diff --git a/configure.in b/configure.in +index 7977aaf..1ef42cd 100644 +--- a/configure.in ++++ b/configure.in +@@ -3494,6 +3494,13 @@ AC_SUBST(rubyarchhdrdir)dnl + AC_SUBST(sitearchhdrdir)dnl + AC_SUBST(vendorarchhdrdir)dnl + ++AC_ARG_WITH(prelude, ++ AS_HELP_STRING([--with-prelude=FILE-LIST], [specify additional preludes separated by space]), ++ [prelude=$withval]) ++if test "$prelude" != ""; then ++ AC_SUBST(OPTIONAL_PRELUDES, $prelude) ++fi ++ + AC_ARG_WITH(mantype, + AS_HELP_STRING([--with-mantype=TYPE], [specify man page type; TYPE is one of man and doc]), + [ diff --git a/ruby.spec b/ruby.spec index 76e0f77..1387a98 100644 --- a/ruby.spec +++ b/ruby.spec @@ -73,6 +73,7 @@ Source2: libruby.stp Source3: ruby-exercise.stp Source4: macros.ruby Source5: macros.rubygems +Source6: abrt_prelude.rb # Include the constants defined in macros files. @@ -144,6 +145,10 @@ Patch15: ruby-2.0.0-p195-Fix-build-against-OpenSSL-with-enabled-ECC-curves.patch # Please note that this is the BZ patch, it might be good idea to update it # with its upstream version when available. Patch16: ruby-2.0.0-p195-aarch64.patch +# Adds support for '--with-prelude' configuration option. This allows to built +# in support for ABRT. +# http://bugs.ruby-lang.org/issues/8566 +Patch17: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -408,10 +413,16 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch14 -p1 %patch15 -p1 %patch16 -p1 +%patch17 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . +# Make abrt_prelude.rb available for compilation process. The prelude must be +# available together with Ruby's source due to +# https://github.com/ruby/ruby/blob/trunk/tool/compile_prelude.rb#L26 +cp -a %{SOURCE6} . + %build autoconf @@ -432,6 +443,7 @@ autoconf --enable-shared \ --with-ruby-version='' \ --enable-multiarch \ + --with-prelude=./abrt_prelude.rb \ @@ -561,6 +573,11 @@ DISABLE_TESTS="-x test_process.rb $DISABLE_TESTS" # http://bugs.ruby-lang.org/issues/7912 DISABLE_TESTS="-x test_rbconfig.rb $DISABLE_TESTS" +# test_debug(TestRubyOptions) fails due to LoadError reported in debug mode, +# when abrt.rb cannot be required (seems to be easier way then customizing +# the test suite). +touch abrt.rb + make check TESTS="-v $DISABLE_TESTS" %post libs -p /sbin/ldconfig @@ -855,6 +872,7 @@ make check TESTS="-v $DISABLE_TESTS" - Update to Ruby 2.0.0-p247 (rhbz#979605). - Fix CVE-2013-4073. - Fix for wrong makefiles created by mkmf (rhbz#921650). +- Add support for ABRT autoloading. * Fri May 17 2013 Vít Ondruch - 2.0.0.195-8 - Update to Ruby 2.0.0-p195 (rhbz#917374).