mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
janet: new recipe (#3864)
This commit is contained in:
80
dev-lang/janet/janet-0.5.0.recipe
Normal file
80
dev-lang/janet/janet-0.5.0.recipe
Normal file
@@ -0,0 +1,80 @@
|
||||
SUMMARY="Dynamic Lisp dialect and bytecode vm"
|
||||
DESCRIPTION="Janet is a functional and imperative programming language \
|
||||
and bytecode interpreter. It is a modern lisp, but lists are replaced by \
|
||||
other data structures with better utility and performance (arrays, tables, \
|
||||
structs, tuples). The language also supports bridging to native code written \
|
||||
in C, meta-programming with macros, and bytecode assembly."
|
||||
HOMEPAGE="https://janet-lang.org/"
|
||||
COPYRIGHT="2019 Calvin Rose and contributors"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/janet-lang/janet/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="f5c90122715869657427cbba62809a1d53eaaced2268e7d55202301d65a75076"
|
||||
SOURCE_FILENAME="janet-$portVersion.tar.gz"
|
||||
PATCHES="janet-0.5.0.patch"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
libVersion="$portVersion"
|
||||
libVersionCompat="$libVersion compat >= ${portVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
janet$secondaryArchSuffix = $portVersion
|
||||
cmd:janet$secondaryArchSuffix
|
||||
lib:libjanet$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
janet${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libjanet$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:git
|
||||
cmd:make
|
||||
"
|
||||
|
||||
defineDebugInfoPackage janet$secondaryArchSuffix \
|
||||
"$binDir/janet" \
|
||||
"$libDir/libjanet.so.$libVersion"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
install -m 755 -d "$binDir" "$developDir/headers" "$libDir/janet" \
|
||||
"$docDir" "$manDir/man1/janet"
|
||||
install -m 755 build/janet "$binDir"
|
||||
install -m 644 src/include/janet{,conf}.h "$developDir/headers"
|
||||
|
||||
install -m 755 build/libjanet.so "$libDir/libjanet.so.$libVersion"
|
||||
ln -sf "libjanet.so.${libVersionCompat##* }" "$libDir/libjanet.so"
|
||||
ln -sf "libjanet.so.$libVersion" \
|
||||
"$libDir/libjanet.so.${libVersionCompat##* }"
|
||||
install -m 644 tools/{cook,highlight,bars}.janet "$libDir/janet"
|
||||
|
||||
prepareInstalledDevelLib libjanet
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel \
|
||||
"$developDir"
|
||||
|
||||
install -m 644 README.md "$docDir"
|
||||
install -m 644 janet.1 "$manDir/man1"
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make test
|
||||
}
|
||||
22
dev-lang/janet/patches/janet-0.5.0.patch
Normal file
22
dev-lang/janet/patches/janet-0.5.0.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -47,6 +47,9 @@ else ifeq ($(UNAME), Linux)
|
||||
CLIBS:=$(CLIBS) -lrt -ldl
|
||||
endif
|
||||
# For other unix likes, add flags here!
|
||||
+ifeq ($(UNAME),Haiku)
|
||||
+ LDFLAGS=-Wl,--export-dynamic
|
||||
+endif
|
||||
|
||||
$(shell mkdir -p build/core build/mainclient build/webclient build/boot)
|
||||
all: $(JANET_TARGET) $(JANET_LIBRARY)
|
||||
--- a/src/include/janet.h
|
||||
+++ b/src/include/janet.h
|
||||
@@ -51,6 +51,7 @@ extern "C" {
|
||||
|| defined(__FreeBSD__) || defined(__DragonFly__) \
|
||||
|| defined(__FreeBSD_kernel__) \
|
||||
|| defined(__GNU__) /* GNU/Hurd */ \
|
||||
+ || defined(__HAIKU__) \
|
||||
|| defined(__linux__) \
|
||||
|| defined(__NetBSD__) \
|
||||
|| defined(__OpenBSD__) \
|
||||
Reference in New Issue
Block a user