From 184723f6ada628bf01cd50af4a11435968c2a9fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 12 Nov 2014 16:31:53 +0100 Subject: [PATCH] 3.003 bump --- .gitignore | 1 + ...al-csnappy-library-in-Sereal-Decoder.patch | 81 ------------------- ...rnal-miniz-library-in-Sereal-Decoder.patch | 79 ------------------ perl-Sereal-Decoder.spec | 13 ++- sources | 2 +- 5 files changed, 7 insertions(+), 169 deletions(-) delete mode 100644 Sereal-3.002_001-Prefer-external-csnappy-library-in-Sereal-Decoder.patch delete mode 100644 Sereal-3.002_001-Prefer-external-miniz-library-in-Sereal-Decoder.patch diff --git a/.gitignore b/.gitignore index 97c3aee..dfc469e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /Sereal-Decoder-3.002.tar.gz +/Sereal-Decoder-3.003.tar.gz diff --git a/Sereal-3.002_001-Prefer-external-csnappy-library-in-Sereal-Decoder.patch b/Sereal-3.002_001-Prefer-external-csnappy-library-in-Sereal-Decoder.patch deleted file mode 100644 index 8359a0a..0000000 --- a/Sereal-3.002_001-Prefer-external-csnappy-library-in-Sereal-Decoder.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 3bdd905ddf3c6c9feabbf88901bf4f655924cb61 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -Date: Thu, 16 Oct 2014 13:12:07 +0200 -Subject: [PATCH 1/2] Prefer external csnappy library in Sereal::Decoder -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This patch checks for presence of csnappy library and header file and -if they are available, they will be used to link to the -Sereal::Decoder XS module. Otherwise the bundled csnappy code will be -used. - - - -Signed-off-by: Petr Písař ---- - Perl/Decoder/Makefile.PL | 15 ++++++++++++++- - Perl/Decoder/srl_decoder.c | 5 +++++ - 2 files changed, 19 insertions(+), 1 deletion(-) - -diff --git a/Perl/Decoder/Makefile.PL b/Perl/Decoder/Makefile.PL -index 71cd40d..864b89b 100644 ---- a/Perl/Decoder/Makefile.PL -+++ b/Perl/Decoder/Makefile.PL -@@ -25,6 +25,7 @@ our $OPTIMIZE; - # #define MINIZ_LITTLE_ENDIAN 1 - # #define MINIZ_HAS_64BIT_REGISTERS 1 - -+my $libs = ''; - my $defines = join " ", map "-D$_", grep exists $ENV{$_}, qw(NOINLINE DEBUG MEMDEBUG NDEBUG); - if ($Config{gccversion}) { - $OPTIMIZE = '-O3 -Wall -W'; -@@ -52,6 +53,18 @@ if ($Config{osname} eq 'hpux' && not $Config{gccversion}) { - $defines .= " -Dinline= "; - } - -+# Prefer external csnappy library over the bundled one. -+require Devel::CheckLib; -+my $have_csnappy = Devel::CheckLib::check_lib( -+ lib => 'csnappy', -+ header => 'csnappy.h' -+); -+ -+if ($have_csnappy) { -+ $libs .= ' -lcsnappy'; -+ $defines .= ' -DHAVE_CSNAPPY'; -+} -+ - # See lib/ExtUtils/MakeMaker.pm for details of how to influence - # the contents of the Makefile that is written. - WriteMakefile1( -@@ -89,7 +102,7 @@ WriteMakefile1( - LICENSE => 'perl', - ABSTRACT_FROM => 'lib/Sereal/Decoder.pm', - AUTHOR => 'Steffen Mueller , Yves Orton ', -- LIBS => [''], # e.g., '-lm' -+ LIBS => [$libs], # e.g., '-lm' - DEFINE => $defines, - INC => '-I.', # e.g., '-I. -I/usr/include/other' - OPTIMIZE => $OPTIMIZE, -diff --git a/Perl/Decoder/srl_decoder.c b/Perl/Decoder/srl_decoder.c -index 890a25c..09b5e52 100644 ---- a/Perl/Decoder/srl_decoder.c -+++ b/Perl/Decoder/srl_decoder.c -@@ -51,7 +51,12 @@ extern "C" { - #include "ptable.h" - #include "srl_protocol.h" - -+#if defined(HAVE_CSNAPPY) -+#include -+#else - #include "snappy/csnappy_decompress.c" -+#endif -+ - #include "miniz.h" - - /* 5.8.8 and earlier have a nasty bug in their handling of overloading: --- -1.9.3 - diff --git a/Sereal-3.002_001-Prefer-external-miniz-library-in-Sereal-Decoder.patch b/Sereal-3.002_001-Prefer-external-miniz-library-in-Sereal-Decoder.patch deleted file mode 100644 index 19dba68..0000000 --- a/Sereal-3.002_001-Prefer-external-miniz-library-in-Sereal-Decoder.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 1a5184d4e21391a5ac8ea28fa84a7ba7689a33dd Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -Date: Thu, 16 Oct 2014 13:16:53 +0200 -Subject: [PATCH 2/2] Prefer external miniz library in Sereal::Decoder -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This patch checks for presence of miniz library and header file and -if they are available, they will be used to link to the -Sereal::Decoder XS module. Otherwise the bundled miniz code will be -used. - -Signed-off-by: Petr Písař ---- - Perl/Decoder/Makefile.PL | 16 +++++++++++++++- - Perl/Decoder/srl_decoder.c | 4 ++++ - 2 files changed, 19 insertions(+), 1 deletion(-) - -diff --git a/Perl/Decoder/Makefile.PL b/Perl/Decoder/Makefile.PL -index 864b89b..6750b3d 100644 ---- a/Perl/Decoder/Makefile.PL -+++ b/Perl/Decoder/Makefile.PL -@@ -26,6 +26,7 @@ our $OPTIMIZE; - # #define MINIZ_HAS_64BIT_REGISTERS 1 - - my $libs = ''; -+my $objects = '$(BASEEXT)$(OBJ_EXT) srl_decoder$(OBJ_EXT)'; - my $defines = join " ", map "-D$_", grep exists $ENV{$_}, qw(NOINLINE DEBUG MEMDEBUG NDEBUG); - if ($Config{gccversion}) { - $OPTIMIZE = '-O3 -Wall -W'; -@@ -65,6 +66,19 @@ if ($have_csnappy) { - $defines .= ' -DHAVE_CSNAPPY'; - } - -+# Prefer external miniz library over the bundled one. -+my $have_miniz = Devel::CheckLib::check_lib( -+ lib => 'miniz', -+ header => 'miniz.h' -+); -+ -+if ($have_miniz) { -+ $libs .= ' -lminiz'; -+ $defines .= ' -DHAVE_MINIZ'; -+} else { -+ $objects .= ' miniz$(OBJ_EXT)'; -+} -+ - # See lib/ExtUtils/MakeMaker.pm for details of how to influence - # the contents of the Makefile that is written. - WriteMakefile1( -@@ -106,7 +120,7 @@ WriteMakefile1( - DEFINE => $defines, - INC => '-I.', # e.g., '-I. -I/usr/include/other' - OPTIMIZE => $OPTIMIZE, -- OBJECT => '$(O_FILES)', -+ OBJECT => $objects, - test => { - TESTS => "t/*.t t/*/*/*.t" - }, -diff --git a/Perl/Decoder/srl_decoder.c b/Perl/Decoder/srl_decoder.c -index 09b5e52..f21b993 100644 ---- a/Perl/Decoder/srl_decoder.c -+++ b/Perl/Decoder/srl_decoder.c -@@ -57,7 +57,11 @@ extern "C" { - #include "snappy/csnappy_decompress.c" - #endif - -+#if defined(HAVE_MINIZ) -+#include -+#else - #include "miniz.h" -+#endif - - /* 5.8.8 and earlier have a nasty bug in their handling of overloading: - * The overload-flag is set on the referer of the blessed object instead of --- -1.9.3 - diff --git a/perl-Sereal-Decoder.spec b/perl-Sereal-Decoder.spec index f8e18c2..6ec459b 100644 --- a/perl-Sereal-Decoder.spec +++ b/perl-Sereal-Decoder.spec @@ -1,6 +1,6 @@ Name: perl-Sereal-Decoder -Version: 3.002 -Release: 2%{?dist} +Version: 3.003 +Release: 1%{?dist} Summary: Perl deserialization for Sereal format # lib/Sereal/Decoder.pm: GPL+ or Artistic # miniz.c: Unlicense (unbundled) @@ -9,10 +9,6 @@ License: GPL+ or Artistic Group: Development/Libraries URL: http://search.cpan.org/dist/Sereal-Decoder/ Source0: http://www.cpan.org/authors/id/Y/YV/YVES/Sereal-Decoder-%{version}.tar.gz -# Use external csnappy library, -Patch0: Sereal-3.002_001-Prefer-external-csnappy-library-in-Sereal-Decoder.patch -# Use external miniz library, -Patch1: Sereal-3.002_001-Prefer-external-miniz-library-in-Sereal-Decoder.patch BuildRequires: csnappy-devel BuildRequires: miniz-devel BuildRequires: perl @@ -58,8 +54,6 @@ and feature-rich binary protocol called Sereal. %prep %setup -q -n Sereal-Decoder-%{version} -%patch0 -p3 -%patch1 -p3 # Remove bundled Perl modules rm -r ./inc/Devel sed -i -s '/^inc\/Devel/d' MANIFEST @@ -90,6 +84,9 @@ make test %{_mandir}/man3/* %changelog +* Wed Nov 12 2014 Petr Pisar - 3.003-1 +- 3.003 bump + * Thu Nov 06 2014 Petr Pisar - 3.002-2 - Finish Sereal bootstrap diff --git a/sources b/sources index ccc9bc5..57ac549 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c26033b258dc3ee2e4e485f7293ccb63 Sereal-Decoder-3.002.tar.gz +453502152d89e5602ab6d66a33b74ec1 Sereal-Decoder-3.003.tar.gz