pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/jsonnet Add devel/jsonnet version 0.9.4 to the N...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/aa191d77d03a
branches:  trunk
changeset: 369811:aa191d77d03a
user:      seb <seb%pkgsrc.org@localhost>
date:      Thu Oct 05 19:40:35 2017 +0000

description:
Add devel/jsonnet version 0.9.4 to the NetBSD packages collection

diffstat:

 devel/jsonnet/DESCR                  |   4 +
 devel/jsonnet/Makefile               |  42 ++++++++++++++++++++
 devel/jsonnet/PLIST                  |   6 ++
 devel/jsonnet/buildlink3.mk          |  12 +++++
 devel/jsonnet/distinfo               |   7 +++
 devel/jsonnet/patches/patch-Makefile |  75 ++++++++++++++++++++++++++++++++++++
 6 files changed, 146 insertions(+), 0 deletions(-)

diffs (170 lines):

diff -r e7a189c29a53 -r aa191d77d03a devel/jsonnet/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/jsonnet/DESCR       Thu Oct 05 19:40:35 2017 +0000
@@ -0,0 +1,4 @@
+Jsonnet is a domain specific configuration language that helps you
+define JSON data. Jsonnet lets you compute fragments of JSON within
+the structure, bringing the same benefit to structured data that
+templating languages bring to plain text.
diff -r e7a189c29a53 -r aa191d77d03a devel/jsonnet/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/jsonnet/Makefile    Thu Oct 05 19:40:35 2017 +0000
@@ -0,0 +1,42 @@
+# $NetBSD: Makefile,v 1.1 2017/10/05 19:40:35 seb Exp $
+
+DISTNAME=      v0.9.4
+PKGNAME=       ${GITHUB_PROJECT}-${DISTNAME:S/v//}
+#PKGREVISION=  1
+CATEGORIES=    devel local
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=google/}
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      http://jsonnet.org/
+COMMENT=       Domain specific configuration language
+LICENSE=       apache-2.0
+
+EXTRACT_USING= gtar
+
+GITHUB_PROJECT=        jsonnet
+DIST_SUBDIR=   ${GITHUB_PROJECT}
+
+USE_LANGUAGES= c c++11
+
+USE_TOOLS+=    gmake bash
+REPLACE_BASH+= examples/check.sh examples/terraform/check.sh
+REPLACE_BASH+= test_suite/run_tests.sh test_suite/run_fmt_tests.sh
+
+WRKSRC=                ${WRKDIR}/${PKGNAME_NOREV}
+
+TEST_TARGET=   test
+
+INSTALLATION_DIRS=     lib include bin
+
+# nothing to configure but REPLACE_BASH to apply
+do-configure:
+       @${DO_NADA}
+
+do-install:
+       ${INSTALL_LIB} ${WRKSRC}/libjsonnet.so ${DESTDIR}${PREFIX}/lib
+       ${INSTALL_LIB} ${WRKSRC}/libjsonnet++.so ${DESTDIR}${PREFIX}/lib
+       ${INSTALL_DATA} ${WRKSRC}/include/libjsonnet.h ${DESTDIR}${PREFIX}/include
+       ${INSTALL_DATA} ${WRKSRC}/include/libjsonnet++.h ${DESTDIR}${PREFIX}/include
+       ${INSTALL_PROGRAM} ${WRKSRC}/jsonnet ${DESTDIR}${PREFIX}/bin
+
+.include "../../mk/bsd.pkg.mk"
diff -r e7a189c29a53 -r aa191d77d03a devel/jsonnet/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/jsonnet/PLIST       Thu Oct 05 19:40:35 2017 +0000
@@ -0,0 +1,6 @@
+@comment $NetBSD: PLIST,v 1.1 2017/10/05 19:40:35 seb Exp $
+bin/jsonnet
+include/libjsonnet++.h
+include/libjsonnet.h
+lib/libjsonnet++.so
+lib/libjsonnet.so
diff -r e7a189c29a53 -r aa191d77d03a devel/jsonnet/buildlink3.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/jsonnet/buildlink3.mk       Thu Oct 05 19:40:35 2017 +0000
@@ -0,0 +1,12 @@
+# $NetBSD: buildlink3.mk,v 1.1 2017/10/05 19:40:35 seb Exp $
+
+BUILDLINK_TREE+=       jsonnet
+
+.if !defined(JSONNET_BUILDLINK3_MK)
+JSONNET_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.jsonnet+=        jsonnet>=0.9.4
+BUILDLINK_PKGSRCDIR.jsonnet?=  ../../devel/jsonnet
+.endif # JSONNET_BUILDLINK3_MK
+
+BUILDLINK_TREE+=       -jsonnet
diff -r e7a189c29a53 -r aa191d77d03a devel/jsonnet/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/jsonnet/distinfo    Thu Oct 05 19:40:35 2017 +0000
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2017/10/05 19:40:35 seb Exp $
+
+SHA1 (jsonnet/v0.9.4.tar.gz) = 61a07521ec245a288f2fa24ba63f54b4de128b81
+RMD160 (jsonnet/v0.9.4.tar.gz) = 1f6125e1e361d3bdfd6e73bf0a1359159202b9f6
+SHA512 (jsonnet/v0.9.4.tar.gz) = 0a2945aa5b9fa5411b8d049a94e253399607b92b4a0439307cb4f5ba2cc22a8def4f12dd8c1fec3df30ed4e112682b056a805a673fab84bc083a74b7c71b59a4
+Size (jsonnet/v0.9.4.tar.gz) = 556697 bytes
+SHA1 (patch-Makefile) = c0072b993fc238ea72f287f5f5b64be9c9aee8e6
diff -r e7a189c29a53 -r aa191d77d03a devel/jsonnet/patches/patch-Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/jsonnet/patches/patch-Makefile      Thu Oct 05 19:40:35 2017 +0000
@@ -0,0 +1,75 @@
+$NetBSD: patch-Makefile,v 1.1 2017/10/05 19:40:35 seb Exp $
+
+- leverage pkgsrc CPPFLAGS, CFLAGS and CXXFLAGS handling
+- take care of 'od -t u1' output variations
+- do not build the JavaScript implementation
+
+--- Makefile.orig      2017-06-21 02:59:07.000000000 +0000
++++ Makefile
+@@ -29,8 +29,9 @@ OD ?= od
+ 
+ OPT ?= -O3
+ 
+-CXXFLAGS ?= -g $(OPT) -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++0x -fPIC -Iinclude -Ithird_party/md5
+-CFLAGS ?= -g $(OPT) -Wall -Wextra -pedantic -std=c99 -fPIC -Iinclude
++CPPFLAGS += -Iinclude -Ithird_party/md5
++CXXFLAGS += $(OPT) -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++0x -fPIC
++CFLAGS += $(OPT) -Wall -Wextra -pedantic -std=c99 -fPIC
+ MAKEDEPENDFLAGS ?= -Iinclude -Ithird_party/md5
+ EMCXXFLAGS = $(CXXFLAGS) --memory-init-file 0 -s DISABLE_EXCEPTION_CATCHING=0
+ EMCFLAGS = $(CFLAGS) --memory-init-file 0 -s DISABLE_EXCEPTION_CATCHING=0
+@@ -67,8 +68,6 @@ ALL = \
+       libjsonnet++.so \
+       libjsonnet_test_snippet \
+       libjsonnet_test_file \
+-      libjsonnet.js \
+-      doc/js/libjsonnet.js \
+       $(LIB_OBJ)
+ 
+ ALL_HEADERS = \
+@@ -108,17 +107,17 @@ MAKEDEPEND_SRCS = \
+ 
+ depend:
+       rm -f Makefile.depend
+-      for FILE in $(LIB_SRC) $(MAKEDEPEND_SRCS) ; do $(CXX) -MM $(CXXFLAGS) $$FILE -MT $$(dirname $$FILE)/$$(basename $$FILE .cpp).o >> Makefile.depend ; done
++      for FILE in $(LIB_SRC) $(MAKEDEPEND_SRCS) ; do $(CXX) -MM $(CPPFLAGS) $(CXXFLAGS) $$FILE -MT $$(dirname $$FILE)/$$(basename $$FILE .cpp).o >> Makefile.depend ; done
+ 
+ core/desugarer.cpp: core/std.jsonnet.h
+ 
+ # Object files
+ %.o: %.cpp
+-      $(CXX) -c $(CXXFLAGS) $< -o $@
++      $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@
+ 
+ # Commandline executable.
+ jsonnet: cmd/jsonnet.cpp $(LIB_OBJ)
+-      $(CXX) $(CXXFLAGS) $(LDFLAGS) $< $(LIB_SRC:.cpp=.o) -o $@
++      $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $< $(LIB_SRC:.cpp=.o) -o $@
+ 
+ # C binding.
+ libjsonnet.so: $(LIB_OBJ)
+@@ -144,7 +143,7 @@ LIBJSONNET_TEST_SNIPPET_SRCS = \
+       include/libjsonnet.h
+ 
+ libjsonnet_test_snippet: $(LIBJSONNET_TEST_SNIPPET_SRCS)
+-      $(CC) $(CFLAGS) $(LDFLAGS) $< -L. -ljsonnet -o $@
++      $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $< -L. -ljsonnet -o $@
+ 
+ LIBJSONNET_TEST_FILE_SRCS = \
+       core/libjsonnet_test_file.c \
+@@ -152,13 +151,13 @@ LIBJSONNET_TEST_FILE_SRCS = \
+       include/libjsonnet.h
+ 
+ libjsonnet_test_file: $(LIBJSONNET_TEST_FILE_SRCS)
+-      $(CC) $(CFLAGS) $(LDFLAGS) $< -L. -ljsonnet -o $@
++      $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $< -L. -ljsonnet -o $@
+ 
+ # Encode standard library for embedding in C
+ core/%.jsonnet.h: stdlib/%.jsonnet
+       (($(OD) -v -Anone -t u1 $< \
+               | tr " " "\n" \
+-              | grep -v "^$$" \
++              | sed -e 's/^0//;/^$$/d' \
+               | tr "\n" "," ) && echo "0") > $@
+       echo >> $@
+ 



Home | Main Index | Thread Index | Old Index