janet: update to 1.8.0.

This commit is contained in:
Leah Neukirchen 2020-03-30 12:00:12 +02:00
parent 3ae839fb71
commit 9eaf5ab91b
3 changed files with 26 additions and 73 deletions

View File

@ -3845,7 +3845,7 @@ libcaribou.so.0 libcaribou-0.4.21_3
libtinyclipboard.so.1 tinyclipboard-16.01_1
libcbor.so.0.6 libcbor-0.6.1_1
libfido2.so.1 libfido2-1.3.0_1
libjanet.so.1.7 janet-1.7.0_1
libjanet.so.1.8 janet-1.8.0_1
libOpenImageDenoise.so.0 openimagedenoise-1.1.0_1
libblosc.so.1 c-blosc-1.17.1_1
libopenvdb.so.7.0 openvdb-7.0.0_1

View File

@ -1,39 +1,22 @@
--- Makefile.orig
+++ Makefile
@@ -30,7 +30,7 @@
JANET_BUILD?="\"$(shell git log --pretty=format:'%h' -n 1 || 'local')\""
CLIBS=-lm -lpthread
JANET_TARGET=build/janet
-JANET_LIBRARY=build/libjanet.so
+JANET_LIBRARY=build/libjanet.so.$(JANET_SONAME)
JANET_STATIC_LIBRARY=build/libjanet.a
JANET_PATH?=$(LIBDIR)/janet
MANPATH?=$(PREFIX)/share/man/man1/
--- Makefile.orig
+++ Makefile
@@ -161,11 +161,11 @@
build/shell.o: build/shell.c build/janet.h build/janetconf.h
$(CC) $(CFLAGS) -c $< -o $@ -I build
--- meson.build.orig
+++ meson.build
@@ -167,6 +167,8 @@
libjanet = library('janet', janetc,
include_directories : incdir,
dependencies : [m_dep, dl_dep, thread_dep],
+ version: meson.project_version(),
+ soversion: version_parts[0] + '.' + version_parts[1],
install : true)
-$(JANET_TARGET): build/janet.o build/shell.o
- $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(CLIBS)
+$(JANET_TARGET): $(JANET_LIBRARY) build/shell.o
+ $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(CLIBS) $(JANET_LIBRARY)
# Extra c flags - adding -fvisibility=hidden matches the Makefile and
@@ -184,8 +186,9 @@
extra_cross_cflags = []
endif
$(JANET_LIBRARY): build/janet.o build/shell.o
- $(CC) $(LDFLAGS) $(CFLAGS) -shared -o $@ $^ $(CLIBS)
+ $(CC) $(LDFLAGS) $(CFLAGS) -shared -Wl,-soname=libjanet.so.$(JANET_SONAME) -o $@ $^ $(CLIBS)
$(JANET_STATIC_LIBRARY): build/janet.o build/shell.o
$(AR) rcs $@ $^
--- Makefile.orig
+++ Makefile
@@ -240,7 +240,7 @@
echo "Name: janet" >> $@
echo "Url: https://janet-lang.org" >> $@
echo "Description: Library for the Janet programming language." >> $@
- $(JANET_TARGET) -e '(print "Version: " janet/version)' >> $@
+ echo "Version: $(JANET_VERSION)" >> $@
echo 'Cflags: -I$${includedir}' >> $@
echo 'Libs: -L$${libdir} -ljanet $(LDFLAGS)' >> $@
echo 'Libs.private: $(CLIBS)' >> $@
-janet_mainclient = executable('janet', janetc, mainclient_src,
+janet_mainclient = executable('janet', mainclient_src,
include_directories : incdir,
dependencies : [m_dep, dl_dep, thread_dep],
c_args : extra_native_cflags,
+ link_with : [libjanet],
install : true)

View File

@ -1,50 +1,20 @@
# Template file for 'janet'
pkgname=janet
version=1.7.0
revision=2
_soname="${version%.*}"
build_style=gnu-makefile
make_use_env=yes
make_build_args="all build/janet.pc JANET_BUILD=\\\"release\\\"
PREFIX=/usr JANET_SONAME=${_soname} JANET_VERSION=${version}"
make_check_target="test"
make_check_args="JANET_SONAME=${_soname}"
version=1.8.0
revision=1
build_style=meson
short_desc="Dynamic Lisp dialect and bytecode VM"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="MIT"
homepage="https://janet-lang.org/"
distfiles="https://github.com/janet-lang/janet/archive/v${version}.tar.gz"
checksum=2a119f3a79b209a858864e73ca3efda57ac044df3c89762a31480bbea386d2a3
checksum=e02ae5c7b4579a23e3f30636c16d248273ed119467a076d18c9362e858eb9812
case "$XBPS_TARGET_MACHINE" in
ppc*) broken="testsuite fails";;
esac
pre_build() {
CC="$BUILD_CC" CFLAGS="$BUILD_CFLAGS" \
make build/janet.c JANET_BUILD=\\\"release\\\" PREFIX=/usr
}
pre_check() {
export LD_LIBRARY_PATH=$wrksrc/build
}
do_install() {
vbin build/janet
vbin auxbin/jpm
vmkdir usr/include/janet
vcopy src/include/janet.h usr/include/janet
vcopy src/conf/janetconf.h usr/include/janet
vmkdir usr/lib/pkgconfig
vcopy build/libjanet.a usr/lib
vcopy build/libjanet.so.${_soname} usr/lib
ln -s libjanet.so.${_soname} ${DESTDIR}/usr/lib/libjanet.so
vcopy build/janet.pc usr/lib/pkgconfig
vman janet.1
vman jpm.1
post_install() {
vlicense LICENSE
}