diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 7828581..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -json-1.1.7.gem diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..7250b48 --- /dev/null +++ b/dead.package @@ -0,0 +1,3 @@ +2016-11-20: Retired because it depends on rubygem-flexmock, which was +retired, because it was orphaned for more than six weeks. + diff --git a/json-1.4.3-for-ruby185.patch b/json-1.4.3-for-ruby185.patch deleted file mode 100644 index 20385f2..0000000 --- a/json-1.4.3-for-ruby185.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- json-1.4.3/ext/json/ext/parser/parser.h.debug 2010-09-16 02:59:45.000000000 +0900 -+++ json-1.4.3/ext/json/ext/parser/parser.h 2010-09-16 04:49:41.000000000 +0900 -@@ -16,6 +16,15 @@ - - #define option_given_p(opts, key) RTEST(rb_funcall(opts, i_key_p, 1, key)) - -+/* see ext/generator/generator.h */ -+/* Needed for ruby 1.8.5 */ -+#ifndef RSTRING_PTR -+#define RSTRING_PTR(string) RSTRING(string)->ptr -+#endif -+#ifndef RSTRING_LEN -+#define RSTRING_LEN(string) RSTRING(string)->len -+#endif -+ - /* unicode */ - - typedef unsigned long UTF32; /* at least 32 bits */ ---- json-1.4.3/lib/json/add/core.rb.debug 2010-09-16 02:59:45.000000000 +0900 -+++ json-1.4.3/lib/json/add/core.rb 2010-09-16 04:54:14.000000000 +0900 -@@ -66,6 +66,19 @@ - if of_b and of_b != '0' - args << Rational(of_a.to_i, of_b.to_i) - else -+ # -+ # Only hack for ruby 1.8.5 -+ # Without the fix below, "rake test_ext (or rake test_pure) fails -+ # for test_utc_datetime(TC_JSONAddition) at tests/test_json_addition.rb:156 -+ if RUBY_VERSION == "1.8.5" -+ if of_a.is_a?(String) -+ of_a = of_a.to_i -+ end -+ end -+ # The above fix is not needed for ruby 1.8.6 and above due to the change -+ # on civil() in date.rb -+ # Fix for ruby 1.8.5 end -+ # - args << of_a - end - args << object['sg'] diff --git a/json-1.4.3-skip-failed-test.patch b/json-1.4.3-skip-failed-test.patch deleted file mode 100644 index d82bfa0..0000000 --- a/json-1.4.3-skip-failed-test.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- json-1.4.3/tests/test_json_rails.rb.fail 2010-09-16 15:14:55.000000000 +0900 -+++ json-1.4.3/tests/test_json_rails.rb 2010-09-16 16:34:39.000000000 +0900 -@@ -139,6 +139,9 @@ - end - - def test_symbol -+ # This test failed for unknown reason, kill this for now -+ return true -+ - assert_equal '"foo"', :foo.to_json # we don't want an object here - end - end diff --git a/rubygem-json.spec b/rubygem-json.spec deleted file mode 100644 index 25c6987..0000000 --- a/rubygem-json.spec +++ /dev/null @@ -1,234 +0,0 @@ -%{!?ruby_sitelib: %global ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")} -%{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")} - -%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) -%global gemname json -%global geminstdir %{gemdir}/gems/%{gemname}-%{version} -%global installroot %{buildroot}%{geminstdir} - - -Name: rubygem-%{gemname} -Version: 1.4.3 -Release: 3%{?dist}.1 -Summary: A JSON implementation in Ruby - -Group: Development/Languages - -License: Ruby or GPLv2 -URL: http://json.rubyforge.org -Source0: http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem -Patch0: json-1.4.3-for-ruby185.patch -Patch1: json-1.4.3-skip-failed-test.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildRequires: ruby, ruby-devel -BuildRequires: rubygem(rake) -Requires: ruby(abi) = 1.8 -Requires: rubygems -Provides: rubygem(json) = %{version} - -%description -This is a implementation of the JSON specification according -to RFC 4627 in Ruby. -You can think of it as a low fat alternative to XML, -if you want to store data to disk or transmit it over -a network rather than use a verbose markup language. - -%package doc -Summary: Documentation for %{name} -Group: Documentation - -Requires: %{name} = %{version}-%{release} -Requires: ruby(rubygems) - -%description doc -This package contains documentation for %{name}. - -%package -n ruby-%{gemname} -Summary: Non-Gem support package for %{gemname} -Group: Development/Languages - -Requires: %{name} = %{version}-%{release} -Provides: ruby(%{gemname}) = %{version}-%{release} - -%description -n ruby-%{gemname} -This package provides non-Gem support for %{gemname}. - - - -%prep -%setup -q -c -T - -mkdir -p ./%{gemdir} - -%build -export CONFIGURE_ARGS="--with-cflags='%{optflags}'" -#pushd ./%{gemdir} -gem install --local --install-dir .%{gemdir} -V --force %{SOURCE0} - -# change cflags to honor Fedora compiler flags correctly -find . -name extconf.rb | xargs sed -i -e 's|-O3|-O2|' -pushd .%{geminstdir} -cat %PATCH0 | patch -s -p1 --fuzz=0 -cat %PATCH1 | patch -s -p1 --fuzz=0 -# compile again -rake clean -rake - -%install -rm -rf $RPM_BUILD_ROOT - -mkdir -p $RPM_BUILD_ROOT%{gemdir} -mkdir -p $RPM_BUILD_ROOT%{_bindir} -mkdir -p $RPM_BUILD_ROOT%{ruby_sitearch}/%{gemname}/ext - -cp -a .%{gemdir}/* %{buildroot}/%{gemdir} - -# Let's move arch dependent files to %%ruby_sitearch -find . -name "*.so" -exec mv {} \ - $RPM_BUILD_ROOT%{ruby_sitearch}/%{gemname}/ext \; - -mv $RPM_BUILD_ROOT%{gemdir}/bin/* $RPM_BUILD_ROOT%{_bindir} - -chmod 0755 $RPM_BUILD_ROOT%{geminstdir}/install.rb -chmod 0755 $RPM_BUILD_ROOT%{geminstdir}/bin/*.rb -chmod 0755 $RPM_BUILD_ROOT%{geminstdir}/tests/*.rb -chmod 0755 $RPM_BUILD_ROOT%{geminstdir}/tools/server.rb -chmod 0644 $RPM_BUILD_ROOT%{geminstdir}/tools/fuzz.rb -chmod 0755 $RPM_BUILD_ROOT%{geminstdir}/benchmarks/*.rb - -# We don't need those files anymore. -rm -rf $RPM_BUILD_ROOT%{geminstdir}/ext -rm -rf $RPM_BUILD_ROOT%{geminstdir}/install.rb -rm -rf $RPM_BUILD_ROOT%{geminstdir}/.require_paths -rm -rf $RPM_BUILD_ROOT%{gemdir}/doc/%{gemname}-%{version}/rdoc/classes/.src -rm -rf $RPM_BUILD_ROOT%{gemdir}/doc/%{gemname}-%{version}/rdoc/classes/.html - -# Also remove gtk2 editor as ruby-gnome2 is not in rhel5 -find $RPM_BUILD_ROOT -name "editor.rb" -exec rm [] \; -find $RPM_BUILD_ROOT -name "edit_json.rb" -exec rm {} \; - -create_symlink_rec(){ - -ORIGBASEDIR=$1 -TARGETBASEDIR=$2 - -## First calculate relative path of ORIGBASEDIR -## from TARGETBASEDIR -TMPDIR=$TARGETBASEDIR -BACKDIR= -DOWNDIR= -num=0 -nnum=0 -while true -do - num=$((num+1)) - TMPDIR=$(echo $TMPDIR | %{__sed} -e 's|/[^/][^/]*$||') - DOWNDIR=$(echo $ORIGBASEDIR | %{__sed} -e "s|^$TMPDIR||") - if [ x$DOWNDIR != x$ORIGBASEDIR ] - then - nnum=0 - while [ $nnum -lt $num ] - do - BACKDIR="../$BACKDIR" - nnum=$((nnum+1)) - done - break - fi -done - -RELBASEDIR=$( echo $BACKDIR/$DOWNDIR | %{__sed} -e 's|//*|/|g' ) - -## Next actually create symlink -pushd %{buildroot}/$ORIGBASEDIR -find . -type f | while read f -do - DIRNAME=$(dirname $f) - BACK2DIR=$(echo $DIRNAME | %{__sed} -e 's|/[^/][^/]*|/..|g') - %{__mkdir_p} %{buildroot}${TARGETBASEDIR}/$DIRNAME - LNNAME=$(echo $BACK2DIR/$RELBASEDIR/$f | \ - %{__sed} -e 's|^\./||' | %{__sed} -e 's|//|/|g' | \ - %{__sed} -e 's|/\./|/|' ) - %{__ln_s} -f $LNNAME %{buildroot}${TARGETBASEDIR}/$f -done -popd - -} - -create_symlink_rec %{geminstdir}/lib %{ruby_sitelib} - -%clean -rm -rf $RPM_BUILD_ROOT - -%check -pushd .%{geminstdir} -rake test_ext --trace -popd - - - -%files -%defattr(-,root,root,-) -%doc %{geminstdir}/[A-Z]* -%dir %{geminstdir} -%{_bindir}/*.rb -%{geminstdir}/bin -%{geminstdir}/lib -%{geminstdir}/tools -%{ruby_sitearch}/%{gemname} -%{gemdir}/cache/%{gemname}-%{version}.gem -%{gemdir}/specifications/%{gemname}-%{version}.gemspec - -%files doc -%defattr(-,root,root,-) -%{geminstdir}/Rakefile -%{geminstdir}/data -%{geminstdir}/tests -%{geminstdir}/benchmarks -%{gemdir}/doc/%{gemname}-%{version} - -%files -n ruby-%{gemname} -%defattr(-,root,root,-) -%{ruby_sitelib}/%{gemname} -%{ruby_sitelib}/%{gemname}.rb - - -%changelog -* Thu Sep 16 2010 Mamoru Tasaka - 1.4.3-3.1 -- Patch for EL-5 ruby 1.8.5 specific issue (bug 634380) - - fix missing symbol issue for ruby 1.8.5 - - fix test_utc_datetime failure -- Enable %%check - -* Fri Jun 11 2010 Xavier Lamien - 1.4.3-3 -- Fix gtk2-editor removal. - -* Mon May 10 2010 Xavier Lamien - 1.4.3-2 -- Remove require ruby-gtk2 as well. - -* Sun May 09 2010 Xavier Lamien - 1.4.3-1 -- Update release. -- Remove json editor. - -* Wed Aug 12 2009 Xavier Lamien - 1.1.7-3 -- Fix gem scripts and install_dir. -- Enable %%check stage. - -* Wed Aug 05 2009 Xavier Lamien - 1.1.7-2 -- Rebuild in correct buildir process. -- Add sub packages. - -* Mon Aug 03 2009 Xavier Lamien - 1.1.7-1 -- Update release. - -* Sat Jun 06 2009 Xavier Lamien - 1.1.6-1 -- Update release. - -* Tue May 12 2009 Xavier Lamien - 1.1.5-1 -- Update release. - -* Thu Apr 02 2009 Xavier Lamien - 1.1.4-1 -- Update release. - -* Sat Jul 12 2008 Xavier Lamien - 1.1.3-1 -- Initial RPM release. diff --git a/sources b/sources deleted file mode 100644 index 7c4fe42..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -0bcd3fbcb41c84077b8bfac952c7e6ca json-1.4.3.gem