summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-misc')
-rw-r--r--app-misc/cpipe/cpipe-3.0.3-r1.ebuild (renamed from app-misc/cpipe/cpipe-3.0.3.ebuild)23
-rw-r--r--app-misc/cpipe/files/cpipe-3.0.3-makefile.patch29
2 files changed, 38 insertions, 14 deletions
diff --git a/app-misc/cpipe/cpipe-3.0.3.ebuild b/app-misc/cpipe/cpipe-3.0.3-r1.ebuild
index ff2b6594a3f6..e1798e5b3092 100644
--- a/app-misc/cpipe/cpipe-3.0.3.ebuild
+++ b/app-misc/cpipe/cpipe-3.0.3-r1.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=8
inherit toolchain-funcs
@@ -13,20 +13,15 @@ LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86"
-src_prepare() {
- default
+PATCHES=( "${FILESDIR}"/${P}-makefile.patch )
- 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_configure() {
+ tc-export CC
}
src_install() {
- dobin "${PN}"
- doman "${PN}.1"
+ dobin cpipe
+
+ einstalldocs
+ doman cpipe.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.in >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