diff -Nru libtext-simpletable-perl-2.04/Changes libtext-simpletable-perl-2.07/Changes --- libtext-simpletable-perl-2.04/Changes 2018-03-23 13:14:27.000000000 +0000 +++ libtext-simpletable-perl-2.07/Changes 2018-07-23 19:24:33.000000000 +0000 @@ -1,5 +1,15 @@ This file documents the revision history for Perl extension Text::SimpleTable. +2.07 2018-07-22 23:09:00 + - rerelease with unbroken manifest. + +2.06 2018-07-22 23:09:00 + - Apply changes from Wesley Schwengle (waterkip) to + make tests more resillient +2.05 2010-06-06 16:38:00 + - Add CJK support (usausat) + - Add unicode box support (pjsg) + 2.04 2018-03-23 14:13:00 - Add line drawing using Unicode line drawing characters as an option (pjsg) - Update metadata (grinnz) diff -Nru libtext-simpletable-perl-2.04/debian/changelog libtext-simpletable-perl-2.07/debian/changelog --- libtext-simpletable-perl-2.04/debian/changelog 2018-05-05 16:13:46.000000000 +0000 +++ libtext-simpletable-perl-2.07/debian/changelog 2018-07-27 17:52:46.000000000 +0000 @@ -1,3 +1,13 @@ +libtext-simpletable-perl (2.07-1) unstable; urgency=medium + + * Import upstream version 2.05. + * Import upstream version 2.07. + * Update (build) dependencies. + * Declare compliance with Debian Policy 4.1.5. + * Fix hashbang in example script. Thanks to lintian. + + -- gregor herrmann Fri, 27 Jul 2018 19:52:46 +0200 + libtext-simpletable-perl (2.04-1) unstable; urgency=medium [ Salvatore Bonaccorso ] diff -Nru libtext-simpletable-perl-2.04/debian/control libtext-simpletable-perl-2.07/debian/control --- libtext-simpletable-perl-2.04/debian/control 2018-05-05 16:13:46.000000000 +0000 +++ libtext-simpletable-perl-2.07/debian/control 2018-07-27 17:52:46.000000000 +0000 @@ -5,8 +5,9 @@ Testsuite: autopkgtest-pkg-perl Priority: optional Build-Depends: debhelper (>= 10) -Build-Depends-Indep: perl -Standards-Version: 4.1.4 +Build-Depends-Indep: perl, + libunicode-linebreak-perl +Standards-Version: 4.1.5 Vcs-Browser: https://salsa.debian.org/perl-team/modules/packages/libtext-simpletable-perl Vcs-Git: https://salsa.debian.org/perl-team/modules/packages/libtext-simpletable-perl.git Homepage: https://metacpan.org/release/Text-SimpleTable @@ -14,7 +15,8 @@ Package: libtext-simpletable-perl Architecture: all Depends: ${misc:Depends}, - ${perl:Depends} + ${perl:Depends}, + libunicode-linebreak-perl Description: Perl module for creating simple eyecandy ASCII Tables Text::SimpleTable is a replacement for the Text::ASCIITable module. . diff -Nru libtext-simpletable-perl-2.04/debian/rules libtext-simpletable-perl-2.07/debian/rules --- libtext-simpletable-perl-2.04/debian/rules 2018-05-05 16:13:46.000000000 +0000 +++ libtext-simpletable-perl-2.07/debian/rules 2018-07-27 17:52:46.000000000 +0000 @@ -1,4 +1,11 @@ #!/usr/bin/make -f +PACKAGE = $(shell dh_listpackages) +TMP = $(CURDIR)/debian/$(PACKAGE) + %: dh $@ + +override_dh_installexamples: + dh_installexamples + sed -i '1s|^#!/usr/bin/env perl|#!/usr/bin/perl|' $(TMP)/usr/share/doc/$(PACKAGE)/examples/* diff -Nru libtext-simpletable-perl-2.04/lib/Text/SimpleTable.pm libtext-simpletable-perl-2.07/lib/Text/SimpleTable.pm --- libtext-simpletable-perl-2.04/lib/Text/SimpleTable.pm 2018-03-23 13:12:42.000000000 +0000 +++ libtext-simpletable-perl-2.07/lib/Text/SimpleTable.pm 2018-07-23 19:19:31.000000000 +0000 @@ -5,7 +5,7 @@ use strict; use warnings; -our $VERSION = '2.04'; +our $VERSION = '2.07'; our %ASCII_BOX = ( # Top @@ -338,12 +338,23 @@ my @cache; my @parts = split "\n", $text; + my $chs_width = _length($self->{chs}->{WRAP}); for my $part (@parts) { while (_length($part) > $width) { my $subtext; - $subtext = substr $part, 0, $width - _length($self->{chs}->{WRAP}), ''; + unless (utf8::is_utf8($part)) { + $subtext = substr $part, 0, $width - $chs_width, ''; + } + else { + my $subtext_width = $width - $chs_width; + my $substr_len; + while (($substr_len = _length(substr $part, 0, $subtext_width)) > $width - $chs_width) { + --$subtext_width; + } + $subtext = substr $part, 0, $subtext_width, ''; + } push @cache, "$subtext$self->{chs}->{WRAP}"; } diff -Nru libtext-simpletable-perl-2.04/Makefile.PL libtext-simpletable-perl-2.07/Makefile.PL --- libtext-simpletable-perl-2.04/Makefile.PL 2018-03-21 23:45:53.000000000 +0000 +++ libtext-simpletable-perl-2.07/Makefile.PL 2018-07-23 19:17:13.000000000 +0000 @@ -25,7 +25,18 @@ dynamic_config => 0, 'meta-spec' => {version => 2}, no_index => {directory => [qw/t/]}, - prereqs => {runtime => {requires => {perl => '5.008001'}}}, + prereqs => { + runtime => { + requires => { + perl => '5.008001' + }, + recommends => { + 'Unicode::LineBreak' => 0, + 'Text::VisualWidth::UTF8' => 0, + 'Text::VisualWidth::PP' => 0, + }, + } + }, resources => { license => ['http://www.opensource.org/licenses/artistic-license-2.0'], repository => { diff -Nru libtext-simpletable-perl-2.04/MANIFEST libtext-simpletable-perl-2.07/MANIFEST --- libtext-simpletable-perl-2.04/MANIFEST 2018-03-23 13:14:56.000000000 +0000 +++ libtext-simpletable-perl-2.07/MANIFEST 2018-07-23 19:25:22.000000000 +0000 @@ -5,10 +5,13 @@ Makefile.PL MANIFEST This list of files MANIFEST.SKIP +MYMETA.json +MYMETA.yml README t/01use.t t/02pod.t t/03podcoverage.t t/04tables.t +t/05tables_cjk.t META.yml Module YAML meta-data (added by MakeMaker) META.json Module JSON meta-data (added by MakeMaker) diff -Nru libtext-simpletable-perl-2.04/META.json libtext-simpletable-perl-2.07/META.json --- libtext-simpletable-perl-2.04/META.json 2018-03-23 13:14:56.000000000 +0000 +++ libtext-simpletable-perl-2.07/META.json 2018-07-23 19:25:22.000000000 +0000 @@ -4,7 +4,7 @@ "Sebastian Riedel " ], "dynamic_config" : 0, - "generated_by" : "ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150005", + "generated_by" : "ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150010", "license" : [ "artistic_2" ], @@ -28,6 +28,11 @@ "requires" : {} }, "runtime" : { + "recommends" : { + "Text::VisualWidth::PP" : "0", + "Text::VisualWidth::UTF8" : "0", + "Unicode::LineBreak" : "0" + }, "requires" : { "ExtUtils::MakeMaker" : "0", "Test::More" : "0", @@ -46,6 +51,6 @@ "web" : "http://github.com/marcusramberg/text-simpletable" } }, - "version" : "2.04", - "x_serialization_backend" : "JSON::PP version 2.27300" + "version" : "2.07", + "x_serialization_backend" : "JSON::PP version 2.27400_02" } diff -Nru libtext-simpletable-perl-2.04/META.yml libtext-simpletable-perl-2.07/META.yml --- libtext-simpletable-perl-2.04/META.yml 2018-03-23 13:14:56.000000000 +0000 +++ libtext-simpletable-perl-2.07/META.yml 2018-07-23 19:25:22.000000000 +0000 @@ -5,7 +5,7 @@ build_requires: {} configure_requires: {} dynamic_config: 0 -generated_by: 'ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150005' +generated_by: 'ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150010' license: artistic_2 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -16,6 +16,10 @@ - t - inc - t +recommends: + Text::VisualWidth::PP: '0' + Text::VisualWidth::UTF8: '0' + Unicode::LineBreak: '0' requires: ExtUtils::MakeMaker: '0' Test::More: '0' @@ -23,5 +27,5 @@ resources: license: http://www.opensource.org/licenses/artistic-license-2.0 repository: http://github.com/marcusramberg/text-simpletable.git -version: '2.04' +version: '2.07' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -Nru libtext-simpletable-perl-2.04/MYMETA.json libtext-simpletable-perl-2.07/MYMETA.json --- libtext-simpletable-perl-2.04/MYMETA.json 1970-01-01 00:00:00.000000000 +0000 +++ libtext-simpletable-perl-2.07/MYMETA.json 2018-07-23 19:25:16.000000000 +0000 @@ -0,0 +1,60 @@ +{ + "abstract" : "Simple eyecandy ASCII tables", + "author" : [ + "Sebastian Riedel " + ], + "dynamic_config" : 0, + "generated_by" : "ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150010", + "license" : [ + "artistic_2" + ], + "meta-spec" : { + "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + "version" : "2" + }, + "name" : "Text-SimpleTable", + "no_index" : { + "directory" : [ + "t", + "inc", + "t" + ] + }, + "prereqs" : { + "build" : { + "requires" : { + "ExtUtils::MakeMaker" : "0" + } + }, + "configure" : { + "requires" : { + "ExtUtils::MakeMaker" : "0" + } + }, + "runtime" : { + "recommends" : { + "Text::VisualWidth::PP" : "0", + "Text::VisualWidth::UTF8" : "0", + "Unicode::LineBreak" : "0" + }, + "requires" : { + "ExtUtils::MakeMaker" : "0", + "Test::More" : "0", + "perl" : "5.008001" + } + } + }, + "release_status" : "stable", + "resources" : { + "license" : [ + "http://www.opensource.org/licenses/artistic-license-2.0" + ], + "repository" : { + "type" : "git", + "url" : "http://github.com/marcusramberg/text-simpletable.git", + "web" : "http://github.com/marcusramberg/text-simpletable" + } + }, + "version" : "2.07", + "x_serialization_backend" : "JSON::PP version 2.27400_02" +} diff -Nru libtext-simpletable-perl-2.04/MYMETA.yml libtext-simpletable-perl-2.07/MYMETA.yml --- libtext-simpletable-perl-2.04/MYMETA.yml 1970-01-01 00:00:00.000000000 +0000 +++ libtext-simpletable-perl-2.07/MYMETA.yml 2018-07-23 19:24:46.000000000 +0000 @@ -0,0 +1,33 @@ +--- +abstract: 'Simple eyecandy ASCII tables' +author: + - 'Sebastian Riedel ' +build_requires: + ExtUtils::MakeMaker: '0' +configure_requires: + ExtUtils::MakeMaker: '0' +dynamic_config: 0 +generated_by: 'ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150010' +license: artistic_2 +meta-spec: + url: http://module-build.sourceforge.net/META-spec-v1.4.html + version: '1.4' +name: Text-SimpleTable +no_index: + directory: + - t + - inc + - t +recommends: + Text::VisualWidth::PP: '0' + Text::VisualWidth::UTF8: '0' + Unicode::LineBreak: '0' +requires: + ExtUtils::MakeMaker: '0' + Test::More: '0' + perl: '5.008001' +resources: + license: http://www.opensource.org/licenses/artistic-license-2.0 + repository: http://github.com/marcusramberg/text-simpletable.git +version: '2.07' +x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -Nru libtext-simpletable-perl-2.04/t/05tables_cjk.t libtext-simpletable-perl-2.07/t/05tables_cjk.t --- libtext-simpletable-perl-2.04/t/05tables_cjk.t 1970-01-01 00:00:00.000000000 +0000 +++ libtext-simpletable-perl-2.07/t/05tables_cjk.t 2018-07-23 19:17:13.000000000 +0000 @@ -0,0 +1,56 @@ +#!/usr/bin/env perl + +# Copyright (C) 2005-2010, Sebastian Riedel. + +use strict; +use warnings; +use utf8; + +use Test::More; + +eval "use Unicode::GCString"; +if ($@) { + plan skip_all => "These tests require Unicode::GCString"; +} +else { + plan tests => 2; +} + +binmode STDERR, ":utf8"; +binmode STDOUT, ":utf8"; + +use_ok('Text::SimpleTable'); + +my $t = Text::SimpleTable->new(10,11); +$t->row("あいうえおかきくけこ", "あいうえおかきくけこ"); +$t->hr; +$t->row("あいうえおかきくけこa", "あいうえおかきくけこa"); +$t->hr; +$t->row("あいうえおかきくけこab", "あいうえおかきくけこab"); +$t->hr; +$t->row("xあいうえおかきくけこ", "xあいうえおかきくけこ"); +$t->hr; +$t->row("xyあいうえおかきくけこ", "xyあいうえおかきくけこ"); +is($t->draw, <