1 |
commit: e87d2721975e85a3d2372f2807618e3f1ebda301 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 9 15:13:59 2018 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 9 15:25:51 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e87d2721 |
7 |
|
8 |
dev-util/scons: Use git directory structure for workdir |
9 |
|
10 |
Reuse the same directory structure as used in SCons git to make user |
11 |
patch application easier. |
12 |
|
13 |
dev-util/scons/scons-3.0.1.ebuild | 23 +++++++++++++++++------ |
14 |
1 file changed, 17 insertions(+), 6 deletions(-) |
15 |
|
16 |
diff --git a/dev-util/scons/scons-3.0.1.ebuild b/dev-util/scons/scons-3.0.1.ebuild |
17 |
index 99e628bd103..1a6f2c59360 100644 |
18 |
--- a/dev-util/scons/scons-3.0.1.ebuild |
19 |
+++ b/dev-util/scons/scons-3.0.1.ebuild |
20 |
@@ -21,25 +21,36 @@ SLOT="0" |
21 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" |
22 |
IUSE="doc test" |
23 |
|
24 |
+S=${WORKDIR}/${P}/src |
25 |
+ |
26 |
src_unpack() { |
27 |
+ # use the git directory structure, but put pregenerated release |
28 |
+ # inside src/ subdirectory to make our life easier |
29 |
if use test; then |
30 |
unpack "${P}.gh.tar.gz" |
31 |
- mv "${P}" "${P}-full" || die |
32 |
+ rm -r "${P}/src" || die |
33 |
+ else |
34 |
+ mkdir "${P}" || die |
35 |
fi |
36 |
+ |
37 |
+ cd "${P}" || die |
38 |
unpack "${P}.tar.gz" |
39 |
+ mv "${P}" src || die |
40 |
} |
41 |
|
42 |
-python_prepare_all() { |
43 |
+src_prepare() { |
44 |
+ # apply patches relatively to top directory |
45 |
+ cd "${WORKDIR}/${P}" || die |
46 |
+ distutils-r1_src_prepare |
47 |
+ |
48 |
# remove half-broken, useless custom commands |
49 |
# and fix manpage install location |
50 |
sed -i -e '/cmdclass/,/}$/d' \ |
51 |
- -e '/data_files/s:man/:share/man/:' setup.py || die |
52 |
- |
53 |
- distutils-r1_python_prepare_all |
54 |
+ -e '/data_files/s:man/:share/man/:' "${S}"/setup.py || die |
55 |
} |
56 |
|
57 |
python_test() { |
58 |
- cd "${WORKDIR}/${P}-full" || die |
59 |
+ cd "${WORKDIR}/${P}" || die |
60 |
"${EPYTHON}" runtest.py -as \ |
61 |
-j "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")" \ |
62 |
--builddir "${BUILD_DIR}/lib" || |