pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/textproc/jo
Module Name: pkgsrc
Committed By: fhajny
Date: Wed Jan 4 12:44:59 UTC 2017
Modified Files:
pkgsrc/textproc/jo: Makefile distinfo
Added Files:
pkgsrc/textproc/jo/patches: patch-json.c
Log Message:
Fix build on SunOS platforms.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 pkgsrc/textproc/jo/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/textproc/jo/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/textproc/jo/patches/patch-json.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/textproc/jo/Makefile
diff -u pkgsrc/textproc/jo/Makefile:1.3 pkgsrc/textproc/jo/Makefile:1.4
--- pkgsrc/textproc/jo/Makefile:1.3 Sun Sep 11 15:59:29 2016
+++ pkgsrc/textproc/jo/Makefile Wed Jan 4 12:44:59 2017
@@ -1,15 +1,18 @@
-# $NetBSD: Makefile,v 1.3 2016/09/11 15:59:29 kamil Exp $
+# $NetBSD: Makefile,v 1.4 2017/01/04 12:44:59 fhajny Exp $
DISTNAME= jo-1.0
CATEGORIES= textproc
MASTER_SITES= ${MASTER_SITE_GITHUB:=jpmens/}
-GITHUB_RELEASE= ${DISTNAME}
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
HOMEPAGE= https://github.com/jpmens/jo
COMMENT= JSON output from a shell
LICENSE= gnu-gpl-v2
+GITHUB_RELEASE= ${DISTNAME}
+
GNU_CONFIGURE= yes
+USE_LANGUAGES= c c99
+
.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/textproc/jo/distinfo
diff -u pkgsrc/textproc/jo/distinfo:1.1 pkgsrc/textproc/jo/distinfo:1.2
--- pkgsrc/textproc/jo/distinfo:1.1 Tue Jul 26 17:29:22 2016
+++ pkgsrc/textproc/jo/distinfo Wed Jan 4 12:44:59 2017
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.1 2016/07/26 17:29:22 kamil Exp $
+$NetBSD: distinfo,v 1.2 2017/01/04 12:44:59 fhajny Exp $
SHA1 (jo-1.0.tar.gz) = 2d06cf35b1dc71e5fdbe420ac4057cf508313e08
RMD160 (jo-1.0.tar.gz) = bff13c4e4689eb85a581e7383dc38d5cbd0052b5
SHA512 (jo-1.0.tar.gz) = bab15de7a01e9a70f43b50d0bb5eff4724bf9d38b0b56a6fff5768756073a5956e3a5a08c7a4e4a2c88107950a4c1721a09b60868b10a441c1a4c6fec7748036
Size (jo-1.0.tar.gz) = 112488 bytes
+SHA1 (patch-json.c) = 7ac3e1013c28c5b7b51c547e5417fdbfb13cd155
Added files:
Index: pkgsrc/textproc/jo/patches/patch-json.c
diff -u /dev/null pkgsrc/textproc/jo/patches/patch-json.c:1.1
--- /dev/null Wed Jan 4 12:44:59 2017
+++ pkgsrc/textproc/jo/patches/patch-json.c Wed Jan 4 12:44:59 2017
@@ -0,0 +1,100 @@
+$NetBSD: patch-json.c,v 1.1 2017/01/04 12:44:59 fhajny Exp $
+
+Backport a namespace conflict fix from trunk.
+
+https://github.com/jpmens/jo/commit/2bedfd486f8f4a79b1865e370e6c858eb04257f5
+
+--- json.c.orig 2016-03-10 10:49:34.000000000 +0000
++++ json.c
+@@ -131,7 +131,7 @@ static void sb_free(SB *sb)
+ * Type for Unicode codepoints.
+ * We need our own because wchar_t might be 16 bits.
+ */
+-typedef uint32_t uchar_t;
++typedef uint32_t js_uchar_t;
+
+ /*
+ * Validate a single UTF-8 character starting at @s.
+@@ -228,7 +228,7 @@ static bool utf8_validate(const char *s)
+ * This function assumes input is valid UTF-8,
+ * and that there are enough characters in front of @s.
+ */
+-static int utf8_read_char(const char *s, uchar_t *out)
++static int utf8_read_char(const char *s, js_uchar_t *out)
+ {
+ const unsigned char *c = (const unsigned char*) s;
+
+@@ -240,21 +240,21 @@ static int utf8_read_char(const char *s,
+ return 1;
+ } else if (c[0] <= 0xDF) {
+ /* C2..DF (unless input is invalid) */
+- *out = ((uchar_t)c[0] & 0x1F) << 6 |
+- ((uchar_t)c[1] & 0x3F);
++ *out = ((js_uchar_t)c[0] & 0x1F) << 6 |
++ ((js_uchar_t)c[1] & 0x3F);
+ return 2;
+ } else if (c[0] <= 0xEF) {
+ /* E0..EF */
+- *out = ((uchar_t)c[0] & 0xF) << 12 |
+- ((uchar_t)c[1] & 0x3F) << 6 |
+- ((uchar_t)c[2] & 0x3F);
++ *out = ((js_uchar_t)c[0] & 0xF) << 12 |
++ ((js_uchar_t)c[1] & 0x3F) << 6 |
++ ((js_uchar_t)c[2] & 0x3F);
+ return 3;
+ } else {
+ /* F0..F4 (unless input is invalid) */
+- *out = ((uchar_t)c[0] & 0x7) << 18 |
+- ((uchar_t)c[1] & 0x3F) << 12 |
+- ((uchar_t)c[2] & 0x3F) << 6 |
+- ((uchar_t)c[3] & 0x3F);
++ *out = ((js_uchar_t)c[0] & 0x7) << 18 |
++ ((js_uchar_t)c[1] & 0x3F) << 12 |
++ ((js_uchar_t)c[2] & 0x3F) << 6 |
++ ((js_uchar_t)c[3] & 0x3F);
+ return 4;
+ }
+ }
+@@ -267,7 +267,7 @@ static int utf8_read_char(const char *s,
+ *
+ * This function will write up to 4 bytes to @out.
+ */
+-static int utf8_write_char(uchar_t unicode, char *out)
++static int utf8_write_char(js_uchar_t unicode, char *out)
+ {
+ unsigned char *o = (unsigned char*) out;
+
+@@ -304,10 +304,10 @@ static int utf8_write_char(uchar_t unico
+ * @uc should be 0xD800..0xDBFF, and @lc should be 0xDC00..0xDFFF.
+ * If they aren't, this function returns false.
+ */
+-static bool from_surrogate_pair(uint16_t uc, uint16_t lc, uchar_t *unicode)
++static bool from_surrogate_pair(uint16_t uc, uint16_t lc, js_uchar_t *unicode)
+ {
+ if (uc >= 0xD800 && uc <= 0xDBFF && lc >= 0xDC00 && lc <= 0xDFFF) {
+- *unicode = 0x10000 + ((((uchar_t)uc & 0x3FF) << 10) | (lc & 0x3FF));
++ *unicode = 0x10000 + ((((js_uchar_t)uc & 0x3FF) << 10) | (lc & 0x3FF));
+ return true;
+ } else {
+ return false;
+@@ -319,9 +319,9 @@ static bool from_surrogate_pair(uint16_t
+ *
+ * @unicode must be U+10000..U+10FFFF.
+ */
+-static void to_surrogate_pair(uchar_t unicode, uint16_t *uc, uint16_t *lc)
++static void to_surrogate_pair(js_uchar_t unicode, uint16_t *uc, uint16_t *lc)
+ {
+- uchar_t n;
++ js_uchar_t n;
+
+ assert(unicode >= 0x10000 && unicode <= 0x10FFFF);
+
+@@ -844,7 +844,7 @@ bool parse_string(const char **sp, char
+ case 'u':
+ {
+ uint16_t uc, lc;
+- uchar_t unicode;
++ js_uchar_t unicode;
+
+ if (!parse_hex16(&s, &uc))
+ goto failed;
Home |
Main Index |
Thread Index |
Old Index