mirror of
https://github.com/openbsd/ports.git
synced 2026-06-17 23:13:55 +02:00
archivers/zstd: workaround for missing LESSOPEN support in zstdless
The `zstdless` script, which is part of the zstd package, relies on the LESSOPEN mechanism, which was removed from OpenBSD over a year ago. As a result, `zstdless` is currently broken. Work around this by replacing `zstdless` with a script using `zstdcat` and `less`. Issue reported and workaround suggested by Tom Szilagyi <tom DOT szilagyi AT altmail DOT se>.
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
COMMENT = zstandard fast real-time compression algorithm
|
COMMENT = zstandard fast real-time compression algorithm
|
||||||
|
|
||||||
V = 1.5.7
|
V = 1.5.7
|
||||||
|
REVISION = 0
|
||||||
DISTNAME = zstd-${V}
|
DISTNAME = zstd-${V}
|
||||||
|
|
||||||
SHARED_LIBS = zstd 7.0 # 1.5.7
|
SHARED_LIBS = zstd 7.0 # 1.5.7
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
Index: programs/zstdless
|
||||||
|
--- programs/zstdless.orig
|
||||||
|
+++ programs/zstdless
|
||||||
|
@@ -1,8 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
-zstd=${ZSTD:-zstd}
|
||||||
|
-
|
||||||
|
-# TODO: Address quirks and bugs tied to old versions of less, provide a mechanism to pass flags directly to zstd
|
||||||
|
-
|
||||||
|
-export LESSOPEN="|-${zstd} -cdfq %s"
|
||||||
|
-exec less "$@"
|
||||||
|
+zstdcat "$@" | less
|
||||||
Reference in New Issue
Block a user