summaryrefslogtreecommitdiff
path: root/textproc/p5-Unicode-CaseFold
diff options
context:
space:
mode:
authormef <mef@pkgsrc.org>2015-05-10 02:24:03 +0000
committermef <mef@pkgsrc.org>2015-05-10 02:24:03 +0000
commit0e9560349552f894f8382d94552593bed0016b59 (patch)
tree09f07f195e0e1d47658e9d4aaef7b6db2ff89465 /textproc/p5-Unicode-CaseFold
parent5c636bc2edfed6c782f06e930d893f7fcb3f353f (diff)
downloadpkgsrc-0e9560349552f894f8382d94552593bed0016b59.tar.gz
Import p5-Unicode-CaseFold-1.00 as textproc/p5-Unicode-CaseFold.
What is Case-Folding? In non-Unicode contexts, a common idiom to compare two strings case-insensitively is lc($this) eq lc($that). Before comparing two strings we normalize them to an all-lowercase version. "Hello", "HELLO", and "HeLlO" all have the same lowercase form ("hello"), so it doesn't matter which one we start with; they are all equal to one another after lc. In Unicode, things aren't so simple. A Unicode character might have mappings for uppercase, lowercase, and titlecase, and the lowercase mapping of the uppercase mapping of a given character might not be the character that you started with! For example lc(uc("\N{LATIN SMALL LETTER SHARP S")) is "ss", not the eszett we started off with! Case-folding is a part of the Unicode standard that allows any two strings that differ from one another only by case to map to the same "case-folded" form, even when those strings include characters with complex case-mappings.
Diffstat (limited to 'textproc/p5-Unicode-CaseFold')
-rw-r--r--textproc/p5-Unicode-CaseFold/DESCR16
-rw-r--r--textproc/p5-Unicode-CaseFold/Makefile17
-rw-r--r--textproc/p5-Unicode-CaseFold/distinfo5
3 files changed, 38 insertions, 0 deletions
diff --git a/textproc/p5-Unicode-CaseFold/DESCR b/textproc/p5-Unicode-CaseFold/DESCR
new file mode 100644
index 00000000000..8fbf54da410
--- /dev/null
+++ b/textproc/p5-Unicode-CaseFold/DESCR
@@ -0,0 +1,16 @@
+What is Case-Folding?
+
+In non-Unicode contexts, a common idiom to compare two strings
+case-insensitively is lc($this) eq lc($that). Before comparing two strings
+we normalize them to an all-lowercase version. "Hello", "HELLO", and
+"HeLlO" all have the same lowercase form ("hello"), so it doesn't matter
+which one we start with; they are all equal to one another after lc.
+
+In Unicode, things aren't so simple. A Unicode character might have
+mappings for uppercase, lowercase, and titlecase, and the lowercase mapping
+of the uppercase mapping of a given character might not be the character
+that you started with! For example lc(uc("\N{LATIN SMALL LETTER SHARP S"))
+is "ss", not the eszett we started off with! Case-folding is a part of the
+Unicode standard that allows any two strings that differ from one another
+only by case to map to the same "case-folded" form, even when those strings
+include characters with complex case-mappings.
diff --git a/textproc/p5-Unicode-CaseFold/Makefile b/textproc/p5-Unicode-CaseFold/Makefile
new file mode 100644
index 00000000000..c0b3b9ee6d8
--- /dev/null
+++ b/textproc/p5-Unicode-CaseFold/Makefile
@@ -0,0 +1,17 @@
+# $NetBSD: Makefile,v 1.1 2015/05/10 02:24:03 mef Exp $
+
+DISTNAME= Unicode-CaseFold-1.00
+PKGNAME= p5-${DISTNAME}
+CATEGORIES= textproc
+MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=Unicode/}
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= http://search.cpan.org/~arodland/Unicode-CaseFold/
+COMMENT= Unicode case-folding for case-insensitive lookups
+LICENSE= ${PERL5_LICENSE}
+
+PERL5_MODULE_TYPE= Module::Build
+PERL5_PACKLIST= auto/Unicode/CaseFold/.packlist
+
+.include "../../lang/perl5/module.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/textproc/p5-Unicode-CaseFold/distinfo b/textproc/p5-Unicode-CaseFold/distinfo
new file mode 100644
index 00000000000..98d5beecc76
--- /dev/null
+++ b/textproc/p5-Unicode-CaseFold/distinfo
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.1 2015/05/10 02:24:03 mef Exp $
+
+SHA1 (Unicode-CaseFold-1.00.tar.gz) = 887dc77575f34ad8a03504dac216f0932d8ad6c9
+RMD160 (Unicode-CaseFold-1.00.tar.gz) = 146647abc6d6de71f001348e43929d15d600092f
+Size (Unicode-CaseFold-1.00.tar.gz) = 65145 bytes