aboutsummaryrefslogtreecommitdiff
path: root/textproc/p5-Text-CharWidth/Makefile
diff options
context:
space:
mode:
authorChin-San Huang <chinsan@FreeBSD.org>2008-08-31 08:31:02 +0000
committerChin-San Huang <chinsan@FreeBSD.org>2008-08-31 08:31:02 +0000
commitd2d421fd99442de3cc46828fc189d8c5f4e33dbc (patch)
tree673d5fdeee089354cc86b4c270700cdbd40acd4c /textproc/p5-Text-CharWidth/Makefile
parentb3759e494e6504748c2342618a36c5fd3b0c1776 (diff)
Add p5-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. WWW: http://search.cpan.org/dist/Text-CharWidth/
Notes
Notes: svn path=/head/; revision=219506
Diffstat (limited to 'textproc/p5-Text-CharWidth/Makefile')
-rw-r--r--textproc/p5-Text-CharWidth/Makefile21
1 files changed, 21 insertions, 0 deletions
diff --git a/textproc/p5-Text-CharWidth/Makefile b/textproc/p5-Text-CharWidth/Makefile
new file mode 100644
index 000000000000..03a7d56b8b24
--- /dev/null
+++ b/textproc/p5-Text-CharWidth/Makefile
@@ -0,0 +1,21 @@
+# New ports collection makefile for: p5-Text-CharWidth
+# Date created: 2008/08/31
+# Whom: chinsan
+#
+# $FreeBSD$
+#
+
+PORTNAME= Text-CharWidth
+DISTVERSION= 0.04
+CATEGORIES= textproc perl5
+MASTER_SITES= CPAN
+PKGNAMEPREFIX= p5-
+
+MAINTAINER= chinsan@FreeBSD.org
+COMMENT= Get number of occupied columns of a string on terminal
+
+PERL_CONFIGURE= YES
+
+MAN3= Text::CharWidth.3
+
+.include <bsd.port.mk>