PYTHON_COMPAT=( python3_{5,6,7} )
-inherit autotools python-single-r1
+inherit autotools python-r1
DESCRIPTION="Tiny library providing a C \"class\" for working with arbitrary big sizes in bytes"
HOMEPAGE="https://github.com/storaged-project/libbytesize"
eautoreconf
}
+python_do() {
+ if use python; then
+ python_foreach_impl run_in_build_dir "$@"
+ else
+ "$@"
+ fi
+}
+
src_configure() {
local myeconfargs=(
$(use_with doc gtk-doc)
$(use_with python python3)
$(use_with tools)
)
- econf "${myeconfargs[@]}"
+ local ECONF_SOURCE="${S}"
+ python_do econf "${myeconfargs[@]}"
}
-src_install() {
- default
+src_compile() {
+ python_do emake
+}
+
+src_test() {
+ python_do emake check
+}
+
+install_helper() {
+ emake DESTDIR="${D}" install
use python && python_optimize
- find "${ED}" -name "*.la*" -delete || die
+}
+
+src_install() {
+ python_do install_helper
+ einstalldocs
+ find "${ED}" -name "*.la" -type f -delete || die
}