git: 7b0bca9b9117 - main - archivers/lz4json: add LICENSE
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 11 Sep 2025 10:00:53 UTC
The branch main has been updated by alven:
URL: https://cgit.FreeBSD.org/ports/commit/?id=7b0bca9b9117a3efbc88b8c079623a70f6933809
commit 7b0bca9b9117a3efbc88b8c079623a70f6933809
Author: Chris Hutchinson <portmaster@BSDforge.com>
AuthorDate: 2025-06-24 20:03:46 +0000
Commit: Älven <alven@FreeBSD.org>
CommitDate: 2025-09-11 10:00:18 +0000
archivers/lz4json: add LICENSE
* While here, pet port(lint,fmt,clippy)
PR: 287784
Approved by: <ports@virtual-estates.net> (maintainer, timeout > 2 months)
Approved by: yuri@ (Mentor)
---
archivers/lz4json/Makefile | 6 ++--
.../files/{patch-warnings => patch-lz4jsoncat.c} | 33 +++++++++++-----------
2 files changed, 20 insertions(+), 19 deletions(-)
diff --git a/archivers/lz4json/Makefile b/archivers/lz4json/Makefile
index b4da0b1fe203..95535f235f27 100644
--- a/archivers/lz4json/Makefile
+++ b/archivers/lz4json/Makefile
@@ -7,6 +7,8 @@ MAINTAINER= ports@virtual-estates.net
COMMENT= Unpack Mozilla lz4json files, such as bookmarks and session restore
WWW= https://github.com/andikleen/lz4json
+LICENSE= BSD2CLAUSE
+
LIB_DEPENDS= liblz4.so:archivers/liblz4
USES= uidfix
@@ -14,8 +16,8 @@ USES= uidfix
USE_GITHUB= yes
GH_ACCOUNT= andikleen
GH_TAGNAME= c44c5100
-PLIST_FILES= bin/lz4jsoncat share/man/man1/lz4jsoncat.1${COMPRESS_EXT}
-
MAKEFILE= ${FILESDIR}/BSDmakefile
+PLIST_FILES= bin/lz4jsoncat \
+ share/man/man1/lz4jsoncat.1${COMPRESS_EXT}
.include <bsd.port.mk>
diff --git a/archivers/lz4json/files/patch-warnings b/archivers/lz4json/files/patch-lz4jsoncat.c
similarity index 63%
rename from archivers/lz4json/files/patch-warnings
rename to archivers/lz4json/files/patch-lz4jsoncat.c
index 13c4f68607a7..df45ec27f180 100644
--- a/archivers/lz4json/files/patch-warnings
+++ b/archivers/lz4json/files/patch-lz4jsoncat.c
@@ -1,24 +1,17 @@
---- lz4jsoncat.c 2019-12-29 00:44:09.000000000 -0500
-+++ lz4jsoncat.c 2023-08-22 01:48:00.646059000 -0400
-@@ -1,3 +1,3 @@
--/*
-+/*
- * Dump mozilla style lz4json files.
- *
-@@ -30,15 +30,19 @@
+--- lz4jsoncat.c.orig 2025-06-24 19:59:38 UTC
++++ lz4jsoncat.c
+@@ -29,7 +29,9 @@
+ #include <stdlib.h>
#include <stdint.h>
#ifndef __APPLE__
+-#include <endian.h>
+# if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFlyBSD__)
+#include <sys/endian.h>
-+# else
- #include <endian.h>
-+# endif
++#endif
#else
#define htole32(x) x /* assume apple targets are little endian */
#endif
-
--#include "lz4.h"
-+#include <lz4.h>
+@@ -38,8 +40,8 @@ int main(int ac, char **av)
int main(int ac, char **av)
{
@@ -28,21 +21,27 @@
+ int fd = open(*++av, O_RDONLY);
if (fd < 0) {
perror(*av);
-@@ -56,5 +60,5 @@
+ continue;
+@@ -55,7 +57,7 @@ int main(int ac, char **av)
+ }
char *map = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, fd, 0);
- if (map == (char *)-1) {
+ if (map == MAP_FAILED) {
perror(*av);
exit(1);
-@@ -64,5 +68,5 @@
+ }
+@@ -63,7 +65,7 @@ int main(int ac, char **av)
+ fprintf(stderr, "%s: not a mozLZ4a file\n", *av);
exit(1);
}
- size_t outsz = htole32(*(uint32_t *) (map + 8));
+ ssize_t outsz = htole32(*(uint32_t *) (map + 8));
char *out = malloc(outsz);
if (!out) {
-@@ -88,5 +92,2 @@
+ fprintf(stderr, "Cannot allocate memory\n");
+@@ -87,6 +89,3 @@ int main(int ac, char **av)
+ }
return 0;
}
-