summaryrefslogtreecommitdiff
path: root/textproc/discount
diff options
context:
space:
mode:
authorschmonz <schmonz@pkgsrc.org>2018-03-17 20:54:06 +0000
committerschmonz <schmonz@pkgsrc.org>2018-03-17 20:54:06 +0000
commit42d01d6feea354bf4d19a057b6b3dc0ca40ecfbe (patch)
treef0a81a7100b27e263b39e84a29b2287f73c745d3 /textproc/discount
parent920d96f8aaa7031d968f41f29dae1dede3274b98 (diff)
downloadpkgsrc-42d01d6feea354bf4d19a057b6b3dc0ca40ecfbe.tar.gz
Cast tolower/isspace/isalpha args to unsigned char to fix self-tests on
NetBSD. Bump PKGREVISION.
Diffstat (limited to 'textproc/discount')
-rw-r--r--textproc/discount/Makefile4
-rw-r--r--textproc/discount/distinfo3
-rw-r--r--textproc/discount/patches/patch-generate.c33
3 files changed, 37 insertions, 3 deletions
diff --git a/textproc/discount/Makefile b/textproc/discount/Makefile
index 3af4b77f5fd..0b872871e93 100644
--- a/textproc/discount/Makefile
+++ b/textproc/discount/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.5 2018/03/16 03:45:18 schmonz Exp $
+# $NetBSD: Makefile,v 1.6 2018/03/17 20:54:06 schmonz Exp $
#
DISTNAME= discount-2.2.3a
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= textproc
MASTER_SITES= ${HOMEPAGE}
EXTRACT_SUFX= .tar.bz2
diff --git a/textproc/discount/distinfo b/textproc/discount/distinfo
index 97e16c5ba05..e1d88849fa6 100644
--- a/textproc/discount/distinfo
+++ b/textproc/discount/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2018/03/16 03:45:18 schmonz Exp $
+$NetBSD: distinfo,v 1.6 2018/03/17 20:54:06 schmonz Exp $
SHA1 (discount-2.2.3a.tar.bz2) = 9ff2985b89e7bc7ca6a18f82aade2b25db2c97f8
RMD160 (discount-2.2.3a.tar.bz2) = 66a13d6848251ab8a73a59ba4ec95befe9bbdc2d
@@ -6,3 +6,4 @@ SHA512 (discount-2.2.3a.tar.bz2) = cf995a46879f269f3e02f7d480303d229676bb36f71fe
Size (discount-2.2.3a.tar.bz2) = 98325 bytes
SHA1 (patch-Makefile.in) = ee288e3b03368dbc4a0f4c472bfbbdf2283b9967
SHA1 (patch-configure.inc) = 19e31e0b845e6c3f3822b556223d7a3cc3e2c028
+SHA1 (patch-generate.c) = b584de3a654c3bc3f2a2b1204926164c6ed67035
diff --git a/textproc/discount/patches/patch-generate.c b/textproc/discount/patches/patch-generate.c
new file mode 100644
index 00000000000..35436cff637
--- /dev/null
+++ b/textproc/discount/patches/patch-generate.c
@@ -0,0 +1,33 @@
+$NetBSD: patch-generate.c,v 1.1 2018/03/17 20:54:06 schmonz Exp $
+
+Fix self-tests on NetBSD.
+
+--- generate.c.orig 2018-03-02 22:52:05.000000000 +0000
++++ generate.c
+@@ -1151,7 +1151,7 @@ islike(MMIOT *f, char *s)
+ }
+
+ for (i=1; i < len; i++)
+- if (tolower(peek(f,i)) != s[i])
++ if (tolower((unsigned char)peek(f,i)) != s[i])
+ return 0;
+ return 1;
+ }
+@@ -1269,7 +1269,7 @@ tickhandler(MMIOT *f, int tickchar, int
+ int endticks, size;
+ int tick = nrticks(0, tickchar, f);
+
+- if ( !allow_space && isspace(peek(f,tick)) )
++ if ( !allow_space && isspace((unsigned char)peek(f,tick)) )
+ return 0;
+
+ if ( (tick >= minticks) && (size = matchticks(f,tickchar,tick,&endticks)) ) {
+@@ -1297,7 +1297,7 @@ text(MMIOT *f)
+ int smartyflags = 0;
+
+ while (1) {
+- if ( (f->flags & MKD_AUTOLINK) && isalpha(peek(f,1)) && !tag_text(f) )
++ if ( (f->flags & MKD_AUTOLINK) && isalpha((unsigned char)peek(f,1)) && !tag_text(f) )
+ maybe_autolink(f);
+
+ c = pull(f);