commit:     db695fb165071cb86660dda3f99bc1930d54150d
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 28 13:10:05 2017 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Thu Dec 28 15:06:13 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db695fb1

app-benchmarks/pipebench: [QA] Respect LDFLAGS

Closes: https://bugs.gentoo.org/334909
Package-Manager: Portage-2.3.19, Repoman-2.3.6

 .../files/pipebench-0.40-fix-build-system.patch    | 21 ++++++++++++++++++++
 app-benchmarks/pipebench/pipebench-0.40-r2.ebuild  | 23 +++++-----------------
 2 files changed, 26 insertions(+), 18 deletions(-)

diff --git 
a/app-benchmarks/pipebench/files/pipebench-0.40-fix-build-system.patch 
b/app-benchmarks/pipebench/files/pipebench-0.40-fix-build-system.patch
new file mode 100644
index 00000000000..2d79d80ef7b
--- /dev/null
+++ b/app-benchmarks/pipebench/files/pipebench-0.40-fix-build-system.patch
@@ -0,0 +1,21 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,16 +1,11 @@
+ # $Id: Makefile,v 1.2 2002/12/15 19:58:36 marvin Exp $
+ 
+-CC=gcc
+-CFLAGS=-Wall -w -pedantic
+ 
+ all: pipebench
+ doc: pipebench.1
+ install: pipebench
+-      cp pipebench /usr/local/bin/
+-      cp pipebench.1 /usr/local/man/man1/
+-
+-pipebench: pipebench.c
+-      $(CC) $(CFLAGS) -o pipebench pipebench.c
++      mkdir -p $(DESTDIR)$(EPREFIX)/usr/bin && cp pipebench 
$(DESTDIR)$(EPREFIX)/usr/bin/
++      mkdir -p $(DESTDIR)$(EPREFIX)/usr/share/man/man1 && cp pipebench.1 
$(DESTDIR)$(EPREFIX)/usr/share/man/man1/
+ 
+ pipebench.1: pipebench.yodl
+       yodl2man -o pipebench.1 pipebench.yodl

diff --git a/app-benchmarks/pipebench/pipebench-0.40-r2.ebuild 
b/app-benchmarks/pipebench/pipebench-0.40-r2.ebuild
index 610bcc5df90..2542f0f9d36 100644
--- a/app-benchmarks/pipebench/pipebench-0.40-r2.ebuild
+++ b/app-benchmarks/pipebench/pipebench-0.40-r2.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=6
 
-inherit toolchain-funcs
+inherit flag-o-matic toolchain-funcs
 
 DESCRIPTION="Measures the speed of stdin/stdout communication"
 HOMEPAGE="http://www.habets.pp.se/synscan/programs.php?prog=pipebench";
@@ -14,22 +14,9 @@ SLOT="0"
 KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~x86 ~arm-linux ~x86-linux"
 IUSE=""
 
-src_prepare() {
-       sed -i Makefile \
-               -e 's:CFLAGS=-Wall:CFLAGS+= -Wall:' \
-               -e 's:$(CFLAGS) -o:$(LDFLAGS) &:g' \
-               -e "s:/usr/local/bin/:${ED}/usr/bin:" \
-               -e "s:/usr/local/man/man1/:${ED}/usr/share/man/man1:" \
-               || die "sed Makefile"
-       default
-}
-
-src_compile() {
-       emake CC=$(tc-getCC)
-}
+PATCHES=( "${FILESDIR}"/${PN}-0.40-fix-build-system.patch )
 
-src_install() {
-       dodir /usr/{bin,share/man/man1}
-       emake install
-       dodoc README
+src_configure() {
+       append-cflags -Wall -w -pedantic
+       tc-export CC
 }

Reply via email to