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/
Date: Sun, 01 Aug 2021 08:17:10
Message-Id: 1627805723.bcf6ddb54e85be687ae04827da231e2171a894bc.mgorny@gentoo
1 commit: bcf6ddb54e85be687ae04827da231e2171a894bc
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 1 06:51:45 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 1 08:15:23 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bcf6ddb5
7
8 dev-util/scons: Bump to 4.2.0
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-util/scons/Manifest | 4 ++
13 dev-util/scons/scons-4.2.0.ebuild | 102 ++++++++++++++++++++++++++++++++++++++
14 2 files changed, 106 insertions(+)
15
16 diff --git a/dev-util/scons/Manifest b/dev-util/scons/Manifest
17 index 669ad9a3289..b7a44b31276 100644
18 --- a/dev-util/scons/Manifest
19 +++ b/dev-util/scons/Manifest
20 @@ -2,3 +2,7 @@ DIST scons-4.1.0-user.html 1454432 BLAKE2B 9fac4d7bfb4b25708bc4cc48d952beb030f88
21 DIST scons-4.1.0-user.pdf 2691364 BLAKE2B a910a09fa936d4d6f8dc967676d5aa009aac58a5a4566399b3ddc3512ac0259731e6c5399722fefadb3b79d8f89a5257e2e9bc2fa4d65697c8293ab995248d64 SHA512 64584731a59b59b78283be3876ecca91d742f83da2653d0de17922bec01e3c9cea1ce2ce3c8dc718597910ba86ed2c8aff0f7ae371bf763439b57a6d5484e1a7
22 DIST scons-4.1.0.gh.tar.gz 5609204 BLAKE2B ede3d47a1ec652b9248681e26738073e9d01daab7ffeccc58f0fcadb79661e30edb9a35a511518e4a58459243acb027afd8fa5849b0f9e4bae451055f7b1a062 SHA512 f79b86bb09783767b3872cfb8efb665372714a604af2aaf3adc66eee63d3afe27bc6b2aab83813743c83f71c81c800d42842e916501787ba402ce2726dda9b44
23 DIST scons-4.1.0.tar.gz 3007701 BLAKE2B 70ab64ecfd89fa2af1d78a33fcef82a5f7db9875ffe9d2c16ea75cf40e661b2874359e3a5f75d761b3d9e863f7a434560992cfb020cce3e21e389381331d90de SHA512 24fd493643545a2998b053ed0d68caf6241f05bc2437e7cbeae33d2e1c63517a61449a1a18062f8e4e5a639295a2486925296ba3e54ccfa2ecdd56fa07132de8
24 +DIST scons-4.2.0-user.html 1514655 BLAKE2B 036fd0e994d4a3dbf820e864c18f1dda2bb383b890919b3d99ca02e4f1f319b86050bf094309764bbb01585075697549e3168d66ee02caeee0fe4ca641f794a5 SHA512 b0dcf8d6ff32521f2ce92372a7efce4962268d2ca40645ec4b0d082e5a29ba5098488ba45bf36c9fb7e75996c7454ab80536052f43b9a533a22db05f466cd3e9
25 +DIST scons-4.2.0-user.pdf 2813567 BLAKE2B 2787c9dbecaefccc5f4df2bcccc474ee69e9883f9efa8358f6da00690d9f3fad48f7b696908cbb4cc8f3b9c195f86e11c81301d931783e463d7b2f3a5d528fc3 SHA512 3c36879af2b40190b7b68b162cb39e32e1d7ee01fe063dabe5404d616ab3c9972ebc8a6ce4c0b54a633cfc6825808f93207132ac9c9cd60d9e6ca28e864d5f16
26 +DIST scons-4.2.0.gh.tar.gz 5677165 BLAKE2B c298152db937810ab73afc304a9dc480c185ef0d6e86be5ec7f2022a7d1ed4d3df6ecc18148c3143d4e76a7ea0e50790db1224e66db68bace0759daba7f36a91 SHA512 138573f7203b52fad0527d8d88ceabe182273eff7e4b74125e0d7eda51c44408b07e2c702ee63214519392101d8bbb30013e6d34000eaeb530a816c17396de97
27 +DIST scons-4.2.0.tar.gz 3043008 BLAKE2B 3e69189e45b8ecc956419d3b7d4d36a78ffe219ff87a18d17c511434cf4306635c245107e7978d8f6b86f65bd2ac028fa3c76ab1212806a692d355d7d8036645 SHA512 91d77c858a888621d41432f39970547830997c8e28a851bbab7c0f181afda564abef321befaa33cbe6fd5fc4ac85fa80f2349994956edcc99c027cf7f526bbf0
28
29 diff --git a/dev-util/scons/scons-4.2.0.ebuild b/dev-util/scons/scons-4.2.0.ebuild
30 new file mode 100644
31 index 00000000000..ab10b165363
32 --- /dev/null
33 +++ b/dev-util/scons/scons-4.2.0.ebuild
34 @@ -0,0 +1,102 @@
35 +# Copyright 1999-2021 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=8
39 +
40 +DISTUTILS_USE_SETUPTOOLS=rdepend
41 +PYTHON_COMPAT=( python3_{8..9} )
42 +PYTHON_REQ_USE="threads(+)"
43 +
44 +inherit distutils-r1
45 +
46 +DESCRIPTION="Extensible Python-based build utility"
47 +HOMEPAGE="https://www.scons.org/"
48 +SRC_URI="
49 + https://downloads.sourceforge.net/project/scons/scons/${PV}/${P}.tar.gz
50 + doc? (
51 + https://www.scons.org/doc/${PV}/PDF/${PN}-user.pdf -> ${P}-user.pdf
52 + https://www.scons.org/doc/${PV}/HTML/${PN}-user.html -> ${P}-user.html
53 + )
54 + test? ( https://github.com/scons/scons/archive/${PV}.tar.gz -> ${P}.gh.tar.gz )"
55 +
56 +LICENSE="MIT"
57 +SLOT="0"
58 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
59 +IUSE="doc test"
60 +RESTRICT="!test? ( test )"
61 +
62 +BDEPEND="
63 + test? (
64 + dev-libs/libxml2[${PYTHON_USEDEP}]
65 + dev-python/lxml[${PYTHON_USEDEP}]
66 + )
67 +"
68 +
69 +S=${WORKDIR}/${P}/src
70 +
71 +PATCHES=(
72 + # support env passthrough for Gentoo ebuilds
73 + "${FILESDIR}"/scons-4.1.0-env-passthrough.patch
74 + # respect CC, CXX, C*FLAGS, LDFLAGS by default
75 + "${FILESDIR}"/scons-4.0.0-respect-cc-etc-r1.patch
76 +)
77 +
78 +src_unpack() {
79 + # use the git directory structure, but put pregenerated release
80 + # inside src/ subdirectory to make our life easier
81 + if use test; then
82 + unpack "${P}.gh.tar.gz"
83 + else
84 + mkdir -p "${P}"/src || die
85 + fi
86 +
87 + tar -C "${P}"/src --strip-components=1 -xzf "${DISTDIR}/${P}.tar.gz" || die
88 +}
89 +
90 +src_prepare() {
91 + # apply patches relatively to top directory
92 + cd "${WORKDIR}/${P}" || die
93 + distutils-r1_src_prepare
94 +
95 + # manpage install is completely broken
96 + sed -i -e '/build\/doc\/man/d' src/setup.cfg || die
97 +
98 + if use test; then
99 + local remove_tests=(
100 + # TODO: does not respect PATH?
101 + test/Clang
102 + # broken
103 + test/DVIPDF/DVIPDFFLAGS.py
104 + test/Java/swig-dependencies.py
105 + test/Java/multi-step.py
106 + # broken by commas in date, sic!
107 + test/option/option-v.py
108 + test/Interactive/version.py
109 + )
110 + rm -r "${remove_tests[@]}" || die
111 + fi
112 +}
113 +
114 +python_test() {
115 + local -x COLUMNS=80
116 + # set variable from escons() of scons-util.eclass to make env-passthrough patch work within test env
117 + local -x GENTOO_SCONS_ENV_PASSTHROUGH=1
118 + # unset some env variables to pass appropriate tests
119 + unset AR AS ASFLAGS CC CXX CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
120 + cd "${WORKDIR}/${P}" || die
121 + "${EPYTHON}" runtest.py -a --passed \
122 + -j "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")"
123 +
124 + # runtest.py script returns "0" if all tests are passed
125 + # and returns "2" if there are any tests with "no result"
126 + # (i.e. in case if some tools are not installed or it's Windows specific tests)
127 + [[ ${?} == [02] ]] || die "Tests fail with ${EPYTHON}"
128 +}
129 +
130 +python_install_all() {
131 + rm "${ED}"/usr/*.1 || die
132 + distutils-r1_python_install_all
133 +
134 + doman *.1
135 + use doc && dodoc "${DISTDIR}"/${P}-user.{pdf,html}
136 +}