pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/mustach devel/mustach: Update to 1.1
details: https://anonhg.NetBSD.org/pkgsrc/rev/9fc3d0d246dc
branches: trunk
changeset: 456686:9fc3d0d246dc
user: sjmulder <sjmulder%pkgsrc.org@localhost>
date: Fri Aug 06 00:49:20 2021 +0000
description:
devel/mustach: Update to 1.1
Packaging changes:
- Added a bl3 file.
Upstream does not provide a changelog, but here's an incomplete and
possibly inaccurate reconstruction from source history:
1.1
---
New:
- API refactored to take lengths to ease working with partial or
non-NULL-terminated strings. (ABI break)
Fixes:
- Use correct int type for jansson (json_int_t instead of int64_t).
- JSON output of different backends is now the same.
1.0 (retacted)
--------------
Legal:
- License changed to ISC.
Fixes:
- Possible data leak in memfile_open() by clearing buffers.
- Fix build on Solaris-likes by including alloca.h.
- Fix Windows build by including malloc.h, using size_t instead of
ssize_t, and using the standard tenary operator syntax.
- Fix JSON in test3 by using double quote characters.
- Fix installation in alternative directories such as
/opt/pkg/lib on macOS by setting install_name.
- Normalise return values in compare() implementations.
New:
- Support for cJSON and jansson libraries.
- Version info now embedded at build time and shown with mustach(1)
usage.
- Versioned so-names (e.g. libxlsx.so.1.0).
- BINDIR, LIBDIR and INCLUDEDIR variables in Makefile.
- New mustach-wrap.{c,h} to ease implementation new libraries,
extracted and refactored from the existing implementations.
- Makefile now supports 3 modes: single libmustach (default), split
libmustache-core etc, and both.
- Any or all backends (json-c, jansson, etc) can be enabled at compile
time. By default, all available libraries are used.
- mustach(1) can use any JSON backend instead of only json-c.
- MUSTACH_COMPATIBLE_0_99 can be defined for backwards source
compatibility.
- 'No extensions' can now be set Mustach_With_NoExtensions instead of
passing 0.
- pkgconfig (.pc) file for library.
- Manual page for mustach(1).
Changed:
- Many renames.
- Maximum tag length increased from 1024 to 4096.
- Other headers include json-c.h instead of using forward declarations.
- mustach(1) reads from /dev/stdin instead of fd 0.
- Several structures are now taken as const.
- New/changed Makefile targets.
diffstat:
devel/mustach/Makefile | 20 ++++++++------------
devel/mustach/PLIST | 8 +++++++-
devel/mustach/buildlink3.mk | 15 +++++++++++++++
devel/mustach/distinfo | 12 +++++-------
devel/mustach/patches/patch-mustach-json-c.c | 16 ----------------
devel/mustach/patches/patch-mustach.c | 16 ----------------
6 files changed, 35 insertions(+), 52 deletions(-)
diffs (132 lines):
diff -r 985f53bd311d -r 9fc3d0d246dc devel/mustach/Makefile
--- a/devel/mustach/Makefile Fri Aug 06 00:06:16 2021 +0000
+++ b/devel/mustach/Makefile Fri Aug 06 00:49:20 2021 +0000
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.4 2020/05/19 12:09:07 nia Exp $
+# $NetBSD: Makefile,v 1.5 2021/08/06 00:49:20 sjmulder Exp $
-DISTNAME= mustach-0.99
-PKGREVISION= 2
+DISTNAME= mustach-1.1.0
CATEGORIES= devel
MASTER_SITES= https://gitlab.com/jobol/mustach/-/archive/${PKGVERSION_NOREV}/
@@ -10,20 +9,17 @@
COMMENT= C implementation of mustache templating
LICENSE= apache-2.0
+USE_TOOLS+= gmake gsed
+
.include "../../mk/bsd.prefs.mk"
# Workaround is portable, might as well use it everywhere.
CFLAGS+= -DNO_OPEN_MEMSTREAM
-# install_name must be set on macOS. Upstream PR:
-# https://gitlab.com/jobol/mustach/merge_requests/16
-.if ${OPSYS} == "Darwin"
-.PHONY: fix-darwin-install-name
-post-install: fix-darwin-install-name
-fix-darwin-install-name:
- install_name_tool -id ${PREFIX}/lib/libmustach.so \
- ${DESTDIR}${PREFIX}/lib/libmustach.so
-.endif
+MAKE_ENV+= MANDIR=${PREFIX}/${PKGMANDIR}
+MAKE_ENV+= libs=single
+# mustach supports cjson too, add it here once in pkgsrc
+.include "../../textproc/jansson/buildlink3.mk"
.include "../../textproc/json-c/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff -r 985f53bd311d -r 9fc3d0d246dc devel/mustach/PLIST
--- a/devel/mustach/PLIST Fri Aug 06 00:06:16 2021 +0000
+++ b/devel/mustach/PLIST Fri Aug 06 00:49:20 2021 +0000
@@ -1,5 +1,11 @@
-@comment $NetBSD: PLIST,v 1.1 2019/09/19 11:46:30 sjmulder Exp $
+@comment $NetBSD: PLIST,v 1.2 2021/08/06 00:49:20 sjmulder Exp $
bin/mustach
+include/mustach/mustach-jansson.h
include/mustach/mustach-json-c.h
+include/mustach/mustach-wrap.h
include/mustach/mustach.h
lib/libmustach.so
+lib/libmustach.so.1
+lib/libmustach.so.1.1
+lib/pkgconfig/libmustach.pc
+man/man1/mustach.1
diff -r 985f53bd311d -r 9fc3d0d246dc devel/mustach/buildlink3.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/mustach/buildlink3.mk Fri Aug 06 00:49:20 2021 +0000
@@ -0,0 +1,15 @@
+# $NetBSD: buildlink3.mk,v 1.1 2021/08/06 00:49:20 sjmulder Exp $
+
+BUILDLINK_TREE+= mustach
+
+.if !defined(MUSTACH_BUILDLINK3_MK)
+MUSTACH_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.mustach+= mustach>=1.1.0
+BUILDLINK_PKGSRCDIR.mustach?= ../../devel/mustach
+
+.include "../../textproc/jansson/buildlink3.mk"
+.include "../../textproc/json-c/buildlink3.mk"
+.endif
+
+BUILDLINK_TREE+= -mustach
diff -r 985f53bd311d -r 9fc3d0d246dc devel/mustach/distinfo
--- a/devel/mustach/distinfo Fri Aug 06 00:06:16 2021 +0000
+++ b/devel/mustach/distinfo Fri Aug 06 00:49:20 2021 +0000
@@ -1,8 +1,6 @@
-$NetBSD: distinfo,v 1.2 2019/12/26 12:32:16 sjmulder Exp $
+$NetBSD: distinfo,v 1.3 2021/08/06 00:49:20 sjmulder Exp $
-SHA1 (mustach-0.99.tar.gz) = 6b0fbd5064f7f7cc2913c9fdf5bfc30a67bec186
-RMD160 (mustach-0.99.tar.gz) = 0a0559d6758fbd8a5fefb30739c837f7e6e72d43
-SHA512 (mustach-0.99.tar.gz) = 432cb6c72487bfba4103c0925271bdc7c3e7f38ed19bfec09d7ef9f9af16ecac3885ff037e94ca5d3023ffd3d5c526fcb102218d4c3ad13563406cab10e7a4b2
-Size (mustach-0.99.tar.gz) = 22100 bytes
-SHA1 (patch-mustach-json-c.c) = 4baf8f2f573bd32b096b58c0b2d4e7fbab61b2d3
-SHA1 (patch-mustach.c) = 798fb878bfca7c1a7d39dee3fee30306cdfd743d
+SHA1 (mustach-1.1.0.tar.gz) = 5c921d7aad5ecafd050a97774b019ba84928afd6
+RMD160 (mustach-1.1.0.tar.gz) = e8833dfe7daabe4795cc38091d36ac1602d9ceef
+SHA512 (mustach-1.1.0.tar.gz) = 4ca164bf40fd64c2127878f5f4a43066c299c7522e2099677206e60001db71c3eaac7c3bc33fff7ceb33bd1abf74f21c3367665b7791e05c77da16233d0cb00d
+Size (mustach-1.1.0.tar.gz) = 27343 bytes
diff -r 985f53bd311d -r 9fc3d0d246dc devel/mustach/patches/patch-mustach-json-c.c
--- a/devel/mustach/patches/patch-mustach-json-c.c Fri Aug 06 00:06:16 2021 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-$NetBSD: patch-mustach-json-c.c,v 1.1 2019/12/25 17:34:32 sjmulder Exp $
-
-Include alloca.h on Solaris-likes to fix the build.
-
---- mustach-json-c.c.orig 2019-09-19 08:20:36.000000000 +0000
-+++ mustach-json-c.c
-@@ -21,6 +21,9 @@
-
- #include <stdio.h>
- #include <string.h>
-+#ifdef __sun
-+# include <alloca.h>
-+#endif
-
- #include <json-c/json.h>
-
diff -r 985f53bd311d -r 9fc3d0d246dc devel/mustach/patches/patch-mustach.c
--- a/devel/mustach/patches/patch-mustach.c Fri Aug 06 00:06:16 2021 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-$NetBSD: patch-mustach.c,v 1.1 2019/12/25 17:34:32 sjmulder Exp $
-
-Include alloca.h on Solaris-likes to fix the build.
-
---- mustach.c.orig 2019-09-19 08:20:36.000000000 +0000
-+++ mustach.c
-@@ -24,6 +24,9 @@
- #include <string.h>
- #include <errno.h>
- #include <ctype.h>
-+#ifdef __sun
-+# include <alloca.h>
-+#endif
-
- #include "mustach.h"
-
Home |
Main Index |
Thread Index |
Old Index