From 99681b51da72a0204a0fee6116049e9f4a632e7d Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Thu, 2 Jul 2009 05:36:36 +0000 Subject: [PATCH] - Enable test - Recompile with -O2 --- ...m-nokogiri-1.3.2-rake-valgrind-error.patch | 25 ++++++++++++++++ rubygem-nokogiri.spec | 29 ++++++++++--------- 2 files changed, 41 insertions(+), 13 deletions(-) create mode 100644 rubygem-nokogiri-1.3.2-rake-valgrind-error.patch diff --git a/rubygem-nokogiri-1.3.2-rake-valgrind-error.patch b/rubygem-nokogiri-1.3.2-rake-valgrind-error.patch new file mode 100644 index 0000000..b1ebcc3 --- /dev/null +++ b/rubygem-nokogiri-1.3.2-rake-valgrind-error.patch @@ -0,0 +1,25 @@ +commit 7a43e2e9d0fc3ba3b03bad6117b2ff6c8b9ab3a2 +Author: Mike Dalessio +Date: Fri Jun 26 08:14:44 2009 -0400 + + ensuring rake will run even if hoe-debugging isn't installed + +diff --git a/Rakefile b/Rakefile +index a13dfaf..9434336 100644 +--- a/Rakefile ++++ b/Rakefile +@@ -180,9 +180,11 @@ unless windows || java || ENV['NOKOGIRI_FFI'] + Rake::Task[task_name].prerequisites << GENERATED_TOKENIZER + end + +- Rake::Task[:test].prerequisites << :compile +- ['valgrind', 'valgrind:mem', 'valgrind:mem0'].each do |task_name| +- Rake::Task["test:#{task_name}"].prerequisites << :compile ++ if Rake::Task.task_defined?(:valgrind) ++ Rake::Task[:test].prerequisites << :compile ++ ['valgrind', 'valgrind:mem', 'valgrind:mem0'].each do |task_name| ++ Rake::Task["test:#{task_name}"].prerequisites << :compile ++ end + end + else + [:test, :check_manifest].each do |task_name| diff --git a/rubygem-nokogiri.spec b/rubygem-nokogiri.spec index 811c152..e19a1fd 100644 --- a/rubygem-nokogiri.spec +++ b/rubygem-nokogiri.spec @@ -9,19 +9,21 @@ Summary: An HTML, XML, SAX, and Reader parser Name: rubygem-%{gemname} Version: 1.3.2 -Release: 1%{?dist} +Release: 2%{?dist} Group: Development/Languages License: MIT URL: http://nokogiri.rubyforge.org/nokogiri/ Source0: http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem +Patch0: rubygem-nokogiri-1.3.2-rake-valgrind-error.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ruby(abi) = %{rubyabi} BuildRequires: ruby(rubygems) BuildRequires: rubygem(hoe) -BuildRequires: rubygem(rake) # Not available yet -# BuildRequires(check): rubygem(rake-compiler) +# BuildRequires: rubygem(hoe-debugging) +BuildRequires: rubygem(rake) +BuildRequires: rubygem(rake-compiler) BuildRequires: libxml2-devel BuildRequires: libxslt-devel BuildRequires: ruby-devel @@ -58,7 +60,6 @@ This package provides non-Gem support for %{gemname}. %prep %setup -q -T -c -%build mkdir -p ./%{gemdir} export CONFIGURE_ARGS="--with-cflags='%{optflags}'" gem install \ @@ -67,14 +68,15 @@ gem install \ -V --force \ %{SOURCE0} +pushd ./%{geminstdir} +%patch0 -p1 -b .valgrind + +%build # cflags wrong (-O3 passed), recompiling -# Skip until rubygem(rake-compiler) is available -%if 0 pushd ./%{geminstdir} sed -i.flags -e 's|-O3||' ext/nokogiri/extconf.rb find . -name \*.so -or -name \*.o -exec rm -f {} \; -rake -v ext/nokogiri/native.so --trace -%endif +rake -v compile --trace %install rm -rf %{buildroot} @@ -98,7 +100,7 @@ do done # cleanups -rm -rf %{buildroot}%{geminstdir}/ext +rm -rf %{buildroot}%{geminstdir}/{ext,tmp}/ rm -f %{buildroot}%{geminstdir}/{.autotest,.require_paths} # The following method is completely copied from rubygem-gettext @@ -167,11 +169,8 @@ create_symlink_rec %{geminstdir}/lib %{ruby_sitelib} rm -rf %{buildroot} %check -# Skip until rubygem(rake-compiler) is available -exit 0 - pushd ./%{geminstdir} -rake test +rake test --trace popd %files @@ -199,6 +198,10 @@ popd %{ruby_sitelib}/xsd/ %changelog +* Thu Jul 2 2009 Mamoru Tasaka - 1.3.2-2 +- Enable test +- Recompile with -O2 + * Thu Jun 25 2009 Mamoru Tasaka - 1.3.2-1 - 1.3.2