!1 Add package

Merge pull request !1 from phanddy/master
This commit is contained in:
openeuler-ci-bot 2020-08-11 15:42:30 +08:00 committed by Gitee
commit 3918bdae50
3 changed files with 169 additions and 0 deletions

View File

@ -0,0 +1,83 @@
From 49bf49b99a7ffb12b68035f096c160bc51e48775 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Thu, 21 Nov 2019 09:22:33 +0100
Subject: [PATCH] Use system Object::HashBase
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
Makefile.PL | 1 +
lib/Term/Table.pm | 2 +-
lib/Term/Table/Cell.pm | 2 +-
lib/Term/Table/CellStack.pm | 2 +-
lib/Term/Table/LineBreak.pm | 2 +-
5 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/Makefile.PL b/Makefile.PL
index 44de066..4d4c7d4 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -20,6 +20,7 @@ my %WriteMakefileArgs = (
"Carp" => 0,
"Importer" => "0.024",
"List::Util" => 0,
+ "Object::HashBase" => "0.008",
"Scalar::Util" => 0
},
"TEST_REQUIRES" => {
diff --git a/lib/Term/Table.pm b/lib/Term/Table.pm
index 578eba8..3190bcd 100644
--- a/lib/Term/Table.pm
+++ b/lib/Term/Table.pm
@@ -11,7 +11,7 @@ use Scalar::Util qw/blessed/;
use List::Util qw/max sum/;
use Carp qw/croak carp/;
-use Term::Table::HashBase qw/rows _columns collapse max_width mark_tail sanitize show_header auto_columns no_collapse header allow_overflow pad/;
+use Object::HashBase 0.008 qw/rows _columns collapse max_width mark_tail sanitize show_header auto_columns no_collapse header allow_overflow pad/;
sub BORDER_SIZE() { 4 } # '| ' and ' |' borders
sub DIV_SIZE() { 3 } # ' | ' column delimiter
diff --git a/lib/Term/Table/Cell.pm b/lib/Term/Table/Cell.pm
index 978ef06..10d2b70 100644
--- a/lib/Term/Table/Cell.pm
+++ b/lib/Term/Table/Cell.pm
@@ -9,7 +9,7 @@ use Term::Table::Util qw/uni_length/;
use List::Util qw/sum/;
-use Term::Table::HashBase qw/value border_left border_right _break _widths border_color value_color reset_color/;
+use Object::HashBase 0.008 qw/value border_left border_right _break _widths border_color value_color reset_color/;
my %CHAR_MAP = (
# Special case, \n should render as \n, but also actually do the newline thing
diff --git a/lib/Term/Table/CellStack.pm b/lib/Term/Table/CellStack.pm
index 7b99f6a..a948d10 100644
--- a/lib/Term/Table/CellStack.pm
+++ b/lib/Term/Table/CellStack.pm
@@ -4,7 +4,7 @@ use warnings;
our $VERSION = '0.015';
-use Term::Table::HashBase qw/-cells -idx/;
+use Object::HashBase 0.008 qw/-cells -idx/;
use List::Util qw/max/;
diff --git a/lib/Term/Table/LineBreak.pm b/lib/Term/Table/LineBreak.pm
index dc70ca3..ef95f7e 100644
--- a/lib/Term/Table/LineBreak.pm
+++ b/lib/Term/Table/LineBreak.pm
@@ -8,7 +8,7 @@ use Carp qw/croak/;
use Scalar::Util qw/blessed/;
use Term::Table::Util qw/uni_length/;
-use Term::Table::HashBase qw/string gcstring _len _parts idx/;
+use Object::HashBase 0.008 qw/string gcstring _len _parts idx/;
sub init {
my $self = shift;
--
2.21.0

BIN
Term-Table-0.015.tar.gz Normal file

Binary file not shown.

86
perl-Term-Table.spec Normal file
View File

@ -0,0 +1,86 @@
%global _empty_manifest_terminate_build 0
Name: perl-Term-Table
Version: 0.015
Release: 1
Summary: Term::Table Perl module
License: GPL+ or Artistic
Group: Development/Libraries
URL: https://metacpan.org/release/Term-Table
Source0: https://cpan.metacpan.org/authors/id/E/EX/EXODIST/Term-Table-%{version}.tar.gz
Patch0: Term-Table-0.015-Use-system-Object-HashBase.patch
BuildArch: noarch
BuildRequires: make
BuildRequires: perl-generators
BuildRequires: perl-interpreter
BuildRequires: perl(:VERSION) >= 5.8.1
BuildRequires: perl(Importer) >= 0.024
BuildRequires: perl(Object::HashBase) >= 0.008
BuildRequires: perl(Test2::API)
BuildRequires: perl(Test2::Tools::Tiny) >= 1.302097
Requires: perl(Importer) >= 0.024
%description
This Perl module is able to format rows of data into tables.
%package help
Summary : Term::Table Perl module
Provides: perl-Term-Table-doc
%description help
This Perl module is able to format rows of data into tables.
%prep
%setup -q -n Term-Table-%{version}
%patch0 -p1
%build
export PERL_MM_OPT=""
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{make_build}
%install
export PERL_MM_OPT=""
rm -rf $RPM_BUILD_ROOT
%{make_install}
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
%{_fixperms} $RPM_BUILD_ROOT/*
pushd %{buildroot}
touch filelist.lst
if [ -d usr/bin ];then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ];then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ];then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib ];then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
popd
mv %{buildroot}/filelist.lst .
%check
make test
%clean
rm -rf $RPM_BUILD_ROOT
%files -f filelist.lst
%defattr(-,root,root,-)
%doc Changes META.json README
%{perl_vendorlib}/*
%files help
%{_mandir}/*
%changelog
* Mon Aug 3 2020 dingyue <dingyue5@huawei.com> -0.015 -1
- Package init