commit: 00c564eaa6d7dbec1b2f932db238f9a592690ed0 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sat May 27 05:18:25 2023 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat May 27 06:12:12 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00c564ea
dev-libs/tntnet: wire up tests Signed-off-by: Sam James <sam <AT> gentoo.org> dev-libs/tntnet/tntnet-3.0.ebuild | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/dev-libs/tntnet/tntnet-3.0.ebuild b/dev-libs/tntnet/tntnet-3.0.ebuild index 24ed5d0c4ea1..af01d14155c8 100644 --- a/dev-libs/tntnet/tntnet-3.0.ebuild +++ b/dev-libs/tntnet/tntnet-3.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 2021 Gentoo Authors +# Copyright 2021-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -12,9 +12,11 @@ SRC_URI="http://www.tntnet.org/download/${P}.tar.gz" LICENSE="LGPL-2.1" SLOT="0" KEYWORDS="amd64 ~sparc x86" -IUSE="doc gnutls server ssl" +IUSE="doc gnutls server ssl test" +RESTRICT="!test? ( test )" -RDEPEND=">=dev-libs/cxxtools-3.0 +RDEPEND=" + >=dev-libs/cxxtools-3.0 sys-libs/zlib[minizip] ssl? ( gnutls? ( @@ -24,10 +26,13 @@ RDEPEND=">=dev-libs/cxxtools-3.0 !gnutls? ( dev-libs/openssl:0= ) - )" + ) +" DEPEND="${RDEPEND}" -BDEPEND="virtual/pkgconfig - app-arch/zip" +BDEPEND=" + app-arch/zip + virtual/pkgconfig +" PATCHES=( "${FILESDIR}/${PN}-3.0-autoconf-2.70.patch" @@ -48,7 +53,7 @@ src_prepare() { } src_configure() { - local myconf="" + local myconf="$(use_enable test unittest)" if ! use server; then myconf="${myconf} --disable-server" @@ -57,6 +62,12 @@ src_configure() { econf ${myconf} } +src_test() { + cd test || die + emake || die + ./tntnet-test || die +} + src_install() { emake DESTDIR="${D}" install
