This updates ruby-json to the latest version, with quite a few improvements, including segfault fixes. For details, see https://github.com/flori/json/blob/master/CHANGES
Only significant ports-related changes are the removing of -O3 when compiling the extensions, and a minor regress fix to make sure the correct implementation gets tested. Regress tests pass on amd64 and i386. Planning on committing next week unless I hear objections, assuming more extensive tests don't show problems. Thanks, Jeremy Index: Makefile =================================================================== RCS file: /cvs/ports/converters/ruby-json/Makefile,v retrieving revision 1.18 diff -u -p -r1.18 Makefile --- Makefile 23 Sep 2012 16:57:32 -0000 1.18 +++ Makefile 12 Oct 2012 22:41:55 -0000 @@ -2,9 +2,8 @@ COMMENT= JSON implementation for Ruby -DISTNAME= json-1.5.3 +DISTNAME= json-1.7.5 CATEGORIES= converters -REVISION = 2 HOMEPAGE= http://json.rubyforge.org/ Index: distinfo =================================================================== RCS file: /cvs/ports/converters/ruby-json/distinfo,v retrieving revision 1.7 diff -u -p -r1.7 distinfo --- distinfo 27 Jul 2011 03:41:26 -0000 1.7 +++ distinfo 12 Oct 2012 22:42:10 -0000 @@ -1,5 +1,2 @@ -MD5 (json-1.5.3.gem) = iNzqTRMXrQ575uvzqbB9WQ== -RMD160 (json-1.5.3.gem) = yWh+RVS7EUbbPxoEExxjjTKh80w= -SHA1 (json-1.5.3.gem) = MonBrKzRSMeH82HCwB70VKTHBVM= -SHA256 (json-1.5.3.gem) = 3QqUSaIdhcIHAa3BR1i4bRl2CiojUaP2Ap9WCN2ZB3o= -SIZE (json-1.5.3.gem) = 675328 +SHA256 (json-1.7.5.gem) = 4GRZau1VmD7Om0hko0es4bLw01QSksW/S+lVmU+Njnw= +SIZE (json-1.7.5.gem) = 145920 Index: patches/patch-ext_json_ext_generator_extconf_rb =================================================================== RCS file: patches/patch-ext_json_ext_generator_extconf_rb diff -N patches/patch-ext_json_ext_generator_extconf_rb --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-ext_json_ext_generator_extconf_rb 13 Oct 2012 12:33:54 -0000 @@ -0,0 +1,12 @@ +$OpenBSD$ +--- ext/json/ext/generator/extconf.rb.orig Thu Jan 1 01:00:00 1970 ++++ ext/json/ext/generator/extconf.rb Sat Oct 13 14:33:47 2012 +@@ -1,8 +1,5 @@ + require 'mkmf' + +-unless $CFLAGS.gsub!(/ -O[\dsz]?/, ' -O3') +- $CFLAGS << ' -O3' +-end + if CONFIG['CC'] =~ /gcc/ + $CFLAGS << ' -Wall' + unless $DEBUG && !$CFLAGS.gsub!(/ -O[\dsz]?/, ' -O0 -ggdb') Index: patches/patch-ext_json_ext_parser_extconf_rb =================================================================== RCS file: patches/patch-ext_json_ext_parser_extconf_rb diff -N patches/patch-ext_json_ext_parser_extconf_rb --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-ext_json_ext_parser_extconf_rb 13 Oct 2012 12:33:54 -0000 @@ -0,0 +1,17 @@ +$OpenBSD$ +--- ext/json/ext/parser/extconf.rb.orig Thu Jan 1 01:00:00 1970 ++++ ext/json/ext/parser/extconf.rb Sat Oct 13 14:33:36 2012 +@@ -1,13 +1,9 @@ + require 'mkmf' + +-unless $CFLAGS.gsub!(/ -O[\dsz]?/, ' -O3') +- $CFLAGS << ' -O3' +-end + if CONFIG['CC'] =~ /gcc/ + $CFLAGS << ' -Wall' + if $DEBUG && !$CFLAGS.gsub!(/ -O[\dsz]?/, ' -O0 -ggdb') + $CFLAGS << ' -O0 -ggdb' + end + end +- + create_makefile 'json/ext/parser' Index: patches/patch-tests_setup_variant_rb =================================================================== RCS file: patches/patch-tests_setup_variant_rb diff -N patches/patch-tests_setup_variant_rb --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-tests_setup_variant_rb 13 Oct 2012 12:52:05 -0000 @@ -0,0 +1,8 @@ +$OpenBSD$ +--- tests/setup_variant.rb.orig Sat Oct 13 14:51:57 2012 ++++ tests/setup_variant.rb Sat Oct 13 14:51:59 2012 +@@ -1,3 +1,4 @@ ++gem 'json' + case ENV['JSON'] + when 'pure' + $:.unshift 'lib' Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/converters/ruby-json/pkg/PLIST,v retrieving revision 1.8 diff -u -p -r1.8 PLIST --- pkg/PLIST 9 Nov 2011 00:17:37 -0000 1.8 +++ pkg/PLIST 13 Oct 2012 10:12:36 -0000 @@ -1,8 +1,8 @@ @comment $OpenBSD: PLIST,v 1.8 2011/11/09 00:17:37 jeremy Exp $ -${GEM_BIN}/edit_json.rb${GEM_BIN_SUFFIX} -${GEM_BIN}/prettify_json.rb${GEM_BIN_SUFFIX} ${GEM_LIB}/cache/${DISTNAME}.gem ${GEM_LIB}/gems/${DISTNAME}/ +${GEM_LIB}/gems/${DISTNAME}/.gitignore +${GEM_LIB}/gems/${DISTNAME}/.travis.yml ${GEM_LIB}/gems/${DISTNAME}/CHANGES ${GEM_LIB}/gems/${DISTNAME}/COPYING ${GEM_LIB}/gems/${DISTNAME}/COPYING-json-jruby @@ -13,71 +13,29 @@ ${GEM_LIB}/gems/${DISTNAME}/README.rdoc ${GEM_LIB}/gems/${DISTNAME}/Rakefile ${GEM_LIB}/gems/${DISTNAME}/TODO ${GEM_LIB}/gems/${DISTNAME}/VERSION -${GEM_LIB}/gems/${DISTNAME}/benchmarks/ -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/ -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkComparison.log -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast-autocorrelation.dat -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast.dat -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty-autocorrelation.dat -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty.dat -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe-autocorrelation.dat -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe.dat -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt.log -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast-autocorrelation.dat -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast.dat -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty-autocorrelation.dat -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty.dat -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe-autocorrelation.dat -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe.dat -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure.log -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator-autocorrelation.dat -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator.dat -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails.log -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkComparison.log -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser-autocorrelation.dat -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser.dat -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt.log -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser-autocorrelation.dat -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser.dat -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure.log -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser-autocorrelation.dat -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser.dat -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails.log -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser-autocorrelation.dat -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser.dat -${GEM_LIB}/gems/${DISTNAME}/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML.log -${GEM_LIB}/gems/${DISTNAME}/benchmarks/generator2_benchmark.rb -${GEM_LIB}/gems/${DISTNAME}/benchmarks/generator_benchmark.rb -${GEM_LIB}/gems/${DISTNAME}/benchmarks/ohai.json -${GEM_LIB}/gems/${DISTNAME}/benchmarks/ohai.ruby -${GEM_LIB}/gems/${DISTNAME}/benchmarks/parser2_benchmark.rb -${GEM_LIB}/gems/${DISTNAME}/benchmarks/parser_benchmark.rb -${GEM_LIB}/gems/${DISTNAME}/bin/ -${GEM_LIB}/gems/${DISTNAME}/bin/edit_json.rb -${GEM_LIB}/gems/${DISTNAME}/bin/prettify_json.rb ${GEM_LIB}/gems/${DISTNAME}/data/ ${GEM_LIB}/gems/${DISTNAME}/data/example.json ${GEM_LIB}/gems/${DISTNAME}/data/index.html ${GEM_LIB}/gems/${DISTNAME}/data/prototype.js +${GEM_LIB}/gems/${DISTNAME}/diagrams/ +${GEM_LIB}/gems/${DISTNAME}/diagrams/.keep ${GEM_LIB}/gems/${DISTNAME}/ext/ ${GEM_LIB}/gems/${DISTNAME}/ext/json/ ${GEM_LIB}/gems/${DISTNAME}/ext/json/ext/ +${GEM_LIB}/gems/${DISTNAME}/ext/json/ext/fbuffer/ +${GEM_LIB}/gems/${DISTNAME}/ext/json/ext/fbuffer/fbuffer.h ${GEM_LIB}/gems/${DISTNAME}/ext/json/ext/generator/ ${GEM_LIB}/gems/${DISTNAME}/ext/json/ext/generator/Makefile +${GEM_LIB}/gems/${DISTNAME}/ext/json/ext/generator/depend ${GEM_LIB}/gems/${DISTNAME}/ext/json/ext/generator/extconf.rb ${GEM_LIB}/gems/${DISTNAME}/ext/json/ext/generator/generator.c ${GEM_LIB}/gems/${DISTNAME}/ext/json/ext/generator/generator.h ${GEM_LIB}/gems/${DISTNAME}/ext/json/ext/generator/generator.o ${GEM_LIB}/gems/${DISTNAME}/ext/json/ext/generator/generator.so -${GEM_LIB}/gems/${DISTNAME}/ext/json/ext/generator/mkmf.log -${GEM_LIB}/gems/${DISTNAME}/ext/json/ext/json/ -${GEM_LIB}/gems/${DISTNAME}/ext/json/ext/json/ext/ -${GEM_LIB}/gems/${DISTNAME}/ext/json/ext/json/ext/generator.so -${GEM_LIB}/gems/${DISTNAME}/ext/json/ext/json/ext/parser.so ${GEM_LIB}/gems/${DISTNAME}/ext/json/ext/parser/ ${GEM_LIB}/gems/${DISTNAME}/ext/json/ext/parser/Makefile +${GEM_LIB}/gems/${DISTNAME}/ext/json/ext/parser/depend ${GEM_LIB}/gems/${DISTNAME}/ext/json/ext/parser/extconf.rb -${GEM_LIB}/gems/${DISTNAME}/ext/json/ext/parser/mkmf.log ${GEM_LIB}/gems/${DISTNAME}/ext/json/ext/parser/parser.c ${GEM_LIB}/gems/${DISTNAME}/ext/json/ext/parser/parser.h ${GEM_LIB}/gems/${DISTNAME}/ext/json/ext/parser/parser.o @@ -85,9 +43,6 @@ ${GEM_LIB}/gems/${DISTNAME}/ext/json/ext ${GEM_LIB}/gems/${DISTNAME}/ext/json/ext/parser/parser.so ${GEM_LIB}/gems/${DISTNAME}/install.rb ${GEM_LIB}/gems/${DISTNAME}/java/ -${GEM_LIB}/gems/${DISTNAME}/java/lib/ -${GEM_LIB}/gems/${DISTNAME}/java/lib/bytelist-1.0.6.jar -${GEM_LIB}/gems/${DISTNAME}/java/lib/jcodings.jar ${GEM_LIB}/gems/${DISTNAME}/java/src/ ${GEM_LIB}/gems/${DISTNAME}/java/src/json/ ${GEM_LIB}/gems/${DISTNAME}/java/src/json/ext/ @@ -110,21 +65,27 @@ ${GEM_LIB}/gems/${DISTNAME}/json_pure.ge ${GEM_LIB}/gems/${DISTNAME}/lib/ ${GEM_LIB}/gems/${DISTNAME}/lib/json/ ${GEM_LIB}/gems/${DISTNAME}/lib/json.rb -${GEM_LIB}/gems/${DISTNAME}/lib/json/Array.xpm -${GEM_LIB}/gems/${DISTNAME}/lib/json/FalseClass.xpm -${GEM_LIB}/gems/${DISTNAME}/lib/json/Hash.xpm -${GEM_LIB}/gems/${DISTNAME}/lib/json/Key.xpm -${GEM_LIB}/gems/${DISTNAME}/lib/json/NilClass.xpm -${GEM_LIB}/gems/${DISTNAME}/lib/json/Numeric.xpm -${GEM_LIB}/gems/${DISTNAME}/lib/json/String.xpm -${GEM_LIB}/gems/${DISTNAME}/lib/json/TrueClass.xpm ${GEM_LIB}/gems/${DISTNAME}/lib/json/add/ +${GEM_LIB}/gems/${DISTNAME}/lib/json/add/bigdecimal.rb +${GEM_LIB}/gems/${DISTNAME}/lib/json/add/complex.rb ${GEM_LIB}/gems/${DISTNAME}/lib/json/add/core.rb -${GEM_LIB}/gems/${DISTNAME}/lib/json/add/rails.rb +${GEM_LIB}/gems/${DISTNAME}/lib/json/add/date.rb +${GEM_LIB}/gems/${DISTNAME}/lib/json/add/date_time.rb +${GEM_LIB}/gems/${DISTNAME}/lib/json/add/exception.rb +${GEM_LIB}/gems/${DISTNAME}/lib/json/add/ostruct.rb +${GEM_LIB}/gems/${DISTNAME}/lib/json/add/range.rb +${GEM_LIB}/gems/${DISTNAME}/lib/json/add/rational.rb +${GEM_LIB}/gems/${DISTNAME}/lib/json/add/regexp.rb +${GEM_LIB}/gems/${DISTNAME}/lib/json/add/struct.rb +${GEM_LIB}/gems/${DISTNAME}/lib/json/add/symbol.rb +${GEM_LIB}/gems/${DISTNAME}/lib/json/add/time.rb ${GEM_LIB}/gems/${DISTNAME}/lib/json/common.rb -${GEM_LIB}/gems/${DISTNAME}/lib/json/editor.rb +${GEM_LIB}/gems/${DISTNAME}/lib/json/ext/ ${GEM_LIB}/gems/${DISTNAME}/lib/json/ext.rb -${GEM_LIB}/gems/${DISTNAME}/lib/json/json.xpm +${GEM_LIB}/gems/${DISTNAME}/lib/json/ext/.keep +${GEM_LIB}/gems/${DISTNAME}/lib/json/ext/generator.so +${GEM_LIB}/gems/${DISTNAME}/lib/json/ext/parser.so +${GEM_LIB}/gems/${DISTNAME}/lib/json/generic_object.rb ${GEM_LIB}/gems/${DISTNAME}/lib/json/pure/ ${GEM_LIB}/gems/${DISTNAME}/lib/json/pure.rb ${GEM_LIB}/gems/${DISTNAME}/lib/json/pure/generator.rb @@ -169,6 +130,7 @@ ${GEM_LIB}/gems/${DISTNAME}/tests/test_j ${GEM_LIB}/gems/${DISTNAME}/tests/test_json_encoding.rb ${GEM_LIB}/gems/${DISTNAME}/tests/test_json_fixtures.rb ${GEM_LIB}/gems/${DISTNAME}/tests/test_json_generate.rb +${GEM_LIB}/gems/${DISTNAME}/tests/test_json_generic_object.rb ${GEM_LIB}/gems/${DISTNAME}/tests/test_json_string_matching.rb ${GEM_LIB}/gems/${DISTNAME}/tests/test_json_unicode.rb ${GEM_LIB}/gems/${DISTNAME}/tools/