diff options
-rw-r--r-- | dev-util/scons/Manifest | 4 | ||||
-rw-r--r-- | dev-util/scons/scons-3.1.0.ebuild | 86 |
2 files changed, 90 insertions, 0 deletions
diff --git a/dev-util/scons/Manifest b/dev-util/scons/Manifest index 9bd7b77cc81a..26940f37e0af 100644 --- a/dev-util/scons/Manifest +++ b/dev-util/scons/Manifest @@ -9,3 +9,7 @@ DIST scons-3.0.5-user.html 1130793 BLAKE2B 24bf6d5d566fe3c06879b797a77df5eda7382 DIST scons-3.0.5-user.pdf 2562305 BLAKE2B 48c206386f163a2779b27ede1b77783067a695e7f59255473343ddd3a19c4d39ceb7c7e5ccf819f76eda9282f5fb8d36bd0250a4a18f5e9d1a65fd3148276173 SHA512 443855ecddd1bc56f06b150da5d7b276a4dfe5ff8c5376b3c35b73f8281a89583308ddd138e120e33f67afa2cdd1b9a1366a533306ba4dfa460f439e4a2f33b4 DIST scons-3.0.5.gh.tar.gz 5510846 BLAKE2B 64489a9335a9aa0e2b58a78c6bba613de41d7035f03e8b5b1c1db8aae92e54808f1bd5ad4e97b8481db0f5276c184040663ec31d7307c30a6b092c860c0bb1c0 SHA512 afd4e3d5a76c009f7a3f55934c2d479c611df5713fdaf60aaa9860fc685f95a314bbe54df92fcbca3570dc9a5b244dcf08bf63ce0cef837c3767a37628abae02 DIST scons-3.0.5.tar.gz 655236 BLAKE2B 1ccd35e393b3307e0be830c2a5491712cba59fe476dfd9c461567288eb76a42e10ca1552ce7603facb66caf5c0b82583c563bd2342b9d7c68c8cabbd0317467b SHA512 0477038b014674049f12899b64584d44a85283d521b2422561e42020a5ae296a5af005684087c3ff410ed3fcbdcc5ff61998bc429eb29513f2a864138ffc4945 +DIST scons-3.1.0-user.html 1133694 BLAKE2B b7a208668db2303e873f5e7f09b9ad92d5197801a63ff392b086e0dbf1baa9c19d8208a6d9718aa7869e320d85cf3fcd5f24c5fe41dfded9f4a8d21d4bbb9b63 SHA512 731308886a660770aeb7b17020e99cbeb736a0bad8e138ff2363ea5297866445325daa4802ee051e0c01720aa73856163fb9da2fe5fb11077b9a2197e0c24323 +DIST scons-3.1.0-user.pdf 2564059 BLAKE2B 989469fd21e8989acf8e7ca2cf2c72dc584a3e708743e357fc2bd55173dbf64d9e2795706bc585975e8d86c754e1e44947feedf5156fb2b66c9f5402a9a015c6 SHA512 a92c4590a06ef2f4872e06db6d20bad333c5983b43d258574847d36976522888d6424781f43142b44abf4f8abc6f501b9894c476a9d1497b260d42efd48d8e8b +DIST scons-3.1.0.gh.tar.gz 5528270 BLAKE2B d56d02f7d4550af8df42b5c5f8fda02a92ad6aedabb44e69bd46cb4ecf0f0de6b86a8f1ea65e9c4e5e57430f47c9ec7f354d366e60569b4c414bb15d4e52cc84 SHA512 3894d17bca02b9aa5426c70d894b8ecfcf3db2b20254b848209c31d8413a8cd1c2a7b2a87ef9bcfe5555980beb2815f62cdbe185098a64ae8b3506c41c867463 +DIST scons-3.1.0.tar.gz 661528 BLAKE2B deb3b8b4d22ec705674be3e2f84bb35b4726d5f7c082a341d2319d471a3302fc89bfdadc7545f0f4cc0c321c67301b364bdb5723a1d10374eee636b486197092 SHA512 b2d61e364bcff29027a7ba70e2a74186ab136b00f147ff358701aaf68f47134e18e24c2a9cb1ff9ec0fb4fb73ffa21e04043157f2b5cd975aca7fc91c69385ee diff --git a/dev-util/scons/scons-3.1.0.ebuild b/dev-util/scons/scons-3.1.0.ebuild new file mode 100644 index 000000000000..4da9718eabcf --- /dev/null +++ b/dev-util/scons/scons-3.1.0.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +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="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 )" + +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} +} |