commit:     7de330c3c4863c55526d29e3f38af67e913e5d6d
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 29 12:33:45 2017 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Fri Dec 29 13:16:21 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7de330c3

app-arch/par: Port to EAPI 6

Package-Manager: Portage-2.3.19, Repoman-2.3.6

 app-arch/par/files/par-1.1-fix-build-system.patch | 13 +++++++++++++
 app-arch/par/par-1.1.ebuild                       | 20 ++++++++------------
 2 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/app-arch/par/files/par-1.1-fix-build-system.patch 
b/app-arch/par/files/par-1.1-fix-build-system.patch
new file mode 100644
index 00000000000..30361579f22
--- /dev/null
+++ b/app-arch/par/files/par-1.1-fix-build-system.patch
@@ -0,0 +1,13 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,8 +1,8 @@
+ 
+-CFLAGS=-g -W -Wall -Wno-unused -O2
++CFLAGS += -W -Wall -Wno-unused
+ 
+ par: backend.o checkpar.o makepar.o rwpar.o rs.o md5.o fileops.o main.o 
readoldpar.o interface.o ui_text.o
+-      $(CC) -o $@ $^
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
+ 
+ clean:
+       rm -f core par par.exe *.o

diff --git a/app-arch/par/par-1.1.ebuild b/app-arch/par/par-1.1.ebuild
index a0bb3fff9ad..63ac82a7d47 100644
--- a/app-arch/par/par-1.1.ebuild
+++ b/app-arch/par/par-1.1.ebuild
@@ -1,7 +1,7 @@
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=2
+EAPI=6
 
 inherit toolchain-funcs
 
@@ -14,23 +14,19 @@ SLOT="0"
 KEYWORDS="amd64 ppc sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
 IUSE=""
 
-DEPEND="!app-text/par
+DEPEND="
+       !app-text/par
        !dev-util/par"
 RDEPEND="${DEPEND}"
 
 S="${WORKDIR}"/par-cmdline
+PATCHES=( "${FILESDIR}"/${PN}-1.1-fix-build-system.patch )
 
-src_prepare() {
-       sed -i \
-               -e 's/\$(CC)/$(LINK.o)/' \
-               Makefile || die "sed failed"
-}
-
-src_compile() {
-       emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "emake failed"
+src_configure() {
+       tc-export CC
 }
 
 src_install() {
-       dobin par || die "dobin failed"
-       dodoc AUTHORS NEWS README
+       dobin par
+       einstalldocs
 }

Reply via email to