1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
7 inherit python-single-r1 xdg-utils
9 DESCRIPTION="A library for manipulating block devices"
10 HOMEPAGE="https://github.com/storaged-project/libblockdev"
11 if [[ "${PV}" == *9999 ]] ; then
12 inherit autotools git-r3
13 EGIT_REPO_URI="https://github.com/storaged-project/libblockdev.git"
15 sys-devel/autoconf-archive
19 #MY_P="${PN}-${MY_PV}"
20 #SRC_URI="https://github.com/storaged-project/${PN}/archive/${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
21 SRC_URI="https://github.com/storaged-project/${PN}/releases/download/${MY_PV}/${P}.tar.gz"
22 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
23 #S="${WORKDIR}/${MY_P}"
27 IUSE="bcache +cryptsetup device-mapper dmraid escrow gtk-doc introspection lvm kbd test +tools vdo"
28 RESTRICT="!test? ( test )"
31 >=dev-libs/glib-2.42.2
34 >=sys-apps/util-linux-2.27
35 >=sys-block/parted-3.1
41 >=sys-fs/cryptsetup-1.6.7:=
43 device-mapper? ( sys-fs/lvm2 )
52 vdo? ( dev-libs/libyaml )
62 gtk-doc? ( dev-util/gtk-doc )
63 introspection? ( >=dev-libs/gobject-introspection-1.3.0 )
66 REQUIRED_USE="${PYTHON_REQUIRED_USE}
67 escrow? ( cryptsetup )"
70 python-single-r1_pkg_setup
74 xdg_environment_reset #623992
76 [[ "${PV}" == *9999 ]] && eautoreconf
86 $(use_enable introspection)
87 $(use_enable test tests)
89 $(use_with cryptsetup crypto)
90 $(use_with device-mapper dm)
96 $(use_with lvm lvm-dbus)
100 if python_is_python3 ; then
111 econf "${myeconfargs[@]}"
116 find "${ED}" -type f -name "*.la" -delete || die
117 # This is installed even with USE=-lvm, but libbd_lvm are omitted so it
118 # doesn't work at all.
120 rm -f "${ED}"/usr/bin/lvm-cache-stats || die