diff options
author | Sam James <sam@gentoo.org> | 2023-12-15 20:53:15 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-12-15 20:53:24 +0000 |
commit | 7bd179de31802be8768df5466c9de58594a4abef (patch) | |
tree | f2b02d788a032311205fe743f764bdb4510750f0 /sys-block/mbuffer | |
parent | media-gfx/grub-splashes: treeclean (diff) | |
download | gentoo-7bd179de31802be8768df5466c9de58594a4abef.tar.gz gentoo-7bd179de31802be8768df5466c9de58594a4abef.tar.bz2 gentoo-7bd179de31802be8768df5466c9de58594a4abef.zip |
sys-block/mbuffer: avoid calling which
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-block/mbuffer')
-rw-r--r-- | sys-block/mbuffer/files/mbuffer-20230301-which.patch | 23 | ||||
-rw-r--r-- | sys-block/mbuffer/mbuffer-20230301-r1.ebuild | 69 |
2 files changed, 92 insertions, 0 deletions
diff --git a/sys-block/mbuffer/files/mbuffer-20230301-which.patch b/sys-block/mbuffer/files/mbuffer-20230301-which.patch new file mode 100644 index 000000000000..89054d646faf --- /dev/null +++ b/sys-block/mbuffer/files/mbuffer-20230301-which.patch @@ -0,0 +1,23 @@ +--- a/mkversion.sh ++++ b/mkversion.sh +@@ -21,9 +21,9 @@ + + VERSION_H=${1:-version.h} + NEWFILE=`mktemp -t version.h.XXXXXXXXXX` +-SED=`which gsed 2> /dev/null` ++SED=`command -v gsed 2> /dev/null` + if [ $? != 0 ]; then +- SED=`which sed` ++ SED=`command -v sed` + fi + + vinfo=0 +@@ -51,7 +51,7 @@ if [ -f .hg_archival.txt ]; then + rm $NEWFILE + fi + elif [ -d .hg ]; then +- HG=${HG:-`which hg`} ++ HG=${HG:-`command -v hg`} + if [ "$?" == "0" ]; then + # Check if we have modified, removed, added or deleted files. + if [ `$HG st -mard | wc -l` != "0" ]; then diff --git a/sys-block/mbuffer/mbuffer-20230301-r1.ebuild b/sys-block/mbuffer/mbuffer-20230301-r1.ebuild new file mode 100644 index 000000000000..e44e9ed2ac55 --- /dev/null +++ b/sys-block/mbuffer/mbuffer-20230301-r1.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="M(easuring)buffer is a replacement for buffer with additional functionality" +HOMEPAGE="https://www.maier-komor.de/mbuffer.html" +SRC_URI="https://www.maier-komor.de/software/mbuffer/${P}.tgz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="debug ssl test" +REQUIRED_USE="test? ( ssl )" +RESTRICT="!test? ( test )" + +RDEPEND=" + ssl? ( + dev-libs/openssl + ) +" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}/${PN}-20180410-sysconfdir.patch" + "${FILESDIR}/${PN}-20200929-find-OBJDUMP.patch" + "${FILESDIR}/${PN}-20230301-which.patch" +) + +src_prepare() { + default + + ln -s "${DISTDIR}"/${P}.tgz test.tar # bug #258881 + + mv configure.in configure.ac || die + eautoreconf +} + +src_configure() { + local myeconfargs=( + $(use_enable ssl md5) + $(use_enable debug) + ) + econf "${myeconfargs[@]}" +} + +src_test() { + if has usersandbox ${FEATURES} || has network-sandbox ${FEATURES}; then + ewarn "Some tests may fail with FEATURES=usersandbox or" + ewarn "FEATURES=network-sandbox; Skipping tests because" + ewarn "test suite would hang forever in such environments!" + return 0; + fi + + # Enforce MAKEOPTS=-j1 because src_test() spawns multiple listener + # using same port and src_install may have problems (with /etc folder) + local -x MAKEOPTS=-j1 + + default +} + +pkg_postinst() { + if ! has_version "app-arch/mt-st"; then + elog "" + elog "If you want autoloader support you need to install \"app-arch/mt-st\" in addition!" + fi +} |