summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2019-01-23 16:38:43 +0100
committerMichał Górny <mgorny@gentoo.org>2019-01-23 16:45:31 +0100
commit2f70f7a701649c0d14e91f8a754c37bec4f705d8 (patch)
tree271aed03f8d6ccb30a874c483669dd551f785911 /dev-util
parentdev-java/swt: bump (diff)
downloadgentoo-2f70f7a701649c0d14e91f8a754c37bec4f705d8.tar.gz
gentoo-2f70f7a701649c0d14e91f8a754c37bec4f705d8.tar.bz2
gentoo-2f70f7a701649c0d14e91f8a754c37bec4f705d8.zip
dev-util/scons: Bump to 3.0.3
Bump to upstream 3.0.3 release now that they managed to push the tag. If anyone wants 3.0.4, then please contact upstream to figure out whether they actually made that release already, and if they did, then please kindly ask them to start pushing tags after doing releases. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/scons/Manifest4
-rw-r--r--dev-util/scons/files/scons-3.0.3-respect-cc-etc-r1.patch88
-rw-r--r--dev-util/scons/scons-3.0.3.ebuild74
3 files changed, 166 insertions, 0 deletions
diff --git a/dev-util/scons/Manifest b/dev-util/scons/Manifest
index eef5a57b9109..8f4d46b2920f 100644
--- a/dev-util/scons/Manifest
+++ b/dev-util/scons/Manifest
@@ -5,3 +5,7 @@ DIST scons-3.0.1-user.html 1121915 BLAKE2B 0ee57d112ba6269a488335e9354723c645e4b
DIST scons-3.0.1-user.pdf 2541376 BLAKE2B 43895501bf8b4a7eda12c5b3b076e6a71e949727224c279ef77671f7d4094245d37b9d8aeca6daa7d043c5513cc0c83e82a06f8a50bb4add4f0d750fce416bac SHA512 9fab1915c96cd32908cbbf123dfb8c97be99ec45df0461fa68ac47706f6bfc51d7ab970a43630e5414b01a8b9d27409e356b57c134478cec13f1bcbd97f615e7
DIST scons-3.0.1.gh.tar.gz 5481813 BLAKE2B 750668bf034ff48f635db0395fc4fc950a7148c315099738da4d96f346d025b7dd3849e376d566e5f55793ee0b901ad8a4d7ff661068420f085ab76404ca244c SHA512 092a5d88191e4c9deee2e14371745fad1c3beee746f55256729444ad56a141a28f45ebeef4b2a7ec37344048ff16864d85b978855c0285a14b7c6f46f91158ac
DIST scons-3.0.1.tar.gz 634815 BLAKE2B f5bacec048969d592697bc3dfb44678c25a92982f7ba81f9951e73532e8b9ac0906fe72c979d7818db5ab9b2c6dd380df21d323e47ea4cc0db646d6eed4b7d94 SHA512 b7be40ba507366cc678f31b910553cadaf59781c3a91833a34acbd29d9cad0cda38f6753034bf92c3af55d1e0c2f72aba5d81f1ec67205d0345b005d286f7084
+DIST scons-3.0.3-user.html 1131439 BLAKE2B d1755cd462f7e6aad51c6289bd3137c0ae67fd145f3c6fe19a19ad49c793351f9dffaaef7a42f42922f2535aa384f0ce9c23a18070f3a22897a210ac44cdb1af SHA512 48dae93d14928bea3ac17731f7e379a1a907059d75fd7979af02c1442b80cba0bd2c93e3fde4e5220261b3e4afd70f323ecef991dc0ec7b9694e08b11048b932
+DIST scons-3.0.3-user.pdf 2545890 BLAKE2B c68c173e62c4a42e01d87f749556ebe1ce4b6f2c3e96e8b87825aefac30b59ad9642977c35441172e1453ffbee1812a383d7bfc24112e4562f5f24a1defc6ae2 SHA512 75da4a0870c9ef860ad1789f9a229b94affe35efd228c450d842a88090279dcfd9ae93b05df366a3d43da27c2e44ee36ae702013b9d4fe2e78db895a7892f182
+DIST scons-3.0.3.gh.tar.gz 5497106 BLAKE2B 5bf6b2eaf59200b8eeb19eeb9f4ceda6b9b6bf32561f220565617dc08c9094687ec5200eeb2e182f89d01647d5d6638d0ac742a4bd297cb4f781578707f63a83 SHA512 594c1c4c48a3c48418e2b3945fe17af96ff29d435704e8b6cbb85406cd38109d0b865cb2f7bbbc733f69ea5e0f283f4b5942a0140dac263725968e62d0c87a2e
+DIST scons-3.0.3.tar.gz 651374 BLAKE2B e095affdcdf75203559f6e1c9a94ec4ab29c5d8e84354d1ed04bd4b64f7cb14ca1916ed576eb0d180c4e871878b98072e923dd84ce5b8e61ce7fb5ab3747773b SHA512 a9f52bca2f5d98f9ec3aa6ce0fd05660d573e6738daef2162306c95f19bd95851bd83f44cab4a81187c051491b0f016137e443f70d764149bb00ad03f46f273e
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
new file mode 100644
index 000000000000..b888993b436e
--- /dev/null
+++ b/dev-util/scons/files/scons-3.0.3-respect-cc-etc-r1.patch
@@ -0,0 +1,88 @@
+From 929986e568446f54c2a99c309fbb4d05bd4af00a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Thu, 10 May 2018 08:01:08 +0200
+Subject: [PATCH] posix: Also force common toolchain vars for Gentoo
+
+---
+ src/engine/SCons/Platform/posix.py | 20 ++++++++++++++++++++
+ src/engine/SCons/Tool/cc.py | 3 ++-
+ src/engine/SCons/Tool/cxx.py | 3 ++-
+ src/engine/SCons/Tool/link.py | 3 ++-
+ 4 files changed, 26 insertions(+), 3 deletions(-)
+
+diff --git a/src/engine/SCons/Platform/posix.py b/src/engine/SCons/Platform/posix.py
+index 739310a1..ef7528e0 100644
+--- a/src/engine/SCons/Platform/posix.py
++++ b/src/engine/SCons/Platform/posix.py
+@@ -95,6 +95,26 @@ def generate(env):
+ if 'ENV' in env:
+ new_env.update(env['ENV'])
+ env['ENV'] = new_env
++
++ # Furthermore, force common compiler/linker variables as well
++ envvar_mapping = {
++ 'AR': 'AR',
++ 'AS': 'AS',
++ 'ASFLAGS': 'ASFLAGS',
++ 'CC': 'CC',
++ 'CXX': 'CXX',
++ 'CFLAGS': 'CFLAGS',
++ 'CXXFLAGS': 'CXXFLAGS',
++ 'CPPFLAGS': 'CPPFLAGS',
++ 'LDFLAGS': 'LINKFLAGS',
++ }
++
++ for envvar, toolvar in envvar_mapping.items():
++ if toolvar not in env and envvar in env['ENV']:
++ val = env['ENV'][envvar]
++ if toolvar.endswith('FLAGS'):
++ val = SCons.Util.CLVar(val)
++ env[toolvar] = val
+ else:
+ if 'ENV' not in env:
+ env['ENV'] = {}
+diff --git a/src/engine/SCons/Tool/cc.py b/src/engine/SCons/Tool/cc.py
+index 590ec5fd..5f9229a0 100644
+--- a/src/engine/SCons/Tool/cc.py
++++ b/src/engine/SCons/Tool/cc.py
+@@ -80,7 +80,8 @@ def generate(env):
+
+ if 'CC' not in env:
+ env['CC'] = env.Detect(compilers) or compilers[0]
+- env['CFLAGS'] = SCons.Util.CLVar('')
++ if 'CFLAGS' not in env:
++ env['CFLAGS'] = SCons.Util.CLVar('')
+ env['CCCOM'] = '$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES'
+ env['SHCC'] = '$CC'
+ env['SHCFLAGS'] = SCons.Util.CLVar('$CFLAGS')
+diff --git a/src/engine/SCons/Tool/cxx.py b/src/engine/SCons/Tool/cxx.py
+index 430851c8..ca5ab563 100644
+--- a/src/engine/SCons/Tool/cxx.py
++++ b/src/engine/SCons/Tool/cxx.py
+@@ -74,7 +74,8 @@ def generate(env):
+
+ if 'CXX' not in env:
+ env['CXX'] = env.Detect(compilers) or compilers[0]
+- env['CXXFLAGS'] = SCons.Util.CLVar('')
++ if 'CXXFLAGS' not in env:
++ env['CXXFLAGS'] = SCons.Util.CLVar('')
+ env['CXXCOM'] = '$CXX -o $TARGET -c $CXXFLAGS $CCFLAGS $_CCCOMCOM $SOURCES'
+ env['SHCXX'] = '$CXX'
+ env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS')
+diff --git a/src/engine/SCons/Tool/link.py b/src/engine/SCons/Tool/link.py
+index 5adc6ca2..a12ea8ed 100644
+--- a/src/engine/SCons/Tool/link.py
++++ b/src/engine/SCons/Tool/link.py
+@@ -318,7 +318,8 @@ def generate(env):
+
+ env['SMARTLINK'] = smart_link
+ env['LINK'] = "$SMARTLINK"
+- env['LINKFLAGS'] = SCons.Util.CLVar('')
++ if 'LINKFLAGS' not in env:
++ env['LINKFLAGS'] = SCons.Util.CLVar('')
+
+ # __RPATH is only set to something ($_RPATH typically) on platforms that support it.
+ env['LINKCOM'] = '$LINK -o $TARGET $LINKFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS $_LIBFLAGS'
+--
+2.20.1
+
diff --git a/dev-util/scons/scons-3.0.3.ebuild b/dev-util/scons/scons-3.0.3.ebuild
new file mode 100644
index 000000000000..7ba0a5a8dbfb
--- /dev/null
+++ b/dev-util/scons/scons-3.0.3.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python{2_7,3_{4,5,6}} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="Extensible Python-based build utility"
+HOMEPAGE="http://www.scons.org/"
+SRC_URI="mirror://sourceforge/${PN}/${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-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc test"
+RESTRICT="!test? ( test )"
+
+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"
+ rm -r "${P}/src" || die
+ else
+ mkdir "${P}" || die
+ fi
+
+ cd "${P}" || die
+ unpack "${P}.tar.gz"
+ mv "${P}" src || 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() {
+ cd "${WORKDIR}/${P}" || die
+ "${EPYTHON}" runtest.py -as \
+ -j "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")" \
+ --builddir "${BUILD_DIR}/lib" ||
+ 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}
+}