Fix default path for w3mimgdisplay.

Spotted by "rage_311" on /r/openbsd (reddit)
This commit is contained in:
dcoppa
2017-06-11 09:02:43 +00:00
parent a9eaaa5e93
commit d6e9599b47
3 changed files with 34 additions and 1 deletions
+6 -1
View File
@@ -1,9 +1,10 @@
# $OpenBSD: Makefile,v 1.5 2015/11/19 19:13:35 jasper Exp $
# $OpenBSD: Makefile,v 1.6 2017/06/11 09:02:43 dcoppa Exp $
COMMENT = minimalistic console file manager
MODPY_EGG_VERSION = 1.7.2
DISTNAME = ranger-${MODPY_EGG_VERSION}
REVISION = 0
CATEGORIES = sysutils misc
@@ -22,6 +23,10 @@ RUN_DEPENDS = archivers/libarchive \
TEST_DEPENDS = devel/gmake \
sysutils/ggrep
pre-configure:
${SUBST_CMD} ${WRKSRC}/doc/ranger.1 \
${WRKSRC}/ranger/ext/img_display.py
do-test:
cd ${WRKSRC}; PYTHON=${MODPY_BIN} gmake test
@@ -0,0 +1,14 @@
$OpenBSD: patch-doc_ranger_1,v 1.1 2017/06/11 09:02:43 dcoppa Exp $
Index: doc/ranger.1
--- doc/ranger.1.orig
+++ doc/ranger.1
@@ -1329,7 +1329,7 @@ docstrings. Using this will disable the <F1> key on c
.IP "W3MIMGDISPLAY_PATH" 8
.IX Item "W3MIMGDISPLAY_PATH"
By changing this variable, you can change the path of the executable file for
-image previews. By default, it is set to \fI/usr/lib/w3m/w3mimgdisplay\fR.
+image previews. By default, it is set to \fI${LOCALBASE}/libexec/w3m/w3mimgdisplay\fR.
.SH "EXAMPLES"
.IX Header "EXAMPLES"
There are various examples on how to extend ranger with plugins or combine
@@ -0,0 +1,14 @@
$OpenBSD: patch-ranger_ext_img_display_py,v 1.1 2017/06/11 09:02:43 dcoppa Exp $
Index: ranger/ext/img_display.py
--- ranger/ext/img_display.py.orig
+++ ranger/ext/img_display.py
@@ -21,7 +21,7 @@ import termios
from ranger.core.shared import FileManagerAware
from subprocess import Popen, PIPE
-W3MIMGDISPLAY_PATH = '/usr/lib/w3m/w3mimgdisplay'
+W3MIMGDISPLAY_PATH = '${LOCALBASE}/libexec/w3m/w3mimgdisplay'
W3MIMGDISPLAY_OPTIONS = []
class ImgDisplayUnsupportedException(Exception):