diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-08-01 22:03:23 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-08-01 22:03:23 +0100 |
commit | 590b9b7b03bf4651e099949e318755af7cfa81b8 (patch) | |
tree | 54c184b7d26c25f1922bfeaf19a1dd45a2e3b1eb /dev-util/scons | |
parent | f4fc10428424904caf2035cffc442195cb088b2c (diff) |
gentoo resync : 01.08.2021
Diffstat (limited to 'dev-util/scons')
-rw-r--r-- | dev-util/scons/Manifest | 6 | ||||
-rw-r--r-- | dev-util/scons/files/scons-4.2.0-respect-cc-etc.patch | 96 | ||||
-rw-r--r-- | dev-util/scons/scons-4.2.0-r1.ebuild | 102 |
3 files changed, 204 insertions, 0 deletions
diff --git a/dev-util/scons/Manifest b/dev-util/scons/Manifest index 46d45ee68ea5..2ac61120118b 100644 --- a/dev-util/scons/Manifest +++ b/dev-util/scons/Manifest @@ -1,8 +1,14 @@ AUX scons-4.0.0-respect-cc-etc-r1.patch 3241 BLAKE2B 8e9cabb597db0c1cf278169bd6010168e46fc38895d00a0b013894b2783c65c5262156ded125e080b61927e34f40ef5ed4f2852dfd341d1d42bbcc1efad7b4ab SHA512 1878dc8f28d17aecd5c61b624c135ab3d1b311ec1b92687e1f205c4913dd5f99eeea0f7758d5623e6e60470c34fc2e7ce70571593f2197c8e59fed8df1586b53 AUX scons-4.1.0-env-passthrough.patch 1498 BLAKE2B 9aaae51779053518d983c9f028fff58a68a8c3e1213c8a746aad2e6dc6cebf139939dd3fb41a643c5db7e6079e09ad9850e552192e35bc4c8bf75818334b9e0d SHA512 4c5c3364575d95f4922b7c5b3c8f536a34b58136e7a604bc06760d94a8b20c7e8cdfd3100ab8c56e08b885e2e9521f036f4009512b1f1b10aec2785a74119683 +AUX scons-4.2.0-respect-cc-etc.patch 3493 BLAKE2B 3a36a9cced15ef81e671d8a90750afc14650fef564997d250ed63f0d9b1c91361872a8816cab9ba1f0ecae46711414ccac921ded954eff7c51e4161532030e5f SHA512 ce8690a126255047c8efbcad4e75b91fca07b0afac55d818d4f5467a41795394cae8f5d47484519c482bccfdae9c3df1b040689a656098f349629f1f609adbce DIST scons-4.1.0-user.html 1454432 BLAKE2B 9fac4d7bfb4b25708bc4cc48d952beb030f88181af5dfee63090f726b1a82443c192c63ec5939869967ef8f374e8599321212971439fb265fb050b263681c9f8 SHA512 74f1349fa61dac9e66cfb863cb3126d07ce5f421b3e87d0220eb32bd5017ba8f6cf96eb8cb5ee45c39022671aa9f2d0408d4039970c438a69c002445aea510be DIST scons-4.1.0-user.pdf 2691364 BLAKE2B a910a09fa936d4d6f8dc967676d5aa009aac58a5a4566399b3ddc3512ac0259731e6c5399722fefadb3b79d8f89a5257e2e9bc2fa4d65697c8293ab995248d64 SHA512 64584731a59b59b78283be3876ecca91d742f83da2653d0de17922bec01e3c9cea1ce2ce3c8dc718597910ba86ed2c8aff0f7ae371bf763439b57a6d5484e1a7 DIST scons-4.1.0.gh.tar.gz 5609204 BLAKE2B ede3d47a1ec652b9248681e26738073e9d01daab7ffeccc58f0fcadb79661e30edb9a35a511518e4a58459243acb027afd8fa5849b0f9e4bae451055f7b1a062 SHA512 f79b86bb09783767b3872cfb8efb665372714a604af2aaf3adc66eee63d3afe27bc6b2aab83813743c83f71c81c800d42842e916501787ba402ce2726dda9b44 DIST scons-4.1.0.tar.gz 3007701 BLAKE2B 70ab64ecfd89fa2af1d78a33fcef82a5f7db9875ffe9d2c16ea75cf40e661b2874359e3a5f75d761b3d9e863f7a434560992cfb020cce3e21e389381331d90de SHA512 24fd493643545a2998b053ed0d68caf6241f05bc2437e7cbeae33d2e1c63517a61449a1a18062f8e4e5a639295a2486925296ba3e54ccfa2ecdd56fa07132de8 +DIST scons-4.2.0-user.html 1514655 BLAKE2B 036fd0e994d4a3dbf820e864c18f1dda2bb383b890919b3d99ca02e4f1f319b86050bf094309764bbb01585075697549e3168d66ee02caeee0fe4ca641f794a5 SHA512 b0dcf8d6ff32521f2ce92372a7efce4962268d2ca40645ec4b0d082e5a29ba5098488ba45bf36c9fb7e75996c7454ab80536052f43b9a533a22db05f466cd3e9 +DIST scons-4.2.0-user.pdf 2813567 BLAKE2B 2787c9dbecaefccc5f4df2bcccc474ee69e9883f9efa8358f6da00690d9f3fad48f7b696908cbb4cc8f3b9c195f86e11c81301d931783e463d7b2f3a5d528fc3 SHA512 3c36879af2b40190b7b68b162cb39e32e1d7ee01fe063dabe5404d616ab3c9972ebc8a6ce4c0b54a633cfc6825808f93207132ac9c9cd60d9e6ca28e864d5f16 +DIST scons-4.2.0.gh.tar.gz 5677165 BLAKE2B c298152db937810ab73afc304a9dc480c185ef0d6e86be5ec7f2022a7d1ed4d3df6ecc18148c3143d4e76a7ea0e50790db1224e66db68bace0759daba7f36a91 SHA512 138573f7203b52fad0527d8d88ceabe182273eff7e4b74125e0d7eda51c44408b07e2c702ee63214519392101d8bbb30013e6d34000eaeb530a816c17396de97 +DIST scons-4.2.0.tar.gz 3043008 BLAKE2B 3e69189e45b8ecc956419d3b7d4d36a78ffe219ff87a18d17c511434cf4306635c245107e7978d8f6b86f65bd2ac028fa3c76ab1212806a692d355d7d8036645 SHA512 91d77c858a888621d41432f39970547830997c8e28a851bbab7c0f181afda564abef321befaa33cbe6fd5fc4ac85fa80f2349994956edcc99c027cf7f526bbf0 EBUILD scons-4.1.0-r1.ebuild 2764 BLAKE2B 0add0564bc259cee0d3dc5b4121577e329257d62c02c9811f1df5df680402563cdbab7fd118c585c5b4dde333d1a96c69dc4f04b4785b92b4852e40136fd0409 SHA512 cbcc1e83478eb60778e7512dd3268d064fc1e96acfc47ee598b68064acd9b44e262c2d675d5c0383d632014174036bd9b9886f8e320464d9fbcbe2572dd1f494 +EBUILD scons-4.2.0-r1.ebuild 2889 BLAKE2B 709f7adaeefaabd3bc298d661a48c116ec472d78d18052abfbb715900e152b0303ea1565cd1e8c69a3dc06364de2f2524e7a1bd742207ac507a827a37233e105 SHA512 542741fa94fa0857732d3cfdf388f22c9d86965c026460ef00754f8b7a49b6e98bfd7ec9a9288cc6fe9dfe6fbe84f56f67c87686871126f4393dca9a6ee9e11e MISC metadata.xml 704 BLAKE2B 448bfef70e4f230008c21d8e542618a52f9761295ed33f1c7385a2a678bcb29d1028792e221441f9ba61fecb34646f5ef0f04795e28b17e8d4aeacbabf8751f2 SHA512 62e5c8c23f1c67c218ff6b33c1f941ac3c258b39a5b2d799bedceb734aa5b2e29a718f90823ab5bf199e9d1eb8236aefaddcbff99c6d03f58987fb4936b10aa6 diff --git a/dev-util/scons/files/scons-4.2.0-respect-cc-etc.patch b/dev-util/scons/files/scons-4.2.0-respect-cc-etc.patch new file mode 100644 index 000000000000..a075fec91d22 --- /dev/null +++ b/dev-util/scons/files/scons-4.2.0-respect-cc-etc.patch @@ -0,0 +1,96 @@ +From b6ba1f2b1feda529eca20fb8980f7c6c52397df6 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 + +--- + SCons/Platform/posix.py | 21 +++++++++++++++++++++ + SCons/Tool/cc.py | 3 ++- + SCons/Tool/cxx.py | 3 ++- + SCons/Tool/link.py | 3 ++- + 4 files changed, 27 insertions(+), 3 deletions(-) + +diff --git a/src/SCons/Platform/posix.py b/src/SCons/Platform/posix.py +index 37cd2377f..1246781de 100644 +--- a/src/SCons/Platform/posix.py ++++ b/src/SCons/Platform/posix.py +@@ -33,6 +33,7 @@ import subprocess + from SCons.Platform import TempFileMunge + from SCons.Platform.virtualenv import ImportVirtualenv + from SCons.Platform.virtualenv import ignore_virtualenv, enable_virtualenv ++import SCons.Util + + exitvalmap = { + 2 : 127, +@@ -86,6 +87,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/SCons/Tool/cc.py b/src/SCons/Tool/cc.py +index 590ec5fd3..5f9229a02 100644 +--- a/src/SCons/Tool/cc.py ++++ b/src/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/SCons/Tool/cxx.py b/src/SCons/Tool/cxx.py +index 128cdc4f6..1f852b64c 100644 +--- a/src/SCons/Tool/cxx.py ++++ b/src/SCons/Tool/cxx.py +@@ -69,7 +69,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/SCons/Tool/link.py b/src/SCons/Tool/link.py +index 24d17a31f..4ea9917e8 100644 +--- a/src/SCons/Tool/link.py ++++ b/src/SCons/Tool/link.py +@@ -49,7 +49,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.32.0 + diff --git a/dev-util/scons/scons-4.2.0-r1.ebuild b/dev-util/scons/scons-4.2.0-r1.ebuild new file mode 100644 index 000000000000..9c816bfcc0bb --- /dev/null +++ b/dev-util/scons/scons-4.2.0-r1.ebuild @@ -0,0 +1,102 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_SETUPTOOLS=rdepend +PYTHON_COMPAT=( python3_{8..9} ) +PYTHON_REQ_USE="threads(+)" + +inherit distutils-r1 + +DESCRIPTION="Extensible Python-based build utility" +HOMEPAGE="https://www.scons.org/" +SRC_URI=" + https://downloads.sourceforge.net/project/scons/scons/${PV}/${P}.tar.gz + doc? ( + https://www.scons.org/doc/${PV}/PDF/${PN}-user.pdf -> ${P}-user.pdf + https://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 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="doc test" +RESTRICT="!test? ( test )" + +BDEPEND=" + test? ( + dev-libs/libxml2[${PYTHON_USEDEP}] + dev-python/lxml[${PYTHON_USEDEP}] + ) +" + +S=${WORKDIR}/${P}/src + +PATCHES=( + # support env passthrough for Gentoo ebuilds + "${FILESDIR}"/scons-4.1.0-env-passthrough.patch + # respect CC, CXX, C*FLAGS, LDFLAGS by default + "${FILESDIR}"/scons-4.2.0-respect-cc-etc.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 + + # manpage install is completely broken + sed -i -e '/build\/doc\/man/d' src/setup.cfg || die + + if use test; then + local remove_tests=( + # TODO: does not respect PATH? + test/Clang + # broken + test/DVIPDF/DVIPDFFLAGS.py + test/Java/swig-dependencies.py + test/Java/multi-step.py + # broken by commas in date, sic! + test/option/option-v.py + test/Interactive/version.py + ) + rm -r "${remove_tests[@]}" || die + fi +} + +python_test() { + local -x COLUMNS=80 + # 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)")" + + # 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() { + rm "${ED}"/usr/*.1 || die + distutils-r1_python_install_all + + doman *.1 + use doc && dodoc "${DISTDIR}"/${P}-user.{pdf,html} +} |