jsonnet: Add devel package

Package development libraries and headers.
Closes #17240

Signed-off-by: Nathan Owens <ndowens04@gmail.com>
This commit is contained in:
Nathan Owens 2019-12-16 21:59:16 -06:00 committed by Juan RP
parent c7caca52b7
commit 55913be7fc
4 changed files with 69 additions and 8 deletions

View file

@ -3709,3 +3709,5 @@ libtss2-tcti-mssim.so.0 tpm2-tss-2.3.1_1
libtss2-tctildr.so.0 tpm2-tss-2.3.1_1
libzfs.so.2 zfs-0.8.2_1
libnvpair.so.1 zfs-0.8.2_1
libjsonnet.so.0 jsonnet-0.14.0_2
libjsonnet++.so.0 jsonnet-0.14.0_2

1
srcpkgs/jsonnet-devel Symbolic link
View file

@ -0,0 +1 @@
jsonnet

View file

@ -0,0 +1,57 @@
Remove javascript file install, and also removes
the need of the EM++ EMCC compiler, not in the repo.
Also add DESTDIR to fix packaging install.
DESTDIR fixes submitted upstream:
PR: https://github.com/google/jsonnet/pull/740
---
diff --git Makefile Makefile
index 474655c..c533125 100644
--- Makefile
+++ Makefile
@@ -82,10 +82,6 @@ LIBS = \
libjsonnet++.so.$(VERSION) \
ALL = \
- libjsonnet_test_snippet \
- libjsonnet_test_file \
- libjsonnet.js \
- doc/js/libjsonnet.js \
$(BINS) \
$(LIBS) \
$(LIB_OBJ)
@@ -187,12 +183,6 @@ JS_EXPORTED_FUNCTIONS = 'EXPORTED_FUNCTIONS=["_jsonnet_make", "_jsonnet_evaluate
JS_RUNTIME_METHODS = 'EXTRA_EXPORTED_RUNTIME_METHODS=["cwrap", "_free", "getValue", "lengthBytesUTF8", "_malloc", "UTF8ToString", "setValue", "stringToUTF8", "addFunction"]'
-libjsonnet.js: $(LIB_SRC) $(ALL_HEADERS)
- $(EMCXX) -s WASM=0 -s $(JS_EXPORTED_FUNCTIONS) -s $(JS_RUNTIME_METHODS) $(EMCXXFLAGS) $(LDFLAGS) $(LIB_SRC) -o $@
-
-# Copy javascript build to doc directory
-doc/js/libjsonnet.js: libjsonnet.js
- $(CP) $^ $@
# Tests for C binding.
LIBJSONNET_TEST_SNIPPET_SRCS = \
diff --git Makefile Makefile
index c533125..56fb1e4 100644
--- Makefile
+++ Makefile
@@ -122,12 +122,12 @@ endif
default: jsonnet jsonnetfmt
install: bins libs
- mkdir -p $(PREFIX)/bin
- cp $(BINS) $(PREFIX)/bin/
- mkdir -p $(PREFIX)/lib
- cp $(LIBS) $(PREFIX)/lib/
- mkdir -p $(PREFIX)/include
- cp $(INCS) $(PREFIX)/include/
+ mkdir -p $(DESTDIR)$(PREFIX)/bin
+ cp $(BINS) $(DESTDIR)$(PREFIX)/bin/
+ mkdir -p $(DESTDIR)$(PREFIX)/lib
+ cp $(LIBS) $(DESTDIR)$(PREFIX)/lib/
+ mkdir -p $(DESTDIR)$(PREFIX)/include
+ cp $(INCS) $(DESTDIR)$(PREFIX)/include/
all: $(ALL)

View file

@ -1,9 +1,8 @@
# Template file for 'jsonnet'
pkgname=jsonnet
version=0.14.0
revision=1
revision=2
build_style=gnu-makefile
make_build_args="bins"
short_desc="Data templating language"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="Apache-2.0"
@ -11,11 +10,13 @@ homepage="https://github.com/google/jsonnet"
distfiles="https://github.com/google/jsonnet/archive/v${version}.tar.gz"
checksum=7f41cdc4cb366cfc1de3aada926a2f7e640ef025887eb05cdaf8342d6e4e088b
CXXFLAGS="-Iinclude -Ithird_party/md5 -Ithird_party/json"
CFLAGS="-Iinclude"
CXXFLAGS="-fPIC"
do_install() {
vbin jsonnet
vbin jsonnetfmt
vsconf stdlib/std.jsonnet
jsonnet-devel_package() {
depends="${sourcepkg}-${version}_${revision}"
short_desc="${short_desc} - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
}
}