DIST scons-3.1.1-user.pdf 2564248 BLAKE2B 702e57a9646779ff1aa077aa7ae7a815d004cda08166f948ef3b893a786c7ccf13e9d1f8621640573802acd0b6a7acaaf68ebea984d5922112a30c4457740bc4 SHA512 0c0f8e93e3bddd9dc0ec661f629f2995ec9375908b3b7bf2b67c9518571cb31754d13fca46fc1182019976e5c0a417832447692ff61f5ee4613b7f56c7891594
DIST scons-3.1.1.gh.tar.gz 5528538 BLAKE2B cbb13a0ec9c5ade9b965592f012af5a3ab5253a3c30a049da499631ff58fc1201666209316d9fbcc8f0a715b194327f3cebe5a50fde01635fdb0304b8fbbb2f6 SHA512 3347a7ec5c6c7b596c0d51bb4a9654b971734736febe3834df0f40e7839e1f0578dafeae838d5ddd9f3319ac3d17b6790666fa1602c30480eba25122355179a5
DIST scons-3.1.1.tar.gz 663878 BLAKE2B 095d5f45885ac12937066be247194e70d33e8f5dc0955e7d693c4b0d3a4b61e776bc1d64cd00ebc89d1e85a7992747b8f448255a76c1b6c2d9df8fa173967711 SHA512 2e80b45571679d8acc0554273538f56163488df5aa9007c7c9c3a6deb2698909ab05da8df91502ea287c0cc0ff0a98f226454f67fcfb7a943570f673f4bd8f54
+DIST scons-3.1.2-user.html 1126908 BLAKE2B 38e7695b6ef1e79b3eed4455fbe84ec1587be3f21c1c90cfa6602b344c52c704f021ed8e611abaf2e24ca06c5116e79fb78ca724c9920186cce35feccbac899d SHA512 a13ed1157f6aad25acbad6e1e3d2c0a16a14dd1d5fa369ba27777ca30eeb31ce37c735c1870c80f7343f0f98a4305fe1ef7c2b679cf2cb9c0d6670f34a3aeba8
+DIST scons-3.1.2-user.pdf 2557502 BLAKE2B 1c89d845d23c4e434c9db11d8730121f0b8dc6f2fca21dabe3e7204373cdf743d831a1835731332e39ccd7f3f49da068ba34a33a2937e9dd205e38d9c8b2b321 SHA512 9da887c157cb95f7802cb4b96080b0e56f2ad7663021b8be0839e71d473422fe9dd0dadf0ad1b067160c39511e91c6b3d9aaff8e238bb46b10a03ae89b12e169
+DIST scons-3.1.2.gh.tar.gz 5534888 BLAKE2B 63e8b069cfddfed6a2ce8bcb7816b51b1881ca7a1a3e552f2eec5ecd1deae80720b0acfb711ab17067efdc9d0e4aea696e9f4eee6b374071bfc60e7bb79cc58a SHA512 b096501ea37e62f596f16b46b4022ad7979f359b10849d4c5fa17731a6c3ec34e0890374de175a8aa7539ae677777142ccf5dfae39a74696efcdbcc00e89bccf
+DIST scons-3.1.2.tar.gz 668298 BLAKE2B 14251e2bab425dfc31d1d6d9325a67725dae42576d2a5c204f0ff7948aa2da5aadd3fdf03bbbccd615757520fedee5e18ca2ba13aaf07a4ddfec330db4221203 SHA512 bfc0d58d33408a03eb37c1eff166af8139078026e6b43d6274afceac889d0a6743e359e89ad9a30be5ca43aeed26fba92fa4732854750b7d53091ef3e99b3d33
--- /dev/null
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DISTUTILS_USE_SETUPTOOLS=no
+PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="Extensible Python-based build utility"
+HOMEPAGE="http://www.scons.org/"
+SRC_URI="
+ https://downloads.sourceforge.net/project/scons/scons/${PV}/${P}.tar.gz
+ doc? (
+ http://www.scons.org/doc/${PV}/PDF/${PN}-user.pdf -> ${P}-user.pdf
+ http://www.scons.org/doc/${PV}/HTML/${PN}-user.html -> ${P}-user.html
+ )
+ test? ( https://github.com/scons/scons/archive/${PV}.tar.gz -> ${P}.gh.tar.gz )"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ test? (
+ dev-libs/libxml2[${PYTHON_USEDEP}]
+ dev-python/lxml[${PYTHON_USEDEP}]
+ )
+"
+
+S=${WORKDIR}/${P}/src
+
+PATCHES=(
+ # support env passthrough for Gentoo ebuilds
+ "${FILESDIR}"/scons-3.0.1-env-passthrough.patch
+ # respect CC, CXX, C*FLAGS, LDFLAGS by default
+ "${FILESDIR}"/scons-3.0.3-respect-cc-etc-r1.patch
+)
+
+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"
+ else
+ mkdir -p "${P}"/src || die
+ fi
+
+ tar -C "${P}"/src --strip-components=1 -xzf "${DISTDIR}/${P}.tar.gz" || die
+}
+
+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/:' "${S}"/setup.py || die
+}
+
+python_test() {
+ # set variable from escons() of scons-util.eclass to make env-passthrough patch work within test env
+ local -x GENTOO_SCONS_ENV_PASSTHROUGH=1
+ # unset some env variables to pass appropriate tests
+ unset AR AS ASFLAGS CC CXX CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
+ cd "${WORKDIR}/${P}" || die
+ "${EPYTHON}" runtest.py -a --passed \
+ -j "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")" \
+ --builddir "${BUILD_DIR}/lib"
+
+ # runtest.py script returns "0" if all tests are passed
+ # and returns "2" if there are any tests with "no result"
+ # (i.e. in case if some tools are not installed or it's Windows specific tests)
+ [[ ${?} == [02] ]] || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ local DOCS=( {CHANGES,README,RELEASE}.txt )
+ distutils-r1_python_install_all
+ rm "${ED}/usr/bin/scons.bat" || die
+
+ use doc && dodoc "${DISTDIR}"/${P}-user.{pdf,html}
+}