-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
-PYTHON_COMPAT=( python{2_7,3_4} )
+EAPI=6
-inherit eutils distutils-r1
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+DISTUTILS_IN_SOURCE_BUILD=1
+
+inherit distutils-r1
DESCRIPTION="Raspberry Pi kernel mangling tool mkimage/imagetool-uncompressed.py"
HOMEPAGE="https://github.com/raspberrypi/tools/"
IUSE=""
DEPEND=""
-RDEPEND="${PYTHON_DEPS}"
+RDEPEND=""
+
+PATCHES=( "${FILESDIR}"/${P}-imagetool-uncompressed.patch )
src_unpack() {
mkdir "${S}" || die
}
python_prepare_all() {
- epatch "${FILESDIR}"/${P}-imagetool-uncompressed.patch
sed -e '/^load_to_mem("/s:(":("'${EPREFIX}'/usr/share/'${PN}'/:' \
-e '1s:python2:python:' \
-i imagetool-uncompressed.py || die
- python_copy_sources
+
+ distutils-r1_python_prepare_all
}
python_prepare() {
- cd "${BUILD_DIR}" || die
- case ${EPYTHON} in
- python3.1|python3.2|python3.3)
- epatch "${FILESDIR}"/${P}-imagetool-uncompressed-python3.patch
- ;;
- esac
+ if python_is_python3; then
+ eapply "${FILESDIR}"/${P}-imagetool-uncompressed-python3.patch
+ fi
}
python_compile() { :; }
python_install() {
- cd "${BUILD_DIR}" || die
python_doscript imagetool-uncompressed.py
}
insinto /usr/share/${PN}
newins {"${FILESDIR}"/${P}-,}args-uncompressed.txt
newins {"${FILESDIR}"/${P}-,}boot-uncompressed.txt
+
+ distutils-r1_python_install_all
}