aboutsummaryrefslogtreecommitdiffstats
path: root/editors
diff options
context:
space:
mode:
authortobik <tobik@FreeBSD.org>2018-04-25 18:52:10 +0800
committertobik <tobik@FreeBSD.org>2018-04-25 18:52:10 +0800
commitd30a470b683479c969c3535bd7c35dd28cf634bb (patch)
treeaa77d9c15e4b72a034ba357ae2b8df55b6cde67b /editors
parent70c0ee96501796a3e6bbe90770e9541a9cbe97ec (diff)
downloadfreebsd-ports-gnome-d30a470b683479c969c3535bd7c35dd28cf634bb.tar.gz
freebsd-ports-gnome-d30a470b683479c969c3535bd7c35dd28cf634bb.tar.zst
freebsd-ports-gnome-d30a470b683479c969c3535bd7c35dd28cf634bb.zip
editors/kakoune: Fix tmux-repl.kak
It fails on FreeBSD and claims that tmux' version is too old even though tmux >= 2 is installed.
Diffstat (limited to 'editors')
-rw-r--r--editors/kakoune/Makefile7
-rw-r--r--editors/kakoune/files/patch-rc_extra_tmux-repl.kak20
2 files changed, 24 insertions, 3 deletions
diff --git a/editors/kakoune/Makefile b/editors/kakoune/Makefile
index e1a78d850b85..6732d11217d4 100644
--- a/editors/kakoune/Makefile
+++ b/editors/kakoune/Makefile
@@ -2,7 +2,7 @@
PORTNAME= kakoune
DISTVERSION= 2018.04.13
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= editors
MASTER_SITES= https://github.com/mawww/kakoune/releases/download/v${DISTVERSION}/
@@ -10,7 +10,7 @@ MAINTAINER= tobik@FreeBSD.org
COMMENT= Modal code editor with a focus on interactivity
LICENSE= UNLICENSE
-LICENSE_FILE= ${WRKSRC}/../UNLICENSE
+LICENSE_FILE= ${WRKSRC:H}/UNLICENSE
BUILD_DEPENDS= a2x:textproc/asciidoc
@@ -18,6 +18,7 @@ USES= compiler:c++14-lang gmake ncurses tar:bzip2
DATADIR= ${PREFIX}/share/kak
DOCSDIR= ${PREFIX}/share/doc/kak
+PATCH_WRKSRC= ${WRKSRC:H}
WRKSRC_SUBDIR= src
OPTIONS_DEFINE= DEBUG DOCS
@@ -33,6 +34,6 @@ post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/kak
do-test:
- @cd ${WRKSRC}/../test && ${SETENV} LC_ALL=en_US.UTF-8 ./run
+ @cd ${WRKSRC:H}/test && ${SETENV} LC_ALL=en_US.UTF-8 ./run
.include <bsd.port.mk>
diff --git a/editors/kakoune/files/patch-rc_extra_tmux-repl.kak b/editors/kakoune/files/patch-rc_extra_tmux-repl.kak
new file mode 100644
index 000000000000..ecf6a78f5b55
--- /dev/null
+++ b/editors/kakoune/files/patch-rc_extra_tmux-repl.kak
@@ -0,0 +1,20 @@
+tmux-repl fails on FreeBSD and claims that tmux' version is too old even
+though tmux >= 2 is installed.
+
+The expr is only compatible with GNU expr.
+
+https://github.com/mawww/kakoune/pull/2006
+
+--- rc/extra/tmux-repl.kak.orig 2018-04-12 11:28:15 UTC
++++ rc/extra/tmux-repl.kak
+@@ -4,8 +4,8 @@
+ hook global KakBegin .* %{
+ %sh{
+ if [ -n "$TMUX" ]; then
+- VERSION_TMUX=$(tmux -V)
+- VERSION_TMUX=$(expr "${VERSION_TMUX}" : 'tmux \([0-9]*\|master\)')
++ VERSION_TMUX=$(tmux -V | cut -d' ' -f2)
++ VERSION_TMUX=${VERSION_TMUX%%.*}
+
+ if [ "${VERSION_TMUX}" = "master" ] \
+ || [ "${VERSION_TMUX}" -ge 2 ]; then