parent
5b42336c45
commit
1a1b3cf422
Binary file not shown.
Binary file not shown.
@ -0,0 +1,58 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
|
||||
PYTHON_COMPAT=( python3_{8..10} )
|
||||
|
||||
inherit bash-completion-r1 distutils-r1
|
||||
|
||||
DESCRIPTION="Universal Command Line Environment for AWS"
|
||||
HOMEPAGE="https://pypi.org/project/awscli/"
|
||||
#SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
|
||||
SRC_URI="https://github.com/aws/aws-cli/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/aws-cli-${PV}"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||
|
||||
# botocore is x.(y+1).z
|
||||
BOTOCORE_PV="$(ver_cut 1).$(( $(ver_cut 2) + 1)).$(ver_cut 3-)"
|
||||
RDEPEND="
|
||||
>=dev-python/botocore-${BOTOCORE_PV}[${PYTHON_USEDEP}]
|
||||
dev-python/colorama[${PYTHON_USEDEP}]
|
||||
dev-python/docutils[${PYTHON_USEDEP}]
|
||||
dev-python/rsa[${PYTHON_USEDEP}]
|
||||
>=dev-python/s3transfer-0.4.0[${PYTHON_USEDEP}]
|
||||
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||
"
|
||||
BDEPEND="
|
||||
test? (
|
||||
dev-python/mock[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
distutils_enable_tests --install nose
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/awscli-1.19.47-py39.patch
|
||||
)
|
||||
|
||||
python_test() {
|
||||
distutils_install_for_testing
|
||||
# integration tests require AWS credentials and Internet access
|
||||
nosetests -v tests/{functional,unit} ||
|
||||
die "Tests failed for ${EPYTHON}"
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
newbashcomp bin/aws_bash_completer aws
|
||||
|
||||
insinto /usr/share/zsh/site-functions
|
||||
newins bin/aws_zsh_completer.sh _aws
|
||||
|
||||
distutils-r1_python_install_all
|
||||
|
||||
rm "${ED}"/usr/bin/{aws.cmd,aws_bash_completer,aws_zsh_completer.sh} || die
|
||||
}
|
@ -1 +1 @@
|
||||
DIST exo-1.37.0.tar.gz 5232994 BLAKE2B 9d6a965a8c08e7a2fe1f2854c0af3e61fc880e01b1567c30a032742363b83a2a30f0f2ef5db0f4d6fbd96b4bb99feb3106894c86f084155e5dcb6b8eb1185517 SHA512 133cfc85289c13f849cc3e8987b209fd402363e4d413c8f36850b20177a4cbf74c23241a8a7473f1fa62e86d4c977f0787fa5eae2a2d52f829802e41918a9a86
|
||||
DIST exo-1.38.0.tar.gz 5233640 BLAKE2B 11a0500690a5d9efe35d34b9f562265fb8ecee2d4d8e15c37ec4c2b99f1a5665120bffd5a8359e61c0763db530a3d3141deb08083b8289785e834861ba728b04 SHA512 f509eeacf1266893c8a3e4e09556987e33a533c1ebc64b6d39d7bd801fa5e11a6d8875c4111e760309ac6be0a6dbdcbcc227d0b4804c8f04e9d094c44ee9d0dd
|
||||
|
@ -1,2 +1,2 @@
|
||||
DIST hcloud-1.22.1.tar.xz 910672 BLAKE2B 51e18c530964677bd0cef8232c68031f3186b83fe0da91e8c6572b95130df32e5b00de6e734fb6cce56a51b6fca6136bb306d33ad4a6c728aac3d0afe634c738 SHA512 365823e779f526ae9cbbb50ecaed557c5a838b6614208e4d03e7eadb9569a2e2156e05e019aea2623a811defda707b8822d0eb09a4bfd7006262bd6a19e09aae
|
||||
DIST hcloud-1.25.1.tar.xz 1164932 BLAKE2B 21d3a0def3684a25c0cb629320f5617c93090d33cc95e66c42355c01afaf3189f8da858028220350bc1f1f53992b289ea75b56196d94ae41323602c4e8fee1a8 SHA512 aba79869553b19f6a117dc4d9f31935582e9ad89d12d9fd8f70087064383b76324483c78890ddb5965f98f2ca783ca46a17dee97b21716a1ff916647c1267a67
|
||||
DIST hcloud-1.26.0.tar.xz 1165084 BLAKE2B bad49430708ecd34b5c7734c0693e00d7bd3bd98a0c4fc2c4a9c9e8059afd44d5fd696072d1f0d64c7e0dc8bcdc05554437fc63c1dd7e8c2e1dd8f540a7c836b SHA512 87cca87cf88589871a175c1fa2d5d21b44b450fe8e6b190e57342082601aa44b6d5a5919696278214e0a32a89ed8b88e066b00263e72383a2f92a7cd434762aa
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1,2 +1,2 @@
|
||||
DIST duplicity-0.8.17.tar.gz 1351433 BLAKE2B 39c87c421bb8a4bf27e60c16b6dde559ed4468a1062f02623d8e37deb62e63101b6fb5524e5a991139d39422cab2803b89007bf1ca5819817ab3b53d5318b88c SHA512 6f9f6b45953d2bc7ed403d68bdc419f384e07f831c783af720f15f88b100f5becb3f83f65cfc715b02686c24d18c5ec8f80c27789d1ec01cdc8efefa7590c211
|
||||
DIST duplicity-0.8.19.tar.gz 1372739 BLAKE2B 6a5a642597529eea37c7224cbfdd115db42c16f6391e553454f8f82cea86240bbd68a62513129496a1f978411fdeec50c3d918bb99b470fa1444fd77e7e6c9b7 SHA512 c1a1f5894f8b94ac61bd98270f138c58ef5a68f3624e7e88224b15539ca6e08874df9cebb36b10167d133b1af6a93b29e7bf4084c348b9cd7914ff24415be57c
|
||||
DIST duplicity-0.8.20.tar.gz 1376671 BLAKE2B af3fd95b699cd9b3c6bbe259e0dd898fc058461efcb2d1d51c8c2d539df7e32fe70fb6af4b314cd6fce219345f23eb0ab342d0c7f28b05ec1ee4333c02d93415 SHA512 ac43473a18031fa33cee0b7a3dc6b33c830ba9d19a0129c065a226824af8aacf00230ae05bf2e0d7614ad4ce9724e40e9b8305114175af63d8a8a8642ffdce67
|
||||
|
Binary file not shown.
@ -1,2 +1,3 @@
|
||||
DIST certbot-1.16.0.tar.gz 1384177 BLAKE2B 4e46e7d7b9db2f6ef19fab60c2d904f84b502d2911ed496967bbe272db5352c1e9bdb65b8f45358f222214bce4721ceecc12c018b875148bc897f83c5eb63933 SHA512 c2a0c4ea52ab241e387d686a9e5ed67aa5e8b4b7d34ad8996e34562e036c25ab8b397bf482a856758ca787b97bbd78c890189250c0c3d948f03fbf91aa25ece0
|
||||
DIST certbot-1.17.0.tar.gz 1386471 BLAKE2B 26cf23c481cc67e1fa0f698dee83dd42b1d382814f10bdb4d2a459f1274f3d661d2a58815c30110701d46362c3fbaee9f57089a7eda1221c9b9dadb2c48dc79d SHA512 104deb8e6e804a3a3f50c730f00307aa39d9d42756f24be009fedc27c889c1575b456455ee11441e341025db6f528359e927a347554ebd57b64c39e789576eda
|
||||
DIST certbot-1.18.0.tar.gz 1332615 BLAKE2B eb086710b943893025d6e1091470ca02de074232372f4c9fa21fa83a347fe54df988b9553c8cf6afd6e166b8c464d595171984c984008a872e16c0179bb774b2 SHA512 94b16ba0586e0f5d3036280c68f9976c25889ca48fbbe7aded41f0d9feba2300a3f0ff8fe321b39d8642bcdd874c7332cf2acb3187b5869fe415831f58a75a7b
|
||||
|
@ -0,0 +1,69 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
PYTHON_COMPAT=(python{3_7,3_8,3_9})
|
||||
DISTUTILS_USE_SETUPTOOLS=rdepend
|
||||
|
||||
if [[ ${PV} == 9999* ]]; then
|
||||
EGIT_REPO_URI="https://github.com/certbot/certbot.git"
|
||||
inherit git-r3
|
||||
S=${WORKDIR}/${P}/${PN}
|
||||
else
|
||||
SRC_URI="https://github.com/certbot/certbot/archive/v${PV}.tar.gz -> certbot-${PV}.tar.gz"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
|
||||
S=${WORKDIR}/certbot-${PV}/acme
|
||||
fi
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="An implementation of the ACME protocol"
|
||||
HOMEPAGE="https://github.com/certbot/certbot https://letsencrypt.org/"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
IUSE="doc test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
dev-python/chardet[${PYTHON_USEDEP}]
|
||||
>=dev-python/cryptography-2.1.4[${PYTHON_USEDEP}]
|
||||
>=dev-python/idna-2.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/josepy-1.1.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyopenssl-17.3.0[${PYTHON_USEDEP}]
|
||||
dev-python/pyrfc3339[${PYTHON_USEDEP}]
|
||||
dev-python/pytz[${PYTHON_USEDEP}]
|
||||
>=dev-python/requests-2.14.2[${PYTHON_USEDEP}]
|
||||
>=dev-python/requests-toolbelt-0.3.0[${PYTHON_USEDEP}]
|
||||
"
|
||||
DEPEND="
|
||||
doc? (
|
||||
dev-python/sphinx[${PYTHON_USEDEP}]
|
||||
dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
|
||||
)
|
||||
test? (
|
||||
${RDEPEND}
|
||||
dev-python/nose[${PYTHON_USEDEP}]
|
||||
dev-python/pytest[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-xdist[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
src_compile() {
|
||||
python_foreach_impl run_in_build_dir default
|
||||
distutils-r1_src_compile
|
||||
if use doc ; then
|
||||
cd docs || die
|
||||
sphinx-build -b html -d _build/doctrees . _build/html
|
||||
fi
|
||||
}
|
||||
|
||||
python_test() {
|
||||
nosetests -w ${PN} || die
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
use doc && local HTML_DOCS=( docs/_build/html/. )
|
||||
|
||||
distutils-r1_python_install_all
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
DIST certbot-1.16.0.tar.gz 1384177 BLAKE2B 4e46e7d7b9db2f6ef19fab60c2d904f84b502d2911ed496967bbe272db5352c1e9bdb65b8f45358f222214bce4721ceecc12c018b875148bc897f83c5eb63933 SHA512 c2a0c4ea52ab241e387d686a9e5ed67aa5e8b4b7d34ad8996e34562e036c25ab8b397bf482a856758ca787b97bbd78c890189250c0c3d948f03fbf91aa25ece0
|
||||
DIST certbot-1.17.0.tar.gz 1386471 BLAKE2B 26cf23c481cc67e1fa0f698dee83dd42b1d382814f10bdb4d2a459f1274f3d661d2a58815c30110701d46362c3fbaee9f57089a7eda1221c9b9dadb2c48dc79d SHA512 104deb8e6e804a3a3f50c730f00307aa39d9d42756f24be009fedc27c889c1575b456455ee11441e341025db6f528359e927a347554ebd57b64c39e789576eda
|
||||
DIST certbot-1.18.0.tar.gz 1332615 BLAKE2B eb086710b943893025d6e1091470ca02de074232372f4c9fa21fa83a347fe54df988b9553c8cf6afd6e166b8c464d595171984c984008a872e16c0179bb774b2 SHA512 94b16ba0586e0f5d3036280c68f9976c25889ca48fbbe7aded41f0d9feba2300a3f0ff8fe321b39d8642bcdd874c7332cf2acb3187b5869fe415831f58a75a7b
|
||||
|
@ -0,0 +1,30 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
PYTHON_COMPAT=(python{3_7,3_8,3_9})
|
||||
DISTUTILS_USE_SETUPTOOLS=rdepend
|
||||
|
||||
if [[ ${PV} == 9999* ]]; then
|
||||
EGIT_REPO_URI="https://github.com/certbot/certbot.git"
|
||||
inherit git-r3
|
||||
S=${WORKDIR}/${P}/${PN}
|
||||
else
|
||||
SRC_URI="https://github.com/${PN%-apache}/${PN%-apache}/archive/v${PV}.tar.gz -> ${PN%-apache}-${PV}.tar.gz"
|
||||
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||
S=${WORKDIR}/${PN%-apache}-${PV}/${PN}
|
||||
fi
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Apache plugin for certbot (Let's Encrypt Client)"
|
||||
HOMEPAGE="https://github.com/certbot/certbot https://letsencrypt.org/"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
|
||||
RDEPEND=">=app-crypt/acme-${PV}[${PYTHON_USEDEP}]
|
||||
>=app-crypt/certbot-${PV}[${PYTHON_USEDEP}]
|
||||
dev-python/python-augeas[${PYTHON_USEDEP}]
|
||||
dev-python/zope-component[${PYTHON_USEDEP}]
|
||||
dev-python/zope-interface[${PYTHON_USEDEP}]"
|
@ -1,2 +1,3 @@
|
||||
DIST certbot-1.16.0.tar.gz 1384177 BLAKE2B 4e46e7d7b9db2f6ef19fab60c2d904f84b502d2911ed496967bbe272db5352c1e9bdb65b8f45358f222214bce4721ceecc12c018b875148bc897f83c5eb63933 SHA512 c2a0c4ea52ab241e387d686a9e5ed67aa5e8b4b7d34ad8996e34562e036c25ab8b397bf482a856758ca787b97bbd78c890189250c0c3d948f03fbf91aa25ece0
|
||||
DIST certbot-1.17.0.tar.gz 1386471 BLAKE2B 26cf23c481cc67e1fa0f698dee83dd42b1d382814f10bdb4d2a459f1274f3d661d2a58815c30110701d46362c3fbaee9f57089a7eda1221c9b9dadb2c48dc79d SHA512 104deb8e6e804a3a3f50c730f00307aa39d9d42756f24be009fedc27c889c1575b456455ee11441e341025db6f528359e927a347554ebd57b64c39e789576eda
|
||||
DIST certbot-1.18.0.tar.gz 1332615 BLAKE2B eb086710b943893025d6e1091470ca02de074232372f4c9fa21fa83a347fe54df988b9553c8cf6afd6e166b8c464d595171984c984008a872e16c0179bb774b2 SHA512 94b16ba0586e0f5d3036280c68f9976c25889ca48fbbe7aded41f0d9feba2300a3f0ff8fe321b39d8642bcdd874c7332cf2acb3187b5869fe415831f58a75a7b
|
||||
|
@ -0,0 +1,32 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
PYTHON_COMPAT=(python{3_7,3_8,3_9})
|
||||
DISTUTILS_USE_SETUPTOOLS=rdepend
|
||||
|
||||
if [[ ${PV} == 9999* ]]; then
|
||||
EGIT_REPO_URI="https://github.com/certbot/certbot.git"
|
||||
inherit git-r3
|
||||
S=${WORKDIR}/${P}/${PN}
|
||||
else
|
||||
SRC_URI="https://github.com/${PN%-nginx}/${PN%-nginx}/archive/v${PV}.tar.gz -> ${PN%-nginx}-${PV}.tar.gz"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
|
||||
S=${WORKDIR}/${PN%-nginx}-${PV}/${PN}
|
||||
fi
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Nginx plugin for certbot (Let's Encrypt Client)"
|
||||
HOMEPAGE="https://github.com/certbot/certbot https://letsencrypt.org/"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="
|
||||
>=app-crypt/acme-${PV}[${PYTHON_USEDEP}]
|
||||
>=app-crypt/certbot-${PV}[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyopenssl-17.3.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyparsing-2.2.0[${PYTHON_USEDEP}]
|
||||
dev-python/zope-interface[${PYTHON_USEDEP}]"
|
@ -1,2 +1,3 @@
|
||||
DIST certbot-1.16.0.tar.gz 1384177 BLAKE2B 4e46e7d7b9db2f6ef19fab60c2d904f84b502d2911ed496967bbe272db5352c1e9bdb65b8f45358f222214bce4721ceecc12c018b875148bc897f83c5eb63933 SHA512 c2a0c4ea52ab241e387d686a9e5ed67aa5e8b4b7d34ad8996e34562e036c25ab8b397bf482a856758ca787b97bbd78c890189250c0c3d948f03fbf91aa25ece0
|
||||
DIST certbot-1.17.0.tar.gz 1386471 BLAKE2B 26cf23c481cc67e1fa0f698dee83dd42b1d382814f10bdb4d2a459f1274f3d661d2a58815c30110701d46362c3fbaee9f57089a7eda1221c9b9dadb2c48dc79d SHA512 104deb8e6e804a3a3f50c730f00307aa39d9d42756f24be009fedc27c889c1575b456455ee11441e341025db6f528359e927a347554ebd57b64c39e789576eda
|
||||
DIST certbot-1.18.0.tar.gz 1332615 BLAKE2B eb086710b943893025d6e1091470ca02de074232372f4c9fa21fa83a347fe54df988b9553c8cf6afd6e166b8c464d595171984c984008a872e16c0179bb774b2 SHA512 94b16ba0586e0f5d3036280c68f9976c25889ca48fbbe7aded41f0d9feba2300a3f0ff8fe321b39d8642bcdd874c7332cf2acb3187b5869fe415831f58a75a7b
|
||||
|
@ -0,0 +1,36 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
PYTHON_COMPAT=(python{3_7,3_8,3_9})
|
||||
DISTUTILS_USE_SETUPTOOLS=rdepend
|
||||
|
||||
if [[ ${PV} == 9999* ]]; then
|
||||
EGIT_REPO_URI="https://github.com/certbot/certbot.git"
|
||||
inherit git-r3
|
||||
else
|
||||
SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
|
||||
fi
|
||||
S=${WORKDIR}/${P}/${PN}
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Let's encrypt client to automate deployment of X.509 certificates"
|
||||
HOMEPAGE="https://github.com/certbot/certbot https://letsencrypt.org/"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
|
||||
RDEPEND="
|
||||
>=app-crypt/acme-${PV}[${PYTHON_USEDEP}]
|
||||
>=dev-python/configargparse-0.9.3[${PYTHON_USEDEP}]
|
||||
>=dev-python/configobj-5.0.6[${PYTHON_USEDEP}]
|
||||
>=dev-python/cryptography-2.8[${PYTHON_USEDEP}]
|
||||
>=dev-python/distro-1.0.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/josepy-1.1.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/parsedatetime-2.4[${PYTHON_USEDEP}]
|
||||
dev-python/pyrfc3339[${PYTHON_USEDEP}]
|
||||
dev-python/pytz[${PYTHON_USEDEP}]
|
||||
dev-python/zope-component[${PYTHON_USEDEP}]
|
||||
dev-python/zope-interface[${PYTHON_USEDEP}]"
|
@ -0,0 +1,11 @@
|
||||
--- a/src/hash.cpp
|
||||
+++ b/src/hash.cpp
|
||||
@@ -279,7 +279,7 @@
|
||||
MAP_FILE|
|
||||
#endif
|
||||
MAP_SHARED,fd,0);
|
||||
- if(fdht->base>0){
|
||||
+ if(fdht->base){
|
||||
/* mmap is successful, so set the bounds.
|
||||
* if it is not successful, we default to reading the fd
|
||||
*/
|
@ -1,25 +1,27 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
EAPI=8
|
||||
|
||||
inherit autotools
|
||||
|
||||
DESCRIPTION="Expanded md5sum program with recursive and comparison options"
|
||||
HOMEPAGE="http://md5deep.sourceforge.net/"
|
||||
SRC_URI="https://github.com/jessek/hashdeep/archive/release-${PV}.tar.gz
|
||||
-> ${P}.tar.gz"
|
||||
SRC_URI="https://github.com/jessek/hashdeep/archive/release-${PV}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/hashdeep-release-${PV}"
|
||||
|
||||
LICENSE="public-domain GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 arm arm64 ~mips ppc ~ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos"
|
||||
IUSE=""
|
||||
|
||||
S=${WORKDIR}/hashdeep-release-${PV}
|
||||
|
||||
DOCS=( AUTHORS ChangeLog FILEFORMAT NEWS README.md TODO )
|
||||
PATCHES=( "${FILESDIR}"/${PN}-4.4-pointer-comparison.patch )
|
||||
|
||||
src_prepare() {
|
||||
eapply_user
|
||||
default
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
dodoc FILEFORMAT
|
||||
}
|
||||
|
Binary file not shown.
@ -1 +1,2 @@
|
||||
DIST docker-cli-20.10.7.tar.gz 7523515 BLAKE2B 36ae46a28ca943e75419014b8b8453dbdd36bf240b9c36aed245447241dd07635da0319fd9b6ea409ecbe4c419eec8650d94d2a296e45a9c3b02a9a47a314888 SHA512 4523ae70cb27d848da119070171af2eb84e974ac39d70be4feee105e37c949487c7f72a9bc30c32ce71bffb0787e27b7b9194ce5a8aeae57bdfeb3f2d730010f
|
||||
DIST docker-cli-20.10.8.tar.gz 7526374 BLAKE2B 65b7733c9a71c7f266e83b7014ecdca998915e71352a1bbbb346be6a3a65f1ed6644b321b62d0592f2dbf308ff51d3d4ad0d9828831f5f90b451c6ff23452faa SHA512 60e9e623180d3cafd8bd6458d02574274871f94e88a0fa461e2200520717e837371a1b5d7fab6c9c4591e64807ab6f560e0756a9cfb1c1c8c9624b1f653346d0
|
||||
|
@ -0,0 +1,66 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
GIT_COMMIT=3967b7d28e
|
||||
EGO_PN="github.com/docker/cli"
|
||||
MY_PV=${PV/_/-}
|
||||
inherit bash-completion-r1 golang-vcs-snapshot
|
||||
|
||||
DESCRIPTION="the command line binary for docker"
|
||||
HOMEPAGE="https://www.docker.com/"
|
||||
SRC_URI="https://github.com/docker/cli/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
|
||||
IUSE="hardened"
|
||||
|
||||
RDEPEND="!<app-emulation/docker-20.10.1"
|
||||
BDEPEND="
|
||||
>=dev-lang/go-1.16.6
|
||||
dev-go/go-md2man"
|
||||
|
||||
RESTRICT="installsources strip"
|
||||
|
||||
S="${WORKDIR}/${P}/src/${EGO_PN}"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
sed -i 's@dockerd\?\.exe@@g' contrib/completion/bash/docker || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
export DISABLE_WARN_OUTSIDE_CONTAINER=1
|
||||
export GOPATH="${WORKDIR}/${P}"
|
||||
# setup CFLAGS and LDFLAGS for separate build target
|
||||
# see https://github.com/tianon/docker-overlay/pull/10
|
||||
export CGO_CFLAGS="-I${ESYSROOT}/usr/include"
|
||||
export CGO_LDFLAGS="-L${ESYSROOT}/usr/$(get_libdir)"
|
||||
emake \
|
||||
LDFLAGS="$(usex hardened '-extldflags -fno-PIC' '')" \
|
||||
VERSION="$(cat VERSION)" \
|
||||
GITCOMMIT="${GIT_COMMIT}" \
|
||||
dynbinary
|
||||
|
||||
# build man pages
|
||||
# see "cli/scripts/docs/generate-man.sh" (which also does "go get" for go-md2man)
|
||||
mkdir -p ./man/man1 || die "mkdir failed"
|
||||
go build -o "${T}"/gen-manpages ./man ||
|
||||
die 'build gen-manpages failed'
|
||||
"${T}"/gen-manpages --root "$(pwd)" --target "$(pwd)"/man/man1 ||
|
||||
die 'gen-manpages failed'
|
||||
./man/md2man-all.sh -q ||
|
||||
die 'md2man-all.sh failed'
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin build/docker
|
||||
doman man/man*/*
|
||||
dobashcomp contrib/completion/bash/*
|
||||
bashcomp_alias docker dockerd
|
||||
insinto /usr/share/fish/vendor_completions.d/
|
||||
doins contrib/completion/fish/docker.fish
|
||||
insinto /usr/share/zsh/site-functions
|
||||
doins contrib/completion/zsh/_*
|
||||
}
|
@ -1 +1,2 @@
|
||||
DIST docker-20.10.7.tar.gz 11077660 BLAKE2B 081b36668ead0fd727ebdabc0d07fdf1992f64e3ab1e7c09933130b37f9ad60876c36d1fcda5619ba1bffac7fadafe63d7fc647868c3c6ba30429487c2ebc31b SHA512 2341faa3ebb903d74fa434712fce45e7acf0423710b97cdca11e3999db2819c4385d9a7fb3850925592f20f02c6261edbade6c9d6a2fefbc32f05a6b44ec3073
|
||||
DIST docker-20.10.8.tar.gz 11080739 BLAKE2B 1e5c14e23c4e9c8b0568cf19c98cb4cdbedc43742357bed61201f0188d5e3f4949d5e2a2231fd89635290c8784678005dff707a4e00ececfb82d88c69d31d235 SHA512 17c0519c8938227c578e5fe37689dd5a362b9673fabe06f98145b6fd5ae99e099a304c5706a84df30a2810855987fd694ac9cae7574023710fd1d99b0ca1aaf8
|
||||
|
@ -0,0 +1,279 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
EGO_PN=github.com/docker/docker
|
||||
MY_PV=${PV/_/-}
|
||||
GIT_COMMIT=75249d88bc
|
||||
inherit bash-completion-r1 linux-info systemd udev golang-vcs-snapshot
|
||||
|
||||
DESCRIPTION="The core functions you need to create Docker images and run Docker containers"
|
||||
HOMEPAGE="https://www.docker.com/"
|
||||
SRC_URI="https://github.com/moby/moby/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
|
||||
IUSE="apparmor aufs btrfs +cli +container-init device-mapper hardened overlay seccomp"
|
||||
|
||||
DEPEND="
|
||||
acct-group/docker
|
||||
>=dev-db/sqlite-3.7.9:3
|
||||
apparmor? ( sys-libs/libapparmor )
|
||||
btrfs? ( >=sys-fs/btrfs-progs-3.16.1 )
|
||||
device-mapper? ( >=sys-fs/lvm2-2.02.89[thin] )
|
||||
seccomp? ( >=sys-libs/libseccomp-2.2.1 )
|
||||
"
|
||||
|
||||
# https://github.com/moby/moby/blob/master/project/PACKAGERS.md#runtime-dependencies
|
||||
# https://github.com/moby/moby/blob/master/project/PACKAGERS.md#optional-dependencies
|
||||
# https://github.com/moby/moby/tree/master//hack/dockerfile/install
|
||||
# make sure docker-proxy is pinned to exact version from ^,
|
||||
# for appropriate branchch/version of course
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
>=net-firewall/iptables-1.4
|
||||
sys-process/procps
|
||||
>=dev-vcs/git-1.7
|
||||
>=app-arch/xz-utils-4.9
|
||||
dev-libs/libltdl
|
||||
>=app-emulation/containerd-1.4.9[apparmor?,btrfs?,device-mapper?,seccomp?]
|
||||
~app-emulation/docker-proxy-0.8.0_p20210525
|
||||
cli? ( app-emulation/docker-cli )
|
||||
container-init? ( >=sys-process/tini-0.19.0[static] )
|
||||
"
|
||||
|
||||
# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies
|
||||
BDEPEND="
|
||||
>=dev-lang/go-1.16.6
|
||||
dev-go/go-md2man
|
||||
virtual/pkgconfig
|
||||
"
|
||||
# tests require running dockerd as root and downloading containers
|
||||
RESTRICT="installsources strip test"
|
||||
|
||||
S="${WORKDIR}/${P}/src/${EGO_PN}"
|
||||
|
||||
# https://bugs.gentoo.org/748984 https://github.com/etcd-io/etcd/pull/12552
|
||||
PATCHES=(
|
||||
"${FILESDIR}/etcd-F_OFD_GETLK-fix.patch"
|
||||
"${FILESDIR}/ppc64-buildmode.patch"
|
||||
)
|
||||
|
||||
# see "contrib/check-config.sh" from upstream's sources
|
||||
CONFIG_CHECK="
|
||||
~NAMESPACES ~NET_NS ~PID_NS ~IPC_NS ~UTS_NS
|
||||
~CGROUPS ~CGROUP_CPUACCT ~CGROUP_DEVICE ~CGROUP_FREEZER ~CGROUP_SCHED ~CPUSETS ~MEMCG
|
||||
~CGROUP_NET_PRIO
|
||||
~KEYS
|
||||
~VETH ~BRIDGE ~BRIDGE_NETFILTER
|
||||
~IP_NF_FILTER ~IP_NF_TARGET_MASQUERADE ~NETFILTER_XT_MARK
|
||||
~NETFILTER_NETLINK ~NETFILTER_XT_MATCH_ADDRTYPE ~NETFILTER_XT_MATCH_CONNTRACK ~NETFILTER_XT_MATCH_IPVS
|
||||
~IP_NF_NAT ~NF_NAT
|
||||
~POSIX_MQUEUE
|
||||
|
||||
~USER_NS
|
||||
~SECCOMP
|
||||
~CGROUP_PIDS
|
||||
~MEMCG_SWAP
|
||||
|
||||
~BLK_CGROUP ~BLK_DEV_THROTTLING
|
||||
~CGROUP_PERF
|
||||
~CGROUP_HUGETLB
|
||||
~NET_CLS_CGROUP
|
||||
~CFS_BANDWIDTH ~FAIR_GROUP_SCHED
|
||||
~IP_VS ~IP_VS_PROTO_TCP ~IP_VS_PROTO_UDP ~IP_VS_NFCT ~IP_VS_RR
|
||||
|
||||
~VXLAN
|
||||
~CRYPTO ~CRYPTO_AEAD ~CRYPTO_GCM ~CRYPTO_SEQIV ~CRYPTO_GHASH ~XFRM_ALGO ~XFRM_USER
|
||||
~IPVLAN
|
||||
~MACVLAN ~DUMMY
|
||||
|
||||
~OVERLAY_FS ~!OVERLAY_FS_REDIRECT_DIR
|
||||
~EXT4_FS_SECURITY
|
||||
~EXT4_FS_POSIX_ACL
|
||||
"
|
||||
|
||||
ERROR_KEYS="CONFIG_KEYS: is mandatory"
|
||||
ERROR_MEMCG_SWAP="CONFIG_MEMCG_SWAP: is required if you wish to limit swap usage of containers"
|
||||
ERROR_RESOURCE_COUNTERS="CONFIG_RESOURCE_COUNTERS: is optional for container statistics gathering"
|
||||
|
||||
ERROR_BLK_CGROUP="CONFIG_BLK_CGROUP: is optional for container statistics gathering"
|
||||
ERROR_IOSCHED_CFQ="CONFIG_IOSCHED_CFQ: is optional for container statistics gathering"
|
||||
ERROR_CGROUP_PERF="CONFIG_CGROUP_PERF: is optional for container statistics gathering"
|
||||
ERROR_CFS_BANDWIDTH="CONFIG_CFS_BANDWIDTH: is optional for container statistics gathering"
|
||||
ERROR_XFRM_ALGO="CONFIG_XFRM_ALGO: is optional for secure networks"
|
||||
ERROR_XFRM_USER="CONFIG_XFRM_USER: is optional for secure networks"
|
||||
|
||||
pkg_setup() {
|
||||
|
||||
if kernel_is lt 4 5; then
|
||||
CONFIG_CHECK+="
|
||||
~MEMCG_KMEM
|
||||
"
|
||||
ERROR_MEMCG_KMEM="CONFIG_MEMCG_KMEM: is optional"
|
||||
fi
|
||||
|
||||
if kernel_is lt 4 7; then
|
||||
CONFIG_CHECK+="
|
||||
~DEVPTS_MULTIPLE_INSTANCES
|
||||
"
|
||||
fi
|
||||
|
||||
if kernel_is lt 5 1; then
|
||||
CONFIG_CHECK+="
|
||||
~NF_NAT_IPV4
|
||||
~IOSCHED_CFQ
|
||||
~CFQ_GROUP_IOSCHED
|
||||
"
|
||||
fi
|
||||
|
||||
if kernel_is lt 5 2; then
|
||||
CONFIG_CHECK+="
|
||||
~NF_NAT_NEEDED
|
||||
"
|
||||
fi
|
||||
|
||||
if kernel_is lt 5 8; then
|
||||
CONFIG_CHECK+="
|
||||
~MEMCG_SWAP_ENABLED
|
||||
"
|
||||
fi
|
||||
|
||||
if use aufs; then
|
||||
CONFIG_CHECK+="
|
||||
~AUFS_FS
|
||||
~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY
|
||||
"
|
||||
ERROR_AUFS_FS="CONFIG_AUFS_FS: is required to be set if and only if aufs is patched to kernel instead of using standalone"
|
||||
fi
|
||||
|
||||
if use btrfs; then
|
||||
CONFIG_CHECK+="
|
||||
~BTRFS_FS
|
||||
~BTRFS_FS_POSIX_ACL
|
||||
"
|
||||
fi
|
||||
|
||||
if use device-mapper; then
|
||||
CONFIG_CHECK+="
|
||||
~BLK_DEV_DM ~DM_THIN_PROVISIONING ~EXT4_FS ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY
|
||||
"
|
||||
fi
|
||||
|
||||
linux-info_pkg_setup
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
export DOCKER_GITCOMMIT="${GIT_COMMIT}"
|
||||
export GOPATH="${WORKDIR}/${P}"
|
||||
export VERSION=${PV}
|
||||
|
||||
# setup CFLAGS and LDFLAGS for separate build target
|
||||
# see https://github.com/tianon/docker-overlay/pull/10
|
||||
export CGO_CFLAGS="-I${ESYSROOT}/usr/include"
|
||||
export CGO_LDFLAGS="-L${ESYSROOT}/usr/$(get_libdir)"
|
||||
|
||||
# let's set up some optional features :)
|
||||
export DOCKER_BUILDTAGS=''
|
||||
for gd in aufs btrfs device-mapper overlay; do
|
||||
if ! use $gd; then
|
||||
DOCKER_BUILDTAGS+=" exclude_graphdriver_${gd//-/}"
|
||||
fi
|
||||
done
|
||||
|
||||
for tag in apparmor seccomp; do
|
||||
if use $tag; then
|
||||
DOCKER_BUILDTAGS+=" $tag"
|
||||
fi
|
||||
done
|
||||
|
||||
if use hardened; then
|
||||
sed -i "s/EXTLDFLAGS_STATIC='/&-fno-PIC /" hack/make.sh || die
|
||||
grep -q -- '-fno-PIC' hack/make.sh || die 'hardened sed failed'
|
||||
sed "s/LDFLAGS_STATIC_DOCKER='/&-extldflags -fno-PIC /" \
|
||||
-i hack/make/dynbinary-daemon || die
|
||||
grep -q -- '-fno-PIC' hack/make/dynbinary-daemon || die 'hardened sed failed'
|
||||
fi
|
||||
|
||||
# build daemon
|
||||
./hack/make.sh dynbinary || die 'dynbinary failed'
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dosym containerd /usr/bin/docker-containerd
|
||||
dosym containerd-shim /usr/bin/docker-containerd-shim
|
||||
dosym runc /usr/bin/docker-runc
|
||||
use container-init && dosym tini /usr/bin/docker-init
|
||||
newbin bundles/dynbinary-daemon/dockerd dockerd
|
||||
|
||||
newinitd contrib/init/openrc/docker.initd docker
|
||||
newconfd contrib/init/openrc/docker.confd docker
|
||||
|
||||
systemd_dounit contrib/init/systemd/docker.{service,socket}
|
||||
|
||||
udev_dorules contrib/udev/*.rules
|
||||
|
||||
dodoc AUTHORS CONTRIBUTING.md CHANGELOG.md NOTICE README.md
|
||||
dodoc -r docs/*
|
||||
|
||||
# note: intentionally not using "doins" so that we preserve +x bits
|
||||
dodir /usr/share/${PN}/contrib
|
||||
cp -R contrib/* "${ED}/usr/share/${PN}/contrib"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
udev_reload
|
||||
|
||||
elog
|
||||
elog "To use Docker, the Docker daemon must be running as root. To automatically"
|
||||
elog "start the Docker daemon at boot:"
|
||||
if systemd_is_booted || has_version sys-apps/systemd; then
|
||||
elog " systemctl enable docker.service"
|
||||
else
|
||||
elog " rc-update add docker default"
|
||||
fi
|
||||
elog
|
||||
elog "To use Docker as a non-root user, add yourself to the 'docker' group:"
|
||||
elog ' usermod -aG docker <youruser>'
|
||||
elog
|
||||
|
||||
if use device-mapper; then
|
||||
elog " Devicemapper storage driver has been deprecated"
|
||||
elog " It will be removed in a future release"
|
||||
elog
|
||||
fi
|
||||
|
||||
if use overlay; then
|
||||
elog " Overlay storage driver/USEflag has been deprecated"
|
||||
elog " in favor of overlay2 (enabled unconditionally)"
|
||||
elog
|
||||
fi
|
||||
|
||||
if has_version sys-fs/zfs; then
|
||||
elog " ZFS storage driver is available"
|
||||
elog " Check https://docs.docker.com/storage/storagedriver/zfs-driver for more info"
|
||||
elog
|
||||
fi
|
||||
|
||||
if use cli; then
|
||||
ewarn "Starting with docker 20.10.2, docker has been split into"
|
||||
ewarn "two packages upstream, so Gentoo has followed suit."
|
||||
ewarn
|
||||
ewarn "app-emulation/docker contains the daemon and"
|
||||
ewarn "app-emulation/docker-cli contains the docker command."
|
||||
ewarn
|
||||
ewarn "docker currently installs docker-cli using the cli use flag."
|
||||
ewarn
|
||||
ewarn "This use flag is temporary, so you need to take the"
|
||||
ewarn "following actions:"
|
||||
ewarn
|
||||
ewarn "First, disable the cli use flag for app-emulation/docker"
|
||||
ewarn
|
||||
ewarn "Then, if you need docker-cli and docker on the same machine,"
|
||||
ewarn "run the following command:"
|
||||
ewarn
|
||||
ewarn "# emerge --noreplace docker-cli"
|
||||
ewarn
|
||||
fi
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -1,2 +1 @@
|
||||
DIST tmate-2.3.1.tar.gz 611136 BLAKE2B bbcfb137cb9e712bbe3c36b2d57e6f1ea5a68c884e6e6ccd252315bca689b1bbec7a53cd131f0f36a6bab5b1defd3acb26bb458684894c81d676d2585db4790b SHA512 98531e3a3c1cc4da11894e8298df560fd58f1ede6a81ac8cb5f8cbea86f5c21672a016977dab801ec06e14f6c718a64599a9e32740934fcd4c0a155f92710520
|
||||
DIST tmate-2.4.0.tar.gz 614179 BLAKE2B 9864f71255ceafb10cfd622346ef7d2db2a124d13599a7c8ae81e83950ba56216193e02633a9becd90fd430c6ddff66df763fe2733d58f45b02c74c8fb8f7fc4 SHA512 92d2ca354b295678bfc2747ca83a45ebafeaec40ebac94bd94c4926af4f820b3f3a087f365147f41c80d1c8ad032f52c697a2421839c39315d84f98f7eccada6
|
||||
|
@ -1,39 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit autotools
|
||||
|
||||
DESCRIPTION="Instant terminal sharing"
|
||||
HOMEPAGE="https://tmate.io/"
|
||||
|
||||
LICENSE="ISC"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="debug static-libs"
|
||||
|
||||
SRC_URI="https://github.com/tmate-io/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
RDEPEND="
|
||||
sys-libs/zlib[static-libs?]
|
||||
sys-libs/libutempter[static-libs?]
|
||||
dev-libs/libevent[static-libs?]
|
||||
dev-libs/msgpack[static-libs?]
|
||||
>=net-libs/libssh-0.6.0[static-libs?]
|
||||
dev-libs/openssl:0=[static-libs?]
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myeconfargs=(
|
||||
$(use_enable debug)
|
||||
)
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
Binary file not shown.
@ -1,2 +1,3 @@
|
||||
DIST mdbtools-0.9.2.tar.gz 214246 BLAKE2B f62ffae2b084e53f7222ab969aa7f57f65735281383f93aeb025cff38b32b9aa22ffffb819532f816cc45a9156f7136bd9de953b17b86817380123451d51170c SHA512 cb2bddca83eb9867b765f6fc57fb289f91ce4e2e09dd953e338c26f6c4bcfe9ddb53368c4eef6d02927e582c2e10312462b82916c2e956fa269f25a765371d8d
|
||||
DIST mdbtools-0.9.3.tar.gz 214697 BLAKE2B 59aca58d11b9c513c8d5b8401423b04484657543d742e20e058e7b29e8225a2c2c3b6e5a95a61a2214a1323b1c5d80b08a71c9f9bcdbf2f35b079a7b05919841 SHA512 3ceb9e374fd638a01d087a1f5e8fb357b24f0a85a8f9c65743a78ec1d6a981fed299744610382ae525f3781e73e268de5c4bb2e48eff78e48b197e2add23587e
|
||||
DIST mdbtools-0.9.4.tar.gz 215253 BLAKE2B 7538fe36ce63b01a395b39272da3c212d6743bb789b38123d1f951f5678177ba541d64e7a58c08ff5f537d5cda4309c814521a33df5402ad3bc3bacd3d872425 SHA512 4ec5ae66b572970f5d450d94457a5e12a0b376dfbdb10ca8566be2f9d35a8837c0b7381ac6e8b935192b892e7d7c71fef089bb07f4ae789596c1dac07a062e1a
|
||||
|
@ -0,0 +1,59 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit autotools
|
||||
|
||||
DESCRIPTION="Set of libraries and utilities for reading Microsoft Access database (MDB) files"
|
||||
HOMEPAGE="https://github.com/mdbtools/mdbtools"
|
||||
SRC_URI="https://github.com/brianb/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2 LGPL-2.1"
|
||||
SLOT="0/3"
|
||||
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
IUSE="glib odbc"
|
||||
|
||||
BDEPEND="
|
||||
app-text/txt2man
|
||||
sys-devel/flex
|
||||
virtual/pkgconfig
|
||||
virtual/yacc
|
||||
"
|
||||
RDEPEND="
|
||||
sys-libs/ncurses:0=
|
||||
sys-libs/readline:0=
|
||||
virtual/libiconv
|
||||
glib? ( dev-libs/glib:2 )
|
||||
odbc? ( >=dev-db/unixODBC-2.0 )
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
DOCS=( AUTHORS HACKING NEWS README.md )
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# bug #770019
|
||||
sed -i -e 's/-Werror//' configure.ac || die
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# TODO: Make iconv optional
|
||||
|
||||
local myeconfargs=(
|
||||
--disable-static
|
||||
$(use_enable glib)
|
||||
$(use odbc && echo "--with-unixodbc=${EPREFIX}/usr")
|
||||
)
|
||||
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
find "${ED}" -name '*.la' -delete || die
|
||||
}
|
Binary file not shown.
@ -1,4 +1 @@
|
||||
DIST eix-0.34.12.tar.xz 629704 BLAKE2B 22c3a93b47c607467321445704c8b4fe0f8b131081609709ebe5e2bd09d0ac08194938641ab44304e51d9dc4d473615625a9ca0de649767b6552c60d38974b75 SHA512 458a01b8ccb5fe4c7fbf9eb8368dbb0c63ac587e0452de4c3a58fadfc62aa8b404e509d6f24d20956bd6f04c00bfdfc95d6bf59287c5ea9e07091bea67f8c4e2
|
||||
DIST eix-0.35.0.tar.xz 636432 BLAKE2B 8a880cde56c0010f193445d9813c533effd59b8ee570132a0c40d62de827968839d99ee16981d152e737b881519e9f73d4ddac5375b6339dd480064deefa6149 SHA512 b9a6e59e666ec6015a612e083839a11a77e1d649262a802a9c8684fe25abbeda7a2c51ea629f1bb85ddc77fccce42b577178284763668bb2d1bcc85df5d68f2e
|
||||
DIST eix-0.35.1.tar.xz 635996 BLAKE2B e8afb4d33d8e0525471e396e752859ab5fb165df8b1519cfa9ded1a3ff287059d9c647d744ec095eeec92d01f25330cced3ecefdb3d399ecf513d8aa5f14e9d3 SHA512 2812406f28994c133f9fe3dfe53bc0495f5bb446e2f0ac69f070632d0f357044c1c334e5ed2344a81dd8e3ba100fb427c161201e488ef2581717b55a712f3908
|
||||
DIST eix-0.35.2.tar.xz 636616 BLAKE2B 22c9ce54bd612ff7b8a085d91727ee7b472b9c3ba71568f23b4cfc5e2c4d9b0a68e2df377d4c4101c53e193864418c11b0c76830b5b6044588dcf3882b164e3d SHA512 39ff4c4f31be3c40a17a77626c25550a3881d8c405ebd9e7a361252cb729f9c0fc40831bc41e503fdea9f05684ad0eaa1aceabba1c6e4067a33a8581bf5a9625
|
||||
|
@ -1,103 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit autotools bash-completion-r1 flag-o-matic tmpfiles
|
||||
|
||||
DESCRIPTION="Search and query ebuilds"
|
||||
HOMEPAGE="https://github.com/vaeth/eix/"
|
||||
SRC_URI="https://github.com/vaeth/eix/releases/download/v${PV}/${P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
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 ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="debug doc nls sqlite"
|
||||
|
||||
DEPEND="
|
||||
nls? ( virtual/libintl )
|
||||
sqlite? ( >=dev-db/sqlite-3:= )"
|
||||
RDEPEND="${DEPEND}
|
||||
>=app-shells/push-2.0-r1
|
||||
>=app-shells/quoter-3.0_p2-r1"
|
||||
BDEPEND="
|
||||
app-arch/xz-utils
|
||||
nls? ( sys-devel/gettext )"
|
||||
|
||||
pkg_setup() {
|
||||
# remove stale cache file to prevent collisions
|
||||
local old_cache=${EROOT}/var/cache/${PN}
|
||||
if [[ -f ${old_cache} ]]; then
|
||||
rm "${old_cache}" || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
sed -i -e "s:/:${EPREFIX}/:" tmpfiles.d/eix.conf || die
|
||||
|
||||
sed -e "/eixf_source=/s:push.sh:cat \"${EPREFIX}/usr/share/push/push.sh\":" \
|
||||
-e "/eixf_source=/s:quoter_pipe.sh:cat \"${EPREFIX}/usr/share/quoter/quoter_pipe.sh\":" \
|
||||
-i src/eix-functions.sh.in || die
|
||||
sed -e "s:'\$(bindir)/eix-functions.sh':cat \\\\\"${EPREFIX}/usr/share/eix/eix-functions\\\\\":" \
|
||||
-i src/Makefile.am || die
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf=(
|
||||
$(use_enable debug paranoic-asserts)
|
||||
$(use_enable nls)
|
||||
$(use_with doc extra-doc)
|
||||
$(use_with sqlite)
|
||||
--without-protobuf
|
||||
|
||||
# default configuration
|
||||
$(use_with prefix always-accept-keywords)
|
||||
--with-dep-default
|
||||
--with-required-use-default
|
||||
|
||||
# paths
|
||||
--with-portage-rootpath="${ROOTPATH}"
|
||||
--with-eprefix-default="${EPREFIX}"
|
||||
|
||||
# build a single executable with symlinks
|
||||
--disable-separate-binaries
|
||||
--disable-separate-tools
|
||||
|
||||
# used purely to control/disrespect *FLAGS
|
||||
--disable-debugging
|
||||
--disable-new_dialect
|
||||
--disable-optimization
|
||||
--disable-strong-optimization
|
||||
--disable-security
|
||||
--disable-nopie-security
|
||||
--disable-strong-security
|
||||
)
|
||||
|
||||
econf "${myconf[@]}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
dobashcomp bash/eix
|
||||
dotmpfiles tmpfiles.d/eix.conf
|
||||
|
||||
rm -r "${ED}"/usr/bin/eix-functions.sh || die
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
tmpfiles_process eix.conf
|
||||
|
||||
local obs=${EROOT}/var/cache/eix.previous
|
||||
if [[ -f ${obs} ]]; then
|
||||
ewarn "Found obsolete ${obs}, please remove it"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
if [[ ! -n ${REPLACED_BY_VERSION} ]]; then
|
||||
rm -rf "${EROOT}/var/cache/${PN}" || die
|
||||
fi
|
||||
}
|
@ -1,103 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit autotools bash-completion-r1 flag-o-matic tmpfiles
|
||||
|
||||
DESCRIPTION="Search and query ebuilds"
|
||||
HOMEPAGE="https://github.com/vaeth/eix/"
|
||||
SRC_URI="https://github.com/vaeth/eix/releases/download/v${PV}/${P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
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 ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="debug doc nls sqlite"
|
||||
|
||||
DEPEND="
|
||||
nls? ( virtual/libintl )
|
||||
sqlite? ( >=dev-db/sqlite-3:= )"
|
||||
RDEPEND="${DEPEND}
|
||||
>=app-shells/push-2.0-r1
|
||||
>=app-shells/quoter-3.0_p2-r1"
|
||||
BDEPEND="
|
||||
app-arch/xz-utils
|
||||
nls? ( sys-devel/gettext )"
|
||||
|
||||
pkg_setup() {
|
||||
# remove stale cache file to prevent collisions
|
||||
local old_cache=${EROOT}/var/cache/${PN}
|
||||
if [[ -f ${old_cache} ]]; then
|
||||
rm "${old_cache}" || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
sed -i -e "s:/:${EPREFIX}/:" tmpfiles.d/eix.conf || die
|
||||
|
||||
sed -e "/eixf_source=/s:push.sh:cat \"${EPREFIX}/usr/share/push/push.sh\":" \
|
||||
-e "/eixf_source=/s:quoter_pipe.sh:cat \"${EPREFIX}/usr/share/quoter/quoter_pipe.sh\":" \
|
||||
-i src/eix-functions.sh.in || die
|
||||
sed -e "s:'\$(bindir)/eix-functions.sh':cat \\\\\"${EPREFIX}/usr/share/eix/eix-functions\\\\\":" \
|
||||
-i src/Makefile.am || die
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf=(
|
||||
$(use_enable debug paranoic-asserts)
|
||||
$(use_enable nls)
|
||||
$(use_with doc extra-doc)
|
||||
$(use_with sqlite)
|
||||
--without-protobuf
|
||||
|
||||
# default configuration
|
||||
$(use_with prefix always-accept-keywords)
|
||||
--with-dep-default
|
||||
--with-required-use-default
|
||||
|
||||
# paths
|
||||
--with-portage-rootpath="${ROOTPATH}"
|
||||
--with-eprefix-default="${EPREFIX}"
|
||||
|
||||
# build a single executable with symlinks
|
||||
--disable-separate-binaries
|
||||
--disable-separate-tools
|
||||
|
||||
# used purely to control/disrespect *FLAGS
|
||||
--disable-debugging
|
||||
--disable-new_dialect
|
||||
--disable-optimization
|
||||
--disable-strong-optimization
|
||||
--disable-security
|
||||
--disable-nopie-security
|
||||
--disable-strong-security
|
||||
)
|
||||
|
||||
econf "${myconf[@]}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
dobashcomp bash/eix
|
||||
dotmpfiles tmpfiles.d/eix.conf
|
||||
|
||||
rm -r "${ED}"/usr/bin/eix-functions.sh || die
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
tmpfiles_process eix.conf
|
||||
|
||||
local obs=${EROOT}/var/cache/eix.previous
|
||||
if [[ -f ${obs} ]]; then
|
||||
ewarn "Found obsolete ${obs}, please remove it"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
if [[ ! -n ${REPLACED_BY_VERSION} ]]; then
|
||||
rm -rf "${EROOT}/var/cache/${PN}" || die
|
||||
fi
|
||||
}
|
@ -1,103 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit autotools bash-completion-r1 flag-o-matic tmpfiles
|
||||
|
||||
DESCRIPTION="Search and query ebuilds"
|
||||
HOMEPAGE="https://github.com/vaeth/eix/"
|
||||
SRC_URI="https://github.com/vaeth/eix/releases/download/v${PV}/${P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
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 ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="debug doc nls sqlite"
|
||||
|
||||
DEPEND="
|
||||
nls? ( virtual/libintl )
|
||||
sqlite? ( >=dev-db/sqlite-3:= )"
|
||||
RDEPEND="${DEPEND}
|
||||
>=app-shells/push-2.0-r1
|
||||
>=app-shells/quoter-3.0_p2-r1"
|
||||
BDEPEND="
|
||||
app-arch/xz-utils
|
||||
nls? ( sys-devel/gettext )"
|
||||
|
||||
pkg_setup() {
|
||||
# remove stale cache file to prevent collisions
|
||||
local old_cache=${EROOT}/var/cache/${PN}
|
||||
if [[ -f ${old_cache} ]]; then
|
||||
rm "${old_cache}" || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
sed -i -e "s:/:${EPREFIX}/:" tmpfiles.d/eix.conf || die
|
||||
|
||||
sed -e "/eixf_source=/s:push.sh:cat \"${EPREFIX}/usr/share/push/push.sh\":" \
|
||||
-e "/eixf_source=/s:quoter_pipe.sh:cat \"${EPREFIX}/usr/share/quoter/quoter_pipe.sh\":" \
|
||||
-i src/eix-functions.sh.in || die
|
||||
sed -e "s:'\$(bindir)/eix-functions.sh':cat \\\\\"${EPREFIX}/usr/share/eix/eix-functions\\\\\":" \
|
||||
-i src/Makefile.am || die
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf=(
|
||||
$(use_enable debug paranoic-asserts)
|
||||
$(use_enable nls)
|
||||
$(use_with doc extra-doc)
|
||||
$(use_with sqlite)
|
||||
--without-protobuf
|
||||
|
||||
# default configuration
|
||||
$(use_with prefix always-accept-keywords)
|
||||
--with-dep-default
|
||||
--with-required-use-default
|
||||
|
||||
# paths
|
||||
--with-portage-rootpath="${ROOTPATH}"
|
||||
--with-eprefix-default="${EPREFIX}"
|
||||
|
||||
# build a single executable with symlinks
|
||||
--disable-separate-binaries
|
||||
--disable-separate-tools
|
||||
|
||||
# used purely to control/disrespect *FLAGS
|
||||
--disable-debugging
|
||||
--disable-new_dialect
|
||||
--disable-optimization
|
||||
--disable-strong-optimization
|
||||
--disable-security
|
||||
--disable-nopie-security
|
||||
--disable-strong-security
|
||||
)
|
||||
|
||||
econf "${myconf[@]}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
dobashcomp bash/eix
|
||||
dotmpfiles tmpfiles.d/eix.conf
|
||||
|
||||
rm -r "${ED}"/usr/bin/eix-functions.sh || die
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
tmpfiles_process eix.conf
|
||||
|
||||
local obs=${EROOT}/var/cache/eix.previous
|
||||
if [[ -f ${obs} ]]; then
|
||||
ewarn "Found obsolete ${obs}, please remove it"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
if [[ ! -n ${REPLACED_BY_VERSION} ]]; then
|
||||
rm -rf "${EROOT}/var/cache/${PN}" || die
|
||||
fi
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,17 @@
|
||||
https://bugs.gentoo.org/786444
|
||||
|
||||
g_once_init_enter(void*) should NOT be passed a volatile argument:
|
||||
https://developer.gnome.org/glib/stable/glib-Threads.html#g-once-init-enter
|
||||
"While location has a volatile qualifier, this is a historical
|
||||
artifact and the pointer passed to it should not be volatile."
|
||||
--- gstreamermm-1.10.0/gstreamer/gstreamermm/register.h.orig 2017-10-20 12:26:46.000000000 +0300
|
||||
+++ gstreamermm-1.10.0/gstreamer/gstreamermm/register.h 2021-05-25 17:52:13.031337753 +0300
|
||||
@@ -110,7 +110,7 @@
|
||||
/* The typedef for GType may be gulong or gsize, depending on the
|
||||
* system and whether the compiler is c++ or not. The g_once_init_*
|
||||
* functions always take a gsize * though ... */
|
||||
- static volatile gsize gonce_data = 0;
|
||||
+ static gsize gonce_data = 0;
|
||||
if (g_once_init_enter (&gonce_data)) {
|
||||
GTypeInfo info;
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,187 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit bash-completion-r1 prefix rust-toolchain toolchain-funcs verify-sig multilib-minimal
|
||||
|
||||
MY_P="rust-${PV}"
|
||||
|
||||
DESCRIPTION="Systems programming language from Mozilla"
|
||||
HOMEPAGE="https://www.rust-lang.org/"
|
||||
SRC_URI="$(rust_all_arch_uris ${MY_P})"
|
||||
|
||||
LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
|
||||
SLOT="stable"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
|
||||
IUSE="clippy cpu_flags_x86_sse2 doc prefix rls rustfmt"
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=">=app-eselect/eselect-rust-20190311"
|
||||
BDEPEND="
|
||||
prefix? ( dev-util/patchelf )
|
||||
verify-sig? ( app-crypt/openpgp-keys-rust )
|
||||
"
|
||||
|
||||
REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )"
|
||||
|
||||
QA_PREBUILT="
|
||||
opt/${P}/bin/.*
|
||||
opt/${P}/lib/.*.so
|
||||
opt/${P}/libexec/.*
|
||||
opt/${P}/lib/rustlib/.*/bin/.*
|
||||
opt/${P}/lib/rustlib/.*/lib/.*
|
||||
"
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
|
||||
|
||||
pkg_pretend() {
|
||||
if [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv7* ]]; then
|
||||
die "${CHOST} is not supported by upstream Rust. You must use a hard float version."
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
verify-sig_src_unpack
|
||||
mv "${WORKDIR}/${MY_P}-$(rust_abi)" "${S}" || die
|
||||
}
|
||||
|
||||
patchelf_for_bin() {
|
||||
local filetype=$(file -b ${1})
|
||||
if [[ ${filetype} == *ELF*interpreter* ]]; then
|
||||
einfo "${1}'s interpreter changed"
|
||||
patchelf ${1} --set-interpreter ${2} || die
|
||||
elif [[ ${filetype} == *script* ]]; then
|
||||
hprefixify ${1}
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
if multilib_is_native_abi; then
|
||||
|
||||
# start native abi install
|
||||
pushd "${S}" >/dev/null || die
|
||||
local analysis std
|
||||
analysis="$(grep 'analysis' ./components)"
|
||||
std="$(grep 'std' ./components)"
|
||||
local components="rustc,cargo,${std}"
|
||||
use doc && components="${components},rust-docs"
|
||||
use clippy && components="${components},clippy-preview"
|
||||
use rls && components="${components},rls-preview,${analysis}"
|
||||
use rustfmt && components="${components},rustfmt-preview"
|
||||
./install.sh \
|
||||
--components="${components}" \
|
||||
--disable-verify \
|
||||
--prefix="${ED}/opt/${P}" \
|
||||
--mandir="${ED}/opt/${P}/man" \
|
||||
--disable-ldconfig \
|
||||
|| die
|
||||
|
||||
if use prefix; then
|
||||
local interpreter=$(patchelf --print-interpreter ${EPREFIX}/bin/bash)
|
||||
ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/${P}/bin"
|
||||
find "${ED}/opt/${P}/bin" -type f -print0 | \
|
||||
while IFS= read -r -d '' filename; do
|
||||
patchelf_for_bin ${filename} ${interpreter} \; || die
|
||||
done
|
||||
eend $?
|
||||
fi
|
||||
|
||||
local symlinks=(
|
||||
cargo
|
||||
rustc
|
||||
rustdoc
|
||||
rust-gdb
|
||||
rust-gdbgui
|
||||
rust-lldb
|
||||
)
|
||||
|
||||
use clippy && symlinks+=( clippy-driver cargo-clippy )
|
||||
use rls && symlinks+=( rls )
|
||||
use rustfmt && symlinks+=( rustfmt cargo-fmt )
|
||||
|
||||
einfo "installing eselect-rust symlinks and paths"
|
||||
local i
|
||||
for i in "${symlinks[@]}"; do
|
||||
# we need realpath on /usr/bin/* symlink return version-appended binary path.
|
||||
# so /usr/bin/rustc should point to /opt/rust-bin-<ver>/bin/rustc-<ver>
|
||||
local ver_i="${i}-bin-${PV}"
|
||||
ln -v "${ED}/opt/${P}/bin/${i}" "${ED}/opt/${P}/bin/${ver_i}"
|
||||
dosym "../../opt/${P}/bin/${ver_i}" "/usr/bin/${ver_i}"
|
||||
done
|
||||
|
||||
# symlinks to switch components to active rust in eselect
|
||||
dosym "../../../opt/${P}/lib" "/usr/lib/rust/lib-bin-${PV}"
|
||||
dosym "../../../opt/${P}/man" "/usr/lib/rust/man-bin-${PV}"
|
||||
dosym "../../opt/${P}/lib/rustlib" "/usr/lib/rustlib-bin-${PV}"
|
||||
dosym "../../../opt/${P}/share/doc/rust" "/usr/share/doc/${P}"
|
||||
|
||||
# musl logic can be improved a bit, but fine as is for now
|
||||
cat <<-_EOF_ > "${T}/50${P}"
|
||||
LDPATH="${EPREFIX}/usr/lib/rust/lib"
|
||||
MANPATH="${EPREFIX}/usr/lib/rust/man"
|
||||
$(use amd64 && usex elibc_musl 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
|
||||
$(use arm64 && usex elibc_musl 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
|
||||
_EOF_
|
||||
doenvd "${T}/50${P}"
|
||||
|
||||
# note: eselect-rust adds EROOT to all paths below
|
||||
cat <<-_EOF_ > "${T}/provider-${P}"
|
||||
/usr/bin/cargo
|
||||
/usr/bin/rustdoc
|
||||
/usr/bin/rust-gdb
|
||||
/usr/bin/rust-gdbgui
|
||||
/usr/bin/rust-lldb
|
||||
/usr/lib/rustlib
|
||||
/usr/lib/rust/lib
|
||||
/usr/lib/rust/man
|
||||
/usr/share/doc/rust
|
||||
_EOF_
|
||||
|
||||
if use clippy; then
|
||||
echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
|
||||
fi
|
||||
if use rls; then
|
||||
echo /usr/bin/rls >> "${T}/provider-${P}"
|
||||
fi
|
||||
if use rustfmt; then
|
||||
echo /usr/bin/rustfmt >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
|
||||
fi
|
||||
|
||||
insinto /etc/env.d/rust
|
||||
doins "${T}/provider-${P}"
|
||||
popd >/dev/null || die
|
||||
#end native abi install
|
||||
|
||||
else
|
||||
local rust_target
|
||||
rust_target="$(rust_abi $(get_abi_CHOST ${v##*.}))"
|
||||
dodir "/opt/${P}/lib/rustlib"
|
||||
cp -vr "${WORKDIR}/rust-${PV}-${rust_target}/rust-std-${rust_target}/lib/rustlib/${rust_target}"\
|
||||
"${ED}/opt/${P}/lib/rustlib" || die
|
||||
fi
|
||||
|
||||
# BUG: installs x86_64 binary on other arches
|
||||
rm -f "${ED}/opt/${P}/lib/rustlib/"*/bin/rust-llvm-dwp || die
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
eselect rust update
|
||||
|
||||
elog "Rust installs a helper script for calling GDB now,"
|
||||
elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV}."
|
||||
|
||||
if has_version app-editors/emacs; then
|
||||
elog "install app-emacs/rust-mode to get emacs support for rust."
|
||||
fi
|
||||
|
||||
if has_version app-editors/gvim || has_version app-editors/vim; then
|
||||
elog "install app-vim/rust-vim to get vim support for rust."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect rust cleanup
|
||||
}
|
@ -0,0 +1,678 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{7..9} )
|
||||
|
||||
inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
|
||||
multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
|
||||
|
||||
if [[ ${PV} = *beta* ]]; then
|
||||
betaver=${PV//*beta}
|
||||
BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
|
||||
MY_P="rustc-beta"
|
||||
SLOT="beta/${PV}"
|
||||
SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
|
||||
else
|
||||
ABI_VER="$(ver_cut 1-2)"
|
||||
SLOT="stable/${ABI_VER}"
|
||||
MY_P="rustc-${PV}"
|
||||
SRC="${MY_P}-src.tar.xz"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
|
||||
fi
|
||||
|
||||
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
|
||||
|
||||
DESCRIPTION="Systems programming language from Mozilla"
|
||||
HOMEPAGE="https://www.rust-lang.org/"
|
||||
|
||||
SRC_URI="
|
||||
https://static.rust-lang.org/dist/${SRC}
|
||||
verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
|
||||
!system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
|
||||
"
|
||||
|
||||
# keep in sync with llvm ebuild of the same version as bundled one.
|
||||
ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
|
||||
NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
|
||||
ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
|
||||
LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
|
||||
|
||||
LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
|
||||
|
||||
IUSE="clippy cpu_flags_x86_sse2 debug doc miri nightly parallel-compiler rls rustfmt system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
|
||||
|
||||
# Please keep the LLVM dependency block separate. Since LLVM is slotted,
|
||||
# we need to *really* make sure we're not pulling more than one slot
|
||||
# simultaneously.
|
||||
|
||||
# How to use it:
|
||||
# List all the working slots in LLVM_VALID_SLOTS, newest first.
|
||||
LLVM_VALID_SLOTS=( 12 )
|
||||
LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
|
||||
|
||||
# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
|
||||
# (-) usedep needed because we may build with older llvm without that target
|
||||
LLVM_DEPEND="|| ( "
|
||||
for _s in ${LLVM_VALID_SLOTS[@]}; do
|
||||
LLVM_DEPEND+=" ( "
|
||||
for _x in ${ALL_LLVM_TARGETS[@]}; do
|
||||
LLVM_DEPEND+="
|
||||
${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )"
|
||||
done
|
||||
LLVM_DEPEND+=" )"
|
||||
done
|
||||
unset _s _x
|
||||
LLVM_DEPEND+=" )
|
||||
<sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
|
||||
wasm? ( sys-devel/lld )
|
||||
"
|
||||
|
||||
# to bootstrap we need at least exactly previous version, or same.
|
||||
# most of the time previous versions fail to bootstrap with newer
|
||||
# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
|
||||
# but it fails to bootstrap with 1.48.x
|
||||
# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.txt
|
||||
RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*"
|
||||
RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*"
|
||||
BOOTSTRAP_DEPEND="||
|
||||
(
|
||||
=dev-lang/rust-"${RUST_DEP_PREV}"
|
||||
=dev-lang/rust-bin-"${RUST_DEP_PREV}"
|
||||
=dev-lang/rust-"${RUST_DEP_CURR}"
|
||||
=dev-lang/rust-bin-"${RUST_DEP_CURR}"
|
||||
)
|
||||
"
|
||||
|
||||
BDEPEND="${PYTHON_DEPS}
|
||||
app-eselect/eselect-rust
|
||||
|| (
|
||||
>=sys-devel/gcc-4.7
|
||||
>=sys-devel/clang-3.5
|
||||
)
|
||||
system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
|
||||
!system-llvm? (
|
||||
>=dev-util/cmake-3.13.4
|
||||
dev-util/ninja
|
||||
)
|
||||
test? ( sys-devel/gdb )
|
||||
verify-sig? ( app-crypt/openpgp-keys-rust )
|
||||
"
|
||||
|
||||
DEPEND="
|
||||
>=app-arch/xz-utils-5.2
|
||||
net-misc/curl:=[http2,ssl]
|
||||
sys-libs/zlib:=
|
||||
dev-libs/openssl:0=
|
||||
elibc_musl? ( sys-libs/libunwind:= )
|
||||
system-llvm? ( ${LLVM_DEPEND} )
|
||||
"
|
||||
|
||||
# we need to block older versions due to layout changes.
|
||||
RDEPEND="${DEPEND}
|
||||
app-eselect/eselect-rust
|
||||
!<dev-lang/rust-1.47.0-r1
|
||||
!<dev-lang/rust-bin-1.47.0-r1
|
||||
"
|
||||
|
||||
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
|
||||
miri? ( nightly )
|
||||
parallel-compiler? ( nightly )
|
||||
test? ( ${ALL_LLVM_TARGETS[*]} )
|
||||
wasm? ( llvm_targets_WebAssembly )
|
||||
x86? ( cpu_flags_x86_sse2 )
|
||||
"
|
||||
|
||||
# we don't use cmake.eclass, but can get a warnings
|
||||
CMAKE_WARN_UNUSED_CLI=no
|
||||
|
||||
QA_FLAGS_IGNORED="
|
||||
usr/lib/${PN}/${PV}/bin/.*
|
||||
usr/lib/${PN}/${PV}/libexec/.*
|
||||
usr/lib/${PN}/${PV}/lib/lib.*.so
|
||||
usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
|
||||
usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
|
||||
"
|
||||
|
||||
QA_SONAME="
|
||||
usr/lib/${PN}/${PV}/lib/lib.*.so.*
|
||||
usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
|
||||
"
|
||||
|
||||
# causes double bootstrap
|
||||
RESTRICT="test"
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/1.47.0-ignore-broken-and-non-applicable-tests.patch
|
||||
"${FILESDIR}"/1.49.0-gentoo-musl-target-specs.patch
|
||||
"${FILESDIR}"/1.53.0-rustversion-1.0.5.patch # https://github.com/rust-lang/rust/pull/86425
|
||||
)
|
||||
|
||||
S="${WORKDIR}/${MY_P}-src"
|
||||
|
||||
toml_usex() {
|
||||
usex "${1}" true false
|
||||
}
|
||||
|
||||
bootstrap_rust_version_check() {
|
||||
# never call from pkg_pretend. eselect-rust may be not installed yet.
|
||||
[[ ${MERGE_TYPE} == binary ]] && return
|
||||
local rustc_wanted="$(ver_cut 1).$(($(ver_cut 2) - 1))"
|
||||
local rustc_toonew="$(ver_cut 1).$(($(ver_cut 2) + 1))"
|
||||
local rustc_version=( $(eselect --brief rust show 2>/dev/null) )
|
||||
rustc_version=${rustc_version[0]#rust-bin-}
|
||||
rustc_version=${rustc_version#rust-}
|
||||
|
||||
[[ -z "${rustc_version}" ]] && die "Failed to determine rust version, check 'eselect rust' output"
|
||||
|
||||
if ver_test "${rustc_version}" -lt "${rustc_wanted}" ; then
|
||||
eerror "Rust >=${rustc_wanted} is required"
|
||||
eerror "please run 'eselect rust' and set correct rust version"
|
||||
die "selected rust version is too old"
|
||||
elif ver_test "${rustc_version}" -ge "${rustc_toonew}" ; then
|
||||
eerror "Rust <${rustc_toonew} is required"
|
||||
eerror "please run 'eselect rust' and set correct rust version"
|
||||
die "selected rust version is too new"
|
||||
else
|
||||
einfo "Using rust ${rustc_version} to build"
|
||||
fi
|
||||
}
|
||||
|
||||
pre_build_checks() {
|
||||
local M=4096
|
||||
# multiply requirements by 1.5 if we are doing x86-multilib
|
||||
if use amd64; then
|
||||
M=$(( $(usex abi_x86_32 15 10) * ${M} / 10 ))
|
||||
fi
|
||||
M=$(( $(usex clippy 128 0) + ${M} ))
|
||||
M=$(( $(usex miri 128 0) + ${M} ))
|
||||
M=$(( $(usex rls 512 0) + ${M} ))
|
||||
M=$(( $(usex rustfmt 256 0) + ${M} ))
|
||||
# add 2G if we compile llvm and 256M per llvm_target
|
||||
if ! use system-llvm; then
|
||||
M=$(( 2048 + ${M} ))
|
||||
local ltarget
|
||||
for ltarget in ${ALL_LLVM_TARGETS[@]}; do
|
||||
M=$(( $(usex ${ltarget} 256 0) + ${M} ))
|
||||
done
|
||||
fi
|
||||
M=$(( $(usex wasm 256 0) + ${M} ))
|
||||
M=$(( $(usex debug 2 1) * ${M} ))
|
||||
eshopts_push -s extglob
|
||||
if is-flagq '-g?(gdb)?([1-9])'; then
|
||||
M=$(( 15 * ${M} / 10 ))
|
||||
fi
|
||||
eshopts_pop
|
||||
M=$(( $(usex system-bootstrap 0 1024) + ${M} ))
|
||||
M=$(( $(usex doc 256 0) + ${M} ))
|
||||
CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
|
||||
}
|
||||
|
||||
llvm_check_deps() {
|
||||
has_version -r "sys-devel/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]"
|
||||
}
|
||||
|
||||
pkg_pretend() {
|
||||
pre_build_checks
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
pre_build_checks
|
||||
python-any-r1_pkg_setup
|
||||
|
||||
export LIBGIT2_NO_PKG_CONFIG=1 #749381
|
||||
|
||||
use system-bootstrap && bootstrap_rust_version_check
|
||||
|
||||
if use system-llvm; then
|
||||
llvm_pkg_setup
|
||||
|
||||
local llvm_config="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
|
||||
export LLVM_LINK_SHARED=1
|
||||
export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if ! use system-bootstrap; then
|
||||
local rust_stage0_root="${WORKDIR}"/rust-stage0
|
||||
local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
|
||||
|
||||
"${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
|
||||
--without=rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local rust_target="" rust_targets="" arch_cflags
|
||||
|
||||
# Collect rust target names to compile standard libs for all ABIs.
|
||||
for v in $(multilib_get_enabled_abi_pairs); do
|
||||
rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
|
||||
done
|
||||
if use wasm; then
|
||||
rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
|
||||
if use system-llvm; then
|
||||
# un-hardcode rust-lld linker for this target
|
||||
# https://bugs.gentoo.org/715348
|
||||
sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm_base.rs || die
|
||||
fi
|
||||
fi
|
||||
rust_targets="${rust_targets#,}"
|
||||
|
||||
local tools="\"cargo\","
|
||||
if use clippy; then
|
||||
tools="\"clippy\",$tools"
|
||||
fi
|
||||
if use miri; then
|
||||
tools="\"miri\",$tools"
|
||||
fi
|
||||
if use rls; then
|
||||
tools="\"rls\",\"analysis\",\"src\",$tools"
|
||||
fi
|
||||
if use rustfmt; then
|
||||
tools="\"rustfmt\",$tools"
|
||||
fi
|
||||
|
||||
local rust_stage0_root
|
||||
if use system-bootstrap; then
|
||||
local printsysroot
|
||||
printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
|
||||
rust_stage0_root="${printsysroot}"
|
||||
else
|
||||
rust_stage0_root="${WORKDIR}"/rust-stage0
|
||||
fi
|
||||
# in case of prefix it will be already prefixed, as --print sysroot returns full path
|
||||
[[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
|
||||
|
||||
rust_target="$(rust_abi)"
|
||||
|
||||
cat <<- _EOF_ > "${S}"/config.toml
|
||||
changelog-seen = 2
|
||||
[llvm]
|
||||
download-ci-llvm = false
|
||||
optimize = $(toml_usex !debug)
|
||||
release-debuginfo = $(toml_usex debug)
|
||||
assertions = $(toml_usex debug)
|
||||
ninja = true
|
||||
targets = "${LLVM_TARGETS// /;}"
|
||||
experimental-targets = ""
|
||||
link-shared = $(toml_usex system-llvm)
|
||||
[build]
|
||||
build-stage = 2
|
||||
test-stage = 2
|
||||
doc-stage = 2
|
||||
build = "${rust_target}"
|
||||
host = ["${rust_target}"]
|
||||
target = [${rust_targets}]
|
||||
cargo = "${rust_stage0_root}/bin/cargo"
|
||||
rustc = "${rust_stage0_root}/bin/rustc"
|
||||
rustfmt = "${rust_stage0_root}/bin/rustfmt"
|
||||
docs = $(toml_usex doc)
|
||||
compiler-docs = false
|
||||
submodules = false
|
||||
python = "${EPYTHON}"
|
||||
locked-deps = true
|
||||
vendor = true
|
||||
extended = true
|
||||
tools = [${tools}]
|
||||
verbose = 2
|
||||
sanitizers = false
|
||||
profiler = false
|
||||
cargo-native-static = false
|
||||
[install]
|
||||
prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
|
||||
sysconfdir = "etc"
|
||||
docdir = "share/doc/rust"
|
||||
bindir = "bin"
|
||||
libdir = "lib"
|
||||
mandir = "share/man"
|
||||
[rust]
|
||||
# https://github.com/rust-lang/rust/issues/54872
|
||||
codegen-units-std = 1
|
||||
optimize = true
|
||||
debug = $(toml_usex debug)
|
||||
debug-assertions = $(toml_usex debug)
|
||||
debug-assertions-std = $(toml_usex debug)
|
||||
debuginfo-level = $(usex debug 2 0)
|
||||
debuginfo-level-rustc = $(usex debug 2 0)
|
||||
debuginfo-level-std = $(usex debug 2 0)
|
||||
debuginfo-level-tools = $(usex debug 2 0)
|
||||
debuginfo-level-tests = 0
|
||||
backtrace = true
|
||||
incremental = false
|
||||
default-linker = "$(tc-getCC)"
|
||||
parallel-compiler = $(toml_usex parallel-compiler)
|
||||
channel = "$(usex nightly nightly stable)"
|
||||
description = "gentoo"
|
||||
rpath = false
|
||||
verbose-tests = true
|
||||
optimize-tests = $(toml_usex !debug)
|
||||
codegen-tests = true
|
||||
dist-src = false
|
||||
remap-debuginfo = true
|
||||
lld = $(usex system-llvm false $(toml_usex wasm))
|
||||
# only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
|
||||
# https://github.com/rust-lang/rust/issues/74976
|
||||
# https://github.com/rust-lang/rust/issues/76526
|
||||
deny-warnings = $(usex wasm $(usex doc false true) true)
|
||||
backtrace-on-ice = true
|
||||
jemalloc = false
|
||||
[dist]
|
||||
src-tarball = false
|
||||
compression-formats = ["gz"]
|
||||
_EOF_
|
||||
|
||||
for v in $(multilib_get_enabled_abi_pairs); do
|
||||
rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
|
||||
arch_cflags="$(get_abi_CFLAGS ${v##*.})"
|
||||
|
||||
cat <<- _EOF_ >> "${S}"/config.env
|
||||
CFLAGS_${rust_target}=${arch_cflags}
|
||||
_EOF_
|
||||
|
||||
cat <<- _EOF_ >> "${S}"/config.toml
|
||||
[target.${rust_target}]
|
||||
cc = "$(tc-getBUILD_CC)"
|
||||
cxx = "$(tc-getBUILD_CXX)"
|
||||
linker = "$(tc-getCC)"
|
||||
ar = "$(tc-getAR)"
|
||||
_EOF_
|
||||
# librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
|
||||
if use elibc_musl; then
|
||||
cat <<- _EOF_ >> "${S}"/config.toml
|
||||
crt-static = false
|
||||
_EOF_
|
||||
fi
|
||||
if use system-llvm; then
|
||||
cat <<- _EOF_ >> "${S}"/config.toml
|
||||
llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
|
||||
_EOF_
|
||||
fi
|
||||
done
|
||||
if use wasm; then
|
||||
cat <<- _EOF_ >> "${S}"/config.toml
|
||||
[target.wasm32-unknown-unknown]
|
||||
linker = "$(usex system-llvm lld rust-lld)"
|
||||
_EOF_
|
||||
fi
|
||||
|
||||
if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
|
||||
# experimental cross support
|
||||
# discussion: https://bugs.gentoo.org/679878
|
||||
# TODO: c*flags, clang, system-llvm, cargo.eclass target support
|
||||
# it would be much better if we could split out stdlib
|
||||
# complilation to separate ebuild and abuse CATEGORY to
|
||||
# just install to /usr/lib/rustlib/<target>
|
||||
|
||||
# extra targets defined as a bash array
|
||||
# spec format: <LLVM target>:<rust-target>:<CTARGET>
|
||||
# best place would be /etc/portage/env/dev-lang/rust
|
||||
# Example:
|
||||
# RUST_CROSS_TARGETS=(
|
||||
# "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
|
||||
# )
|
||||
# no extra hand holding is done, no target transformations, all
|
||||
# values are passed as-is with just basic checks, so it's up to user to supply correct values
|
||||
# valid rust targets can be obtained with
|
||||
# rustc --print target-list
|
||||
# matching cross toolchain has to be installed
|
||||
# matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
|
||||
# only gcc toolchains installed with crossdev are checked for now.
|
||||
|
||||
# BUG: we can't pass host flags to cross compiler, so just filter for now
|
||||
# BUG: this should be more fine-grained.
|
||||
filter-flags '-mcpu=*' '-march=*' '-mtune=*'
|
||||
|
||||
local cross_target_spec
|
||||
for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
|
||||
# extracts first element form <LLVM target>:<rust-target>:<CTARGET>
|
||||
local cross_llvm_target="${cross_target_spec%%:*}"
|
||||
# extracts toolchain triples, <rust-target>:<CTARGET>
|
||||
local cross_triples="${cross_target_spec#*:}"
|
||||
# extracts first element after before : separator
|
||||
local cross_rust_target="${cross_triples%%:*}"
|
||||
# extracts last element after : separator
|
||||
local cross_toolchain="${cross_triples##*:}"
|
||||
use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
|
||||
command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
|
||||
|
||||
cat <<- _EOF_ >> "${S}"/config.toml
|
||||
[target.${cross_rust_target}]
|
||||
cc = "${cross_toolchain}-gcc"
|
||||
cxx = "${cross_toolchain}-g++"
|
||||
linker = "${cross_toolchain}-gcc"
|
||||
ar = "${cross_toolchain}-ar"
|
||||
_EOF_
|
||||
if use system-llvm; then
|
||||
cat <<- _EOF_ >> "${S}"/config.toml
|
||||
llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
|
||||
_EOF_
|
||||
fi
|
||||
if [[ "${cross_toolchain}" == *-musl* ]]; then
|
||||
cat <<- _EOF_ >> "${S}"/config.toml
|
||||
musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
|
||||
_EOF_
|
||||
fi
|
||||
|
||||
# append cross target to "normal" target list
|
||||
# example 'target = ["powerpc64le-unknown-linux-gnu"]'
|
||||
# becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
|
||||
|
||||
rust_targets="${rust_targets},\"${cross_rust_target}\""
|
||||
sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
|
||||
|
||||
ewarn
|
||||
ewarn "Enabled ${cross_rust_target} rust target"
|
||||
ewarn "Using ${cross_toolchain} cross toolchain"
|
||||
ewarn
|
||||
if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
|
||||
ewarn "'sys-devel/binutils[multitarget]' is not installed"
|
||||
ewarn "'strip' will be unable to strip cross libraries"
|
||||
ewarn "cross targets will be installed with full debug information"
|
||||
ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
|
||||
ewarn
|
||||
ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
|
||||
ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
|
||||
ewarn
|
||||
fi
|
||||
done
|
||||
fi # I_KNOW_WHAT_I_AM_DOING_CROSS
|
||||
|
||||
einfo "Rust configured with the following flags:"
|
||||
echo
|
||||
echo RUSTFLAGS="${RUSTFLAGS:-}"
|
||||
echo RUSTFLAGS_BOOTSTRAP="${RUSTFLAGS_BOOTSTRAP:-}"
|
||||
echo RUSTFLAGS_NOT_BOOTSTRAP="${RUSTFLAGS_NOT_BOOTSTRAP:-}"
|
||||
env | grep "CARGO_TARGET_.*_RUSTFLAGS="
|
||||
cat "${S}"/config.env || die
|
||||
echo
|
||||
einfo "config.toml contents:"
|
||||
cat "${S}"/config.toml || die
|
||||
echo
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# we need \n IFS to have config.env with spaces loaded properly. #734018
|
||||
(
|
||||
IFS=$'\n'
|
||||
env $(cat "${S}"/config.env) RUST_BACKTRACE=1\
|
||||
"${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
|
||||
)
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# https://rustc-dev-guide.rust-lang.org/tests/intro.html
|
||||
|
||||
# those are basic and codegen tests.
|
||||
local tests=(
|
||||
codegen
|
||||
codegen-units
|
||||
compile-fail
|
||||
incremental
|
||||
mir-opt
|
||||
pretty
|
||||
run-make
|
||||
)
|
||||
|
||||
# fails if llvm is not built with ALL targets.
|
||||
# and known to fail with system llvm sometimes.
|
||||
use system-llvm || tests+=( assembly )
|
||||
|
||||
# fragile/expensive/less important tests
|
||||
# or tests that require extra builds
|
||||
# TODO: instead of skipping, just make some nonfatal.
|
||||
if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
|
||||
tests+=(
|
||||
rustdoc
|
||||
rustdoc-js
|
||||
rustdoc-js-std
|
||||
rustdoc-ui
|
||||
run-make-fulldeps
|
||||
ui
|
||||
ui-fulldeps
|
||||
)
|
||||
fi
|
||||
|
||||
local i failed=()
|
||||
einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
|
||||
for i in "${tests[@]}"; do
|
||||
local t="src/test/${i}"
|
||||
einfo "rust_src_test: running ${t}"
|
||||
if ! (
|
||||
IFS=$'\n'
|
||||
env $(cat "${S}"/config.env) RUST_BACKTRACE=1 \
|
||||
"${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
|
||||
-j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
|
||||
)
|
||||
then
|
||||
failed+=( "${t}" )
|
||||
eerror "rust_src_test: ${t} failed"
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ ${#failed[@]} -ne 0 ]]; then
|
||||
eerror "rust_src_test: failure summary: ${failed[@]}"
|
||||
die "aborting due to test failures"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
(
|
||||
IFS=$'\n'
|
||||
env $(cat "${S}"/config.env) DESTDIR="${D}" \
|
||||
"${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
|
||||
)
|
||||
|
||||
# bug #689562, #689160
|
||||
rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
|
||||
rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
|
||||
newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
|
||||
|
||||
local symlinks=(
|
||||
cargo
|
||||
rustc
|
||||
rustdoc
|
||||
rust-gdb
|
||||
rust-gdbgui
|
||||
rust-lldb
|
||||
)
|
||||
|
||||
use clippy && symlinks+=( clippy-driver cargo-clippy )
|
||||
use miri && symlinks+=( miri cargo-miri )
|
||||
use rls && symlinks+=( rls )
|
||||
use rustfmt && symlinks+=( rustfmt cargo-fmt )
|
||||
|
||||
einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
|
||||
local i
|
||||
for i in "${symlinks[@]}"; do
|
||||
# we need realpath on /usr/bin/* symlink return version-appended binary path.
|
||||
# so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
|
||||
# need to fix eselect-rust to remove this hack.
|
||||
local ver_i="${i}-${PV}"
|
||||
if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
|
||||
einfo "Installing ${i} symlink"
|
||||
ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
|
||||
else
|
||||
ewarn "${i} symlink requested, but source file not found"
|
||||
ewarn "please report this"
|
||||
fi
|
||||
dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
|
||||
done
|
||||
|
||||
# symlinks to switch components to active rust in eselect
|
||||
dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
|
||||
dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
|
||||
dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
|
||||
dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
|
||||
dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
|
||||
|
||||
newenvd - "50${P}" <<-_EOF_
|
||||
LDPATH="${EPREFIX}/usr/lib/rust/lib"
|
||||
MANPATH="${EPREFIX}/usr/lib/rust/man"
|
||||
$(use amd64 && usex elibc_musl 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
|
||||
$(use arm64 && usex elibc_musl 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
|
||||
_EOF_
|
||||
|
||||
rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
|
||||
rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die
|
||||
|
||||
# note: eselect-rust adds EROOT to all paths below
|
||||
cat <<-_EOF_ > "${T}/provider-${P}"
|
||||
/usr/bin/cargo
|
||||
/usr/bin/rustdoc
|
||||
/usr/bin/rust-gdb
|
||||
/usr/bin/rust-gdbgui
|
||||
/usr/bin/rust-lldb
|
||||
/usr/lib/rustlib
|
||||
/usr/lib/rust/lib
|
||||
/usr/lib/rust/libexec
|
||||
/usr/lib/rust/man
|
||||
/usr/share/doc/rust
|
||||
_EOF_
|
||||
|
||||
if use clippy; then
|
||||
echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
|
||||
fi
|
||||
if use miri; then
|
||||
echo /usr/bin/miri >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
|
||||
fi
|
||||
if use rls; then
|
||||
echo /usr/bin/rls >> "${T}/provider-${P}"
|
||||
fi
|
||||
if use rustfmt; then
|
||||
echo /usr/bin/rustfmt >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
|
||||
fi
|
||||
|
||||
insinto /etc/env.d/rust
|
||||
doins "${T}/provider-${P}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
eselect rust update
|
||||
|
||||
if has_version sys-devel/gdb || has_version dev-util/lldb; then
|
||||
elog "Rust installs a helper script for calling GDB and LLDB,"
|
||||
elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
|
||||
fi
|
||||
|
||||
if has_version app-editors/emacs; then
|
||||
elog "install app-emacs/rust-mode to get emacs support for rust."
|
||||
fi
|
||||
|
||||
if has_version app-editors/gvim || has_version app-editors/vim; then
|
||||
elog "install app-vim/rust-vim to get vim support for rust."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect rust cleanup
|
||||
}
|
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue