summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-05-09 17:13:59 +0200
committerMichał Górny <mgorny@gentoo.org>2018-05-09 17:25:51 +0200
commite87d2721975e85a3d2372f2807618e3f1ebda301 (patch)
tree46d9b4e6a495ea0eeed6db8ecf402b4d2c59c4bb
parentsys-fs/mtools: ppc stable wrt bug #648852 (diff)
downloadgentoo-e87d2721975e85a3d2372f2807618e3f1ebda301.tar.gz
gentoo-e87d2721975e85a3d2372f2807618e3f1ebda301.tar.bz2
gentoo-e87d2721975e85a3d2372f2807618e3f1ebda301.zip
dev-util/scons: Use git directory structure for workdir
Reuse the same directory structure as used in SCons git to make user patch application easier.
-rw-r--r--dev-util/scons/scons-3.0.1.ebuild23
1 files changed, 17 insertions, 6 deletions
diff --git a/dev-util/scons/scons-3.0.1.ebuild b/dev-util/scons/scons-3.0.1.ebuild
index 99e628bd1033..1a6f2c59360e 100644
--- a/dev-util/scons/scons-3.0.1.ebuild
+++ b/dev-util/scons/scons-3.0.1.ebuild
@@ -21,25 +21,36 @@ SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
IUSE="doc test"
+S=${WORKDIR}/${P}/src
+
src_unpack() {
+ # use the git directory structure, but put pregenerated release
+ # inside src/ subdirectory to make our life easier
if use test; then
unpack "${P}.gh.tar.gz"
- mv "${P}" "${P}-full" || die
+ rm -r "${P}/src" || die
+ else
+ mkdir "${P}" || die
fi
+
+ cd "${P}" || die
unpack "${P}.tar.gz"
+ mv "${P}" src || die
}
-python_prepare_all() {
+src_prepare() {
+ # apply patches relatively to top directory
+ cd "${WORKDIR}/${P}" || die
+ distutils-r1_src_prepare
+
# remove half-broken, useless custom commands
# and fix manpage install location
sed -i -e '/cmdclass/,/}$/d' \
- -e '/data_files/s:man/:share/man/:' setup.py || die
-
- distutils-r1_python_prepare_all
+ -e '/data_files/s:man/:share/man/:' "${S}"/setup.py || die
}
python_test() {
- cd "${WORKDIR}/${P}-full" || die
+ cd "${WORKDIR}/${P}" || die
"${EPYTHON}" runtest.py -as \
-j "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")" \
--builddir "${BUILD_DIR}/lib" ||