app-editors/vis: add FEATURES=test
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Wed, 25 Oct 2017 22:57:28 +0000 (00:57 +0200)
committerMichał Górny <mgorny@gentoo.org>
Fri, 9 Feb 2018 16:36:10 +0000 (17:36 +0100)
app-editors/vis/Manifest
app-editors/vis/vis-0.3.ebuild
app-editors/vis/vis-9999.ebuild

index b4b954cd9cf14600052e45406b4ca06437385439..a7f843902fef306c0613a59d09bff8a07d5cf592 100644 (file)
@@ -1 +1,2 @@
 DIST vis-0.3.tar.gz 334216 BLAKE2B 8cf89f1e3292beb5bf7bc9495e75b795225a4a29f4d949f212daf5dd42958f347b1400a0fd1bf00014b28cfbd424bb04152c35ef9025384a746e59143fc872bb SHA512 e1ca009bd7569f22dacf7464791f9f4499695d15d6e38e1be491d39e7ebe0530de643be5c1e7647e9beb7969a17efab6545d3e719fe8cf311562e89d636bba62
+DIST vis-test-0.1.tar.gz 95274 BLAKE2B e268abda50e11809d349778bb517f9be884d6d4ef8b940b5027adf9d37d091eda7fc6e274945998a9c35df372a0fd2ad499c2b686f1fe6761b54aec397b2b9aa SHA512 433a67892f27eb01f3ea6224e1ded393cd949b4d60f7c14656fdd526c02d2b309f63d39887d8d7ba11cbad3e183ab3cd1a913ac40aa29eadb7fa700eb76424b6
index e6ef1b663060a62efef15ae561dd9a4f628daf76..4f5eded38a78929bf31236c273709ecb85be6eea 100644 (file)
@@ -3,13 +3,16 @@
 
 EAPI=5
 
+MY_PTV=0.1
+
 DESCRIPTION="modern, legacy free, simple yet efficient vim-like editor"
 HOMEPAGE="https://github.com/martanne/vis"
-SRC_URI="https://github.com/martanne/vis/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI="https://github.com/martanne/vis/archive/v${PV}.tar.gz -> ${P}.tar.gz
+       test? ( https://github.com/martanne/vis-test/archive/v${MY_PTV}.tar.gz -> vis-test-${MY_PTV}.tar.gz )"
 LICENSE="ISC"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="+ncurses selinux tre"
+IUSE="+ncurses selinux test tre"
 
 #Note: vis is reported to also work with NetBSD curses
 #TODO: >=dev-lang/lua-5.2 (needed for syntax highlighting and settings)
@@ -18,6 +21,16 @@ DEPEND=" dev-libs/libtermkey
        tre? ( dev-libs/tre:= )"
 RDEPEND="${DEPEND}"
 
+src_prepare() {
+       if use test; then
+               rm -r test || die
+               mv "${WORKDIR}/vis-test-${MY_PTV}" test || die
+               if ! type -P vim &>/dev/null; then
+                       sed -i 's/.*vim.*//' test/Makefile || die
+               fi
+       fi
+}
+
 src_configure() {
        econf \
                $(use_enable ncurses curses) \
index 55adf2006010c7221dfb0a1c51c2c9ccdb25ba7b..1826f178662af3042525738ba30620945c147cfe 100644 (file)
@@ -10,7 +10,7 @@ EGIT_REPO_URI="https://github.com/martanne/vis.git"
 LICENSE="ISC"
 SLOT="0"
 KEYWORDS=""
-IUSE="+ncurses selinux tre"
+IUSE="+ncurses selinux test tre"
 
 #Note: vis is reported to also work with NetBSD curses
 #TODO: >=dev-lang/lua-5.2 (needed for syntax highlighting and settings)
@@ -19,6 +19,12 @@ DEPEND=" dev-libs/libtermkey
        tre? ( dev-libs/tre:= )"
 RDEPEND="${DEPEND}"
 
+src_prepare() {
+       if use test && ! type -P vim &>/dev/null; then
+               sed -i 's/.*vim.*//' "${S}/test/Makefile" || die
+       fi
+}
+
 src_configure() {
        econf \
                $(use_enable ncurses curses) \