parent
adfbdfcd30
commit
47ece55953
Binary file not shown.
Binary file not shown.
@ -1,5 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<!-- maintainer-needed -->
|
||||
<maintainer type="person">
|
||||
<email>dlan@gentoo.org</email>
|
||||
<name>Yixun Lan</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
||||
|
Binary file not shown.
@ -1,5 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<!-- maintainer-needed -->
|
||||
<maintainer type="person">
|
||||
<email>dlan@gentoo.org</email>
|
||||
<name>Yixun Lan</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1,2 +1,2 @@
|
||||
DIST ansible-lint-24.2.0.tar.gz 513719 BLAKE2B 54e05acf982cf13cb2142a10bf04250171f07936df14933525dfae68b312a0d92ceb30867603dc7ce686206b7de010f6ca4eb9ab532ca000fc3c15c77c354c81 SHA512 3276d28c7b85a6087a0142cc56442efddf9ff3e81155455c74686015a2ab45ece64847b0243373ad01145e67599d8449866c122efe8ae404cd819011e41c5235
|
||||
DIST ansible-lint-24.2.1.tar.gz 515269 BLAKE2B b6467058665bb46813e910a0245e688dd6cb1b9010b2297c23dc1ea28861b9a20310b54ee761346a1136b6d166f96df79bb6d21019b3054033044181403b0c2b SHA512 de8b8ff3409b95cdadf1beaa4eb5fcd15a06142589b4ce53e0c6b12a9e84613337ef6173bfbeabd3d874ddccb114337e766371c7d3ba8bec831563a8fc232311
|
||||
DIST ansible-lint-24.2.2.tar.gz 515822 BLAKE2B e9d8e689dfe4e4efbd4dad44ff3567f50412400ed979f2d60150f09f17c5f63f2441f25a33ecdf0112024ced07e62ac16b8a2dbc1c01d62855ec785fc75d1b9a SHA512 3de6b14e4b64ba577abcb67920a45dbf45fedb84e21091cd6a29e3c52a7a91555a152ee3e265624aafbf9dddba96d04241c2598a18f2103ce2cae48706142446
|
||||
|
@ -0,0 +1,90 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
|
||||
inherit bash-completion-r1 distutils-r1
|
||||
|
||||
MY_P=aws-cli-${PV}
|
||||
DESCRIPTION="Universal Command Line Environment for AWS"
|
||||
HOMEPAGE="
|
||||
https://github.com/aws/aws-cli/
|
||||
https://pypi.org/project/awscli/
|
||||
"
|
||||
SRC_URI="
|
||||
https://github.com/aws/aws-cli/archive/${PV}.tar.gz
|
||||
-> ${MY_P}.gh.tar.gz
|
||||
"
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
||||
|
||||
# botocore is x.(y+2).z
|
||||
BOTOCORE_PV="$(ver_cut 1).$(( $(ver_cut 2) + 2)).$(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.10.0[${PYTHON_USEDEP}]
|
||||
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||
!app-admin/awscli-bin
|
||||
"
|
||||
BDEPEND="
|
||||
test? (
|
||||
dev-python/packaging[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-forked[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
EPYTEST_XDIST=1
|
||||
distutils_enable_tests pytest
|
||||
|
||||
src_prepare() {
|
||||
# do not rely on bundled deps in botocore (sic!)
|
||||
find -name '*.py' -exec sed -i \
|
||||
-e 's:from botocore[.]vendored import:import:' \
|
||||
-e 's:from botocore[.]vendored[.]:from :' \
|
||||
{} + || die
|
||||
# strip overzealous upper bounds on requirements
|
||||
sed -i -e 's:,<[0-9.]*::' -e 's:==:>=:' setup.py || die
|
||||
distutils-r1_src_prepare
|
||||
}
|
||||
|
||||
python_test() {
|
||||
local serial_tests=(
|
||||
tests/functional/ecs/test_execute_command.py::TestExecuteCommand::test_execute_command_success
|
||||
tests/functional/ssm/test_start_session.py::TestSessionManager::test_start_session_{fails,success}
|
||||
tests/functional/ssm/test_start_session.py::TestSessionManager::test_start_session_with_new_version_plugin_success
|
||||
tests/unit/customizations/codeartifact/test_adapter_login.py::TestDotNetLogin::test_login_dotnet_sources_listed_with_backtracking
|
||||
tests/unit/customizations/codeartifact/test_adapter_login.py::TestDotNetLogin::test_login_dotnet_sources_listed_with_backtracking_windows
|
||||
tests/unit/customizations/codeartifact/test_adapter_login.py::TestNuGetLogin::test_login_nuget_sources_listed_with_backtracking
|
||||
tests/unit/customizations/ecs/test_executecommand_startsession.py::TestExecuteCommand::test_execute_command_success
|
||||
tests/unit/customizations/test_sessionmanager.py
|
||||
tests/unit/test_compat.py::TestIgnoreUserSignals
|
||||
tests/unit/test_help.py
|
||||
tests/unit/test_utils.py::TestIgnoreCtrlC::test_ctrl_c_is_ignored
|
||||
)
|
||||
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
EPYTEST_XDIST= epytest "${serial_tests[@]}"
|
||||
|
||||
local EPYTEST_DESELECT=( "${serial_tests[@]}" )
|
||||
# integration tests require AWS credentials and Internet access
|
||||
epytest tests/{functional,unit}
|
||||
}
|
||||
|
||||
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,2 @@
|
||||
DIST hcloud-1.42.0.tar.xz 1876444 BLAKE2B e7ed2e01a7c6bb106a5c46e21e26d8b6bdd7636b64c7b354674364c3db8c1776f09f199ea022e2f311e873490b737490ea22045aa00147c6066ff0a7fb96d563 SHA512 dab916666ec17b9675ba0a559170859779289c36739ac4c3d72445c87fb440df475e55e52ed628fd8d1a52421c6df4d47b0b51713e476753a66da74b3a7bf11c
|
||||
DIST hcloud-1.43.0.tar.xz 1887388 BLAKE2B 2c2c931e51ab8a801b0548f2599b7162e46171412633e03af597d6750d210af3c19fb88da91d2890bf11fa642a0844646d51eb8b3d02d8f1f74db37a0cd56500 SHA512 4ee2d53de6c03676355f8f30edf97e3a0f2d4902f18dd9fb2498d23eb09428188809a2eb081c3c84c9ba595039de15bb7589ba6c8c1387cea3a76110a45332b1
|
||||
|
@ -0,0 +1,31 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit go-module
|
||||
|
||||
DESCRIPTION="A command-line interface for Hetzner Cloud"
|
||||
HOMEPAGE="https://github.com/hetznercloud/cli"
|
||||
SRC_URI="https://dev.gentoo.org/~ago/distfiles/${P}.tar.xz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
src_compile() {
|
||||
ego build -o ${PN} -ldflags "-w -X github.com/hetznercloud/cli/internal/version.Version=${PV}-gentoo" ./cmd/${PN}
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# For upstream a simple test is run 'hcloud version'
|
||||
./hcloud version
|
||||
if [[ $? -ne 0 ]]
|
||||
then
|
||||
die "Test failed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin ${PN}
|
||||
}
|
@ -1,8 +1,4 @@
|
||||
DIST terraform-1.3.9-deps.tar.xz 246904620 BLAKE2B 26577614ff95fa03dcf0362050f0e2a10eaa500f71d992b2927f6c44475341e899f62141e203ce9231bf329dc03825076d3f615c693a6c33c11190d4420b042f SHA512 9587b6022d320a104f3ad67dda9f1b931e258f78e7f6b6f87a8302732206b55d7d4af555b09517994ea1f53f069d8e1b5e2ca05c129efbbe4d7c3b75cbd27c69
|
||||
DIST terraform-1.3.9.tar.gz 4964672 BLAKE2B bfe823a2c1bc8d6188d339c8b5d452be4873adf1063aa0a880457d7e5b4e042d2d8c2ba93eb20eb46bad209c184bfe628b5093d6bdd6163e1bc57934c6770ad2 SHA512 3e951142120b5d71830b5bde34ef3e8907b1585f461f51f83e16170a46e1fc21934d4d1935f1a49963add3d894f68a5cf267ef91293347d0dd9a4b90978ea751
|
||||
DIST terraform-1.6.5-deps.tar.xz 334283548 BLAKE2B 6222db5b66d9a49a7dba4806a1f5a07e0c7a871077bf960f556bcb55661957e41f4688babdd0f826a1a5b837520f98387de218fb8c90b7a902dda0f05566536d SHA512 dbbc303282ac918441a4018ceed6c6c448137f126a9125c322514a3336f27d6c312060c39d0d60a132caad2540be5bc274d7b30206b1df72af3e795bb140aab8
|
||||
DIST terraform-1.6.5.tar.gz 5635461 BLAKE2B afa99bf8e9787a4498e9868ceb91921e6be7bdd5d7ef60378a9173e9765f689fb4c6e8888ce5405c00a6fe855e22dc91fc46e911be8bbc1f0665d9f11bed1ebf SHA512 588b00bc86905021d5efb41ba62306c2a41c9cd2225fb1aeb956a7845be15d6aa3c7d0365e3b779ea7da415a562094ba091e6a4644add72ba3abe169f3a7d36a
|
||||
DIST terraform-1.7.0-deps.tar.xz 334327044 BLAKE2B 0f83b190af69766fde3c1906fd291f5d70fc9a2ee30ca4e61e5938b51dfca3a6cb942612fa97a4ea124b0fb4fdd6e4820cf314dd653419c7154e2d9e5e21be0d SHA512 80ecbdf3fe43e5eee25f774be47b01532d5f144d8564dc18443a501683fc2a10482682e983add24f1754bf02469035e7d5b0fd29378d3c851998e81c69eb45be
|
||||
DIST terraform-1.7.0.tar.gz 6132499 BLAKE2B 15c7e47a193643aa57d4b11e92ad7f479cd7397efb389bf63413ee11e755233f0d2fd5434d151f180892e018f708f0110678818bb5d8900b25ed62684b8ef21d SHA512 02b121ed9db658ef7623bf4d2725a593b735153ab0dab6964416cdd109273b4d749bc74a4f1edf64258227dab3a8eb4ddb5fe3868b7964acc93bcd126c5fe1c5
|
||||
DIST terraform-1.7.2-deps.tar.xz 334339964 BLAKE2B 1f1e8b41dd164bb92271d8a29a8ec31a9aa34272c3ce8530518b0a2fdc1706a97581f6096b8bc564aa1291e6c53c1a5833a32af841fcc410b0c9880412a5edee SHA512 f8979165039a1c928a5de4759b96155b1c76ffa9ff5dd21081007f0b695f52b035d6cc8925cddfa20da3e252120642b2e58db3b76c47b4ccc845022440ac550b
|
||||
DIST terraform-1.7.2.tar.gz 6135908 BLAKE2B 252fbc41171a00c5077d7f07af25d912507215d1dd51be2c73b79a185a60c2eb486e5dd6ffd55bce06e1d2996b908930b5dc3cd73069fe78f7ac2e75cf144c26 SHA512 e9843cfa4a1f830fac10908257d05d08a6490edd9caeb8b83b45a6d1d282f98b6db0d07a4b2bc12439a76c0eb6a0bd0ab343a30cd92de6670c1ad9473d51c6d1
|
||||
DIST terraform-1.7.5-deps.tar.xz 107757204 BLAKE2B 07f788ed4d97724190e2201e5e66318ee2906a4dbf680a7359c329f388f8e9a82dd45dcda874cceb1d51df4af0c6ce0d6de517522bdf24e753db19db32b34dda SHA512 988be8a5b2adad5300d67f1b6861f2fc15285910af5982e4215aebb443414e0445acd3f9de5d6bb569453f2478f146b93a0d79ecc6979173ba22d1f5902f7a97
|
||||
DIST terraform-1.7.5.tar.gz 6137112 BLAKE2B 8cf8c1ebd2ee79ba0332ebe8b5614700dfe3bcf2f74a52a72cf971da35a1b5c32d3ed611f9e3ff5360215529ef94804b5acee2041a7d4240749c4f866251af36 SHA512 344942400cee43e2ba0c6de933f618b7dc5a7997567e613bf420d7da1f6314f7f9a42ffc32b27974d86f8a7f867f67727f1472ea120510df16d73061b11166fe
|
||||
|
@ -1,40 +0,0 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
inherit go-module
|
||||
|
||||
DESCRIPTION="A tool for building, changing, and combining infrastructure safely"
|
||||
HOMEPAGE="https://www.terraform.io/"
|
||||
SRC_URI="https://github.com/hashicorp/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz"
|
||||
|
||||
LICENSE="Apache-2.0 BSD BSD-2 MPL-2.0 MIT ISC"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~arm64 ~riscv"
|
||||
|
||||
BDEPEND="dev-go/gox"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
DOCS=( {README,CHANGELOG}.md )
|
||||
|
||||
src_compile() {
|
||||
export CGO_ENABLED=0
|
||||
gox \
|
||||
-os=$(go env GOOS) \
|
||||
-arch=$(go env GOARCH) \
|
||||
-output bin/terraform \
|
||||
-verbose \
|
||||
. || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin bin/*
|
||||
einstalldocs
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "If you would like to install shell completions please run:"
|
||||
elog " terraform -install-autocomplete"
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
inherit go-module
|
||||
|
||||
DESCRIPTION="A tool for building, changing, and combining infrastructure safely"
|
||||
HOMEPAGE="https://www.terraform.io/"
|
||||
SRC_URI="https://github.com/hashicorp/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz"
|
||||
|
||||
LICENSE="BUSL-1.1"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64 ~riscv"
|
||||
|
||||
BDEPEND="dev-go/gox"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
DOCS=( {README,CHANGELOG}.md )
|
||||
|
||||
src_compile() {
|
||||
export CGO_ENABLED=0
|
||||
gox \
|
||||
-os=$(go env GOOS) \
|
||||
-arch=$(go env GOARCH) \
|
||||
-output bin/terraform \
|
||||
-verbose \
|
||||
. || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin bin/*
|
||||
einstalldocs
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "If you would like to install shell completions please run:"
|
||||
elog " terraform -install-autocomplete"
|
||||
}
|
Binary file not shown.
@ -1,3 +1,3 @@
|
||||
DIST engrampa-1.26.1.tar.xz 1792452 BLAKE2B ff87f21848919654a2392c02e6050ac0b4c80308361ec7c829a2acf3fb25b088e164a3722be0312b2c814022bf0e06c80ae0796add182e6ac8e5d696409c5afe SHA512 6e3e59503d3d55df3eddc63f5f8f67c80a84b2b602801f9bcbaf4e38b6e991fffaa879e1cd44c1173b5c11096587122438bda51401c2694654c99b87a52b9f5e
|
||||
DIST engrampa-1.26.2.tar.xz 1790984 BLAKE2B a3812240947f3bdc39845852a69d90c660f9ca3b03b167a5fbe1373024827b1abac93f3dc854316ae0368717cf7aef2512b84f47b93453a3a49a64c99ae3865a SHA512 4e9a55d9bc834616d8a8f5b7b0882fd4581ad2efdade33367ede85800ebb1e70241d20c9c37fadbef468d16088419fcf85daec0718c68bdbefe2301f8b0b40a3
|
||||
DIST engrampa-1.27.1.tar.xz 1729112 BLAKE2B 4857a59daca10dec80781522abcedaf8513264d1aa32579c0a0d9332e198d74ae1e7a28577668afab97014ae7f6223f1e24ec993355fc875ff9f6eb8c7f6b7ac SHA512 aa9e16ced496a64112067b5e98b68268ad5de9b5533e38d4e7db160f28bd490d0990bc654d9cfeaddafce3700e296238bd938ee1c2bdd8d2bb231666f0bfa390
|
||||
DIST engrampa-1.28.1.tar.xz 1720164 BLAKE2B a2776cbf7040bcb7baf992caa323afaabffe316ad94a222613cc8bc8c59490f389005ecdec66de519c88f2ad89167739b3934c2bed6c212846b20f6b4b60a6ae SHA512 912bec0e1b2bf8f79e89bda4cb72e28a96d4d1b2ab32fca14b3d28bf75be93cdd4a9e43315fe6ad2c8cac5af95686915cfa3d0a3182973a8b6e42817cfdd936f
|
||||
|
Binary file not shown.
@ -1,3 +1,2 @@
|
||||
DIST certbot-2.10.0.gh.tar.gz 2322931 BLAKE2B cb84815ec2db2b4b365f2f2bdee1749263b540a1b67f9195280bdb122307337d294beb403bc05b236a94ed0782b0d093e2b8527a65cb69cac949fa627388e8bd SHA512 444981952140376808a9aa475a692df91e60fffc6d45902a3f809bc07311a7d6597ad56e712d3dae234450eb1c735db431182e784bc748511e68bf4f5f2d6cbd
|
||||
DIST certbot-2.8.0.gh.tar.gz 1344483 BLAKE2B f9957367ae65f69ab43a83993b29da4d28c0d01bd7a89ebefcbfb82915c26167b7443d08f6ee4d28e029f5a58736dee01700a30261aaa1dc0290273868da08e9 SHA512 2fbaf5349e7ef0dcb054c3b22d63007c588cbdc0d23d484a56e62ad38d21c91b838887e6e94cf9c0045a4382567c342288a796c81307deba84a246f5cc3bc5d6
|
||||
DIST certbot-2.9.0.gh.tar.gz 1346993 BLAKE2B cf7fb4676dc31442abe11ef50d18073480a46f4ab19cc328da599b1372509af683b4c6010b46f31bce5703949e88b4702d404bd8582a1361caad43ec8f02cb94 SHA512 27c15ce8e4450f432fbc271cd847d27c7f1bce552cc6e5f2a91f1fbfc09ebe331b54bab17639b86c19605de059767015665c26e872c3b0699edb1c85392a0546
|
||||
|
@ -1,60 +0,0 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{9..11} )
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
PARENT_PN="certbot"
|
||||
PARENT_P="${PARENT_PN}-${PV}"
|
||||
|
||||
if [[ "${PV}" == *9999 ]]; then
|
||||
inherit git-r3
|
||||
|
||||
EGIT_REPO_URI="https://github.com/certbot/certbot.git"
|
||||
EGIT_SUBMODULES=()
|
||||
EGIT_CHECKOUT_DIR="${WORKDIR}/${PARENT_P}"
|
||||
else
|
||||
SRC_URI="
|
||||
https://github.com/certbot/certbot/archive/v${PV}.tar.gz
|
||||
-> ${PARENT_P}.gh.tar.gz
|
||||
"
|
||||
KEYWORDS="amd64 arm arm64 ~ppc64 ~riscv x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="An implementation of the ACME protocol"
|
||||
HOMEPAGE="
|
||||
https://github.com/certbot/certbot
|
||||
https://letsencrypt.org/
|
||||
"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
|
||||
S="${WORKDIR}/${PARENT_P}/${PN}"
|
||||
|
||||
BDEPEND="
|
||||
test? (
|
||||
dev-python/pytest[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-xdist[${PYTHON_USEDEP}]
|
||||
dev-python/typing-extensions[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
# The requirement is really 17.5.0 but easier to require latest stable >= 23.1.1
|
||||
# to avoid broken 23.1.0.
|
||||
RDEPEND="
|
||||
dev-python/chardet[${PYTHON_USEDEP}]
|
||||
>=dev-python/cryptography-3.2.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/josepy-1.13.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyopenssl-23.1.1[${PYTHON_USEDEP}]
|
||||
dev-python/pyrfc3339[${PYTHON_USEDEP}]
|
||||
>=dev-python/pytz-2019.3[${PYTHON_USEDEP}]
|
||||
>=dev-python/requests-2.20.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/requests-toolbelt-0.3.0[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
distutils_enable_sphinx docs dev-python/sphinx-rtd-theme
|
||||
distutils_enable_tests pytest
|
@ -1,3 +1,2 @@
|
||||
DIST certbot-2.10.0.gh.tar.gz 2322931 BLAKE2B cb84815ec2db2b4b365f2f2bdee1749263b540a1b67f9195280bdb122307337d294beb403bc05b236a94ed0782b0d093e2b8527a65cb69cac949fa627388e8bd SHA512 444981952140376808a9aa475a692df91e60fffc6d45902a3f809bc07311a7d6597ad56e712d3dae234450eb1c735db431182e784bc748511e68bf4f5f2d6cbd
|
||||
DIST certbot-2.8.0.gh.tar.gz 1344483 BLAKE2B f9957367ae65f69ab43a83993b29da4d28c0d01bd7a89ebefcbfb82915c26167b7443d08f6ee4d28e029f5a58736dee01700a30261aaa1dc0290273868da08e9 SHA512 2fbaf5349e7ef0dcb054c3b22d63007c588cbdc0d23d484a56e62ad38d21c91b838887e6e94cf9c0045a4382567c342288a796c81307deba84a246f5cc3bc5d6
|
||||
DIST certbot-2.9.0.gh.tar.gz 1346993 BLAKE2B cf7fb4676dc31442abe11ef50d18073480a46f4ab19cc328da599b1372509af683b4c6010b46f31bce5703949e88b4702d404bd8582a1361caad43ec8f02cb94 SHA512 27c15ce8e4450f432fbc271cd847d27c7f1bce552cc6e5f2a91f1fbfc09ebe331b54bab17639b86c19605de059767015665c26e872c3b0699edb1c85392a0546
|
||||
|
@ -1,3 +1,2 @@
|
||||
DIST certbot-2.10.0.gh.tar.gz 2322931 BLAKE2B cb84815ec2db2b4b365f2f2bdee1749263b540a1b67f9195280bdb122307337d294beb403bc05b236a94ed0782b0d093e2b8527a65cb69cac949fa627388e8bd SHA512 444981952140376808a9aa475a692df91e60fffc6d45902a3f809bc07311a7d6597ad56e712d3dae234450eb1c735db431182e784bc748511e68bf4f5f2d6cbd
|
||||
DIST certbot-2.8.0.gh.tar.gz 1344483 BLAKE2B f9957367ae65f69ab43a83993b29da4d28c0d01bd7a89ebefcbfb82915c26167b7443d08f6ee4d28e029f5a58736dee01700a30261aaa1dc0290273868da08e9 SHA512 2fbaf5349e7ef0dcb054c3b22d63007c588cbdc0d23d484a56e62ad38d21c91b838887e6e94cf9c0045a4382567c342288a796c81307deba84a246f5cc3bc5d6
|
||||
DIST certbot-2.9.0.gh.tar.gz 1346993 BLAKE2B cf7fb4676dc31442abe11ef50d18073480a46f4ab19cc328da599b1372509af683b4c6010b46f31bce5703949e88b4702d404bd8582a1361caad43ec8f02cb94 SHA512 27c15ce8e4450f432fbc271cd847d27c7f1bce552cc6e5f2a91f1fbfc09ebe331b54bab17639b86c19605de059767015665c26e872c3b0699edb1c85392a0546
|
||||
|
@ -1,3 +1,2 @@
|
||||
DIST certbot-2.10.0.gh.tar.gz 2322931 BLAKE2B cb84815ec2db2b4b365f2f2bdee1749263b540a1b67f9195280bdb122307337d294beb403bc05b236a94ed0782b0d093e2b8527a65cb69cac949fa627388e8bd SHA512 444981952140376808a9aa475a692df91e60fffc6d45902a3f809bc07311a7d6597ad56e712d3dae234450eb1c735db431182e784bc748511e68bf4f5f2d6cbd
|
||||
DIST certbot-2.8.0.gh.tar.gz 1344483 BLAKE2B f9957367ae65f69ab43a83993b29da4d28c0d01bd7a89ebefcbfb82915c26167b7443d08f6ee4d28e029f5a58736dee01700a30261aaa1dc0290273868da08e9 SHA512 2fbaf5349e7ef0dcb054c3b22d63007c588cbdc0d23d484a56e62ad38d21c91b838887e6e94cf9c0045a4382567c342288a796c81307deba84a246f5cc3bc5d6
|
||||
DIST certbot-2.9.0.gh.tar.gz 1346993 BLAKE2B cf7fb4676dc31442abe11ef50d18073480a46f4ab19cc328da599b1372509af683b4c6010b46f31bce5703949e88b4702d404bd8582a1361caad43ec8f02cb94 SHA512 27c15ce8e4450f432fbc271cd847d27c7f1bce552cc6e5f2a91f1fbfc09ebe331b54bab17639b86c19605de059767015665c26e872c3b0699edb1c85392a0546
|
||||
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,23 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
DESCRIPTION="HTML documentation for Python"
|
||||
HOMEPAGE="https://www.python.org/doc/"
|
||||
SRC_URI="https://www.python.org/ftp/python/doc/${PV}/python-${PV}-docs-html.tar.bz2"
|
||||
S="${WORKDIR}/python-${PV}-docs-html"
|
||||
|
||||
LICENSE="PSF-2"
|
||||
SLOT="$(ver_cut 1-2)"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
|
||||
|
||||
src_install() {
|
||||
rm -r _sources || die
|
||||
docinto html
|
||||
dodoc -r .
|
||||
|
||||
newenvd - 60python-docs-${SLOT} <<-EOF
|
||||
PYTHONDOCS_${SLOT//./_}="${EPREFIX}/usr/share/doc/${PF}/html/library"
|
||||
EOF
|
||||
}
|
Binary file not shown.
@ -1,2 +1,2 @@
|
||||
DIST pluma-1.26.1.tar.xz 3824664 BLAKE2B e5ee5c2efeec90fb6733fac1077c870c79a386b3ab28d71a17929f144ecf9ae73ab66dc1a806504d7cb244bdd3c9ad63b7cccb5fb8f1f44b7b44a1076948a0e7 SHA512 bc4f621736d93df07fc2dc434a25c5a5acaf0d2c958eac43bd0061d4b664cae9b9eac1fffc47afa1509fd64b3c93a77ca62737428b034ca25997ebee432d5eb3
|
||||
DIST pluma-1.27.0.tar.xz 3820196 BLAKE2B 877b1856154e79aade7b709b5da0584cb426f07d69305d98af6f9954b8934f99241b750c0322ca7418db69c6fac1b4a1b6d8ffc3e75b441ffa5760ec0cd1d1d3 SHA512 ce2ab6fb4f7cfa93b8b1c22a80b4a688f63f9ec61fd173c22684a9cb49a83551cc9e5ed45a04cec23683d85be059615d90abd7d6b7e4b3bf1b3d6287d4292f78
|
||||
DIST pluma-1.28.0.tar.xz 3866800 BLAKE2B 10813717b7d18a0836059a10deb67a61b00a73cf3d5b18f12a9e760b8b65053b3a82dc0ac9af898d9f2bb4d6998db536bcaef143024ae91f9035fe6e1ee72fea SHA512 8f21aabed46a70dfe8446ddf6db5cc4326782328d0b8dd3689c8b906cc8d4b746712c6b9decfa48ef028bdbb8a0b1c6a2ec43def23488ae55cfd59aafd5a691a
|
||||
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
||||
DIST qtrvsim-0.9.7.tar.gz 1421805 BLAKE2B 9128dbe513860eafd01e0f37a99547797d385b57a404e06aea310404012e66e6be802920cdea62acb914d355fc842cd3759fc794d2cd417257b941f9ec62fbec SHA512 0d53e21681630cbf97db472472bd96dfe4914e0d275a1094cb18a7f0372cef23b0dea3c33092b6ab6d2403737070ef0b6f2b1f5d9d35eea8923b24a80ac6adfe
|
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>flow@gentoo.org</email>
|
||||
<name>Florian Schmaus</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">cvut/qtrvsim</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
@ -0,0 +1,25 @@
|
||||
# Copyright 2023-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake
|
||||
|
||||
DESCRIPTION="RISC-V CPU simulator for education"
|
||||
HOMEPAGE="https://github.com/cvut/qtrvsim"
|
||||
SRC_URI="https://github.com/cvut/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-3+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
DEPEND="
|
||||
dev-qt/qtbase:6[gui,widgets]
|
||||
virtual/libelf:=
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
CMAKE_SKIP_TESTS=(
|
||||
# Fails in 0.9.7, but not in master.
|
||||
cli_stalls
|
||||
)
|
@ -1,4 +1,4 @@
|
||||
DIST xen-4.17.3.tar.gz 46505735 BLAKE2B f7a783d951d3e31391aca2b779b9d11440dc28b0756739f7733cd7d2f160de54a018c00dce5d2a6c55a6494c2151a31a64bbeddefbed34eff179463f2e762d93 SHA512 56ead90af00b4c1aa452b5edba980a2873e4c76e8c518220a88089a2771cd76fe2478e15a41abf5d247e4bc5af8415d53614dff7eb028ced80701c1a1263f91f
|
||||
DIST xen-4.17.4.tar.gz 46527369 BLAKE2B 2fcd1248d75157b6455727b29ecc3a4e5941eb187d645b35b6cf48a23fdfae11e810c55a1a7c0396c6a23dc977f22b8fd06ee9b91a1edc3a7ba8561023e07cfc SHA512 50dc2efd26e48131afdbc8efb1ca90154a84fe5fba5a6bc81d9801a3c13aebea91c8211872b5c69ce2773644f2c935c31cc56584a05b10b81e8728282d89eb84
|
||||
DIST xen-gentoo-patches-4.17.0-gentoo-patchset-2.tar.bz2 4001 BLAKE2B 7afce426759952e202a1dd819fe0a23108072bf9552ba14a0bd787a96ffe5e7a36f37e03dad8db9c46f5731acbc122c258eef6d517816aad9c8db1ca64700d19 SHA512 bcb1479f9ff5e194a4e452da9d0479febc2bcd465b4be69bb8f30e2e6b858fb77a71216dcb3e74dfb65e7ca6513742c294cd6b5eaa5ce82d0b122a00f1cbc450
|
||||
DIST xen-upstream-patches-4.17.4-pre-patchset-0.tar.bz2 17570 BLAKE2B 5ae7ceb1feef758166dc6d569da30cfa8867b3755d41a4d2834ad73630ee3beea5696b79a175a7c2680db59e50b802ef2a9ee5a3cedff74f3d9cbfac064b25f1 SHA512 6001c4889ae5bdb592f8d7801762e43db13223e6552e916978b8ce85eb78c3fcd885c24d58f3db688244ccf50646c8d41a2e20c47d3b85fefb29d1c0ed37dd99
|
||||
DIST xen-upstream-patches-4.17.4-pre-patchset-1.tar.bz2 77410 BLAKE2B 1c00d613f9d12d81a284455d9099c031ba3ea7066508c75ad6f7e13330a09e2eb4e74bf5bc54fed9c4f90e18856cc01ff0e4ab4721d36388519eb40f99be42d8 SHA512 7a56cb0ac9b59043ffbc891819cbe54c9efe411e2e67eebc212a3b519ca60a37a377dd21b0ba851d6828cf268781983b082c6fecee0f0156501b5c447050789a
|
||||
|
Binary file not shown.
@ -1,91 +0,0 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit rpm
|
||||
|
||||
BASE_PV=$(ver_cut 1-3)
|
||||
MY_PV="${PV/_alpha/.alpha}"
|
||||
MY_PV="${MY_PV/_beta/.beta}"
|
||||
[[ ${PV} == *alpha* || ${PV} == *beta* ]] && PN_DEV="Dev"
|
||||
|
||||
DESCRIPTION="Translations for the Libreoffice suite"
|
||||
HOMEPAGE="https://www.libreoffice.org"
|
||||
BASE_SRC_URI_TESTING="https://download.documentfoundation.org/${PN/-l10n/}/testing/${BASE_PV}/rpm"
|
||||
BASE_SRC_URI_STABLE="https://download.documentfoundation.org/${PN/-l10n/}/stable/${BASE_PV}/rpm"
|
||||
|
||||
LICENSE="|| ( LGPL-3 MPL-1.1 )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86 ~amd64-linux"
|
||||
IUSE="offlinehelp"
|
||||
|
||||
#
|
||||
# when changing the language lists, please be careful to preserve the spaces (bug 491728)
|
||||
#
|
||||
# "en:en-US" for mapping from Gentoo "en" to upstream "en-US" etc.
|
||||
LANGUAGES_HELP=" am ar ast bg bn-IN bn bo bs ca-valencia ca cs da de dz el en-GB en:en-US en-ZA eo es et eu fi fr gl gu he hi hr hu id is it ja ka km ko lo lt lv mk nb ne nl nn om pl pt-BR pt ro ru si sid sk sl sq sv ta tg tr ug uk vi zh-CN zh-TW "
|
||||
LANGUAGES="${LANGUAGES_HELP}af as be br brx ckb cy dgo dsb fa fur fy ga gd gug hsb kab kk kmr-Latn kn kok ks lb mai ml mn mni mr my nr nso oc or pa:pa-IN rw sa:sa-IN sat sd sr-Latn sr ss st sw-TZ szl te th tn ts tt uz ve vec xh zu "
|
||||
|
||||
for lang in ${LANGUAGES_HELP}; do
|
||||
helppack="offlinehelp? ( ${BASE_SRC_URI_STABLE}/x86_64/LibreOffice${PN_DEV}_${BASE_PV}_Linux_x86-64_rpm_helppack_${lang#*:}.tar.gz -> LibreOffice_${MY_PV}_Linux_x86-64_rpm_helppack_${lang#*:}.tar.gz ${BASE_SRC_URI_TESTING}/x86_64/LibreOffice${PN_DEV}_${MY_PV}_Linux_x86-64_rpm_helppack_${lang#*:}.tar.gz -> LibreOffice_${MY_PV}_Linux_x86-64_rpm_helppack_${lang#*:}.tar.gz )"
|
||||
SRC_URI+=" l10n_${lang%:*}? ( ${helppack} )"
|
||||
done
|
||||
for lang in ${LANGUAGES}; do
|
||||
if [[ ${lang%:*} != en ]]; then
|
||||
langpack="${BASE_SRC_URI_STABLE}/x86_64/LibreOffice${PN_DEV}_${BASE_PV}_Linux_x86-64_rpm_langpack_${lang#*:}.tar.gz -> LibreOffice_${MY_PV}_Linux_x86-64_rpm_langpack_${lang#*:}.tar.gz ${BASE_SRC_URI_TESTING}/x86_64/LibreOffice${PN_DEV}_${MY_PV}_Linux_x86-64_rpm_langpack_${lang#*:}.tar.gz -> LibreOffice_${MY_PV}_Linux_x86-64_rpm_langpack_${lang#*:}.tar.gz"
|
||||
SRC_URI+=" l10n_${lang%:*}? ( ${langpack} )"
|
||||
fi
|
||||
IUSE+=" l10n_${lang%:*}"
|
||||
done
|
||||
unset lang helppack langpack
|
||||
|
||||
RDEPEND+="app-text/hunspell"
|
||||
|
||||
RESTRICT="strip"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
local lang dir rpmdir
|
||||
|
||||
# First remove dictionaries, we want to use system ones.
|
||||
find "${S}" -name *dict*.rpm -delete || die "Failed to remove dictionaries"
|
||||
|
||||
for lang in ${LANGUAGES}; do
|
||||
# break away if not enabled
|
||||
use l10n_${lang%:*} || continue
|
||||
|
||||
dir=${lang#*:}
|
||||
|
||||
# for english we provide just helppack, as translation is always there
|
||||
if [[ ${lang%:*} != en ]]; then
|
||||
rpmdir="LibreOffice_${MY_PV}_Linux_x86-64_rpm_langpack_${dir}/RPMS/"
|
||||
[[ -d ${rpmdir} ]] || die "Missing directory: ${rpmdir}"
|
||||
rpm_unpack ./${rpmdir}/*.rpm
|
||||
fi
|
||||
if [[ "${LANGUAGES_HELP}" =~ " ${lang} " ]] && use offlinehelp; then
|
||||
rpmdir="LibreOffice_${MY_PV}_Linux_x86-64_rpm_helppack_${dir}/RPMS/"
|
||||
[[ -d ${rpmdir} ]] || die "Missing directory: ${rpmdir}"
|
||||
rpm_unpack ./${rpmdir}/*.rpm
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
src_configure() { :; }
|
||||
src_compile() { :; }
|
||||
|
||||
src_install() {
|
||||
local dir="${S}"/opt/${PN/-l10n/}$(ver_cut 1-2)/
|
||||
# Condition required for people who do not install anything e.g. no l10n
|
||||
# or just english with no offlinehelp.
|
||||
if [[ -d "${dir}" ]] ; then
|
||||
insinto /usr/$(get_libdir)/${PN/-l10n/}/
|
||||
doins -r "${dir}"/*
|
||||
fi
|
||||
# remove extensions that are in l10n for some weird reason
|
||||
rm -rf "${ED}"/usr/$(get_libdir)/${PN/-l10n/}/share/extensions/ || \
|
||||
die "Failed to remove extensions"
|
||||
}
|
@ -1,668 +0,0 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
PYTHON_REQ_USE="threads(+),xml(+)"
|
||||
|
||||
MY_PV="${PV/_alpha/.alpha}"
|
||||
MY_PV="${MY_PV/_beta/.beta}"
|
||||
# experimental ; release ; old
|
||||
# Usually the tarballs are moved a lot so this should make everyone happy.
|
||||
DEV_URI="
|
||||
https://dev-builds.libreoffice.org/pre-releases/src
|
||||
https://download.documentfoundation.org/libreoffice/src/${MY_PV:0:5}/
|
||||
https://downloadarchive.documentfoundation.org/libreoffice/old/${MY_PV}/src
|
||||
"
|
||||
ADDONS_URI="https://dev-www.libreoffice.org/src/"
|
||||
|
||||
BRANDING="${PN}-branding-gentoo-0.8.tar.xz"
|
||||
# PATCHSET="${P}-patchset-01.tar.xz"
|
||||
|
||||
[[ ${MY_PV} == *9999* ]] && inherit git-r3
|
||||
inherit autotools bash-completion-r1 check-reqs flag-o-matic java-pkg-opt-2 multiprocessing python-single-r1 qmake-utils toolchain-funcs xdg-utils
|
||||
|
||||
DESCRIPTION="A full office productivity suite"
|
||||
HOMEPAGE="https://www.libreoffice.org"
|
||||
SRC_URI="branding? ( https://dev.gentoo.org/~dilfridge/distfiles/${BRANDING} )"
|
||||
[[ -n ${PATCHSET} ]] && SRC_URI+=" https://dev.gentoo.org/~asturm/distfiles/${PATCHSET}"
|
||||
|
||||
# Split modules following git/tarballs; Core MUST be first!
|
||||
# Help is used for the image generator
|
||||
# Only release has the tarballs
|
||||
if [[ ${MY_PV} != *9999* ]]; then
|
||||
for i in ${DEV_URI}; do
|
||||
SRC_URI+=" ${i}/${PN}-${MY_PV}.tar.xz"
|
||||
SRC_URI+=" ${i}/${PN}-help-${MY_PV}.tar.xz"
|
||||
done
|
||||
unset i
|
||||
fi
|
||||
unset DEV_URI
|
||||
|
||||
# Really required addons
|
||||
# These are bundles that can't be removed for now due to huge patchsets.
|
||||
# If you want them gone, patches are welcome.
|
||||
ADDONS_SRC=(
|
||||
# not packaged in Gentoo
|
||||
"${ADDONS_URI}/dragonbox-1.1.3.tar.gz"
|
||||
# not packaged in Gentoo, https://www.netlib.org/fp/dtoa.c
|
||||
"${ADDONS_URI}/dtoa-20180411.tgz"
|
||||
# not packaged in Gentoo, https://github.com/serge-sans-paille/frozen
|
||||
"${ADDONS_URI}/frozen-1.1.1.tar.gz"
|
||||
# not packaged in Gentoo, https://skia.org/
|
||||
"${ADDONS_URI}/skia-m111-a31e897fb3dcbc96b2b40999751611d029bf5404.tar.xz"
|
||||
"base? (
|
||||
${ADDONS_URI}/commons-logging-1.2-src.tar.gz
|
||||
${ADDONS_URI}/ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip
|
||||
${ADDONS_URI}/d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip
|
||||
${ADDONS_URI}/eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip
|
||||
${ADDONS_URI}/3bdf40c0d199af31923e900d082ca2dd-libfonts-1.1.6.zip
|
||||
${ADDONS_URI}/3404ab6b1792ae5f16bbd603bd1e1d03-libformula-1.1.7.zip
|
||||
${ADDONS_URI}/db60e4fde8dd6d6807523deb71ee34dc-liblayout-0.2.10.zip
|
||||
${ADDONS_URI}/97b2d4dba862397f446b217e2b623e71-libloader-1.1.6.zip
|
||||
${ADDONS_URI}/8ce2fcd72becf06c41f7201d15373ed9-librepository-1.1.6.zip
|
||||
${ADDONS_URI}/f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip
|
||||
${ADDONS_URI}/ace6ab49184e329db254e454a010f56d-libxml-1.1.7.zip
|
||||
${ADDONS_URI}/39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip
|
||||
)"
|
||||
"java? ( ${ADDONS_URI}/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip )"
|
||||
# no release for 8 years, should we package it?
|
||||
"libreoffice_extensions_wiki-publisher? ( ${ADDONS_URI}/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip )"
|
||||
# Does not build with 1.6 rhino at all
|
||||
"libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip )"
|
||||
# requirement of rhino
|
||||
"libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip )"
|
||||
# not packageable
|
||||
"odk? ( http://download.go-oo.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll )"
|
||||
)
|
||||
SRC_URI+=" ${ADDONS_SRC[*]}"
|
||||
|
||||
unset ADDONS_URI
|
||||
unset ADDONS_SRC
|
||||
|
||||
# Extensions that need extra work:
|
||||
LO_EXTS="nlpsolver scripting-beanshell scripting-javascript wiki-publisher"
|
||||
|
||||
IUSE="accessibility base bluetooth +branding clang coinmp +cups custom-cflags +dbus debug eds firebird
|
||||
googledrive gstreamer +gtk kde ldap +mariadb odk pdfimport postgres test valgrind vulkan
|
||||
$(printf 'libreoffice_extensions_%s ' ${LO_EXTS})"
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}
|
||||
base? ( java )
|
||||
bluetooth? ( dbus )
|
||||
libreoffice_extensions_nlpsolver? ( java )
|
||||
libreoffice_extensions_scripting-beanshell? ( java )
|
||||
libreoffice_extensions_scripting-javascript? ( java )
|
||||
libreoffice_extensions_wiki-publisher? ( java )
|
||||
"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
LICENSE="|| ( LGPL-3 MPL-1.1 )"
|
||||
SLOT="0"
|
||||
|
||||
[[ ${MY_PV} == *9999* ]] || \
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86 ~amd64-linux"
|
||||
|
||||
COMMON_DEPEND="${PYTHON_DEPS}
|
||||
app-arch/unzip
|
||||
app-arch/zip
|
||||
app-crypt/gpgme:=[cxx]
|
||||
app-text/hunspell:=
|
||||
>=app-text/libabw-0.1.0
|
||||
>=app-text/libebook-0.1
|
||||
app-text/libepubgen
|
||||
>=app-text/libetonyek-0.1
|
||||
app-text/libexttextcat
|
||||
app-text/liblangtag
|
||||
>=app-text/libmspub-0.1.0
|
||||
>=app-text/libmwaw-0.3.21
|
||||
>=app-text/libnumbertext-1.0.6
|
||||
>=app-text/libodfgen-0.1.0
|
||||
app-text/libqxp
|
||||
app-text/libstaroffice
|
||||
app-text/libwpd:0.10[tools]
|
||||
app-text/libwpg:0.3
|
||||
>=app-text/libwps-0.4
|
||||
app-text/mythes
|
||||
>=dev-cpp/clucene-2.3.3.4-r2
|
||||
>=dev-cpp/libcmis-0.6.2:0=
|
||||
dev-db/unixODBC
|
||||
dev-lang/perl
|
||||
dev-libs/boost:=[nls]
|
||||
dev-libs/expat
|
||||
dev-libs/hyphen
|
||||
dev-libs/icu:=
|
||||
dev-libs/libassuan
|
||||
dev-libs/libgpg-error
|
||||
>=dev-libs/liborcus-0.18.0:0/0.18
|
||||
dev-libs/librevenge
|
||||
dev-libs/libxml2
|
||||
dev-libs/libxslt
|
||||
dev-libs/nspr
|
||||
dev-libs/nss
|
||||
>=dev-libs/redland-1.0.16
|
||||
>=dev-libs/xmlsec-1.2.35:=[nss]
|
||||
>=games-engines/box2d-2.4.1:0
|
||||
media-gfx/fontforge
|
||||
media-gfx/graphite2
|
||||
media-libs/fontconfig
|
||||
>=media-libs/freetype-2.11.0-r1:2
|
||||
>=media-libs/harfbuzz-5.1.0:=[graphite,icu]
|
||||
media-libs/lcms:2
|
||||
>=media-libs/libcdr-0.1.0
|
||||
>=media-libs/libepoxy-1.3.1[X]
|
||||
>=media-libs/libfreehand-0.1.0
|
||||
media-libs/libjpeg-turbo:=
|
||||
media-libs/libpagemaker
|
||||
>=media-libs/libpng-1.4:0=
|
||||
>=media-libs/libvisio-0.1.0
|
||||
media-libs/libwebp:=
|
||||
media-libs/libzmf
|
||||
media-libs/openjpeg:=
|
||||
media-libs/tiff:=
|
||||
media-libs/zxing-cpp:=
|
||||
net-misc/curl
|
||||
sci-mathematics/lpsolve:=
|
||||
sys-libs/zlib
|
||||
virtual/opengl
|
||||
x11-libs/cairo[X]
|
||||
x11-libs/libXinerama
|
||||
x11-libs/libXrandr
|
||||
x11-libs/libXrender
|
||||
accessibility? (
|
||||
$(python_gen_cond_dep 'dev-python/lxml[${PYTHON_USEDEP}]')
|
||||
)
|
||||
bluetooth? (
|
||||
dev-libs/glib:2
|
||||
net-wireless/bluez
|
||||
)
|
||||
coinmp? ( sci-libs/coinor-mp )
|
||||
cups? ( net-print/cups )
|
||||
dbus? ( sys-apps/dbus )
|
||||
eds? (
|
||||
dev-libs/glib:2
|
||||
>=gnome-base/dconf-0.40.0
|
||||
gnome-extra/evolution-data-server
|
||||
)
|
||||
firebird? ( >=dev-db/firebird-3.0.2.32703.0-r1[server] )
|
||||
gstreamer? (
|
||||
media-libs/gstreamer:1.0
|
||||
media-libs/gst-plugins-base:1.0
|
||||
)
|
||||
gtk? (
|
||||
app-accessibility/at-spi2-core:2
|
||||
dev-libs/glib:2
|
||||
dev-libs/gobject-introspection
|
||||
gnome-base/dconf
|
||||
media-libs/mesa[egl(+)]
|
||||
x11-libs/gtk+:3[X]
|
||||
x11-libs/pango
|
||||
)
|
||||
kde? (
|
||||
dev-qt/qtcore:5
|
||||
dev-qt/qtgui:5
|
||||
dev-qt/qtwidgets:5
|
||||
dev-qt/qtx11extras:5
|
||||
kde-frameworks/kconfig:5
|
||||
kde-frameworks/kcoreaddons:5
|
||||
kde-frameworks/ki18n:5
|
||||
kde-frameworks/kio:5
|
||||
kde-frameworks/kwindowsystem:5
|
||||
)
|
||||
ldap? ( net-nds/openldap:= )
|
||||
libreoffice_extensions_scripting-beanshell? ( dev-java/bsh )
|
||||
libreoffice_extensions_scripting-javascript? ( >=dev-java/rhino-1.7.14:1.6 )
|
||||
mariadb? ( dev-db/mariadb-connector-c:= )
|
||||
!mariadb? ( dev-db/mysql-connector-c:= )
|
||||
pdfimport? ( >=app-text/poppler-22.06:=[cxx] )
|
||||
postgres? ( >=dev-db/postgresql-9.0:*[kerberos] )
|
||||
"
|
||||
# FIXME: cppunit should be moved to test conditional
|
||||
# after everything upstream is under gbuild
|
||||
# as dmake execute tests right away
|
||||
# tests apparently also need google-carlito-fonts (not packaged)
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
>=dev-libs/libatomic_ops-7.2d
|
||||
dev-perl/Archive-Zip
|
||||
>=dev-util/cppunit-1.14.0
|
||||
>=dev-util/gperf-3.1
|
||||
dev-util/mdds:1/2.1
|
||||
media-libs/glm
|
||||
x11-base/xorg-proto
|
||||
x11-libs/libXt
|
||||
x11-libs/libXtst
|
||||
java? (
|
||||
dev-java/ant-core
|
||||
>=virtual/jdk-11
|
||||
)
|
||||
test? (
|
||||
app-crypt/gnupg
|
||||
dev-util/cppunit
|
||||
media-fonts/dejavu
|
||||
media-fonts/liberation-fonts
|
||||
)
|
||||
valgrind? ( dev-debug/valgrind )
|
||||
"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
acct-group/libreoffice
|
||||
acct-user/libreoffice
|
||||
!app-office/libreoffice-bin
|
||||
!app-office/libreoffice-bin-debug
|
||||
media-fonts/liberation-fonts
|
||||
|| ( x11-misc/xdg-utils kde-plasma/kde-cli-tools )
|
||||
java? ( >=virtual/jre-11 )
|
||||
kde? ( kde-frameworks/breeze-icons:* )
|
||||
"
|
||||
BDEPEND="
|
||||
dev-util/intltool
|
||||
sys-apps/which
|
||||
app-alternatives/yacc
|
||||
app-alternatives/lex
|
||||
sys-devel/gettext
|
||||
virtual/pkgconfig
|
||||
clang? (
|
||||
|| (
|
||||
( sys-devel/clang:18
|
||||
sys-devel/llvm:18
|
||||
=sys-devel/lld-18* )
|
||||
( sys-devel/clang:17
|
||||
sys-devel/llvm:17
|
||||
=sys-devel/lld-17* )
|
||||
( sys-devel/clang:16
|
||||
sys-devel/llvm:16
|
||||
=sys-devel/lld-16* )
|
||||
( sys-devel/clang:15
|
||||
sys-devel/llvm:15
|
||||
=sys-devel/lld-15* )
|
||||
)
|
||||
)
|
||||
odk? ( >=app-text/doxygen-1.8.4 )
|
||||
"
|
||||
if [[ ${MY_PV} != *9999* ]] && [[ ${PV} != *_* ]]; then
|
||||
PDEPEND="=app-office/libreoffice-l10n-$(ver_cut 1-2)*"
|
||||
else
|
||||
# Translations are not reliable on live ebuilds
|
||||
# rather force people to use english only.
|
||||
RDEPEND+=" !app-office/libreoffice-l10n"
|
||||
fi
|
||||
|
||||
PATCHES=(
|
||||
# "${WORKDIR}"/${PATCHSET/.tar.xz/}
|
||||
|
||||
# not upstreamable stuff
|
||||
"${FILESDIR}/${PN}-5.3.4.2-kioclient5.patch"
|
||||
"${FILESDIR}/${PN}-6.1-nomancompress.patch"
|
||||
"${FILESDIR}/${PN}-7.2.0.4-qt5detect.patch"
|
||||
|
||||
# upstream
|
||||
"${FILESDIR}/${PN}-7.6.5.2-gcc14.patch"
|
||||
|
||||
# maybe upstreamable
|
||||
"${FILESDIR}/${PN}-7.5.8.2-icu-74-compatibility.patch"
|
||||
)
|
||||
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
_check_reqs() {
|
||||
CHECKREQS_MEMORY="512M"
|
||||
if is-flagq "-g*" && ! is-flagq "-g*0" ; then
|
||||
CHECKREQS_DISK_BUILD="22G"
|
||||
else
|
||||
CHECKREQS_DISK_BUILD="6G"
|
||||
fi
|
||||
check-reqs_$1
|
||||
}
|
||||
|
||||
pkg_pretend() {
|
||||
use base ||
|
||||
ewarn "If you plan to use Base application you must enable USE base."
|
||||
use java ||
|
||||
ewarn "Without USE java, several wizards are not going to be available."
|
||||
|
||||
[[ ${MERGE_TYPE} != binary ]] && _check_reqs pkg_pretend
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
java-pkg-opt-2_pkg_setup
|
||||
python-single-r1_pkg_setup
|
||||
xdg_environment_reset
|
||||
|
||||
[[ ${MERGE_TYPE} != binary ]] && _check_reqs pkg_setup
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
default
|
||||
|
||||
if [[ ${MY_PV} = *9999* ]]; then
|
||||
local base_uri branch mypv
|
||||
base_uri="https://anongit.freedesktop.org/git"
|
||||
branch="master"
|
||||
mypv=${MY_PV/.9999}
|
||||
[[ ${mypv} != ${MY_PV} ]] && branch="${PN}-${mypv/./-}"
|
||||
git-r3_fetch "${base_uri}/${PN}/core" "refs/heads/${branch}"
|
||||
git-r3_checkout "${base_uri}/${PN}/core"
|
||||
LOCOREGIT_VERSION=${EGIT_VERSION}
|
||||
|
||||
git-r3_fetch "${base_uri}/${PN}/help" "refs/heads/master"
|
||||
git-r3_checkout "${base_uri}/${PN}/help" "helpcontent2" # doesn't match on help
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# sandbox violations on many systems, we don't need it. Bug #646406
|
||||
sed -i \
|
||||
-e "/KF5_CONFIG/s/kf5-config/no/" \
|
||||
configure.ac || die "Failed to disable kf5-config"
|
||||
|
||||
AT_M4DIR="m4" eautoreconf
|
||||
# hack in the autogen.sh
|
||||
touch autogen.lastrun
|
||||
|
||||
# sed in the tests
|
||||
sed -i \
|
||||
-e "s#all : build unitcheck#all : build#g" \
|
||||
solenv/gbuild/Module.mk || die
|
||||
sed -i \
|
||||
-e "s#check: dev-install subsequentcheck#check: unitcheck slowcheck dev-install subsequentcheck#g" \
|
||||
-e "s#Makefile.gbuild all slowcheck#Makefile.gbuild all#g" \
|
||||
Makefile.in || die
|
||||
|
||||
sed -i \
|
||||
-e "s,/usr/share/bash-completion/completions,$(get_bashcompdir)," \
|
||||
-e "s,\$INSTALLDIRNAME.sh,${PN}," \
|
||||
bin/distro-install-desktop-integration || die
|
||||
|
||||
if use branding; then
|
||||
# hack...
|
||||
mv -v "${WORKDIR}/branding-intro.png" "icon-themes/colibre/brand/intro.png" || die
|
||||
fi
|
||||
|
||||
# Don't list pdfimport support in desktop when built with none, bug # 605464
|
||||
if ! use pdfimport; then
|
||||
sed -i \
|
||||
-e ":MimeType: s:application/pdf;::" \
|
||||
-e ":Keywords: s:pdf;::" \
|
||||
sysui/desktop/menus/draw.desktop || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Set up Google API keys, see https://www.chromium.org/developers/how-tos/api-keys
|
||||
# Note: these are for Gentoo use ONLY. For your own distribution, please get
|
||||
# your own set of keys. Feel free to contact chromium@gentoo.org for more info.
|
||||
local google_default_client_id="329227923882.apps.googleusercontent.com"
|
||||
local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu"
|
||||
|
||||
# Show flags set at the beginning
|
||||
einfo "Preset CFLAGS: ${CFLAGS}"
|
||||
einfo "Preset LDFLAGS: ${LDFLAGS}"
|
||||
|
||||
# Workaround for bug #915067
|
||||
append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
|
||||
|
||||
if use clang ; then
|
||||
# Force clang
|
||||
einfo "Enforcing the use of clang due to USE=clang ..."
|
||||
AR=llvm-ar
|
||||
CC=${CHOST}-clang
|
||||
CXX=${CHOST}-clang++
|
||||
NM=llvm-nm
|
||||
RANLIB=llvm-ranlib
|
||||
LDFLAGS+=" -fuse-ld=lld"
|
||||
|
||||
# Workaround for bug #907905
|
||||
filter-lto
|
||||
|
||||
# Not implemented by Clang, bug #903889
|
||||
filter-flags -Wlto-type-mismatch -Werror=lto-type-mismatch
|
||||
else
|
||||
# Force gcc
|
||||
einfo "Enforcing the use of gcc due to USE=-clang ..."
|
||||
AR=gcc-ar
|
||||
CC=${CHOST}-gcc
|
||||
CXX=${CHOST}-g++
|
||||
NM=gcc-nm
|
||||
RANLIB=gcc-ranlib
|
||||
|
||||
# Apparently the Clang flags get used even for GCC builds sometimes.
|
||||
# bug #838115
|
||||
sed -i -e "s/-flto=thin/-flto/" solenv/gbuild/platform/com_GCC_defs.mk || die
|
||||
fi
|
||||
|
||||
if use custom-cflags ; then
|
||||
elog "USE=custom-cflags has been selected. You are on your own to make sure that"
|
||||
elog "the build succeeds. Good luck!"
|
||||
else
|
||||
strip-flags
|
||||
fi
|
||||
|
||||
export LO_CLANG_CC=${CC}
|
||||
export LO_CLANG_CXX=${CXX}
|
||||
|
||||
# Show flags set at the end
|
||||
einfo " Used CFLAGS: ${CFLAGS}"
|
||||
einfo " Used LDFLAGS: ${LDFLAGS}"
|
||||
|
||||
# Ensure we use correct toolchain
|
||||
tc-export CC CXX LD AR NM OBJDUMP RANLIB PKG_CONFIG
|
||||
|
||||
# optimization flags
|
||||
export GMAKE_OPTIONS="${MAKEOPTS}"
|
||||
# System python enablement:
|
||||
export PYTHON_CFLAGS=$(python_get_CFLAGS)
|
||||
export PYTHON_LIBS=$(python_get_LIBS)
|
||||
|
||||
use kde && export QT5DIR="$(qt5_get_bindir)/.."
|
||||
|
||||
local gentoo_buildid="Gentoo official package"
|
||||
if [[ -n ${LOCOREGIT_VERSION} ]]; then
|
||||
gentoo_buildid+=" (from git: ${LOCOREGIT_VERSION})"
|
||||
fi
|
||||
|
||||
# system headers/libs/...: enforce using system packages
|
||||
# --disable-breakpad: requires not-yet-in-tree dev-utils/breakpad
|
||||
# --enable-cairo: ensure that cairo is always required
|
||||
# --enable-*-link: link to the library rather than just dlopen on runtime
|
||||
# --enable-release-build: build the libreoffice as release
|
||||
# --disable-fetch-external: prevent dowloading during compile phase
|
||||
# --enable-extension-integration: enable any extension integration support
|
||||
# --without-{fonts,myspell-dicts,ppsd}: prevent install of sys pkgs
|
||||
# --disable-report-builder: too much java packages pulled in without pkgs
|
||||
# --without-system-sane: just sane.h header that is used for scan in writer,
|
||||
# not linked or anything else, worthless to depend on
|
||||
# --disable-pdfium: not yet packaged
|
||||
local myeconfargs=(
|
||||
--with-system-dicts
|
||||
--with-system-epoxy
|
||||
--with-system-headers
|
||||
--with-system-jars
|
||||
--with-system-libs
|
||||
--enable-build-opensymbol
|
||||
--enable-cairo-canvas
|
||||
--enable-largefile
|
||||
--enable-mergelibs
|
||||
--enable-python=system
|
||||
--enable-randr
|
||||
--enable-release-build
|
||||
--disable-breakpad
|
||||
--disable-bundle-mariadb
|
||||
--disable-ccache
|
||||
--disable-epm
|
||||
--disable-fetch-external
|
||||
--disable-gtk3-kde5
|
||||
--disable-online-update
|
||||
--disable-openssl
|
||||
--disable-pdfium
|
||||
--disable-qt6
|
||||
--with-extra-buildid="${gentoo_buildid}"
|
||||
--enable-extension-integration
|
||||
--with-external-dict-dir="${EPREFIX}/usr/share/myspell"
|
||||
--with-external-hyph-dir="${EPREFIX}/usr/share/myspell"
|
||||
--with-external-thes-dir="${EPREFIX}/usr/share/myspell"
|
||||
--with-external-tar="${DISTDIR}"
|
||||
--with-lang=""
|
||||
--with-parallelism=$(makeopts_jobs)
|
||||
--with-system-openjpeg
|
||||
--with-tls=nss
|
||||
--with-vendor="Gentoo Foundation"
|
||||
--with-x
|
||||
--without-fonts
|
||||
--without-myspell-dicts
|
||||
--with-help="html"
|
||||
--without-helppack-integration
|
||||
--with-system-gpgmepp
|
||||
--without-system-abseil
|
||||
--without-system-dragonbox
|
||||
--without-system-frozen
|
||||
--without-system-jfreereport
|
||||
--without-system-libfixmath
|
||||
--without-system-sane
|
||||
$(use_enable base report-builder)
|
||||
$(use_enable bluetooth sdremote-bluetooth)
|
||||
$(use_enable coinmp)
|
||||
$(use_enable cups)
|
||||
$(use_enable dbus)
|
||||
$(use_enable debug)
|
||||
$(use_enable eds evolution2)
|
||||
$(use_enable firebird firebird-sdbc)
|
||||
$(use_enable gstreamer gstreamer-1-0)
|
||||
$(use_enable gtk gtk3)
|
||||
$(use_enable kde kf5)
|
||||
$(use_enable kde qt5)
|
||||
$(use_enable ldap)
|
||||
$(use_enable odk)
|
||||
$(use_enable pdfimport)
|
||||
$(use_enable postgres postgresql-sdbc)
|
||||
$(use_enable vulkan skia)
|
||||
$(use_with accessibility lxml)
|
||||
$(use_with coinmp system-coinmp)
|
||||
$(use_with googledrive gdrive-client-id ${google_default_client_id})
|
||||
$(use_with googledrive gdrive-client-secret ${google_default_client_secret})
|
||||
$(use_with java)
|
||||
$(use_with odk doxygen)
|
||||
$(use_with valgrind)
|
||||
)
|
||||
|
||||
if use eds || use gtk; then
|
||||
myeconfargs+=( --enable-dconf --enable-gio )
|
||||
else
|
||||
myeconfargs+=( --disable-dconf --disable-gio )
|
||||
fi
|
||||
|
||||
# libreoffice extensions handling
|
||||
for lo_xt in ${LO_EXTS}; do
|
||||
if [[ "${lo_xt}" == "scripting-beanshell" || "${lo_xt}" == "scripting-javascript" ]]; then
|
||||
myeconfargs+=( $(use_enable libreoffice_extensions_${lo_xt} ${lo_xt}) )
|
||||
else
|
||||
myeconfargs+=( $(use_enable libreoffice_extensions_${lo_xt} ext-${lo_xt}) )
|
||||
fi
|
||||
done
|
||||
|
||||
if use java; then
|
||||
# hsqldb: system one is too new
|
||||
myeconfargs+=(
|
||||
--without-junit
|
||||
--without-system-hsqldb
|
||||
--with-ant-home="${ANT_HOME}"
|
||||
--with-jdk-home="${JAVA_HOME}"
|
||||
)
|
||||
|
||||
use libreoffice_extensions_scripting-beanshell && \
|
||||
myeconfargs+=( --with-beanshell-jar=$(java-pkg_getjar bsh bsh.jar) )
|
||||
|
||||
use libreoffice_extensions_scripting-javascript && \
|
||||
myeconfargs+=( --with-rhino-jar=$(java-pkg_getjar rhino-1.6 rhino.jar) )
|
||||
fi
|
||||
|
||||
tc-is-lto && myeconfargs+=( --enable-lto )
|
||||
|
||||
MARIADBCONFIG="$(type -p $(usex mariadb mariadb mysql)_config)" \
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# more and more LO stuff tries to use OpenGL, including tests during build
|
||||
# bug 501508, bug 540624, bug 545974 and probably more
|
||||
addpredict /dev/dri
|
||||
addpredict /dev/ati
|
||||
addpredict /dev/nvidiactl
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake unitcheck
|
||||
emake slowcheck
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" distro-pack-install -o build -o check
|
||||
|
||||
# bug 593514
|
||||
if use gtk; then
|
||||
dosym libreoffice/program/liblibreofficekitgtk.so \
|
||||
/usr/$(get_libdir)/liblibreofficekitgtk.so
|
||||
fi
|
||||
|
||||
# bash completion aliases
|
||||
bashcomp_alias \
|
||||
libreoffice \
|
||||
unopkg loimpress lobase localc lodraw lomath lowriter lofromtemplate loweb loffice
|
||||
|
||||
if use branding; then
|
||||
insinto /usr/$(get_libdir)/${PN}/program
|
||||
newins "${WORKDIR}/branding-sofficerc" sofficerc
|
||||
dodir /etc/env.d
|
||||
echo "CONFIG_PROTECT=/usr/$(get_libdir)/${PN}/program/sofficerc" > "${ED}"/etc/env.d/99${PN} || die
|
||||
fi
|
||||
|
||||
# bug 703474
|
||||
insinto /usr/include
|
||||
doins -r include/LibreOfficeKit
|
||||
|
||||
local lodir=/usr/$(get_libdir)/libreoffice
|
||||
# patching this would break tests
|
||||
cat <<-EOF > "${T}"/uno.py
|
||||
import sys, os
|
||||
sys.path.append('${EPREFIX}${lodir}/program')
|
||||
os.putenv('URE_BOOTSTRAP', 'vnd.sun.star.pathname:${EPREFIX}${lodir}/program/fundamentalrc')
|
||||
EOF
|
||||
sed -e "/^import sys/d" -e "/^import os/d" \
|
||||
-i "${D}"${lodir}/program/uno.py || die "cleanup dupl imports failed"
|
||||
cat "${D}"${lodir}/program/uno.py >> "${T}"/uno.py || die
|
||||
cp "${T}"/uno.py "${D}"${lodir}/program/uno.py || die
|
||||
|
||||
# more system pyuno mess
|
||||
sed -e "/sOffice = \"\" # lets hope for the best/s:\"\":\"${EPREFIX}${lodir}/program\":" \
|
||||
-i "${D}"${lodir}/program/officehelper.py || die
|
||||
|
||||
python_optimize "${D}"${lodir}/program
|
||||
# link python bridge in site-packages, bug 667802
|
||||
local py pyc loprogdir=/usr/$(get_libdir)/libreoffice/program
|
||||
for py in uno.py unohelper.py officehelper.py; do
|
||||
dosym -r ${loprogdir}/${py} $(python_get_sitedir)/${py}
|
||||
while IFS="" read -d $'\0' -r pyc; do
|
||||
pyc=${pyc//*\/}
|
||||
dosym -r ${loprogdir}/__pycache__/${pyc} $(python_get_sitedir)/__pycache__/${pyc}
|
||||
done < <(find "${D}"${lodir}/program -type f -name ${py/.py/*.pyc} -print0)
|
||||
done
|
||||
|
||||
newinitd "${FILESDIR}/libreoffice.initd" libreoffice
|
||||
newconfd "${FILESDIR}/libreoffice.confd" libreoffice
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_icon_cache_update
|
||||
xdg_desktop_database_update
|
||||
xdg_mimeinfo_database_update
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
xdg_icon_cache_update
|
||||
xdg_desktop_database_update
|
||||
xdg_mimeinfo_database_update
|
||||
}
|
@ -1 +1,2 @@
|
||||
DIST skrooge-2.31.0.tar.xz 22372292 BLAKE2B 3eafe194a9783ae2f3841f6c32211cdf3c425033b63084bf47e526482830d1d53ae66446aa04f0d93497a59054e229bbadd6f46ec0782e4ab05d902d0e809596 SHA512 3a09b9e6017b0ebce7170285a8ca6a27c8942f16c310450e76dc9deb87e0d016edb49b74c8ea784bed5f9b5a10ed515016266584f53fc0144f4bf02bc7769be1
|
||||
DIST skrooge-2.32.0.tar.xz 22945360 BLAKE2B d567aedb958c8dc7e49ca3d3c6d78d9e0b9b1a520bf0202fda145f75a4bfb82ae1afe9278524aa4693944a98f46cbe14bfde10a202fbdb2532dbb1421ec29262 SHA512 e39ddcf498281e0ac402a2bad0a858a5d14c9d17fd01185954de2b0c8d0cc9768762a33b846db94824f5640ccdc063cf055d46ef0b90b03615209a0c2f4bed6c
|
||||
|
@ -0,0 +1,99 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
ECM_HANDBOOK="optional"
|
||||
ECM_TEST="forceoptional"
|
||||
KFMIN=5.115.0
|
||||
QTMIN=5.15.12
|
||||
inherit ecm kde.org
|
||||
|
||||
DESCRIPTION="Personal finances manager, aiming at being simple and intuitive"
|
||||
HOMEPAGE="https://skrooge.org/"
|
||||
|
||||
if [[ ${KDE_BUILD_TYPE} = release ]]; then
|
||||
SRC_URI="mirror://kde/stable/${PN}/${P}.tar.xz"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
fi
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="5"
|
||||
IUSE="activities kde ofx"
|
||||
|
||||
# hangs + installs files (also requires KF5DesignerPlugin)
|
||||
RESTRICT="test"
|
||||
|
||||
COMMON_DEPEND="
|
||||
>=app-crypt/qca-2.3.0:2[qt5(+)]
|
||||
dev-db/sqlcipher
|
||||
dev-libs/grantlee:5
|
||||
>=dev-qt/qtconcurrent-${QTMIN}:5
|
||||
>=dev-qt/qtdbus-${QTMIN}:5
|
||||
>=dev-qt/qtdeclarative-${QTMIN}:5[widgets]
|
||||
>=dev-qt/qtgui-${QTMIN}:5
|
||||
>=dev-qt/qtnetwork-${QTMIN}:5
|
||||
>=dev-qt/qtprintsupport-${QTMIN}:5
|
||||
>=dev-qt/qtscript-${QTMIN}:5
|
||||
>=dev-qt/qtsql-${QTMIN}:5=
|
||||
>=dev-qt/qtsvg-${QTMIN}:5
|
||||
>=dev-qt/qtwebengine-${QTMIN}:5[widgets]
|
||||
>=dev-qt/qtwidgets-${QTMIN}:5
|
||||
>=dev-qt/qtxml-${QTMIN}:5
|
||||
>=dev-qt/qtxmlpatterns-${QTMIN}:5
|
||||
>=kde-frameworks/karchive-${KFMIN}:5
|
||||
>=kde-frameworks/kcompletion-${KFMIN}:5
|
||||
>=kde-frameworks/kconfig-${KFMIN}:5
|
||||
>=kde-frameworks/kconfigwidgets-${KFMIN}:5
|
||||
>=kde-frameworks/kcoreaddons-${KFMIN}:5
|
||||
>=kde-frameworks/kdbusaddons-${KFMIN}:5
|
||||
>=kde-frameworks/ki18n-${KFMIN}:5
|
||||
>=kde-frameworks/kiconthemes-${KFMIN}:5
|
||||
>=kde-frameworks/kio-${KFMIN}:5
|
||||
>=kde-frameworks/kitemviews-${KFMIN}:5
|
||||
>=kde-frameworks/knewstuff-${KFMIN}:5
|
||||
>=kde-frameworks/knotifications-${KFMIN}:5
|
||||
>=kde-frameworks/knotifyconfig-${KFMIN}:5
|
||||
>=kde-frameworks/kparts-${KFMIN}:5
|
||||
>=kde-frameworks/kservice-${KFMIN}:5
|
||||
>=kde-frameworks/ktextwidgets-${KFMIN}:5
|
||||
>=kde-frameworks/kwallet-${KFMIN}:5
|
||||
>=kde-frameworks/kwidgetsaddons-${KFMIN}:5
|
||||
>=kde-frameworks/kxmlgui-${KFMIN}:5
|
||||
activities? ( >=kde-plasma/plasma-activities-${KFMIN}:5 )
|
||||
kde? ( >=kde-frameworks/krunner-${KFMIN}:5 )
|
||||
ofx? ( dev-libs/libofx:= )
|
||||
"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
>=kde-frameworks/kguiaddons-${KFMIN}:5
|
||||
>=kde-frameworks/kjobwidgets-${KFMIN}:5
|
||||
>=kde-frameworks/kwindowsystem-${KFMIN}:5
|
||||
"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
>=dev-qt/qtquickcontrols-${QTMIN}:5
|
||||
"
|
||||
BDEPEND="
|
||||
dev-libs/libxslt
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DSKG_WEBENGINE=ON
|
||||
-DSKG_WEBKIT=OFF
|
||||
-DSKG_DESIGNER=OFF
|
||||
$(cmake_use_find_package activities KF5Activities)
|
||||
$(cmake_use_find_package kde KF5Runner)
|
||||
$(cmake_use_find_package ofx LibOfx)
|
||||
-DSKG_BUILD_TEST=$(usex test)
|
||||
)
|
||||
|
||||
ecm_src_configure
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local mycmakeargs=(
|
||||
-DSKG_BUILD_TEST=ON
|
||||
)
|
||||
ecm_src_test
|
||||
}
|
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
DIST atril-1.26.0.tar.xz 1986160 BLAKE2B 40de33749113144c49341cf8249bd20de37c3d64f3daa865dfe2bcad117e1c2b5aae2aef3b4e0199fd2656b17af236e2a863ef97933decc5072e3419219154e4 SHA512 9c4e8b1c45959136c8fc4c5db47117e45e8afca8be2294418e6c1a0f8098c162ccaa4a60e5baea34db91d45d345a3953afe95281782986e7046b87a34c8f7dbd
|
||||
DIST atril-1.26.1.tar.xz 2087068 BLAKE2B d655bffb4a8245bb3cc25fc91d08ba64ade22fb6da24f5fcb9c418c020c99df66c85a0b59f1d0c31a2f450650d9807adc248a7baeb74cb696bf3687270572f47 SHA512 276e80a81234f3228065f3a804fbd8a306ac948978f3dfd233f678dc4fb6f833ebd1123950996ae08869fac112ebb0d2785ab60fde6bfddd2d2c407a2c991ea3
|
||||
DIST atril-1.26.2.tar.xz 2095464 BLAKE2B 9e0d0829c7ae692f695e3cc5a45927b503c87e57d6e6a5808626f71de01394201047fe4bdca804369d1184802eff38364ae43e36536e1258d6798e473e5e08ac SHA512 d0b3fe14443907e43a58083282d555b74189d63d94e9ec0c2053976ad529d236738c3af4a668e813307d1ba44551b0a8ad1bc78cd8f53ab61cb811eca136eec9
|
||||
DIST atril-1.27.0.tar.xz 2082372 BLAKE2B 4f8a3002e9979474be71a7b8d5fda1fc63bc9f3b231dfed7db9a66b0e23acf7d7fd24de070ca55974b19ec4a54d2d95542b84b150ade632087b9e638c6faa404 SHA512 1e8bdf689517be073943b49a81244138d3ebb7783cc45ccc1847eb545ba2897d63a01a5a87b95b359b23760f7f843131ac3f7e2912b0320d9dd5d0f765bfe843
|
||||
DIST atril-1.28.0.tar.xz 2093588 BLAKE2B 6e5b2f63ce1a0bd1f419b0e9ccb29887086c180ccdeb473770bc20a6408ba37b3334eca0d808c304f20c26818138eeb5116a55d02e8e84b60eeedda03254896f SHA512 dd5f77b3ba2033a3591e0f58742d75eefdd0bfdcdec80a6aa6148a1cf37e4508776733013f946103bdf0412f35dee0b283cc254fa0033fc14966df323bb371a8
|
||||
|
@ -1,42 +0,0 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{9..11} )
|
||||
DISTUTILS_USE_SETUPTOOLS=rdepend
|
||||
inherit distutils-r1 optfeature xdg desktop
|
||||
|
||||
DESCRIPTION="Merge or split pdfs; rearrange, rotate, crop pages"
|
||||
HOMEPAGE="https://github.com/jeromerobert/pdfarranger"
|
||||
SRC_URI="https://github.com/jeromerobert/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
RDEPEND="
|
||||
app-text/poppler[introspection,cairo]
|
||||
>=dev-python/pikepdf-6.0.0[${PYTHON_USEDEP}]
|
||||
dev-python/pycairo[${PYTHON_USEDEP}]
|
||||
dev-python/pygobject:3[${PYTHON_USEDEP},cairo]
|
||||
dev-python/python-dateutil[${PYTHON_USEDEP}]
|
||||
x11-libs/gtk+:3[introspection]
|
||||
x11-libs/pango[introspection]
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-python/python-distutils-extra[${PYTHON_USEDEP}]
|
||||
dev-util/intltool
|
||||
"
|
||||
|
||||
src_install() {
|
||||
distutils-r1_src_install
|
||||
for x in 16 32 48 256 scalable
|
||||
do doicon -s ${x} data/icons/hicolor/${x}*/*
|
||||
done
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_pkg_postinst
|
||||
optfeature "image file import" media-gfx/img2pdf
|
||||
}
|
Binary file not shown.
@ -1 +1,2 @@
|
||||
DIST prometheus-cpp-1.1.0.tar.gz 58489 BLAKE2B af24fbc34e79c04ec80dbf4430de5a2cf0e66b7de4c06f9b37e6bc3ab7f868b948db486a4f962c7986748eff1247eb0119ad5b581ac01129ce6bfa10f7b53ec7 SHA512 0715a0eb8a7f7065e01b8039c261eaa98a77a8d035783ccef9333fb06eecd75599959807ec157514c60ed435841bcd0cdd8cd295bcf7cd88e21e1099ba12be89
|
||||
DIST prometheus-cpp-1.2.4.tar.gz 73953 BLAKE2B 75ca7b8c88408b54ab806dcc8ecaa48c9d29a7cbb76fe786fc76e114fa0bfcacaced7d899f8aff24060c9cbb4836d144b25fca2ac45438982789bcf881fade67 SHA512 8c15492054189b736e502258c30aaaae0fac3c9ea61907260e6e3cd29fe4077451f9e49fd580508aa6e21691209545d9cf87011be5b046fa097a53a133167553
|
||||
|
@ -0,0 +1,41 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake
|
||||
|
||||
DESCRIPTION="Prometheus Client Library for Modern C++"
|
||||
HOMEPAGE="https://github.com/jupp0r/prometheus-cpp"
|
||||
SRC_URI="https://github.com/jupp0r/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~riscv ~x86"
|
||||
IUSE="test zlib"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="net-misc/curl
|
||||
sys-libs/zlib
|
||||
www-servers/civetweb[cxx]"
|
||||
DEPEND="${RDEPEND}
|
||||
test? (
|
||||
dev-cpp/benchmark
|
||||
dev-cpp/gtest
|
||||
)"
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DENABLE_PULL=yes
|
||||
-DENABLE_PUSH=yes
|
||||
-DENABLE_COMPRESSION=$(usex zlib)
|
||||
-DENABLE_TESTING=$(usex test)
|
||||
-DUSE_THIRDPARTY_LIBRARIES=OFF
|
||||
-DGENERATE_PKGCONFIG=ON
|
||||
-DRUN_IWYU=OFF
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
Binary file not shown.
@ -0,0 +1,110 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
inherit cmake flag-o-matic llvm.org llvm-utils python-single-r1
|
||||
|
||||
DESCRIPTION="The LLVM debugger"
|
||||
HOMEPAGE="https://llvm.org/"
|
||||
|
||||
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
|
||||
SLOT="0/${LLVM_SOABI}"
|
||||
IUSE="+debug debuginfod +libedit lzma ncurses +python test +xml"
|
||||
RESTRICT="test"
|
||||
REQUIRED_USE=${PYTHON_REQUIRED_USE}
|
||||
|
||||
DEPEND="
|
||||
debuginfod? (
|
||||
net-misc/curl:=
|
||||
dev-cpp/cpp-httplib:=
|
||||
)
|
||||
libedit? ( dev-libs/libedit:0= )
|
||||
lzma? ( app-arch/xz-utils:= )
|
||||
ncurses? ( >=sys-libs/ncurses-5.9-r3:0= )
|
||||
xml? ( dev-libs/libxml2:= )
|
||||
~sys-devel/clang-${PV}
|
||||
~sys-devel/llvm-${PV}[debuginfod=]
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
python? (
|
||||
${PYTHON_DEPS}
|
||||
)
|
||||
"
|
||||
BDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
python? (
|
||||
>=dev-lang/swig-3.0.11
|
||||
)
|
||||
test? (
|
||||
$(python_gen_cond_dep "
|
||||
~dev-python/lit-${PV}[\${PYTHON_USEDEP}]
|
||||
dev-python/psutil[\${PYTHON_USEDEP}]
|
||||
")
|
||||
sys-devel/lld
|
||||
)
|
||||
"
|
||||
|
||||
LLVM_COMPONENTS=( lldb cmake llvm/utils )
|
||||
LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support third-party )
|
||||
llvm.org_set_globals
|
||||
|
||||
src_configure() {
|
||||
llvm_prepend_path "${LLVM_MAJOR}"
|
||||
|
||||
# bug #858389 (https://github.com/llvm/llvm-project/issues/83636)
|
||||
filter-lto
|
||||
|
||||
# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
|
||||
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
|
||||
|
||||
local mycmakeargs=(
|
||||
-DLLDB_ENABLE_CURSES=$(usex ncurses)
|
||||
-DLLDB_ENABLE_LIBEDIT=$(usex libedit)
|
||||
-DLLDB_ENABLE_PYTHON=$(usex python)
|
||||
-DLLDB_ENABLE_LUA=OFF
|
||||
-DLLDB_ENABLE_LZMA=$(usex lzma)
|
||||
-DLLDB_ENABLE_LIBXML2=$(usex xml)
|
||||
-DLLVM_ENABLE_TERMINFO=$(usex ncurses)
|
||||
|
||||
-DLLDB_INCLUDE_TESTS=$(usex test)
|
||||
|
||||
-DCLANG_LINK_CLANG_DYLIB=ON
|
||||
# TODO: fix upstream to detect this properly
|
||||
-DHAVE_LIBDL=ON
|
||||
-DHAVE_LIBPTHREAD=ON
|
||||
|
||||
# normally we'd have to set LLVM_ENABLE_TERMINFO, HAVE_TERMINFO
|
||||
# and TERMINFO_LIBS... so just force FindCurses.cmake to use
|
||||
# ncurses with complete library set (including autodetection
|
||||
# of -ltinfo)
|
||||
-DCURSES_NEED_NCURSES=ON
|
||||
|
||||
-DCLANG_RESOURCE_DIR="../../../clang/${LLVM_MAJOR}"
|
||||
|
||||
-DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
|
||||
-DPython3_EXECUTABLE="${PYTHON}"
|
||||
)
|
||||
use test && mycmakeargs+=(
|
||||
-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
|
||||
-DLLVM_LIT_ARGS="$(get_lit_flags)"
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local -x LIT_PRESERVES_TMP=1
|
||||
cmake_build check-lldb-{shell,unit}
|
||||
# failures + hangs
|
||||
#use python && cmake_build check-lldb-api
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
find "${D}" -name '*.a' -delete || die
|
||||
|
||||
use python && python_optimize
|
||||
}
|
Binary file not shown.
@ -1,2 +1,3 @@
|
||||
DIST gradle-bin-8.4.zip 212870963 BLAKE2B da32c1010e85f6cded0c1b539b243db6d41fcd033266be3b03b389e6a2e317bea17ddbe65c597c7ea82628cc5bec913954ec998d018b68daa67d39f9a8958e7e SHA512 52d5f622b8ad0ab36ff84589733b47423b12f94211086a84eca9810690af29e396877f1155ee31279c4325e98cd1d55b32137d52efcf48eb1e258caeece08f22
|
||||
DIST gradle-bin-8.5.zip 218636663 BLAKE2B 0360f240f6183abec540f7755a966767a8dc175ca0ea047273e05c4b2219fd80cb92e62e9b961481d646157418cc91ea211eb83530cc6ec815ea790f6ad8380a SHA512 37a1c2989c46dad0f843565d05fd29010df10ac199d81f0ccddf56ffd490642039046d43a320ba04d1f87cbbc6d4cebf20ff66ce45ec005931cfc85aee2e0180
|
||||
DIST gradle-bin-8.7.zip 224435312 BLAKE2B 1926765aea8931b25a9f0b7b9a224dd70756cfd337eecb364c6d288486187dd6311f888c7e1c36b1fc81b454c3514d2807884343e7782f1be45fce03e611496b SHA512 fc18863654cbe8dd2357f388c0fc5f699ca2d40ffd32c283f00cfd5bda94e1711ab7b7a3b154e7da66c17468f00c3c72fe6b6603c4a29617b33b0f292cbac3de
|
||||
|
@ -0,0 +1,61 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
IUSE="doc"
|
||||
JAVA_PKG_IUSE="source"
|
||||
|
||||
inherit java-pkg-2
|
||||
|
||||
MY_PN=${PN%%-bin}
|
||||
MY_P="${MY_PN}-${PV/_rc/-rc-}"
|
||||
|
||||
DESCRIPTION="A project automation and build tool with a Groovy based DSL"
|
||||
SRC_URI="https://services.gradle.org/distributions/${MY_P}-all.zip -> ${P}.zip"
|
||||
HOMEPAGE="https://www.gradle.org/"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="${PV}"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
DEPEND="app-eselect/eselect-gradle"
|
||||
BDEPEND="app-arch/unzip"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
>=virtual/jre-1.8:*
|
||||
"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
src_compile() {
|
||||
:
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local gradle_dir="/usr/share/${PN}-${SLOT}"
|
||||
|
||||
if use source; then
|
||||
java-pkg_dosrc src
|
||||
fi
|
||||
|
||||
docinto html
|
||||
dodoc -r docs/release-notes.html
|
||||
if use doc; then
|
||||
dodoc -r docs/{dsl,userguide}
|
||||
java-pkg_dojavadoc docs/javadoc
|
||||
fi
|
||||
|
||||
insinto "${gradle_dir}"
|
||||
doins -r bin/ lib/
|
||||
fperms 755 "${gradle_dir}/bin/gradle"
|
||||
dosym "${gradle_dir}/bin/gradle" "/usr/bin/${PN}-${SLOT}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
eselect gradle update ifunset
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect gradle update ifunset
|
||||
}
|
@ -1,2 +1 @@
|
||||
DIST sbt-1.3.10.tgz 57609786 BLAKE2B 35285d141d8ad38a8e15cc3dd18947fa34dbe307ce1fbdd267a0902ff7f5757a0ab80d56eb241c8bea79c4a13c270efb65a552a039416a6f571b6cd214739819 SHA512 93832c0eec51422d6db63078c722578cbad21e4611ca868e835471fb988ad225e8abdea47c6dcf6e19117db9598bc75296100d9dc7ba0d605b70adc592efb925
|
||||
DIST sbt-1.8.0.tgz 29165245 BLAKE2B 7b2895e2f748cefd76bd4db12b9903448b77345bfa2c7be9fdf55e959a72828eb73d7b560885c8fb3c691571330fb6b94526820b611e3daf5a4e5f8f093656c9 SHA512 e53817cc7a15a37883ea3cef094e297a813388116e3f0c4bf29c70021c5df01f1e08bccfd20f20cfae007b88fd6c2915f82478ee44274bf5ddcea12df2de7f49
|
||||
|
@ -1,49 +0,0 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit java-pkg-2
|
||||
|
||||
DESCRIPTION="sbt, a build tool for Scala"
|
||||
HOMEPAGE="https://www.scala-sbt.org/"
|
||||
SRC_URI="https://github.com/sbt/sbt/releases/download/v${PV}/${PN/-bin}-${PV}.tgz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64"
|
||||
|
||||
RDEPEND="
|
||||
>=virtual/jre-1.7
|
||||
!dev-java/sbt"
|
||||
|
||||
src_unpack() {
|
||||
default
|
||||
mv "${WORKDIR}/sbt" "${S}" || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
java-pkg_init_paths_
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
:;
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local dest="${JAVA_PKG_SHAREPATH}"
|
||||
|
||||
rm -v bin/sbt.bat || die
|
||||
sed -i -e 's#bin/sbt-launch.jar#lib/sbt-launch.jar#g;' \
|
||||
bin/sbt || die
|
||||
|
||||
insinto "${dest}/lib"
|
||||
doins bin/*
|
||||
|
||||
insinto "${dest}"
|
||||
doins -r conf
|
||||
|
||||
fperms 0755 "${dest}/lib/sbt"
|
||||
dosym "${dest}/lib/sbt" /usr/bin/sbt
|
||||
}
|
Binary file not shown.
@ -0,0 +1,37 @@
|
||||
From 684f0d9e5946e92008404b3d5a131edc4f34f7da Mon Sep 17 00:00:00 2001
|
||||
From: Arnaud Le Blanc <arnaud.lb@gmail.com>
|
||||
Date: Thu, 4 Apr 2024 16:10:28 +0200
|
||||
Subject: [PATCH] Fix stream_cookie_seeker signature under musl
|
||||
|
||||
---
|
||||
main/streams/cast.c | 10 +++-------
|
||||
1 file changed, 3 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/main/streams/cast.c b/main/streams/cast.c
|
||||
index 3bad65fbac1f5..8d9f4a9d2d54b 100644
|
||||
--- a/main/streams/cast.c
|
||||
+++ b/main/streams/cast.c
|
||||
@@ -104,6 +104,9 @@ static ssize_t stream_cookie_writer(void *cookie, const char *buffer, size_t siz
|
||||
|
||||
# ifdef COOKIE_SEEKER_USES_OFF64_T
|
||||
static int stream_cookie_seeker(void *cookie, off64_t *position, int whence)
|
||||
+# else
|
||||
+static int stream_cookie_seeker(void *cookie, off_t *position, int whence)
|
||||
+# endif
|
||||
{
|
||||
|
||||
*position = php_stream_seek((php_stream *)cookie, (zend_off_t)*position, whence);
|
||||
@@ -113,13 +116,6 @@ static int stream_cookie_seeker(void *cookie, off64_t *position, int whence)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
-# else
|
||||
-static int stream_cookie_seeker(void *cookie, zend_off_t position, int whence)
|
||||
-{
|
||||
-
|
||||
- return php_stream_seek((php_stream *)cookie, position, whence);
|
||||
-}
|
||||
-# endif
|
||||
|
||||
static int stream_cookie_closer(void *cookie)
|
||||
{
|
@ -0,0 +1,508 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="8"
|
||||
WANT_LIBTOOL="none"
|
||||
|
||||
inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
|
||||
inherit prefix python-utils-r1 toolchain-funcs verify-sig
|
||||
|
||||
MY_PV=${PV/_rc/rc}
|
||||
MY_P="Python-${MY_PV%_p*}"
|
||||
PYVER=$(ver_cut 1-2)
|
||||
PATCHSET="python-gentoo-patches-${MY_PV}"
|
||||
|
||||
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
|
||||
HOMEPAGE="
|
||||
https://www.python.org/
|
||||
https://github.com/python/cpython/
|
||||
"
|
||||
SRC_URI="
|
||||
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
|
||||
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
|
||||
verify-sig? (
|
||||
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
|
||||
)
|
||||
"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
LICENSE="PSF-2"
|
||||
SLOT="${PYVER}"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||
IUSE="
|
||||
bluetooth build debug +ensurepip examples gdbm libedit
|
||||
+ncurses pgo +readline +sqlite +ssl test tk valgrind
|
||||
"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
# Do not add a dependency on dev-lang/python to this ebuild.
|
||||
# If you need to apply a patch which requires python for bootstrapping, please
|
||||
# run the bootstrap code on your dev box and include the results in the
|
||||
# patchset. See bug 447752.
|
||||
|
||||
RDEPEND="
|
||||
app-arch/bzip2:=
|
||||
app-arch/xz-utils:=
|
||||
>=dev-libs/expat-2.1:=
|
||||
dev-libs/libffi:=
|
||||
dev-python/gentoo-common
|
||||
>=sys-libs/zlib-1.1.3:=
|
||||
virtual/libcrypt:=
|
||||
virtual/libintl
|
||||
ensurepip? ( dev-python/ensurepip-wheels )
|
||||
gdbm? ( sys-libs/gdbm:=[berkdb] )
|
||||
kernel_linux? ( sys-apps/util-linux:= )
|
||||
ncurses? ( >=sys-libs/ncurses-5.2:= )
|
||||
readline? (
|
||||
!libedit? ( >=sys-libs/readline-4.1:= )
|
||||
libedit? ( dev-libs/libedit:= )
|
||||
)
|
||||
sqlite? ( >=dev-db/sqlite-3.3.8:3= )
|
||||
ssl? ( >=dev-libs/openssl-1.1.1:= )
|
||||
tk? (
|
||||
>=dev-lang/tcl-8.0:=
|
||||
>=dev-lang/tk-8.0:=
|
||||
dev-tcltk/blt:=
|
||||
dev-tcltk/tix
|
||||
)
|
||||
"
|
||||
# bluetooth requires headers from bluez
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
bluetooth? ( net-wireless/bluez )
|
||||
valgrind? ( dev-debug/valgrind )
|
||||
test? ( app-arch/xz-utils )
|
||||
"
|
||||
# autoconf-archive needed to eautoreconf
|
||||
BDEPEND="
|
||||
dev-build/autoconf-archive
|
||||
app-alternatives/awk
|
||||
virtual/pkgconfig
|
||||
verify-sig? ( sec-keys/openpgp-keys-python )
|
||||
"
|
||||
RDEPEND+="
|
||||
!build? ( app-misc/mime-types )
|
||||
"
|
||||
if [[ ${PV} != *_alpha* ]]; then
|
||||
RDEPEND+="
|
||||
dev-lang/python-exec[python_targets_python${PYVER/./_}(-)]
|
||||
"
|
||||
fi
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
|
||||
|
||||
# large file tests involve a 2.5G file being copied (duplicated)
|
||||
CHECKREQS_DISK_BUILD=5500M
|
||||
|
||||
QA_PKGCONFIG_VERSION=${PYVER}
|
||||
# false positives -- functions specific to *BSD
|
||||
QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags )
|
||||
|
||||
pkg_pretend() {
|
||||
use test && check-reqs_pkg_pretend
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
use test && check-reqs_pkg_setup
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if use verify-sig; then
|
||||
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
|
||||
fi
|
||||
default
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Ensure that internal copies of expat and libffi are not used.
|
||||
rm -r Modules/expat || die
|
||||
rm -r Modules/_ctypes/libffi* || die
|
||||
|
||||
local PATCHES=(
|
||||
"${WORKDIR}/${PATCHSET}"
|
||||
)
|
||||
|
||||
default
|
||||
|
||||
# https://bugs.gentoo.org/850151
|
||||
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" setup.py || die
|
||||
|
||||
# force the correct number of jobs
|
||||
# https://bugs.gentoo.org/737660
|
||||
local jobs=$(makeopts_jobs)
|
||||
sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
|
||||
sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
build_cbuild_python() {
|
||||
# Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
|
||||
local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi)
|
||||
|
||||
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
|
||||
# propagated to sysconfig for built extensions
|
||||
#
|
||||
# -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway)
|
||||
local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto"
|
||||
local -x LDFLAGS_NODIST=${BUILD_LDFLAGS}
|
||||
local -x CFLAGS= LDFLAGS=
|
||||
local -x BUILD_CFLAGS="${CFLAGS_NODIST}"
|
||||
local -x BUILD_LDFLAGS=${LDFLAGS_NODIST}
|
||||
|
||||
# We need to build our own Python on CBUILD first, and feed it in.
|
||||
# bug #847910 and bug #864911.
|
||||
local myeconfargs_cbuild=(
|
||||
"${myeconfargs[@]}"
|
||||
|
||||
--prefix="${BROOT}"/usr
|
||||
--libdir="${cbuild_libdir:2}"
|
||||
|
||||
# Avoid needing to load the right libpython.so.
|
||||
--disable-shared
|
||||
|
||||
# As minimal as possible for the mini CBUILD Python
|
||||
# we build just for cross.
|
||||
--without-lto
|
||||
--disable-optimizations
|
||||
)
|
||||
|
||||
mkdir "${WORKDIR}"/${P}-${CBUILD} || die
|
||||
pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
|
||||
# We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating
|
||||
# libdir correctly for cross.
|
||||
PYTHON_DISABLE_MODULES+=" _ctypes _crypt" \
|
||||
ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
|
||||
|
||||
# Avoid as many dependencies as possible for the cross build.
|
||||
cat >> Makefile <<-EOF || die
|
||||
MODULE_NIS=disabled
|
||||
MODULE__DBM=disabled
|
||||
MODULE__GDBM=disabled
|
||||
MODULE__DBM=disabled
|
||||
MODULE__SQLITE3=disabled
|
||||
MODULE__HASHLIB=disabled
|
||||
MODULE__SSL=disabled
|
||||
MODULE__CURSES=disabled
|
||||
MODULE__CURSES_PANEL=disabled
|
||||
MODULE_READLINE=disabled
|
||||
MODULE__TKINTER=disabled
|
||||
MODULE_PYEXPAT=disabled
|
||||
MODULE_ZLIB=disabled
|
||||
EOF
|
||||
|
||||
# Unfortunately, we do have to build this immediately, and
|
||||
# not in src_compile, because CHOST configure for Python
|
||||
# will check the existence of the Python it was pointed to
|
||||
# immediately.
|
||||
PYTHON_DISABLE_MODULES+=" _ctypes _crypt" emake
|
||||
popd &> /dev/null || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# disable automagic bluetooth headers detection
|
||||
if ! use bluetooth; then
|
||||
local -x ac_cv_header_bluetooth_bluetooth_h=no
|
||||
fi
|
||||
local disable
|
||||
use gdbm || disable+=" gdbm"
|
||||
use ncurses || disable+=" _curses _curses_panel"
|
||||
use readline || disable+=" readline"
|
||||
use sqlite || disable+=" _sqlite3"
|
||||
use ssl || export PYTHON_DISABLE_SSL="1"
|
||||
use tk || disable+=" _tkinter"
|
||||
export PYTHON_DISABLE_MODULES="${disable}"
|
||||
|
||||
if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
|
||||
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
|
||||
fi
|
||||
|
||||
append-flags -fwrapv
|
||||
filter-flags -malign-double
|
||||
|
||||
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
|
||||
# PKG_CONFIG needed for cross.
|
||||
tc-export CXX PKG_CONFIG
|
||||
|
||||
local dbmliborder=
|
||||
if use gdbm; then
|
||||
dbmliborder+="${dbmliborder:+:}gdbm"
|
||||
fi
|
||||
|
||||
if use pgo; then
|
||||
local profile_task_flags=(
|
||||
-m test
|
||||
"-j$(makeopts_jobs)"
|
||||
--pgo-extended
|
||||
-u-network
|
||||
|
||||
# We use a timeout because of how often we've had hang issues
|
||||
# here. It also matches the default upstream PROFILE_TASK.
|
||||
--timeout 1200
|
||||
|
||||
-x test_gdb
|
||||
-x test_dtrace
|
||||
|
||||
# All of these seem to occasionally hang for PGO inconsistently
|
||||
# They'll even hang here but be fine in src_test sometimes.
|
||||
# bug #828535 (and related: bug #788022)
|
||||
-x test_asyncio
|
||||
-x test_concurrent_futures
|
||||
-x test_httpservers
|
||||
-x test_logging
|
||||
-x test_multiprocessing_fork
|
||||
-x test_socket
|
||||
-x test_xmlrpc
|
||||
|
||||
# Hangs (actually runs indefinitely executing itself w/ many cpython builds)
|
||||
# bug #900429
|
||||
-x test_tools
|
||||
)
|
||||
|
||||
if has_version "app-arch/rpm" ; then
|
||||
# Avoid sandbox failure (attempts to write to /var/lib/rpm)
|
||||
profile_task_flags+=(
|
||||
-x test_distutils
|
||||
)
|
||||
fi
|
||||
local -x PROFILE_TASK="${profile_task_flags[*]}"
|
||||
fi
|
||||
|
||||
local myeconfargs=(
|
||||
# glibc-2.30 removes it; since we can't cleanly force-rebuild
|
||||
# Python on glibc upgrade, remove it proactively to give
|
||||
# a chance for users rebuilding python before glibc
|
||||
ac_cv_header_stropts_h=no
|
||||
|
||||
--enable-shared
|
||||
--without-static-libpython
|
||||
--enable-ipv6
|
||||
--infodir='${prefix}/share/info'
|
||||
--mandir='${prefix}/share/man'
|
||||
--with-computed-gotos
|
||||
--with-dbmliborder="${dbmliborder}"
|
||||
--with-libc=
|
||||
--enable-loadable-sqlite-extensions
|
||||
--without-ensurepip
|
||||
--without-lto
|
||||
--with-system-expat
|
||||
--with-system-ffi
|
||||
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
|
||||
|
||||
$(use_with debug assertions)
|
||||
$(use_enable pgo optimizations)
|
||||
$(use_with readline readline "$(usex libedit editline readline)")
|
||||
$(use_with valgrind)
|
||||
)
|
||||
|
||||
# disable implicit optimization/debugging flags
|
||||
local -x OPT=
|
||||
|
||||
# https://bugs.gentoo.org/700012
|
||||
if tc-is-lto; then
|
||||
append-cflags $(test-flags-CC -ffat-lto-objects)
|
||||
myeconfargs+=(
|
||||
--with-lto
|
||||
)
|
||||
fi
|
||||
|
||||
if tc-is-cross-compiler ; then
|
||||
build_cbuild_python
|
||||
# Point the imminent CHOST build to the Python we just
|
||||
# built for CBUILD.
|
||||
export PATH="${WORKDIR}/${P}-${CBUILD}:${PATH}"
|
||||
fi
|
||||
|
||||
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
|
||||
# propagated to sysconfig for built extensions
|
||||
local -x CFLAGS_NODIST=${CFLAGS}
|
||||
local -x LDFLAGS_NODIST=${LDFLAGS}
|
||||
local -x CFLAGS= LDFLAGS=
|
||||
|
||||
# Fix implicit declarations on cross and prefix builds. Bug #674070.
|
||||
if use ncurses; then
|
||||
append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
|
||||
fi
|
||||
|
||||
hprefixify setup.py
|
||||
econf "${myeconfargs[@]}"
|
||||
|
||||
if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
|
||||
eerror "configure has detected that the sem_open function is broken."
|
||||
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
|
||||
die "Broken sem_open function (bug 496328)"
|
||||
fi
|
||||
|
||||
# install epython.py as part of stdlib
|
||||
echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Ensure sed works as expected
|
||||
# https://bugs.gentoo.org/594768
|
||||
local -x LC_ALL=C
|
||||
# Prevent using distutils bundled by setuptools.
|
||||
# https://bugs.gentoo.org/823728
|
||||
export SETUPTOOLS_USE_DISTUTILS=stdlib
|
||||
|
||||
# Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
|
||||
# end up writing bytecode & violating sandbox.
|
||||
# bug #831897
|
||||
local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
|
||||
|
||||
if use pgo ; then
|
||||
# bug 660358
|
||||
local -x COLUMNS=80
|
||||
local -x PYTHONDONTWRITEBYTECODE=
|
||||
|
||||
addpredict "/usr/lib/python${PYVER}/site-packages"
|
||||
fi
|
||||
|
||||
# also need to clear the flags explicitly here or they end up
|
||||
# in _sysconfigdata*
|
||||
emake CPPFLAGS= CFLAGS= LDFLAGS=
|
||||
|
||||
# Restore saved value from above.
|
||||
local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
|
||||
|
||||
# Work around bug 329499. See also bug 413751 and 457194.
|
||||
if has_version dev-libs/libffi[pax-kernel]; then
|
||||
pax-mark E python
|
||||
else
|
||||
pax-mark m python
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# Tests will not work when cross compiling.
|
||||
if tc-is-cross-compiler; then
|
||||
elog "Disabling tests due to crosscompiling."
|
||||
return
|
||||
fi
|
||||
|
||||
local test_opts=(
|
||||
-u-network
|
||||
-j "$(makeopts_jobs)"
|
||||
|
||||
# fails
|
||||
-x test_concurrent_futures
|
||||
-x test_gdb
|
||||
)
|
||||
|
||||
if use sparc ; then
|
||||
# bug #788022
|
||||
test_opts+=(
|
||||
-x test_multiprocessing_fork
|
||||
-x test_multiprocessing_forkserver
|
||||
)
|
||||
fi
|
||||
|
||||
# workaround docutils breaking tests
|
||||
cat > Lib/docutils.py <<-EOF || die
|
||||
raise ImportError("Thou shalt not import!")
|
||||
EOF
|
||||
|
||||
# bug 660358
|
||||
local -x COLUMNS=80
|
||||
local -x PYTHONDONTWRITEBYTECODE=
|
||||
# workaround https://bugs.gentoo.org/775416
|
||||
addwrite "/usr/lib/python${PYVER}/site-packages"
|
||||
|
||||
nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
|
||||
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
|
||||
local ret=${?}
|
||||
|
||||
rm Lib/docutils.py || die
|
||||
|
||||
[[ ${ret} -eq 0 ]] || die "emake test failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local libdir=${ED}/usr/lib/python${PYVER}
|
||||
|
||||
emake DESTDIR="${D}" altinstall
|
||||
|
||||
# Fix collisions between different slots of Python.
|
||||
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
|
||||
|
||||
# Cheap hack to get version with ABIFLAGS
|
||||
local abiver=$(cd "${ED}/usr/include"; echo python*)
|
||||
if [[ ${abiver} != python${PYVER} ]]; then
|
||||
# Replace python3.X with a symlink to python3.Xm
|
||||
rm "${ED}/usr/bin/python${PYVER}" || die
|
||||
dosym "${abiver}" "/usr/bin/python${PYVER}"
|
||||
# Create python3.X-config symlink
|
||||
dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
|
||||
# Create python-3.5m.pc symlink
|
||||
dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
|
||||
fi
|
||||
|
||||
# python seems to get rebuilt in src_install (bug 569908)
|
||||
# Work around it for now.
|
||||
if has_version dev-libs/libffi[pax-kernel]; then
|
||||
pax-mark E "${ED}/usr/bin/${abiver}"
|
||||
else
|
||||
pax-mark m "${ED}/usr/bin/${abiver}"
|
||||
fi
|
||||
|
||||
rm -r "${libdir}"/ensurepip/_bundled || die
|
||||
if ! use ensurepip; then
|
||||
rm -r "${libdir}"/ensurepip || die
|
||||
fi
|
||||
if ! use sqlite; then
|
||||
rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
|
||||
fi
|
||||
if ! use tk; then
|
||||
rm -r "${ED}/usr/bin/idle${PYVER}" || die
|
||||
rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
|
||||
fi
|
||||
|
||||
ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die
|
||||
|
||||
dodoc Misc/{ACKS,HISTORY,NEWS}
|
||||
|
||||
if use examples; then
|
||||
docinto examples
|
||||
find Tools -name __pycache__ -exec rm -fr {} + || die
|
||||
dodoc -r Tools
|
||||
fi
|
||||
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
|
||||
local libname=$(
|
||||
printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' |
|
||||
emake --no-print-directory -s -f - 2>/dev/null
|
||||
)
|
||||
newins Tools/gdb/libpython.py "${libname}"-gdb.py
|
||||
|
||||
newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
|
||||
newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
|
||||
sed \
|
||||
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
|
||||
-e "s:@PYDOC@:pydoc${PYVER}:" \
|
||||
-i "${ED}/etc/conf.d/pydoc-${PYVER}" \
|
||||
"${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
|
||||
|
||||
# python-exec wrapping support
|
||||
local pymajor=${PYVER%.*}
|
||||
local EPYTHON=python${PYVER}
|
||||
local scriptdir=${D}$(python_get_scriptdir)
|
||||
mkdir -p "${scriptdir}" || die
|
||||
# python and pythonX
|
||||
ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die
|
||||
ln -s "python${pymajor}" "${scriptdir}/python" || die
|
||||
# python-config and pythonX-config
|
||||
# note: we need to create a wrapper rather than symlinking it due
|
||||
# to some random dirname(argv[0]) magic performed by python-config
|
||||
cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
|
||||
#!/bin/sh
|
||||
exec "${abiver}-config" "\${@}"
|
||||
EOF
|
||||
chmod +x "${scriptdir}/python${pymajor}-config" || die
|
||||
ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die
|
||||
# 2to3, pydoc
|
||||
ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die
|
||||
ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die
|
||||
# idle
|
||||
if use tk; then
|
||||
ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die
|
||||
fi
|
||||
}
|
@ -0,0 +1,537 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="8"
|
||||
WANT_LIBTOOL="none"
|
||||
|
||||
inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
|
||||
inherit python-utils-r1 toolchain-funcs verify-sig
|
||||
|
||||
MY_PV=${PV/_rc/rc}
|
||||
MY_P="Python-${MY_PV%_p*}"
|
||||
PYVER=$(ver_cut 1-2)
|
||||
PATCHSET="python-gentoo-patches-${MY_PV}"
|
||||
|
||||
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
|
||||
HOMEPAGE="
|
||||
https://www.python.org/
|
||||
https://github.com/python/cpython/
|
||||
"
|
||||
SRC_URI="
|
||||
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
|
||||
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
|
||||
verify-sig? (
|
||||
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
|
||||
)
|
||||
"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
LICENSE="PSF-2"
|
||||
SLOT="${PYVER}"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||
IUSE="
|
||||
bluetooth build debug +ensurepip examples gdbm libedit
|
||||
+ncurses pgo +readline +sqlite +ssl test tk valgrind
|
||||
"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
# Do not add a dependency on dev-lang/python to this ebuild.
|
||||
# If you need to apply a patch which requires python for bootstrapping, please
|
||||
# run the bootstrap code on your dev box and include the results in the
|
||||
# patchset. See bug 447752.
|
||||
|
||||
RDEPEND="
|
||||
app-arch/bzip2:=
|
||||
app-arch/xz-utils:=
|
||||
app-crypt/libb2
|
||||
>=dev-libs/expat-2.1:=
|
||||
dev-libs/libffi:=
|
||||
dev-python/gentoo-common
|
||||
>=sys-libs/zlib-1.1.3:=
|
||||
virtual/libcrypt:=
|
||||
virtual/libintl
|
||||
ensurepip? ( dev-python/ensurepip-pip )
|
||||
gdbm? ( sys-libs/gdbm:=[berkdb] )
|
||||
kernel_linux? ( sys-apps/util-linux:= )
|
||||
ncurses? ( >=sys-libs/ncurses-5.2:= )
|
||||
readline? (
|
||||
!libedit? ( >=sys-libs/readline-4.1:= )
|
||||
libedit? ( dev-libs/libedit:= )
|
||||
)
|
||||
sqlite? ( >=dev-db/sqlite-3.3.8:3= )
|
||||
ssl? ( >=dev-libs/openssl-1.1.1:= )
|
||||
tk? (
|
||||
>=dev-lang/tcl-8.0:=
|
||||
>=dev-lang/tk-8.0:=
|
||||
dev-tcltk/blt:=
|
||||
dev-tcltk/tix
|
||||
)
|
||||
"
|
||||
# bluetooth requires headers from bluez
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
bluetooth? ( net-wireless/bluez )
|
||||
test? (
|
||||
app-arch/xz-utils
|
||||
dev-python/ensurepip-pip
|
||||
dev-python/ensurepip-setuptools
|
||||
dev-python/ensurepip-wheel
|
||||
)
|
||||
valgrind? ( dev-debug/valgrind )
|
||||
"
|
||||
# autoconf-archive needed to eautoreconf
|
||||
BDEPEND="
|
||||
dev-build/autoconf-archive
|
||||
app-alternatives/awk
|
||||
virtual/pkgconfig
|
||||
verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 )
|
||||
"
|
||||
RDEPEND+="
|
||||
!build? ( app-misc/mime-types )
|
||||
"
|
||||
if [[ ${PV} != *_alpha* ]]; then
|
||||
RDEPEND+="
|
||||
dev-lang/python-exec[python_targets_python${PYVER/./_}(-)]
|
||||
"
|
||||
fi
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
|
||||
|
||||
# large file tests involve a 2.5G file being copied (duplicated)
|
||||
CHECKREQS_DISK_BUILD=5500M
|
||||
|
||||
QA_PKGCONFIG_VERSION=${PYVER}
|
||||
# false positives -- functions specific to *BSD
|
||||
QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags )
|
||||
|
||||
pkg_pretend() {
|
||||
use test && check-reqs_pkg_pretend
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
use test && check-reqs_pkg_setup
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if use verify-sig; then
|
||||
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
|
||||
fi
|
||||
default
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Ensure that internal copies of expat and libffi are not used.
|
||||
# TODO: Makefile has annoying deps on expat headers
|
||||
#rm -r Modules/expat || die
|
||||
|
||||
local PATCHES=(
|
||||
"${WORKDIR}/${PATCHSET}"
|
||||
)
|
||||
|
||||
default
|
||||
|
||||
# force the correct number of jobs
|
||||
# https://bugs.gentoo.org/737660
|
||||
sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
build_cbuild_python() {
|
||||
# Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
|
||||
local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi)
|
||||
|
||||
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
|
||||
# propagated to sysconfig for built extensions
|
||||
#
|
||||
# -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway)
|
||||
local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto"
|
||||
local -x LDFLAGS_NODIST=${BUILD_LDFLAGS}
|
||||
local -x CFLAGS= LDFLAGS=
|
||||
local -x BUILD_CFLAGS="${CFLAGS_NODIST}"
|
||||
local -x BUILD_LDFLAGS=${LDFLAGS_NODIST}
|
||||
|
||||
# We need to build our own Python on CBUILD first, and feed it in.
|
||||
# bug #847910
|
||||
local myeconfargs_cbuild=(
|
||||
"${myeconfargs[@]}"
|
||||
|
||||
--prefix="${BROOT}"/usr
|
||||
--libdir="${cbuild_libdir:2}"
|
||||
|
||||
# Avoid needing to load the right libpython.so.
|
||||
--disable-shared
|
||||
|
||||
# As minimal as possible for the mini CBUILD Python
|
||||
# we build just for cross to satisfy --with-build-python.
|
||||
--without-lto
|
||||
--without-readline
|
||||
--disable-optimizations
|
||||
)
|
||||
|
||||
mkdir "${WORKDIR}"/${P}-${CBUILD} || die
|
||||
pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
|
||||
|
||||
# Avoid as many dependencies as possible for the cross build.
|
||||
mkdir Modules || die
|
||||
cat > Modules/Setup.local <<-EOF || die
|
||||
*disabled*
|
||||
nis
|
||||
_dbm _gdbm
|
||||
_sqlite3
|
||||
_hashlib _ssl
|
||||
_curses _curses_panel
|
||||
readline
|
||||
_tkinter
|
||||
pyexpat
|
||||
zlib
|
||||
# We disabled these for CBUILD because Python's setup.py can't handle locating
|
||||
# libdir correctly for cross. This should be rechecked for the pure Makefile approach,
|
||||
# and uncommented if needed.
|
||||
#_ctypes _crypt
|
||||
EOF
|
||||
|
||||
ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
|
||||
|
||||
# Unfortunately, we do have to build this immediately, and
|
||||
# not in src_compile, because CHOST configure for Python
|
||||
# will check the existence of the --with-build-python value
|
||||
# immediately.
|
||||
emake
|
||||
popd &> /dev/null || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# disable automagic bluetooth headers detection
|
||||
if ! use bluetooth; then
|
||||
local -x ac_cv_header_bluetooth_bluetooth_h=no
|
||||
fi
|
||||
|
||||
append-flags -fwrapv
|
||||
filter-flags -malign-double
|
||||
|
||||
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
|
||||
# PKG_CONFIG needed for cross.
|
||||
tc-export CXX PKG_CONFIG
|
||||
|
||||
local dbmliborder=
|
||||
if use gdbm; then
|
||||
dbmliborder+="${dbmliborder:+:}gdbm"
|
||||
fi
|
||||
|
||||
if use pgo; then
|
||||
local profile_task_flags=(
|
||||
-m test
|
||||
"-j$(makeopts_jobs)"
|
||||
--pgo-extended
|
||||
-u-network
|
||||
|
||||
# We use a timeout because of how often we've had hang issues
|
||||
# here. It also matches the default upstream PROFILE_TASK.
|
||||
--timeout 1200
|
||||
|
||||
-x test_gdb
|
||||
-x test_dtrace
|
||||
|
||||
# All of these seem to occasionally hang for PGO inconsistently
|
||||
# They'll even hang here but be fine in src_test sometimes.
|
||||
# bug #828535 (and related: bug #788022)
|
||||
-x test_asyncio
|
||||
-x test_concurrent_futures
|
||||
-x test_httpservers
|
||||
-x test_logging
|
||||
-x test_multiprocessing_fork
|
||||
-x test_socket
|
||||
-x test_xmlrpc
|
||||
|
||||
# Hangs (actually runs indefinitely executing itself w/ many cpython builds)
|
||||
# bug #900429
|
||||
-x test_tools
|
||||
)
|
||||
|
||||
if has_version "app-arch/rpm" ; then
|
||||
# Avoid sandbox failure (attempts to write to /var/lib/rpm)
|
||||
profile_task_flags+=(
|
||||
-x test_distutils
|
||||
)
|
||||
fi
|
||||
local -x PROFILE_TASK="${profile_task_flags[*]}"
|
||||
fi
|
||||
|
||||
local myeconfargs=(
|
||||
# glibc-2.30 removes it; since we can't cleanly force-rebuild
|
||||
# Python on glibc upgrade, remove it proactively to give
|
||||
# a chance for users rebuilding python before glibc
|
||||
ac_cv_header_stropts_h=no
|
||||
|
||||
--enable-shared
|
||||
--without-static-libpython
|
||||
--enable-ipv6
|
||||
--infodir='${prefix}/share/info'
|
||||
--mandir='${prefix}/share/man'
|
||||
--with-computed-gotos
|
||||
--with-dbmliborder="${dbmliborder}"
|
||||
--with-libc=
|
||||
--enable-loadable-sqlite-extensions
|
||||
--without-ensurepip
|
||||
--without-lto
|
||||
--with-system-expat
|
||||
--with-platlibdir=lib
|
||||
--with-pkg-config=yes
|
||||
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
|
||||
|
||||
$(use_with debug assertions)
|
||||
$(use_enable pgo optimizations)
|
||||
$(use_with readline readline "$(usex libedit editline readline)")
|
||||
$(use_with valgrind)
|
||||
)
|
||||
|
||||
# https://bugs.gentoo.org/700012
|
||||
if tc-is-lto; then
|
||||
append-cflags $(test-flags-CC -ffat-lto-objects)
|
||||
myeconfargs+=(
|
||||
--with-lto
|
||||
)
|
||||
fi
|
||||
|
||||
# Force-disable modules we don't want built.
|
||||
# See Modules/Setup for docs on how this works. Setup.local contains our local deviations.
|
||||
cat > Modules/Setup.local <<-EOF || die
|
||||
*disabled*
|
||||
nis
|
||||
$(usev !gdbm '_gdbm _dbm')
|
||||
$(usev !sqlite '_sqlite3')
|
||||
$(usev !ssl '_hashlib _ssl')
|
||||
$(usev !ncurses '_curses _curses_panel')
|
||||
$(usev !readline 'readline')
|
||||
$(usev !tk '_tkinter')
|
||||
EOF
|
||||
|
||||
# disable implicit optimization/debugging flags
|
||||
local -x OPT=
|
||||
|
||||
if tc-is-cross-compiler ; then
|
||||
build_cbuild_python
|
||||
myeconfargs+=(
|
||||
# Point the imminent CHOST build to the Python we just
|
||||
# built for CBUILD.
|
||||
--with-build-python="${WORKDIR}"/${P}-${CBUILD}/python
|
||||
)
|
||||
fi
|
||||
|
||||
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
|
||||
# propagated to sysconfig for built extensions
|
||||
local -x CFLAGS_NODIST=${CFLAGS}
|
||||
local -x LDFLAGS_NODIST=${LDFLAGS}
|
||||
local -x CFLAGS= LDFLAGS=
|
||||
|
||||
# Fix implicit declarations on cross and prefix builds. Bug #674070.
|
||||
if use ncurses; then
|
||||
append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
|
||||
fi
|
||||
|
||||
econf "${myeconfargs[@]}"
|
||||
|
||||
if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
|
||||
eerror "configure has detected that the sem_open function is broken."
|
||||
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
|
||||
die "Broken sem_open function (bug 496328)"
|
||||
fi
|
||||
|
||||
# install epython.py as part of stdlib
|
||||
echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Ensure sed works as expected
|
||||
# https://bugs.gentoo.org/594768
|
||||
local -x LC_ALL=C
|
||||
export PYTHONSTRICTEXTENSIONBUILD=1
|
||||
|
||||
# Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
|
||||
# end up writing bytecode & violating sandbox.
|
||||
# bug #831897
|
||||
local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
|
||||
|
||||
if use pgo ; then
|
||||
# bug 660358
|
||||
local -x COLUMNS=80
|
||||
local -x PYTHONDONTWRITEBYTECODE=
|
||||
|
||||
addpredict "/usr/lib/python${PYVER}/site-packages"
|
||||
fi
|
||||
|
||||
# also need to clear the flags explicitly here or they end up
|
||||
# in _sysconfigdata*
|
||||
emake CPPFLAGS= CFLAGS= LDFLAGS=
|
||||
|
||||
# Restore saved value from above.
|
||||
local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
|
||||
|
||||
# Work around bug 329499. See also bug 413751 and 457194.
|
||||
if has_version dev-libs/libffi[pax-kernel]; then
|
||||
pax-mark E python
|
||||
else
|
||||
pax-mark m python
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# Tests will not work when cross compiling.
|
||||
if tc-is-cross-compiler; then
|
||||
elog "Disabling tests due to crosscompiling."
|
||||
return
|
||||
fi
|
||||
|
||||
# this just happens to skip test_support.test_freeze that is broken
|
||||
# without bundled expat
|
||||
# TODO: get a proper skip for it upstream
|
||||
local -x LOGNAME=buildbot
|
||||
|
||||
local test_opts=(
|
||||
-u-network
|
||||
-j "$(makeopts_jobs)"
|
||||
|
||||
# fails
|
||||
-x test_concurrent_futures
|
||||
-x test_gdb
|
||||
)
|
||||
|
||||
if use sparc ; then
|
||||
# bug #788022
|
||||
test_opts+=(
|
||||
-x test_multiprocessing_fork
|
||||
-x test_multiprocessing_forkserver
|
||||
)
|
||||
fi
|
||||
|
||||
# workaround docutils breaking tests
|
||||
cat > Lib/docutils.py <<-EOF || die
|
||||
raise ImportError("Thou shalt not import!")
|
||||
EOF
|
||||
|
||||
# bug 660358
|
||||
local -x COLUMNS=80
|
||||
local -x PYTHONDONTWRITEBYTECODE=
|
||||
# workaround https://bugs.gentoo.org/775416
|
||||
addwrite "/usr/lib/python${PYVER}/site-packages"
|
||||
|
||||
nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
|
||||
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
|
||||
local ret=${?}
|
||||
|
||||
rm Lib/docutils.py || die
|
||||
|
||||
[[ ${ret} -eq 0 ]] || die "emake test failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local libdir=${ED}/usr/lib/python${PYVER}
|
||||
|
||||
# the Makefile rules are broken
|
||||
# https://github.com/python/cpython/issues/100221
|
||||
mkdir -p "${libdir}"/lib-dynload || die
|
||||
|
||||
# -j1 hack for now for bug #843458
|
||||
emake -j1 DESTDIR="${D}" altinstall
|
||||
|
||||
# Fix collisions between different slots of Python.
|
||||
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
|
||||
|
||||
# Cheap hack to get version with ABIFLAGS
|
||||
local abiver=$(cd "${ED}/usr/include"; echo python*)
|
||||
if [[ ${abiver} != python${PYVER} ]]; then
|
||||
# Replace python3.X with a symlink to python3.Xm
|
||||
rm "${ED}/usr/bin/python${PYVER}" || die
|
||||
dosym "${abiver}" "/usr/bin/python${PYVER}"
|
||||
# Create python3.X-config symlink
|
||||
dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
|
||||
# Create python-3.5m.pc symlink
|
||||
dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
|
||||
fi
|
||||
|
||||
# python seems to get rebuilt in src_install (bug 569908)
|
||||
# Work around it for now.
|
||||
if has_version dev-libs/libffi[pax-kernel]; then
|
||||
pax-mark E "${ED}/usr/bin/${abiver}"
|
||||
else
|
||||
pax-mark m "${ED}/usr/bin/${abiver}"
|
||||
fi
|
||||
|
||||
rm -r "${libdir}"/ensurepip/_bundled || die
|
||||
if ! use ensurepip; then
|
||||
rm -r "${libdir}"/ensurepip || die
|
||||
fi
|
||||
if ! use sqlite; then
|
||||
rm -r "${libdir}/"sqlite3 || die
|
||||
fi
|
||||
if ! use tk; then
|
||||
rm -r "${ED}/usr/bin/idle${PYVER}" || die
|
||||
rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
|
||||
fi
|
||||
|
||||
ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die
|
||||
|
||||
dodoc Misc/{ACKS,HISTORY,NEWS}
|
||||
|
||||
if use examples; then
|
||||
docinto examples
|
||||
find Tools -name __pycache__ -exec rm -fr {} + || die
|
||||
dodoc -r Tools
|
||||
fi
|
||||
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
|
||||
local libname=$(
|
||||
printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' |
|
||||
emake --no-print-directory -s -f - 2>/dev/null
|
||||
)
|
||||
newins Tools/gdb/libpython.py "${libname}"-gdb.py
|
||||
|
||||
newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
|
||||
newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
|
||||
sed \
|
||||
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
|
||||
-e "s:@PYDOC@:pydoc${PYVER}:" \
|
||||
-i "${ED}/etc/conf.d/pydoc-${PYVER}" \
|
||||
"${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
|
||||
|
||||
# python-exec wrapping support
|
||||
local pymajor=${PYVER%.*}
|
||||
local EPYTHON=python${PYVER}
|
||||
local scriptdir=${D}$(python_get_scriptdir)
|
||||
mkdir -p "${scriptdir}" || die
|
||||
# python and pythonX
|
||||
ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die
|
||||
ln -s "python${pymajor}" "${scriptdir}/python" || die
|
||||
# python-config and pythonX-config
|
||||
# note: we need to create a wrapper rather than symlinking it due
|
||||
# to some random dirname(argv[0]) magic performed by python-config
|
||||
cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
|
||||
#!/bin/sh
|
||||
exec "${abiver}-config" "\${@}"
|
||||
EOF
|
||||
chmod +x "${scriptdir}/python${pymajor}-config" || die
|
||||
ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die
|
||||
# 2to3, pydoc
|
||||
ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die
|
||||
ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die
|
||||
# idle
|
||||
if use tk; then
|
||||
ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
local v
|
||||
for v in ${REPLACING_VERSIONS}; do
|
||||
if ver_test "${v}" -lt 3.11.0_beta4-r2; then
|
||||
ewarn "Python 3.11.0b4 has changed its module ABI. The .pyc files"
|
||||
ewarn "installed previously are no longer valid and will be regenerated"
|
||||
ewarn "(or ignored) on the next import. This may cause sandbox failures"
|
||||
ewarn "when installing some packages and checksum mismatches when removing"
|
||||
ewarn "old versions. To actively prevent this, rebuild all packages"
|
||||
ewarn "installing Python 3.11 modules, e.g. using:"
|
||||
ewarn
|
||||
ewarn " emerge -1v /usr/lib/python3.11/site-packages"
|
||||
fi
|
||||
done
|
||||
}
|
@ -0,0 +1,550 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="8"
|
||||
|
||||
LLVM_COMPAT=( 16 )
|
||||
LLVM_OPTIONAL=1
|
||||
WANT_LIBTOOL="none"
|
||||
|
||||
inherit autotools check-reqs flag-o-matic llvm-r1 multiprocessing
|
||||
inherit pax-utils python-utils-r1 toolchain-funcs verify-sig
|
||||
|
||||
MY_PV=${PV/_alpha/a}
|
||||
MY_P="Python-${MY_PV%_p*}"
|
||||
PYVER=$(ver_cut 1-2)
|
||||
PATCHSET="python-gentoo-patches-${MY_PV}"
|
||||
|
||||
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
|
||||
HOMEPAGE="
|
||||
https://www.python.org/
|
||||
https://github.com/python/cpython/
|
||||
"
|
||||
SRC_URI="
|
||||
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
|
||||
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
|
||||
verify-sig? (
|
||||
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
|
||||
)
|
||||
"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
LICENSE="PSF-2"
|
||||
SLOT="${PYVER}"
|
||||
IUSE="
|
||||
bluetooth build debug +ensurepip examples gdbm jit libedit
|
||||
+ncurses pgo +readline +sqlite +ssl test tk valgrind
|
||||
"
|
||||
REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
# Do not add a dependency on dev-lang/python to this ebuild.
|
||||
# If you need to apply a patch which requires python for bootstrapping, please
|
||||
# run the bootstrap code on your dev box and include the results in the
|
||||
# patchset. See bug 447752.
|
||||
|
||||
RDEPEND="
|
||||
app-arch/bzip2:=
|
||||
app-arch/xz-utils:=
|
||||
app-crypt/libb2
|
||||
>=dev-libs/expat-2.1:=
|
||||
dev-libs/libffi:=
|
||||
dev-python/gentoo-common
|
||||
>=sys-libs/zlib-1.1.3:=
|
||||
virtual/libcrypt:=
|
||||
virtual/libintl
|
||||
ensurepip? ( dev-python/ensurepip-pip )
|
||||
gdbm? ( sys-libs/gdbm:=[berkdb] )
|
||||
kernel_linux? ( sys-apps/util-linux:= )
|
||||
ncurses? ( >=sys-libs/ncurses-5.2:= )
|
||||
readline? (
|
||||
!libedit? ( >=sys-libs/readline-4.1:= )
|
||||
libedit? ( dev-libs/libedit:= )
|
||||
)
|
||||
sqlite? ( >=dev-db/sqlite-3.3.8:3= )
|
||||
ssl? ( >=dev-libs/openssl-1.1.1:= )
|
||||
tk? (
|
||||
>=dev-lang/tcl-8.0:=
|
||||
>=dev-lang/tk-8.0:=
|
||||
dev-tcltk/blt:=
|
||||
dev-tcltk/tix
|
||||
)
|
||||
"
|
||||
# bluetooth requires headers from bluez
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
bluetooth? ( net-wireless/bluez )
|
||||
test? (
|
||||
app-arch/xz-utils
|
||||
dev-python/ensurepip-pip
|
||||
dev-python/ensurepip-setuptools
|
||||
dev-python/ensurepip-wheel
|
||||
)
|
||||
valgrind? ( dev-debug/valgrind )
|
||||
"
|
||||
# autoconf-archive needed to eautoreconf
|
||||
BDEPEND="
|
||||
dev-build/autoconf-archive
|
||||
app-alternatives/awk
|
||||
virtual/pkgconfig
|
||||
jit? (
|
||||
$(llvm_gen_dep '
|
||||
sys-devel/clang:${LLVM_SLOT}
|
||||
sys-devel/llvm:${LLVM_SLOT}
|
||||
')
|
||||
)
|
||||
verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 )
|
||||
"
|
||||
RDEPEND+="
|
||||
!build? ( app-misc/mime-types )
|
||||
"
|
||||
if [[ ${PV} != *_alpha* ]]; then
|
||||
RDEPEND+="
|
||||
dev-lang/python-exec[python_targets_python${PYVER/./_}(-)]
|
||||
"
|
||||
fi
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
|
||||
|
||||
# large file tests involve a 2.5G file being copied (duplicated)
|
||||
CHECKREQS_DISK_BUILD=5500M
|
||||
|
||||
QA_PKGCONFIG_VERSION=${PYVER}
|
||||
# false positives -- functions specific to *BSD
|
||||
QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags )
|
||||
|
||||
pkg_pretend() {
|
||||
use test && check-reqs_pkg_pretend
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
use jit && llvm-r1_pkg_setup
|
||||
use test && check-reqs_pkg_setup
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if use verify-sig; then
|
||||
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
|
||||
fi
|
||||
default
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Ensure that internal copies of expat and libffi are not used.
|
||||
# TODO: Makefile has annoying deps on expat headers
|
||||
#rm -r Modules/expat || die
|
||||
|
||||
local PATCHES=(
|
||||
"${WORKDIR}/${PATCHSET}"
|
||||
)
|
||||
|
||||
default
|
||||
|
||||
# force the correct number of jobs
|
||||
# https://bugs.gentoo.org/737660
|
||||
sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
build_cbuild_python() {
|
||||
# Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
|
||||
local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi)
|
||||
|
||||
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
|
||||
# propagated to sysconfig for built extensions
|
||||
#
|
||||
# -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway)
|
||||
local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto"
|
||||
local -x LDFLAGS_NODIST=${BUILD_LDFLAGS}
|
||||
local -x CFLAGS= LDFLAGS=
|
||||
local -x BUILD_CFLAGS="${CFLAGS_NODIST}"
|
||||
local -x BUILD_LDFLAGS=${LDFLAGS_NODIST}
|
||||
|
||||
# We need to build our own Python on CBUILD first, and feed it in.
|
||||
# bug #847910
|
||||
local myeconfargs_cbuild=(
|
||||
"${myeconfargs[@]}"
|
||||
|
||||
--prefix="${BROOT}"/usr
|
||||
--libdir="${cbuild_libdir:2}"
|
||||
|
||||
# Avoid needing to load the right libpython.so.
|
||||
--disable-shared
|
||||
|
||||
# As minimal as possible for the mini CBUILD Python
|
||||
# we build just for cross to satisfy --with-build-python.
|
||||
--without-lto
|
||||
--without-readline
|
||||
--disable-optimizations
|
||||
)
|
||||
|
||||
mkdir "${WORKDIR}"/${P}-${CBUILD} || die
|
||||
pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
|
||||
|
||||
# Avoid as many dependencies as possible for the cross build.
|
||||
mkdir Modules || die
|
||||
cat > Modules/Setup.local <<-EOF || die
|
||||
*disabled*
|
||||
nis
|
||||
_dbm _gdbm
|
||||
_sqlite3
|
||||
_hashlib _ssl
|
||||
_curses _curses_panel
|
||||
readline
|
||||
_tkinter
|
||||
pyexpat
|
||||
zlib
|
||||
# We disabled these for CBUILD because Python's setup.py can't handle locating
|
||||
# libdir correctly for cross. This should be rechecked for the pure Makefile approach,
|
||||
# and uncommented if needed.
|
||||
#_ctypes _crypt
|
||||
EOF
|
||||
|
||||
ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
|
||||
|
||||
# Unfortunately, we do have to build this immediately, and
|
||||
# not in src_compile, because CHOST configure for Python
|
||||
# will check the existence of the --with-build-python value
|
||||
# immediately.
|
||||
emake
|
||||
popd &> /dev/null || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# disable automagic bluetooth headers detection
|
||||
if ! use bluetooth; then
|
||||
local -x ac_cv_header_bluetooth_bluetooth_h=no
|
||||
fi
|
||||
|
||||
append-flags -fwrapv
|
||||
filter-flags -malign-double
|
||||
|
||||
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
|
||||
# PKG_CONFIG needed for cross.
|
||||
tc-export CXX PKG_CONFIG
|
||||
|
||||
local dbmliborder=
|
||||
if use gdbm; then
|
||||
dbmliborder+="${dbmliborder:+:}gdbm"
|
||||
fi
|
||||
|
||||
if use pgo; then
|
||||
local profile_task_flags=(
|
||||
-m test
|
||||
"-j$(makeopts_jobs)"
|
||||
--pgo-extended
|
||||
-u-network
|
||||
|
||||
# We use a timeout because of how often we've had hang issues
|
||||
# here. It also matches the default upstream PROFILE_TASK.
|
||||
--timeout 1200
|
||||
|
||||
-x test_gdb
|
||||
-x test_dtrace
|
||||
|
||||
# All of these seem to occasionally hang for PGO inconsistently
|
||||
# They'll even hang here but be fine in src_test sometimes.
|
||||
# bug #828535 (and related: bug #788022)
|
||||
-x test_asyncio
|
||||
-x test_concurrent_futures
|
||||
-x test_httpservers
|
||||
-x test_logging
|
||||
-x test_multiprocessing_fork
|
||||
-x test_socket
|
||||
-x test_xmlrpc
|
||||
|
||||
# Hangs (actually runs indefinitely executing itself w/ many cpython builds)
|
||||
# bug #900429
|
||||
-x test_tools
|
||||
|
||||
# Fails in profiling run, passes in src_test().
|
||||
-x test_capi
|
||||
)
|
||||
|
||||
if has_version "app-arch/rpm" ; then
|
||||
# Avoid sandbox failure (attempts to write to /var/lib/rpm)
|
||||
profile_task_flags+=(
|
||||
-x test_distutils
|
||||
)
|
||||
fi
|
||||
local -x PROFILE_TASK="${profile_task_flags[*]}"
|
||||
fi
|
||||
|
||||
local myeconfargs=(
|
||||
# glibc-2.30 removes it; since we can't cleanly force-rebuild
|
||||
# Python on glibc upgrade, remove it proactively to give
|
||||
# a chance for users rebuilding python before glibc
|
||||
ac_cv_header_stropts_h=no
|
||||
|
||||
--enable-shared
|
||||
--without-static-libpython
|
||||
--enable-ipv6
|
||||
--infodir='${prefix}/share/info'
|
||||
--mandir='${prefix}/share/man'
|
||||
--with-computed-gotos
|
||||
--with-dbmliborder="${dbmliborder}"
|
||||
--with-libc=
|
||||
--enable-loadable-sqlite-extensions
|
||||
--without-ensurepip
|
||||
--without-lto
|
||||
--with-system-expat
|
||||
--with-platlibdir=lib
|
||||
--with-pkg-config=yes
|
||||
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
|
||||
|
||||
$(use_with debug assertions)
|
||||
$(use_enable jit experimental-jit)
|
||||
$(use_enable pgo optimizations)
|
||||
$(use_with readline readline "$(usex libedit editline readline)")
|
||||
$(use_with valgrind)
|
||||
)
|
||||
|
||||
# https://bugs.gentoo.org/700012
|
||||
if tc-is-lto; then
|
||||
append-cflags $(test-flags-CC -ffat-lto-objects)
|
||||
myeconfargs+=(
|
||||
--with-lto
|
||||
)
|
||||
fi
|
||||
|
||||
# Force-disable modules we don't want built.
|
||||
# See Modules/Setup for docs on how this works. Setup.local contains our local deviations.
|
||||
cat > Modules/Setup.local <<-EOF || die
|
||||
*disabled*
|
||||
nis
|
||||
$(usev !gdbm '_gdbm _dbm')
|
||||
$(usev !sqlite '_sqlite3')
|
||||
$(usev !ssl '_hashlib _ssl')
|
||||
$(usev !ncurses '_curses _curses_panel')
|
||||
$(usev !readline 'readline')
|
||||
$(usev !tk '_tkinter')
|
||||
EOF
|
||||
|
||||
# disable implicit optimization/debugging flags
|
||||
local -x OPT=
|
||||
|
||||
if tc-is-cross-compiler ; then
|
||||
build_cbuild_python
|
||||
myeconfargs+=(
|
||||
# Point the imminent CHOST build to the Python we just
|
||||
# built for CBUILD.
|
||||
--with-build-python="${WORKDIR}"/${P}-${CBUILD}/python
|
||||
)
|
||||
fi
|
||||
|
||||
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
|
||||
# propagated to sysconfig for built extensions
|
||||
local -x CFLAGS_NODIST=${CFLAGS}
|
||||
local -x LDFLAGS_NODIST=${LDFLAGS}
|
||||
local -x CFLAGS= LDFLAGS=
|
||||
|
||||
# Fix implicit declarations on cross and prefix builds. Bug #674070.
|
||||
if use ncurses; then
|
||||
append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
|
||||
fi
|
||||
|
||||
econf "${myeconfargs[@]}"
|
||||
|
||||
if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
|
||||
eerror "configure has detected that the sem_open function is broken."
|
||||
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
|
||||
die "Broken sem_open function (bug 496328)"
|
||||
fi
|
||||
|
||||
# install epython.py as part of stdlib
|
||||
echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Ensure sed works as expected
|
||||
# https://bugs.gentoo.org/594768
|
||||
local -x LC_ALL=C
|
||||
export PYTHONSTRICTEXTENSIONBUILD=1
|
||||
|
||||
# Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
|
||||
# end up writing bytecode & violating sandbox.
|
||||
# bug #831897
|
||||
local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
|
||||
|
||||
if use pgo ; then
|
||||
# bug 660358
|
||||
local -x COLUMNS=80
|
||||
local -x PYTHONDONTWRITEBYTECODE=
|
||||
|
||||
addwrite "/usr/lib/python${PYVER}/site-packages"
|
||||
fi
|
||||
|
||||
# also need to clear the flags explicitly here or they end up
|
||||
# in _sysconfigdata*
|
||||
emake CPPFLAGS= CFLAGS= LDFLAGS=
|
||||
|
||||
# Restore saved value from above.
|
||||
local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
|
||||
|
||||
# Work around bug 329499. See also bug 413751 and 457194.
|
||||
if has_version dev-libs/libffi[pax-kernel]; then
|
||||
pax-mark E python
|
||||
else
|
||||
pax-mark m python
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# Tests will not work when cross compiling.
|
||||
if tc-is-cross-compiler; then
|
||||
elog "Disabling tests due to crosscompiling."
|
||||
return
|
||||
fi
|
||||
|
||||
# this just happens to skip test_support.test_freeze that is broken
|
||||
# without bundled expat
|
||||
# TODO: get a proper skip for it upstream
|
||||
local -x LOGNAME=buildbot
|
||||
|
||||
local test_opts=(
|
||||
-u-network
|
||||
-j "$(makeopts_jobs)"
|
||||
|
||||
# fails
|
||||
-x test_concurrent_futures
|
||||
-x test_gdb
|
||||
)
|
||||
|
||||
if use sparc ; then
|
||||
# bug #788022
|
||||
test_opts+=(
|
||||
-x test_multiprocessing_fork
|
||||
-x test_multiprocessing_forkserver
|
||||
)
|
||||
fi
|
||||
|
||||
# workaround docutils breaking tests
|
||||
cat > Lib/docutils.py <<-EOF || die
|
||||
raise ImportError("Thou shalt not import!")
|
||||
EOF
|
||||
|
||||
# bug 660358
|
||||
local -x COLUMNS=80
|
||||
local -x PYTHONDONTWRITEBYTECODE=
|
||||
# workaround https://bugs.gentoo.org/775416
|
||||
addwrite "/usr/lib/python${PYVER}/site-packages"
|
||||
|
||||
nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
|
||||
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
|
||||
local ret=${?}
|
||||
|
||||
rm Lib/docutils.py || die
|
||||
|
||||
[[ ${ret} -eq 0 ]] || die "emake test failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local libdir=${ED}/usr/lib/python${PYVER}
|
||||
|
||||
# the Makefile rules are broken
|
||||
# https://github.com/python/cpython/issues/100221
|
||||
mkdir -p "${libdir}"/lib-dynload || die
|
||||
|
||||
# -j1 hack for now for bug #843458
|
||||
emake -j1 DESTDIR="${D}" altinstall
|
||||
|
||||
# Fix collisions between different slots of Python.
|
||||
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
|
||||
|
||||
# Cheap hack to get version with ABIFLAGS
|
||||
local abiver=$(cd "${ED}/usr/include"; echo python*)
|
||||
if [[ ${abiver} != python${PYVER} ]]; then
|
||||
# Replace python3.X with a symlink to python3.Xm
|
||||
rm "${ED}/usr/bin/python${PYVER}" || die
|
||||
dosym "${abiver}" "/usr/bin/python${PYVER}"
|
||||
# Create python3.X-config symlink
|
||||
dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
|
||||
# Create python-3.5m.pc symlink
|
||||
dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
|
||||
fi
|
||||
|
||||
# python seems to get rebuilt in src_install (bug 569908)
|
||||
# Work around it for now.
|
||||
if has_version dev-libs/libffi[pax-kernel]; then
|
||||
pax-mark E "${ED}/usr/bin/${abiver}"
|
||||
else
|
||||
pax-mark m "${ED}/usr/bin/${abiver}"
|
||||
fi
|
||||
|
||||
rm -r "${libdir}"/ensurepip/_bundled || die
|
||||
if ! use ensurepip; then
|
||||
rm -r "${libdir}"/ensurepip || die
|
||||
fi
|
||||
if ! use sqlite; then
|
||||
rm -r "${libdir}/"sqlite3 || die
|
||||
fi
|
||||
if ! use tk; then
|
||||
rm -r "${ED}/usr/bin/idle${PYVER}" || die
|
||||
rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
|
||||
fi
|
||||
|
||||
ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die
|
||||
|
||||
dodoc Misc/{ACKS,HISTORY,NEWS}
|
||||
|
||||
if use examples; then
|
||||
docinto examples
|
||||
find Tools -name __pycache__ -exec rm -fr {} + || die
|
||||
dodoc -r Tools
|
||||
fi
|
||||
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
|
||||
local libname=$(
|
||||
printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' |
|
||||
emake --no-print-directory -s -f - 2>/dev/null
|
||||
)
|
||||
newins Tools/gdb/libpython.py "${libname}"-gdb.py
|
||||
|
||||
newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
|
||||
newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
|
||||
sed \
|
||||
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
|
||||
-e "s:@PYDOC@:pydoc${PYVER}:" \
|
||||
-i "${ED}/etc/conf.d/pydoc-${PYVER}" \
|
||||
"${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
|
||||
|
||||
# python-exec wrapping support
|
||||
local pymajor=${PYVER%.*}
|
||||
local EPYTHON=python${PYVER}
|
||||
local scriptdir=${D}$(python_get_scriptdir)
|
||||
mkdir -p "${scriptdir}" || die
|
||||
# python and pythonX
|
||||
ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die
|
||||
ln -s "python${pymajor}" "${scriptdir}/python" || die
|
||||
# python-config and pythonX-config
|
||||
# note: we need to create a wrapper rather than symlinking it due
|
||||
# to some random dirname(argv[0]) magic performed by python-config
|
||||
cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
|
||||
#!/bin/sh
|
||||
exec "${abiver}-config" "\${@}"
|
||||
EOF
|
||||
chmod +x "${scriptdir}/python${pymajor}-config" || die
|
||||
ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die
|
||||
# pydoc
|
||||
ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die
|
||||
# idle
|
||||
if use tk; then
|
||||
ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
local v
|
||||
for v in ${REPLACING_VERSIONS}; do
|
||||
if ver_test "${v}" -lt 3.11.0_beta4-r2; then
|
||||
ewarn "Python 3.11.0b4 has changed its module ABI. The .pyc files"
|
||||
ewarn "installed previously are no longer valid and will be regenerated"
|
||||
ewarn "(or ignored) on the next import. This may cause sandbox failures"
|
||||
ewarn "when installing some packages and checksum mismatches when removing"
|
||||
ewarn "old versions. To actively prevent this, rebuild all packages"
|
||||
ewarn "installing Python 3.11 modules, e.g. using:"
|
||||
ewarn
|
||||
ewarn " emerge -1v /usr/lib/python3.11/site-packages"
|
||||
fi
|
||||
done
|
||||
}
|
@ -0,0 +1,430 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="8"
|
||||
WANT_LIBTOOL="none"
|
||||
|
||||
inherit autotools flag-o-matic multiprocessing pax-utils
|
||||
inherit prefix python-utils-r1 toolchain-funcs verify-sig
|
||||
|
||||
MY_PV=${PV/_rc/rc}
|
||||
MY_P="Python-${MY_PV%_p*}"
|
||||
PYVER=$(ver_cut 1-2)
|
||||
PATCHSET="python-gentoo-patches-${MY_PV}"
|
||||
|
||||
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
|
||||
HOMEPAGE="
|
||||
https://www.python.org/
|
||||
https://github.com/python/cpython/
|
||||
"
|
||||
SRC_URI="
|
||||
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
|
||||
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
|
||||
verify-sig? (
|
||||
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
|
||||
)
|
||||
"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
LICENSE="PSF-2"
|
||||
SLOT="${PYVER}"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||
IUSE="
|
||||
bluetooth build debug +ensurepip examples gdbm +ncurses pgo
|
||||
+readline +sqlite +ssl test tk valgrind
|
||||
"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
# Do not add a dependency on dev-lang/python to this ebuild.
|
||||
# If you need to apply a patch which requires python for bootstrapping, please
|
||||
# run the bootstrap code on your dev box and include the results in the
|
||||
# patchset. See bug 447752.
|
||||
|
||||
RDEPEND="
|
||||
app-arch/bzip2:=
|
||||
app-arch/xz-utils:=
|
||||
>=dev-libs/expat-2.1:=
|
||||
dev-libs/libffi:=
|
||||
dev-python/gentoo-common
|
||||
>=sys-libs/zlib-1.1.3:=
|
||||
virtual/libcrypt:=
|
||||
virtual/libintl
|
||||
ensurepip? ( dev-python/ensurepip-wheels )
|
||||
gdbm? ( sys-libs/gdbm:=[berkdb] )
|
||||
kernel_linux? ( sys-apps/util-linux:= )
|
||||
ncurses? ( >=sys-libs/ncurses-5.2:= )
|
||||
readline? ( >=sys-libs/readline-4.1:= )
|
||||
sqlite? ( >=dev-db/sqlite-3.3.8:3= )
|
||||
ssl? ( >=dev-libs/openssl-1.1.1:= )
|
||||
tk? (
|
||||
>=dev-lang/tcl-8.0:=
|
||||
>=dev-lang/tk-8.0:=
|
||||
dev-tcltk/blt:=
|
||||
dev-tcltk/tix
|
||||
)
|
||||
"
|
||||
# bluetooth requires headers from bluez
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
bluetooth? ( net-wireless/bluez )
|
||||
test? ( app-arch/xz-utils )
|
||||
valgrind? ( dev-debug/valgrind )
|
||||
"
|
||||
# autoconf-archive needed to eautoreconf
|
||||
BDEPEND="
|
||||
dev-build/autoconf-archive
|
||||
app-alternatives/awk
|
||||
virtual/pkgconfig
|
||||
verify-sig? ( sec-keys/openpgp-keys-python )
|
||||
"
|
||||
RDEPEND+="
|
||||
!build? ( app-misc/mime-types )
|
||||
"
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
|
||||
|
||||
QA_PKGCONFIG_VERSION=${PYVER}
|
||||
# false positives -- functions specific to *BSD
|
||||
QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags )
|
||||
|
||||
src_unpack() {
|
||||
if use verify-sig; then
|
||||
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
|
||||
fi
|
||||
default
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Ensure that internal copies of expat and libffi are not used.
|
||||
rm -r Modules/expat || die
|
||||
rm -r Modules/_ctypes/libffi* || die
|
||||
|
||||
local PATCHES=(
|
||||
"${WORKDIR}/${PATCHSET}"
|
||||
)
|
||||
|
||||
default
|
||||
|
||||
# https://bugs.gentoo.org/850151
|
||||
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" setup.py || die
|
||||
|
||||
# force the correct number of jobs
|
||||
# https://bugs.gentoo.org/737660
|
||||
local jobs=$(makeopts_jobs)
|
||||
sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
|
||||
sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
|
||||
|
||||
rm Lib/distutils/command/wininst*.exe || die
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# disable automagic bluetooth headers detection
|
||||
if ! use bluetooth; then
|
||||
local -x ac_cv_header_bluetooth_bluetooth_h=no
|
||||
fi
|
||||
local disable
|
||||
use gdbm || disable+=" gdbm"
|
||||
use ncurses || disable+=" _curses _curses_panel"
|
||||
use readline || disable+=" readline"
|
||||
use sqlite || disable+=" _sqlite3"
|
||||
use ssl || export PYTHON_DISABLE_SSL="1"
|
||||
use tk || disable+=" _tkinter"
|
||||
export PYTHON_DISABLE_MODULES="${disable}"
|
||||
|
||||
if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
|
||||
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
|
||||
fi
|
||||
|
||||
append-flags -fwrapv
|
||||
filter-flags -malign-double
|
||||
|
||||
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
|
||||
# PKG_CONFIG needed for cross.
|
||||
tc-export CXX PKG_CONFIG
|
||||
|
||||
local dbmliborder=
|
||||
if use gdbm; then
|
||||
dbmliborder+="${dbmliborder:+:}gdbm"
|
||||
fi
|
||||
|
||||
local myeconfargs=(
|
||||
# glibc-2.30 removes it; since we can't cleanly force-rebuild
|
||||
# Python on glibc upgrade, remove it proactively to give
|
||||
# a chance for users rebuilding python before glibc
|
||||
ac_cv_header_stropts_h=no
|
||||
|
||||
--enable-shared
|
||||
--enable-ipv6
|
||||
--infodir='${prefix}/share/info'
|
||||
--mandir='${prefix}/share/man'
|
||||
--with-computed-gotos
|
||||
--with-dbmliborder="${dbmliborder}"
|
||||
--with-libc=
|
||||
--enable-loadable-sqlite-extensions
|
||||
--without-ensurepip
|
||||
--without-lto
|
||||
--with-system-expat
|
||||
--with-system-ffi
|
||||
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
|
||||
|
||||
$(use_with debug assertions)
|
||||
$(use_with valgrind)
|
||||
)
|
||||
|
||||
# disable implicit optimization/debugging flags
|
||||
local -x OPT=
|
||||
|
||||
# https://bugs.gentoo.org/700012
|
||||
if tc-is-lto; then
|
||||
append-cflags $(test-flags-CC -ffat-lto-objects)
|
||||
myeconfargs+=(
|
||||
--with-lto
|
||||
)
|
||||
fi
|
||||
|
||||
if tc-is-cross-compiler ; then
|
||||
# Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
|
||||
local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi)
|
||||
|
||||
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
|
||||
# propagated to sysconfig for built extensions
|
||||
#
|
||||
# -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway)
|
||||
local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto"
|
||||
local -x LDFLAGS_NODIST=${BUILD_LDFLAGS}
|
||||
local -x CFLAGS= LDFLAGS=
|
||||
local -x BUILD_CFLAGS="${CFLAGS_NODIST}"
|
||||
local -x BUILD_LDFLAGS=${LDFLAGS_NODIST}
|
||||
|
||||
# We need to build our own Python on CBUILD first, and feed it in.
|
||||
# bug #847910 and bug #864911.
|
||||
local myeconfargs_cbuild=(
|
||||
"${myeconfargs[@]}"
|
||||
|
||||
--libdir="${cbuild_libdir:2}"
|
||||
|
||||
# Avoid needing to load the right libpython.so.
|
||||
--disable-shared
|
||||
|
||||
# As minimal as possible for the mini CBUILD Python
|
||||
# we build just for cross.
|
||||
--without-lto
|
||||
--disable-optimizations
|
||||
)
|
||||
|
||||
# Point the imminent CHOST build to the Python we just
|
||||
# built for CBUILD.
|
||||
export PATH="${WORKDIR}/${P}-${CBUILD}:${PATH}"
|
||||
|
||||
mkdir "${WORKDIR}"/${P}-${CBUILD} || die
|
||||
pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
|
||||
# We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating
|
||||
# libdir correctly for cross.
|
||||
PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" \
|
||||
ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
|
||||
|
||||
# Avoid as many dependencies as possible for the cross build.
|
||||
cat >> Makefile <<-EOF || die
|
||||
MODULE_NIS=disabled
|
||||
MODULE__DBM=disabled
|
||||
MODULE__GDBM=disabled
|
||||
MODULE__DBM=disabled
|
||||
MODULE__SQLITE3=disabled
|
||||
MODULE__HASHLIB=disabled
|
||||
MODULE__SSL=disabled
|
||||
MODULE__CURSES=disabled
|
||||
MODULE__CURSES_PANEL=disabled
|
||||
MODULE_READLINE=disabled
|
||||
MODULE__TKINTER=disabled
|
||||
MODULE_PYEXPAT=disabled
|
||||
MODULE_ZLIB=disabled
|
||||
EOF
|
||||
|
||||
# Unfortunately, we do have to build this immediately, and
|
||||
# not in src_compile, because CHOST configure for Python
|
||||
# will check the existence of the Python it was pointed to
|
||||
# immediately.
|
||||
PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" emake
|
||||
popd &> /dev/null || die
|
||||
fi
|
||||
|
||||
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
|
||||
# propagated to sysconfig for built extensions
|
||||
local -x CFLAGS_NODIST=${CFLAGS}
|
||||
local -x LDFLAGS_NODIST=${LDFLAGS}
|
||||
local -x CFLAGS= LDFLAGS=
|
||||
|
||||
# Fix implicit declarations on cross and prefix builds. Bug #674070.
|
||||
if use ncurses; then
|
||||
append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
|
||||
fi
|
||||
|
||||
hprefixify setup.py
|
||||
econf "${myeconfargs[@]}"
|
||||
|
||||
if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
|
||||
eerror "configure has detected that the sem_open function is broken."
|
||||
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
|
||||
die "Broken sem_open function (bug 496328)"
|
||||
fi
|
||||
|
||||
# install epython.py as part of stdlib
|
||||
echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Ensure sed works as expected
|
||||
# https://bugs.gentoo.org/594768
|
||||
local -x LC_ALL=C
|
||||
# Prevent using distutils bundled by setuptools.
|
||||
# https://bugs.gentoo.org/823728
|
||||
export SETUPTOOLS_USE_DISTUTILS=stdlib
|
||||
|
||||
# also need to clear the flags explicitly here or they end up
|
||||
# in _sysconfigdata*
|
||||
emake CPPFLAGS= CFLAGS= LDFLAGS=
|
||||
|
||||
# Work around bug 329499. See also bug 413751 and 457194.
|
||||
if has_version dev-libs/libffi[pax-kernel]; then
|
||||
pax-mark E python
|
||||
else
|
||||
pax-mark m python
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# Tests will not work when cross compiling.
|
||||
if tc-is-cross-compiler; then
|
||||
elog "Disabling tests due to crosscompiling."
|
||||
return
|
||||
fi
|
||||
|
||||
local test_opts=(
|
||||
-u-network
|
||||
-j "$(makeopts_jobs)"
|
||||
|
||||
# fails
|
||||
-x test_concurrent_futures
|
||||
-x test_gdb
|
||||
)
|
||||
|
||||
if use sparc ; then
|
||||
# bug #788022
|
||||
test_opts+=(
|
||||
-x test_multiprocessing_fork
|
||||
-x test_multiprocessing_forkserver
|
||||
)
|
||||
fi
|
||||
|
||||
# workaround docutils breaking tests
|
||||
cat > Lib/docutils.py <<-EOF || die
|
||||
raise ImportError("Thou shalt not import!")
|
||||
EOF
|
||||
|
||||
# bug 660358
|
||||
local -x COLUMNS=80
|
||||
local -x PYTHONDONTWRITEBYTECODE=
|
||||
|
||||
nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
|
||||
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
|
||||
local ret=${?}
|
||||
|
||||
rm Lib/docutils.py || die
|
||||
|
||||
[[ ${ret} -eq 0 ]] || die "emake test failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local libdir=${ED}/usr/lib/python${PYVER}
|
||||
|
||||
emake DESTDIR="${D}" altinstall
|
||||
|
||||
# Remove static library
|
||||
rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
|
||||
|
||||
# Fix collisions between different slots of Python.
|
||||
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
|
||||
|
||||
# Cheap hack to get version with ABIFLAGS
|
||||
local abiver=$(cd "${ED}/usr/include"; echo python*)
|
||||
if [[ ${abiver} != python${PYVER} ]]; then
|
||||
# Replace python3.X with a symlink to python3.Xm
|
||||
rm "${ED}/usr/bin/python${PYVER}" || die
|
||||
dosym "${abiver}" "/usr/bin/python${PYVER}"
|
||||
# Create python3.X-config symlink
|
||||
dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
|
||||
# Create python-3.5m.pc symlink
|
||||
dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
|
||||
fi
|
||||
|
||||
# python seems to get rebuilt in src_install (bug 569908)
|
||||
# Work around it for now.
|
||||
if has_version dev-libs/libffi[pax-kernel]; then
|
||||
pax-mark E "${ED}/usr/bin/${abiver}"
|
||||
else
|
||||
pax-mark m "${ED}/usr/bin/${abiver}"
|
||||
fi
|
||||
|
||||
rm -r "${libdir}"/ensurepip/_bundled || die
|
||||
if ! use ensurepip; then
|
||||
rm -r "${libdir}"/ensurepip || die
|
||||
fi
|
||||
if ! use sqlite; then
|
||||
rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
|
||||
fi
|
||||
if ! use tk; then
|
||||
rm -r "${ED}/usr/bin/idle${PYVER}" || die
|
||||
rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
|
||||
fi
|
||||
|
||||
ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die
|
||||
|
||||
dodoc Misc/{ACKS,HISTORY,NEWS}
|
||||
|
||||
if use examples; then
|
||||
docinto examples
|
||||
find Tools -name __pycache__ -exec rm -fr {} + || die
|
||||
dodoc -r Tools
|
||||
fi
|
||||
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
|
||||
local libname=$(
|
||||
printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' |
|
||||
emake --no-print-directory -s -f - 2>/dev/null
|
||||
)
|
||||
newins Tools/gdb/libpython.py "${libname}"-gdb.py
|
||||
|
||||
newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
|
||||
newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
|
||||
sed \
|
||||
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
|
||||
-e "s:@PYDOC@:pydoc${PYVER}:" \
|
||||
-i "${ED}/etc/conf.d/pydoc-${PYVER}" \
|
||||
"${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
|
||||
|
||||
# python-exec wrapping support
|
||||
local pymajor=${PYVER%.*}
|
||||
local EPYTHON=python${PYVER}
|
||||
local scriptdir=${D}$(python_get_scriptdir)
|
||||
mkdir -p "${scriptdir}" || die
|
||||
# python and pythonX
|
||||
ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die
|
||||
ln -s "python${pymajor}" "${scriptdir}/python" || die
|
||||
# python-config and pythonX-config
|
||||
# note: we need to create a wrapper rather than symlinking it due
|
||||
# to some random dirname(argv[0]) magic performed by python-config
|
||||
cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
|
||||
#!/bin/sh
|
||||
exec "${abiver}-config" "\${@}"
|
||||
EOF
|
||||
chmod +x "${scriptdir}/python${pymajor}-config" || die
|
||||
ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die
|
||||
# 2to3, pydoc
|
||||
ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die
|
||||
ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die
|
||||
# idle
|
||||
if use tk; then
|
||||
ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die
|
||||
fi
|
||||
}
|
@ -0,0 +1,490 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="8"
|
||||
WANT_LIBTOOL="none"
|
||||
|
||||
inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
|
||||
inherit prefix python-utils-r1 toolchain-funcs verify-sig
|
||||
|
||||
MY_PV=${PV/_rc/rc}
|
||||
MY_P="Python-${MY_PV%_p*}"
|
||||
PYVER=$(ver_cut 1-2)
|
||||
PATCHSET="python-gentoo-patches-${MY_PV}"
|
||||
|
||||
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
|
||||
HOMEPAGE="
|
||||
https://www.python.org/
|
||||
https://github.com/python/cpython/
|
||||
"
|
||||
SRC_URI="
|
||||
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
|
||||
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
|
||||
verify-sig? (
|
||||
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
|
||||
)
|
||||
"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
LICENSE="PSF-2"
|
||||
SLOT="${PYVER}"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||
IUSE="
|
||||
bluetooth build debug +ensurepip examples gdbm +ncurses pgo
|
||||
+readline +sqlite +ssl test tk valgrind
|
||||
"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
# Do not add a dependency on dev-lang/python to this ebuild.
|
||||
# If you need to apply a patch which requires python for bootstrapping, please
|
||||
# run the bootstrap code on your dev box and include the results in the
|
||||
# patchset. See bug 447752.
|
||||
|
||||
RDEPEND="
|
||||
app-arch/bzip2:=
|
||||
app-arch/xz-utils:=
|
||||
>=dev-libs/expat-2.1:=
|
||||
dev-libs/libffi:=
|
||||
dev-python/gentoo-common
|
||||
>=sys-libs/zlib-1.1.3:=
|
||||
virtual/libcrypt:=
|
||||
virtual/libintl
|
||||
ensurepip? ( dev-python/ensurepip-wheels )
|
||||
gdbm? ( sys-libs/gdbm:=[berkdb] )
|
||||
kernel_linux? ( sys-apps/util-linux:= )
|
||||
ncurses? ( >=sys-libs/ncurses-5.2:= )
|
||||
readline? ( >=sys-libs/readline-4.1:= )
|
||||
sqlite? ( >=dev-db/sqlite-3.3.8:3= )
|
||||
ssl? ( >=dev-libs/openssl-1.1.1:= )
|
||||
tk? (
|
||||
>=dev-lang/tcl-8.0:=
|
||||
>=dev-lang/tk-8.0:=
|
||||
dev-tcltk/blt:=
|
||||
dev-tcltk/tix
|
||||
)
|
||||
"
|
||||
# bluetooth requires headers from bluez
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
bluetooth? ( net-wireless/bluez )
|
||||
test? ( app-arch/xz-utils )
|
||||
valgrind? ( dev-debug/valgrind )
|
||||
"
|
||||
# autoconf-archive needed to eautoreconf
|
||||
BDEPEND="
|
||||
dev-build/autoconf-archive
|
||||
app-alternatives/awk
|
||||
virtual/pkgconfig
|
||||
verify-sig? ( sec-keys/openpgp-keys-python )
|
||||
"
|
||||
RDEPEND+="
|
||||
!build? ( app-misc/mime-types )
|
||||
"
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
|
||||
|
||||
# large file tests involve a 2.5G file being copied (duplicated)
|
||||
CHECKREQS_DISK_BUILD=5500M
|
||||
|
||||
QA_PKGCONFIG_VERSION=${PYVER}
|
||||
# false positives -- functions specific to *BSD
|
||||
QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags )
|
||||
|
||||
pkg_pretend() {
|
||||
use test && check-reqs_pkg_pretend
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
use test && check-reqs_pkg_setup
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if use verify-sig; then
|
||||
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
|
||||
fi
|
||||
default
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Ensure that internal copies of expat and libffi are not used.
|
||||
rm -r Modules/expat || die
|
||||
rm -r Modules/_ctypes/libffi* || die
|
||||
|
||||
local PATCHES=(
|
||||
"${WORKDIR}/${PATCHSET}"
|
||||
)
|
||||
|
||||
default
|
||||
|
||||
# https://bugs.gentoo.org/850151
|
||||
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" setup.py || die
|
||||
|
||||
# force the correct number of jobs
|
||||
# https://bugs.gentoo.org/737660
|
||||
local jobs=$(makeopts_jobs)
|
||||
sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
|
||||
sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# disable automagic bluetooth headers detection
|
||||
if ! use bluetooth; then
|
||||
local -x ac_cv_header_bluetooth_bluetooth_h=no
|
||||
fi
|
||||
local disable
|
||||
use gdbm || disable+=" gdbm"
|
||||
use ncurses || disable+=" _curses _curses_panel"
|
||||
use readline || disable+=" readline"
|
||||
use sqlite || disable+=" _sqlite3"
|
||||
use ssl || export PYTHON_DISABLE_SSL="1"
|
||||
use tk || disable+=" _tkinter"
|
||||
export PYTHON_DISABLE_MODULES="${disable}"
|
||||
|
||||
if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
|
||||
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
|
||||
fi
|
||||
|
||||
append-flags -fwrapv
|
||||
filter-flags -malign-double
|
||||
|
||||
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
|
||||
# PKG_CONFIG needed for cross.
|
||||
tc-export CXX PKG_CONFIG
|
||||
|
||||
local dbmliborder=
|
||||
if use gdbm; then
|
||||
dbmliborder+="${dbmliborder:+:}gdbm"
|
||||
fi
|
||||
|
||||
if use pgo; then
|
||||
local profile_task_flags=(
|
||||
-m test
|
||||
"-j$(makeopts_jobs)"
|
||||
--pgo-extended
|
||||
-x test_gdb
|
||||
-x test_dtrace
|
||||
-u-network
|
||||
|
||||
# All of these seem to occasionally hang for PGO inconsistently
|
||||
# They'll even hang here but be fine in src_test sometimes.
|
||||
# bug #828535 (and related: bug #788022)
|
||||
-x test_asyncio
|
||||
-x test_concurrent_futures
|
||||
-x test_httpservers
|
||||
-x test_logging
|
||||
-x test_multiprocessing_fork
|
||||
-x test_socket
|
||||
-x test_xmlrpc
|
||||
|
||||
# Hangs (actually runs indefinitely executing itself w/ many cpython builds)
|
||||
# bug #900429
|
||||
-x test_tools
|
||||
)
|
||||
|
||||
if has_version "app-arch/rpm" ; then
|
||||
# Avoid sandbox failure (attempts to write to /var/lib/rpm)
|
||||
profile_task_flags+=(
|
||||
-x test_distutils
|
||||
)
|
||||
fi
|
||||
local -x PROFILE_TASK="${profile_task_flags[*]}"
|
||||
fi
|
||||
|
||||
local myeconfargs=(
|
||||
# glibc-2.30 removes it; since we can't cleanly force-rebuild
|
||||
# Python on glibc upgrade, remove it proactively to give
|
||||
# a chance for users rebuilding python before glibc
|
||||
ac_cv_header_stropts_h=no
|
||||
|
||||
--enable-shared
|
||||
--enable-ipv6
|
||||
--infodir='${prefix}/share/info'
|
||||
--mandir='${prefix}/share/man'
|
||||
--with-computed-gotos
|
||||
--with-dbmliborder="${dbmliborder}"
|
||||
--with-libc=
|
||||
--enable-loadable-sqlite-extensions
|
||||
--without-ensurepip
|
||||
--without-lto
|
||||
--with-system-expat
|
||||
--with-system-ffi
|
||||
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
|
||||
|
||||
$(use_with debug assertions)
|
||||
$(use_enable pgo optimizations)
|
||||
$(use_with valgrind)
|
||||
)
|
||||
|
||||
# disable implicit optimization/debugging flags
|
||||
local -x OPT=
|
||||
|
||||
# https://bugs.gentoo.org/700012
|
||||
if tc-is-lto; then
|
||||
append-cflags $(test-flags-CC -ffat-lto-objects)
|
||||
myeconfargs+=(
|
||||
--with-lto
|
||||
)
|
||||
fi
|
||||
|
||||
if tc-is-cross-compiler ; then
|
||||
# Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
|
||||
local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi)
|
||||
|
||||
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
|
||||
# propagated to sysconfig for built extensions
|
||||
#
|
||||
# -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway)
|
||||
local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto"
|
||||
local -x LDFLAGS_NODIST=${BUILD_LDFLAGS}
|
||||
local -x CFLAGS= LDFLAGS=
|
||||
local -x BUILD_CFLAGS="${CFLAGS_NODIST}"
|
||||
local -x BUILD_LDFLAGS=${LDFLAGS_NODIST}
|
||||
|
||||
# We need to build our own Python on CBUILD first, and feed it in.
|
||||
# bug #847910 and bug #864911.
|
||||
local myeconfargs_cbuild=(
|
||||
"${myeconfargs[@]}"
|
||||
|
||||
--libdir="${cbuild_libdir:2}"
|
||||
|
||||
# Avoid needing to load the right libpython.so.
|
||||
--disable-shared
|
||||
|
||||
# As minimal as possible for the mini CBUILD Python
|
||||
# we build just for cross.
|
||||
--without-lto
|
||||
--disable-optimizations
|
||||
)
|
||||
|
||||
# Point the imminent CHOST build to the Python we just
|
||||
# built for CBUILD.
|
||||
export PATH="${WORKDIR}/${P}-${CBUILD}:${PATH}"
|
||||
|
||||
mkdir "${WORKDIR}"/${P}-${CBUILD} || die
|
||||
pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
|
||||
# We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating
|
||||
# libdir correctly for cross.
|
||||
PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" \
|
||||
ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
|
||||
|
||||
# Avoid as many dependencies as possible for the cross build.
|
||||
cat >> Makefile <<-EOF || die
|
||||
MODULE_NIS=disabled
|
||||
MODULE__DBM=disabled
|
||||
MODULE__GDBM=disabled
|
||||
MODULE__DBM=disabled
|
||||
MODULE__SQLITE3=disabled
|
||||
MODULE__HASHLIB=disabled
|
||||
MODULE__SSL=disabled
|
||||
MODULE__CURSES=disabled
|
||||
MODULE__CURSES_PANEL=disabled
|
||||
MODULE_READLINE=disabled
|
||||
MODULE__TKINTER=disabled
|
||||
MODULE_PYEXPAT=disabled
|
||||
MODULE_ZLIB=disabled
|
||||
EOF
|
||||
|
||||
# Unfortunately, we do have to build this immediately, and
|
||||
# not in src_compile, because CHOST configure for Python
|
||||
# will check the existence of the Python it was pointed to
|
||||
# immediately.
|
||||
PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" emake
|
||||
popd &> /dev/null || die
|
||||
fi
|
||||
|
||||
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
|
||||
# propagated to sysconfig for built extensions
|
||||
local -x CFLAGS_NODIST=${CFLAGS}
|
||||
local -x LDFLAGS_NODIST=${LDFLAGS}
|
||||
local -x CFLAGS= LDFLAGS=
|
||||
|
||||
# Fix implicit declarations on cross and prefix builds. Bug #674070.
|
||||
if use ncurses; then
|
||||
append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
|
||||
fi
|
||||
|
||||
hprefixify setup.py
|
||||
econf "${myeconfargs[@]}"
|
||||
|
||||
if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
|
||||
eerror "configure has detected that the sem_open function is broken."
|
||||
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
|
||||
die "Broken sem_open function (bug 496328)"
|
||||
fi
|
||||
|
||||
# install epython.py as part of stdlib
|
||||
echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Ensure sed works as expected
|
||||
# https://bugs.gentoo.org/594768
|
||||
local -x LC_ALL=C
|
||||
# Prevent using distutils bundled by setuptools.
|
||||
# https://bugs.gentoo.org/823728
|
||||
export SETUPTOOLS_USE_DISTUTILS=stdlib
|
||||
|
||||
# Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
|
||||
# end up writing bytecode & violating sandbox.
|
||||
# bug #831897
|
||||
local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
|
||||
|
||||
if use pgo ; then
|
||||
# bug 660358
|
||||
local -x COLUMNS=80
|
||||
local -x PYTHONDONTWRITEBYTECODE=
|
||||
|
||||
addpredict "/usr/lib/python${PYVER}/site-packages"
|
||||
fi
|
||||
|
||||
# also need to clear the flags explicitly here or they end up
|
||||
# in _sysconfigdata*
|
||||
emake CPPFLAGS= CFLAGS= LDFLAGS=
|
||||
|
||||
# Restore saved value from above.
|
||||
local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
|
||||
|
||||
# Work around bug 329499. See also bug 413751 and 457194.
|
||||
if has_version dev-libs/libffi[pax-kernel]; then
|
||||
pax-mark E python
|
||||
else
|
||||
pax-mark m python
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# Tests will not work when cross compiling.
|
||||
if tc-is-cross-compiler; then
|
||||
elog "Disabling tests due to crosscompiling."
|
||||
return
|
||||
fi
|
||||
|
||||
local test_opts=(
|
||||
-u-network
|
||||
-j "$(makeopts_jobs)"
|
||||
|
||||
# fails
|
||||
-x test_concurrent_futures
|
||||
-x test_gdb
|
||||
)
|
||||
|
||||
if use sparc ; then
|
||||
# bug #788022
|
||||
test_opts+=(
|
||||
-x test_multiprocessing_fork
|
||||
-x test_multiprocessing_forkserver
|
||||
)
|
||||
fi
|
||||
|
||||
# workaround docutils breaking tests
|
||||
cat > Lib/docutils.py <<-EOF || die
|
||||
raise ImportError("Thou shalt not import!")
|
||||
EOF
|
||||
|
||||
# bug 660358
|
||||
local -x COLUMNS=80
|
||||
local -x PYTHONDONTWRITEBYTECODE=
|
||||
|
||||
nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
|
||||
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
|
||||
local ret=${?}
|
||||
|
||||
rm Lib/docutils.py || die
|
||||
|
||||
[[ ${ret} -eq 0 ]] || die "emake test failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local libdir=${ED}/usr/lib/python${PYVER}
|
||||
|
||||
emake DESTDIR="${D}" altinstall
|
||||
|
||||
# Remove static library
|
||||
rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
|
||||
|
||||
# Fix collisions between different slots of Python.
|
||||
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
|
||||
|
||||
# Cheap hack to get version with ABIFLAGS
|
||||
local abiver=$(cd "${ED}/usr/include"; echo python*)
|
||||
if [[ ${abiver} != python${PYVER} ]]; then
|
||||
# Replace python3.X with a symlink to python3.Xm
|
||||
rm "${ED}/usr/bin/python${PYVER}" || die
|
||||
dosym "${abiver}" "/usr/bin/python${PYVER}"
|
||||
# Create python3.X-config symlink
|
||||
dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
|
||||
# Create python-3.5m.pc symlink
|
||||
dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
|
||||
fi
|
||||
|
||||
# python seems to get rebuilt in src_install (bug 569908)
|
||||
# Work around it for now.
|
||||
if has_version dev-libs/libffi[pax-kernel]; then
|
||||
pax-mark E "${ED}/usr/bin/${abiver}"
|
||||
else
|
||||
pax-mark m "${ED}/usr/bin/${abiver}"
|
||||
fi
|
||||
|
||||
rm -r "${libdir}"/ensurepip/_bundled || die
|
||||
if ! use ensurepip; then
|
||||
rm -r "${libdir}"/ensurepip || die
|
||||
fi
|
||||
if ! use sqlite; then
|
||||
rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
|
||||
fi
|
||||
if ! use tk; then
|
||||
rm -r "${ED}/usr/bin/idle${PYVER}" || die
|
||||
rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
|
||||
fi
|
||||
|
||||
ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die
|
||||
|
||||
dodoc Misc/{ACKS,HISTORY,NEWS}
|
||||
|
||||
if use examples; then
|
||||
docinto examples
|
||||
find Tools -name __pycache__ -exec rm -fr {} + || die
|
||||
dodoc -r Tools
|
||||
fi
|
||||
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
|
||||
local libname=$(
|
||||
printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' |
|
||||
emake --no-print-directory -s -f - 2>/dev/null
|
||||
)
|
||||
newins Tools/gdb/libpython.py "${libname}"-gdb.py
|
||||
|
||||
newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
|
||||
newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
|
||||
sed \
|
||||
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
|
||||
-e "s:@PYDOC@:pydoc${PYVER}:" \
|
||||
-i "${ED}/etc/conf.d/pydoc-${PYVER}" \
|
||||
"${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
|
||||
|
||||
# python-exec wrapping support
|
||||
local pymajor=${PYVER%.*}
|
||||
local EPYTHON=python${PYVER}
|
||||
local scriptdir=${D}$(python_get_scriptdir)
|
||||
mkdir -p "${scriptdir}" || die
|
||||
# python and pythonX
|
||||
ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die
|
||||
ln -s "python${pymajor}" "${scriptdir}/python" || die
|
||||
# python-config and pythonX-config
|
||||
# note: we need to create a wrapper rather than symlinking it due
|
||||
# to some random dirname(argv[0]) magic performed by python-config
|
||||
cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
|
||||
#!/bin/sh
|
||||
exec "${abiver}-config" "\${@}"
|
||||
EOF
|
||||
chmod +x "${scriptdir}/python${pymajor}-config" || die
|
||||
ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die
|
||||
# 2to3, pydoc
|
||||
ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die
|
||||
ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die
|
||||
# idle
|
||||
if use tk; then
|
||||
ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die
|
||||
fi
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue