app-backup/cpdup: Port to EAPI 6
authorDavid Seifert <soap@gentoo.org>
Thu, 28 Dec 2017 14:25:43 +0000 (15:25 +0100)
committerDavid Seifert <soap@gentoo.org>
Thu, 28 Dec 2017 15:07:04 +0000 (16:07 +0100)
Package-Manager: Portage-2.3.19, Repoman-2.3.6

app-backup/cpdup/cpdup-1.18.ebuild
app-backup/cpdup/files/cpdup-1.11-unused.patch

index b3cd0a45df5e2b054eee4b1f147dc67bb83ac118..cf88a6bfd5308f0808d43d10e902f17c92b3a69d 100644 (file)
@@ -1,7 +1,9 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-inherit eutils toolchain-funcs
+EAPI=6
+
+inherit toolchain-funcs
 
 DESCRIPTION="A comprehensive filesystem mirroring program"
 HOMEPAGE="http://apollo.backplane.com/FreeSrc/"
@@ -16,30 +18,30 @@ DEPEND=""
 RDEPEND=""
 
 S="${WORKDIR}/${PN}"
+PATCHES=( "${FILESDIR}"/${PN}-1.11-unused.patch )
 
-src_unpack() {
-       unpack ${A}
-       cd "${S}"
-
-       epatch "${FILESDIR}"/${PN}-1.11-unused.patch
+src_prepare() {
+       default
 
        if use userland_GNU; then
-               cp "${FILESDIR}"/Makefile.linux Makefile
+               cp "${FILESDIR}"/Makefile.linux Makefile || die
                # bits/stat.h has __unused too
-               sed -i 's/__unused/__cpdup_unused/' *.c
-               echo "#define strlcpy(a,b,c) strncpy(a,b,c)" >> cpdup.h
+               sed -i 's/__unused/__cpdup_unused/' *.c || die
+               echo "#define strlcpy(a,b,c) strncpy(a,b,c)" >> cpdup.h || die
        fi
 }
 
-src_compile() {
+src_configure() {
        tc-export CC
-       use threads || MAKEOPTS="$MAKEOPTS NOPTHREADS=1"
-       MAKE=make emake || die "emake failed"
+       use threads || EXTRA_MAKE_OPTS="NOPTHREADS=1"
+}
+
+src_compile() {
+       MAKE=make emake ${EXTRA_MAKE_OPTS}
 }
 
 src_install() {
-       dobin cpdup || die "cannot install cpdup"
+       dobin cpdup
        doman cpdup.1
-       docinto scripts
-       dodoc scripts/*
+       dodoc -r scripts
 }
index 1757cb441adcb53fd17351eef88d3e63b9a5e7b0..5544afbeddf939bf85be381defc0f87bcae4ce76 100644 (file)
@@ -1,5 +1,5 @@
---- cpdup.c.orig       2009-02-05 12:22:10.000000000 +0100
-+++ cpdup.c    2009-02-05 12:23:23.000000000 +0100
+--- a/cpdup.c
++++ b/cpdup.c
 @@ -1543,7 +1543,11 @@
   */