- Enable test
- Recompile with -O2
This commit is contained in:
parent
6be617dc6b
commit
99681b51da
25
rubygem-nokogiri-1.3.2-rake-valgrind-error.patch
Normal file
25
rubygem-nokogiri-1.3.2-rake-valgrind-error.patch
Normal 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|
|
@ -9,19 +9,21 @@
|
|||||||
Summary: An HTML, XML, SAX, and Reader parser
|
Summary: An HTML, XML, SAX, and Reader parser
|
||||||
Name: rubygem-%{gemname}
|
Name: rubygem-%{gemname}
|
||||||
Version: 1.3.2
|
Version: 1.3.2
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: http://nokogiri.rubyforge.org/nokogiri/
|
URL: http://nokogiri.rubyforge.org/nokogiri/
|
||||||
Source0: http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem
|
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)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildRequires: ruby(abi) = %{rubyabi}
|
BuildRequires: ruby(abi) = %{rubyabi}
|
||||||
BuildRequires: ruby(rubygems)
|
BuildRequires: ruby(rubygems)
|
||||||
BuildRequires: rubygem(hoe)
|
BuildRequires: rubygem(hoe)
|
||||||
BuildRequires: rubygem(rake)
|
|
||||||
# Not available yet
|
# Not available yet
|
||||||
# BuildRequires(check): rubygem(rake-compiler)
|
# BuildRequires: rubygem(hoe-debugging)
|
||||||
|
BuildRequires: rubygem(rake)
|
||||||
|
BuildRequires: rubygem(rake-compiler)
|
||||||
BuildRequires: libxml2-devel
|
BuildRequires: libxml2-devel
|
||||||
BuildRequires: libxslt-devel
|
BuildRequires: libxslt-devel
|
||||||
BuildRequires: ruby-devel
|
BuildRequires: ruby-devel
|
||||||
@ -58,7 +60,6 @@ This package provides non-Gem support for %{gemname}.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -T -c
|
%setup -q -T -c
|
||||||
|
|
||||||
%build
|
|
||||||
mkdir -p ./%{gemdir}
|
mkdir -p ./%{gemdir}
|
||||||
export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
|
export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
|
||||||
gem install \
|
gem install \
|
||||||
@ -67,14 +68,15 @@ gem install \
|
|||||||
-V --force \
|
-V --force \
|
||||||
%{SOURCE0}
|
%{SOURCE0}
|
||||||
|
|
||||||
|
pushd ./%{geminstdir}
|
||||||
|
%patch0 -p1 -b .valgrind
|
||||||
|
|
||||||
|
%build
|
||||||
# cflags wrong (-O3 passed), recompiling
|
# cflags wrong (-O3 passed), recompiling
|
||||||
# Skip until rubygem(rake-compiler) is available
|
|
||||||
%if 0
|
|
||||||
pushd ./%{geminstdir}
|
pushd ./%{geminstdir}
|
||||||
sed -i.flags -e 's|-O3||' ext/nokogiri/extconf.rb
|
sed -i.flags -e 's|-O3||' ext/nokogiri/extconf.rb
|
||||||
find . -name \*.so -or -name \*.o -exec rm -f {} \;
|
find . -name \*.so -or -name \*.o -exec rm -f {} \;
|
||||||
rake -v ext/nokogiri/native.so --trace
|
rake -v compile --trace
|
||||||
%endif
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
@ -98,7 +100,7 @@ do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# cleanups
|
# cleanups
|
||||||
rm -rf %{buildroot}%{geminstdir}/ext
|
rm -rf %{buildroot}%{geminstdir}/{ext,tmp}/
|
||||||
rm -f %{buildroot}%{geminstdir}/{.autotest,.require_paths}
|
rm -f %{buildroot}%{geminstdir}/{.autotest,.require_paths}
|
||||||
|
|
||||||
# The following method is completely copied from rubygem-gettext
|
# The following method is completely copied from rubygem-gettext
|
||||||
@ -167,11 +169,8 @@ create_symlink_rec %{geminstdir}/lib %{ruby_sitelib}
|
|||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# Skip until rubygem(rake-compiler) is available
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
pushd ./%{geminstdir}
|
pushd ./%{geminstdir}
|
||||||
rake test
|
rake test --trace
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%files
|
%files
|
||||||
@ -199,6 +198,10 @@ popd
|
|||||||
%{ruby_sitelib}/xsd/
|
%{ruby_sitelib}/xsd/
|
||||||
|
|
||||||
%changelog
|
%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
|
* Thu Jun 25 2009 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1.3.2-1
|
||||||
- 1.3.2
|
- 1.3.2
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user