app-backup/backintime: Switch to PYTHON_MULTI_USEDEP API
[gentoo.git] / app-backup / cpdup / cpdup-1.18.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit toolchain-funcs
7
8 DESCRIPTION="A comprehensive filesystem mirroring program"
9 HOMEPAGE="http://apollo.backplane.com/FreeSrc/"
10 SRC_URI="http://apollo.backplane.com/FreeSrc/${P}.tgz"
11
12 LICENSE="BSD-2"
13 SLOT="0"
14 KEYWORDS="~amd64"
15 IUSE="userland_GNU threads"
16
17 DEPEND=""
18 RDEPEND=""
19
20 S="${WORKDIR}/${PN}"
21 PATCHES=( "${FILESDIR}"/${PN}-1.11-unused.patch )
22
23 src_prepare() {
24         default
25
26         if use userland_GNU; then
27                 cp "${FILESDIR}"/Makefile.linux Makefile || die
28                 # bits/stat.h has __unused too
29                 sed -i 's/__unused/__cpdup_unused/' *.c || die
30                 echo "#define strlcpy(a,b,c) strncpy(a,b,c)" >> cpdup.h || die
31         fi
32 }
33
34 src_configure() {
35         tc-export CC
36         use threads || EXTRA_MAKE_OPTS="NOPTHREADS=1"
37 }
38
39 src_compile() {
40         MAKE=make emake ${EXTRA_MAKE_OPTS}
41 }
42
43 src_install() {
44         dobin cpdup
45         doman cpdup.1
46         dodoc -r scripts
47 }