- Enable test

- Recompile with -O2
This commit is contained in:
Mamoru Tasaka 2009-07-02 05:36:36 +00:00
parent 6be617dc6b
commit 99681b51da
2 changed files with 41 additions and 13 deletions

View File

@ -0,0 +1,25 @@
commit 7a43e2e9d0fc3ba3b03bad6117b2ff6c8b9ab3a2
Author: Mike Dalessio <mike@csa.net>
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|

View File

@ -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 <mtasaka@ioa.s.u-tokyo.ac.jp> - 1.3.2-2
- Enable test
- Recompile with -O2
* Thu Jun 25 2009 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1.3.2-1
- 1.3.2