Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/scons/, dev-util/scons/files/
Date: Wed, 23 Jan 2019 15:45:42
Message-Id: 1548258331.2f70f7a701649c0d14e91f8a754c37bec4f705d8.mgorny@gentoo
1 commit: 2f70f7a701649c0d14e91f8a754c37bec4f705d8
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 23 15:38:43 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 23 15:45:31 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f70f7a7
7
8 dev-util/scons: Bump to 3.0.3
9
10 Bump to upstream 3.0.3 release now that they managed to push the tag.
11 If anyone wants 3.0.4, then please contact upstream to figure out
12 whether they actually made that release already, and if they did, then
13 please kindly ask them to start pushing tags after doing releases.
14
15 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
16
17 dev-util/scons/Manifest | 4 +
18 .../files/scons-3.0.3-respect-cc-etc-r1.patch | 88 ++++++++++++++++++++++
19 dev-util/scons/scons-3.0.3.ebuild | 74 ++++++++++++++++++
20 3 files changed, 166 insertions(+)
21
22 diff --git a/dev-util/scons/Manifest b/dev-util/scons/Manifest
23 index eef5a57b910..8f4d46b2920 100644
24 --- a/dev-util/scons/Manifest
25 +++ b/dev-util/scons/Manifest
26 @@ -5,3 +5,7 @@ DIST scons-3.0.1-user.html 1121915 BLAKE2B 0ee57d112ba6269a488335e9354723c645e4b
27 DIST scons-3.0.1-user.pdf 2541376 BLAKE2B 43895501bf8b4a7eda12c5b3b076e6a71e949727224c279ef77671f7d4094245d37b9d8aeca6daa7d043c5513cc0c83e82a06f8a50bb4add4f0d750fce416bac SHA512 9fab1915c96cd32908cbbf123dfb8c97be99ec45df0461fa68ac47706f6bfc51d7ab970a43630e5414b01a8b9d27409e356b57c134478cec13f1bcbd97f615e7
28 DIST scons-3.0.1.gh.tar.gz 5481813 BLAKE2B 750668bf034ff48f635db0395fc4fc950a7148c315099738da4d96f346d025b7dd3849e376d566e5f55793ee0b901ad8a4d7ff661068420f085ab76404ca244c SHA512 092a5d88191e4c9deee2e14371745fad1c3beee746f55256729444ad56a141a28f45ebeef4b2a7ec37344048ff16864d85b978855c0285a14b7c6f46f91158ac
29 DIST scons-3.0.1.tar.gz 634815 BLAKE2B f5bacec048969d592697bc3dfb44678c25a92982f7ba81f9951e73532e8b9ac0906fe72c979d7818db5ab9b2c6dd380df21d323e47ea4cc0db646d6eed4b7d94 SHA512 b7be40ba507366cc678f31b910553cadaf59781c3a91833a34acbd29d9cad0cda38f6753034bf92c3af55d1e0c2f72aba5d81f1ec67205d0345b005d286f7084
30 +DIST scons-3.0.3-user.html 1131439 BLAKE2B d1755cd462f7e6aad51c6289bd3137c0ae67fd145f3c6fe19a19ad49c793351f9dffaaef7a42f42922f2535aa384f0ce9c23a18070f3a22897a210ac44cdb1af SHA512 48dae93d14928bea3ac17731f7e379a1a907059d75fd7979af02c1442b80cba0bd2c93e3fde4e5220261b3e4afd70f323ecef991dc0ec7b9694e08b11048b932
31 +DIST scons-3.0.3-user.pdf 2545890 BLAKE2B c68c173e62c4a42e01d87f749556ebe1ce4b6f2c3e96e8b87825aefac30b59ad9642977c35441172e1453ffbee1812a383d7bfc24112e4562f5f24a1defc6ae2 SHA512 75da4a0870c9ef860ad1789f9a229b94affe35efd228c450d842a88090279dcfd9ae93b05df366a3d43da27c2e44ee36ae702013b9d4fe2e78db895a7892f182
32 +DIST scons-3.0.3.gh.tar.gz 5497106 BLAKE2B 5bf6b2eaf59200b8eeb19eeb9f4ceda6b9b6bf32561f220565617dc08c9094687ec5200eeb2e182f89d01647d5d6638d0ac742a4bd297cb4f781578707f63a83 SHA512 594c1c4c48a3c48418e2b3945fe17af96ff29d435704e8b6cbb85406cd38109d0b865cb2f7bbbc733f69ea5e0f283f4b5942a0140dac263725968e62d0c87a2e
33 +DIST scons-3.0.3.tar.gz 651374 BLAKE2B e095affdcdf75203559f6e1c9a94ec4ab29c5d8e84354d1ed04bd4b64f7cb14ca1916ed576eb0d180c4e871878b98072e923dd84ce5b8e61ce7fb5ab3747773b SHA512 a9f52bca2f5d98f9ec3aa6ce0fd05660d573e6738daef2162306c95f19bd95851bd83f44cab4a81187c051491b0f016137e443f70d764149bb00ad03f46f273e
34
35 diff --git a/dev-util/scons/files/scons-3.0.3-respect-cc-etc-r1.patch b/dev-util/scons/files/scons-3.0.3-respect-cc-etc-r1.patch
36 new file mode 100644
37 index 00000000000..b888993b436
38 --- /dev/null
39 +++ b/dev-util/scons/files/scons-3.0.3-respect-cc-etc-r1.patch
40 @@ -0,0 +1,88 @@
41 +From 929986e568446f54c2a99c309fbb4d05bd4af00a Mon Sep 17 00:00:00 2001
42 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
43 +Date: Thu, 10 May 2018 08:01:08 +0200
44 +Subject: [PATCH] posix: Also force common toolchain vars for Gentoo
45 +
46 +---
47 + src/engine/SCons/Platform/posix.py | 20 ++++++++++++++++++++
48 + src/engine/SCons/Tool/cc.py | 3 ++-
49 + src/engine/SCons/Tool/cxx.py | 3 ++-
50 + src/engine/SCons/Tool/link.py | 3 ++-
51 + 4 files changed, 26 insertions(+), 3 deletions(-)
52 +
53 +diff --git a/src/engine/SCons/Platform/posix.py b/src/engine/SCons/Platform/posix.py
54 +index 739310a1..ef7528e0 100644
55 +--- a/src/engine/SCons/Platform/posix.py
56 ++++ b/src/engine/SCons/Platform/posix.py
57 +@@ -95,6 +95,26 @@ def generate(env):
58 + if 'ENV' in env:
59 + new_env.update(env['ENV'])
60 + env['ENV'] = new_env
61 ++
62 ++ # Furthermore, force common compiler/linker variables as well
63 ++ envvar_mapping = {
64 ++ 'AR': 'AR',
65 ++ 'AS': 'AS',
66 ++ 'ASFLAGS': 'ASFLAGS',
67 ++ 'CC': 'CC',
68 ++ 'CXX': 'CXX',
69 ++ 'CFLAGS': 'CFLAGS',
70 ++ 'CXXFLAGS': 'CXXFLAGS',
71 ++ 'CPPFLAGS': 'CPPFLAGS',
72 ++ 'LDFLAGS': 'LINKFLAGS',
73 ++ }
74 ++
75 ++ for envvar, toolvar in envvar_mapping.items():
76 ++ if toolvar not in env and envvar in env['ENV']:
77 ++ val = env['ENV'][envvar]
78 ++ if toolvar.endswith('FLAGS'):
79 ++ val = SCons.Util.CLVar(val)
80 ++ env[toolvar] = val
81 + else:
82 + if 'ENV' not in env:
83 + env['ENV'] = {}
84 +diff --git a/src/engine/SCons/Tool/cc.py b/src/engine/SCons/Tool/cc.py
85 +index 590ec5fd..5f9229a0 100644
86 +--- a/src/engine/SCons/Tool/cc.py
87 ++++ b/src/engine/SCons/Tool/cc.py
88 +@@ -80,7 +80,8 @@ def generate(env):
89 +
90 + if 'CC' not in env:
91 + env['CC'] = env.Detect(compilers) or compilers[0]
92 +- env['CFLAGS'] = SCons.Util.CLVar('')
93 ++ if 'CFLAGS' not in env:
94 ++ env['CFLAGS'] = SCons.Util.CLVar('')
95 + env['CCCOM'] = '$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES'
96 + env['SHCC'] = '$CC'
97 + env['SHCFLAGS'] = SCons.Util.CLVar('$CFLAGS')
98 +diff --git a/src/engine/SCons/Tool/cxx.py b/src/engine/SCons/Tool/cxx.py
99 +index 430851c8..ca5ab563 100644
100 +--- a/src/engine/SCons/Tool/cxx.py
101 ++++ b/src/engine/SCons/Tool/cxx.py
102 +@@ -74,7 +74,8 @@ def generate(env):
103 +
104 + if 'CXX' not in env:
105 + env['CXX'] = env.Detect(compilers) or compilers[0]
106 +- env['CXXFLAGS'] = SCons.Util.CLVar('')
107 ++ if 'CXXFLAGS' not in env:
108 ++ env['CXXFLAGS'] = SCons.Util.CLVar('')
109 + env['CXXCOM'] = '$CXX -o $TARGET -c $CXXFLAGS $CCFLAGS $_CCCOMCOM $SOURCES'
110 + env['SHCXX'] = '$CXX'
111 + env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS')
112 +diff --git a/src/engine/SCons/Tool/link.py b/src/engine/SCons/Tool/link.py
113 +index 5adc6ca2..a12ea8ed 100644
114 +--- a/src/engine/SCons/Tool/link.py
115 ++++ b/src/engine/SCons/Tool/link.py
116 +@@ -318,7 +318,8 @@ def generate(env):
117 +
118 + env['SMARTLINK'] = smart_link
119 + env['LINK'] = "$SMARTLINK"
120 +- env['LINKFLAGS'] = SCons.Util.CLVar('')
121 ++ if 'LINKFLAGS' not in env:
122 ++ env['LINKFLAGS'] = SCons.Util.CLVar('')
123 +
124 + # __RPATH is only set to something ($_RPATH typically) on platforms that support it.
125 + env['LINKCOM'] = '$LINK -o $TARGET $LINKFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS $_LIBFLAGS'
126 +--
127 +2.20.1
128 +
129
130 diff --git a/dev-util/scons/scons-3.0.3.ebuild b/dev-util/scons/scons-3.0.3.ebuild
131 new file mode 100644
132 index 00000000000..7ba0a5a8dbf
133 --- /dev/null
134 +++ b/dev-util/scons/scons-3.0.3.ebuild
135 @@ -0,0 +1,74 @@
136 +# Copyright 1999-2019 Gentoo Authors
137 +# Distributed under the terms of the GNU General Public License v2
138 +
139 +EAPI=6
140 +PYTHON_COMPAT=( python{2_7,3_{4,5,6}} )
141 +PYTHON_REQ_USE="threads(+)"
142 +
143 +inherit distutils-r1
144 +
145 +DESCRIPTION="Extensible Python-based build utility"
146 +HOMEPAGE="http://www.scons.org/"
147 +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
148 + doc? (
149 + http://www.scons.org/doc/${PV}/PDF/${PN}-user.pdf -> ${P}-user.pdf
150 + http://www.scons.org/doc/${PV}/HTML/${PN}-user.html -> ${P}-user.html
151 + )
152 + test? ( https://github.com/scons/scons/archive/${PV}.tar.gz -> ${P}.gh.tar.gz )"
153 +
154 +LICENSE="MIT"
155 +SLOT="0"
156 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
157 +IUSE="doc test"
158 +RESTRICT="!test? ( test )"
159 +
160 +S=${WORKDIR}/${P}/src
161 +
162 +PATCHES=(
163 + # support env passthrough for Gentoo ebuilds
164 + "${FILESDIR}"/scons-3.0.1-env-passthrough.patch
165 + # respect CC, CXX, C*FLAGS, LDFLAGS by default
166 + "${FILESDIR}"/scons-3.0.3-respect-cc-etc-r1.patch
167 +)
168 +
169 +src_unpack() {
170 + # use the git directory structure, but put pregenerated release
171 + # inside src/ subdirectory to make our life easier
172 + if use test; then
173 + unpack "${P}.gh.tar.gz"
174 + rm -r "${P}/src" || die
175 + else
176 + mkdir "${P}" || die
177 + fi
178 +
179 + cd "${P}" || die
180 + unpack "${P}.tar.gz"
181 + mv "${P}" src || die
182 +}
183 +
184 +src_prepare() {
185 + # apply patches relatively to top directory
186 + cd "${WORKDIR}/${P}" || die
187 + distutils-r1_src_prepare
188 +
189 + # remove half-broken, useless custom commands
190 + # and fix manpage install location
191 + sed -i -e '/cmdclass/,/},$/d' \
192 + -e '/data_files/s:man/:share/man/:' "${S}"/setup.py || die
193 +}
194 +
195 +python_test() {
196 + cd "${WORKDIR}/${P}" || die
197 + "${EPYTHON}" runtest.py -as \
198 + -j "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")" \
199 + --builddir "${BUILD_DIR}/lib" ||
200 + die "Tests fail with ${EPYTHON}"
201 +}
202 +
203 +python_install_all() {
204 + local DOCS=( {CHANGES,README,RELEASE}.txt )
205 + distutils-r1_python_install_all
206 + rm "${ED%/}/usr/bin/scons.bat" || die
207 +
208 + use doc && dodoc "${DISTDIR}"/${P}-user.{pdf,html}
209 +}