git: 4e2f5177e278 - main - devel/jsonnet: Update to 0.17.0
Li-Wen Hsu
lwhsu at FreeBSD.org
Sun Jun 20 17:46:21 UTC 2021
The branch main has been updated by lwhsu:
URL: https://cgit.FreeBSD.org/ports/commit/?id=4e2f5177e278716902cfcc8ef5896661243f82fd
commit 4e2f5177e278716902cfcc8ef5896661243f82fd
Author: Pavel Timofeev <timp87 at gmail.com>
AuthorDate: 2021-06-20 17:43:19 +0000
Commit: Li-Wen Hsu <lwhsu at FreeBSD.org>
CommitDate: 2021-06-20 17:43:19 +0000
devel/jsonnet: Update to 0.17.0
- Use cmake to build
- Add c++ lib and header, and static libs
- Use DISTVERSION instead of PORTVERSION as advised by porter's handbook
- Remove USE_CXXSTD and CXXFLAGS which seem unnecessary
PR: 256704
Approved by: Gasol Wu <gasol.wu at gmail.com> (maintainer)
---
devel/jsonnet/Makefile | 19 +++++++------------
devel/jsonnet/distinfo | 6 +++---
devel/jsonnet/files/patch-core_vm.cpp | 11 +++++++++++
devel/jsonnet/pkg-plist | 13 +++++++++++++
4 files changed, 34 insertions(+), 15 deletions(-)
diff --git a/devel/jsonnet/Makefile b/devel/jsonnet/Makefile
index 3af7d1ac84b1..f143c2c69420 100644
--- a/devel/jsonnet/Makefile
+++ b/devel/jsonnet/Makefile
@@ -1,9 +1,8 @@
# Created by: Gasol Wu <gasol.wu at gmail.com>
PORTNAME= jsonnet
-PORTVERSION= 0.15.0
DISTVERSIONPREFIX= v
-PORTREVISION= 1
+DISTVERSION= 0.17.0
CATEGORIES= devel
MAINTAINER= gasol.wu at gmail.com
@@ -12,22 +11,18 @@ COMMENT= JSON data templating language
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
-USES= compiler:c++11-lib gmake
-USE_CXXSTD= c++11
+BUILD_DEPENDS= nlohmann-json>=3.6.1:devel/nlohmann-json
+
+USES= compiler:c++11-lib cmake
USE_GITHUB= yes
GH_ACCOUNT= google
USE_LDCONFIG= yes
-ALL_TARGET= jsonnet jsonnetfmt libjsonnet.so
-CXXFLAGS+= -fPIC -Iinclude -Ithird_party/md5
-PLIST_FILES= bin/jsonnet bin/jsonnetfmt include/libjsonnet.h lib/libjsonnet.so
+CMAKE_ON= BUILD_JSONNET BUILD_JSONNETFMT BUILD_STATIC_LIBS BUILD_SHARED_BINARIES USE_SYSTEM_JSON
+CMAKE_OFF= BUILD_TESTS
-do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
- ${INSTALL_PROGRAM} ${WRKSRC}/jsonnetfmt ${STAGEDIR}${PREFIX}/bin
- ${INSTALL_DATA} ${WRKSRC}/include/lib${PORTNAME}.h ${STAGEDIR}${PREFIX}/include
- ${INSTALL_LIB} ${WRKSRC}/lib${PORTNAME}.so ${STAGEDIR}${PREFIX}/lib
+PLIST_SUB= PORTVERSION=${PORTVERSION}
.include <bsd.port.mk>
diff --git a/devel/jsonnet/distinfo b/devel/jsonnet/distinfo
index 3df61d3c5b59..b5c561aee0db 100644
--- a/devel/jsonnet/distinfo
+++ b/devel/jsonnet/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1485954838
-SHA256 (google-jsonnet-v0.15.0_GH0.tar.gz) = 0b58f2a36a5625c717e717a7e85608730e7bb5bfd8be1765dd6fa23be1f9b9e8
-SIZE (google-jsonnet-v0.15.0_GH0.tar.gz) = 21826038
+TIMESTAMP = 1623453189
+SHA256 (google-jsonnet-v0.17.0_GH0.tar.gz) = 076b52edf888c01097010ad4299e3b2e7a72b60a41abbc65af364af1ed3c8dbe
+SIZE (google-jsonnet-v0.17.0_GH0.tar.gz) = 21854054
diff --git a/devel/jsonnet/files/patch-core_vm.cpp b/devel/jsonnet/files/patch-core_vm.cpp
new file mode 100644
index 000000000000..ad918c4d2b69
--- /dev/null
+++ b/devel/jsonnet/files/patch-core_vm.cpp
@@ -0,0 +1,11 @@
+--- core/vm.cpp.orig 2021-06-20 03:31:11 UTC
++++ core/vm.cpp
+@@ -23,7 +23,7 @@ limitations under the License.
+
+ #include "desugarer.h"
+ #include "json.h"
+-#include "json.hpp"
++#include "nlohmann/json.hpp"
+ #include "md5.h"
+ #include "parser.h"
+ #include "state.h"
diff --git a/devel/jsonnet/pkg-plist b/devel/jsonnet/pkg-plist
new file mode 100644
index 000000000000..d34abb2527cb
--- /dev/null
+++ b/devel/jsonnet/pkg-plist
@@ -0,0 +1,13 @@
+bin/jsonnet
+bin/jsonnetfmt
+include/libjsonnet++.h
+include/libjsonnet.h
+include/libjsonnet_fmt.h
+lib/libjsonnet++.a
+lib/libjsonnet++.so
+lib/libjsonnet++.so.0
+lib/libjsonnet++.so.%%PORTVERSION%%
+lib/libjsonnet.a
+lib/libjsonnet.so
+lib/libjsonnet.so.0
+lib/libjsonnet.so.%%PORTVERSION%%
More information about the dev-commits-ports-all
mailing list