From 37f741cc9ca317e295ad0606d045fb92850c0157 Mon Sep 17 00:00:00 2001 From: gregor herrmann Date: Fri, 26 Sep 2014 14:13:21 +0200 Subject: [PATCH] Imported Upstream version 3.002.001 --- Changes | 5 +++++ META.json | 27 ++++++++++++++++----------- META.yml | 4 ++-- Makefile.PL | 26 ++++++++++++++++++-------- inc/Devel/CheckLib.pm | 2 +- inc/Sereal/BuildTools.pm | 2 +- lib/Sereal/Encoder.pm | 2 +- lib/Sereal/Encoder/Constants.pm | 2 +- snappy/csnappy_compress.c | 2 +- 9 files changed, 46 insertions(+), 26 deletions(-) diff --git a/Changes b/Changes index 5742788..100a37d 100644 --- a/Changes +++ b/Changes @@ -3,6 +3,11 @@ Revision history for Perl extension Sereal-Encoder * Warning: For a seamless upgrade, upgrade to version 3 * of the decoder before upgrading to version 3 of the * encoder! +3.002_001 Sept 26, 2014 + * Niko Tyni fixed the 64-bit big endian Sereal bug! (Yay Niko!) + * Setup META.yml correctly so that certain dependencies are + marked as being test dependencies and not build or run-time + dependencies. 3.002 Aug 20 2014 Summary of changes from 3.001 - 3.002 diff --git a/META.json b/META.json index aef720d..13f07cd 100644 --- a/META.json +++ b/META.json @@ -4,7 +4,7 @@ "Steffen Mueller , Yves Orton " ], "dynamic_config" : 1, - "generated_by" : "ExtUtils::MakeMaker version 6.9, CPAN::Meta::Converter version 2.141520", + "generated_by" : "ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.142060", "license" : [ "perl_5" ], @@ -22,16 +22,9 @@ "prereqs" : { "build" : { "requires" : { - "Data::Dumper" : "0", "ExtUtils::ParseXS" : "2.21", "File::Find" : "0", - "File::Path" : "0", - "File::Spec" : "0", - "Scalar::Util" : "0", - "Sereal::Decoder" : "3.00", - "Test::LongString" : "0", - "Test::More" : "0.88", - "Test::Warn" : "0" + "File::Path" : "0" } }, "configure" : { @@ -44,16 +37,28 @@ "XSLoader" : "0", "perl" : "5.008" } + }, + "test" : { + "requires" : { + "Data::Dumper" : "0", + "File::Spec" : "0", + "Scalar::Util" : "0", + "Sereal::Decoder" : "3.00", + "Test::LongString" : "0", + "Test::More" : "0.88", + "Test::Warn" : "0" + } } }, - "release_status" : "stable", + "release_status" : "testing", "resources" : { "bugtracker" : { "web" : "https://github.com/Sereal/Sereal/issues" }, "repository" : { + "type" : "git", "url" : "git://github.com/Sereal/Sereal.git" } }, - "version" : "3.002" + "version" : "3.002_001" } diff --git a/META.yml b/META.yml index 4093ecf..c28fe06 100644 --- a/META.yml +++ b/META.yml @@ -16,7 +16,7 @@ build_requires: configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 1 -generated_by: 'ExtUtils::MakeMaker version 6.9, CPAN::Meta::Converter version 2.141520' +generated_by: 'ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.142060' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -32,4 +32,4 @@ requires: resources: bugtracker: https://github.com/Sereal/Sereal/issues repository: git://github.com/Sereal/Sereal.git -version: '3.002' +version: 3.002_001 diff --git a/Makefile.PL b/Makefile.PL index 25f9bca..65d9292 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -70,23 +70,29 @@ WriteMakefile1( MIN_PERL_VERSION => '5.008', META_MERGE => { resources => { - repository => 'git://github.com/Sereal/Sereal.git', - bugtracker => 'https://github.com/Sereal/Sereal/issues', + repository => { + url => 'git://github.com/Sereal/Sereal.git', + }, + bugtracker => { + web => 'https://github.com/Sereal/Sereal/issues', + }, }, + 'meta-spec' => { version => 2 }, }, - BUILD_REQUIRES => { + TEST_REQUIRES => { 'Test::More' => 0.88, 'Scalar::Util' => 0, - 'File::Find' => 0, 'File::Spec' => 0, - 'Scalar::Util' => 0, - 'File::Path' => 0, - 'ExtUtils::ParseXS' => '2.21', 'Test::LongString' => '0', - 'Data::Dumper' => '0', 'Test::Warn' => '0', + 'Data::Dumper' => '0', 'Sereal::Decoder' => '3.00', }, + BUILD_REQUIRES => { + 'File::Find' => 0, + 'File::Path' => 0, + 'ExtUtils::ParseXS' => '2.21', + }, NAME => $module, VERSION_FROM => 'lib/Sereal/Encoder.pm', # finds $VERSION PREREQ_PM => { @@ -112,6 +118,10 @@ sub WriteMakefile1 { #Written by Alexandr Ciornii, version 0.20. Added by eumm- $eumm_version=eval $eumm_version; die "EXTRA_META is deprecated" if exists $params{EXTRA_META}; die "License not specified" if not exists $params{LICENSE}; + if ($params{TEST_REQUIRES} and $eumm_version < 6.6303) { + $params{BUILD_REQUIRES}={ %{$params{BUILD_REQUIRES} || {}} , %{$params{TEST_REQUIRES}} }; + delete $params{TEST_REQUIRES}; + } if ($params{BUILD_REQUIRES} and $eumm_version < 6.5503) { #EUMM 6.5502 has problems with BUILD_REQUIRES $params{PREREQ_PM}={ %{$params{PREREQ_PM} || {}} , %{$params{BUILD_REQUIRES}} }; diff --git a/inc/Devel/CheckLib.pm b/inc/Devel/CheckLib.pm index c830d2f..0a23585 100644 --- a/inc/Devel/CheckLib.pm +++ b/inc/Devel/CheckLib.pm @@ -369,7 +369,7 @@ sub _findcc { my @cc = split(/\s+/, $Config{cc}); return ( [ @cc, @ccflags ], \@ldflags ) if -x $cc[0]; foreach my $path (@paths) { - my $compiler = File::Spec->catfile($path, $cc[0]) . $Config{_exe}; + my $compiler = File::Spec->catfile($path, $cc[0]) . ($^O eq 'cygwin' ? '' : $Config{_exe}); return ([ $compiler, @cc[1 .. $#cc], @ccflags ], \@ldflags) if -x $compiler; } diff --git a/inc/Sereal/BuildTools.pm b/inc/Sereal/BuildTools.pm index 530efa3..a36e1e9 100644 --- a/inc/Sereal/BuildTools.pm +++ b/inc/Sereal/BuildTools.pm @@ -80,7 +80,7 @@ package $constant_namespace; use strict; use warnings; use Carp qw(croak); -use $namespace; # for XSLoading +use $namespace; our \$VERSION= \$$namespace\::VERSION; # for XSLoading our \@ISA = qw(Exporter); require Exporter; our \@EXPORT_OK; diff --git a/lib/Sereal/Encoder.pm b/lib/Sereal/Encoder.pm index abb0285..45232e5 100644 --- a/lib/Sereal/Encoder.pm +++ b/lib/Sereal/Encoder.pm @@ -5,7 +5,7 @@ use warnings; use Carp qw/croak/; use XSLoader; -our $VERSION = '3.002'; # Don't forget to update the TestCompat set for testing against installed decoders! +our $VERSION = '3.002_001'; # Don't forget to update the TestCompat set for testing against installed decoders! our $XS_VERSION = $VERSION; $VERSION= eval $VERSION; # not for public consumption, just for testing. diff --git a/lib/Sereal/Encoder/Constants.pm b/lib/Sereal/Encoder/Constants.pm index 307dd92..9138baa 100644 --- a/lib/Sereal/Encoder/Constants.pm +++ b/lib/Sereal/Encoder/Constants.pm @@ -4,7 +4,7 @@ package Sereal::Encoder::Constants; use strict; use warnings; use Carp qw(croak); -use Sereal::Encoder; # for XSLoading +use Sereal::Encoder; our $VERSION= $Sereal::Encoder::VERSION; # for XSLoading our @ISA = qw(Exporter); require Exporter; our @EXPORT_OK; diff --git a/snappy/csnappy_compress.c b/snappy/csnappy_compress.c index abc103b..007bb82 100644 --- a/snappy/csnappy_compress.c +++ b/snappy/csnappy_compress.c @@ -441,7 +441,7 @@ static INLINE EightBytesReference GetEightBytesAt(const char* ptr) { static INLINE uint32_t GetUint32AtOffset(uint64_t v, int offset) { DCHECK_GE(offset, 0); DCHECK_LE(offset, 4); -#ifdef __LITTLE_ENDIAN +#if __BYTE_ORDER == __LITTLE_ENDIAN return v >> (8 * offset); #else return v >> (32 - 8 * offset); -- 2.30.2