# # spec file for package perl-Text-ANSITable # # Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define cpan_name Text-ANSITable Name: perl-Text-ANSITable Version: 0.610.0 Release: 0 # 0.610 -> normalize -> 0.610.0 %define cpan_version 0.610 License: Artistic-1.0 OR GPL-1.0-or-later Summary: Create nice formatted tables using extended ASCII and ANSI colors URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/P/PE/PERLANCAR/%{cpan_name}-%{cpan_version}.tar.gz Source1: cpanspec.yml Source100: README.md BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(BorderStyles::Standard) BuildRequires: perl(Carp) >= 1.12 BuildRequires: perl(Color::RGB::Util) >= 0.607 BuildRequires: perl(ColorThemeBase::Static::FromStructColors) >= 0.6.0 BuildRequires: perl(ColorThemeUtil::ANSI) BuildRequires: perl(ColorThemes::Standard) BuildRequires: perl(File::ShareDir::Install) >= 0.06 BuildRequires: perl(Function::Fallback::CoreOrPP) BuildRequires: perl(JSON::MaybeXS) BuildRequires: perl(Log::ger) >= 0.38.0 BuildRequires: perl(Module::List) BuildRequires: perl(Module::Load) BuildRequires: perl(Module::Load::Util) >= 0.11.0 BuildRequires: perl(Moo) BuildRequires: perl(Package::MoreUtil) >= 0.590 BuildRequires: perl(Parse::VarName) BuildRequires: perl(Term::App::Role::Attrs) >= 0.31.0 BuildRequires: perl(Test::Exception) BuildRequires: perl(Test::More) >= 0.98 BuildRequires: perl(Test::Needs) BuildRequires: perl(Text::ANSI::Util) >= 0.220 BuildRequires: perl(alias::module) BuildRequires: perl(namespace::clean) BuildRequires: perl(parent) Requires: perl(BorderStyles::Standard) Requires: perl(Carp) >= 1.12 Requires: perl(Color::RGB::Util) >= 0.607 Requires: perl(ColorThemeBase::Static::FromStructColors) >= 0.6.0 Requires: perl(ColorThemeUtil::ANSI) Requires: perl(ColorThemes::Standard) Requires: perl(Function::Fallback::CoreOrPP) Requires: perl(JSON::MaybeXS) Requires: perl(Log::ger) >= 0.38.0 Requires: perl(Module::List) Requires: perl(Module::Load) Requires: perl(Module::Load::Util) >= 0.11.0 Requires: perl(Moo) Requires: perl(Package::MoreUtil) >= 0.590 Requires: perl(Parse::VarName) Requires: perl(Term::App::Role::Attrs) >= 0.31.0 Requires: perl(Text::ANSI::Util) >= 0.220 Requires: perl(alias::module) Requires: perl(namespace::clean) Requires: perl(parent) Provides: perl(BorderStyle::Text::ANSITable::OldCompat::Default::bold) = %{version} Provides: perl(BorderStyle::Text::ANSITable::OldCompat::Default::brick) = %{version} Provides: perl(BorderStyle::Text::ANSITable::OldCompat::Default::bricko) = %{version} Provides: perl(BorderStyle::Text::ANSITable::OldCompat::Default::csingle) = %{version} Provides: perl(BorderStyle::Text::ANSITable::OldCompat::Default::double) = %{version} Provides: perl(BorderStyle::Text::ANSITable::OldCompat::Default::none_ascii) = %{version} Provides: perl(BorderStyle::Text::ANSITable::OldCompat::Default::none_boxchar) = %{version} Provides: perl(BorderStyle::Text::ANSITable::OldCompat::Default::none_utf8) = %{version} Provides: perl(BorderStyle::Text::ANSITable::OldCompat::Default::single_ascii) = %{version} Provides: perl(BorderStyle::Text::ANSITable::OldCompat::Default::single_boxchar) = %{version} Provides: perl(BorderStyle::Text::ANSITable::OldCompat::Default::single_utf8) = %{version} Provides: perl(BorderStyle::Text::ANSITable::OldCompat::Default::singleh_ascii) = %{version} Provides: perl(BorderStyle::Text::ANSITable::OldCompat::Default::singleh_boxchar) = %{version} Provides: perl(BorderStyle::Text::ANSITable::OldCompat::Default::singleh_utf8) = %{version} Provides: perl(BorderStyle::Text::ANSITable::OldCompat::Default::singlei_ascii) = %{version} Provides: perl(BorderStyle::Text::ANSITable::OldCompat::Default::singlei_boxchar) = %{version} Provides: perl(BorderStyle::Text::ANSITable::OldCompat::Default::singlei_utf8) = %{version} Provides: perl(BorderStyle::Text::ANSITable::OldCompat::Default::singleo_ascii) = %{version} Provides: perl(BorderStyle::Text::ANSITable::OldCompat::Default::singleo_boxchar) = %{version} Provides: perl(BorderStyle::Text::ANSITable::OldCompat::Default::singleo_utf8) = %{version} Provides: perl(BorderStyle::Text::ANSITable::OldCompat::Default::singlev_ascii) = %{version} Provides: perl(BorderStyle::Text::ANSITable::OldCompat::Default::singlev_boxchar) = %{version} Provides: perl(BorderStyle::Text::ANSITable::OldCompat::Default::singlev_utf8) = %{version} Provides: perl(BorderStyle::Text::ANSITable::OldCompat::Default::space_ascii) = %{version} Provides: perl(BorderStyle::Text::ANSITable::OldCompat::Default::space_boxchar) = %{version} Provides: perl(BorderStyle::Text::ANSITable::OldCompat::Default::space_utf8) = %{version} Provides: perl(BorderStyle::Text::ANSITable::OldCompat::Default::spacei_ascii) = %{version} Provides: perl(BorderStyle::Text::ANSITable::OldCompat::Default::spacei_boxchar) = %{version} Provides: perl(BorderStyle::Text::ANSITable::OldCompat::Default::spacei_utf8) = %{version} Provides: perl(ColorTheme::Text::ANSITable::OldCompat::Default::default_gradation) = %{version} Provides: perl(ColorTheme::Text::ANSITable::OldCompat::Default::default_gradation_whitebg) = %{version} Provides: perl(ColorTheme::Text::ANSITable::OldCompat::Default::default_nogradation) = %{version} Provides: perl(ColorTheme::Text::ANSITable::OldCompat::Default::default_nogradation_whitebg) = %{version} Provides: perl(ColorTheme::Text::ANSITable::OldCompat::Default::no_color) = %{version} Provides: perl(ColorTheme::Text::ANSITable::Standard::Gradation) = %{version} Provides: perl(ColorTheme::Text::ANSITable::Standard::GradationWhiteBG) = %{version} Provides: perl(ColorTheme::Text::ANSITable::Standard::NoGradation) = %{version} Provides: perl(ColorTheme::Text::ANSITable::Standard::NoGradationWhiteBG) = %{version} Provides: perl(Text::ANSITable) = %{version} Provides: perl(Text::ANSITable::StyleSet::AltRow) = %{version} %undefine __perllib_provides Recommends: perl(Data::Unixish::ANSI) >= 0.20.0 Recommends: perl(Data::Unixish::Apply) >= 1.574 Recommends: perl(Text::ANSI::WideUtil) >= 0.210 %{perl_requires} %description This module is yet another text table formatter module like Text::ASCIITable or Text::SimpleTable, with the following differences: * * Colors and color themes ANSI color codes will be used by default (even 256 and 24bit colors), but will degrade to lower color depth and black/white according to terminal support. * * Box-drawing characters Box-drawing characters will be used by default, but will degrade to using normal ASCII characters if terminal does not support them. * * Unicode and wide character support Border styles using Unicode characters (double lines, bold/heavy lines, brick style, etc). Columns containing wide characters stay aligned. (Note: support for wide characters requires Text::ANSI::WideUtil which is currently set as an optional prereq, so you'll need to install it explicitly or set your CPAN client to install 'recommends' prereq). Compared to Text::ASCIITable, it uses 'lower_case' method/attr names instead of 'CamelCase', and it uses arrayref for 'columns' and 'add_row'. When specifying border styles, the order of characters are slightly different. More fine-grained options to customize appearance. %prep %autosetup -n %{cpan_name}-%{cpan_version} -p1 find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644 %build perl Makefile.PL INSTALLDIRS=vendor %make_build %check make test %install %perl_make_install %perl_process_packlist %perl_gen_filelist %files -f %{name}.files %doc Changes README %license LICENSE %changelog