Update to lz4json-2

Drops an endian patch merged upstream and adds a basic manpage.
This commit is contained in:
jca 2019-01-17 10:19:36 +00:00
parent 88c0b276c6
commit 7b2783617f
4 changed files with 7 additions and 29 deletions

View File

@ -1,11 +1,10 @@
# $OpenBSD: Makefile,v 1.1.1.1 2016/04/04 11:26:22 jca Exp $
# $OpenBSD: Makefile,v 1.2 2019/01/17 10:19:36 jca Exp $
COMMENT = decompressor for mozilla lz4json format
DISTNAME = lz4json-0.0.20141228
GH_ACCOUNT = andikleen
GH_PROJECT = lz4json
GH_COMMIT = e3e6365ded1b5dcfe1ce69ce2c764dd010526c81
GH_TAGNAME = v2
CATEGORIES = archivers
@ -24,5 +23,6 @@ ALL_TARGET =
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/lz4jsoncat ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/lz4jsoncat.1 ${PREFIX}/man/man1
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (lz4json-0.0.20141228-e3e6365d.tar.gz) = LpW7FL9SzYGITboEvIRBNhdlhpQd0/5nkZI4WfPlyDs=
SIZE (lz4json-0.0.20141228-e3e6365d.tar.gz) = 1594
SHA256 (lz4json-2.tar.gz) = 9Z5SKhn4RqVb54e0zRlOo1iV71jbnsMV2hBYWrq5myA=
SIZE (lz4json-2.tar.gz) = 1798

View File

@ -1,23 +0,0 @@
$OpenBSD: patch-lz4jsoncat_c,v 1.1.1.1 2016/04/04 11:26:22 jca Exp $
Fix little endian assumption.
--- lz4jsoncat.c.orig Fri Apr 1 15:32:34 2016
+++ lz4jsoncat.c Fri Apr 1 19:00:45 2016
@@ -27,6 +27,7 @@
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
+#include <endian.h>
#include "lz4.h"
@@ -61,7 +62,7 @@ int main(int ac, char **av)
fprintf(stderr, "%s: not a mozLZ4a file\n", *av);
exit(1);
}
- size_t outsz = *(uint32_t *) (map + 8);
+ size_t outsz = le32toh(*(uint32_t *) (map + 8));
char *out = malloc(outsz);
if (!out) {
fprintf(stderr, "Cannot allocate memory\n");

View File

@ -1,2 +1,3 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2016/04/04 11:26:22 jca Exp $
@comment $OpenBSD: PLIST,v 1.2 2019/01/17 10:19:36 jca Exp $
@bin bin/lz4jsoncat
@man man/man1/lz4jsoncat.1