mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-23 11:17:21 -08:00
app-admin/entr: add 5.3
- Unit tests were replaced with system tests in commit [1]. They require vim, tmux, git and file which are set as BDEEPEND under test USE flag. - The `which` command used in test script was replaced by `command -pv` with a patch taken from upstream [2]. - PREFIX is set by exporting PREFIX variable rather than sed patching Makefile - CC is newly exported with tc-export function in configuration phase which allows us to use default src_compile function - Tests seem to work best if SHELL is set to /bin/bash which is also exported in configuration phase in order to avoid local src_test function just for exporting one variable. [1] https://github.com/eradman/entr/commit/944eb59d31dd26894b8822f8b711b1dbfdc67049 [2] https://github.com/eradman/entr/pull/108 Signed-off-by: Petr Vaněk <arkamar@atlas.cz> Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -1 +1,2 @@
|
||||
DIST entr-5.2.tar.gz 25834 BLAKE2B c14eddaaf26994679991c43b38dcea0f1cbf53ce517af462cfed9dea2c914d9c1719053cb3b9f28f04d0cbf8719fe5612963c1428832e02bd55545ba33c72556 SHA512 b12310b6695f0b3d3d830b651dd182ddf2321aad38f569066cc2e5b17570070e48eb4900725c88c1d31a8ff71099aba78fb7508ad60706265cbdf8f29257eaaa
|
||||
DIST entr-5.3.tar.gz 20905 BLAKE2B 79b4c39ee3f9530db1d8a6cd62a6aa925e201d6b5b370b25c3884b160a83658688204005db612b1d18743ba39f0de6ccad8492910142ebfff7b550a5ec48516d SHA512 b160cb60de99a743226b472256d937ef6ace54f5350a83420f59ac2706cd0fb042d6f85fcac6c73e76c161c6225b956df8b00156dea9ce55d8b8225e8ca13e7f
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit edo toolchain-funcs
|
||||
|
||||
DESCRIPTION="Run arbitrary commands when files change"
|
||||
HOMEPAGE="
|
||||
https://eradman.com/entrproject/
|
||||
https://github.com/eradman/entr
|
||||
"
|
||||
SRC_URI="https://eradman.com/entrproject/code/${P}.tar.gz"
|
||||
|
||||
LICENSE="ISC"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
BDEPEND="
|
||||
test? (
|
||||
app-editors/vim
|
||||
app-misc/tmux
|
||||
dev-vcs/git
|
||||
sys-apps/file
|
||||
)
|
||||
"
|
||||
|
||||
PATCH=(
|
||||
"${FILESDIR}/${P}-no-which.patch"
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
tc-export CC
|
||||
export PREFIX="${EPREFIX}/usr"
|
||||
export SHELL="${BROOT}/bin/bash"
|
||||
|
||||
edo ./configure
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
Upstream-PR: https://github.com/eradman/entr/pull/108
|
||||
|
||||
diff --git a/system_test.sh b/system_test.sh
|
||||
index 2687bb3..dbec661 100755
|
||||
--- a/system_test.sh
|
||||
+++ b/system_test.sh
|
||||
@@ -40,7 +40,7 @@ trap "$clear_tty; $clear_tmux; $clear_tmp" EXIT
|
||||
|
||||
utils="file pgrep git vim tmux"
|
||||
for util in $utils; do
|
||||
- p=$(which $util 2> /dev/null) || {
|
||||
+ p=$(command -pv $util) || {
|
||||
echo "ERROR: could not locate the '$util' utility" >&2
|
||||
echo "System tests depend on the following: $utils" >&2
|
||||
exit 1
|
||||
--
|
||||
Reference in New Issue
Block a user