abcbbbaedd88a2a0dc26e482e013c2838e858df6
[gentoo.git] / sys-block / parted / parted-3.2_p25.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 inherit autotools flag-o-matic
6
7 DESCRIPTION="Create, destroy, resize, check, copy partitions and file systems"
8 HOMEPAGE="https://www.gnu.org/software/parted"
9 SRC_URI="
10         mirror://gnu/${PN}/${P/_p*/}.tar.xz
11         mirror://debian/pool/main/p/${PN}/${PN}_${PV/_p/-}.debian.tar.xz
12 "
13
14 LICENSE="GPL-3"
15 SLOT="0"
16 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
17 IUSE="+debug device-mapper nls readline selinux static-libs"
18 RESTRICT="test"
19
20 # specific version for gettext needed
21 # to fix bug 85999
22 RDEPEND="
23         >=sys-fs/e2fsprogs-1.27
24         device-mapper? ( >=sys-fs/lvm2-2.02.45 )
25         readline? ( >=sys-libs/readline-5.2:0= >=sys-libs/ncurses-5.7-r7:0= )
26         selinux? ( sys-libs/libselinux )
27         elibc_uclibc? ( dev-libs/libiconv )
28 "
29 DEPEND="
30         ${RDEPEND}
31         nls? ( >=sys-devel/gettext-0.12.1-r2 )
32         virtual/pkgconfig
33 "
34 PATCHES=(
35         "${FILESDIR}"/${PN}-3.2-devmapper.patch
36         "${FILESDIR}"/${PN}-3.2-po4a-mandir.patch
37 )
38 S=${WORKDIR}/${P/_p*/}
39
40 src_prepare() {
41         default
42         sed -i -e '/atari\.patch/d' "${WORKDIR}"/debian/patches/series || die
43         for patch in $(< "${WORKDIR}"/debian/patches/series); do
44                 eapply "${WORKDIR}/debian/patches/$patch"
45         done
46
47         eautoreconf
48 }
49
50 src_configure() {
51         use elibc_uclibc && append-libs -liconv
52         econf \
53                 $(use_enable debug) \
54                 $(use_enable device-mapper) \
55                 $(use_enable nls) \
56                 $(use_enable selinux) \
57                 $(use_enable static-libs static) \
58                 $(use_with readline) \
59                 --disable-rpath \
60                 --disable-silent-rules
61 }
62
63 DOCS=( AUTHORS BUGS ChangeLog NEWS README THANKS TODO doc/{API,FAT,USER.jp} )
64
65 src_install() {
66         default
67
68         find "${D}" -name '*.la' -delete || die
69 }