New package: janet-1.7.0
This commit is contained in:
parent
460380efb4
commit
14517c954c
|
@ -3786,3 +3786,4 @@ libcaribou.so.0 libcaribou-0.4.21_3
|
|||
libtinyclipboard.so.1 tinyclipboard-16.01_1
|
||||
libcbor.so.0 libcbor-0.5.0_1
|
||||
libfido2.so.1 libfido2-1.3.0_1
|
||||
libjanet.so.1.7 janet-1.7.0_1
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
janet
|
|
@ -0,0 +1,39 @@
|
|||
--- 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
|
||||
|
||||
-$(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)
|
||||
|
||||
$(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)' >> $@
|
|
@ -0,0 +1,56 @@
|
|||
# Template file for 'janet'
|
||||
pkgname=janet
|
||||
version=1.7.0
|
||||
revision=1
|
||||
_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}"
|
||||
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
|
||||
|
||||
pre_build() {
|
||||
CC="$BUILD_CC" CFLAGS="$BUILD_CFLAGS" \
|
||||
make build/janet.c JANET_BUILD=\\\"release\\\"
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
vlicense LICENSE
|
||||
}
|
||||
|
||||
janet-devel_package() {
|
||||
short_desc+=" - development files"
|
||||
depends="${sourcepkg}>=${version}_${revision}"
|
||||
pkg_install() {
|
||||
vmove usr/include
|
||||
vmove usr/lib/*.a
|
||||
vmove usr/lib/*.so
|
||||
vmove usr/lib/pkgconfig
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue