diff options
author | Petr Vaněk <arkamar@atlas.cz> | 2023-01-26 14:09:53 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-02-08 17:15:52 +0000 |
commit | 8a7dc41ca137f073648f87c8af7016f0c9d60f90 (patch) | |
tree | 4ab592a2dc70c2aabd8ad63c403e3d06d3347268 /app-admin | |
parent | net-analyzer/monitoring-plugins: fix check_http segfault (diff) | |
download | gentoo-8a7dc41ca137f073648f87c8af7016f0c9d60f90.tar.gz gentoo-8a7dc41ca137f073648f87c8af7016f0c9d60f90.tar.bz2 gentoo-8a7dc41ca137f073648f87c8af7016f0c9d60f90.zip |
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>
Diffstat (limited to 'app-admin')
-rw-r--r-- | app-admin/entr/Manifest | 1 | ||||
-rw-r--r-- | app-admin/entr/entr-5.3.ebuild | 40 | ||||
-rw-r--r-- | app-admin/entr/files/entr-5.3-no-which.patch | 16 |
3 files changed, 57 insertions, 0 deletions
diff --git a/app-admin/entr/Manifest b/app-admin/entr/Manifest index db4f01b0349a..702f040f8b4b 100644 --- a/app-admin/entr/Manifest +++ b/app-admin/entr/Manifest @@ -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 diff --git a/app-admin/entr/entr-5.3.ebuild b/app-admin/entr/entr-5.3.ebuild new file mode 100644 index 000000000000..cd6c30b6b897 --- /dev/null +++ b/app-admin/entr/entr-5.3.ebuild @@ -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 +} diff --git a/app-admin/entr/files/entr-5.3-no-which.patch b/app-admin/entr/files/entr-5.3-no-which.patch new file mode 100644 index 000000000000..fbc96fe697f4 --- /dev/null +++ b/app-admin/entr/files/entr-5.3-no-which.patch @@ -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 +-- |