summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>2024-05-05 15:32:40 +0200
committerJoonas Niilola <juippis@gentoo.org>2024-06-02 11:44:35 +0300
commit1447c4da9210166113f7d9dd558449716e05a3d9 (patch)
tree110f0e2c9f5a0448ccce7f42634aa61613b8069e /app-editors
parentwww-apps/xpra-html5: Add python3_13 (diff)
downloadgentoo-1447c4da9210166113f7d9dd558449716e05a3d9.tar.gz
gentoo-1447c4da9210166113f7d9dd558449716e05a3d9.tar.bz2
gentoo-1447c4da9210166113f7d9dd558449716e05a3d9.zip
app-editors/vis: add 0.9
Signed-off-by: Haelwenn (lanodan) Monnier <contact@hacktivis.me> Closes: https://github.com/gentoo/gentoo/pull/36569 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'app-editors')
-rw-r--r--app-editors/vis/Manifest2
-rw-r--r--app-editors/vis/vis-0.9.ebuild95
-rw-r--r--app-editors/vis/vis-9999.ebuild27
3 files changed, 110 insertions, 14 deletions
diff --git a/app-editors/vis/Manifest b/app-editors/vis/Manifest
index 1d57d4db3820..2d32ac0131a4 100644
--- a/app-editors/vis/Manifest
+++ b/app-editors/vis/Manifest
@@ -1,2 +1,4 @@
DIST vis-0.8.tar.gz 404496 BLAKE2B eafb7098a6c8e0d8f277be66984d5fd298ac86d524a4219a7d7730599157ca68c040615622cd1680b101e1cd003eba03343496762d0d4dc2766a079116f21eea SHA512 ab4eda075034955411bdbc0ade2fe9149a48c644fa2f70add8d3b9d749f86b98a4e429745b5cae7fdbc0a1e07c8587539a055cd1c6734bb59e43c580c949e0aa
+DIST vis-0.9.tar.gz 456713 BLAKE2B 3e812e054c8d7f88e8866882500fb107cfaccd4f2680dd3ff3f68820bf4c76495dcc591e78916d0faef8390eb23cc14ead7ba4e35d2068bfc04964ad46acb3ce SHA512 64025569f6feb1a3b5aa8aaa79af319cdf8fc1fd5d1f5b29a6838ff00ea950cade1efb366d0a95d77e516f5605048bcb557fd7aa52b3a9510a15e69acaee147c
DIST vis-test-0.5.tar.gz 99314 BLAKE2B 988d7e93d0f3c58d2fc8fbe9293049c6a3cc44dfcbfbd4f42f7992815cf33a604340b59171dcd880f7180ae56e3f73f46684b7aacd96438480db6c4592851f2c SHA512 c41b40f23a45a7ebd9c16aa853d9c3b517767cb88ff8dc268da44276a02aa8c77de0fc6aa243a1e4cdfbc27182870b82d0b9bc892bb87ea74d5275d76c554ed1
+DIST vis-test-783b7ef67aa360f0b9bd44fa5ea47e644bc49d69.tar.gz 102134 BLAKE2B c9c32cd7c01027853810b18eb418173d3e04947039bb5c103607602838a143bbff52754dcf806c35bb247c8c6be8b8bf86c3a73daa13a54894df525e6f2c0905 SHA512 dd86561e1eaf196c5b2d27e628eaababa721d26f7fab623ef7dd41e0d30352f5f9eb0e5006cdb1a896c5888304ea40f7fd291f3789d312a201403990bfbaf824
diff --git a/app-editors/vis/vis-0.9.ebuild b/app-editors/vis/vis-0.9.ebuild
new file mode 100644
index 000000000000..7887e2ae1f55
--- /dev/null
+++ b/app-editors/vis/vis-0.9.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+VIS_TEST_COMMIT="783b7ef67aa360f0b9bd44fa5ea47e644bc49d69"
+LUA_COMPAT=( lua5-2 lua5-3 lua5-4 )
+
+inherit lua-single
+
+if [ "${PV}" == "9999" ]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/martanne/vis.git"
+else
+ SRC_URI="
+ https://github.com/martanne/vis/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
+ test? ( https://github.com/martanne/vis-test/archive/${VIS_TEST_COMMIT}.tar.gz -> vis-test-${VIS_TEST_COMMIT}.tar.gz )
+ "
+ KEYWORDS="~amd64 ~arm ~riscv ~x86"
+fi
+
+DESCRIPTION="modern, legacy free, simple yet efficient vim-like editor"
+HOMEPAGE="https://github.com/martanne/vis"
+LICENSE="ISC MIT"
+SLOT="0"
+IUSE="+ncurses +lua selinux test tre"
+REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )"
+RESTRICT="!test? ( test )"
+
+# - Known to also work with NetBSD curses
+DEPEND="
+ dev-libs/libtermkey
+ sys-apps/acl
+ ncurses? ( sys-libs/ncurses:0= )
+ lua? ( ${LUA_DEPS} )
+ tre? ( dev-libs/tre )
+"
+RDEPEND="
+ ${DEPEND}
+ app-eselect/eselect-vi
+ lua? (
+ $(lua_gen_cond_dep 'dev-lua/lpeg[${LUA_USEDEP}]')
+ )
+"
+# lpeg: https://github.com/martanne/vis-test/issues/28
+BDEPEND="test? (
+ $(lua_gen_cond_dep 'dev-lua/lpeg[${LUA_USEDEP}]')
+ $(lua_gen_cond_dep 'dev-lua/busted[${LUA_USEDEP}]')
+)"
+
+pkg_setup() {
+ use lua && lua-single_pkg_setup
+}
+
+src_prepare() {
+ if use test; then
+ if [ ! "${PV}" == "9999" ]; then
+ rm -r test || die
+ mv "${WORKDIR}/vis-test-${VIS_TEST_COMMIT}" test || die
+ fi
+
+ # https://github.com/martanne/vis-test/issues/27 a Werror clone
+ sed -i 's;|| strstr(output, "warning");;' test/core/ccan-config.c || die
+ fi
+
+ sed -i 's|STRIP?=.*|STRIP=true|' Makefile || die
+ sed -i 's|${DOCPREFIX}/vis|${DOCPREFIX}|' Makefile || die
+ sed -i 's|DOCUMENTATION = LICENSE|DOCUMENTATION =|' Makefile || die
+
+ default
+}
+
+src_configure() {
+ ./configure \
+ --prefix="${EPREFIX}"/usr \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ --disable-lpeg-static \
+ $(use_enable lua) \
+ $(use_enable ncurses curses) \
+ $(use_enable selinux) \
+ $(use_enable tre) || die
+}
+
+update_symlinks() {
+ einfo "Calling eselect vi update --if-unset"
+ eselect vi update --if-unset
+}
+
+pkg_postrm() {
+ update_symlinks
+}
+
+pkg_postinst() {
+ update_symlinks
+}
diff --git a/app-editors/vis/vis-9999.ebuild b/app-editors/vis/vis-9999.ebuild
index 09bd443398c8..7887e2ae1f55 100644
--- a/app-editors/vis/vis-9999.ebuild
+++ b/app-editors/vis/vis-9999.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-MY_PTV=0.5
+VIS_TEST_COMMIT="783b7ef67aa360f0b9bd44fa5ea47e644bc49d69"
LUA_COMPAT=( lua5-2 lua5-3 lua5-4 )
inherit lua-single
@@ -12,8 +12,10 @@ if [ "${PV}" == "9999" ]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/martanne/vis.git"
else
- SRC_URI="https://github.com/martanne/vis/releases/download/v${PV}/${P}.tar.gz
- test? ( https://github.com/martanne/vis-test/releases/download/v${MY_PTV}/vis-test-${MY_PTV}.tar.gz )"
+ SRC_URI="
+ https://github.com/martanne/vis/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
+ test? ( https://github.com/martanne/vis-test/archive/${VIS_TEST_COMMIT}.tar.gz -> vis-test-${VIS_TEST_COMMIT}.tar.gz )
+ "
KEYWORDS="~amd64 ~arm ~riscv ~x86"
fi
@@ -26,12 +28,15 @@ REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )"
RESTRICT="!test? ( test )"
# - Known to also work with NetBSD curses
-DEPEND="dev-libs/libtermkey
+DEPEND="
+ dev-libs/libtermkey
sys-apps/acl
ncurses? ( sys-libs/ncurses:0= )
lua? ( ${LUA_DEPS} )
- tre? ( dev-libs/tre )"
-RDEPEND="${DEPEND}
+ tre? ( dev-libs/tre )
+"
+RDEPEND="
+ ${DEPEND}
app-eselect/eselect-vi
lua? (
$(lua_gen_cond_dep 'dev-lua/lpeg[${LUA_USEDEP}]')
@@ -51,15 +56,9 @@ src_prepare() {
if use test; then
if [ ! "${PV}" == "9999" ]; then
rm -r test || die
- mv "${WORKDIR}/vis-test-${MY_PTV}" test || die
+ mv "${WORKDIR}/vis-test-${VIS_TEST_COMMIT}" test || die
fi
- # https://bugs.gentoo.org/722014 https://github.com/martanne/vis-test/pull/22
- sed -i 's;./ccan-config > config.h;./ccan-config "${CC}" ${CFLAGS} > config.h;' test/core/Makefile || die
-
- # https://github.com/martanne/vis-test/pull/29
- sed -i 's;cpp -P;${CPP:-cpp} -P;' test/vim/test.sh || die
-
# https://github.com/martanne/vis-test/issues/27 a Werror clone
sed -i 's;|| strstr(output, "warning");;' test/core/ccan-config.c || die
fi