aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Kovesdan <gabor@FreeBSD.org>2012-07-16 19:11:15 +0800
committerGabor Kovesdan <gabor@FreeBSD.org>2012-07-16 19:11:15 +0800
commitda56a41ee6a5bbdc8accdf586d73443475657d43 (patch)
tree33ff8e26ae360713fc2fc525e549ea0c35deea09
parent721490520dbef38bac9efaee1020e8e8a8ec6824 (diff)
downloadfreebsd-ports-gnome-da56a41ee6a5bbdc8accdf586d73443475657d43.tar.gz
freebsd-ports-gnome-da56a41ee6a5bbdc8accdf586d73443475657d43.tar.zst
freebsd-ports-gnome-da56a41ee6a5bbdc8accdf586d73443475657d43.zip
- Update to 20120716
Note for -CURRENT users: BSD sort is already the default in recent -CURRENT but with threading disabled. You can easily try threaded BSD sort by installing this port.
-rw-r--r--textproc/bsdsort/Makefile24
-rw-r--r--textproc/bsdsort/distinfo4
-rw-r--r--textproc/bsdsort/files/patch-obsolete-keys.diff96
3 files changed, 14 insertions, 110 deletions
diff --git a/textproc/bsdsort/Makefile b/textproc/bsdsort/Makefile
index 0a6220790730..055828ef67f0 100644
--- a/textproc/bsdsort/Makefile
+++ b/textproc/bsdsort/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= sort
-PORTVERSION= 20120508
-PORTREVISION= 1
+PORTVERSION= 20120716
CATEGORIES= textproc
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= gabor
@@ -25,28 +24,29 @@ MAN1= sort.1
MAKE_ENV+= BINDIR="${PREFIX}/bin" \
MANDIR="${MANPREFIX}/man/man" \
CATDIR="${MANPREFIX}/man/man" \
- NLSDIR="${PREFIX}/share/nls"
+ NLSDIR="${PREFIX}/share/nls" \
+ MK_GNU_SORT="no"
CFLAGS+= -std=c99
-OPTIONS= THREADS "Compile with threads support" on \
- NLS "Compile with NLS support" on \
- OVERWRITE_BASE "Replaces base GNU sort" off
+OPTIONS_DEFINE= THREADS NLS OVERWRITE_BASE
+OVERWRITE_BASE_DESC= "Replaces base GNU sort"
+OPTIONS_DEFAULT= THREADS NLS
.include <bsd.port.pre.mk>
-.if defined(WITHOUT_NLS)
+.if ${PORT_OPTIONS:MNLS}
+PLIST_SUB+= NLS=""
+.else
MAKE_ENV+= WITHOUT_NLS=yes
PLIST_SUB+= NLS="@comment "
-.else
-PLIST_SUB+= NLS=""
.endif
-.if defined(WITHOUT_THREADS)
-MAKE_ENV+= WITHOUT_THREADS=yes
+.if ${PORT_OPTIONS:MTHREADS}
+MAKE_ENV+= WITH_THREADS=yes
.endif
-.if defined(WITH_OVERWRITE_BASE)
+.if ${PORT_OPTIONS:MOVERWRITE_BASE}
PREFIX= /usr
PLIST_SUB+= OVERWRITE_BASE="" NO_OVERWRITE_BASE="@comment "
.else
diff --git a/textproc/bsdsort/distinfo b/textproc/bsdsort/distinfo
index 1bf9383ddcd9..2888224a604b 100644
--- a/textproc/bsdsort/distinfo
+++ b/textproc/bsdsort/distinfo
@@ -1,2 +1,2 @@
-SHA256 (sort-20120508.tar.gz) = df0f9a7a776cccbc224b85fdf484de4babc7793b67a74df19ab3a9b156340522
-SIZE (sort-20120508.tar.gz) = 51759
+SHA256 (sort-20120716.tar.gz) = a30c577b78730f6acf2fe6aed154dbe906fc6834998c8f67c9b7e30fb10755a4
+SIZE (sort-20120716.tar.gz) = 40754
diff --git a/textproc/bsdsort/files/patch-obsolete-keys.diff b/textproc/bsdsort/files/patch-obsolete-keys.diff
deleted file mode 100644
index 318627d4fb61..000000000000
--- a/textproc/bsdsort/files/patch-obsolete-keys.diff
+++ /dev/null
@@ -1,96 +0,0 @@
---- sort.c.orig Tue May 08 17:38:20 2012 +0200
-+++ sort.c Wed May 09 12:37:18 2012 +0200
-@@ -779,17 +779,17 @@
- * Parse POS in +POS -POS option.
- */
- static int
--parse_pos_obs(const char *s, int *nf, int *nc)
-+parse_pos_obs(const char *s, int *nf, int *nc, char* sopts)
- {
- regex_t re;
-- regmatch_t pmatch[3];
-+ regmatch_t pmatch[4];
- char *c, *f;
-- const char *sregexp = "^([0-9]+)(\\.[0-9]+)?$";
-+ const char *sregexp = "^([0-9]+)(\\.[0-9]+)?([A-Za-z]+)?$";
- int ret;
- size_t len, nmatch;
-
- ret = -1;
-- nmatch = 3;
-+ nmatch = 4;
- c = f = NULL;
- *nc = *nf = 0;
-
-@@ -829,6 +829,14 @@
- errx(2, getstr(11));
- }
-
-+ if (pmatch[3].rm_eo > pmatch[3].rm_so) {
-+
-+ len = pmatch[3].rm_eo - pmatch[3].rm_so;
-+
-+ strncpy(sopts, s + pmatch[3].rm_so, len);
-+ sopts[len] = '\0';
-+ }
-+
- ret = 0;
-
- end:
-@@ -856,10 +864,12 @@
-
- if (strlen(arg1) > 1 && arg1[0] == '+') {
- int c1, f1;
-+ char sopts1[128];
-
-+ sopts1[0] = 0;
- c1 = f1 = 0;
-
-- if (parse_pos_obs(arg1 + 1, &f1, &c1) < 0)
-+ if (parse_pos_obs(arg1 + 1, &f1, &c1, sopts1) < 0)
- continue;
- else {
- f1 += 1;
-@@ -870,15 +880,17 @@
- if (strlen(arg2) > 1 &&
- arg2[0] == '-') {
- int c2, f2;
-+ char sopts2[128];
-
-+ sopts2[0] = 0;
- c2 = f2 = 0;
-
- if (parse_pos_obs(arg2 + 1,
-- &f2, &c2) >= 0) {
-+ &f2, &c2, sopts2) >= 0) {
- if (c2 > 0)
- f2 += 1;
-- sprintf(sopt, "-k%d.%d,%d.%d",
-- f1, c1, f2, c2);
-+ sprintf(sopt, "-k%d.%d%s,%d.%d%s",
-+ f1, c1, sopts1, f2, c2, sopts2);
- argv[i] = sort_strdup(sopt);
- for (int j = i + 1; j + 1 < *argc; j++)
- argv[j] = argv[j + 1];
-@@ -976,6 +988,21 @@
- set_tmpdir();
- set_sort_opts();
-
-+#if 0
-+ {
-+ static int counter = 0;
-+ char fn[128];
-+ sprintf(fn, "/var/tmp/debug.sort.%d", counter++);
-+ FILE* f = fopen(fn, "w");
-+ fprintf(f, ">>sort>>");
-+ for (int i = 0; i < argc; i++) {
-+ fprintf(f, "<%s>", argv[i]);
-+ }
-+ fprintf(f, "<<sort<<\n");
-+ fclose(f);
-+ }
-+#endif
-+
- fix_obsolete_keys(&argc, argv);
-
- while (((c = getopt_long(argc, argv, OPTIONS, long_options, NULL))