summaryrefslogtreecommitdiffstats
path: root/textproc
diff options
context:
space:
mode:
authormat <mat@FreeBSD.org>2005-02-15 17:17:56 +0000
committermat <mat@FreeBSD.org>2005-02-15 17:17:56 +0000
commitacdd72e78acbd9885a7100386610ab27af2929f2 (patch)
tree8bf21f8f40d30ea20a378335d118f28fdb25bc70 /textproc
parent1d59e7d23f23d26deec4e9325cd98840ad224b5e (diff)
downloadFreeBSD-ports-acdd72e78acbd9885a7100386610ab27af2929f2.zip
FreeBSD-ports-acdd72e78acbd9885a7100386610ab27af2929f2.tar.gz
Add p5-Sort-Naturally 1.02, sort lexically, but sort numeral parts
numerically. PR: ports/p5-Sort-Naturally/ Submitted by: Aaron Dalton <aaron@daltons.ca>
Diffstat (limited to 'textproc')
-rw-r--r--textproc/Makefile1
-rw-r--r--textproc/p5-Sort-Naturally/Makefile22
-rw-r--r--textproc/p5-Sort-Naturally/distinfo2
-rw-r--r--textproc/p5-Sort-Naturally/pkg-descr31
-rw-r--r--textproc/p5-Sort-Naturally/pkg-plist5
5 files changed, 61 insertions, 0 deletions
diff --git a/textproc/Makefile b/textproc/Makefile
index bfee070..490322c 100644
--- a/textproc/Makefile
+++ b/textproc/Makefile
@@ -335,6 +335,7 @@
SUBDIR += p5-Search-Saryer
SUBDIR += p5-Sort-ArbBiLex
SUBDIR += p5-Sort-Fields
+ SUBDIR += p5-Sort-Naturally
SUBDIR += p5-Sort-PolySort
SUBDIR += p5-Spork
SUBDIR += p5-Spreadsheet-ParseExcel
diff --git a/textproc/p5-Sort-Naturally/Makefile b/textproc/p5-Sort-Naturally/Makefile
new file mode 100644
index 0000000..f303604
--- /dev/null
+++ b/textproc/p5-Sort-Naturally/Makefile
@@ -0,0 +1,22 @@
+# New ports collection makefile for: p5-Sort-Naturally
+# Date created: 30 December 2004
+# Whom: Aaron Dalton <aaron@daltons.ca>
+#
+# $FreeBSD$
+#
+
+PORTNAME= Sort-Naturally
+PORTVERSION= 1.02
+CATEGORIES= textproc perl5
+MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
+MASTER_SITE_SUBDIR= Sort
+PKGNAMEPREFIX= p5-
+
+MAINTAINER= aaron@daltons.ca
+COMMENT= Sort lexically, but sort numeral parts numerically
+
+PERL_CONFIGURE= yes
+
+MAN3= Sort::Naturally.3
+
+.include <bsd.port.mk>
diff --git a/textproc/p5-Sort-Naturally/distinfo b/textproc/p5-Sort-Naturally/distinfo
new file mode 100644
index 0000000..6916db5
--- /dev/null
+++ b/textproc/p5-Sort-Naturally/distinfo
@@ -0,0 +1,2 @@
+MD5 (Sort-Naturally-1.02.tar.gz) = a173f3f8f519ebae6e5e578e843f6e1c
+SIZE (Sort-Naturally-1.02.tar.gz) = 10357
diff --git a/textproc/p5-Sort-Naturally/pkg-descr b/textproc/p5-Sort-Naturally/pkg-descr
new file mode 100644
index 0000000..ce307f0
--- /dev/null
+++ b/textproc/p5-Sort-Naturally/pkg-descr
@@ -0,0 +1,31 @@
+This module exports two functions, nsort and ncmp; they are used in implementing
+my idea of a "natural sorting" algorithm. Under natural sorting, numeric
+substrings are compared numerically, and other word-characters are compared
+lexically.
+
+This is the way I define natural sorting:
+
+ * Non-numeric word-character substrings are sorted lexically,
+case-insensitively: "Foo" comes between "fish" and "fowl".
+ * Numeric substrings are sorted numerically: "100" comes after "20",
+not before.
+ * \W substrings (neither words-characters nor digits) are ignored. Our use
+ * of \w, \d, \D, and \W is locale-sensitive: Sort::Naturally
+uses a use locale statement.
+ * When comparing two strings, where a numeric substring in one place
+is not up against a numeric substring in another, the non-numeric always comes
+first. This is fudged by reading pretending that the lack of a number substring
+has the value -1, like so:
+ * The start of a string is exceptional: leading non-\W (non-word,
+non-digit) components are are ignored, and numbers come before letters.
+ * I define "numeric substring" just as sequences matching m/\d+/ --
+scientific notation, commas, decimals, etc., are not seen. If your data has
+thousands separators in numbers ("20,000 Leagues Under The Sea" or "20.000
+lieues sous les mers"), consider stripping them before feeding them to nsort or
+ncmp.
+
+WWW: http://search.cpan.org/dist/Sort-Naturally/
+Author: Sean M. Burke <sburke@cpan.org>
+
+- Aaron Dalton
+aaron@daltons.ca
diff --git a/textproc/p5-Sort-Naturally/pkg-plist b/textproc/p5-Sort-Naturally/pkg-plist
new file mode 100644
index 0000000..3689838
--- /dev/null
+++ b/textproc/p5-Sort-Naturally/pkg-plist
@@ -0,0 +1,5 @@
+%%SITE_PERL%%/Sort/Naturally.pm
+%%SITE_PERL%%/%%PERL_ARCH%%/auto/Sort/Naturally/.packlist
+@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Sort/Naturally
+@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto/Sort 2>/dev/null || true
+@unexec rmdir %D/%%SITE_PERL%%/Sort 2>/dev/null || true
OpenPOWER on IntegriCloud