From 547998220914f0d2d7bbf9b4e0ae2335c7deb6c4 Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Sat, 16 Sep 2023 14:09:52 +0100 Subject: sys-fs/safecopy: Fix test issues, EAPI 8 Closes: https://bugs.gentoo.org/838091 Signed-off-by: James Le Cuirot --- sys-fs/safecopy/files/safecopy-tests.patch | 22 ++++++++++++++++++++ sys-fs/safecopy/safecopy-1.7-r1.ebuild | 33 ++++++++++++++++++++++++++++++ sys-fs/safecopy/safecopy-1.7.ebuild | 32 ----------------------------- 3 files changed, 55 insertions(+), 32 deletions(-) create mode 100644 sys-fs/safecopy/files/safecopy-tests.patch create mode 100644 sys-fs/safecopy/safecopy-1.7-r1.ebuild delete mode 100644 sys-fs/safecopy/safecopy-1.7.ebuild (limited to 'sys-fs/safecopy') diff --git a/sys-fs/safecopy/files/safecopy-tests.patch b/sys-fs/safecopy/files/safecopy-tests.patch new file mode 100644 index 000000000000..84587de17084 --- /dev/null +++ b/sys-fs/safecopy/files/safecopy-tests.patch @@ -0,0 +1,22 @@ +diff -Naur a/simulator/src/simulatorlb.c b/simulator/src/simulatorlb.c +--- a/simulator/src/simulatorlb.c 2009-07-28 15:31:16.000000000 +0100 ++++ b/simulator/src/simulatorlb.c 2023-09-16 13:52:16.111512487 +0100 +@@ -2,7 +2,7 @@ + * This file is copyright ©2009 Corvus Corax + * Distributed under the terms of the GPL version 2 or higher + */ +-#define _FILE_OFFSET_BITS 64 ++#define _LARGEFILE64_SOURCE + #include + + #ifdef USE_GNU_SOURCE +@@ -531,3 +531,9 @@ + } + return realread(fd,buf,count); + } ++ ++// copy_file_range() may be used instead so force failure to fall back to read(). ++ssize_t copy_file_range(int fd_in, off_t off_in, int fd_out, off_t off_out, size_t len, unsigned int flags) { ++ errno = EXDEV; ++ return -1; ++} diff --git a/sys-fs/safecopy/safecopy-1.7-r1.ebuild b/sys-fs/safecopy/safecopy-1.7-r1.ebuild new file mode 100644 index 000000000000..9991c27a9c67 --- /dev/null +++ b/sys-fs/safecopy/safecopy-1.7-r1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Tool for fault-tolerant data recovery from damaged (IO-errors) devices or files" +HOMEPAGE="https://safecopy.sourceforge.net" +SRC_URI="mirror://sourceforge/safecopy/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="test" +RESTRICT="!test? ( test )" + +PATCHES=( "${FILESDIR}"/${PN}-tests.patch ) +DOCS=( README ) + +src_configure() { + econf + cd simulator || die + use test && econf +} + +src_compile() { + emake + use test && emake -C simulator +} + +src_test() { + cd test || die + ./test.sh || die +} diff --git a/sys-fs/safecopy/safecopy-1.7.ebuild b/sys-fs/safecopy/safecopy-1.7.ebuild deleted file mode 100644 index ea11400db323..000000000000 --- a/sys-fs/safecopy/safecopy-1.7.ebuild +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DESCRIPTION="Tool for fault-tolerant data recovery from damaged (io-errors) devices or files" -HOMEPAGE="http://safecopy.sourceforge.net" -SRC_URI="mirror://sourceforge/safecopy/${P}.tar.gz" - -LICENSE="GPL-2+" -SLOT="0" -KEYWORDS="amd64 x86" -IUSE="test" -RESTRICT="!test? ( test )" - -DOCS=( README ) - -src_configure() { - econf - cd simulator || die - use test && econf -} - -src_compile() { - emake - use test && emake -C simulator -} - -src_test() { - cd test || die - ./test.sh || die -} -- cgit v1.2.3-65-gdbad