summaryrefslogtreecommitdiff
path: root/devel/janet-lsp
diff options
context:
space:
mode:
Diffstat (limited to 'devel/janet-lsp')
-rw-r--r--devel/janet-lsp/Makefile25
-rw-r--r--devel/janet-lsp/files/janet-lsp.in11
-rw-r--r--devel/janet-lsp/files/patch-project.janet29
3 files changed, 26 insertions, 39 deletions
diff --git a/devel/janet-lsp/Makefile b/devel/janet-lsp/Makefile
index 4e6d46e92a30..89feef4d797b 100644
--- a/devel/janet-lsp/Makefile
+++ b/devel/janet-lsp/Makefile
@@ -1,6 +1,7 @@
PORTNAME= janet-lsp
PORTVERSION= 0.0.11
DISTVERSIONPREFIX= v
+PORTREVISION= 1
CATEGORIES= devel
MAINTAINER= dave@freedave.net
@@ -13,6 +14,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
# Technically jpm should depend on janet.
BUILD_DEPENDS= janet>=1.17.2:lang/janet \
jpm>=1.1.0:lang/jpm
+RUN_DEPENDS= janet>=1.17.2:lang/janet
USE_GITHUB= yes
GH_ACCOUNT= CFiggers
@@ -29,25 +31,28 @@ GH_TUPLE= CFiggers:cmd:b0a34d6:cmd \
ianthehenry:judge:3b92185:judge \
janet-lang:spork:7b780cc:spork
-PLIST_FILES= bin/janet-lsp
+SUB_FILES= janet-lsp
+
+PLIST_FILES= bin/janet-lsp \
+ lib/janet/janet-lsp.jimage \
+ lib/janet/.manifests/janet-lsp.jdn
-# `jpm install` does not actually install anyway. This does a build (with no
-# dependency checking, which is why order matters) and install to the work
-# "jpm_tree". Which is where all the dependencies and the project expect to find
-# any of their build dependencies.
-#
# Use GH_TUPLE project-hash as directory to avoid an unnecessary copy.
do-build:
.for dep in ${GH_TUPLE:C@^([^:]*):([^:]*):([^:]*):([^:]*)@\2-\3@}
cd ${WRKDIR}/${dep} && \
- ${LOCALBASE}/bin/jpm --tree=${WRKSRC}/jpm_tree "install"
+ ${LOCALBASE}/bin/jpm --tree=${WRKSRC}/jpm_tree "install"
.endfor
- cd ${WRKSRC} && ${LOCALBASE}/bin/jpm --tree=${WRKSRC}/jpm_tree build
+ cd ${WRKSRC} && ${LOCALBASE}/bin/jpm --tree=${WRKSRC}/jpm_tree "install"
do-install:
- ${MKDIR} ${STAGEDIR}/bin
- ${INSTALL_PROGRAM} ${WRKSRC}/build/janet-lsp \
+ ${MKDIR} ${STAGEDIR}${PREFIX}/lib/janet/.manifests
+ ${INSTALL_SCRIPT} ${WRKDIR}/janet-lsp \
${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+ ${INSTALL_DATA} ${WRKSRC}/jpm_tree/lib/janet-lsp.jimage \
+ ${STAGEDIR}${PREFIX}/lib/janet/janet-lsp.jimage
+ ${INSTALL_DATA} ${WRKSRC}/jpm_tree/lib/.manifests/janet-lsp.jdn \
+ ${STAGEDIR}${PREFIX}/lib/janet/.manifests/janet-lsp.jdn
do-test:
cd ${WRKSRC} && jpm test -l
diff --git a/devel/janet-lsp/files/janet-lsp.in b/devel/janet-lsp/files/janet-lsp.in
new file mode 100644
index 000000000000..69eea77d05c3
--- /dev/null
+++ b/devel/janet-lsp/files/janet-lsp.in
@@ -0,0 +1,11 @@
+@comment | This file is normally created by `jpm install`. The problem is that
+@comment | it uses the path from --tree for janet and the full path to that tree
+@comment | for the image. Both wrong.
+@comment | See work/janet-lsp-*/jpm_tree/bin/janet-lsp for the version with the
+@comment | wrong paths that this replaces. It is this small.
+#!%%LOCALBASE%%/bin/janet
+(import janet-lsp)
+(put root-env :syspath "%%LOCALBASE%%/lib")
+
+(defn main [& args]
+ (janet-lsp/main ;args))
diff --git a/devel/janet-lsp/files/patch-project.janet b/devel/janet-lsp/files/patch-project.janet
deleted file mode 100644
index 90c646d2579e..000000000000
--- a/devel/janet-lsp/files/patch-project.janet
+++ /dev/null
@@ -1,29 +0,0 @@
---- project.janet.orig 2025-09-05 00:00:02 UTC
-+++ project.janet
-@@ -7,16 +7,17 @@
- "https://github.com/ianthehenry/judge.git"
- "https://github.com/CFiggers/cmd.git"])
-
--# (def cflags
--# (case (os/which)
--# :windows []
--# ["-s"]))
-+(def cflags
-+ (case (os/which)
-+ :windows []
-+ :freebsd []
-+ ["-s"]))
-
--# (declare-executable
--# :name "janet-lsp"
--# :entry "src/main.janet"
--# :cflags cflags
--# :install true)
-+(declare-executable
-+ :name "janet-lsp"
-+ :entry "src/main.janet"
-+ :cflags cflags
-+ :install true)
-
- (declare-archive
- :name "janet-lsp"