From 00384c9045401077633e1aa82295448b2cdd1e92 Mon Sep 17 00:00:00 2001 From: David Seifert Date: Sun, 31 Jul 2022 22:03:21 +0200 Subject: app-misc/cpipe: update EAPI 6 -> 8 Signed-off-by: David Seifert --- app-misc/cpipe/cpipe-3.0.3-r1.ebuild | 27 +++++++++++++++++++++ app-misc/cpipe/cpipe-3.0.3.ebuild | 32 ------------------------- app-misc/cpipe/files/cpipe-3.0.3-makefile.patch | 29 ++++++++++++++++++++++ 3 files changed, 56 insertions(+), 32 deletions(-) create mode 100644 app-misc/cpipe/cpipe-3.0.3-r1.ebuild delete mode 100644 app-misc/cpipe/cpipe-3.0.3.ebuild create mode 100644 app-misc/cpipe/files/cpipe-3.0.3-makefile.patch diff --git a/app-misc/cpipe/cpipe-3.0.3-r1.ebuild b/app-misc/cpipe/cpipe-3.0.3-r1.ebuild new file mode 100644 index 000000000000..e1798e5b3092 --- /dev/null +++ b/app-misc/cpipe/cpipe-3.0.3-r1.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="Counting pipe, measures data transfered over pipe" +HOMEPAGE="https://github.com/HaraldKi/cpipe" +SRC_URI="https://github.com/HaraldKi/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" + +PATCHES=( "${FILESDIR}"/${P}-makefile.patch ) + +src_configure() { + tc-export CC +} + +src_install() { + dobin cpipe + + einstalldocs + doman cpipe.1 +} diff --git a/app-misc/cpipe/cpipe-3.0.3.ebuild b/app-misc/cpipe/cpipe-3.0.3.ebuild deleted file mode 100644 index ff2b6594a3f6..000000000000 --- a/app-misc/cpipe/cpipe-3.0.3.ebuild +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit toolchain-funcs - -DESCRIPTION="Counting pipe, measures data transfered over pipe" -HOMEPAGE="https://github.com/HaraldKi/cpipe" -SRC_URI="https://github.com/HaraldKi/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 x86" - -src_prepare() { - default - - sed -i \ - -e "s/CFLAGS =/CFLAGS =${CFLAGS} /" \ - -e "s/-lm/-lm ${LDFLAGS}/" \ - -e "s/744/644/" makefile || die "sed failed" -} - -src_compile() { - emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" -} - -src_install() { - dobin "${PN}" - doman "${PN}.1" -} diff --git a/app-misc/cpipe/files/cpipe-3.0.3-makefile.patch b/app-misc/cpipe/files/cpipe-3.0.3-makefile.patch new file mode 100644 index 000000000000..d68bb56f2967 --- /dev/null +++ b/app-misc/cpipe/files/cpipe-3.0.3-makefile.patch @@ -0,0 +1,29 @@ +--- a/makefile ++++ b/makefile +@@ -15,14 +15,14 @@ + MANDIR=$(prefix)/man/man1 + + ## Your favorite compiler flags. +-CFLAGS = -O2 -W -Wall -pedantic ++CFLAGS += -W -Wall -pedantic ++LDLIBS = -lm + + VERSION=$(shell cat .version) + ######################################################################## + all: cpipe cpipe.1 + +-cpipe: cpipe.o cmdline.o +- $(CC) -o $@ cpipe.o cmdline.o -lm ++cpipe: cmdline.o + + cpipe.1: cpipe.1.in + sed -e "s/|VERSION|/${VERSION}/g" cpipe.1 +@@ -37,7 +37,7 @@ + install: cpipe cpipe.1 + mkdir -p $(BINDIR) $(MANDIR) + cp cpipe $(BINDIR); chmod 755 $(BINDIR)/cpipe +- cp cpipe.1 $(MANDIR); chmod 744 $(MANDIR)/cpipe.1 ++ cp cpipe.1 $(MANDIR); chmod 644 $(MANDIR)/cpipe.1 + + uninstall: + -rm $(BINDIR)/cpipe -- cgit v1.2.3-65-gdbad