app-arch/par: Port to EAPI 6
authorDavid Seifert <soap@gentoo.org>
Fri, 29 Dec 2017 12:33:45 +0000 (13:33 +0100)
committerDavid Seifert <soap@gentoo.org>
Fri, 29 Dec 2017 13:16:21 +0000 (14:16 +0100)
Package-Manager: Portage-2.3.19, Repoman-2.3.6

app-arch/par/files/par-1.1-fix-build-system.patch [new file with mode: 0644]
app-arch/par/par-1.1.ebuild

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 (file)
index 0000000..3036157
--- /dev/null
@@ -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
index a0bb3fff9ad7b6e6d9edfab9fcbfeef82957e95a..63ac82a7d4728496cb662cbff6ce5126be3a8b63 100644 (file)
@@ -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
 }