Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 75d5f463c4720419c663cb1c5052ebb9 > files > 2

perl-Text-CharWidth-0.40.0-5.mga3.src.rpm

%define upstream_name    Text-CharWidth
%define upstream_version 0.04

Name:		perl-%{upstream_name}
Version:	%perl_convert_version %{upstream_version}
Release:	%mkrel 5

Summary:	Text-CharWidth module for perl 
License:	GPL+ or Artistic
Group:		Development/Perl
URL:		http://search.cpan.org/dist/%{upstream_name}
Source0:	http://www.cpan.org/modules/by-module/Text/%{upstream_name}-%{upstream_version}.tar.bz2

BuildRequires:	perl-devel


%description
Text::CharWidth - Get number of occupied columns of a string on
terminal

This module supplies features similar as wcwidth(3) and wcswidth(3) in
C language.

Characters have its own width on terminal depending on locale. For
example, ASCII characters occupy one column per character, east Asian
fullwidth characters (like Hiragana or Han Ideograph) occupy two
columns per character, and combining characters (apperaring in
ISO-8859-11 Thai, Unicode, and so on) occupy zero columns per
character. mbwidth() gives the width of the first character of the
given string and mbswidth() gives the width of the whole given string.

The names of mbwidth and mbswidth came from ``multibyte'' versions of
wcwidth and wcswidth which are ``wide character'' versions.

mblen(string) returns number of bytes of the first character of the
string. Please note that a character may consist of multiple bytes in
multibyte encodings such as UTF-8, EUC-JP, EUC-KR, GB2312, or Big5.

mbwidth(string) returns the width of the first character of the
string. mbswidth(string) returns the width of the whole string.

Parameters are to be given in locale encodings, not always in UTF-8.

%prep
%setup -q -n %{upstream_name}-%{upstream_version}

# perl path hack
find . -type f | xargs %{__perl} -p -i -e "s|^#!/usr/local/bin/perl|#!%{_bindir}/perl|g"

%build
perl Makefile.PL INSTALLDIRS=vendor </dev/null
%make
make test

%install
rm -rf %{buildroot}

%makeinstall_std

%clean 
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc Changes README
%{perl_vendorarch}/Text/CharWidth.pm
%{perl_vendorarch}/auto/Text/CharWidth/CharWidth.so
%{_mandir}/man3/*


%changelog

* Sun Jan 13 2013 umeabot <umeabot> 0.40.0-5.mga3
+ Revision: 374003
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Wed May 30 2012 jquelin <jquelin> 0.40.0-4.mga3
+ Revision: 251218
- rebuild for perl 5.16

* Sun Jun 12 2011 sander85 <sander85> 0.40.0-3.mga2
+ Revision: 105038
- Rebuild for perl 5.14

* Sat Jan 22 2011 jquelin <jquelin> 0.40.0-2.mga1
+ Revision: 31303
- mageia rebuild
- imported package perl-Text-CharWidth