[rubygem-linecache19/f17] first import
Mamoru Tasaka
mtasaka at fedoraproject.org
Mon Jun 11 09:17:10 UTC 2012
commit c3669f3f57440b0a6dd82d913023213bc4a54b42
Author: TASAKA Mamoru <mtasaka at localhost.localdomain>
Date: Mon Jun 11 18:17:06 2012 +0900
first import
.gitignore | 2 +
...ecache19-0.5.12-dont_use_ruby_core_source.patch | 20 +++
rubygem-linecache19-0.5.12-system-path.patch | 16 ++
rubygem-linecache19.spec | 162 ++++++++++++++++++++
sources | 2 +
5 files changed, 202 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..e62b74a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/linecache19-0.5.13.gem
+/ruby-1.9.3-p194.tar.gz
diff --git a/rubygem-linecache19-0.5.12-dont_use_ruby_core_source.patch b/rubygem-linecache19-0.5.12-dont_use_ruby_core_source.patch
new file mode 100644
index 0000000..17fa2b3
--- /dev/null
+++ b/rubygem-linecache19-0.5.12-dont_use_ruby_core_source.patch
@@ -0,0 +1,20 @@
+--- ./ext/trace_nums/extconf.rb.debug 1970-01-01 09:00:00.000000000 +0900
++++ ./ext/trace_nums/extconf.rb 2012-04-30 18:02:37.000000000 +0900
+@@ -1,5 +1,4 @@
+ require "mkmf"
+-require "ruby_core_source"
+
+ if RUBY_VERSION >= "1.8"
+ if RUBY_RELEASE_DATE < "2005-03-22"
+@@ -16,7 +15,10 @@
+ }
+
+ dir_config("ruby")
+-if !Ruby_core_source::create_makefile_with_core(hdrs, "trace_nums19")
++#if !Ruby_core_source::create_makefile_with_core(hdrs, "trace_nums19")
++if hdrs.call
++ create_makefile("trace_nums19")
++else
+ STDERR.print("Makefile creation failed\n")
+ STDERR.print("*************************************************************\n\n")
+ STDERR.print(" NOTE: For Ruby 1.9 installation instructions, please see:\n\n")
diff --git a/rubygem-linecache19-0.5.12-system-path.patch b/rubygem-linecache19-0.5.12-system-path.patch
new file mode 100644
index 0000000..6e7f183
--- /dev/null
+++ b/rubygem-linecache19-0.5.12-system-path.patch
@@ -0,0 +1,16 @@
+--- ./lib/tracelines19.rb.systempath 1970-01-01 09:00:00.000000000 +0900
++++ ./lib/tracelines19.rb 2012-04-30 21:41:21.000000000 +0900
+@@ -8,8 +8,13 @@
+ begin
+ require File.join(@@SRC_DIR, '..', 'ext\trace_nums', 'trace_nums19')
+ rescue LoadError
++ begin
+ # MSWindows seems to put this in lib rather than ext.
+ require File.join(@@SRC_DIR, '..', 'lib', 'trace_nums19')
++ rescue LoadError
++ # trace_nums19 may be installed under system directory
++ require "trace_nums19"
++ end
+ end
+
+ # Return an array of lines numbers that could be
diff --git a/rubygem-linecache19.spec b/rubygem-linecache19.spec
new file mode 100644
index 0000000..9b65645
--- /dev/null
+++ b/rubygem-linecache19.spec
@@ -0,0 +1,162 @@
+%global gem_name linecache19
+%global rubyabi 1.9.1
+
+%global repoid 75414
+
+%global ruby_majorver 1.9
+%global ruby_fullver 1.9.3-p194
+
+Summary: Read file with caching
+Name: rubygem-%{gem_name}
+Version: 0.5.13
+Release: 1%{?dist}
+
+Group: Development/Languages
+# README file
+License: GPLv2
+URL: http://rubyforge.org/projects/ruby-debug19
+# 0.5.12 on rubygems site doesn't work with ruby 1.9
+#Source0: http://rubygems.org/gems/%%{gem_name}-%%{version}.gem
+Source0: http://rubyforge.org/frs/download.php/%{repoid}/%{gem_name}-%{version}.gem
+# linecache uses headers in ruby tarball which are not installed
+# by default...
+Source1: ftp://ftp.ruby-lang.org/pub/ruby/%{ruby_majorver}/ruby-%{ruby_fullver}.tar.gz
+Patch0: rubygem-linecache19-0.5.12-dont_use_ruby_core_source.patch
+Patch1: rubygem-linecache19-0.5.12-system-path.patch
+
+Requires: ruby(abi) = %{rubyabi}
+Requires: ruby(rubygems)
+# Kill below
+#BuildRequires: rubygem(ruby_core_source) >= 0.1.4
+BuildRequires: ruby(abi) = %{rubyabi}
+BuildRequires: rubygems-devel
+BuildRequires: ruby-devel
+BuildRequires: rubygem(minitest)
+Provides: rubygem(%{gem_name}) = %{version}-%{release}
+# Obsolete this, not providing
+Obsoletes: rubygem-linecache < 0.44
+
+%description
+The LineCache module allows one to get any line from any file, caching
+the lines and file information on first access to the file. Although
+the file may be any file, the common use is when the file is a Ruby
+script since parsing of the file is done to figure out where the
+statement boundaries are.
+
+The routines here may be is useful when a small random sets of lines
+are read from a single file, in particular in a debugger to show
+source lines.
+
+
+%package doc
+Summary: Documentation for %{name}
+Group: Documentation
+Requires: %{name} = %{version}-%{release}
+
+%description doc
+Documentation for %{name}
+
+%prep
+%setup -q -c -T -a 1
+
+# Gem repack
+TOPDIR=$(pwd)
+mkdir tmpunpackdir
+pushd tmpunpackdir
+
+gem unpack %{SOURCE0}
+cd %{gem_name}-%{version}
+
+# permission
+find . -type f -print0 | xargs --null chmod 0644
+
+# shebang
+find ./lib -name \*.rb -print0 | \
+ xargs --null sed -i -e '\@^#!%{_bindir}@d'
+
+# Kill ruby_core_source dependency - this is
+# just to download ruby tarball
+gem specification -l --ruby %{SOURCE0} | \
+ sed -e '\@ruby_core_source at d' > %{gem_name}.gemspec
+
+# Patch
+%patch0 -p1
+%patch1 -p1
+
+gem build %{gem_name}.gemspec
+mv %{gem_name}-%{version}.gem $TOPDIR
+
+popd
+rm -rf tmpunpackdir
+
+# Kill unneeeded ruby files
+mkdir ruby_headers
+# So the actual files needed are header files under
+# ruby-%%ruby_fullver directory only
+cp -p ruby-%{ruby_fullver}/*.h ruby_headers/
+rm -rf ruby-%{ruby_fullver}/
+
+%build
+mkdir -p .%{gem_dir}
+
+export CONFIGURE_ARGS="--with-cflags=\"%{optflags} -I$(pwd)/ruby_headers\""
+gem install \
+ --local \
+ --install-dir .%{gem_dir} \
+ -V \
+ --force \
+ %{gem_name}-%{version}.gem
+
+%install
+mkdir -p %{buildroot}%{gem_dir}
+cp -a .%{gem_dir}/* \
+ %{buildroot}%{gem_dir}/
+
+mkdir -p %{buildroot}%{gem_extdir}/lib
+mv \
+ %{buildroot}%{gem_instdir}/lib/trace_nums19.so \
+ %{buildroot}%{gem_extdir}/lib/
+
+rm -rf %{buildroot}%{gem_instdir}/ext
+
+%check
+pushd .%{gem_instdir}
+testrb -Ilib testrb test/test-*.rb
+popd
+
+%files
+%dir %{gem_instdir}
+%doc %{gem_instdir}/[A-Z]*
+%exclude %{gem_instdir}/Rakefile
+%{gem_libdir}
+%dir %{gem_extdir}
+%dir %{gem_extdir}/lib
+%{gem_extdir}/lib/trace_nums19.so
+%exclude %{gem_cache}
+%{gem_spec}
+
+%files doc
+%{gem_docdir}/
+%exclude %{gem_instdir}/test/
+
+%changelog
+* Mon Jun 11 2012 Mamoru Tasaka <mtasaka at fedoraproject.org> - 0.5.13-2
+- Incorporate review requests' comments
+
+* Thu May 3 2012 Mamoru Tasaka <mtasaka at fedoraproject.org> - 0.5.13-1
+- Renamed to rubygem-linecache19
+
+* Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.43-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
+* Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.43-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Mon Dec 14 2009 Jeroen van Meeuwen <j.van.meeuwen at ogd.nl> - 0.43-3
+- Fix %%define vs. %%global
+
+* Sat Nov 14 2009 Jeroen van Meeuwen <j.van.meeuwen at ogd.nl> - 0.43-2
+- Review
+
+* Wed Oct 14 2009 Jeroen van Meeuwen <j.van.meeuwen at ogd.nl> - 0.43-1
+- First package
diff --git a/sources b/sources
index e69de29..801d656 100644
--- a/sources
+++ b/sources
@@ -0,0 +1,2 @@
+744fb0d2e0d7162d098ed7dacaf4a9ab linecache19-0.5.13.gem
+bc0c715c69da4d1d8bd57069c19f6c0e ruby-1.9.3-p194.tar.gz
More information about the scm-commits
mailing list