1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00

editors/vis: Update to 0.9

ChangeLog: https://github.com/martanne/vis/blob/v0.9/CHANGELOG.md

PR:		279689
Reported by:	DtxdF@disroot.org (maintainer)
This commit is contained in:
Jesús Daniel Colmenares Oviedo 2024-06-12 08:39:31 +02:00 committed by Fernando Apesteguía
parent 621c43884f
commit ae1b71bad0
7 changed files with 94 additions and 48 deletions

View File

@ -1,14 +1,11 @@
PORTNAME= vis
DISTVERSION= 0.8
DISTVERSIONPREFIX= v
DISTVERSION= 0.9
CATEGORIES= editors
MASTER_SITES= https://github.com/martanne/${PORTNAME}/releases/download/v${VIS_VER}/:source \
https://github.com/martanne/${PORTNAME}-test/releases/download/v${VIS_TEST_VER}/:test
DISTFILES= ${PORTNAME}-${VIS_VER}${EXTRACT_SUFX}:source \
${VIS_TEST_NAME}-${VIS_TEST_VER}${EXTRACT_SUFX}:test
MAINTAINER= DtxdF@disroot.org
COMMENT= Vi-like editor based on Plan 9's structural regular expressions
WWW= https://www.brain-dump.org/projects/vis/
WWW= https://github.com/martanne/${PORTNAME}
LICENSE= CC0-1.0 ISCL MIT
LICENSE_COMB= multi
@ -18,6 +15,9 @@ LIB_DEPENDS+= libtermkey.so:devel/libtermkey
TEST_DEPENDS= vim>0:editors/vim
USES+= gmake lua pkgconfig
USE_GITHUB= yes
GH_ACCOUNT= martanne
GH_TAGNAME= b7074021b7bfb0932b889b9560dd22df31cef818:test
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --prefix=${PREFIX}
@ -25,6 +25,8 @@ CONFIGURE_ARGS= --prefix=${PREFIX}
INSTALL_TARGET= install-strip
TEST_TARGET= test
REINPLACE_ARGS= -i ''
OPTIONS_DEFINE= LPEG NLS TRE
OPTIONS_DEFAULT= LPEG TRE
OPTIONS_RADIO= CLIPBOARD
@ -45,14 +47,15 @@ WL_COPY_RUN_DEPENDS= wl-clipboard>0:x11/wl-clipboard
XCLIP_RUN_DEPENDS= xclip>0:x11/xclip
XSEL_RUN_DEPENDS= xsel-conrad>0:x11/xsel-conrad
# To be consistent with VIS_TEST_VERSION.
VIS_VER= ${DISTVERSION}
VIS_TEST_VER= 0.5
VIS_TEST_NAME= ${PORTNAME}-test
post-extract:
${RMDIR} ${WRKSRC}/test
${MV} ${WRKDIR}/${VIS_TEST_NAME}-${VIS_TEST_VER}/ ${WRKSRC}/test
${CP} -a ${WRKSRC_test}/test/ ${WRKSRC}/test
post-patch:
${REINPLACE_CMD} -e 's,%%ETCDIR%%,${ETCDIR},1' \
-e 's,%%PREFIX%%,${PREFIX},1' \
${WRKSRC}/man/vis.1 \
${WRKSRC}/vis-lua.c \
${WRKSRC}/vis-single.c
post-install:
@(cd ${STAGEDIR}${PREFIX}/bin; ${MV} vis vise)

View File

@ -1,5 +1,5 @@
TIMESTAMP = 1677331839
SHA256 (vis-0.8.tar.gz) = 61b10d40f15c4db2ce16e9acf291dbb762da4cbccf0cf2a80b28d9ac998a39bd
SIZE (vis-0.8.tar.gz) = 404496
SHA256 (vis-test-0.5.tar.gz) = 0098ad933ec1f87bba4b2da9fa84e00cab5612ec3623622c1e5003a245aec7d1
SIZE (vis-test-0.5.tar.gz) = 99314
TIMESTAMP = 1718142435
SHA256 (martanne-vis-v0.9_GH0.tar.gz) = bd37ffba5535e665c1e883c25ba5f4e3307569b6d392c60f3c7d5dedd2efcfca
SIZE (martanne-vis-v0.9_GH0.tar.gz) = 456713
SHA256 (martanne-vis-b7074021b7bfb0932b889b9560dd22df31cef818_GH0.tar.gz) = 9e2a0f7d4c67075fd71f6461bb5a7753c11c36688185860b2e02e4ba42bb5410
SIZE (martanne-vis-b7074021b7bfb0932b889b9560dd22df31cef818_GH0.tar.gz) = 558835

View File

@ -1,19 +1,17 @@
--- configure.orig 2023-02-25 11:16:23 UTC
--- configure.orig 2024-06-11 20:47:15 UTC
+++ configure
@@ -236,7 +236,6 @@ esac
tryflag CFLAGS -pipe
@@ -233,14 +233,6 @@ esac
AIX) CFLAGS_STD="$CFLAGS_STD -D_ALL_SOURCE" ;;
esac
# Try flags to optimize binary size
-tryflag CFLAGS -pipe
-
-# Try flags to optimize binary size
-tryflag CFLAGS -O2
tryflag CFLAGS -ffunction-sections
tryflag CFLAGS -fdata-sections
tryldflag LDFLAGS_AUTO -Wl,--gc-sections
@@ -443,7 +442,7 @@ int main(int argc, char *argv[]) {
}
EOF
- for liblua in lua lua5.4 lua5.3 lua5.2 lua-5.3 lua-5.2 lua54 lua53 lua52; do
+ for liblua in lua lua5.4 lua5.3 lua5.2 lua-5.4 lua-5.3 lua-5.2 lua54 lua53 lua52; do
printf " checking for %s... " "$liblua"
if test "$have_pkgconfig" = "yes" ; then
-tryflag CFLAGS -ffunction-sections
-tryflag CFLAGS -fdata-sections
-tryldflag LDFLAGS_AUTO -Wl,--gc-sections
-
# Try hardening flags
tryflag CFLAGS -fPIE
tryflag CFLAGS_AUTO -fstack-protector-all

View File

@ -1,11 +1,15 @@
--- man/vis.1.orig 2023-02-24 18:24:37 UTC
--- man/vis.1.orig 2024-05-01 19:49:18 UTC
+++ man/vis.1
@@ -260,7 +260,7 @@ currently defers regular expression matching to the un
It uses what POSIX refers to as
.Dq Extended Regular Expressions
as described in
-.Xr regex 7 .
+.Xr re_format 7 .
The anchors
.Ic ^
and
@@ -1548,10 +1548,10 @@ if unset.
if unset.
.
.It
-.Pa /etc/vis
+.Pa %%ETCDIR%%
for a system-wide configuration provided by administrator.
.It
-.Pa /usr/local/share/vis
+.Pa %%PREFIX%%/share/vis
or
.Pa /usr/share/vis
depending on the build configuration.

View File

@ -0,0 +1,20 @@
--- vis-lua.c.orig 2024-05-01 19:49:18 UTC
+++ vis-lua.c
@@ -27,7 +27,7 @@
#include "util.h"
#ifndef VIS_PATH
-#define VIS_PATH "/usr/local/share/vis"
+#define VIS_PATH "%%PREFIX%%/share/vis"
#endif
#define VIS_LUA_TYPE_VIS "vis"
@@ -3248,7 +3248,7 @@ void vis_lua_init(Vis *vis) {
home = pw->pw_dir;
}
- vis_lua_path_add(vis, "/etc/vis");
+ vis_lua_path_add(vis, "%%ETCDIR%%");
const char *xdg_config = getenv("XDG_CONFIG_HOME");
if (xdg_config) {

View File

@ -0,0 +1,11 @@
--- vis-single.c.orig 2024-06-11 22:03:34 UTC
+++ vis-single.c
@@ -29,7 +29,7 @@
#ifndef VIS_TERMINFO
#define VIS_TERMINFO "/etc/terminfo:/lib/terminfo:/usr/share/terminfo:" \
- "/usr/lib/terminfo:/usr/local/share/terminfo:/usr/local/lib/terminfo"
+ "/usr/lib/terminfo:%%PREFIX%%/share/terminfo:%%PREFIX%%/lib/terminfo"
#endif
static lzma_stream strm = LZMA_STREAM_INIT;

View File

@ -163,12 +163,22 @@ share/man/man1/vise.1.gz
%%TRE%%%%DATADIR%%/plugins/filetype.lua
%%TRE%%%%DATADIR%%/plugins/number-inc-dec.lua
%%TRE%%%%DATADIR%%/plugins/textobject-lexer.lua
%%TRE%%%%DATADIR%%/themes/dark-16.lua
%%TRE%%%%DATADIR%%/themes/default-16.lua
%%TRE%%%%DATADIR%%/themes/default-256.lua
%%TRE%%%%DATADIR%%/themes/light-16.lua
%%TRE%%%%DATADIR%%/themes/solarized.lua
%%TRE%%%%DATADIR%%/themes/zenburn.lua
%%TRE%%%%DATADIR%%/vis-std.lua
%%TRE%%%%DATADIR%%/vis.lua
%%TRE%%%%DATADIR%%/visrc.lua
%%DATADIR%%/lexers/autohotkey.lua
%%DATADIR%%/lexers/gleam.lua
%%DATADIR%%/lexers/hare.lua
%%DATADIR%%/lexers/jq.lua
%%DATADIR%%/lexers/mediawiki.lua
%%DATADIR%%/lexers/objeck.lua
%%DATADIR%%/lexers/output.lua
%%DATADIR%%/lexers/rpmspec.lua
%%DATADIR%%/lexers/template.txt
%%DATADIR%%/lexers/troff.lua
%%DATADIR%%/lexers/txt2tags.lua
%%DATADIR%%/lexers/typescript.lua
%%DATADIR%%/themes/base-16.lua
%%DATADIR%%/themes/default.lua