mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-24 12:01:59 +01:00
Merge pull request #2856 from flatcar/buildbot/weekly-portage-stable-package-updates-2025-04-28
Weekly portage-stable package updates 2025-04-28
This commit is contained in:
commit
88e86fd687
@ -16,7 +16,7 @@ SRC_URI="https://dev.gentoo.org/~ulm/eselect/${P}.tar.xz"
|
|||||||
|
|
||||||
LICENSE="GPL-2+ || ( GPL-2+ CC-BY-SA-4.0 )"
|
LICENSE="GPL-2+ || ( GPL-2+ CC-BY-SA-4.0 )"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
||||||
IUSE="doc emacs vim-syntax"
|
IUSE="doc emacs vim-syntax"
|
||||||
|
|
||||||
# coreutils for realpath
|
# coreutils for realpath
|
||||||
|
|||||||
@ -12,7 +12,7 @@ S="${WORKDIR}"/${P}/build/meson
|
|||||||
|
|
||||||
LICENSE="|| ( BSD GPL-2 )"
|
LICENSE="|| ( BSD GPL-2 )"
|
||||||
SLOT="0/1"
|
SLOT="0/1"
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
||||||
IUSE="+lzma lz4 static-libs test zlib"
|
IUSE="+lzma lz4 static-libs test zlib"
|
||||||
RESTRICT="!test? ( test )"
|
RESTRICT="!test? ( test )"
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
# Copyright 2023-2024 Gentoo Authors
|
# Copyright 2023-2025 Gentoo Authors
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
EAPI=8
|
EAPI=8
|
||||||
@ -15,7 +15,7 @@ if [[ ${PV} == 9999* ]]; then
|
|||||||
else
|
else
|
||||||
SRC_URI="${CARGO_CRATE_URIS}"
|
SRC_URI="${CARGO_CRATE_URIS}"
|
||||||
SRC_URI+="https://github.com/containers/aardvark-dns/releases/download/v${PV}/${PN}-v${PV}-vendor.tar.gz"
|
SRC_URI+="https://github.com/containers/aardvark-dns/releases/download/v${PV}/${PN}-v${PV}-vendor.tar.gz"
|
||||||
KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv"
|
KEYWORDS="amd64 arm64 ~loong ~ppc64 ~riscv"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# main
|
# main
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
# Copyright 1999-2024 Gentoo Authors
|
# Copyright 1999-2025 Gentoo Authors
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
EAPI=8
|
EAPI=8
|
||||||
@ -13,7 +13,7 @@ if [[ ${PV} == 9999* ]]; then
|
|||||||
EGIT_REPO_URI="https://github.com/containers/conmon.git"
|
EGIT_REPO_URI="https://github.com/containers/conmon.git"
|
||||||
else
|
else
|
||||||
SRC_URI="https://github.com/containers/conmon/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
SRC_URI="https://github.com/containers/conmon/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||||
KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv"
|
KEYWORDS="amd64 arm64 ~loong ~ppc64 ~riscv"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LICENSE="Apache-2.0"
|
LICENSE="Apache-2.0"
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
DIST containerd-2.0.2.tar.gz 10379986 BLAKE2B aee39f749f056965b899f6525bebe00d46b72b6c437efbd01ed890c5ae9c5d812464bc6d10e32aea20fd0c6df00d98cd30502dd73f9a27b0d8d143a5542976d9 SHA512 86eb24acfa5d4d87ae396f8888e2484693823fad897a29f1a5ada78e2318640927cfcff1e85415bfd6c66f5417e582203eb94976d52e3dd373997e6e2cbae354
|
DIST containerd-2.0.2.tar.gz 10379986 BLAKE2B aee39f749f056965b899f6525bebe00d46b72b6c437efbd01ed890c5ae9c5d812464bc6d10e32aea20fd0c6df00d98cd30502dd73f9a27b0d8d143a5542976d9 SHA512 86eb24acfa5d4d87ae396f8888e2484693823fad897a29f1a5ada78e2318640927cfcff1e85415bfd6c66f5417e582203eb94976d52e3dd373997e6e2cbae354
|
||||||
DIST containerd-2.0.3.tar.gz 10450757 BLAKE2B 5dec56a40dc2874fb0b6fd4d72704f6417858eefd983c8ec5dfb2c9ef8be1e9e309cff83395e03c2d5fef30ed5c0561329ffbcd3dfba91e40d8017f7a605771b SHA512 9528a65d9d9f13d15d861f7ce71ab483958020bda83947d18868b477204e9e2e33eccc69280502c54b2be9ce577724e3e2b1772229c99636099b04bac1079ac1
|
DIST containerd-2.0.3.tar.gz 10450757 BLAKE2B 5dec56a40dc2874fb0b6fd4d72704f6417858eefd983c8ec5dfb2c9ef8be1e9e309cff83395e03c2d5fef30ed5c0561329ffbcd3dfba91e40d8017f7a605771b SHA512 9528a65d9d9f13d15d861f7ce71ab483958020bda83947d18868b477204e9e2e33eccc69280502c54b2be9ce577724e3e2b1772229c99636099b04bac1079ac1
|
||||||
DIST containerd-2.0.4.tar.gz 10450939 BLAKE2B f82ed40eab0f1d186f4fb04217b8f75a9da8e33b1140c0b5866dcc61e17fe1040f31ef09bdb07ad98a52def5e9eb12cfeb635e96b2c5f64fdb4d8cfb6c84b885 SHA512 f84e0cc0b82313df010b95989faf56e81ebfbbc321585b968c8c706917b91a9f0d895692fa5046f24f1c370de7a74b50daf83da617fe0595e5a8ff69ed658727
|
DIST containerd-2.0.4.tar.gz 10450939 BLAKE2B f82ed40eab0f1d186f4fb04217b8f75a9da8e33b1140c0b5866dcc61e17fe1040f31ef09bdb07ad98a52def5e9eb12cfeb635e96b2c5f64fdb4d8cfb6c84b885 SHA512 f84e0cc0b82313df010b95989faf56e81ebfbbc321585b968c8c706917b91a9f0d895692fa5046f24f1c370de7a74b50daf83da617fe0595e5a8ff69ed658727
|
||||||
|
DIST containerd-2.0.5.tar.gz 10452563 BLAKE2B bf03316c9211eaa17a3b40b1fc9f9aca42fe3e621e086e612eb07c286c6b62bc7a0a2426ce7b6742dce2924d570ab599aefb43463c4fa6be277e562bad79668f SHA512 af89a5c9ad5f931c5fee33c75c13c296fc9ec966f2c64ec244897695eebb365bcb542f6b431e60d4ef7213f0ea11d3a8896d1b7f033ed445e6b521b7ddbffe6f
|
||||||
|
|||||||
90
sdk_container/src/third_party/portage-stable/app-containers/containerd/containerd-2.0.5.ebuild
vendored
Normal file
90
sdk_container/src/third_party/portage-stable/app-containers/containerd/containerd-2.0.5.ebuild
vendored
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
# Copyright 2022-2025 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=8
|
||||||
|
inherit go-module systemd
|
||||||
|
GIT_REVISION=fb4c30d4ede3531652d86197bf3fc9515e5276d9
|
||||||
|
|
||||||
|
DESCRIPTION="A daemon to control runC"
|
||||||
|
HOMEPAGE="https://containerd.io/"
|
||||||
|
SRC_URI="https://github.com/containerd/containerd/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||||
|
|
||||||
|
LICENSE="Apache-2.0"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
|
||||||
|
IUSE="apparmor btrfs device-mapper +cri hardened +seccomp selinux test"
|
||||||
|
|
||||||
|
COMMON_DEPEND="
|
||||||
|
btrfs? ( sys-fs/btrfs-progs )
|
||||||
|
seccomp? ( sys-libs/libseccomp )
|
||||||
|
"
|
||||||
|
|
||||||
|
DEPEND="
|
||||||
|
${COMMON_DEPEND}
|
||||||
|
"
|
||||||
|
|
||||||
|
# recommended minimum version of runc is found in script/setup/runc-version
|
||||||
|
RDEPEND="
|
||||||
|
${COMMON_DEPEND}
|
||||||
|
>=app-containers/runc-1.2.6[apparmor?,seccomp?]
|
||||||
|
"
|
||||||
|
|
||||||
|
BDEPEND="
|
||||||
|
dev-go/go-md2man
|
||||||
|
virtual/pkgconfig
|
||||||
|
"
|
||||||
|
|
||||||
|
# tests require root or docker
|
||||||
|
RESTRICT+="test"
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
sed -i \
|
||||||
|
-e "s/-s -w//" \
|
||||||
|
-e "s/-mod=readonly//" \
|
||||||
|
Makefile || die
|
||||||
|
sed -i \
|
||||||
|
-e "s:/usr/local:/usr:" \
|
||||||
|
containerd.service || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
local options=(
|
||||||
|
$(usev apparmor)
|
||||||
|
$(usex btrfs "" "no_btrfs")
|
||||||
|
$(usex cri "" "no_cri")
|
||||||
|
$(usex device-mapper "" "no_devmapper")
|
||||||
|
$(usev seccomp)
|
||||||
|
$(usev selinux)
|
||||||
|
)
|
||||||
|
|
||||||
|
myemakeargs=(
|
||||||
|
BUILDTAGS="${options[*]}"
|
||||||
|
LDFLAGS="$(usex hardened '-extldflags -fno-PIC' '')"
|
||||||
|
REVISION="${GIT_REVISION}"
|
||||||
|
VERSION=v${PV}
|
||||||
|
)
|
||||||
|
|
||||||
|
# race condition in man target https://bugs.gentoo.org/765100
|
||||||
|
# we need to explicitly specify GOFLAGS for "go run" to use vendor source
|
||||||
|
emake "${myemakeargs[@]}" man -j1 #nowarn
|
||||||
|
emake "${myemakeargs[@]}" all
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
rm bin/gen-manpages || die
|
||||||
|
dobin bin/*
|
||||||
|
doman man/*
|
||||||
|
newconfd "${FILESDIR}"/${PN}.confd "${PN}"
|
||||||
|
newinitd "${FILESDIR}"/${PN}.initd "${PN}"
|
||||||
|
systemd_dounit containerd.service
|
||||||
|
keepdir /var/lib/containerd
|
||||||
|
|
||||||
|
# we already installed manpages, remove markdown source
|
||||||
|
# before installing docs directory
|
||||||
|
rm -r docs/man || die
|
||||||
|
|
||||||
|
local DOCS=( ADOPTERS.md README.md RELEASES.md ROADMAP.md SCOPE.md docs/. )
|
||||||
|
einstalldocs
|
||||||
|
}
|
||||||
@ -1,2 +1,3 @@
|
|||||||
DIST containers-common-0.60.4.tar.gz 13106900 BLAKE2B 1afb428044bc8eebd002b884f2a2072971cd83fca561fd509b83088ccdf82b3a62d63ff32ec5ef856c3d0ee0ffac316201fa8f1d7956153ce30e2244cc860f02 SHA512 5d61415d4959486223a36ff98304363a558e6da9ccbdca94f976649a37d404ac00c8454019f60a79360029c91c9565d22868b109dbb84c19f13377e0e23dcc4d
|
DIST containers-common-0.60.4.tar.gz 13106900 BLAKE2B 1afb428044bc8eebd002b884f2a2072971cd83fca561fd509b83088ccdf82b3a62d63ff32ec5ef856c3d0ee0ffac316201fa8f1d7956153ce30e2244cc860f02 SHA512 5d61415d4959486223a36ff98304363a558e6da9ccbdca94f976649a37d404ac00c8454019f60a79360029c91c9565d22868b109dbb84c19f13377e0e23dcc4d
|
||||||
DIST containers-common-0.62.2.tar.gz 13367528 BLAKE2B 05a16b12cdf89263836df4b4d09ff7b12aba758a08c4f85a0c124dfb378a28fcb33dc6fa41adc81b33e4c3b0949344cc18af5537d3b741bdd07498e7b13e52be SHA512 5e4b6bc6df79e75e5360130ef7b837e216c05955e03968b8df44997c4d88fc095e5ab2ed5db716edaccfb912063d29ba54460231ae5907413da3b6f9771d095e
|
DIST containers-common-0.62.2.tar.gz 13367528 BLAKE2B 05a16b12cdf89263836df4b4d09ff7b12aba758a08c4f85a0c124dfb378a28fcb33dc6fa41adc81b33e4c3b0949344cc18af5537d3b741bdd07498e7b13e52be SHA512 5e4b6bc6df79e75e5360130ef7b837e216c05955e03968b8df44997c4d88fc095e5ab2ed5db716edaccfb912063d29ba54460231ae5907413da3b6f9771d095e
|
||||||
|
DIST containers-common-0.63.0.tar.gz 13516320 BLAKE2B f9d57d11210041065f2d5479d68d0318d5d49c634038f7db8601becc1c6bb801314a5aaacb6392f3f802ed8acde60284d78d49351ea8a8f9eaa3a3c449ba5727 SHA512 5d09a5d5fda8a3bafc2b1954b8b82cbc73747e9a088f220090d790cca203f330d0dbe45148a6ea2808448705506f4ff13ca05c85a2c2643cceff41cbe0f5ce9f
|
||||||
|
|||||||
@ -14,7 +14,7 @@ if [[ ${PV} == 9999* ]]; then
|
|||||||
else
|
else
|
||||||
SRC_URI="https://github.com/containers/common/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
SRC_URI="https://github.com/containers/common/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||||
S="${WORKDIR}/${P#containers-}"
|
S="${WORKDIR}/${P#containers-}"
|
||||||
KEYWORDS="~amd64 ~arm64 ~loong ~riscv"
|
KEYWORDS="amd64 arm64 ~loong ~riscv"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LICENSE="Apache-2.0"
|
LICENSE="Apache-2.0"
|
||||||
|
|||||||
@ -0,0 +1,83 @@
|
|||||||
|
# Copyright 1999-2025 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
inherit readme.gentoo-r1
|
||||||
|
|
||||||
|
DESCRIPTION="Common config files and docs for Containers stack"
|
||||||
|
HOMEPAGE="https://github.com/containers/common"
|
||||||
|
|
||||||
|
if [[ ${PV} == 9999* ]]; then
|
||||||
|
inherit git-r3
|
||||||
|
EGIT_REPO_URI="https://github.com/containers/common.git"
|
||||||
|
else
|
||||||
|
SRC_URI="https://github.com/containers/common/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||||
|
S="${WORKDIR}/${P#containers-}"
|
||||||
|
KEYWORDS="~amd64 ~arm64 ~loong ~riscv"
|
||||||
|
fi
|
||||||
|
|
||||||
|
LICENSE="Apache-2.0"
|
||||||
|
SLOT="0"
|
||||||
|
RESTRICT="test"
|
||||||
|
RDEPEND="
|
||||||
|
>=app-containers/aardvark-dns-1.12.0
|
||||||
|
>=app-containers/crun-1.17
|
||||||
|
>=app-containers/containers-image-5.32.0
|
||||||
|
>=app-containers/containers-storage-1.55.0
|
||||||
|
app-containers/containers-shortnames
|
||||||
|
>=app-containers/netavark-1.12.0
|
||||||
|
net-firewall/nftables
|
||||||
|
net-firewall/iptables[nftables]
|
||||||
|
>=net-misc/passt-2024.09.06
|
||||||
|
>=sys-fs/fuse-overlayfs-1.14
|
||||||
|
"
|
||||||
|
|
||||||
|
BDEPEND="
|
||||||
|
>=dev-go/go-md2man-2.0.3
|
||||||
|
"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}/examplify-mounts-conf.patch"
|
||||||
|
)
|
||||||
|
|
||||||
|
DOC_CONTENTS="\n
|
||||||
|
For rootless operations, one needs to configure subuid(5) and subgid(5)\n
|
||||||
|
See /etc/sub{uid,gid} to check whether rootless user is already configured\n
|
||||||
|
If not, quickly configure it with:\n
|
||||||
|
usermod --add-subuids 1065536-1131071 <rootless user>\n
|
||||||
|
usermod --add-subgids 1065536-1131071 <rootless user>\n
|
||||||
|
"
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
|
||||||
|
[[ -f docs/Makefile && -f Makefile ]] || die
|
||||||
|
sed -i -e 's|/usr/local|/usr|g;' docs/Makefile Makefile || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
emake docs
|
||||||
|
touch {images,layers}.lock || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
emake DESTDIR="${ED}" install
|
||||||
|
readme.gentoo_create_doc
|
||||||
|
|
||||||
|
insinto /usr/share/containers
|
||||||
|
doins pkg/seccomp/seccomp.json pkg/subscriptions/mounts.conf
|
||||||
|
|
||||||
|
keepdir /etc/containers/{certs.d,oci/hooks.d,networks,systemd} /var/lib/containers/sigstore \
|
||||||
|
/usr/lib/containers/storage
|
||||||
|
diropts -m0700
|
||||||
|
dodir /usr/lib/containers/storage/overlay-{images,layers}
|
||||||
|
for i in images layers; do
|
||||||
|
insinto /usr/lib/containers/storage/overlay-"${i}"
|
||||||
|
doins "${i}".lock
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
readme.gentoo_print_elog
|
||||||
|
}
|
||||||
@ -12,7 +12,7 @@ if [[ ${PV} == 9999* ]]; then
|
|||||||
else
|
else
|
||||||
SRC_URI="https://github.com/containers/image/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
SRC_URI="https://github.com/containers/image/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||||
S="${WORKDIR}/${P#containers-}"
|
S="${WORKDIR}/${P#containers-}"
|
||||||
KEYWORDS="~amd64 ~arm64 ~loong ~riscv"
|
KEYWORDS="amd64 arm64 ~loong ~riscv"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LICENSE="Apache-2.0"
|
LICENSE="Apache-2.0"
|
||||||
|
|||||||
@ -12,7 +12,7 @@ if [[ ${PV} == 9999* ]]; then
|
|||||||
else
|
else
|
||||||
SRC_URI="https://github.com/containers/shortnames/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
SRC_URI="https://github.com/containers/shortnames/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||||
S="${WORKDIR}/${P#containers-}"
|
S="${WORKDIR}/${P#containers-}"
|
||||||
KEYWORDS="~amd64 ~arm64 ~loong ~riscv"
|
KEYWORDS="amd64 arm64 ~loong ~riscv"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LICENSE="Apache-2.0"
|
LICENSE="Apache-2.0"
|
||||||
|
|||||||
@ -12,7 +12,7 @@ if [[ ${PV} == 9999* ]]; then
|
|||||||
else
|
else
|
||||||
SRC_URI="https://github.com/containers/storage/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
SRC_URI="https://github.com/containers/storage/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||||
S="${WORKDIR}/${P#containers-}"
|
S="${WORKDIR}/${P#containers-}"
|
||||||
KEYWORDS="~amd64 ~arm64 ~loong ~riscv"
|
KEYWORDS="amd64 arm64 ~loong ~riscv"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LICENSE="Apache-2.0"
|
LICENSE="Apache-2.0"
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
# Copyright 2019-2024 Gentoo Authors
|
# Copyright 2019-2025 Gentoo Authors
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
EAPI=8
|
EAPI=8
|
||||||
|
|
||||||
PYTHON_COMPAT=( python3_{10..12} )
|
PYTHON_COMPAT=( python3_{10..12} )
|
||||||
|
|
||||||
inherit python-any-r1
|
inherit libtool python-any-r1
|
||||||
|
|
||||||
DESCRIPTION="A fast and low-memory footprint OCI Container Runtime fully written in C"
|
DESCRIPTION="A fast and low-memory footprint OCI Container Runtime fully written in C"
|
||||||
HOMEPAGE="https://github.com/containers/crun"
|
HOMEPAGE="https://github.com/containers/crun"
|
||||||
@ -43,6 +43,11 @@ BDEPEND="
|
|||||||
# required to create linux "containers".
|
# required to create linux "containers".
|
||||||
RESTRICT="test"
|
RESTRICT="test"
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
elibtoolize
|
||||||
|
}
|
||||||
|
|
||||||
src_configure() {
|
src_configure() {
|
||||||
local myeconfargs=(
|
local myeconfargs=(
|
||||||
$(use_enable bpf)
|
$(use_enable bpf)
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
# Copyright 2019-2024 Gentoo Authors
|
# Copyright 2019-2025 Gentoo Authors
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
EAPI=8
|
EAPI=8
|
||||||
|
|
||||||
PYTHON_COMPAT=( python3_{10..13} )
|
PYTHON_COMPAT=( python3_{10..13} )
|
||||||
|
|
||||||
inherit python-any-r1
|
inherit libtool python-any-r1
|
||||||
|
|
||||||
DESCRIPTION="A fast and low-memory footprint OCI Container Runtime fully written in C"
|
DESCRIPTION="A fast and low-memory footprint OCI Container Runtime fully written in C"
|
||||||
HOMEPAGE="https://github.com/containers/crun"
|
HOMEPAGE="https://github.com/containers/crun"
|
||||||
@ -37,6 +37,11 @@ BDEPEND="
|
|||||||
virtual/pkgconfig
|
virtual/pkgconfig
|
||||||
"
|
"
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
elibtoolize
|
||||||
|
}
|
||||||
|
|
||||||
src_configure() {
|
src_configure() {
|
||||||
local myeconfargs=(
|
local myeconfargs=(
|
||||||
$(use_enable bpf)
|
$(use_enable bpf)
|
||||||
|
|||||||
@ -5,7 +5,7 @@ EAPI=8
|
|||||||
|
|
||||||
PYTHON_COMPAT=( python3_{10..13} )
|
PYTHON_COMPAT=( python3_{10..13} )
|
||||||
|
|
||||||
inherit python-any-r1
|
inherit libtool python-any-r1
|
||||||
|
|
||||||
DESCRIPTION="A fast and low-memory footprint OCI Container Runtime fully written in C"
|
DESCRIPTION="A fast and low-memory footprint OCI Container Runtime fully written in C"
|
||||||
HOMEPAGE="https://github.com/containers/crun"
|
HOMEPAGE="https://github.com/containers/crun"
|
||||||
@ -37,6 +37,11 @@ BDEPEND="
|
|||||||
virtual/pkgconfig
|
virtual/pkgconfig
|
||||||
"
|
"
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
elibtoolize
|
||||||
|
}
|
||||||
|
|
||||||
src_configure() {
|
src_configure() {
|
||||||
local myeconfargs=(
|
local myeconfargs=(
|
||||||
--cache-file="${S}"/config.cache
|
--cache-file="${S}"/config.cache
|
||||||
|
|||||||
@ -5,7 +5,7 @@ EAPI=8
|
|||||||
|
|
||||||
PYTHON_COMPAT=( python3_{10..13} )
|
PYTHON_COMPAT=( python3_{10..13} )
|
||||||
|
|
||||||
inherit python-any-r1
|
inherit libtool python-any-r1
|
||||||
|
|
||||||
DESCRIPTION="A fast and low-memory footprint OCI Container Runtime fully written in C"
|
DESCRIPTION="A fast and low-memory footprint OCI Container Runtime fully written in C"
|
||||||
HOMEPAGE="https://github.com/containers/crun"
|
HOMEPAGE="https://github.com/containers/crun"
|
||||||
@ -37,6 +37,11 @@ BDEPEND="
|
|||||||
virtual/pkgconfig
|
virtual/pkgconfig
|
||||||
"
|
"
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
elibtoolize
|
||||||
|
}
|
||||||
|
|
||||||
src_configure() {
|
src_configure() {
|
||||||
local myeconfargs=(
|
local myeconfargs=(
|
||||||
--cache-file="${S}"/config.cache
|
--cache-file="${S}"/config.cache
|
||||||
|
|||||||
@ -5,7 +5,7 @@ EAPI=8
|
|||||||
|
|
||||||
PYTHON_COMPAT=( python3_{10..13} )
|
PYTHON_COMPAT=( python3_{10..13} )
|
||||||
|
|
||||||
inherit python-any-r1
|
inherit libtool python-any-r1
|
||||||
|
|
||||||
DESCRIPTION="A fast and low-memory footprint OCI Container Runtime fully written in C"
|
DESCRIPTION="A fast and low-memory footprint OCI Container Runtime fully written in C"
|
||||||
HOMEPAGE="https://github.com/containers/crun"
|
HOMEPAGE="https://github.com/containers/crun"
|
||||||
@ -37,6 +37,11 @@ BDEPEND="
|
|||||||
virtual/pkgconfig
|
virtual/pkgconfig
|
||||||
"
|
"
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
elibtoolize
|
||||||
|
}
|
||||||
|
|
||||||
src_configure() {
|
src_configure() {
|
||||||
local myeconfargs=(
|
local myeconfargs=(
|
||||||
--cache-file="${S}"/config.cache
|
--cache-file="${S}"/config.cache
|
||||||
|
|||||||
@ -13,7 +13,7 @@ if [[ ${PV} == 9999 ]]; then
|
|||||||
EGIT_REPO_URI="https://github.com/docker/buildx.git"
|
EGIT_REPO_URI="https://github.com/docker/buildx.git"
|
||||||
else
|
else
|
||||||
SRC_URI="https://github.com/docker/buildx/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
|
SRC_URI="https://github.com/docker/buildx/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
|
KEYWORDS="amd64 ~arm arm64 ppc64 ~riscv ~x86"
|
||||||
S=${WORKDIR}/${P#docker-}
|
S=${WORKDIR}/${P#docker-}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@ -2,3 +2,5 @@ DIST docker-cli-28.0.1-man.tar.xz 70360 BLAKE2B 395736a74b314530fbbd6bf4016f7f21
|
|||||||
DIST docker-cli-28.0.1.tar.gz 7413092 BLAKE2B 69075ba24eb7c46593d7c4ab80499b67994119af8096409f55eec9524173cb8d37263159cd834e3cfaf4e8d169b568232d400633b2d9b08112ced05c78338f92 SHA512 c3d7ca21b88c5f6925f6c99519a67581fd6c264cc96e6c0bc00751f87de6580a2d443cbe59b2e36771e37a78fe05ea054e292675e19bc4d73fcacfda047e0490
|
DIST docker-cli-28.0.1.tar.gz 7413092 BLAKE2B 69075ba24eb7c46593d7c4ab80499b67994119af8096409f55eec9524173cb8d37263159cd834e3cfaf4e8d169b568232d400633b2d9b08112ced05c78338f92 SHA512 c3d7ca21b88c5f6925f6c99519a67581fd6c264cc96e6c0bc00751f87de6580a2d443cbe59b2e36771e37a78fe05ea054e292675e19bc4d73fcacfda047e0490
|
||||||
DIST docker-cli-28.0.4-man.tar.xz 70440 BLAKE2B 676eeafda725c759074124e1ccef693d3f0232e2acf3c2b468d28f48e7228b36c885d690cf041bab775b8410e65c1c6f1403b712a869a5610a03ae788f175a0b SHA512 e36dccb3ea043b722993001ebc36180874b65df5fdd446c52ad2902812097a456ee5d1d432e4c5f5db553213c9956c1f2ef3d07e171760f1e29248f3a6dedf9f
|
DIST docker-cli-28.0.4-man.tar.xz 70440 BLAKE2B 676eeafda725c759074124e1ccef693d3f0232e2acf3c2b468d28f48e7228b36c885d690cf041bab775b8410e65c1c6f1403b712a869a5610a03ae788f175a0b SHA512 e36dccb3ea043b722993001ebc36180874b65df5fdd446c52ad2902812097a456ee5d1d432e4c5f5db553213c9956c1f2ef3d07e171760f1e29248f3a6dedf9f
|
||||||
DIST docker-cli-28.0.4.tar.gz 7504883 BLAKE2B c975eff2bb4c0dd5430a67418804e8649c733a59ac6b2beb9f2a454a8e8839e12afbf61afccb1e3bd0cb2e38c51fbd59fee3de45490a02ec9ad074cd365ece2c SHA512 fd7562815686fece20a0ea95501612e049e90192305464b06770643ae864baa87b0fb87fddadeb4f9beb33352940cef63ffd24af8b989e309cd5be5f32eddf62
|
DIST docker-cli-28.0.4.tar.gz 7504883 BLAKE2B c975eff2bb4c0dd5430a67418804e8649c733a59ac6b2beb9f2a454a8e8839e12afbf61afccb1e3bd0cb2e38c51fbd59fee3de45490a02ec9ad074cd365ece2c SHA512 fd7562815686fece20a0ea95501612e049e90192305464b06770643ae864baa87b0fb87fddadeb4f9beb33352940cef63ffd24af8b989e309cd5be5f32eddf62
|
||||||
|
DIST docker-cli-28.1.1-man.tar.xz 69976 BLAKE2B 497c0874a5ed72c3d2dff6c77b687f012c6a6d4dda67f138e3bf051bf019914efda53d85ffde003e5aea11f849dc199a34b17a1325d439b74e3ccc6f4e324d11 SHA512 06a2e65fe376dcb84474f116f6b2fd04afb6ce5fcd2ed5d3a27e4f7a2f5e849ff0317720936bb75b300ef85eacbf41cd9b9af34345e35c5254ff8c1036e25d7f
|
||||||
|
DIST docker-cli-28.1.1.tar.gz 7518124 BLAKE2B 2d9a1b620d4cffa718571cef9aa1825b57600630624715ccdae50a1bbcc44821d599ea2f6e6c66628434740904d53218e101f69b4fd0865b4197ef19d9c2d4fe SHA512 39ff5f982779b70311d4fce5f829e52199b058cedf92c0e650786a52004edbf3935f8673db98527affc57f0e33be435f8a8af624c2e06f28c7f8f405ed570746
|
||||||
|
|||||||
74
sdk_container/src/third_party/portage-stable/app-containers/docker-cli/docker-cli-28.1.1.ebuild
vendored
Normal file
74
sdk_container/src/third_party/portage-stable/app-containers/docker-cli/docker-cli-28.1.1.ebuild
vendored
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
# Copyright 1999-2025 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
inherit bash-completion-r1 go-module
|
||||||
|
MY_PV=${PV/_/-}
|
||||||
|
|
||||||
|
# update this on every bump
|
||||||
|
GIT_COMMIT=4eba3773274f9d21ba90ae5bc719c3f1e4bb07a1
|
||||||
|
|
||||||
|
# To create the man pages tarball, run the following in the git source
|
||||||
|
# directory:
|
||||||
|
#git checkout ${PV}
|
||||||
|
# make manpages
|
||||||
|
# tar -acf ${P}-man.tar.xz man/man?
|
||||||
|
|
||||||
|
DESCRIPTION="the command line binary for docker"
|
||||||
|
HOMEPAGE="https://www.docker.com/"
|
||||||
|
SRC_URI="https://github.com/docker/cli/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
|
||||||
|
SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-man.tar.xz"
|
||||||
|
S="${WORKDIR}/cli-${PV}"
|
||||||
|
|
||||||
|
LICENSE="Apache-2.0"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
|
||||||
|
IUSE="hardened selinux"
|
||||||
|
|
||||||
|
RDEPEND="selinux? ( sec-policy/selinux-docker )"
|
||||||
|
|
||||||
|
RESTRICT="installsources strip test"
|
||||||
|
|
||||||
|
src_unpack() {
|
||||||
|
default
|
||||||
|
cd "${S}"
|
||||||
|
ln -s vendor.mod go.mod
|
||||||
|
ln -s vendor.sum go.sum
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
sed -i 's@dockerd\?\.exe@@g' contrib/completion/bash/docker || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
export DISABLE_WARN_OUTSIDE_CONTAINER=1
|
||||||
|
# setup CFLAGS and LDFLAGS for separate build target
|
||||||
|
# see https://github.com/tianon/docker-overlay/pull/10
|
||||||
|
CGO_CFLAGS+=" -I${ESYSROOT}/usr/include"
|
||||||
|
CGO_LDFLAGS+=" -L${ESYSROOT}/usr/$(get_libdir)"
|
||||||
|
emake \
|
||||||
|
LDFLAGS="$(usex hardened '-extldflags -fno-PIC' '')" \
|
||||||
|
VERSION="${PV}" \
|
||||||
|
GITCOMMIT="${GIT_COMMIT}" \
|
||||||
|
dynbinary
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
dobin build/docker
|
||||||
|
doman "${WORKDIR}"/man/man?/*
|
||||||
|
dobashcomp contrib/completion/bash/docker
|
||||||
|
bashcomp_alias docker dockerd
|
||||||
|
insinto /usr/share/fish/vendor_completions.d/
|
||||||
|
doins contrib/completion/fish/docker.fish
|
||||||
|
insinto /usr/share/zsh/site-functions
|
||||||
|
doins contrib/completion/zsh/_*
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
has_version "app-containers/docker-buildx" && return
|
||||||
|
ewarn "the 'docker build' command is deprecated and will be removed in a"
|
||||||
|
ewarn "future release. If you need this functionality, install"
|
||||||
|
ewarn "app-containers/docker-buildx."
|
||||||
|
}
|
||||||
@ -1,2 +1,3 @@
|
|||||||
DIST docker-28.0.1.tar.gz 17553228 BLAKE2B 8c172d58fb75d307983ace06b509e86ed533729d75a27af114939cad9022980f692368249f6ef514912aa90f1fa09998fd658377e28d2e2577d53b6f745cf5db SHA512 58c77ae139e5d32c4c263fa14ec4457f50240a15cd7934b4d2576af0295bfb5b62abbeef0ba78815f9041a01dbe3a8b35351eaebea1f584f54ef0d4192734048
|
DIST docker-28.0.1.tar.gz 17553228 BLAKE2B 8c172d58fb75d307983ace06b509e86ed533729d75a27af114939cad9022980f692368249f6ef514912aa90f1fa09998fd658377e28d2e2577d53b6f745cf5db SHA512 58c77ae139e5d32c4c263fa14ec4457f50240a15cd7934b4d2576af0295bfb5b62abbeef0ba78815f9041a01dbe3a8b35351eaebea1f584f54ef0d4192734048
|
||||||
DIST docker-28.0.4.tar.gz 17579330 BLAKE2B 3b1ecb6ddceea0fe772bd597bf6b3c4b5867b691e35bbb0b05ad6ab0c4dc79193dbde02cdcb45c607c0dd704aeaa9629deffb098a0d1533dd3f5e9fb882ef34f SHA512 dfa6bc18c7cecf82c80e45c6a615e0cccb866a993ad2b6c3134e0f0d5d069b5abb0b8201029019a5396353f666252b5fd36b6a34080723af46291d3fda1c2608
|
DIST docker-28.0.4.tar.gz 17579330 BLAKE2B 3b1ecb6ddceea0fe772bd597bf6b3c4b5867b691e35bbb0b05ad6ab0c4dc79193dbde02cdcb45c607c0dd704aeaa9629deffb098a0d1533dd3f5e9fb882ef34f SHA512 dfa6bc18c7cecf82c80e45c6a615e0cccb866a993ad2b6c3134e0f0d5d069b5abb0b8201029019a5396353f666252b5fd36b6a34080723af46291d3fda1c2608
|
||||||
|
DIST docker-28.1.1.tar.gz 17719438 BLAKE2B 95307e9c03e4c1ad436fffe321f69c269c0fba9fea22c56963b503a051360b9a38170c865e42674ca17adde6690ed14da5039539e7f8d082e1304191d25c9ddb SHA512 15de0a10dc9d60be5c6047a30be5065ee69b9cde938654363cd27d71103057cc78510f546f7b161ba5f0b8b764dc6167e4ffebbcc9e69b171fe49ee1e09e97b2
|
||||||
|
|||||||
333
sdk_container/src/third_party/portage-stable/app-containers/docker/docker-28.1.1.ebuild
vendored
Normal file
333
sdk_container/src/third_party/portage-stable/app-containers/docker/docker-28.1.1.ebuild
vendored
Normal file
@ -0,0 +1,333 @@
|
|||||||
|
# Copyright 1999-2025 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=8
|
||||||
|
MY_PV=${PV/_/-}
|
||||||
|
|
||||||
|
inherit go-module linux-info optfeature systemd toolchain-funcs udev
|
||||||
|
|
||||||
|
GIT_COMMIT=01f442b84d6a669c1e335b800d4670997cd5aa93
|
||||||
|
|
||||||
|
DESCRIPTION="The core functions you need to create Docker images and run Docker containers"
|
||||||
|
HOMEPAGE="https://www.docker.com/"
|
||||||
|
SRC_URI="https://github.com/moby/moby/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
|
||||||
|
S="${WORKDIR}/moby-${PV}"
|
||||||
|
|
||||||
|
LICENSE="Apache-2.0"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
|
||||||
|
IUSE="apparmor btrfs +container-init cuda +overlay2 seccomp selinux systemd"
|
||||||
|
|
||||||
|
DEPEND="
|
||||||
|
acct-group/docker
|
||||||
|
>=dev-db/sqlite-3.7.9:3
|
||||||
|
apparmor? ( sys-libs/libapparmor )
|
||||||
|
btrfs? ( >=sys-fs/btrfs-progs-3.16.1 )
|
||||||
|
seccomp? ( >=sys-libs/libseccomp-2.2.1 )
|
||||||
|
systemd? ( sys-apps/systemd )
|
||||||
|
"
|
||||||
|
|
||||||
|
# https://github.com/moby/moby/blob/master/project/PACKAGERS.md#runtime-dependencies
|
||||||
|
# https://github.com/moby/moby/blob/master/project/PACKAGERS.md#optional-dependencies
|
||||||
|
RDEPEND="
|
||||||
|
${DEPEND}
|
||||||
|
>=net-firewall/iptables-1.4
|
||||||
|
sys-process/procps
|
||||||
|
>=dev-vcs/git-1.7
|
||||||
|
>=app-arch/xz-utils-4.9
|
||||||
|
>=app-containers/containerd-2.0.5[apparmor?,btrfs?,seccomp?]
|
||||||
|
>=app-containers/runc-1.2.5[apparmor?,seccomp?]
|
||||||
|
!app-containers/docker-proxy
|
||||||
|
!<app-containers/docker-cli-${PV}
|
||||||
|
container-init? ( >=sys-process/tini-0.19.0[static] )
|
||||||
|
cuda? ( app-containers/nvidia-container-toolkit )
|
||||||
|
selinux? ( sec-policy/selinux-docker )
|
||||||
|
"
|
||||||
|
|
||||||
|
# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies
|
||||||
|
BDEPEND="
|
||||||
|
dev-go/go-md2man
|
||||||
|
virtual/pkgconfig
|
||||||
|
"
|
||||||
|
# tests require running dockerd as root and downloading containers
|
||||||
|
RESTRICT="installsources strip test"
|
||||||
|
|
||||||
|
# https://bugs.gentoo.org/748984 https://github.com/etcd-io/etcd/pull/12552
|
||||||
|
pkg_setup() {
|
||||||
|
# this is based on "contrib/check-config.sh" from upstream's sources
|
||||||
|
# required features.
|
||||||
|
CONFIG_CHECK="
|
||||||
|
~NAMESPACES ~NET_NS ~PID_NS ~IPC_NS ~UTS_NS
|
||||||
|
~CGROUPS ~CGROUP_CPUACCT ~CGROUP_DEVICE ~CGROUP_FREEZER ~CGROUP_SCHED ~CPUSETS ~MEMCG
|
||||||
|
~KEYS
|
||||||
|
~VETH ~BRIDGE ~BRIDGE_NETFILTER
|
||||||
|
~IP_NF_FILTER ~IP_NF_RAW ~IP_NF_TARGET_MASQUERADE
|
||||||
|
~NETFILTER_XT_MATCH_ADDRTYPE
|
||||||
|
~NETFILTER_XT_MATCH_CONNTRACK
|
||||||
|
~NETFILTER_XT_MATCH_IPVS
|
||||||
|
~NETFILTER_XT_MARK
|
||||||
|
~IP_NF_NAT ~NF_NAT
|
||||||
|
~POSIX_MQUEUE
|
||||||
|
"
|
||||||
|
WARNING_POSIX_MQUEUE="CONFIG_POSIX_MQUEUE: is required for bind-mounting /dev/mqueue into containers"
|
||||||
|
|
||||||
|
if kernel_is lt 4 8; then
|
||||||
|
CONFIG_CHECK+="
|
||||||
|
~DEVPTS_MULTIPLE_INSTANCES
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if kernel_is le 5 1; then
|
||||||
|
CONFIG_CHECK+="
|
||||||
|
~NF_NAT_IPV4
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if kernel_is le 5 2; then
|
||||||
|
CONFIG_CHECK+="
|
||||||
|
~NF_NAT_NEEDED
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if kernel_is ge 4 15; then
|
||||||
|
CONFIG_CHECK+="
|
||||||
|
~CGROUP_BPF
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# optional features
|
||||||
|
CONFIG_CHECK+="
|
||||||
|
~USER_NS
|
||||||
|
"
|
||||||
|
|
||||||
|
if use seccomp; then
|
||||||
|
CONFIG_CHECK+="
|
||||||
|
~SECCOMP ~SECCOMP_FILTER
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
CONFIG_CHECK+="
|
||||||
|
~CGROUP_PIDS
|
||||||
|
"
|
||||||
|
|
||||||
|
if kernel_is lt 6 1; then
|
||||||
|
CONFIG_CHECK+="
|
||||||
|
~MEMCG_SWAP
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if kernel_is le 5 8; then
|
||||||
|
CONFIG_CHECK+="
|
||||||
|
~MEMCG_SWAP_ENABLED
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
CONFIG_CHECK+="
|
||||||
|
~!LEGACY_VSYSCALL_NATIVE
|
||||||
|
"
|
||||||
|
if kernel_is lt 5 19; then
|
||||||
|
CONFIG_CHECK+="
|
||||||
|
~LEGACY_VSYSCALL_EMULATE
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
CONFIG_CHECK+="
|
||||||
|
~!LEGACY_VSYSCALL_NONE
|
||||||
|
"
|
||||||
|
WARNING_LEGACY_VSYSCALL_NONE="CONFIG_LEGACY_VSYSCALL_NONE enabled: \
|
||||||
|
Containers with <=glibc-2.13 will not work"
|
||||||
|
|
||||||
|
if kernel_is le 4 5; then
|
||||||
|
CONFIG_CHECK+="
|
||||||
|
~MEMCG_KMEM
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if kernel_is lt 5; then
|
||||||
|
CONFIG_CHECK+="
|
||||||
|
~IOSCHED_CFQ ~CFQ_GROUP_IOSCHED
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
CONFIG_CHECK+="
|
||||||
|
~BLK_CGROUP ~BLK_DEV_THROTTLING
|
||||||
|
~CGROUP_PERF
|
||||||
|
~CGROUP_HUGETLB
|
||||||
|
~NET_CLS_CGROUP ~CGROUP_NET_PRIO
|
||||||
|
~CFS_BANDWIDTH ~FAIR_GROUP_SCHED
|
||||||
|
~IP_NF_TARGET_REDIRECT
|
||||||
|
~IP_VS
|
||||||
|
~IP_VS_NFCT
|
||||||
|
~IP_VS_PROTO_TCP
|
||||||
|
~IP_VS_PROTO_UDP
|
||||||
|
~IP_VS_RR
|
||||||
|
"
|
||||||
|
|
||||||
|
if use selinux; then
|
||||||
|
CONFIG_CHECK+="
|
||||||
|
~SECURITY_SELINUX
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use apparmor; then
|
||||||
|
CONFIG_CHECK+="
|
||||||
|
~SECURITY_APPARMOR
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if ! is_set EXT4_USE_FOR_EXT2; then
|
||||||
|
# check_flags EXT3_FS EXT3_FS_XATTR EXT3_FS_POSIX_ACL EXT3_FS_SECURITY
|
||||||
|
# if ! is_set EXT3_FS || ! is_set EXT3_FS_XATTR || ! is_set EXT3_FS_POSIX_ACL || ! is_set EXT3_FS_SECURITY; then
|
||||||
|
# echo " $(wrap_color '(enable these ext3 configs if you are using ext3 as backing filesystem)' bold black)"
|
||||||
|
# fi
|
||||||
|
# fi
|
||||||
|
|
||||||
|
CONFIG_CHECK+="
|
||||||
|
~EXT4_FS ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY
|
||||||
|
"
|
||||||
|
|
||||||
|
# if ! is_set EXT4_FS || ! is_set EXT4_FS_POSIX_ACL || ! is_set EXT4_FS_SECURITY; then
|
||||||
|
# if is_set EXT4_USE_FOR_EXT2; then
|
||||||
|
# echo " $(wrap_color 'enable these ext4 configs if you are using ext3 or ext4 as backing filesystem' bold black)"
|
||||||
|
# else
|
||||||
|
# echo " $(wrap_color 'enable these ext4 configs if you are using ext4 as backing filesystem' bold black)"
|
||||||
|
# fi
|
||||||
|
# fi
|
||||||
|
|
||||||
|
# network drivers
|
||||||
|
CONFIG_CHECK+="
|
||||||
|
~VXLAN ~BRIDGE_VLAN_FILTERING
|
||||||
|
~CRYPTO ~CRYPTO_AEAD ~CRYPTO_GCM ~CRYPTO_SEQIV ~CRYPTO_GHASH
|
||||||
|
~XFRM ~XFRM_USER ~XFRM_ALGO ~INET_ESP
|
||||||
|
"
|
||||||
|
if kernel_is le 5 3; then
|
||||||
|
CONFIG_CHECK+="
|
||||||
|
~INET_XFRM_MODE_TRANSPORT
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
CONFIG_CHECK+="
|
||||||
|
~IPVLAN
|
||||||
|
"
|
||||||
|
CONFIG_CHECK+="
|
||||||
|
~MACVLAN ~DUMMY
|
||||||
|
"
|
||||||
|
CONFIG_CHECK+="
|
||||||
|
~NF_NAT_FTP ~NF_CONNTRACK_FTP ~NF_NAT_TFTP ~NF_CONNTRACK_TFTP
|
||||||
|
"
|
||||||
|
|
||||||
|
# storage drivers
|
||||||
|
if use btrfs; then
|
||||||
|
CONFIG_CHECK+="
|
||||||
|
~BTRFS_FS
|
||||||
|
~BTRFS_FS_POSIX_ACL
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
CONFIG_CHECK+="
|
||||||
|
~OVERLAY_FS
|
||||||
|
"
|
||||||
|
|
||||||
|
linux-info_pkg_setup
|
||||||
|
}
|
||||||
|
|
||||||
|
src_unpack() {
|
||||||
|
default
|
||||||
|
cd "${S}"
|
||||||
|
[[ -f go.mod ]] || ln -s vendor.mod go.mod || die
|
||||||
|
[[ -f go.sum ]] || ln -s vendor.sum go.sum || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
export DOCKER_GITCOMMIT="${GIT_COMMIT}"
|
||||||
|
export VERSION=${PV}
|
||||||
|
tc-export PKG_CONFIG
|
||||||
|
|
||||||
|
# setup CFLAGS and LDFLAGS for separate build target
|
||||||
|
# see https://github.com/tianon/docker-overlay/pull/10
|
||||||
|
CGO_CFLAGS+=" -I${ESYSROOT}/usr/include"
|
||||||
|
CGO_LDFLAGS+=" -L${ESYSROOT}/usr/$(get_libdir)"
|
||||||
|
|
||||||
|
# let's set up some optional features :)
|
||||||
|
export DOCKER_BUILDTAGS=''
|
||||||
|
for gd in btrfs overlay2; do
|
||||||
|
if ! use $gd; then
|
||||||
|
DOCKER_BUILDTAGS+=" exclude_graphdriver_${gd//-/}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
for tag in apparmor seccomp; do
|
||||||
|
if use $tag; then
|
||||||
|
DOCKER_BUILDTAGS+=" $tag"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
export AUTO_GOPATH=1
|
||||||
|
export EXCLUDE_AUTO_BUILDTAG_JOURNALD=$(usex systemd '' 'y')
|
||||||
|
export GO_MD2MAN=/usr/bin/go-md2man
|
||||||
|
|
||||||
|
# build binaries
|
||||||
|
./hack/make.sh dynbinary || die 'dynbinary failed'
|
||||||
|
|
||||||
|
# build man page
|
||||||
|
cd man || die
|
||||||
|
emake || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
dosym containerd /usr/bin/docker-containerd
|
||||||
|
dosym containerd-shim-runc-v2 /usr/bin/docker-containerd-shim
|
||||||
|
dosym runc /usr/bin/docker-runc
|
||||||
|
use container-init && dosym tini /usr/bin/docker-init
|
||||||
|
dobin bundles/dynbinary-daemon/dockerd
|
||||||
|
dobin bundles/dynbinary-daemon/docker-proxy
|
||||||
|
for f in dockerd-rootless-setuptool.sh dockerd-rootless.sh; do
|
||||||
|
dosym ../share/docker/contrib/${f} /usr/bin/${f}
|
||||||
|
done
|
||||||
|
|
||||||
|
newinitd contrib/init/openrc/docker.initd docker
|
||||||
|
newconfd contrib/init/openrc/docker.confd docker
|
||||||
|
|
||||||
|
systemd_dounit contrib/init/systemd/docker.{service,socket}
|
||||||
|
|
||||||
|
udev_dorules contrib/udev/*.rules
|
||||||
|
|
||||||
|
dodoc AUTHORS CONTRIBUTING.md NOTICE README.md
|
||||||
|
dodoc -r docs/*
|
||||||
|
doman man/man8/dockerd.8
|
||||||
|
|
||||||
|
# note: intentionally not using "doins" so that we preserve +x bits
|
||||||
|
dodir /usr/share/${PN}/contrib
|
||||||
|
cp -R contrib/* "${ED}/usr/share/${PN}/contrib"
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
udev_reload
|
||||||
|
|
||||||
|
elog
|
||||||
|
elog "To use Docker, the Docker daemon must be running as root. To automatically"
|
||||||
|
elog "start the Docker daemon at boot:"
|
||||||
|
if systemd_is_booted || has_version sys-apps/systemd; then
|
||||||
|
elog " systemctl enable docker.service"
|
||||||
|
else
|
||||||
|
elog " rc-update add docker default"
|
||||||
|
fi
|
||||||
|
elog
|
||||||
|
elog "To use Docker as a non-root user, add yourself to the 'docker' group:"
|
||||||
|
elog ' usermod -aG docker <youruser>'
|
||||||
|
elog
|
||||||
|
|
||||||
|
if has_version sys-fs/zfs; then
|
||||||
|
elog " ZFS storage driver is available"
|
||||||
|
elog " Check https://docs.docker.com/storage/storagedriver/zfs-driver for more info"
|
||||||
|
elog
|
||||||
|
fi
|
||||||
|
|
||||||
|
optfeature "rootless mode support" sys-apps/shadow
|
||||||
|
optfeature "rootless mode support" sys-apps/rootlesskit
|
||||||
|
optfeature_header "for rootless mode you also need a network stack"
|
||||||
|
optfeature "rootless mode network stack" app-containers/slirp4netns
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postrm() {
|
||||||
|
udev_reload
|
||||||
|
}
|
||||||
@ -15,7 +15,7 @@ if [[ ${PV} == 9999* ]]; then
|
|||||||
EGIT_REPO_URI="https://github.com/containers/netavark.git"
|
EGIT_REPO_URI="https://github.com/containers/netavark.git"
|
||||||
else
|
else
|
||||||
SRC_URI="${CARGO_CRATE_URIS} https://github.com/containers/netavark/releases/download/v${PV}/${PN}-v${PV}-vendor.tar.gz"
|
SRC_URI="${CARGO_CRATE_URIS} https://github.com/containers/netavark/releases/download/v${PV}/${PN}-v${PV}-vendor.tar.gz"
|
||||||
KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv"
|
KEYWORDS="amd64 arm64 ~loong ~ppc64 ~riscv"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# main
|
# main
|
||||||
|
|||||||
@ -0,0 +1,6 @@
|
|||||||
|
# Config file for /etc/user/init.d/podman
|
||||||
|
|
||||||
|
# Sets the API service daemon log level
|
||||||
|
# valid levels: debug, info, warn, error, fatal or panic
|
||||||
|
#LOG_LEVEL="error"
|
||||||
|
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
#!/sbin/openrc-run
|
||||||
|
# Copyright 2015-2024 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
supervisor=supervise-daemon
|
||||||
|
description="Podman API Service"
|
||||||
|
|
||||||
|
RUN_PATH="${XDG_RUNTIME_DIR}/podman"
|
||||||
|
LOG_PATH="${RUN_PATH}/log"
|
||||||
|
output_log="${LOG_PATH}/${RC_SVCNAME}.log"
|
||||||
|
error_log="${LOG_PATH}/${RC_SVCNAME}.log"
|
||||||
|
pidfile="${RUN_PATH}/${RC_SVCNAME}.pid"
|
||||||
|
socket="unix://${RUN_PATH}/${RC_SVCNAME}.sock"
|
||||||
|
|
||||||
|
# command_user="${RUN_AS_USER:=root:root}"
|
||||||
|
command="/usr/bin/podman"
|
||||||
|
command_args="--log-level ${LOG_LEVEL:-error} system service --time 0 ${socket}"
|
||||||
|
command_background="true"
|
||||||
|
|
||||||
|
start() {
|
||||||
|
checkpath -o $USER -d "${RUN_PATH}" "${LOG_PATH}"
|
||||||
|
default_start
|
||||||
|
}
|
||||||
@ -123,6 +123,12 @@ src_install() {
|
|||||||
|
|
||||||
insinto /etc/logrotate.d
|
insinto /etc/logrotate.d
|
||||||
newins "${FILESDIR}/podman.logrotated" podman
|
newins "${FILESDIR}/podman.logrotated" podman
|
||||||
|
|
||||||
|
exeinto /etc/user/init.d
|
||||||
|
newexe "${FILESDIR}/podman-5.0.0_rc4.user.initd" podman
|
||||||
|
|
||||||
|
insinto /etc/user/conf.d
|
||||||
|
newins "${FILESDIR}/podman-5.0.0_rc4.user.confd" podman
|
||||||
fi
|
fi
|
||||||
|
|
||||||
keepdir /var/lib/containers
|
keepdir /var/lib/containers
|
||||||
|
|||||||
@ -123,6 +123,12 @@ src_install() {
|
|||||||
|
|
||||||
insinto /etc/logrotate.d
|
insinto /etc/logrotate.d
|
||||||
newins "${FILESDIR}/podman.logrotated" podman
|
newins "${FILESDIR}/podman.logrotated" podman
|
||||||
|
|
||||||
|
exeinto /etc/user/init.d
|
||||||
|
newexe "${FILESDIR}/podman-5.0.0_rc4.user.initd" podman
|
||||||
|
|
||||||
|
insinto /etc/user/conf.d
|
||||||
|
newins "${FILESDIR}/podman-5.0.0_rc4.user.confd" podman
|
||||||
fi
|
fi
|
||||||
|
|
||||||
keepdir /var/lib/containers
|
keepdir /var/lib/containers
|
||||||
|
|||||||
@ -11,7 +11,7 @@ SRC_URI="https://ccid.apdu.fr/files/${P}.tar.xz"
|
|||||||
|
|
||||||
LICENSE="LGPL-2.1+ LGPL-2+ GPL-2+"
|
LICENSE="LGPL-2.1+ LGPL-2+ GPL-2+"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
KEYWORDS="~alpha ~amd64 arm ~arm64 ~hppa ~ppc ppc64 ~riscv ~sparc x86"
|
||||||
IUSE="twinserial"
|
IUSE="twinserial"
|
||||||
|
|
||||||
RDEPEND="
|
RDEPEND="
|
||||||
|
|||||||
@ -1,5 +1,3 @@
|
|||||||
DIST gpgme-1.23.2.tar.bz2 1836904 BLAKE2B 563e470e861c7cc64ecb3e8dd0a0ed8436bc0867105093abcec09f4d1e1dd95cbf64c8161cf8500b9842583b57f6583efff63e5111234e36fda1e6fbedce2f78 SHA512 6cfcd07e81a93de240582de5a46545420cee93d1f27fe20ea2c983780fdd3036b69fdba073cf549d68a20791e189bf4b3cdde14a43f912d2ab9ef3414c83ac75
|
|
||||||
DIST gpgme-1.23.2.tar.bz2.sig 238 BLAKE2B fafba6e2f1f34c53fa3f7e05953298132f7b046048660b9f2df5bc11ccb9694b581117ca78883a8f4ca9af060397a39f3132a3711be1cd28183b7c2f8f93a8b7 SHA512 65b7cdd4ce06bb0b15b13033d226423380338efdcb47ffc3f33780a92973453053f8f59b12a3f37e392e773bdd207a7420c25aa3a210c15eec45b7bfef6e891e
|
|
||||||
DIST gpgme-1.24.1.tar.bz2 1891695 BLAKE2B 8438291baec336c329deb9b864e1f3d2710066b992495a82cf83b264b52166e65bfb997aa7a06a18d90bd1048772da8ab6189ba114dd5117f50614dc8210cd37 SHA512 13e90371a733bca4cfefeac0588059d9fab3310b63c58c759f5ba9f9fddc6b0bdab6493fc2bc129c0ebe102ce4effa8067823937d3382f7c7ff02183717bbfd6
|
DIST gpgme-1.24.1.tar.bz2 1891695 BLAKE2B 8438291baec336c329deb9b864e1f3d2710066b992495a82cf83b264b52166e65bfb997aa7a06a18d90bd1048772da8ab6189ba114dd5117f50614dc8210cd37 SHA512 13e90371a733bca4cfefeac0588059d9fab3310b63c58c759f5ba9f9fddc6b0bdab6493fc2bc129c0ebe102ce4effa8067823937d3382f7c7ff02183717bbfd6
|
||||||
DIST gpgme-1.24.1.tar.bz2.sig 119 BLAKE2B 95232e31a8402cc5ec79d3a459ec6e35feb2d419dc7ac49b8e78103159ca472aac648e97acc3723dee4f2301e2333356e2b1f4376f423d8a3ef3734913249e69 SHA512 11650ea2af3e1c865eafc3c55632befeb036ce0435c32770dd6d6a03026ba7d343e9dcb3ab3597f6b6aae317f1aa26fa1e824f36caaf7214422b8b7ec76cc953
|
DIST gpgme-1.24.1.tar.bz2.sig 119 BLAKE2B 95232e31a8402cc5ec79d3a459ec6e35feb2d419dc7ac49b8e78103159ca472aac648e97acc3723dee4f2301e2333356e2b1f4376f423d8a3ef3734913249e69 SHA512 11650ea2af3e1c865eafc3c55632befeb036ce0435c32770dd6d6a03026ba7d343e9dcb3ab3597f6b6aae317f1aa26fa1e824f36caaf7214422b8b7ec76cc953
|
||||||
DIST gpgme-1.24.2.tar.bz2 1891804 BLAKE2B 3d112fe3401c6143d09474eefcc3fda00394b0db61c37d7da79ddf3352c71b67e2972800efbefa89bba4726a4997ef473c3dbdac8c5d42612a73332711cf4d4a SHA512 ad69101d1fceef6cd1dd6d5348f6f2be06912da6b6a7d0fece3ce08cf35054e6953b80ca9c4748554882892faa44e7c54e705cf25bbf2b796cd4ad12b09da185
|
DIST gpgme-1.24.2.tar.bz2 1891804 BLAKE2B 3d112fe3401c6143d09474eefcc3fda00394b0db61c37d7da79ddf3352c71b67e2972800efbefa89bba4726a4997ef473c3dbdac8c5d42612a73332711cf4d4a SHA512 ad69101d1fceef6cd1dd6d5348f6f2be06912da6b6a7d0fece3ce08cf35054e6953b80ca9c4748554882892faa44e7c54e705cf25bbf2b796cd4ad12b09da185
|
||||||
|
|||||||
@ -1,40 +0,0 @@
|
|||||||
From ecd0c86d62351d267bdc9566286c532a394c711b Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
|
|
||||||
Date: Mon, 2 Sep 2024 15:33:25 +0200
|
|
||||||
Subject: [PATCH] build,python: Fix build with setuptools 72.2.0+
|
|
||||||
|
|
||||||
* lang/python/setup.py.in (BuildExtFirstHack.run): Extend members of the
|
|
||||||
extension instead of lists that were passed to the extension.
|
|
||||||
--
|
|
||||||
|
|
||||||
setuptools 72.2.0 integrated changes in distutils which included
|
|
||||||
"Support for Pathlike objects in data files and extensions". With this
|
|
||||||
change the extensions now take a copy of the sources list passed to the
|
|
||||||
constructor instead of keeping a reference to the passed list. Hence,
|
|
||||||
modifying the sources list that was passed to the extension didn't
|
|
||||||
change the sources list of the extension anymore. This is fixed by
|
|
||||||
modifying the sources list of the extension directly. For consistency
|
|
||||||
we do the same for the swig_opts list.
|
|
||||||
|
|
||||||
GnuPG-bug-id: 7281
|
|
||||||
---
|
|
||||||
lang/python/setup.py.in | 6 +++---
|
|
||||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/lang/python/setup.py.in b/lang/python/setup.py.in
|
|
||||||
index 7b64ba7b..d6f537e0 100755
|
|
||||||
--- a/lang/python/setup.py.in
|
|
||||||
+++ b/lang/python/setup.py.in
|
|
||||||
@@ -217,9 +217,9 @@ class BuildExtFirstHack(build):
|
|
||||||
def run(self):
|
|
||||||
self._generate()
|
|
||||||
|
|
||||||
- swig_sources.extend((self._in_build_base('gpgme.i'),
|
|
||||||
- self._in_build_base('helpers.c')))
|
|
||||||
- swig_opts.extend([
|
|
||||||
+ swige.sources.extend((self._in_build_base('gpgme.i'),
|
|
||||||
+ self._in_build_base('helpers.c')))
|
|
||||||
+ swige.swig_opts.extend([
|
|
||||||
'-I' + self.build_base, '-outdir',
|
|
||||||
os.path.join(self.build_lib, 'gpg')
|
|
||||||
])
|
|
||||||
@ -1,232 +0,0 @@
|
|||||||
# Copyright 1999-2024 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=8
|
|
||||||
|
|
||||||
# Maintainers should:
|
|
||||||
# 1. Join the "Gentoo" project at https://dev.gnupg.org/project/view/27/
|
|
||||||
# 2. Subscribe to release tasks like https://dev.gnupg.org/T6159
|
|
||||||
# (find the one for the current release then subscribe to it +
|
|
||||||
# any subsequent ones linked within so you're covered for a while.)
|
|
||||||
|
|
||||||
DISTUTILS_EXT=1
|
|
||||||
DISTUTILS_OPTIONAL=1
|
|
||||||
DISTUTILS_USE_PEP517=setuptools
|
|
||||||
PYTHON_COMPAT=( python3_{10..13} )
|
|
||||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc
|
|
||||||
|
|
||||||
# in-source builds are not supported:
|
|
||||||
# * https://dev.gnupg.org/T6313#166339
|
|
||||||
# * https://dev.gnupg.org/T6673#174545
|
|
||||||
inherit distutils-r1 libtool flag-o-matic multibuild qmake-utils toolchain-funcs verify-sig
|
|
||||||
|
|
||||||
DESCRIPTION="GnuPG Made Easy is a library for making GnuPG easier to use"
|
|
||||||
HOMEPAGE="https://www.gnupg.org/related_software/gpgme"
|
|
||||||
SRC_URI="
|
|
||||||
mirror://gnupg/gpgme/${P}.tar.bz2
|
|
||||||
verify-sig? ( mirror://gnupg/gpgme/${P}.tar.bz2.sig )
|
|
||||||
"
|
|
||||||
|
|
||||||
LICENSE="GPL-2 LGPL-2.1"
|
|
||||||
# Please check ABI on each bump, even if SONAMEs didn't change: bug #833355
|
|
||||||
# Use e.g. app-portage/iwdevtools integration with dev-libs/libabigail's abidiff.
|
|
||||||
# Subslot: SONAME of each: <libgpgme.libgpgmepp.libqgpgme.FUDGE>
|
|
||||||
# Bump FUDGE if a release is made which breaks ABI without changing SONAME.
|
|
||||||
# (Reset to 0 if FUDGE != 0 if libgpgme/libgpgmepp/libqpggme change.)
|
|
||||||
SLOT="1/11.6.15.2"
|
|
||||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
|
||||||
IUSE="common-lisp static-libs +cxx python qt5 qt6 test"
|
|
||||||
RESTRICT="!test? ( test )"
|
|
||||||
REQUIRED_USE="
|
|
||||||
qt5? ( cxx )
|
|
||||||
qt6? ( cxx )
|
|
||||||
python? ( ${PYTHON_REQUIRED_USE} )
|
|
||||||
"
|
|
||||||
|
|
||||||
# - On each bump, update dep bounds on each version from configure.ac!
|
|
||||||
RDEPEND="
|
|
||||||
>=app-crypt/gnupg-2
|
|
||||||
>=dev-libs/libassuan-2.5.3:=
|
|
||||||
>=dev-libs/libgpg-error-1.46-r1:=
|
|
||||||
python? ( ${PYTHON_DEPS} )
|
|
||||||
qt5? ( dev-qt/qtcore:5 )
|
|
||||||
qt6? ( dev-qt/qtbase:6 )
|
|
||||||
"
|
|
||||||
DEPEND="
|
|
||||||
${RDEPEND}
|
|
||||||
test? (
|
|
||||||
qt5? ( dev-qt/qttest:5 )
|
|
||||||
)
|
|
||||||
"
|
|
||||||
#doc? ( app-text/doxygen[dot] )
|
|
||||||
BDEPEND="
|
|
||||||
python? (
|
|
||||||
${PYTHON_DEPS}
|
|
||||||
${DISTUTILS_DEPS}
|
|
||||||
dev-lang/swig
|
|
||||||
)
|
|
||||||
verify-sig? ( sec-keys/openpgp-keys-gnupg )
|
|
||||||
"
|
|
||||||
|
|
||||||
PATCHES=(
|
|
||||||
"${FILESDIR}"/${PN}-1.18.0-tests-start-stop-agent-use-command-v.patch
|
|
||||||
"${FILESDIR}"/${PN}-1.23.1-tests-gnupg-no-tofu.patch
|
|
||||||
# backport fix for setuptools 72.2 breakage
|
|
||||||
"${FILESDIR}"/ecd0c86d62351d267bdc9566286c532a394c711b.patch
|
|
||||||
)
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
default
|
|
||||||
|
|
||||||
elibtoolize
|
|
||||||
|
|
||||||
# bug #697456
|
|
||||||
addpredict /run/user/$(id -u)/gnupg
|
|
||||||
|
|
||||||
local MAX_WORKDIR=66
|
|
||||||
if use test && [[ "${#WORKDIR}" -gt "${MAX_WORKDIR}" ]]; then
|
|
||||||
eerror "Unable to run tests as WORKDIR='${WORKDIR}' is longer than ${MAX_WORKDIR} which causes failure!"
|
|
||||||
die "Could not run tests as requested with too-long WORKDIR."
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Make best effort to allow longer PORTAGE_TMPDIR
|
|
||||||
# as usock limitation fails build/tests
|
|
||||||
ln -s "${P}" "${WORKDIR}/b" || die
|
|
||||||
S="${WORKDIR}/b"
|
|
||||||
|
|
||||||
# Qt 5 and Qt 6 are mutually exclusive in the gpgme build. We don't have
|
|
||||||
# to do three builds (normal, qt5, qt6), and we can instead just
|
|
||||||
# do normal+qt5 or normal+qt6. For now, we pessimise qt6 by making it
|
|
||||||
# be a separate build, but in time, we can swap it so qt5 has to be
|
|
||||||
# the separate one so some build time gets saved in the common case.
|
|
||||||
MULTIBUILD_VARIANTS=(
|
|
||||||
base
|
|
||||||
$(usev qt6 qt6)
|
|
||||||
)
|
|
||||||
|
|
||||||
gpgme_create_builddir() {
|
|
||||||
mkdir -p "${BUILD_DIR}" || die
|
|
||||||
}
|
|
||||||
|
|
||||||
multibuild_foreach_variant gpgme_create_builddir
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
multibuild_foreach_variant gpgme_src_configure
|
|
||||||
}
|
|
||||||
|
|
||||||
gpgme_src_configure() {
|
|
||||||
# bug #847955
|
|
||||||
append-lfs-flags
|
|
||||||
|
|
||||||
cd "${BUILD_DIR}" || die
|
|
||||||
|
|
||||||
local languages=()
|
|
||||||
|
|
||||||
case ${MULTIBUILD_VARIANT} in
|
|
||||||
base)
|
|
||||||
languages=(
|
|
||||||
$(usev common-lisp 'cl')
|
|
||||||
$(usev cxx 'cpp')
|
|
||||||
$(usev qt5 'qt5')
|
|
||||||
)
|
|
||||||
|
|
||||||
if use qt5; then
|
|
||||||
#use doc ||
|
|
||||||
export DOXYGEN=true
|
|
||||||
export MOC="$(qt5_get_bindir)/moc"
|
|
||||||
fi
|
|
||||||
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
# Sanity check for refactoring, the non-base variant is only for Qt 6
|
|
||||||
use qt6 || die "Non-base variant shouldn't be built without Qt 6! Please report at bugs.gentoo.org."
|
|
||||||
|
|
||||||
languages=(
|
|
||||||
cpp
|
|
||||||
qt6
|
|
||||||
)
|
|
||||||
|
|
||||||
export MOC="$(qt6_get_libdir)/qt6/libexec/moc"
|
|
||||||
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
local myeconfargs=(
|
|
||||||
$(use test || echo "--disable-gpgconf-test --disable-gpg-test --disable-gpgsm-test --disable-g13-test")
|
|
||||||
--enable-languages="${languages[*]}"
|
|
||||||
$(use_enable static-libs static)
|
|
||||||
GPGRT_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpgrt-config"
|
|
||||||
)
|
|
||||||
|
|
||||||
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
|
|
||||||
|
|
||||||
if [[ ${MULTIBUILD_VARIANT} == base ]] && use python ; then
|
|
||||||
emake -C lang/python prepare
|
|
||||||
|
|
||||||
pushd lang/python > /dev/null || die
|
|
||||||
top_builddir="../.." srcdir="${S}/lang/python" CPP="$(tc-getCPP)" distutils-r1_src_configure
|
|
||||||
popd > /dev/null || die
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
multibuild_foreach_variant gpgme_src_compile
|
|
||||||
}
|
|
||||||
|
|
||||||
gpgme_src_compile() {
|
|
||||||
cd "${BUILD_DIR}" || die
|
|
||||||
|
|
||||||
emake
|
|
||||||
|
|
||||||
if [[ ${MULTIBUILD_VARIANT} == base ]] && use python ; then
|
|
||||||
pushd lang/python > /dev/null || die
|
|
||||||
top_builddir="../.." srcdir="${S}/lang/python" CPP="$(tc-getCPP)" distutils-r1_src_compile
|
|
||||||
popd > /dev/null || die
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_test() {
|
|
||||||
multibuild_foreach_variant gpgme_src_test
|
|
||||||
}
|
|
||||||
|
|
||||||
gpgme_src_test() {
|
|
||||||
cd "${BUILD_DIR}" || die
|
|
||||||
|
|
||||||
emake check
|
|
||||||
|
|
||||||
if [[ ${MULTIBUILD_VARIANT} == base ]] && use python ; then
|
|
||||||
distutils-r1_src_test
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
python_test() {
|
|
||||||
emake -C lang/python/tests check \
|
|
||||||
PYTHON=${EPYTHON} \
|
|
||||||
PYTHONS=${EPYTHON} \
|
|
||||||
TESTFLAGS="--python-libdir=${BUILD_DIR}/lib"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
einstalldocs
|
|
||||||
multibuild_foreach_variant gpgme_src_install
|
|
||||||
}
|
|
||||||
|
|
||||||
gpgme_src_install() {
|
|
||||||
cd "${BUILD_DIR}" || die
|
|
||||||
|
|
||||||
emake DESTDIR="${D}" install
|
|
||||||
|
|
||||||
if [[ ${MULTIBUILD_VARIANT} == base ]] && use python ; then
|
|
||||||
pushd lang/python > /dev/null || die
|
|
||||||
top_builddir="../.." srcdir="${S}/lang/python" CPP="$(tc-getCPP)" distutils-r1_src_install
|
|
||||||
popd > /dev/null || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
find "${ED}" -type f -name '*.la' -delete || die
|
|
||||||
|
|
||||||
# Backward compatibility for gentoo
|
|
||||||
# (in the past, we had slots)
|
|
||||||
dodir /usr/include/gpgme
|
|
||||||
dosym -r /usr/include/gpgme.h /usr/include/gpgme/gpgme.h
|
|
||||||
}
|
|
||||||
@ -1 +1,2 @@
|
|||||||
DIST krb5-1.21.3.tar.gz 9136145 BLAKE2B e909a55eaedab68e5c829bb7bbd26cec5db2d7b8d97f3b034de94d8f957003f16977ac619afee3b862f288e59f05c5e44f41e65b8883961c8b22a26e2f4733bc SHA512 87bc06607f4d95ff604169cea22180703a42d667af05f66f1569b8bd592670c42820b335e5c279e8b4f066d1e7da20f1948a1e4def7c5d295c170cbfc7f49c71
|
DIST krb5-1.21.3.tar.gz 9136145 BLAKE2B e909a55eaedab68e5c829bb7bbd26cec5db2d7b8d97f3b034de94d8f957003f16977ac619afee3b862f288e59f05c5e44f41e65b8883961c8b22a26e2f4733bc SHA512 87bc06607f4d95ff604169cea22180703a42d667af05f66f1569b8bd592670c42820b335e5c279e8b4f066d1e7da20f1948a1e4def7c5d295c170cbfc7f49c71
|
||||||
|
DIST mit-krb5-1.21.3-c23.patch.xz 59948 BLAKE2B f611ccda16ee4e2bcfbdbaf72204f0ede6ebe3517f4df016ae7db9c364bc55d81e1e32aaaa0506197ddca09555a5a4d3ef75f7c33b6434115b6c57bd99f1bcb5 SHA512 35b226b351a81f4610e1ef2be9822a57f94f9cc5017ed082584fb8c85a0f0be78b8e9fda4fc5c78248421be39517df639cee9cae49ddccf3d62f1a0cff4224ae
|
||||||
|
|||||||
157
sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/mit-krb5-1.21.3-r1.ebuild
vendored
Normal file
157
sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/mit-krb5-1.21.3-r1.ebuild
vendored
Normal file
@ -0,0 +1,157 @@
|
|||||||
|
# Copyright 1999-2025 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
PYTHON_COMPAT=( python3_{11..13} )
|
||||||
|
inherit autotools flag-o-matic python-any-r1 systemd toolchain-funcs multilib-minimal
|
||||||
|
|
||||||
|
MY_P="${P/mit-}"
|
||||||
|
P_DIR=$(ver_cut 1-2)
|
||||||
|
DESCRIPTION="MIT Kerberos V"
|
||||||
|
HOMEPAGE="https://web.mit.edu/kerberos/www/"
|
||||||
|
SRC_URI="https://web.mit.edu/kerberos/dist/krb5/${P_DIR}/${MY_P}.tar.gz"
|
||||||
|
SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-1.21.3-c23.patch.xz"
|
||||||
|
S=${WORKDIR}/${MY_P}/src
|
||||||
|
|
||||||
|
LICENSE="openafs-krb5-a BSD MIT OPENLDAP BSD-2 HPND BSD-4 ISC RSA CC-BY-SA-3.0 || ( BSD-2 GPL-2+ )"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||||
|
IUSE="cpu_flags_x86_aes doc +keyutils lmdb nls openldap +pkinit selinux test xinetd"
|
||||||
|
|
||||||
|
RESTRICT="!test? ( test )"
|
||||||
|
|
||||||
|
DEPEND="
|
||||||
|
!!app-crypt/heimdal
|
||||||
|
>=sys-fs/e2fsprogs-1.46.4-r51[${MULTILIB_USEDEP}]
|
||||||
|
|| (
|
||||||
|
>=dev-libs/libverto-0.2.5[libev,${MULTILIB_USEDEP}]
|
||||||
|
>=dev-libs/libverto-0.2.5[libevent,${MULTILIB_USEDEP}]
|
||||||
|
)
|
||||||
|
keyutils? ( >=sys-apps/keyutils-1.5.8:=[${MULTILIB_USEDEP}] )
|
||||||
|
lmdb? ( dev-db/lmdb:= )
|
||||||
|
nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
|
||||||
|
openldap? ( >=net-nds/openldap-2.4.38-r1:=[${MULTILIB_USEDEP}] )
|
||||||
|
pkinit? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] )
|
||||||
|
xinetd? ( sys-apps/xinetd )
|
||||||
|
"
|
||||||
|
BDEPEND="
|
||||||
|
${PYTHON_DEPS}
|
||||||
|
app-alternatives/yacc
|
||||||
|
>=sys-fs/e2fsprogs-1.46.4-r51
|
||||||
|
cpu_flags_x86_aes? (
|
||||||
|
amd64? ( dev-lang/yasm )
|
||||||
|
x86? ( dev-lang/yasm )
|
||||||
|
)
|
||||||
|
doc? ( virtual/latex-base )
|
||||||
|
test? ( dev-util/cmocka )
|
||||||
|
"
|
||||||
|
RDEPEND="${DEPEND}
|
||||||
|
selinux? ( sec-policy/selinux-kerberos )"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}/${PN}-1.12_warn_cflags.patch"
|
||||||
|
"${FILESDIR}/${PN}_dont_create_rundir.patch"
|
||||||
|
"${FILESDIR}/${PN}-1.18.2-krb5-config.patch"
|
||||||
|
"${WORKDIR}/${PN}-1.21.3-c23.patch"
|
||||||
|
)
|
||||||
|
|
||||||
|
MULTILIB_CHOST_TOOLS=(
|
||||||
|
/usr/bin/krb5-config
|
||||||
|
)
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
# Make sure we always use the system copies.
|
||||||
|
rm -rf util/{et,ss,verto}
|
||||||
|
sed -i 's:^[[:space:]]*util/verto$::' configure.ac || die
|
||||||
|
|
||||||
|
eautoreconf
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
# lto-type-mismatch (bug #854225)
|
||||||
|
filter-lto
|
||||||
|
|
||||||
|
multilib-minimal_src_configure
|
||||||
|
}
|
||||||
|
|
||||||
|
multilib_src_configure() {
|
||||||
|
ECONF_SOURCE=${S} \
|
||||||
|
AR="$(tc-getAR)" \
|
||||||
|
WARN_CFLAGS="set" \
|
||||||
|
econf \
|
||||||
|
$(use_with openldap ldap) \
|
||||||
|
$(use_enable nls) \
|
||||||
|
$(use_enable pkinit) \
|
||||||
|
$(use_with lmdb) \
|
||||||
|
$(use_with keyutils) \
|
||||||
|
--without-hesiod \
|
||||||
|
--enable-shared \
|
||||||
|
--with-system-et \
|
||||||
|
--with-system-ss \
|
||||||
|
--enable-dns-for-realm \
|
||||||
|
--enable-kdc-lookaside-cache \
|
||||||
|
--with-system-verto \
|
||||||
|
--enable-thread-support \
|
||||||
|
--disable-rpath
|
||||||
|
}
|
||||||
|
|
||||||
|
multilib_src_compile() {
|
||||||
|
emake -j1
|
||||||
|
}
|
||||||
|
|
||||||
|
multilib_src_test() {
|
||||||
|
multilib_is_native_abi && emake -j1 check
|
||||||
|
}
|
||||||
|
|
||||||
|
multilib_src_install() {
|
||||||
|
emake \
|
||||||
|
DESTDIR="${D}" \
|
||||||
|
EXAMPLEDIR="${EPREFIX}/usr/share/doc/${PF}/examples" \
|
||||||
|
install
|
||||||
|
}
|
||||||
|
|
||||||
|
multilib_src_install_all() {
|
||||||
|
# default database dir
|
||||||
|
keepdir /var/lib/krb5kdc
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
dodoc README
|
||||||
|
|
||||||
|
newinitd "${FILESDIR}"/mit-krb5kadmind.initd-r2 mit-krb5kadmind
|
||||||
|
newinitd "${FILESDIR}"/mit-krb5kdc.initd-r2 mit-krb5kdc
|
||||||
|
newinitd "${FILESDIR}"/mit-krb5kpropd.initd-r2 mit-krb5kpropd
|
||||||
|
newconfd "${FILESDIR}"/mit-krb5kadmind.confd mit-krb5kadmind
|
||||||
|
newconfd "${FILESDIR}"/mit-krb5kdc.confd mit-krb5kdc
|
||||||
|
newconfd "${FILESDIR}"/mit-krb5kpropd.confd mit-krb5kpropd
|
||||||
|
|
||||||
|
systemd_newunit "${FILESDIR}"/mit-krb5kadmind.service mit-krb5kadmind.service
|
||||||
|
systemd_newunit "${FILESDIR}"/mit-krb5kdc.service mit-krb5kdc.service
|
||||||
|
systemd_newunit "${FILESDIR}"/mit-krb5kpropd.service mit-krb5kpropd.service
|
||||||
|
systemd_newunit "${FILESDIR}"/mit-krb5kpropd_at.service "mit-krb5kpropd@.service"
|
||||||
|
systemd_newunit "${FILESDIR}"/mit-krb5kpropd.socket mit-krb5kpropd.socket
|
||||||
|
|
||||||
|
insinto /etc
|
||||||
|
newins "${ED}/usr/share/doc/${PF}/examples/krb5.conf" krb5.conf.example
|
||||||
|
insinto /var/lib/krb5kdc
|
||||||
|
newins "${ED}/usr/share/doc/${PF}/examples/kdc.conf" kdc.conf.example
|
||||||
|
|
||||||
|
if use openldap ; then
|
||||||
|
dodoc "${S}/plugins/kdb/ldap/libkdb_ldap/kerberos.ldif"
|
||||||
|
dodoc "${S}/plugins/kdb/ldap/libkdb_ldap/kerberos.openldap.ldif"
|
||||||
|
insinto /etc/openldap/schema
|
||||||
|
doins "${S}/plugins/kdb/ldap/libkdb_ldap/kerberos.schema"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use xinetd ; then
|
||||||
|
insinto /etc/xinetd.d
|
||||||
|
newins "${FILESDIR}/kpropd.xinetd" kpropd
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use doc; then
|
||||||
|
dodoc -r doc/html
|
||||||
|
docinto pdf
|
||||||
|
dodoc doc/pdf/*.pdf
|
||||||
|
fi
|
||||||
|
}
|
||||||
@ -11,7 +11,7 @@ SRC_URI="https://github.com/tpm2-software/${PN}/releases/download/${PV}/${P}.tar
|
|||||||
|
|
||||||
LICENSE="BSD-2"
|
LICENSE="BSD-2"
|
||||||
SLOT="0/4"
|
SLOT="0/4"
|
||||||
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
|
KEYWORDS="~amd64 arm arm64 ~loong ~ppc64 ~riscv ~x86"
|
||||||
IUSE="doc +fapi +openssl mbedtls +policy static-libs test"
|
IUSE="doc +fapi +openssl mbedtls +policy static-libs test"
|
||||||
RESTRICT="!test? ( test )"
|
RESTRICT="!test? ( test )"
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,7 @@ PYTHON_REQ_USE="ensurepip(-),ncurses,readline"
|
|||||||
|
|
||||||
FIRMWARE_ABI_VERSION="7.2.0"
|
FIRMWARE_ABI_VERSION="7.2.0"
|
||||||
|
|
||||||
inherit linux-info toolchain-funcs python-r1 udev fcaps readme.gentoo-r1 \
|
inherit flag-o-matic linux-info toolchain-funcs python-r1 udev fcaps readme.gentoo-r1 \
|
||||||
pax-utils xdg-utils
|
pax-utils xdg-utils
|
||||||
|
|
||||||
if [[ ${PV} == *9999* ]]; then
|
if [[ ${PV} == *9999* ]]; then
|
||||||
@ -66,7 +66,7 @@ IUSE="accessibility +aio alsa bpf bzip2 capstone +curl debug ${QEMU_DOC_USEFLAG}
|
|||||||
plugins +png pulseaudio python rbd sasl +seccomp sdl sdl-image selinux
|
plugins +png pulseaudio python rbd sasl +seccomp sdl sdl-image selinux
|
||||||
+slirp
|
+slirp
|
||||||
smartcard snappy spice ssh static-user systemtap test udev usb
|
smartcard snappy spice ssh static-user systemtap test udev usb
|
||||||
usbredir vde +vhost-net virgl virtfs +vnc vte xattr xdp xen
|
usbredir vde +vhost-net virgl virtfs +vnc vte wayland X xattr xdp xen
|
||||||
zstd"
|
zstd"
|
||||||
|
|
||||||
COMMON_TARGETS="
|
COMMON_TARGETS="
|
||||||
@ -185,7 +185,7 @@ SOFTMMU_TOOLS_DEPEND="
|
|||||||
dev-libs/nettle:=[static-libs(+)]
|
dev-libs/nettle:=[static-libs(+)]
|
||||||
)
|
)
|
||||||
gtk? (
|
gtk? (
|
||||||
x11-libs/gtk+:3
|
x11-libs/gtk+:3[wayland?,X?]
|
||||||
vte? ( x11-libs/vte:2.91 )
|
vte? ( x11-libs/vte:2.91 )
|
||||||
)
|
)
|
||||||
infiniband? ( sys-cluster/rdma-core[static-libs(+)] )
|
infiniband? ( sys-cluster/rdma-core[static-libs(+)] )
|
||||||
@ -480,6 +480,10 @@ src_prepare() {
|
|||||||
tc-export AR AS LD NM OBJCOPY PKG_CONFIG RANLIB STRINGS
|
tc-export AR AS LD NM OBJCOPY PKG_CONFIG RANLIB STRINGS
|
||||||
export WINDRES=${CHOST}-windres
|
export WINDRES=${CHOST}-windres
|
||||||
|
|
||||||
|
# defang automagic dependencies
|
||||||
|
use X || append-cppflags -DGENTOO_GTK_HIDE_X11
|
||||||
|
use wayland || append-cppflags -DGENTOO_GTK_HIDE_WAYLAND
|
||||||
|
|
||||||
# Workaround for bug #938302
|
# Workaround for bug #938302
|
||||||
if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then
|
if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then
|
||||||
cat >> "${S}"/configs/meson/linux.txt <<-EOF || die
|
cat >> "${S}"/configs/meson/linux.txt <<-EOF || die
|
||||||
@ -18,7 +18,7 @@ PYTHON_REQ_USE="ensurepip(-),ncurses,readline"
|
|||||||
|
|
||||||
FIRMWARE_ABI_VERSION="7.2.0"
|
FIRMWARE_ABI_VERSION="7.2.0"
|
||||||
|
|
||||||
inherit linux-info toolchain-funcs python-r1 udev fcaps readme.gentoo-r1 \
|
inherit flag-o-matic linux-info toolchain-funcs python-r1 udev fcaps readme.gentoo-r1 \
|
||||||
pax-utils xdg-utils
|
pax-utils xdg-utils
|
||||||
|
|
||||||
if [[ ${PV} == *9999* ]]; then
|
if [[ ${PV} == *9999* ]]; then
|
||||||
@ -66,7 +66,7 @@ IUSE="accessibility +aio alsa bpf bzip2 capstone +curl debug ${QEMU_DOC_USEFLAG}
|
|||||||
plugins +png pulseaudio python rbd sasl +seccomp sdl sdl-image selinux
|
plugins +png pulseaudio python rbd sasl +seccomp sdl sdl-image selinux
|
||||||
+slirp
|
+slirp
|
||||||
smartcard snappy spice ssh static-user systemtap test udev usb
|
smartcard snappy spice ssh static-user systemtap test udev usb
|
||||||
usbredir vde +vhost-net virgl virtfs +vnc vte xattr xdp xen
|
usbredir vde +vhost-net virgl virtfs +vnc vte wayland X xattr xdp xen
|
||||||
zstd"
|
zstd"
|
||||||
|
|
||||||
COMMON_TARGETS="
|
COMMON_TARGETS="
|
||||||
@ -185,7 +185,7 @@ SOFTMMU_TOOLS_DEPEND="
|
|||||||
dev-libs/nettle:=[static-libs(+)]
|
dev-libs/nettle:=[static-libs(+)]
|
||||||
)
|
)
|
||||||
gtk? (
|
gtk? (
|
||||||
x11-libs/gtk+:3
|
x11-libs/gtk+:3[wayland?,X?]
|
||||||
vte? ( x11-libs/vte:2.91 )
|
vte? ( x11-libs/vte:2.91 )
|
||||||
)
|
)
|
||||||
infiniband? ( sys-cluster/rdma-core[static-libs(+)] )
|
infiniband? ( sys-cluster/rdma-core[static-libs(+)] )
|
||||||
@ -480,6 +480,10 @@ src_prepare() {
|
|||||||
tc-export AR AS LD NM OBJCOPY PKG_CONFIG RANLIB STRINGS
|
tc-export AR AS LD NM OBJCOPY PKG_CONFIG RANLIB STRINGS
|
||||||
export WINDRES=${CHOST}-windres
|
export WINDRES=${CHOST}-windres
|
||||||
|
|
||||||
|
# defang automagic dependencies
|
||||||
|
use X || append-cppflags -DGENTOO_GTK_HIDE_X11
|
||||||
|
use wayland || append-cppflags -DGENTOO_GTK_HIDE_WAYLAND
|
||||||
|
|
||||||
# Workaround for bug #938302
|
# Workaround for bug #938302
|
||||||
if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then
|
if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then
|
||||||
cat >> "${S}"/configs/meson/linux.txt <<-EOF || die
|
cat >> "${S}"/configs/meson/linux.txt <<-EOF || die
|
||||||
@ -288,8 +288,9 @@ BDEPEND="
|
|||||||
)
|
)
|
||||||
gtk? ( nls? ( sys-devel/gettext ) )
|
gtk? ( nls? ( sys-devel/gettext ) )
|
||||||
test? (
|
test? (
|
||||||
dev-libs/glib[utils]
|
|
||||||
app-alternatives/bc
|
app-alternatives/bc
|
||||||
|
dev-libs/glib[utils]
|
||||||
|
dev-python/pycotap[${PYTHON_USEDEP}]
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
CDEPEND="
|
CDEPEND="
|
||||||
|
|||||||
@ -18,7 +18,7 @@ PYTHON_REQ_USE="ensurepip(-),ncurses,readline"
|
|||||||
|
|
||||||
FIRMWARE_ABI_VERSION="7.2.0"
|
FIRMWARE_ABI_VERSION="7.2.0"
|
||||||
|
|
||||||
inherit eapi9-ver linux-info toolchain-funcs python-r1 udev fcaps \
|
inherit eapi9-ver flag-o-matic linux-info toolchain-funcs python-r1 udev fcaps \
|
||||||
readme.gentoo-r1 pax-utils xdg-utils
|
readme.gentoo-r1 pax-utils xdg-utils
|
||||||
|
|
||||||
if [[ ${PV} == *9999* ]]; then
|
if [[ ${PV} == *9999* ]]; then
|
||||||
@ -66,7 +66,7 @@ IUSE="accessibility +aio alsa bpf bzip2 capstone +curl debug ${QEMU_DOC_USEFLAG}
|
|||||||
plugins +png pulseaudio python rbd sasl +seccomp sdl sdl-image selinux
|
plugins +png pulseaudio python rbd sasl +seccomp sdl sdl-image selinux
|
||||||
+slirp
|
+slirp
|
||||||
smartcard snappy spice ssh static-user systemtap test udev usb
|
smartcard snappy spice ssh static-user systemtap test udev usb
|
||||||
usbredir vde +vhost-net virgl virtfs +vnc vte xattr xdp xen
|
usbredir vde +vhost-net virgl virtfs +vnc vte wayland X xattr xdp xen
|
||||||
zstd"
|
zstd"
|
||||||
|
|
||||||
COMMON_TARGETS="
|
COMMON_TARGETS="
|
||||||
@ -184,7 +184,7 @@ SOFTMMU_TOOLS_DEPEND="
|
|||||||
dev-libs/nettle:=[static-libs(+)]
|
dev-libs/nettle:=[static-libs(+)]
|
||||||
)
|
)
|
||||||
gtk? (
|
gtk? (
|
||||||
x11-libs/gtk+:3
|
x11-libs/gtk+:3[wayland?,X?]
|
||||||
vte? ( x11-libs/vte:2.91 )
|
vte? ( x11-libs/vte:2.91 )
|
||||||
)
|
)
|
||||||
infiniband? ( sys-cluster/rdma-core[static-libs(+)] )
|
infiniband? ( sys-cluster/rdma-core[static-libs(+)] )
|
||||||
@ -288,8 +288,9 @@ BDEPEND="
|
|||||||
)
|
)
|
||||||
gtk? ( nls? ( sys-devel/gettext ) )
|
gtk? ( nls? ( sys-devel/gettext ) )
|
||||||
test? (
|
test? (
|
||||||
dev-libs/glib[utils]
|
|
||||||
app-alternatives/bc
|
app-alternatives/bc
|
||||||
|
dev-libs/glib[utils]
|
||||||
|
dev-python/pycotap[${PYTHON_USEDEP}]
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
CDEPEND="
|
CDEPEND="
|
||||||
@ -477,6 +478,10 @@ src_prepare() {
|
|||||||
tc-export AR AS LD NM OBJCOPY PKG_CONFIG RANLIB STRINGS
|
tc-export AR AS LD NM OBJCOPY PKG_CONFIG RANLIB STRINGS
|
||||||
export WINDRES=${CHOST}-windres
|
export WINDRES=${CHOST}-windres
|
||||||
|
|
||||||
|
# defang automagic dependencies
|
||||||
|
use X || append-flags -DGENTOO_GTK_HIDE_X11
|
||||||
|
use wayland || append-flags -DGENTOO_GTK_HIDE_WAYLAND
|
||||||
|
|
||||||
# Workaround for bug #938302
|
# Workaround for bug #938302
|
||||||
if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then
|
if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then
|
||||||
cat >> "${S}"/configs/meson/linux.txt <<-EOF || die
|
cat >> "${S}"/configs/meson/linux.txt <<-EOF || die
|
||||||
@ -18,7 +18,7 @@ PYTHON_REQ_USE="ensurepip(-),ncurses,readline"
|
|||||||
|
|
||||||
FIRMWARE_ABI_VERSION="7.2.0"
|
FIRMWARE_ABI_VERSION="7.2.0"
|
||||||
|
|
||||||
inherit eapi9-ver linux-info toolchain-funcs python-r1 udev fcaps \
|
inherit eapi9-ver flag-o-matic linux-info toolchain-funcs python-r1 udev fcaps \
|
||||||
readme.gentoo-r1 pax-utils xdg-utils
|
readme.gentoo-r1 pax-utils xdg-utils
|
||||||
|
|
||||||
if [[ ${PV} == *9999* ]]; then
|
if [[ ${PV} == *9999* ]]; then
|
||||||
@ -66,7 +66,7 @@ IUSE="accessibility +aio alsa bpf bzip2 capstone +curl debug ${QEMU_DOC_USEFLAG}
|
|||||||
plugins +png pulseaudio python rbd sasl +seccomp sdl sdl-image selinux
|
plugins +png pulseaudio python rbd sasl +seccomp sdl sdl-image selinux
|
||||||
+slirp
|
+slirp
|
||||||
smartcard snappy spice ssh static-user systemtap test udev usb
|
smartcard snappy spice ssh static-user systemtap test udev usb
|
||||||
usbredir vde +vhost-net virgl virtfs +vnc vte xattr xdp xen
|
usbredir vde +vhost-net virgl virtfs +vnc vte wayland X xattr xdp xen
|
||||||
zstd"
|
zstd"
|
||||||
|
|
||||||
COMMON_TARGETS="
|
COMMON_TARGETS="
|
||||||
@ -184,7 +184,7 @@ SOFTMMU_TOOLS_DEPEND="
|
|||||||
dev-libs/nettle:=[static-libs(+)]
|
dev-libs/nettle:=[static-libs(+)]
|
||||||
)
|
)
|
||||||
gtk? (
|
gtk? (
|
||||||
x11-libs/gtk+:3
|
x11-libs/gtk+:3[wayland?,X?]
|
||||||
vte? ( x11-libs/vte:2.91 )
|
vte? ( x11-libs/vte:2.91 )
|
||||||
)
|
)
|
||||||
infiniband? ( sys-cluster/rdma-core[static-libs(+)] )
|
infiniband? ( sys-cluster/rdma-core[static-libs(+)] )
|
||||||
@ -288,8 +288,9 @@ BDEPEND="
|
|||||||
)
|
)
|
||||||
gtk? ( nls? ( sys-devel/gettext ) )
|
gtk? ( nls? ( sys-devel/gettext ) )
|
||||||
test? (
|
test? (
|
||||||
dev-libs/glib[utils]
|
|
||||||
app-alternatives/bc
|
app-alternatives/bc
|
||||||
|
dev-libs/glib[utils]
|
||||||
|
dev-python/pycotap[${PYTHON_USEDEP}]
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
CDEPEND="
|
CDEPEND="
|
||||||
@ -477,6 +478,10 @@ src_prepare() {
|
|||||||
tc-export AR AS LD NM OBJCOPY PKG_CONFIG RANLIB STRINGS
|
tc-export AR AS LD NM OBJCOPY PKG_CONFIG RANLIB STRINGS
|
||||||
export WINDRES=${CHOST}-windres
|
export WINDRES=${CHOST}-windres
|
||||||
|
|
||||||
|
# defang automagic dependencies
|
||||||
|
use X || append-flags -DGENTOO_GTK_HIDE_X11
|
||||||
|
use wayland || append-flags -DGENTOO_GTK_HIDE_WAYLAND
|
||||||
|
|
||||||
# Workaround for bug #938302
|
# Workaround for bug #938302
|
||||||
if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then
|
if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then
|
||||||
cat >> "${S}"/configs/meson/linux.txt <<-EOF || die
|
cat >> "${S}"/configs/meson/linux.txt <<-EOF || die
|
||||||
|
|||||||
@ -25,6 +25,8 @@ DIST bash-5.2.tar.gz.sig 95 BLAKE2B 2991b7c46ef1cdca08062f419be47fca7551f4c5d9aa
|
|||||||
DIST bash-5.3-rc1.tar.gz 10742642 BLAKE2B 846414fe545da1ee62b541a8861d68e1dc57114276d40c6af2a9ab1f91cedb220d060f1bd81a811d6dacd841cd1b66e0ed7d8462b3c7066ad204f3786d6af0ec SHA512 16a74fcb31a8ea20cf9505a8cee584a02baed1d2c47b75556e4ae6752712db8f9e0b4b202d2cbe77990fec1ff141ff35e410d4495887ed90f5457c032079c5e5
|
DIST bash-5.3-rc1.tar.gz 10742642 BLAKE2B 846414fe545da1ee62b541a8861d68e1dc57114276d40c6af2a9ab1f91cedb220d060f1bd81a811d6dacd841cd1b66e0ed7d8462b3c7066ad204f3786d6af0ec SHA512 16a74fcb31a8ea20cf9505a8cee584a02baed1d2c47b75556e4ae6752712db8f9e0b4b202d2cbe77990fec1ff141ff35e410d4495887ed90f5457c032079c5e5
|
||||||
DIST bash-5.3-rc1.tar.gz.sig 95 BLAKE2B cc7916f92eddd881ac4d791918b7bb579396df4badbd671a7d0664fd814cee37327dce31d288a8fb03bc66a23536873b5fcd72f2e08e294b9ff9f2ef889741e3 SHA512 a275ff17f9318b5626450eeeb9f49157c9b20df974e004adb26f6585c84deea8d68fc0e1670f990096675ecadd652b58895f74c4e40c8e142a3c2ed414145248
|
DIST bash-5.3-rc1.tar.gz.sig 95 BLAKE2B cc7916f92eddd881ac4d791918b7bb579396df4badbd671a7d0664fd814cee37327dce31d288a8fb03bc66a23536873b5fcd72f2e08e294b9ff9f2ef889741e3 SHA512 a275ff17f9318b5626450eeeb9f49157c9b20df974e004adb26f6585c84deea8d68fc0e1670f990096675ecadd652b58895f74c4e40c8e142a3c2ed414145248
|
||||||
DIST bash-5.3_rc1_p20250409-42c6cbd459a121e98d9ac43c477a5daf6c3d4f0c.tar.gz 15866668 BLAKE2B 472b67d397dd0f4ba070d4899bb1ecde08a90a7d2f5fc16b8f79c7113d2ca66cbc353e128ace17128069ebc7f8560605dda1441019174a942abb0dd345629746 SHA512 43614445ac11d25258ba6c47f020a1b87d8fa33b139e4d2237683ea0465bf24b03cf84e7e2771de4b038bbecab44c923bb307e4a60b9590b42936ea4e7c86e73
|
DIST bash-5.3_rc1_p20250409-42c6cbd459a121e98d9ac43c477a5daf6c3d4f0c.tar.gz 15866668 BLAKE2B 472b67d397dd0f4ba070d4899bb1ecde08a90a7d2f5fc16b8f79c7113d2ca66cbc353e128ace17128069ebc7f8560605dda1441019174a942abb0dd345629746 SHA512 43614445ac11d25258ba6c47f020a1b87d8fa33b139e4d2237683ea0465bf24b03cf84e7e2771de4b038bbecab44c923bb307e4a60b9590b42936ea4e7c86e73
|
||||||
|
DIST bash-5.3_rc1_p20250419-482872ed8b51408066c3275a18350436f4d0ee41.tar.gz 16004323 BLAKE2B 936b2bf45e90be658105a2755b9a0be046cd5ae50b6d34624ff20199fa93c1de4a8f9ab669c2c9cf86e2e4d6379f124d91141354d41d437536931cd157491626 SHA512 f04eb6c45124a66fc894c4a1f217351a0247ddd870cfcbbcd01bcff77369d022c6ca82f693c6f2fcd035ce5a67ab3fdbc902b30a4c76e84fdaddd25eeb7c407f
|
||||||
|
DIST bash-5.3_rc1_p20250422-7731dc5c4d405ab147fc562e3af2a375ca593554.tar.gz 15996966 BLAKE2B 6a9c720b2747ccff7d8d198354163b6e0645b8a8e436a65e5d1f86ad509b8f197d95ba7cd4097ec4558911d73f98817da65f90a879215b8ad243388e1fdd75df SHA512 21847abf8019776f310c1de8f7469823c233039fa95ca1f872071580f917c728ac767f6daa778dfcfa0fd7583edf07b7928075d5086f3711d68a45ea3133857f
|
||||||
DIST bash205b-001 1132 BLAKE2B 0c5eef29777d54ef05957ea3d63b1556fb380bd20c238dc28993d822b37bc4e78ff4048ad069f6b8cd25da77ccdeb7aecd86c4349cb9d81e5e94c7001eeae5e6 SHA512 5ce4357468821b05e747201f3aa57225ad8f540c9e2c87051720490e039c30b478b9b662a68f14a0800fefe40184e4495e2645665200f9d75e9a115b2ac08071
|
DIST bash205b-001 1132 BLAKE2B 0c5eef29777d54ef05957ea3d63b1556fb380bd20c238dc28993d822b37bc4e78ff4048ad069f6b8cd25da77ccdeb7aecd86c4349cb9d81e5e94c7001eeae5e6 SHA512 5ce4357468821b05e747201f3aa57225ad8f540c9e2c87051720490e039c30b478b9b662a68f14a0800fefe40184e4495e2645665200f9d75e9a115b2ac08071
|
||||||
DIST bash205b-002 755 BLAKE2B 6a6ed5679d451f02f8104b345c1722d11718ce3b4043b581c17786d40d8da69a34786fb56d0c363dba277b8e9dd33f12f70c9cc73a9fc39ba4a8319406f0458d SHA512 46947b0229478d5c2cfeff68b8ebc00e4ef0c8b94e336ca12f72b4490ba3622c0240c01c17c1641c3b07adc2c64ec94d6d780365e8990768ec8888f3a9526883
|
DIST bash205b-002 755 BLAKE2B 6a6ed5679d451f02f8104b345c1722d11718ce3b4043b581c17786d40d8da69a34786fb56d0c363dba277b8e9dd33f12f70c9cc73a9fc39ba4a8319406f0458d SHA512 46947b0229478d5c2cfeff68b8ebc00e4ef0c8b94e336ca12f72b4490ba3622c0240c01c17c1641c3b07adc2c64ec94d6d780365e8990768ec8888f3a9526883
|
||||||
DIST bash205b-003 2356 BLAKE2B b7887d00d92fd298cd07a15e1c73b516dabd22ecd74c97091636dd97a0cd55024ed698e5cc924c4311d994dd326b1ad074bea35e7650cf9cf4e25c60d2713fa7 SHA512 74528ca5d165b812d299f1c69b47757bd677c0b22ce4217e155cd641708b02364a93c6709fb57b546b376b36da74429a61493921c7c199563da40ddcf1c1f399
|
DIST bash205b-003 2356 BLAKE2B b7887d00d92fd298cd07a15e1c73b516dabd22ecd74c97091636dd97a0cd55024ed698e5cc924c4311d994dd326b1ad074bea35e7650cf9cf4e25c60d2713fa7 SHA512 74528ca5d165b812d299f1c69b47757bd677c0b22ce4217e155cd641708b02364a93c6709fb57b546b376b36da74429a61493921c7c199563da40ddcf1c1f399
|
||||||
|
|||||||
410
sdk_container/src/third_party/portage-stable/app-shells/bash/bash-5.3_rc1_p20250419.ebuild
vendored
Normal file
410
sdk_container/src/third_party/portage-stable/app-shells/bash/bash-5.3_rc1_p20250419.ebuild
vendored
Normal file
@ -0,0 +1,410 @@
|
|||||||
|
# Copyright 1999-2025 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/chetramey.asc
|
||||||
|
inherit flag-o-matic toolchain-funcs prefix verify-sig
|
||||||
|
|
||||||
|
# Uncomment if we have a patchset.
|
||||||
|
#GENTOO_PATCH_DEV="sam"
|
||||||
|
#GENTOO_PATCH_VER="${PV}"
|
||||||
|
|
||||||
|
MY_PV=${PV/_p*}
|
||||||
|
MY_PV=${MY_PV/_/-}
|
||||||
|
MY_P=${PN}-${MY_PV}
|
||||||
|
MY_PATCHES=()
|
||||||
|
|
||||||
|
# Determine the patchlevel.
|
||||||
|
case ${PV} in
|
||||||
|
9999|*_alpha*|*_beta*|*_rc*)
|
||||||
|
# Set a negative patchlevel to indicate that it's a pre-release.
|
||||||
|
PLEVEL=-1
|
||||||
|
;;
|
||||||
|
*_p*)
|
||||||
|
PLEVEL=${PV##*_p}
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
PLEVEL=0
|
||||||
|
esac
|
||||||
|
|
||||||
|
# The version of readline this bash normally ships with. Note that we only use
|
||||||
|
# the bundled copy of readline for pre-releases.
|
||||||
|
READLINE_VER="8.3_beta"
|
||||||
|
|
||||||
|
DESCRIPTION="The standard GNU Bourne again shell"
|
||||||
|
HOMEPAGE="https://tiswww.case.edu/php/chet/bash/bashtop.html https://git.savannah.gnu.org/cgit/bash.git"
|
||||||
|
|
||||||
|
if [[ ${PV} == 9999 ]]; then
|
||||||
|
EGIT_REPO_URI="https://git.savannah.gnu.org/git/bash.git"
|
||||||
|
EGIT_BRANCH=devel
|
||||||
|
inherit git-r3
|
||||||
|
elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then
|
||||||
|
# It can be useful to have snapshots in the pre-release period once
|
||||||
|
# the first alpha is out, as various bugs get reported and fixed from
|
||||||
|
# the alpha, and the next pre-release is usually quite far away.
|
||||||
|
#
|
||||||
|
# i.e. if it's worth packaging the alpha, it's worth packaging a followup.
|
||||||
|
BASH_COMMIT="482872ed8b51408066c3275a18350436f4d0ee41"
|
||||||
|
SRC_URI="https://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-${BASH_COMMIT}.tar.gz -> ${P}-${BASH_COMMIT}.tar.gz"
|
||||||
|
S=${WORKDIR}/${PN}-${BASH_COMMIT}
|
||||||
|
else
|
||||||
|
my_urls=( {'mirror://gnu/bash','ftp://ftp.cwru.edu/pub/bash'}/"${MY_P}.tar.gz" )
|
||||||
|
|
||||||
|
# bash-5.1 -> bash51
|
||||||
|
my_p=${PN}$(ver_cut 1-2) my_p=${my_p/.}
|
||||||
|
|
||||||
|
for (( my_patch_idx = 1; my_patch_idx <= PLEVEL; my_patch_idx++ )); do
|
||||||
|
printf -v my_patch_ver %s-%03d "${my_p}" "${my_patch_idx}"
|
||||||
|
my_urls+=( {'mirror://gnu/bash','ftp://ftp.cwru.edu/pub/bash'}/"${MY_P}-patches/${my_patch_ver}" )
|
||||||
|
MY_PATCHES+=( "${DISTDIR}/${my_patch_ver}" )
|
||||||
|
done
|
||||||
|
|
||||||
|
SRC_URI="${my_urls[*]} verify-sig? ( ${my_urls[*]/%/.sig} )"
|
||||||
|
S=${WORKDIR}/${MY_P}
|
||||||
|
|
||||||
|
unset -v my_urls my_p my_patch_idx my_patch_ver
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ${GENTOO_PATCH_VER} ]]; then
|
||||||
|
SRC_URI+=" https://dev.gentoo.org/~${GENTOO_PATCH_DEV:?}/distfiles/${CATEGORY}/${PN}/${PN}-${GENTOO_PATCH_VER:?}-patches.tar.xz"
|
||||||
|
fi
|
||||||
|
|
||||||
|
LICENSE="GPL-3+"
|
||||||
|
SLOT="0"
|
||||||
|
if (( PLEVEL >= 0 )); then
|
||||||
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
||||||
|
fi
|
||||||
|
IUSE="afs bashlogger examples mem-scramble +net nls plugins pgo +readline"
|
||||||
|
|
||||||
|
DEPEND="
|
||||||
|
>=sys-libs/ncurses-5.2-r2:=
|
||||||
|
nls? ( virtual/libintl )
|
||||||
|
"
|
||||||
|
if (( PLEVEL >= 0 )); then
|
||||||
|
DEPEND+=" readline? ( >=sys-libs/readline-${READLINE_VER}:= )"
|
||||||
|
fi
|
||||||
|
RDEPEND="
|
||||||
|
${DEPEND}
|
||||||
|
"
|
||||||
|
# We only need bison (yacc) when the .y files get patched (bash42-005, bash51-011).
|
||||||
|
BDEPEND="
|
||||||
|
pgo? ( dev-util/gperf )
|
||||||
|
verify-sig? ( sec-keys/openpgp-keys-chetramey )
|
||||||
|
"
|
||||||
|
|
||||||
|
# EAPI 8 tries to append it but it doesn't exist here.
|
||||||
|
QA_CONFIGURE_OPTIONS="--disable-static"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
#"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}/
|
||||||
|
|
||||||
|
# Patches to or from Chet, posted to the bug-bash mailing list.
|
||||||
|
"${FILESDIR}/${PN}-5.0-syslog-history-extern.patch"
|
||||||
|
)
|
||||||
|
|
||||||
|
pkg_setup() {
|
||||||
|
# bug #7332
|
||||||
|
if is-flag -malign-double; then
|
||||||
|
eerror "Detected bad CFLAGS '-malign-double'. Do not use this"
|
||||||
|
eerror "as it breaks LFS (struct stat64) on x86."
|
||||||
|
die "remove -malign-double from your CFLAGS mr ricer"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use bashlogger; then
|
||||||
|
ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs."
|
||||||
|
ewarn "This will log ALL output you enter into the shell, you have been warned."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_unpack() {
|
||||||
|
local patch
|
||||||
|
|
||||||
|
if [[ ${PV} == 9999 ]]; then
|
||||||
|
git-r3_src_unpack
|
||||||
|
elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then
|
||||||
|
default
|
||||||
|
else
|
||||||
|
if use verify-sig; then
|
||||||
|
verify-sig_verify_detached "${DISTDIR}/${MY_P}.tar.gz"{,.sig}
|
||||||
|
|
||||||
|
for patch in "${MY_PATCHES[@]}"; do
|
||||||
|
verify-sig_verify_detached "${patch}"{,.sig}
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
unpack "${MY_P}.tar.gz"
|
||||||
|
|
||||||
|
if [[ ${GENTOO_PATCH_VER} ]]; then
|
||||||
|
unpack "${PN}-${GENTOO_PATCH_VER}-patches.tar.xz"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
# Include official patches.
|
||||||
|
(( PLEVEL > 0 )) && eapply -p0 "${MY_PATCHES[@]}"
|
||||||
|
|
||||||
|
# Clean out local libs so we know we use system ones w/releases. The
|
||||||
|
# touch utility is invoked for the benefit of config.status.
|
||||||
|
if (( PLEVEL >= 0 )); then
|
||||||
|
rm -rf lib/{readline,termcap}/* \
|
||||||
|
&& touch lib/{readline,termcap}/Makefile.in \
|
||||||
|
&& sed -i -E 's:\$[{(](RL|HIST)_LIBSRC[)}]/[[:alpha:]_-]*\.h::g' Makefile.in \
|
||||||
|
|| die
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Prefixify hardcoded path names. No-op for non-prefix.
|
||||||
|
hprefixify pathnames.h.in
|
||||||
|
|
||||||
|
# Avoid regenerating docs after patches, bug #407985.
|
||||||
|
sed -i -E '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in \
|
||||||
|
&& touch -r . doc/* \
|
||||||
|
|| die
|
||||||
|
|
||||||
|
# Sometimes hangs (more noticeable w/ pgo), bug #907403.
|
||||||
|
rm tests/run-jobs || die
|
||||||
|
|
||||||
|
eapply -p0 "${PATCHES[@]}"
|
||||||
|
eapply_user
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
local -a myconf
|
||||||
|
|
||||||
|
# Upstream only test with Bison and require GNUisms like YYEOF and
|
||||||
|
# YYERRCODE. The former at least may be in POSIX soon:
|
||||||
|
# https://www.austingroupbugs.net/view.php?id=1269.
|
||||||
|
# configure warns on use of non-Bison but doesn't abort. The result
|
||||||
|
# may misbehave at runtime.
|
||||||
|
unset -v YACC
|
||||||
|
|
||||||
|
myconf=(
|
||||||
|
--disable-profiling
|
||||||
|
|
||||||
|
# Force linking with system curses ... the bundled termcap lib
|
||||||
|
# sucks bad compared to ncurses. For the most part, ncurses
|
||||||
|
# is here because readline needs it. But bash itself calls
|
||||||
|
# ncurses in one or two small places :(.
|
||||||
|
--with-curses
|
||||||
|
|
||||||
|
$(use_enable mem-scramble)
|
||||||
|
$(use_enable net net-redirections)
|
||||||
|
$(use_enable readline)
|
||||||
|
$(use_enable readline bang-history)
|
||||||
|
$(use_enable readline history)
|
||||||
|
$(use_with afs)
|
||||||
|
$(use_with mem-scramble bash-malloc)
|
||||||
|
)
|
||||||
|
|
||||||
|
# For descriptions of these, see config-top.h.
|
||||||
|
# bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426
|
||||||
|
append-cppflags \
|
||||||
|
-DDEFAULT_PATH_VALUE=\'\""${EPREFIX}"/usr/local/sbin:"${EPREFIX}"/usr/local/bin:"${EPREFIX}"/usr/sbin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/bin\"\' \
|
||||||
|
-DSTANDARD_UTILS_PATH=\'\""${EPREFIX}"/bin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/usr/sbin\"\' \
|
||||||
|
-DSYS_BASHRC=\'\""${EPREFIX}"/etc/bash/bashrc\"\' \
|
||||||
|
-DSYS_BASH_LOGOUT=\'\""${EPREFIX}"/etc/bash/bash_logout\"\' \
|
||||||
|
-DNON_INTERACTIVE_LOGIN_SHELLS \
|
||||||
|
-DSSH_SOURCE_BASHRC \
|
||||||
|
$(use bashlogger && echo -DSYSLOG_HISTORY)
|
||||||
|
|
||||||
|
use nls || myconf+=( --disable-nls )
|
||||||
|
|
||||||
|
if (( PLEVEL >= 0 )); then
|
||||||
|
# Historically, we always used the builtin readline, but since
|
||||||
|
# our handling of SONAME upgrades has gotten much more stable
|
||||||
|
# in the PM (and the readline ebuild itself preserves the old
|
||||||
|
# libs during upgrades), linking against the system copy should
|
||||||
|
# be safe.
|
||||||
|
# Exact cached version here doesn't really matter as long as it
|
||||||
|
# is at least what's in the DEPEND up above.
|
||||||
|
export ac_cv_rl_version=${READLINE_VER%%_*}
|
||||||
|
|
||||||
|
# Use system readline only with released versions.
|
||||||
|
myconf+=( --with-installed-readline=. )
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use plugins; then
|
||||||
|
append-ldflags "-Wl,-rpath,${EPREFIX}/usr/$(get_libdir)/bash"
|
||||||
|
else
|
||||||
|
# Disable the plugins logic by hand since bash doesn't provide
|
||||||
|
# a way of doing it.
|
||||||
|
export ac_cv_func_dl{close,open,sym}=no \
|
||||||
|
ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no
|
||||||
|
|
||||||
|
sed -i -e '/LOCAL_LDFLAGS=/s:-rdynamic::' configure || die
|
||||||
|
fi
|
||||||
|
|
||||||
|
# bug #444070
|
||||||
|
tc-export AR
|
||||||
|
|
||||||
|
econf "${myconf[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
local -a pgo_generate_flags pgo_use_flags
|
||||||
|
local flag
|
||||||
|
|
||||||
|
# -fprofile-partial-training because upstream notes the test suite isn't
|
||||||
|
# super comprehensive.
|
||||||
|
# https://documentation.suse.com/sbp/all/html/SBP-GCC-10/index.html#sec-gcc10-pgo
|
||||||
|
if use pgo; then
|
||||||
|
pgo_generate_flags=(
|
||||||
|
-fprofile-update=atomic
|
||||||
|
-fprofile-dir="${T}"/pgo
|
||||||
|
-fprofile-generate="${T}"/pgo
|
||||||
|
)
|
||||||
|
pgo_use_flags=(
|
||||||
|
-fprofile-use="${T}"/pgo
|
||||||
|
-fprofile-dir="${T}"/pgo
|
||||||
|
)
|
||||||
|
if flag=$(test-flags-CC -fprofile-partial-training); then
|
||||||
|
pgo_generate_flags+=( "${flag}" )
|
||||||
|
pgo_use_flags+=( "${flag}" )
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# builtins/evalstring.c needs y.tab.h but can't (easily) specify the dep on it from above
|
||||||
|
emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" y.tab.h
|
||||||
|
emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}"
|
||||||
|
use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" all others
|
||||||
|
|
||||||
|
# Build Bash and run its tests to generate profiles.
|
||||||
|
if (( ${#pgo_generate_flags[@]} )); then
|
||||||
|
# Used in test suite.
|
||||||
|
unset -v A
|
||||||
|
|
||||||
|
emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" -k check
|
||||||
|
|
||||||
|
if tc-is-clang; then
|
||||||
|
llvm-profdata merge "${T}"/pgo --output="${T}"/pgo/default.profdata || die
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Rebuild Bash using the profiling data we just generated.
|
||||||
|
emake clean
|
||||||
|
emake CFLAGS="${CFLAGS} ${pgo_use_flags[*]}" y.tab.h
|
||||||
|
emake CFLAGS="${CFLAGS} ${pgo_use_flags[*]}"
|
||||||
|
use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_use_flags[*]}" all others
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_test() {
|
||||||
|
# Used in test suite.
|
||||||
|
unset -v A
|
||||||
|
|
||||||
|
default
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
local d f
|
||||||
|
|
||||||
|
default
|
||||||
|
|
||||||
|
my_prefixify() {
|
||||||
|
while read -r; do
|
||||||
|
if [[ $REPLY == *$1* ]]; then
|
||||||
|
REPLY=${REPLY/"/etc/"/"${EPREFIX}/etc/"}
|
||||||
|
fi
|
||||||
|
printf '%s\n' "${REPLY}" || ! break
|
||||||
|
done < "$2" || die
|
||||||
|
}
|
||||||
|
|
||||||
|
dodir /bin
|
||||||
|
mv -- "${ED}"/usr/bin/bash "${ED}"/bin/ || die
|
||||||
|
dosym bash /bin/rbash
|
||||||
|
|
||||||
|
insinto /etc/bash
|
||||||
|
doins "${FILESDIR}"/bash_logout
|
||||||
|
my_prefixify bashrc.d "${FILESDIR}"/bashrc-r1 | newins - bashrc
|
||||||
|
|
||||||
|
insinto /etc/bash/bashrc.d
|
||||||
|
my_prefixify DIR_COLORS "${FILESDIR}"/bashrc.d/10-gentoo-color.bash | newins - 10-gentoo-color.bash
|
||||||
|
newins "${FILESDIR}"/bashrc.d/10-gentoo-title-r1.bash 10-gentoo-title.bash
|
||||||
|
if [[ ! ${EPREFIX} ]]; then
|
||||||
|
doins "${FILESDIR}"/bashrc.d/15-gentoo-bashrc-check.bash
|
||||||
|
fi
|
||||||
|
|
||||||
|
insinto /etc/skel
|
||||||
|
for f in bash{_logout,_profile,rc}; do
|
||||||
|
newins "${FILESDIR}/dot-${f}" ".${f}"
|
||||||
|
done
|
||||||
|
|
||||||
|
if use plugins; then
|
||||||
|
exeinto "/usr/$(get_libdir)/bash"
|
||||||
|
set -- examples/loadables/*.o
|
||||||
|
doexe "${@%.o}"
|
||||||
|
|
||||||
|
insinto /usr/include/bash-plugins
|
||||||
|
doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h}
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use examples; then
|
||||||
|
for d in examples/{functions,misc,scripts,startup-files}; do
|
||||||
|
exeinto "/usr/share/doc/${PF}/${d}"
|
||||||
|
docinto "${d}"
|
||||||
|
for f in "${d}"/*; do
|
||||||
|
if [[ ${f##*/} != @(PERMISSION|*README) ]]; then
|
||||||
|
doexe "${f}"
|
||||||
|
else
|
||||||
|
dodoc "${f}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Install bash_builtins.1 and rbash.1.
|
||||||
|
emake -C doc DESTDIR="${D}" install_builtins
|
||||||
|
sed 's:bash\.1:man1/&:' doc/rbash.1 > "${T}"/rbash.1 || die
|
||||||
|
doman "${T}"/rbash.1
|
||||||
|
|
||||||
|
newdoc CWRU/changelog ChangeLog
|
||||||
|
dosym bash.info /usr/share/info/bashref.info
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_preinst() {
|
||||||
|
if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]]; then
|
||||||
|
mkdir -p -- "${EROOT}"/etc/bash \
|
||||||
|
&& mv -f -- "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/ \
|
||||||
|
|| die
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
local old_ver
|
||||||
|
|
||||||
|
# If /bin/sh does not exist, provide it.
|
||||||
|
if [[ ! -e ${EROOT}/bin/sh ]]; then
|
||||||
|
ln -sf -- bash "${EROOT}"/bin/sh || die
|
||||||
|
fi
|
||||||
|
|
||||||
|
read -r old_ver <<<"${REPLACING_VERSIONS}"
|
||||||
|
if [[ ! $old_ver ]]; then
|
||||||
|
:
|
||||||
|
elif ver_test "$old_ver" -ge "5.2" && ver_test "$old_ver" -ge "5.2_p26-r8"; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
while read -r; do ewarn "${REPLY}"; done <<'EOF'
|
||||||
|
Files under /etc/bash/bashrc.d must now have a suffix of .sh or .bash.
|
||||||
|
|
||||||
|
Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the
|
||||||
|
characteristics of the operating environment, it may contain a command to set
|
||||||
|
the terminal's window title. Those who were already choosing to customise the
|
||||||
|
PROMPT_COMMAND variable are now advised to append their commands like so:
|
||||||
|
|
||||||
|
PROMPT_COMMAND+=('custom command goes here')
|
||||||
|
|
||||||
|
Gentoo no longer defaults to having bash set the window title in the case
|
||||||
|
that the terminal is controlled by sshd(8), unless screen is launched on the
|
||||||
|
remote side or the terminal reliably supports saving and restoring the title
|
||||||
|
(as alacritty, foot and tmux do). Those wanting for the title to be set
|
||||||
|
regardless may adjust ~/.bashrc - or create a custom /etc/bash/bashrc.d
|
||||||
|
drop-in - to set PROMPT_COMMMAND like so:
|
||||||
|
|
||||||
|
PROMPT_COMMAND=(genfun_set_win_title)
|
||||||
|
|
||||||
|
Those who would prefer for bash never to interfere with the window title may
|
||||||
|
now opt out of the default title setting behaviour, either with the "unset -v
|
||||||
|
PROMPT_COMMAND" command or by re-defining PROMPT_COMMAND as desired.
|
||||||
|
EOF
|
||||||
|
}
|
||||||
410
sdk_container/src/third_party/portage-stable/app-shells/bash/bash-5.3_rc1_p20250422.ebuild
vendored
Normal file
410
sdk_container/src/third_party/portage-stable/app-shells/bash/bash-5.3_rc1_p20250422.ebuild
vendored
Normal file
@ -0,0 +1,410 @@
|
|||||||
|
# Copyright 1999-2025 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/chetramey.asc
|
||||||
|
inherit flag-o-matic toolchain-funcs prefix verify-sig
|
||||||
|
|
||||||
|
# Uncomment if we have a patchset.
|
||||||
|
#GENTOO_PATCH_DEV="sam"
|
||||||
|
#GENTOO_PATCH_VER="${PV}"
|
||||||
|
|
||||||
|
MY_PV=${PV/_p*}
|
||||||
|
MY_PV=${MY_PV/_/-}
|
||||||
|
MY_P=${PN}-${MY_PV}
|
||||||
|
MY_PATCHES=()
|
||||||
|
|
||||||
|
# Determine the patchlevel.
|
||||||
|
case ${PV} in
|
||||||
|
9999|*_alpha*|*_beta*|*_rc*)
|
||||||
|
# Set a negative patchlevel to indicate that it's a pre-release.
|
||||||
|
PLEVEL=-1
|
||||||
|
;;
|
||||||
|
*_p*)
|
||||||
|
PLEVEL=${PV##*_p}
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
PLEVEL=0
|
||||||
|
esac
|
||||||
|
|
||||||
|
# The version of readline this bash normally ships with. Note that we only use
|
||||||
|
# the bundled copy of readline for pre-releases.
|
||||||
|
READLINE_VER="8.3_beta"
|
||||||
|
|
||||||
|
DESCRIPTION="The standard GNU Bourne again shell"
|
||||||
|
HOMEPAGE="https://tiswww.case.edu/php/chet/bash/bashtop.html https://git.savannah.gnu.org/cgit/bash.git"
|
||||||
|
|
||||||
|
if [[ ${PV} == 9999 ]]; then
|
||||||
|
EGIT_REPO_URI="https://git.savannah.gnu.org/git/bash.git"
|
||||||
|
EGIT_BRANCH=devel
|
||||||
|
inherit git-r3
|
||||||
|
elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then
|
||||||
|
# It can be useful to have snapshots in the pre-release period once
|
||||||
|
# the first alpha is out, as various bugs get reported and fixed from
|
||||||
|
# the alpha, and the next pre-release is usually quite far away.
|
||||||
|
#
|
||||||
|
# i.e. if it's worth packaging the alpha, it's worth packaging a followup.
|
||||||
|
BASH_COMMIT="7731dc5c4d405ab147fc562e3af2a375ca593554"
|
||||||
|
SRC_URI="https://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-${BASH_COMMIT}.tar.gz -> ${P}-${BASH_COMMIT}.tar.gz"
|
||||||
|
S=${WORKDIR}/${PN}-${BASH_COMMIT}
|
||||||
|
else
|
||||||
|
my_urls=( {'mirror://gnu/bash','ftp://ftp.cwru.edu/pub/bash'}/"${MY_P}.tar.gz" )
|
||||||
|
|
||||||
|
# bash-5.1 -> bash51
|
||||||
|
my_p=${PN}$(ver_cut 1-2) my_p=${my_p/.}
|
||||||
|
|
||||||
|
for (( my_patch_idx = 1; my_patch_idx <= PLEVEL; my_patch_idx++ )); do
|
||||||
|
printf -v my_patch_ver %s-%03d "${my_p}" "${my_patch_idx}"
|
||||||
|
my_urls+=( {'mirror://gnu/bash','ftp://ftp.cwru.edu/pub/bash'}/"${MY_P}-patches/${my_patch_ver}" )
|
||||||
|
MY_PATCHES+=( "${DISTDIR}/${my_patch_ver}" )
|
||||||
|
done
|
||||||
|
|
||||||
|
SRC_URI="${my_urls[*]} verify-sig? ( ${my_urls[*]/%/.sig} )"
|
||||||
|
S=${WORKDIR}/${MY_P}
|
||||||
|
|
||||||
|
unset -v my_urls my_p my_patch_idx my_patch_ver
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ${GENTOO_PATCH_VER} ]]; then
|
||||||
|
SRC_URI+=" https://dev.gentoo.org/~${GENTOO_PATCH_DEV:?}/distfiles/${CATEGORY}/${PN}/${PN}-${GENTOO_PATCH_VER:?}-patches.tar.xz"
|
||||||
|
fi
|
||||||
|
|
||||||
|
LICENSE="GPL-3+"
|
||||||
|
SLOT="0"
|
||||||
|
if (( PLEVEL >= 0 )); then
|
||||||
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
||||||
|
fi
|
||||||
|
IUSE="afs bashlogger examples mem-scramble +net nls plugins pgo +readline"
|
||||||
|
|
||||||
|
DEPEND="
|
||||||
|
>=sys-libs/ncurses-5.2-r2:=
|
||||||
|
nls? ( virtual/libintl )
|
||||||
|
"
|
||||||
|
if (( PLEVEL >= 0 )); then
|
||||||
|
DEPEND+=" readline? ( >=sys-libs/readline-${READLINE_VER}:= )"
|
||||||
|
fi
|
||||||
|
RDEPEND="
|
||||||
|
${DEPEND}
|
||||||
|
"
|
||||||
|
# We only need bison (yacc) when the .y files get patched (bash42-005, bash51-011).
|
||||||
|
BDEPEND="
|
||||||
|
pgo? ( dev-util/gperf )
|
||||||
|
verify-sig? ( sec-keys/openpgp-keys-chetramey )
|
||||||
|
"
|
||||||
|
|
||||||
|
# EAPI 8 tries to append it but it doesn't exist here.
|
||||||
|
QA_CONFIGURE_OPTIONS="--disable-static"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
#"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}/
|
||||||
|
|
||||||
|
# Patches to or from Chet, posted to the bug-bash mailing list.
|
||||||
|
"${FILESDIR}/${PN}-5.0-syslog-history-extern.patch"
|
||||||
|
)
|
||||||
|
|
||||||
|
pkg_setup() {
|
||||||
|
# bug #7332
|
||||||
|
if is-flag -malign-double; then
|
||||||
|
eerror "Detected bad CFLAGS '-malign-double'. Do not use this"
|
||||||
|
eerror "as it breaks LFS (struct stat64) on x86."
|
||||||
|
die "remove -malign-double from your CFLAGS mr ricer"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use bashlogger; then
|
||||||
|
ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs."
|
||||||
|
ewarn "This will log ALL output you enter into the shell, you have been warned."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_unpack() {
|
||||||
|
local patch
|
||||||
|
|
||||||
|
if [[ ${PV} == 9999 ]]; then
|
||||||
|
git-r3_src_unpack
|
||||||
|
elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then
|
||||||
|
default
|
||||||
|
else
|
||||||
|
if use verify-sig; then
|
||||||
|
verify-sig_verify_detached "${DISTDIR}/${MY_P}.tar.gz"{,.sig}
|
||||||
|
|
||||||
|
for patch in "${MY_PATCHES[@]}"; do
|
||||||
|
verify-sig_verify_detached "${patch}"{,.sig}
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
unpack "${MY_P}.tar.gz"
|
||||||
|
|
||||||
|
if [[ ${GENTOO_PATCH_VER} ]]; then
|
||||||
|
unpack "${PN}-${GENTOO_PATCH_VER}-patches.tar.xz"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
# Include official patches.
|
||||||
|
(( PLEVEL > 0 )) && eapply -p0 "${MY_PATCHES[@]}"
|
||||||
|
|
||||||
|
# Clean out local libs so we know we use system ones w/releases. The
|
||||||
|
# touch utility is invoked for the benefit of config.status.
|
||||||
|
if (( PLEVEL >= 0 )); then
|
||||||
|
rm -rf lib/{readline,termcap}/* \
|
||||||
|
&& touch lib/{readline,termcap}/Makefile.in \
|
||||||
|
&& sed -i -E 's:\$[{(](RL|HIST)_LIBSRC[)}]/[[:alpha:]_-]*\.h::g' Makefile.in \
|
||||||
|
|| die
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Prefixify hardcoded path names. No-op for non-prefix.
|
||||||
|
hprefixify pathnames.h.in
|
||||||
|
|
||||||
|
# Avoid regenerating docs after patches, bug #407985.
|
||||||
|
sed -i -E '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in \
|
||||||
|
&& touch -r . doc/* \
|
||||||
|
|| die
|
||||||
|
|
||||||
|
# Sometimes hangs (more noticeable w/ pgo), bug #907403.
|
||||||
|
rm tests/run-jobs || die
|
||||||
|
|
||||||
|
eapply -p0 "${PATCHES[@]}"
|
||||||
|
eapply_user
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
local -a myconf
|
||||||
|
|
||||||
|
# Upstream only test with Bison and require GNUisms like YYEOF and
|
||||||
|
# YYERRCODE. The former at least may be in POSIX soon:
|
||||||
|
# https://www.austingroupbugs.net/view.php?id=1269.
|
||||||
|
# configure warns on use of non-Bison but doesn't abort. The result
|
||||||
|
# may misbehave at runtime.
|
||||||
|
unset -v YACC
|
||||||
|
|
||||||
|
myconf=(
|
||||||
|
--disable-profiling
|
||||||
|
|
||||||
|
# Force linking with system curses ... the bundled termcap lib
|
||||||
|
# sucks bad compared to ncurses. For the most part, ncurses
|
||||||
|
# is here because readline needs it. But bash itself calls
|
||||||
|
# ncurses in one or two small places :(.
|
||||||
|
--with-curses
|
||||||
|
|
||||||
|
$(use_enable mem-scramble)
|
||||||
|
$(use_enable net net-redirections)
|
||||||
|
$(use_enable readline)
|
||||||
|
$(use_enable readline bang-history)
|
||||||
|
$(use_enable readline history)
|
||||||
|
$(use_with afs)
|
||||||
|
$(use_with mem-scramble bash-malloc)
|
||||||
|
)
|
||||||
|
|
||||||
|
# For descriptions of these, see config-top.h.
|
||||||
|
# bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426
|
||||||
|
append-cppflags \
|
||||||
|
-DDEFAULT_PATH_VALUE=\'\""${EPREFIX}"/usr/local/sbin:"${EPREFIX}"/usr/local/bin:"${EPREFIX}"/usr/sbin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/bin\"\' \
|
||||||
|
-DSTANDARD_UTILS_PATH=\'\""${EPREFIX}"/bin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/usr/sbin\"\' \
|
||||||
|
-DSYS_BASHRC=\'\""${EPREFIX}"/etc/bash/bashrc\"\' \
|
||||||
|
-DSYS_BASH_LOGOUT=\'\""${EPREFIX}"/etc/bash/bash_logout\"\' \
|
||||||
|
-DNON_INTERACTIVE_LOGIN_SHELLS \
|
||||||
|
-DSSH_SOURCE_BASHRC \
|
||||||
|
$(use bashlogger && echo -DSYSLOG_HISTORY)
|
||||||
|
|
||||||
|
use nls || myconf+=( --disable-nls )
|
||||||
|
|
||||||
|
if (( PLEVEL >= 0 )); then
|
||||||
|
# Historically, we always used the builtin readline, but since
|
||||||
|
# our handling of SONAME upgrades has gotten much more stable
|
||||||
|
# in the PM (and the readline ebuild itself preserves the old
|
||||||
|
# libs during upgrades), linking against the system copy should
|
||||||
|
# be safe.
|
||||||
|
# Exact cached version here doesn't really matter as long as it
|
||||||
|
# is at least what's in the DEPEND up above.
|
||||||
|
export ac_cv_rl_version=${READLINE_VER%%_*}
|
||||||
|
|
||||||
|
# Use system readline only with released versions.
|
||||||
|
myconf+=( --with-installed-readline=. )
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use plugins; then
|
||||||
|
append-ldflags "-Wl,-rpath,${EPREFIX}/usr/$(get_libdir)/bash"
|
||||||
|
else
|
||||||
|
# Disable the plugins logic by hand since bash doesn't provide
|
||||||
|
# a way of doing it.
|
||||||
|
export ac_cv_func_dl{close,open,sym}=no \
|
||||||
|
ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no
|
||||||
|
|
||||||
|
sed -i -e '/LOCAL_LDFLAGS=/s:-rdynamic::' configure || die
|
||||||
|
fi
|
||||||
|
|
||||||
|
# bug #444070
|
||||||
|
tc-export AR
|
||||||
|
|
||||||
|
econf "${myconf[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
local -a pgo_generate_flags pgo_use_flags
|
||||||
|
local flag
|
||||||
|
|
||||||
|
# -fprofile-partial-training because upstream notes the test suite isn't
|
||||||
|
# super comprehensive.
|
||||||
|
# https://documentation.suse.com/sbp/all/html/SBP-GCC-10/index.html#sec-gcc10-pgo
|
||||||
|
if use pgo; then
|
||||||
|
pgo_generate_flags=(
|
||||||
|
-fprofile-update=atomic
|
||||||
|
-fprofile-dir="${T}"/pgo
|
||||||
|
-fprofile-generate="${T}"/pgo
|
||||||
|
)
|
||||||
|
pgo_use_flags=(
|
||||||
|
-fprofile-use="${T}"/pgo
|
||||||
|
-fprofile-dir="${T}"/pgo
|
||||||
|
)
|
||||||
|
if flag=$(test-flags-CC -fprofile-partial-training); then
|
||||||
|
pgo_generate_flags+=( "${flag}" )
|
||||||
|
pgo_use_flags+=( "${flag}" )
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# builtins/evalstring.c needs y.tab.h but can't (easily) specify the dep on it from above
|
||||||
|
emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" y.tab.h
|
||||||
|
emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}"
|
||||||
|
use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" all others
|
||||||
|
|
||||||
|
# Build Bash and run its tests to generate profiles.
|
||||||
|
if (( ${#pgo_generate_flags[@]} )); then
|
||||||
|
# Used in test suite.
|
||||||
|
unset -v A
|
||||||
|
|
||||||
|
emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" -k check
|
||||||
|
|
||||||
|
if tc-is-clang; then
|
||||||
|
llvm-profdata merge "${T}"/pgo --output="${T}"/pgo/default.profdata || die
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Rebuild Bash using the profiling data we just generated.
|
||||||
|
emake clean
|
||||||
|
emake CFLAGS="${CFLAGS} ${pgo_use_flags[*]}" y.tab.h
|
||||||
|
emake CFLAGS="${CFLAGS} ${pgo_use_flags[*]}"
|
||||||
|
use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_use_flags[*]}" all others
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_test() {
|
||||||
|
# Used in test suite.
|
||||||
|
unset -v A
|
||||||
|
|
||||||
|
default
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
local d f
|
||||||
|
|
||||||
|
default
|
||||||
|
|
||||||
|
my_prefixify() {
|
||||||
|
while read -r; do
|
||||||
|
if [[ $REPLY == *$1* ]]; then
|
||||||
|
REPLY=${REPLY/"/etc/"/"${EPREFIX}/etc/"}
|
||||||
|
fi
|
||||||
|
printf '%s\n' "${REPLY}" || ! break
|
||||||
|
done < "$2" || die
|
||||||
|
}
|
||||||
|
|
||||||
|
dodir /bin
|
||||||
|
mv -- "${ED}"/usr/bin/bash "${ED}"/bin/ || die
|
||||||
|
dosym bash /bin/rbash
|
||||||
|
|
||||||
|
insinto /etc/bash
|
||||||
|
doins "${FILESDIR}"/bash_logout
|
||||||
|
my_prefixify bashrc.d "${FILESDIR}"/bashrc-r1 | newins - bashrc
|
||||||
|
|
||||||
|
insinto /etc/bash/bashrc.d
|
||||||
|
my_prefixify DIR_COLORS "${FILESDIR}"/bashrc.d/10-gentoo-color.bash | newins - 10-gentoo-color.bash
|
||||||
|
newins "${FILESDIR}"/bashrc.d/10-gentoo-title-r1.bash 10-gentoo-title.bash
|
||||||
|
if [[ ! ${EPREFIX} ]]; then
|
||||||
|
doins "${FILESDIR}"/bashrc.d/15-gentoo-bashrc-check.bash
|
||||||
|
fi
|
||||||
|
|
||||||
|
insinto /etc/skel
|
||||||
|
for f in bash{_logout,_profile,rc}; do
|
||||||
|
newins "${FILESDIR}/dot-${f}" ".${f}"
|
||||||
|
done
|
||||||
|
|
||||||
|
if use plugins; then
|
||||||
|
exeinto "/usr/$(get_libdir)/bash"
|
||||||
|
set -- examples/loadables/*.o
|
||||||
|
doexe "${@%.o}"
|
||||||
|
|
||||||
|
insinto /usr/include/bash-plugins
|
||||||
|
doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h}
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use examples; then
|
||||||
|
for d in examples/{functions,misc,scripts,startup-files}; do
|
||||||
|
exeinto "/usr/share/doc/${PF}/${d}"
|
||||||
|
docinto "${d}"
|
||||||
|
for f in "${d}"/*; do
|
||||||
|
if [[ ${f##*/} != @(PERMISSION|*README) ]]; then
|
||||||
|
doexe "${f}"
|
||||||
|
else
|
||||||
|
dodoc "${f}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Install bash_builtins.1 and rbash.1.
|
||||||
|
emake -C doc DESTDIR="${D}" install_builtins
|
||||||
|
sed 's:bash\.1:man1/&:' doc/rbash.1 > "${T}"/rbash.1 || die
|
||||||
|
doman "${T}"/rbash.1
|
||||||
|
|
||||||
|
newdoc CWRU/changelog ChangeLog
|
||||||
|
dosym bash.info /usr/share/info/bashref.info
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_preinst() {
|
||||||
|
if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]]; then
|
||||||
|
mkdir -p -- "${EROOT}"/etc/bash \
|
||||||
|
&& mv -f -- "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/ \
|
||||||
|
|| die
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
local old_ver
|
||||||
|
|
||||||
|
# If /bin/sh does not exist, provide it.
|
||||||
|
if [[ ! -e ${EROOT}/bin/sh ]]; then
|
||||||
|
ln -sf -- bash "${EROOT}"/bin/sh || die
|
||||||
|
fi
|
||||||
|
|
||||||
|
read -r old_ver <<<"${REPLACING_VERSIONS}"
|
||||||
|
if [[ ! $old_ver ]]; then
|
||||||
|
:
|
||||||
|
elif ver_test "$old_ver" -ge "5.2" && ver_test "$old_ver" -ge "5.2_p26-r8"; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
while read -r; do ewarn "${REPLY}"; done <<'EOF'
|
||||||
|
Files under /etc/bash/bashrc.d must now have a suffix of .sh or .bash.
|
||||||
|
|
||||||
|
Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the
|
||||||
|
characteristics of the operating environment, it may contain a command to set
|
||||||
|
the terminal's window title. Those who were already choosing to customise the
|
||||||
|
PROMPT_COMMAND variable are now advised to append their commands like so:
|
||||||
|
|
||||||
|
PROMPT_COMMAND+=('custom command goes here')
|
||||||
|
|
||||||
|
Gentoo no longer defaults to having bash set the window title in the case
|
||||||
|
that the terminal is controlled by sshd(8), unless screen is launched on the
|
||||||
|
remote side or the terminal reliably supports saving and restoring the title
|
||||||
|
(as alacritty, foot and tmux do). Those wanting for the title to be set
|
||||||
|
regardless may adjust ~/.bashrc - or create a custom /etc/bash/bashrc.d
|
||||||
|
drop-in - to set PROMPT_COMMMAND like so:
|
||||||
|
|
||||||
|
PROMPT_COMMAND=(genfun_set_win_title)
|
||||||
|
|
||||||
|
Those who would prefer for bash never to interfere with the window title may
|
||||||
|
now opt out of the default title setting behaviour, either with the "unset -v
|
||||||
|
PROMPT_COMMAND" command or by re-defining PROMPT_COMMAND as desired.
|
||||||
|
EOF
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
# Copyright 1999-2024 Gentoo Authors
|
# Copyright 1999-2025 Gentoo Authors
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
EAPI=7
|
EAPI=7
|
||||||
@ -92,6 +92,47 @@ src_prepare() {
|
|||||||
MANM_TBL=mandoc_tbl
|
MANM_TBL=mandoc_tbl
|
||||||
MANM_MANCONF=mman.conf
|
MANM_MANCONF=mman.conf
|
||||||
EOF
|
EOF
|
||||||
|
# Assuming modern Linux + glibc/musl and not BSD.
|
||||||
|
tc-is-cross-compiler && cat <<-EOF >> "configure.local"
|
||||||
|
HAVE_ATTRIBUTE=1
|
||||||
|
HAVE_CMSG=1
|
||||||
|
HAVE_DIRENT_NAMLEN=0
|
||||||
|
HAVE_EFTYPE=0
|
||||||
|
HAVE_ENDIAN=1
|
||||||
|
HAVE_ERR=1
|
||||||
|
HAVE_FTS_COMPARE_CONST=0
|
||||||
|
HAVE_FTS=$(usex elibc_glibc 1 0)
|
||||||
|
HAVE_GETLINE=1
|
||||||
|
HAVE_GETSUBOPT=1
|
||||||
|
HAVE_ISBLANK=1
|
||||||
|
HAVE_LESS_T=1
|
||||||
|
HAVE_MKDTEMP=1
|
||||||
|
HAVE_MKSTEMPS=1
|
||||||
|
HAVE_NANOSLEEP=1
|
||||||
|
HAVE_NTOHL=1
|
||||||
|
HAVE_O_DIRECTORY=1
|
||||||
|
HAVE_OHASH=0
|
||||||
|
HAVE_PATH_MAX=1
|
||||||
|
HAVE_PLEDGE=0
|
||||||
|
HAVE_PROGNAME=0
|
||||||
|
HAVE_REALLOCARRAY=1
|
||||||
|
HAVE_RECALLOCARRAY=0
|
||||||
|
HAVE_RECVMSG=1
|
||||||
|
HAVE_REWB_BSD=0
|
||||||
|
HAVE_REWB_SYSV=1
|
||||||
|
HAVE_SANDBOX_INIT=0
|
||||||
|
HAVE_STRCASESTR=$(usex elibc_glibc 1 0)
|
||||||
|
HAVE_STRINGLIST=0
|
||||||
|
HAVE_STRLCAT=$(usex elibc_glibc 1 0)
|
||||||
|
HAVE_STRLCPY=$(usex elibc_glibc 1 0)
|
||||||
|
HAVE_STRPTIME=1
|
||||||
|
HAVE_STRSEP=1
|
||||||
|
HAVE_STRTONUM=0
|
||||||
|
HAVE_SYS_ENDIAN=0
|
||||||
|
HAVE_VASPRINTF=1
|
||||||
|
HAVE_WCHAR=1
|
||||||
|
NEED_GNU_SOURCE=1
|
||||||
|
EOF
|
||||||
if use cgi; then
|
if use cgi; then
|
||||||
cp cgi.h{.example,} || die
|
cp cgi.h{.example,} || die
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -16,9 +16,12 @@ DIST meson-1.7.1.tar.gz 2295198 BLAKE2B a1eda88cc349f74ab00e367daf5f27452875f483
|
|||||||
DIST meson-1.7.1.tar.gz.asc 833 BLAKE2B 1e854c5f026471d1fa1f9f9ca26a8be06518564694b92ba8a751f2c05fa430359c5f6c9b636c0df9a2db338f61a9750e4080d60171a0e3bef49163c416166ef6 SHA512 266de0d34828688491ad3167bb3b88f489b579af1bbbb20a28e3ccfc342fa04659970d4db5e10a0470a5c52d37f4b04f718d7af4c3c3e9e1e67c69c10f3c4662
|
DIST meson-1.7.1.tar.gz.asc 833 BLAKE2B 1e854c5f026471d1fa1f9f9ca26a8be06518564694b92ba8a751f2c05fa430359c5f6c9b636c0df9a2db338f61a9750e4080d60171a0e3bef49163c416166ef6 SHA512 266de0d34828688491ad3167bb3b88f489b579af1bbbb20a28e3ccfc342fa04659970d4db5e10a0470a5c52d37f4b04f718d7af4c3c3e9e1e67c69c10f3c4662
|
||||||
DIST meson-1.7.2.tar.gz 5009274 BLAKE2B f5a19d7c0dfa35efda5bdef972fa6362a64fee2c74be0c09dee6d52c30a8b0169dbe7fab3199add306c778f6a57196251b44ec27ff6b5e038e12c11b27513a54 SHA512 c3c71ae0e0c31d8d72e200bb5fd5e6584ce41aabe1e85575d50371f82ed02c6e346da3b0b4a2786199b9410daaa1622807a88bfc8ac991cf134bad4a53b3c863
|
DIST meson-1.7.2.tar.gz 5009274 BLAKE2B f5a19d7c0dfa35efda5bdef972fa6362a64fee2c74be0c09dee6d52c30a8b0169dbe7fab3199add306c778f6a57196251b44ec27ff6b5e038e12c11b27513a54 SHA512 c3c71ae0e0c31d8d72e200bb5fd5e6584ce41aabe1e85575d50371f82ed02c6e346da3b0b4a2786199b9410daaa1622807a88bfc8ac991cf134bad4a53b3c863
|
||||||
DIST meson-1.7.2.tar.gz.asc 996 BLAKE2B 9a34bb86f15eb92d4eb972835e8e18e175c869a6ba9d88310ca6058654200b227c7a4a945eee220784f584737a3b74ffcd06e2b60a3e502e49af5da69eb1e5bf SHA512 a1e0461a28dfc8ba74ffd919511584148094c2bc809c3d380749856cbdaa33473c1a0c1ec92928020f50e116803fc03deb37b3ee2aca7e56287b155a5ccc36ac
|
DIST meson-1.7.2.tar.gz.asc 996 BLAKE2B 9a34bb86f15eb92d4eb972835e8e18e175c869a6ba9d88310ca6058654200b227c7a4a945eee220784f584737a3b74ffcd06e2b60a3e502e49af5da69eb1e5bf SHA512 a1e0461a28dfc8ba74ffd919511584148094c2bc809c3d380749856cbdaa33473c1a0c1ec92928020f50e116803fc03deb37b3ee2aca7e56287b155a5ccc36ac
|
||||||
|
DIST meson-1.8.0rc2.tar.gz 2336408 BLAKE2B 6337d81a7adf8de6e0d172117a258f72d11c7bbeeb2624cf449639400f6bcdac961c9519f290d3c7a95f79783cfc2187819b3442b8f258e0db7a9e671edf2a9a SHA512 51012adc2ff86dd88c80c18f78ee7933ecd24f7e664a29cd972e239a25a6b58ab63e10bba1b4cc76fae3edfa74c2ee285a3e23d7791a947e1131de5634cf88f3
|
||||||
|
DIST meson-1.8.0rc2.tar.gz.asc 833 BLAKE2B fc0445987e7edf2abba6d5c627adbf68bc36b69f7334dbeef19e49ad54ec7d42c2e64d1c4c5d9c2a0f3a217e8364c3cd950705e397e069b308b1099ff0d07f18 SHA512 746e41ee39cf0a58f783835dd79a435a16903b7c39756e93eb3f00446a37b82d2f40f7d5bb8a4e5430b33cb43468b4301616bcc8d6b7d2cd85e5b64f61029ed5
|
||||||
DIST meson-reference-1.4.2.3 339324 BLAKE2B 1a4fbd8c27a8cfba773777eabd2ebaa0f76ec0c61dcfe1c7b4483737b348ff9528d68f26e68d7d40b2e1875611eed5b9a31c1cf55fed8eabb42fc1e31d9ef14b SHA512 8b8ec43e812599203ec44c08805eb6818485805c45b9c69802261eaa35efc97846a96f6472c6b1ef5f6c703e7153fd957df7b805f173ca3400a2030dfbe002ca
|
DIST meson-reference-1.4.2.3 339324 BLAKE2B 1a4fbd8c27a8cfba773777eabd2ebaa0f76ec0c61dcfe1c7b4483737b348ff9528d68f26e68d7d40b2e1875611eed5b9a31c1cf55fed8eabb42fc1e31d9ef14b SHA512 8b8ec43e812599203ec44c08805eb6818485805c45b9c69802261eaa35efc97846a96f6472c6b1ef5f6c703e7153fd957df7b805f173ca3400a2030dfbe002ca
|
||||||
DIST meson-reference-1.5.2.3 341110 BLAKE2B 0d588b796f7f2da2dcb0e7822acde6a9a461930da4bfead3cf9148fa0fac18cd0ccbc6e891f555c973836f1c16b4eae299908a838a0b6843293de8815d30fc23 SHA512 64715ce2113e362e7d67179fe13566bc8f84ce7f4e6d795b836f42455a871173fee06e3e969e2996022d7e6c9b4b5379587a4c0c3d97b4bca527fb8902d3547f
|
DIST meson-reference-1.5.2.3 341110 BLAKE2B 0d588b796f7f2da2dcb0e7822acde6a9a461930da4bfead3cf9148fa0fac18cd0ccbc6e891f555c973836f1c16b4eae299908a838a0b6843293de8815d30fc23 SHA512 64715ce2113e362e7d67179fe13566bc8f84ce7f4e6d795b836f42455a871173fee06e3e969e2996022d7e6c9b4b5379587a4c0c3d97b4bca527fb8902d3547f
|
||||||
DIST meson-reference-1.6.1.3 343730 BLAKE2B 55df822192781a70e4bc44cfe14fb363e3f820406260ca9705d7fdb5fad1bf0117e3f1325d37e58e23477bc075ab6bd84056409355ec694f72eeaa5bf982ecc7 SHA512 553cdcd86a7a600cda05ac970cc285c4c50017d1e7d2925645d7f19a62b34c2f079673cafecf4111aa102afbe9d8e4d56f166d1d9940b740eeec0bb99d6cbc0d
|
DIST meson-reference-1.6.1.3 343730 BLAKE2B 55df822192781a70e4bc44cfe14fb363e3f820406260ca9705d7fdb5fad1bf0117e3f1325d37e58e23477bc075ab6bd84056409355ec694f72eeaa5bf982ecc7 SHA512 553cdcd86a7a600cda05ac970cc285c4c50017d1e7d2925645d7f19a62b34c2f079673cafecf4111aa102afbe9d8e4d56f166d1d9940b740eeec0bb99d6cbc0d
|
||||||
DIST meson-reference-1.7.0.3 344764 BLAKE2B 615c70325b6ca3b964bf2827f20f07845150943b6cd95a0599b0392299e2a9338921b52bbe3613fc03fa931c28fb2121801bdb74880f2bd4fecb051b7f1fcb4b SHA512 9d9a3862602251ca780acdf18cee4ab9cd14404481e216b557eafc88b23561ecf481836898b78cbc4ee3539869b5578c649a5c71f32b3074d8125b867ea4751d
|
DIST meson-reference-1.7.0.3 344764 BLAKE2B 615c70325b6ca3b964bf2827f20f07845150943b6cd95a0599b0392299e2a9338921b52bbe3613fc03fa931c28fb2121801bdb74880f2bd4fecb051b7f1fcb4b SHA512 9d9a3862602251ca780acdf18cee4ab9cd14404481e216b557eafc88b23561ecf481836898b78cbc4ee3539869b5578c649a5c71f32b3074d8125b867ea4751d
|
||||||
DIST meson-reference-1.7.1.3 344764 BLAKE2B f4b6a5eb80f143310e9aae3fe512b5146b39df4e74e589c571d3f58ddfcb3298d1accff417c055e46a4ad61fc0557723eb4d89607a4793d1bcc134f1e83ab3eb SHA512 f36e4adcf7eab70738c71c48c87328bc436168dc605c0931b746d4b48915269dc9245215a4aa968046e4cb0f5167f595da1cf2acd96d87ed47aea9b34b63a652
|
DIST meson-reference-1.7.1.3 344764 BLAKE2B f4b6a5eb80f143310e9aae3fe512b5146b39df4e74e589c571d3f58ddfcb3298d1accff417c055e46a4ad61fc0557723eb4d89607a4793d1bcc134f1e83ab3eb SHA512 f36e4adcf7eab70738c71c48c87328bc436168dc605c0931b746d4b48915269dc9245215a4aa968046e4cb0f5167f595da1cf2acd96d87ed47aea9b34b63a652
|
||||||
DIST meson-reference-1.7.2.3 344764 BLAKE2B 82de9a7a01c2f1b45a2b3432deb4713af3cfd3b2dc9af8802488b7d1b86dde9b6ac81f90b144006a79e90b313e1d4d23f9cc90e17255ce9573e5487d3e20c286 SHA512 d482a3b3bed671705d6316e106984ad2c2169fe890349437e512455705ee8dddb31a29d31f44402a4c7c5bd2f78595b75bfc5ad34d8c0337b66f40837b08ee56
|
DIST meson-reference-1.7.2.3 344764 BLAKE2B 82de9a7a01c2f1b45a2b3432deb4713af3cfd3b2dc9af8802488b7d1b86dde9b6ac81f90b144006a79e90b313e1d4d23f9cc90e17255ce9573e5487d3e20c286 SHA512 d482a3b3bed671705d6316e106984ad2c2169fe890349437e512455705ee8dddb31a29d31f44402a4c7c5bd2f78595b75bfc5ad34d8c0337b66f40837b08ee56
|
||||||
|
DIST meson-reference-1.8.0rc2.3 345637 BLAKE2B c0435919ce58d0bc48243aadfe1d98c428e8f41bfe73093e1e8373d1e8c126159b9363ee9b272e9fe292287f076cee58dce4b56a9064a6b5032b6db541cbcf99 SHA512 3768d2e493a53627b51865c8be564411c192ee421cf886ade84e3a91d011e32419f0e1417cfec01bf95d28b9610d913a7e0a317335ade2e31c1b8afb7faeaa06
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
# Copyright 2016-2024 Gentoo Authors
|
# Copyright 2016-2025 Gentoo Authors
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
EAPI=8
|
EAPI=8
|
||||||
@ -28,7 +28,7 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
inherit bash-completion-r1 distutils-r1 toolchain-funcs
|
inherit shell-completion distutils-r1 toolchain-funcs
|
||||||
|
|
||||||
DESCRIPTION="Open source build system"
|
DESCRIPTION="Open source build system"
|
||||||
HOMEPAGE="https://mesonbuild.com/"
|
HOMEPAGE="https://mesonbuild.com/"
|
||||||
@ -122,8 +122,6 @@ python_install_all() {
|
|||||||
insinto /usr/share/vim/vimfiles
|
insinto /usr/share/vim/vimfiles
|
||||||
doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
|
doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
|
||||||
|
|
||||||
insinto /usr/share/zsh/site-functions
|
dozshcomp data/shell-completions/zsh/_meson
|
||||||
doins data/shell-completions/zsh/_meson
|
|
||||||
|
|
||||||
dobashcomp data/shell-completions/bash/meson
|
dobashcomp data/shell-completions/bash/meson
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
# Copyright 2016-2024 Gentoo Authors
|
# Copyright 2016-2025 Gentoo Authors
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
EAPI=8
|
EAPI=8
|
||||||
@ -28,7 +28,7 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
inherit bash-completion-r1 distutils-r1 toolchain-funcs
|
inherit shell-completion distutils-r1 toolchain-funcs
|
||||||
|
|
||||||
DESCRIPTION="Open source build system"
|
DESCRIPTION="Open source build system"
|
||||||
HOMEPAGE="https://mesonbuild.com/"
|
HOMEPAGE="https://mesonbuild.com/"
|
||||||
@ -122,8 +122,6 @@ python_install_all() {
|
|||||||
insinto /usr/share/vim/vimfiles
|
insinto /usr/share/vim/vimfiles
|
||||||
doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
|
doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
|
||||||
|
|
||||||
insinto /usr/share/zsh/site-functions
|
dozshcomp data/shell-completions/zsh/_meson
|
||||||
doins data/shell-completions/zsh/_meson
|
|
||||||
|
|
||||||
dobashcomp data/shell-completions/bash/meson
|
dobashcomp data/shell-completions/bash/meson
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
# Copyright 2016-2024 Gentoo Authors
|
# Copyright 2016-2025 Gentoo Authors
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
EAPI=8
|
EAPI=8
|
||||||
@ -28,7 +28,7 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
inherit bash-completion-r1 distutils-r1 toolchain-funcs
|
inherit shell-completion distutils-r1 toolchain-funcs
|
||||||
|
|
||||||
DESCRIPTION="Open source build system"
|
DESCRIPTION="Open source build system"
|
||||||
HOMEPAGE="https://mesonbuild.com/"
|
HOMEPAGE="https://mesonbuild.com/"
|
||||||
@ -123,8 +123,6 @@ python_install_all() {
|
|||||||
insinto /usr/share/vim/vimfiles
|
insinto /usr/share/vim/vimfiles
|
||||||
doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
|
doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
|
||||||
|
|
||||||
insinto /usr/share/zsh/site-functions
|
dozshcomp data/shell-completions/zsh/_meson
|
||||||
doins data/shell-completions/zsh/_meson
|
|
||||||
|
|
||||||
dobashcomp data/shell-completions/bash/meson
|
dobashcomp data/shell-completions/bash/meson
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
# Copyright 2016-2024 Gentoo Authors
|
# Copyright 2016-2025 Gentoo Authors
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
EAPI=8
|
EAPI=8
|
||||||
@ -6,7 +6,7 @@ EAPI=8
|
|||||||
PYTHON_COMPAT=( python3_{10..12} pypy3 )
|
PYTHON_COMPAT=( python3_{10..12} pypy3 )
|
||||||
DISTUTILS_USE_PEP517=setuptools
|
DISTUTILS_USE_PEP517=setuptools
|
||||||
|
|
||||||
inherit bash-completion-r1 edo distutils-r1 flag-o-matic toolchain-funcs
|
inherit shell-completion edo distutils-r1 flag-o-matic toolchain-funcs
|
||||||
|
|
||||||
if [[ ${PV} = *9999* ]]; then
|
if [[ ${PV} = *9999* ]]; then
|
||||||
EGIT_REPO_URI="https://github.com/mesonbuild/meson"
|
EGIT_REPO_URI="https://github.com/mesonbuild/meson"
|
||||||
@ -181,9 +181,7 @@ python_install_all() {
|
|||||||
insinto /usr/share/vim/vimfiles
|
insinto /usr/share/vim/vimfiles
|
||||||
doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
|
doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
|
||||||
|
|
||||||
insinto /usr/share/zsh/site-functions
|
dozshcomp data/shell-completions/zsh/_meson
|
||||||
doins data/shell-completions/zsh/_meson
|
|
||||||
|
|
||||||
dobashcomp data/shell-completions/bash/meson
|
dobashcomp data/shell-completions/bash/meson
|
||||||
|
|
||||||
if [[ ${PV} = *9999* ]]; then
|
if [[ ${PV} = *9999* ]]; then
|
||||||
|
|||||||
@ -6,7 +6,7 @@ EAPI=8
|
|||||||
PYTHON_COMPAT=( python3_{10..13} pypy3 )
|
PYTHON_COMPAT=( python3_{10..13} pypy3 )
|
||||||
DISTUTILS_USE_PEP517=setuptools
|
DISTUTILS_USE_PEP517=setuptools
|
||||||
|
|
||||||
inherit bash-completion-r1 edo distutils-r1 flag-o-matic toolchain-funcs
|
inherit shell-completion edo distutils-r1 flag-o-matic toolchain-funcs
|
||||||
|
|
||||||
if [[ ${PV} = *9999* ]]; then
|
if [[ ${PV} = *9999* ]]; then
|
||||||
EGIT_REPO_URI="https://github.com/mesonbuild/meson"
|
EGIT_REPO_URI="https://github.com/mesonbuild/meson"
|
||||||
@ -177,9 +177,7 @@ python_install_all() {
|
|||||||
insinto /usr/share/vim/vimfiles
|
insinto /usr/share/vim/vimfiles
|
||||||
doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
|
doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
|
||||||
|
|
||||||
insinto /usr/share/zsh/site-functions
|
dozshcomp data/shell-completions/zsh/_meson
|
||||||
doins data/shell-completions/zsh/_meson
|
|
||||||
|
|
||||||
dobashcomp data/shell-completions/bash/meson
|
dobashcomp data/shell-completions/bash/meson
|
||||||
|
|
||||||
if [[ ${PV} = *9999* ]]; then
|
if [[ ${PV} = *9999* ]]; then
|
||||||
|
|||||||
@ -6,7 +6,7 @@ EAPI=8
|
|||||||
PYTHON_COMPAT=( python3_{10..13} pypy3 )
|
PYTHON_COMPAT=( python3_{10..13} pypy3 )
|
||||||
DISTUTILS_USE_PEP517=setuptools
|
DISTUTILS_USE_PEP517=setuptools
|
||||||
|
|
||||||
inherit bash-completion-r1 edo distutils-r1 flag-o-matic toolchain-funcs
|
inherit shell-completion edo distutils-r1 flag-o-matic toolchain-funcs
|
||||||
|
|
||||||
if [[ ${PV} = *9999* ]]; then
|
if [[ ${PV} = *9999* ]]; then
|
||||||
EGIT_REPO_URI="https://github.com/mesonbuild/meson"
|
EGIT_REPO_URI="https://github.com/mesonbuild/meson"
|
||||||
@ -214,9 +214,7 @@ python_install_all() {
|
|||||||
insinto /usr/share/vim/vimfiles
|
insinto /usr/share/vim/vimfiles
|
||||||
doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
|
doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
|
||||||
|
|
||||||
insinto /usr/share/zsh/site-functions
|
dozshcomp data/shell-completions/zsh/_meson
|
||||||
doins data/shell-completions/zsh/_meson
|
|
||||||
|
|
||||||
dobashcomp data/shell-completions/bash/meson
|
dobashcomp data/shell-completions/bash/meson
|
||||||
|
|
||||||
if [[ ${PV} = *9999* ]]; then
|
if [[ ${PV} = *9999* ]]; then
|
||||||
|
|||||||
@ -6,7 +6,7 @@ EAPI=8
|
|||||||
PYTHON_COMPAT=( python3_{10..13} pypy3 pypy3_11 )
|
PYTHON_COMPAT=( python3_{10..13} pypy3 pypy3_11 )
|
||||||
DISTUTILS_USE_PEP517=setuptools
|
DISTUTILS_USE_PEP517=setuptools
|
||||||
|
|
||||||
inherit bash-completion-r1 edo distutils-r1 flag-o-matic toolchain-funcs
|
inherit shell-completion edo distutils-r1 flag-o-matic toolchain-funcs
|
||||||
|
|
||||||
if [[ ${PV} = *9999* ]]; then
|
if [[ ${PV} = *9999* ]]; then
|
||||||
EGIT_REPO_URI="https://github.com/mesonbuild/meson"
|
EGIT_REPO_URI="https://github.com/mesonbuild/meson"
|
||||||
@ -214,9 +214,7 @@ python_install_all() {
|
|||||||
insinto /usr/share/vim/vimfiles
|
insinto /usr/share/vim/vimfiles
|
||||||
doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
|
doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
|
||||||
|
|
||||||
insinto /usr/share/zsh/site-functions
|
dozshcomp data/shell-completions/zsh/_meson
|
||||||
doins data/shell-completions/zsh/_meson
|
|
||||||
|
|
||||||
dobashcomp data/shell-completions/bash/meson
|
dobashcomp data/shell-completions/bash/meson
|
||||||
|
|
||||||
if [[ ${PV} = *9999* ]]; then
|
if [[ ${PV} = *9999* ]]; then
|
||||||
|
|||||||
@ -6,7 +6,7 @@ EAPI=8
|
|||||||
PYTHON_COMPAT=( python3_{10..13} pypy3 pypy3_11 )
|
PYTHON_COMPAT=( python3_{10..13} pypy3 pypy3_11 )
|
||||||
DISTUTILS_USE_PEP517=setuptools
|
DISTUTILS_USE_PEP517=setuptools
|
||||||
|
|
||||||
inherit bash-completion-r1 edo distutils-r1 flag-o-matic toolchain-funcs
|
inherit shell-completion edo distutils-r1 flag-o-matic toolchain-funcs
|
||||||
|
|
||||||
if [[ ${PV} = *9999* ]]; then
|
if [[ ${PV} = *9999* ]]; then
|
||||||
EGIT_REPO_URI="https://github.com/mesonbuild/meson"
|
EGIT_REPO_URI="https://github.com/mesonbuild/meson"
|
||||||
@ -214,9 +214,7 @@ python_install_all() {
|
|||||||
insinto /usr/share/vim/vimfiles
|
insinto /usr/share/vim/vimfiles
|
||||||
doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
|
doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
|
||||||
|
|
||||||
insinto /usr/share/zsh/site-functions
|
dozshcomp data/shell-completions/zsh/_meson
|
||||||
doins data/shell-completions/zsh/_meson
|
|
||||||
|
|
||||||
dobashcomp data/shell-completions/bash/meson
|
dobashcomp data/shell-completions/bash/meson
|
||||||
|
|
||||||
if [[ ${PV} = *9999* ]]; then
|
if [[ ${PV} = *9999* ]]; then
|
||||||
|
|||||||
@ -6,7 +6,7 @@ EAPI=8
|
|||||||
PYTHON_COMPAT=( python3_{10..13} pypy3 pypy3_11 )
|
PYTHON_COMPAT=( python3_{10..13} pypy3 pypy3_11 )
|
||||||
DISTUTILS_USE_PEP517=setuptools
|
DISTUTILS_USE_PEP517=setuptools
|
||||||
|
|
||||||
inherit bash-completion-r1 edo distutils-r1 flag-o-matic toolchain-funcs
|
inherit shell-completion edo distutils-r1 flag-o-matic toolchain-funcs
|
||||||
|
|
||||||
if [[ ${PV} = *9999* ]]; then
|
if [[ ${PV} = *9999* ]]; then
|
||||||
EGIT_REPO_URI="https://github.com/mesonbuild/meson"
|
EGIT_REPO_URI="https://github.com/mesonbuild/meson"
|
||||||
@ -217,9 +217,7 @@ python_install_all() {
|
|||||||
insinto /usr/share/vim/vimfiles
|
insinto /usr/share/vim/vimfiles
|
||||||
doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
|
doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
|
||||||
|
|
||||||
insinto /usr/share/zsh/site-functions
|
dozshcomp data/shell-completions/zsh/_meson
|
||||||
doins data/shell-completions/zsh/_meson
|
|
||||||
|
|
||||||
dobashcomp data/shell-completions/bash/meson
|
dobashcomp data/shell-completions/bash/meson
|
||||||
|
|
||||||
if [[ ${PV} = *9999* ]]; then
|
if [[ ${PV} = *9999* ]]; then
|
||||||
|
|||||||
228
sdk_container/src/third_party/portage-stable/dev-build/meson/meson-1.8.0_rc2.ebuild
vendored
Normal file
228
sdk_container/src/third_party/portage-stable/dev-build/meson/meson-1.8.0_rc2.ebuild
vendored
Normal file
@ -0,0 +1,228 @@
|
|||||||
|
# Copyright 2016-2025 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
PYTHON_COMPAT=( python3_{10..13} pypy3 pypy3_11 )
|
||||||
|
DISTUTILS_USE_PEP517=setuptools
|
||||||
|
|
||||||
|
inherit shell-completion edo distutils-r1 flag-o-matic toolchain-funcs
|
||||||
|
|
||||||
|
if [[ ${PV} = *9999* ]]; then
|
||||||
|
EGIT_REPO_URI="https://github.com/mesonbuild/meson"
|
||||||
|
inherit ninja-utils git-r3
|
||||||
|
|
||||||
|
BDEPEND="
|
||||||
|
${NINJA_DEPEND}
|
||||||
|
$(python_gen_any_dep 'dev-python/pyyaml[${PYTHON_USEDEP}]')
|
||||||
|
"
|
||||||
|
|
||||||
|
else
|
||||||
|
inherit verify-sig
|
||||||
|
|
||||||
|
MY_PV=${PV/_/}
|
||||||
|
MY_P=${P/_/}
|
||||||
|
S=${WORKDIR}/${MY_P}
|
||||||
|
|
||||||
|
SRC_URI="
|
||||||
|
https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz
|
||||||
|
verify-sig? ( https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz.asc )
|
||||||
|
https://github.com/mesonbuild/meson/releases/download/${MY_PV}/meson-reference.3 -> meson-reference-${MY_PV}.3
|
||||||
|
"
|
||||||
|
# Releases may be signed by those listed in Releasing.md. Jussi
|
||||||
|
# remains the default release manager.
|
||||||
|
# https://github.com/mesonbuild/meson/commit/c2d795735fa1c46c54d6aed4d4a30f36a1f853cb
|
||||||
|
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-jpakkane )"
|
||||||
|
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jpakkane.gpg
|
||||||
|
|
||||||
|
if [[ ${PV} != *_rc* ]] ; then
|
||||||
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
DESCRIPTION="Open source build system"
|
||||||
|
HOMEPAGE="https://mesonbuild.com/"
|
||||||
|
|
||||||
|
LICENSE="Apache-2.0"
|
||||||
|
SLOT="0"
|
||||||
|
IUSE="test test-full"
|
||||||
|
RESTRICT="!test? ( test )"
|
||||||
|
REQUIRED_USE="test-full? ( test )"
|
||||||
|
|
||||||
|
DEPEND="
|
||||||
|
test? (
|
||||||
|
dev-libs/glib:2
|
||||||
|
dev-libs/gobject-introspection
|
||||||
|
app-alternatives/ninja
|
||||||
|
dev-vcs/git
|
||||||
|
sys-libs/zlib[static-libs(+)]
|
||||||
|
virtual/pkgconfig
|
||||||
|
dev-build/cmake
|
||||||
|
)
|
||||||
|
test-full? (
|
||||||
|
|| ( dev-lang/rust dev-lang/rust-bin )
|
||||||
|
dev-lang/nasm
|
||||||
|
>=dev-lang/pypy-3
|
||||||
|
dev-lang/vala
|
||||||
|
dev-python/cython
|
||||||
|
virtual/fortran
|
||||||
|
virtual/jdk
|
||||||
|
|
||||||
|
app-text/doxygen
|
||||||
|
dev-cpp/gtest
|
||||||
|
dev-libs/protobuf
|
||||||
|
dev-util/bindgen
|
||||||
|
dev-util/gtk-doc
|
||||||
|
dev-util/itstool
|
||||||
|
llvm-core/llvm
|
||||||
|
media-libs/libsdl2
|
||||||
|
media-libs/libwmf
|
||||||
|
net-libs/libpcap
|
||||||
|
sci-libs/hdf5[fortran]
|
||||||
|
sci-libs/netcdf
|
||||||
|
sys-cluster/openmpi[fortran]
|
||||||
|
sys-devel/bison
|
||||||
|
sys-devel/flex
|
||||||
|
|
||||||
|
dev-qt/linguist-tools:5
|
||||||
|
dev-qt/qtwidgets:5
|
||||||
|
dev-qt/qtbase:6[gui,widgets]
|
||||||
|
dev-qt/qttools:6
|
||||||
|
dev-util/gdbus-codegen
|
||||||
|
x11-libs/gtk+:3
|
||||||
|
|
||||||
|
dev-libs/wayland
|
||||||
|
dev-util/wayland-scanner
|
||||||
|
)
|
||||||
|
"
|
||||||
|
RDEPEND="
|
||||||
|
!<dev-build/muon-0.2.0-r2[man(-)]
|
||||||
|
virtual/pkgconfig
|
||||||
|
"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}"/${PN}-1.2.1-python-path.patch
|
||||||
|
)
|
||||||
|
|
||||||
|
src_unpack() {
|
||||||
|
if [[ ${PV} = *9999* ]]; then
|
||||||
|
git-r3_src_unpack
|
||||||
|
else
|
||||||
|
default
|
||||||
|
use verify-sig && verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.gz{,.asc}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
python_prepare_all() {
|
||||||
|
local disable_unittests=(
|
||||||
|
# ASAN and sandbox both want control over LD_PRELOAD
|
||||||
|
# https://bugs.gentoo.org/673016
|
||||||
|
-e 's/test_generate_gir_with_address_sanitizer/_&/'
|
||||||
|
|
||||||
|
# ASAN is unsupported on some targets
|
||||||
|
# https://bugs.gentoo.org/692822
|
||||||
|
-e 's/test_pch_with_address_sanitizer/_&/'
|
||||||
|
|
||||||
|
# clippy-driver fails, but only when run via portage.
|
||||||
|
#
|
||||||
|
# error[E0463]: can't find crate for `std`
|
||||||
|
# error: requires `sized` lang_item
|
||||||
|
-e 's/test_rust_clippy/_&/'
|
||||||
|
)
|
||||||
|
|
||||||
|
sed -i "${disable_unittests[@]}" unittests/*.py || die
|
||||||
|
|
||||||
|
# Broken due to python2 script created by python_wrapper_setup
|
||||||
|
rm -r "test cases/frameworks/1 boost" || die
|
||||||
|
# nvcc breaks on essentially any LDFLAGS
|
||||||
|
# https://bugs.gentoo.org/936757
|
||||||
|
# https://github.com/mesonbuild/meson/issues/11234
|
||||||
|
rm -r "test cases/cuda"/* || die
|
||||||
|
|
||||||
|
distutils-r1_python_prepare_all
|
||||||
|
}
|
||||||
|
|
||||||
|
python_check_deps() {
|
||||||
|
if [[ ${PV} = *9999* ]]; then
|
||||||
|
python_has_version "dev-python/pyyaml[${PYTHON_USEDEP}]"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
python_configure_all() {
|
||||||
|
if [[ ${PV} = *9999* ]]; then
|
||||||
|
# We use the unsafe_yaml loader because strictyaml is not packaged. In
|
||||||
|
# theory they produce the same results, but pyyaml is faster and
|
||||||
|
# without safety checks.
|
||||||
|
edo ./meson.py setup \
|
||||||
|
--prefix "${EPREFIX}/usr" \
|
||||||
|
-Dhtml=false \
|
||||||
|
-Dunsafe_yaml=true \
|
||||||
|
docs/ docs/builddir
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
python_compile_all() {
|
||||||
|
if [[ ${PV} = *9999* ]]; then
|
||||||
|
eninja -C docs/builddir
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_test() {
|
||||||
|
tc-export PKG_CONFIG
|
||||||
|
if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then
|
||||||
|
ewarn "Found Qt5Core but not Qt5Gui; skipping tests"
|
||||||
|
else
|
||||||
|
distutils-r1_src_test
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
python_test() {
|
||||||
|
(
|
||||||
|
# meson has its own tests for LTO support. We don't need to verify that
|
||||||
|
# all tests work when they happen to use it. And in particular, this
|
||||||
|
# breaks rust.
|
||||||
|
filter-lto
|
||||||
|
|
||||||
|
# remove unwanted python_wrapper_setup contents
|
||||||
|
# We actually do want to non-error if python2 is installed and tested.
|
||||||
|
remove="${T}/${EPYTHON}/bin:"
|
||||||
|
PATH=${PATH/${remove}/}
|
||||||
|
|
||||||
|
# test_meson_installed
|
||||||
|
unset PYTHONDONTWRITEBYTECODE
|
||||||
|
|
||||||
|
# https://bugs.gentoo.org/687792
|
||||||
|
unset PKG_CONFIG
|
||||||
|
|
||||||
|
# test_cross_file_system_paths
|
||||||
|
unset XDG_DATA_HOME
|
||||||
|
|
||||||
|
# 'test cases/unit/73 summary' expects 80 columns
|
||||||
|
export COLUMNS=80
|
||||||
|
|
||||||
|
# If JAVA_HOME is not set, meson looks for javac in PATH.
|
||||||
|
# If javac is in /usr/bin, meson assumes /usr/include is a valid
|
||||||
|
# JDK include path. Setting JAVA_HOME works around this broken
|
||||||
|
# autodetection. If no JDK is installed, we should end up with an empty
|
||||||
|
# value in JAVA_HOME, and the tests should get skipped.
|
||||||
|
export JAVA_HOME=$(java-config -O 2>/dev/null)
|
||||||
|
|
||||||
|
${EPYTHON} -u run_tests.py
|
||||||
|
) || die "Testing failed with ${EPYTHON}"
|
||||||
|
}
|
||||||
|
|
||||||
|
python_install_all() {
|
||||||
|
distutils-r1_python_install_all
|
||||||
|
|
||||||
|
insinto /usr/share/vim/vimfiles
|
||||||
|
doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
|
||||||
|
|
||||||
|
dozshcomp data/shell-completions/zsh/_meson
|
||||||
|
dobashcomp data/shell-completions/bash/meson
|
||||||
|
|
||||||
|
if [[ ${PV} = *9999* ]]; then
|
||||||
|
DESTDIR="${ED}" eninja -C docs/builddir install
|
||||||
|
else
|
||||||
|
newman "${DISTDIR}"/meson-reference-${MY_PV}.3 meson-reference.3
|
||||||
|
fi
|
||||||
|
}
|
||||||
@ -6,7 +6,7 @@ EAPI=8
|
|||||||
PYTHON_COMPAT=( python3_{10..13} pypy3 pypy3_11 )
|
PYTHON_COMPAT=( python3_{10..13} pypy3 pypy3_11 )
|
||||||
DISTUTILS_USE_PEP517=setuptools
|
DISTUTILS_USE_PEP517=setuptools
|
||||||
|
|
||||||
inherit bash-completion-r1 edo distutils-r1 flag-o-matic toolchain-funcs
|
inherit shell-completion edo distutils-r1 flag-o-matic toolchain-funcs
|
||||||
|
|
||||||
if [[ ${PV} = *9999* ]]; then
|
if [[ ${PV} = *9999* ]]; then
|
||||||
EGIT_REPO_URI="https://github.com/mesonbuild/meson"
|
EGIT_REPO_URI="https://github.com/mesonbuild/meson"
|
||||||
@ -217,9 +217,7 @@ python_install_all() {
|
|||||||
insinto /usr/share/vim/vimfiles
|
insinto /usr/share/vim/vimfiles
|
||||||
doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
|
doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
|
||||||
|
|
||||||
insinto /usr/share/zsh/site-functions
|
dozshcomp data/shell-completions/zsh/_meson
|
||||||
doins data/shell-completions/zsh/_meson
|
|
||||||
|
|
||||||
dobashcomp data/shell-completions/bash/meson
|
dobashcomp data/shell-completions/bash/meson
|
||||||
|
|
||||||
if [[ ${PV} = *9999* ]]; then
|
if [[ ${PV} = *9999* ]]; then
|
||||||
|
|||||||
@ -1,2 +1,3 @@
|
|||||||
DIST gdb-15.2.tar.xz 24332820 BLAKE2B 073668c21b41f12bf40160c6d3df808056453cc9df3b5b86374abe38e955d208f86467458b7e64b3c3e93d70b7f87425619778173fdb375256cd85be15419f14 SHA512 624007deceb5b15ba89c0725883d1a699fa46714ef30887f3d0165e17c5d65d634671740a135aa69e437d916218abb08cfa2a38ed309ff19d48f51da56b2a8ba
|
DIST gdb-15.2.tar.xz 24332820 BLAKE2B 073668c21b41f12bf40160c6d3df808056453cc9df3b5b86374abe38e955d208f86467458b7e64b3c3e93d70b7f87425619778173fdb375256cd85be15419f14 SHA512 624007deceb5b15ba89c0725883d1a699fa46714ef30887f3d0165e17c5d65d634671740a135aa69e437d916218abb08cfa2a38ed309ff19d48f51da56b2a8ba
|
||||||
DIST gdb-16.2.tar.xz 24426680 BLAKE2B 480cc5c116e418d7eb13a68bee8a2ced8e7a40bd38826dde3590a8d5b690c3dd46be6fa3790518b39ac7255698a1ecf35a2bb51d7e38d849f7b9277c15fe38fc SHA512 f04a6335dbdee371edb7e3213294fcbb878ac39adedb73f7e17e621f54350488f5f5bea9bc742639239c122d590bed158771a74fc3aaeaa7fa0ae304232576a3
|
DIST gdb-16.2.tar.xz 24426680 BLAKE2B 480cc5c116e418d7eb13a68bee8a2ced8e7a40bd38826dde3590a8d5b690c3dd46be6fa3790518b39ac7255698a1ecf35a2bb51d7e38d849f7b9277c15fe38fc SHA512 f04a6335dbdee371edb7e3213294fcbb878ac39adedb73f7e17e621f54350488f5f5bea9bc742639239c122d590bed158771a74fc3aaeaa7fa0ae304232576a3
|
||||||
|
DIST gdb-16.3.tar.xz 24434444 BLAKE2B a75c8655b39580a7f6e0d85ef663f60932fbed9a92ade6d58a2e99bc8b1416b36f8410c66c23bdada83e221a65c1cdfdeb7bb7ae9a930c443557864a1769dbee SHA512 fffd6689c3405466a179670b04720dc825e4f210a761f63dd2b33027432f8cd5d1c059c431a5ec9e165eedd1901220b5329d73c522f9a444788888c731b29e9c
|
||||||
|
|||||||
@ -75,7 +75,7 @@ LICENSE="GPL-3+ LGPL-2.1+"
|
|||||||
SLOT="0"
|
SLOT="0"
|
||||||
IUSE="babeltrace cet debuginfod guile lzma multitarget nls +python rocm +server sim source-highlight test vanilla xml xxhash zstd"
|
IUSE="babeltrace cet debuginfod guile lzma multitarget nls +python rocm +server sim source-highlight test vanilla xml xxhash zstd"
|
||||||
if [[ -n ${REGULAR_RELEASE} ]] ; then
|
if [[ -n ${REGULAR_RELEASE} ]] ; then
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
|
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
|
||||||
fi
|
fi
|
||||||
REQUIRED_USE="
|
REQUIRED_USE="
|
||||||
guile? ( ${GUILE_REQUIRED_USE} )
|
guile? ( ${GUILE_REQUIRED_USE} )
|
||||||
@ -84,13 +84,14 @@ REQUIRED_USE="
|
|||||||
"
|
"
|
||||||
RESTRICT="!test? ( test )"
|
RESTRICT="!test? ( test )"
|
||||||
|
|
||||||
|
# <babeltrace-2: bug #951652
|
||||||
RDEPEND="
|
RDEPEND="
|
||||||
dev-libs/mpfr:=
|
dev-libs/mpfr:=
|
||||||
dev-libs/gmp:=
|
dev-libs/gmp:=
|
||||||
>=sys-libs/ncurses-5.2-r2:=
|
>=sys-libs/ncurses-5.2-r2:=
|
||||||
>=sys-libs/readline-7:=
|
>=sys-libs/readline-7:=
|
||||||
sys-libs/zlib
|
sys-libs/zlib
|
||||||
babeltrace? ( dev-util/babeltrace:= )
|
babeltrace? ( dev-util/babeltrace:0/1 )
|
||||||
debuginfod? (
|
debuginfod? (
|
||||||
dev-libs/elfutils[debuginfod(-)]
|
dev-libs/elfutils[debuginfod(-)]
|
||||||
)
|
)
|
||||||
|
|||||||
@ -88,13 +88,14 @@ REQUIRED_USE="
|
|||||||
"
|
"
|
||||||
RESTRICT="!test? ( test )"
|
RESTRICT="!test? ( test )"
|
||||||
|
|
||||||
|
# <babeltrace-2: bug #951652
|
||||||
RDEPEND="
|
RDEPEND="
|
||||||
dev-libs/mpfr:=
|
dev-libs/mpfr:=
|
||||||
dev-libs/gmp:=
|
dev-libs/gmp:=
|
||||||
>=sys-libs/ncurses-5.2-r2:=
|
>=sys-libs/ncurses-5.2-r2:=
|
||||||
>=sys-libs/readline-7:=
|
>=sys-libs/readline-7:=
|
||||||
sys-libs/zlib
|
sys-libs/zlib
|
||||||
babeltrace? ( dev-util/babeltrace:= )
|
babeltrace? ( dev-util/babeltrace:0/1 )
|
||||||
debuginfod? (
|
debuginfod? (
|
||||||
dev-libs/elfutils[debuginfod(-)]
|
dev-libs/elfutils[debuginfod(-)]
|
||||||
)
|
)
|
||||||
@ -134,14 +135,16 @@ PATCHES=(
|
|||||||
pkg_setup() {
|
pkg_setup() {
|
||||||
local CONFIG_CHECK
|
local CONFIG_CHECK
|
||||||
|
|
||||||
if kernel_is -ge 6.11.3 ; then
|
if [[ ${CHOST} == *-linux-* ]] ; then
|
||||||
# https://forums.gentoo.org/viewtopic-p-8846891.html
|
if kernel_is -ge 6.11.3 ; then
|
||||||
#
|
# https://forums.gentoo.org/viewtopic-p-8846891.html
|
||||||
# Either CONFIG_PROC_MEM_ALWAYS_FORCE or CONFIG_PROC_MEM_FORCE_PTRACE
|
#
|
||||||
# should be okay, but not CONFIG_PROC_MEM_NO_FORCE.
|
# Either CONFIG_PROC_MEM_ALWAYS_FORCE or CONFIG_PROC_MEM_FORCE_PTRACE
|
||||||
CONFIG_CHECK+="
|
# should be okay, but not CONFIG_PROC_MEM_NO_FORCE.
|
||||||
~!PROC_MEM_NO_FORCE
|
CONFIG_CHECK+="
|
||||||
"
|
~!PROC_MEM_NO_FORCE
|
||||||
|
"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
linux-info_pkg_setup
|
linux-info_pkg_setup
|
||||||
@ -160,14 +163,6 @@ src_prepare() {
|
|||||||
# Avoid using ancient termcap from host on Prefix systems
|
# Avoid using ancient termcap from host on Prefix systems
|
||||||
sed -i -e 's/termcap tinfow/tinfow/g' \
|
sed -i -e 's/termcap tinfow/tinfow/g' \
|
||||||
gdb/configure{.ac,} || die
|
gdb/configure{.ac,} || die
|
||||||
if [[ ${CHOST} == *-solaris* ]] ; then
|
|
||||||
# code relies on C++11, so make sure we get that selected
|
|
||||||
# due to Python 3.11 pymacro.h doing stuff to work around
|
|
||||||
# versioning mess based on the C version, while we're compiling
|
|
||||||
# C++ here, so we need to make it clear we're doing C++11/C11
|
|
||||||
# because Solaris system headers act on these
|
|
||||||
sed -i -e 's/-x c++/-std=c++11/' gdb/Makefile.in || die
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gdb_branding() {
|
gdb_branding() {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
# Copyright 1999-2024 Gentoo Authors
|
# Copyright 1999-2025 Gentoo Authors
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
EAPI=8
|
EAPI=8
|
||||||
@ -23,7 +23,11 @@ is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
|
|||||||
case ${PV} in
|
case ${PV} in
|
||||||
9999*)
|
9999*)
|
||||||
# live git tree
|
# live git tree
|
||||||
EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
|
EGIT_REPO_URI="
|
||||||
|
https://sourceware.org/git/binutils-gdb.git
|
||||||
|
https://git.sr.ht/~sourceware/binutils-gdb
|
||||||
|
https://gitlab.com/x86-binutils/binutils-gdb.git
|
||||||
|
"
|
||||||
inherit git-r3
|
inherit git-r3
|
||||||
SRC_URI=""
|
SRC_URI=""
|
||||||
;;
|
;;
|
||||||
@ -73,23 +77,25 @@ SRC_URI="
|
|||||||
|
|
||||||
LICENSE="GPL-3+ LGPL-2.1+"
|
LICENSE="GPL-3+ LGPL-2.1+"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
IUSE="cet debuginfod guile lzma multitarget nls +python +server sim source-highlight test vanilla xml xxhash zstd"
|
IUSE="babeltrace cet debuginfod guile lzma multitarget nls +python rocm +server sim source-highlight test vanilla xml xxhash zstd"
|
||||||
if [[ -n ${REGULAR_RELEASE} ]] ; then
|
if [[ -n ${REGULAR_RELEASE} ]] ; then
|
||||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
|
||||||
fi
|
fi
|
||||||
REQUIRED_USE="
|
REQUIRED_USE="
|
||||||
guile? ( ${GUILE_REQUIRED_USE} )
|
guile? ( ${GUILE_REQUIRED_USE} )
|
||||||
python? ( ${PYTHON_REQUIRED_USE} )
|
python? ( ${PYTHON_REQUIRED_USE} )
|
||||||
|
rocm? ( multitarget )
|
||||||
"
|
"
|
||||||
RESTRICT="!test? ( test )"
|
RESTRICT="!test? ( test )"
|
||||||
|
|
||||||
|
# <babeltrace-2: bug #951652
|
||||||
RDEPEND="
|
RDEPEND="
|
||||||
dev-libs/mpfr:=
|
dev-libs/mpfr:=
|
||||||
dev-libs/gmp:=
|
dev-libs/gmp:=
|
||||||
>=sys-libs/ncurses-5.2-r2:=
|
>=sys-libs/ncurses-5.2-r2:=
|
||||||
>=sys-libs/readline-7:=
|
>=sys-libs/readline-7:=
|
||||||
sys-libs/zlib
|
sys-libs/zlib
|
||||||
elibc_glibc? ( net-libs/libnsl:= )
|
babeltrace? ( dev-util/babeltrace:0/1 )
|
||||||
debuginfod? (
|
debuginfod? (
|
||||||
dev-libs/elfutils[debuginfod(-)]
|
dev-libs/elfutils[debuginfod(-)]
|
||||||
)
|
)
|
||||||
@ -97,6 +103,7 @@ RDEPEND="
|
|||||||
python? ( ${PYTHON_DEPS} )
|
python? ( ${PYTHON_DEPS} )
|
||||||
guile? ( ${GUILE_DEPS} )
|
guile? ( ${GUILE_DEPS} )
|
||||||
xml? ( dev-libs/expat )
|
xml? ( dev-libs/expat )
|
||||||
|
rocm? ( >=dev-libs/rocdbgapi-6.3 )
|
||||||
source-highlight? (
|
source-highlight? (
|
||||||
dev-util/source-highlight
|
dev-util/source-highlight
|
||||||
)
|
)
|
||||||
@ -128,14 +135,16 @@ PATCHES=(
|
|||||||
pkg_setup() {
|
pkg_setup() {
|
||||||
local CONFIG_CHECK
|
local CONFIG_CHECK
|
||||||
|
|
||||||
if kernel_is -ge 6.11.3 ; then
|
if [[ ${CHOST} == *-linux-* ]] ; then
|
||||||
# https://forums.gentoo.org/viewtopic-p-8846891.html
|
if kernel_is -ge 6.11.3 ; then
|
||||||
#
|
# https://forums.gentoo.org/viewtopic-p-8846891.html
|
||||||
# Either CONFIG_PROC_MEM_ALWAYS_FORCE or CONFIG_PROC_MEM_FORCE_PTRACE
|
#
|
||||||
# should be okay, but not CONFIG_PROC_MEM_NO_FORCE.
|
# Either CONFIG_PROC_MEM_ALWAYS_FORCE or CONFIG_PROC_MEM_FORCE_PTRACE
|
||||||
CONFIG_CHECK+="
|
# should be okay, but not CONFIG_PROC_MEM_NO_FORCE.
|
||||||
~!PROC_MEM_NO_FORCE
|
CONFIG_CHECK+="
|
||||||
"
|
~!PROC_MEM_NO_FORCE
|
||||||
|
"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
linux-info_pkg_setup
|
linux-info_pkg_setup
|
||||||
@ -189,6 +198,7 @@ src_configure() {
|
|||||||
# Disable modules that are in a combined binutils/gdb tree. bug #490566
|
# Disable modules that are in a combined binutils/gdb tree. bug #490566
|
||||||
--disable-{binutils,etc,gas,gold,gprof,gprofng,ld}
|
--disable-{binutils,etc,gas,gold,gprof,gprofng,ld}
|
||||||
|
|
||||||
|
$(use_with babeltrace)
|
||||||
$(use_with debuginfod)
|
$(use_with debuginfod)
|
||||||
|
|
||||||
$(use_enable test unit-tests)
|
$(use_enable test unit-tests)
|
||||||
@ -231,6 +241,7 @@ src_configure() {
|
|||||||
--without-zlib
|
--without-zlib
|
||||||
--with-system-zlib
|
--with-system-zlib
|
||||||
--with-separate-debug-dir="${EPREFIX}"/usr/lib/debug
|
--with-separate-debug-dir="${EPREFIX}"/usr/lib/debug
|
||||||
|
--with-amd-dbgapi=$(usex rocm)
|
||||||
$(use_with xml expat)
|
$(use_with xml expat)
|
||||||
$(use_with lzma)
|
$(use_with lzma)
|
||||||
$(use_enable nls)
|
$(use_enable nls)
|
||||||
@ -88,13 +88,14 @@ REQUIRED_USE="
|
|||||||
"
|
"
|
||||||
RESTRICT="!test? ( test )"
|
RESTRICT="!test? ( test )"
|
||||||
|
|
||||||
|
# <babeltrace-2: bug #951652
|
||||||
RDEPEND="
|
RDEPEND="
|
||||||
dev-libs/mpfr:=
|
dev-libs/mpfr:=
|
||||||
dev-libs/gmp:=
|
dev-libs/gmp:=
|
||||||
>=sys-libs/ncurses-5.2-r2:=
|
>=sys-libs/ncurses-5.2-r2:=
|
||||||
>=sys-libs/readline-7:=
|
>=sys-libs/readline-7:=
|
||||||
sys-libs/zlib
|
sys-libs/zlib
|
||||||
babeltrace? ( dev-util/babeltrace:= )
|
babeltrace? ( dev-util/babeltrace:0/1 )
|
||||||
debuginfod? (
|
debuginfod? (
|
||||||
dev-libs/elfutils[debuginfod(-)]
|
dev-libs/elfutils[debuginfod(-)]
|
||||||
)
|
)
|
||||||
@ -134,14 +135,16 @@ PATCHES=(
|
|||||||
pkg_setup() {
|
pkg_setup() {
|
||||||
local CONFIG_CHECK
|
local CONFIG_CHECK
|
||||||
|
|
||||||
if kernel_is -ge 6.11.3 ; then
|
if [[ ${CHOST} == *-linux-* ]] ; then
|
||||||
# https://forums.gentoo.org/viewtopic-p-8846891.html
|
if kernel_is -ge 6.11.3 ; then
|
||||||
#
|
# https://forums.gentoo.org/viewtopic-p-8846891.html
|
||||||
# Either CONFIG_PROC_MEM_ALWAYS_FORCE or CONFIG_PROC_MEM_FORCE_PTRACE
|
#
|
||||||
# should be okay, but not CONFIG_PROC_MEM_NO_FORCE.
|
# Either CONFIG_PROC_MEM_ALWAYS_FORCE or CONFIG_PROC_MEM_FORCE_PTRACE
|
||||||
CONFIG_CHECK+="
|
# should be okay, but not CONFIG_PROC_MEM_NO_FORCE.
|
||||||
~!PROC_MEM_NO_FORCE
|
CONFIG_CHECK+="
|
||||||
"
|
~!PROC_MEM_NO_FORCE
|
||||||
|
"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
linux-info_pkg_setup
|
linux-info_pkg_setup
|
||||||
@ -160,14 +163,6 @@ src_prepare() {
|
|||||||
# Avoid using ancient termcap from host on Prefix systems
|
# Avoid using ancient termcap from host on Prefix systems
|
||||||
sed -i -e 's/termcap tinfow/tinfow/g' \
|
sed -i -e 's/termcap tinfow/tinfow/g' \
|
||||||
gdb/configure{.ac,} || die
|
gdb/configure{.ac,} || die
|
||||||
if [[ ${CHOST} == *-solaris* ]] ; then
|
|
||||||
# code relies on C++11, so make sure we get that selected
|
|
||||||
# due to Python 3.11 pymacro.h doing stuff to work around
|
|
||||||
# versioning mess based on the C version, while we're compiling
|
|
||||||
# C++ here, so we need to make it clear we're doing C++11/C11
|
|
||||||
# because Solaris system headers act on these
|
|
||||||
sed -i -e 's/-x c++/-std=c++11/' gdb/Makefile.in || die
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gdb_branding() {
|
gdb_branding() {
|
||||||
|
|||||||
@ -55,7 +55,7 @@ LICENSE="|| ( Artistic GPL-1+ )"
|
|||||||
SLOT="0/${SUBSLOT}"
|
SLOT="0/${SUBSLOT}"
|
||||||
|
|
||||||
if [[ "${PV##*.}" != "9999" ]] && [[ "${PV/rc//}" == "${PV}" ]] ; then
|
if [[ "${PV##*.}" != "9999" ]] && [[ "${PV/rc//}" == "${PV}" ]] ; then
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
IUSE="berkdb perl_features_debug doc gdbm perl_features_ithreads minimal perl_features_quadmath"
|
IUSE="berkdb perl_features_debug doc gdbm perl_features_ithreads minimal perl_features_quadmath"
|
||||||
|
|||||||
@ -1,43 +1,24 @@
|
|||||||
DIST Python-2.7.18.tar.xz 12854736 BLAKE2B 060a621c91dd8e3d321aec99d44c17aa67381998256a1a002d316b38288349884d5960de35c49352d03129ed0bae599e641ec2225898158ebce50a7a2fd74d2c SHA512 a7bb62b51f48ff0b6df0b18f5b0312a523e3110f49c3237936bfe56ed0e26838c0274ff5401bda6fc21bf24337477ccac49e8026c5d651e4b4cafb5eb5086f6c
|
DIST Python-2.7.18.tar.xz 12854736 BLAKE2B 060a621c91dd8e3d321aec99d44c17aa67381998256a1a002d316b38288349884d5960de35c49352d03129ed0bae599e641ec2225898158ebce50a7a2fd74d2c SHA512 a7bb62b51f48ff0b6df0b18f5b0312a523e3110f49c3237936bfe56ed0e26838c0274ff5401bda6fc21bf24337477ccac49e8026c5d651e4b4cafb5eb5086f6c
|
||||||
DIST Python-2.7.18.tar.xz.asc 833 BLAKE2B 1d98770e46171971fb99994508d238c01d2755281d2f94353314014d9e83e0ec5f0b3e3950ea1fdf5fce9ba6b8f55312355845c2a3fc4291c27ee56fe6215448 SHA512 c2a5f5a52f47dec52460ad3275758d4e5de6e7075c3def4353c988d74d563a39b42cae2d5eb24e2a23a6247cef69100f91620b11a49c2359fbf99b203c9cbda8
|
DIST Python-2.7.18.tar.xz.asc 833 BLAKE2B 1d98770e46171971fb99994508d238c01d2755281d2f94353314014d9e83e0ec5f0b3e3950ea1fdf5fce9ba6b8f55312355845c2a3fc4291c27ee56fe6215448 SHA512 c2a5f5a52f47dec52460ad3275758d4e5de6e7075c3def4353c988d74d563a39b42cae2d5eb24e2a23a6247cef69100f91620b11a49c2359fbf99b203c9cbda8
|
||||||
DIST Python-3.10.16.tar.xz 19610392 BLAKE2B bcc5ff71904b8a936363c6b07b8ffbcb981640c29c1e537a90f838c0a7fa45c1bdd764eae48bcb6d16d7260a44c235e9f5538ada45903b1627527e24c49212a5 SHA512 a6b004974db93f21590f00b9b1a569dfd8c3e334f8c6a8eb8997dec5646fa4515cfc02a7dabea9e4f75f908938dc64333ce4899b9a26aff97f9ffcb027fa2bca
|
|
||||||
DIST Python-3.10.16.tar.xz.asc 833 BLAKE2B 4fd4ce76ade6d64539e5eb641c64b0d99ade71a8514f97594097207e78412bd2d09afeab6788598a3159f045b98ccd5537c6771e59eeba52d4820c0c0a6c0dcb SHA512 18032fdb60a022d6381b1137789ada1c4bb198049616ed158fb548e728dd1fb95d116a86c41c852ca2acc9127baf3cdd9644a1e2df90ae9c3ffcd66eabf454d6
|
|
||||||
DIST Python-3.10.17.tar.xz 19608144 BLAKE2B 9caebdcdc21c07037f423bc4831b0e4654dea4264b7a176b2caed625a930f0d6e8e2f6d581dee6f666a1fc17139d1ccd8bcf13c958df14dfd8de31f321d3e048 SHA512 11b1e647f8db05041bcafe110698af8bf5e9f7c8d23c0e9eb568a60544bb9a9e9c3ac94b34f0898f0d4e6c23da3cb81f844ae9d9c8b750058763502eaba39880
|
DIST Python-3.10.17.tar.xz 19608144 BLAKE2B 9caebdcdc21c07037f423bc4831b0e4654dea4264b7a176b2caed625a930f0d6e8e2f6d581dee6f666a1fc17139d1ccd8bcf13c958df14dfd8de31f321d3e048 SHA512 11b1e647f8db05041bcafe110698af8bf5e9f7c8d23c0e9eb568a60544bb9a9e9c3ac94b34f0898f0d4e6c23da3cb81f844ae9d9c8b750058763502eaba39880
|
||||||
DIST Python-3.10.17.tar.xz.asc 833 BLAKE2B 9468dc33530d8a4ec911e7a2bacd2d1c3533e6819a91c1307e8d577cefe6c6bdb9e9dc7f2abc078cd35186db7f58efd89eb4170fb20887bb2de5a5aa68b3c1f4 SHA512 f5fea78e2ea413c9befb6181787b3a5ea3bc0f5dbf808a94465b558c09353482cd34631a4c505f72aa343a2f4fae291453324cd8e6b18df214baaf4680fc17cf
|
DIST Python-3.10.17.tar.xz.asc 833 BLAKE2B 9468dc33530d8a4ec911e7a2bacd2d1c3533e6819a91c1307e8d577cefe6c6bdb9e9dc7f2abc078cd35186db7f58efd89eb4170fb20887bb2de5a5aa68b3c1f4 SHA512 f5fea78e2ea413c9befb6181787b3a5ea3bc0f5dbf808a94465b558c09353482cd34631a4c505f72aa343a2f4fae291453324cd8e6b18df214baaf4680fc17cf
|
||||||
DIST Python-3.11.11.tar.xz 20085792 BLAKE2B a9a778eff94529e1029ae252ef28ecdc2f0673a4406d831865e12de3cba21ea48905542d0e806e428802b05947239ca6a44eff3573bd541469b01644790c7377 SHA512 3ff90f15f725fa8d06686158aaddb887a247b03ca4dc1fdfd81a8efb53373db3e8673bd0b3de30bb7669f3f07d9854e9d8a2dbcd49b18d15b8172787a53a0a9e
|
|
||||||
DIST Python-3.11.11.tar.xz.asc 833 BLAKE2B 6a9d873e181d636712567ea46823ad7f972f872d038092506e67bada24187441188b8fde4672c205ce6d37e60c4e0c69a8f3cc5d1915fd8f5dd8743292a16d1b SHA512 d71b0b42537fb636e8c469d62d13ff020149e4fb9d87eb17f8c999301195e418d134dbdb7e4ab49b06de16e96f8ef6bbcf2a749956fffca2ce03185f191c181d
|
|
||||||
DIST Python-3.11.12.tar.xz 20112232 BLAKE2B 95f82af070e86ecf48881103ce6d7211a4a915a93a49b1407eaf445364b7a7daec406cf07eb9334ed47a59397a9796f6a5c70dcc9b7b47103beb3bffc6aa56d7 SHA512 5c95900de73cd187f5d7a89a05314ef85f4d680308d0d5fff5e6ada81f8ecf030018bef0f1a819d007e8b6d01b52e50395572c2d1a56d2c164492e13a69a9926
|
DIST Python-3.11.12.tar.xz 20112232 BLAKE2B 95f82af070e86ecf48881103ce6d7211a4a915a93a49b1407eaf445364b7a7daec406cf07eb9334ed47a59397a9796f6a5c70dcc9b7b47103beb3bffc6aa56d7 SHA512 5c95900de73cd187f5d7a89a05314ef85f4d680308d0d5fff5e6ada81f8ecf030018bef0f1a819d007e8b6d01b52e50395572c2d1a56d2c164492e13a69a9926
|
||||||
DIST Python-3.11.12.tar.xz.asc 833 BLAKE2B b874df8019eb3c548598f8723fa38c89189cc375d6ced7cae180ffdc35a8e7b0ba93638861412e19037aa1fee76749186f10c4929dc7f4fb4ef7a8f4561d325c SHA512 cb1f82d44be6de67182747f8ad1054e85cca22753c0c86ff12b95ec7044c5c6c37f40a876e5707a6c422d58f483257b8ddbb3ea87893679f81b9299c48373f20
|
DIST Python-3.11.12.tar.xz.asc 833 BLAKE2B b874df8019eb3c548598f8723fa38c89189cc375d6ced7cae180ffdc35a8e7b0ba93638861412e19037aa1fee76749186f10c4929dc7f4fb4ef7a8f4561d325c SHA512 cb1f82d44be6de67182747f8ad1054e85cca22753c0c86ff12b95ec7044c5c6c37f40a876e5707a6c422d58f483257b8ddbb3ea87893679f81b9299c48373f20
|
||||||
DIST Python-3.12.10.tar.xz 20520960 BLAKE2B f05805da36958e3ebb68c69353e8119b20ee4c1a123f4492e9bf614e7faa856180ef2017f2a698bcacf19cac01d89329ed5ee45e00c98b255d4854090a2e6926 SHA512 520c30e3958d0be3c127e5dbb1c52bb3bfc404b5b3c7eb56525e25b9b59af9b21b53bee192f323f470e1df806f6cb2dd3411eb90cbc1c4b7d9b6b0777c29e644
|
DIST Python-3.12.10.tar.xz 20520960 BLAKE2B f05805da36958e3ebb68c69353e8119b20ee4c1a123f4492e9bf614e7faa856180ef2017f2a698bcacf19cac01d89329ed5ee45e00c98b255d4854090a2e6926 SHA512 520c30e3958d0be3c127e5dbb1c52bb3bfc404b5b3c7eb56525e25b9b59af9b21b53bee192f323f470e1df806f6cb2dd3411eb90cbc1c4b7d9b6b0777c29e644
|
||||||
DIST Python-3.12.10.tar.xz.asc 963 BLAKE2B 45e1ec67311d1ac5679cb5a05b92e61f3e5e6e9d3ffa5462c09c2aa066fda7ea915df13f6e5ad33aa924f6ce1f18e2d78a31af15412a10c093fc8a5b536c5133 SHA512 7edfa6fd816cf2a052abdb775d464e2f389105ed3e782cacf90805613aaca54bf71308504a5336ee1204e872e7db28df32413fb10b057056b0d5cb3c7a20a9f1
|
DIST Python-3.12.10.tar.xz.asc 963 BLAKE2B 45e1ec67311d1ac5679cb5a05b92e61f3e5e6e9d3ffa5462c09c2aa066fda7ea915df13f6e5ad33aa924f6ce1f18e2d78a31af15412a10c093fc8a5b536c5133 SHA512 7edfa6fd816cf2a052abdb775d464e2f389105ed3e782cacf90805613aaca54bf71308504a5336ee1204e872e7db28df32413fb10b057056b0d5cb3c7a20a9f1
|
||||||
DIST Python-3.12.9.tar.xz 20502440 BLAKE2B df1a8ba4996219c018fc14156958ca9c0e8af4854819064fbcf0c927258ecb3c5f46e562213799a87dafb35ae5bd647e1ce280affe2ac8ce6a85c351822b6693 SHA512 c840b14aa21e6a963d18c06ebaafb551d9c9a101b3866417e762fc4a2fde071a7a25fa257faba2956c7344bbc2413ed61690a712d26fba4d0dbeaa50e49b2574
|
|
||||||
DIST Python-3.12.9.tar.xz.asc 963 BLAKE2B d90b9c1a3aafa1a942ef8d978b566829656db1114b74f1565b7cbba188cf3bf5637c1dbeec3432ae0af0f826a154c40f27fd8fc46350a757ef91f5c426908149 SHA512 b59251ca3a0a17c06ff7d165f6c025eb91127c80be0782642590f5c922297e0710544ac5a9ae977378e393f1c4861149576a0515af5ec0e54e6827c4010d544f
|
|
||||||
DIST Python-3.13.2.tar.xz 22621108 BLAKE2B 79c7dff8a15fd2487d62847a8e654c02433a89887aa4f93819020b60a30587e3ba92b101553d971b59e132677f9f74dfc41cd7c7901db78a7787607ec96c6664 SHA512 bb1c0598914c6d4326554faa568f660f10b20c701d0f36bf1fa58837b6498d728a407416b06ede39604caea1ca93f60545b83b01ae8ee65f55d4cc83242b63fe
|
|
||||||
DIST Python-3.13.2.tar.xz.asc 963 BLAKE2B 95a36c305dd452df23b4f119de05e1d3a2b2c9e0c2778a52dc4065f82b52752b68d89eb737cc54cced70623ad4a7b48c85fdff781bf7d7e3b747dacb1ef77db0 SHA512 5f019be530f688b0adf5d5cc9f2c2243e2f1dc7338559db14c1eedd12aadc85404d42c7aafd74e41828205d85f13f278876662ac30c8f3382a1ee081ba5f29f2
|
|
||||||
DIST Python-3.13.3.tar.xz 22654240 BLAKE2B 24ac47c13cbfa4dc9ce6ae4d18d7b5310f83ac1f4f18722138ef07e01cb8ac37edf6f4301983cb468f533b9b475b5a9d761d3044e61c7ccaa99dceadb954fe34 SHA512 f7559b6dceae69f48742af0a6497fbec42cd1e5304f64b6eb9d89222a1171ccf12fa186cc0decabb4e98d05223184967a4a7537754c01083dacdc9073cb1a578
|
DIST Python-3.13.3.tar.xz 22654240 BLAKE2B 24ac47c13cbfa4dc9ce6ae4d18d7b5310f83ac1f4f18722138ef07e01cb8ac37edf6f4301983cb468f533b9b475b5a9d761d3044e61c7ccaa99dceadb954fe34 SHA512 f7559b6dceae69f48742af0a6497fbec42cd1e5304f64b6eb9d89222a1171ccf12fa186cc0decabb4e98d05223184967a4a7537754c01083dacdc9073cb1a578
|
||||||
DIST Python-3.13.3.tar.xz.asc 963 BLAKE2B 4a98965305b80e985512f54d9ce8ab88a74fe0d3ee48e300fbc2b4e251c0f499f4eb935e0aeb6d5ad8262338643325126f094fff926da1e2b9a2b3a2247701dc SHA512 54f8da5f4a4dcadc9830cb07aecf695a26a2de48ab98e1f42b09fdde1c70989476d07ce7ea81337216f1e5fcbf6b688e0608c88a2545ced416b01640108e94db
|
DIST Python-3.13.3.tar.xz.asc 963 BLAKE2B 4a98965305b80e985512f54d9ce8ab88a74fe0d3ee48e300fbc2b4e251c0f499f4eb935e0aeb6d5ad8262338643325126f094fff926da1e2b9a2b3a2247701dc SHA512 54f8da5f4a4dcadc9830cb07aecf695a26a2de48ab98e1f42b09fdde1c70989476d07ce7ea81337216f1e5fcbf6b688e0608c88a2545ced416b01640108e94db
|
||||||
DIST Python-3.14.0a6.tar.xz 22956068 BLAKE2B e8605da0dfa0f4ecf2f21cd770a074e73a2fbb24182d8adb27b1583da0ab48157bd9e70438c8efbb8fd17a66447e934a33128e0d50d9f253bde2f6c17df80375 SHA512 0fca503199bed0744139823aaf3ead30d7876556750b476fa6e1f701ae71fa7fe333cd46c775929c26729cf71bef6ba545fdc0118a0efca17c2434de3cadabe1
|
|
||||||
DIST Python-3.14.0a6.tar.xz.sigstore 5227 BLAKE2B 1e517fc1205a2d9ec448fe17afac2c6a1874c08904b78f1f0ef6bb4140696ebc03e34080bb973eeae6fbb4adc9b0e3ad3a9133fbef0b48ba4aca99ae81f59862 SHA512 e1824480165f68597822e8934a58e744e3c4098b8646006548d20d42b8e8809ca95f129cc23edd49bd9dbaf158a36d60b7bc5bfd449c08af9e08e8e552e21f7d
|
|
||||||
DIST Python-3.14.0a7.tar.xz 23015952 BLAKE2B f12039695a3a7fdd6352adfca803bad066af3b320159faa1d85bdd914732e8170bc2494427151fad140d699db13645066fa41d8e74dc697226957e793a6305ef SHA512 f7e50c201cb1bbc4779d898e65408147637de7b9d9d85a2e6ad4f8dda758ec150dfb95ee1f12c686a3f46c29a986a75b45323bcbab87b81b319d91236989f6b0
|
DIST Python-3.14.0a7.tar.xz 23015952 BLAKE2B f12039695a3a7fdd6352adfca803bad066af3b320159faa1d85bdd914732e8170bc2494427151fad140d699db13645066fa41d8e74dc697226957e793a6305ef SHA512 f7e50c201cb1bbc4779d898e65408147637de7b9d9d85a2e6ad4f8dda758ec150dfb95ee1f12c686a3f46c29a986a75b45323bcbab87b81b319d91236989f6b0
|
||||||
DIST Python-3.14.0a7.tar.xz.sigstore 4795 BLAKE2B ba10cb295cc4ca7eb41783fad9a85994c0ccf53983b19a73afbf32739248d9dd2282e998c15223d45259b780d6b7de25f418563a9c2e6fc2ef4f0d12290de539 SHA512 daee7d607851092e1c8e7b05b5419e464b8d2c4d65a746a206838709d612412680362c9adb3c67751641893e945e2f6b06b4e6e235e7b18ec4a208af9633525a
|
DIST Python-3.14.0a7.tar.xz.sigstore 4795 BLAKE2B ba10cb295cc4ca7eb41783fad9a85994c0ccf53983b19a73afbf32739248d9dd2282e998c15223d45259b780d6b7de25f418563a9c2e6fc2ef4f0d12290de539 SHA512 daee7d607851092e1c8e7b05b5419e464b8d2c4d65a746a206838709d612412680362c9adb3c67751641893e945e2f6b06b4e6e235e7b18ec4a208af9633525a
|
||||||
DIST Python-3.8.20.tar.xz 18962788 BLAKE2B 715c75e0c0a3d3b77af7f07478311bb0554b80aac72915be703aa2d0dd6459a972e5669808e64da14a0b91bb183e00655055c1726f302dc3ccd8721e3b4ae3e6 SHA512 3c9341ee1fd33cb687958dcf2b7c0c7700489726c4d530c3e9d9537d46a6ab534541a4b312232d8505bea395a07e4518c42d75fb7571103e6b266f8f44115c61
|
DIST Python-3.8.20.tar.xz 18962788 BLAKE2B 715c75e0c0a3d3b77af7f07478311bb0554b80aac72915be703aa2d0dd6459a972e5669808e64da14a0b91bb183e00655055c1726f302dc3ccd8721e3b4ae3e6 SHA512 3c9341ee1fd33cb687958dcf2b7c0c7700489726c4d530c3e9d9537d46a6ab534541a4b312232d8505bea395a07e4518c42d75fb7571103e6b266f8f44115c61
|
||||||
DIST Python-3.8.20.tar.xz.asc 833 BLAKE2B 5c86c15a1090b42e42bb7512565b1a7ad9d2137d59e9fd1ab0f83fdfc37dfcf184389418d6703db809e9c8c04a169af292665a2b58bf5dc61b7724ecbb4132d9 SHA512 a751ae0407a593d97acac4d5f8a0456580c753efa12a7d960125c219b4897fdb26fc1ffd43d8ea33ad1449162dd3b2904c16b6c51c57561ba73de3ffa62e0eed
|
DIST Python-3.8.20.tar.xz.asc 833 BLAKE2B 5c86c15a1090b42e42bb7512565b1a7ad9d2137d59e9fd1ab0f83fdfc37dfcf184389418d6703db809e9c8c04a169af292665a2b58bf5dc61b7724ecbb4132d9 SHA512 a751ae0407a593d97acac4d5f8a0456580c753efa12a7d960125c219b4897fdb26fc1ffd43d8ea33ad1449162dd3b2904c16b6c51c57561ba73de3ffa62e0eed
|
||||||
DIST Python-3.9.21.tar.xz 19647056 BLAKE2B 7f77a7fb38d9a9f4fda7007587f744ade5f32b7bcd911dd72ab82b00d324173f28ddfbe492c71bf0f71edb8494e61314b4bf6f70298289b0e5796c6d002ff738 SHA512 cc84c967cd7a05361ec144d87ca044bd416032ee92dfb78658758d4e1274971f5fb288876d9c599a729bb21258974a786089341bce6bdcffd9c30ebd69b7ca58
|
|
||||||
DIST Python-3.9.21.tar.xz.asc 833 BLAKE2B f6e666179d745638a38ace35e13c26cc3e07c116a8c8362cc260a74113cd29a5c1909d2091f2eed4bb088bc71b79ed18c5503739d1cc3cb7ff95d625f4311421 SHA512 1e5e5a5db8074a7ee5eb51e6c789d6e46467165d72d2d636d1fc0d3e15d4355051f9f7ad3063ba43b37b611095765c9d654ed890067c201c087da1eecb620ef9
|
|
||||||
DIST Python-3.9.22.tar.xz 19652572 BLAKE2B 59f2d2cecde8179064115b52205c2195b26cd0f37aec3e88b0fe2a1a7893a7df8ae38a024814d42064d5e4916e4054a76dddeec0a0dcf29af576d52dbcf65f4c SHA512 c5a76c579455626bf40bb41ee99cab6e444aa5d5085dab7cf622c70ded750e31710c2c30f032917f0d4069350c01a889ed9831d77fcc2d52fcec54055dd07496
|
DIST Python-3.9.22.tar.xz 19652572 BLAKE2B 59f2d2cecde8179064115b52205c2195b26cd0f37aec3e88b0fe2a1a7893a7df8ae38a024814d42064d5e4916e4054a76dddeec0a0dcf29af576d52dbcf65f4c SHA512 c5a76c579455626bf40bb41ee99cab6e444aa5d5085dab7cf622c70ded750e31710c2c30f032917f0d4069350c01a889ed9831d77fcc2d52fcec54055dd07496
|
||||||
DIST Python-3.9.22.tar.xz.asc 833 BLAKE2B 2bc75d7e39ebee63b8cfd9ee1af2941bc0bd659becf89d291ea33f5baea2b606a34841c7ac5c597eac51b19602cf24ccec123964a1022d43fd251553fb3f90f7 SHA512 9a04fcf7d7fc0521873d29efad3a80a9ff63df4fc4fe4108059246db6517b22d967f4d4e0eebb32c79417f66ee3b60fe00428be155fc1cbea163aa36c1a3ddee
|
DIST Python-3.9.22.tar.xz.asc 833 BLAKE2B 2bc75d7e39ebee63b8cfd9ee1af2941bc0bd659becf89d291ea33f5baea2b606a34841c7ac5c597eac51b19602cf24ccec123964a1022d43fd251553fb3f90f7 SHA512 9a04fcf7d7fc0521873d29efad3a80a9ff63df4fc4fe4108059246db6517b22d967f4d4e0eebb32c79417f66ee3b60fe00428be155fc1cbea163aa36c1a3ddee
|
||||||
DIST python-gentoo-patches-2.7.18_p16.tar.xz 35448 BLAKE2B 0139c0944f62f9cdd236f6a8557e0ed19704c7d72869af1cb7d8bd3e646a746cd4a0201e1b44232a5e78ef49f254db20b0d0271bf744fbfd4fe0f1e99b8f3e6c SHA512 810be590d0e06fab4b2165e6852ca49662f09dcd7e20b47a29f613ad7653252c8dfac3f0eb228d77c8a914efa7c08788b2fbd552a4b47504f5fd0ec17450c48f
|
DIST python-gentoo-patches-2.7.18_p16.tar.xz 35448 BLAKE2B 0139c0944f62f9cdd236f6a8557e0ed19704c7d72869af1cb7d8bd3e646a746cd4a0201e1b44232a5e78ef49f254db20b0d0271bf744fbfd4fe0f1e99b8f3e6c SHA512 810be590d0e06fab4b2165e6852ca49662f09dcd7e20b47a29f613ad7653252c8dfac3f0eb228d77c8a914efa7c08788b2fbd552a4b47504f5fd0ec17450c48f
|
||||||
DIST python-gentoo-patches-3.10.16_p2.tar.xz 29428 BLAKE2B fa63d2fcdbb53e3b6381eaadfbcfca02a03eddd7035dd4776c706fd1aa0226a2c809260ba5a543a209a63563dab12ea109bf03a2026ea4b5797fa6afc7b45c52 SHA512 0186abf035632a3f8018052f8021c1d0dadbc28b7d03551f6992a658fe53878ac9ea86b79512e0e147efecedfda133cf7936746946238177918be9c695248f15
|
|
||||||
DIST python-gentoo-patches-3.10.17.tar.xz 28784 BLAKE2B 7f1c1f9f49876b99d80a3f40b66061ab96796821e1a5396f5edfa08e3878b8b9970688d3c861d9c5d08701a8850584eb87a223e3ba84c5536ae689f59145ad43 SHA512 3e89b334d81702f0e6fa00e9b70daf6ff4df439c280c6cff33aa8874dde29f63d809697757df39daea07bf746207e931f211558811c9e731df9ca846a8559483
|
DIST python-gentoo-patches-3.10.17.tar.xz 28784 BLAKE2B 7f1c1f9f49876b99d80a3f40b66061ab96796821e1a5396f5edfa08e3878b8b9970688d3c861d9c5d08701a8850584eb87a223e3ba84c5536ae689f59145ad43 SHA512 3e89b334d81702f0e6fa00e9b70daf6ff4df439c280c6cff33aa8874dde29f63d809697757df39daea07bf746207e931f211558811c9e731df9ca846a8559483
|
||||||
DIST python-gentoo-patches-3.11.11_p2.tar.xz 16224 BLAKE2B d8404c8c87e109d2c699dbab63c20a319c6efd5b62dab5fcc1b53b5b291e25686e69ef92b495eed0d80491cfa29ae9f523df6b53c7c6a12c3f713c53e3c5b7c6 SHA512 f1bf897305678c2b113aef4553d14e916e83312708352765725d754dffbf2f5dd7ef0f7cd84a774e4a8c18dde8a517d7eaf8e58720d73d25430b28fe49906258
|
|
||||||
DIST python-gentoo-patches-3.11.12.tar.xz 15616 BLAKE2B 5d4a47058fc35c4ae966e3dff823f91129852bf81cd586d5b3a34a6daf672732918daf00199394f2f982411ec30a291f45bba55b3ffa3d96a179ecd600ea4647 SHA512 77973ef88403f94d55162e0138cd29b4d8959a8fcf4cec730daf7ddd8fb4a3acfcd0dd1fdaacbdd2b218bd15f6c6715ce339df4eba48227d17520243d96eeb39
|
DIST python-gentoo-patches-3.11.12.tar.xz 15616 BLAKE2B 5d4a47058fc35c4ae966e3dff823f91129852bf81cd586d5b3a34a6daf672732918daf00199394f2f982411ec30a291f45bba55b3ffa3d96a179ecd600ea4647 SHA512 77973ef88403f94d55162e0138cd29b4d8959a8fcf4cec730daf7ddd8fb4a3acfcd0dd1fdaacbdd2b218bd15f6c6715ce339df4eba48227d17520243d96eeb39
|
||||||
DIST python-gentoo-patches-3.12.10.tar.xz 10744 BLAKE2B 2abf4874018156d6735cf8604c410dc4726ac9365bc7500abe6b82472aad100aac7268957256692f4275b02965773e58178519ed8038e121f1ffa3c53770d238 SHA512 62066405aa00f46f9645e9c747d53bb93bf510fc791d14d49e00edfd79981778e6c8e07bfa7bac88d76407a0ffd8f7321dea89f81d90b01dbf13f4d381b6a1a3
|
DIST python-gentoo-patches-3.12.10.tar.xz 10744 BLAKE2B 2abf4874018156d6735cf8604c410dc4726ac9365bc7500abe6b82472aad100aac7268957256692f4275b02965773e58178519ed8038e121f1ffa3c53770d238 SHA512 62066405aa00f46f9645e9c747d53bb93bf510fc791d14d49e00edfd79981778e6c8e07bfa7bac88d76407a0ffd8f7321dea89f81d90b01dbf13f4d381b6a1a3
|
||||||
DIST python-gentoo-patches-3.12.9.tar.xz 10736 BLAKE2B 1f87d1bba8c094936e5cd3e0ef2eede0dbca3e658430f81b398735d8f02fff1f87739914014dbcb17163f8a969ffc5e7e4cce7d71557ce3c2e58487e6ed8b80f SHA512 342f11df85926e32455d52115d06b817a17f7ae104e3ea8e852046d321d829835bba7c07803c50dd5433ac8b615499428d5bc1a088b484ca0c4304eb8b2cb879
|
|
||||||
DIST python-gentoo-patches-3.13.2.tar.xz 8316 BLAKE2B 2367808924c83c02b8b2ca765fd4768d4f12cb8e8451eab9d084ce5950a5a81829e573d415f9a16db2e053105def90b5f52c91423fc71e57cd182a1d9c824d8c SHA512 580332ca037c1453f314d5811f96f7bf74defc16cfe515c4fe82ea08a7bf3679aa88d5456db846d988bcf4fbc9eeb4ebe7cee01d135bd55c87931206250e301a
|
|
||||||
DIST python-gentoo-patches-3.13.3.tar.xz 8336 BLAKE2B 66393886fbd034eb14732e4f81f5798e77650ea3fe1c4f8176bd93808b711c8977a53c3f52be6c9b97a368299258b851d9bdb6d4c8e0c75695c6aea784d48b44 SHA512 c1ed31d6aaef81addf786c2ccc1013309b122b791c42fe10e467a677d0db8f149e8b1cc21928c146298918c7ceb851b4b19d1e59f491cb161004e1c9386db289
|
DIST python-gentoo-patches-3.13.3.tar.xz 8336 BLAKE2B 66393886fbd034eb14732e4f81f5798e77650ea3fe1c4f8176bd93808b711c8977a53c3f52be6c9b97a368299258b851d9bdb6d4c8e0c75695c6aea784d48b44 SHA512 c1ed31d6aaef81addf786c2ccc1013309b122b791c42fe10e467a677d0db8f149e8b1cc21928c146298918c7ceb851b4b19d1e59f491cb161004e1c9386db289
|
||||||
DIST python-gentoo-patches-3.14.0a6.tar.xz 5680 BLAKE2B 704014b9935db57b28e9191b1a9d478b2e3d17c66fc1bbe1d5df4de0197f51ae184ad44c8434d22c3113545c3267fa8838dc8fa90bab00aa50223e38c9f1be7e SHA512 e5446d9bf25334f117e7967d5d77424bfd8b4a5a277358b8e4c27aaa15686a0fd0c6957b4fd0306622dc83f02de5e2d2f02d1f9a5675412915bfbab4b072e94d
|
|
||||||
DIST python-gentoo-patches-3.14.0a7.tar.xz 5680 BLAKE2B 72fdb5debdcae47143724a100736272994298f4b9c7c4954a1a506b247b93fc06f5dc25140c0fd1f5fdc9110d41b93d33451e11fa07219d394728f987324d7b5 SHA512 e4091ff450bf1ba328961c6e9fbfea233ba8027ded4682355129a67767827080ec2cf23995f7fde9517bc65fbc135820bf89578bdccd539e4559c7944345d15a
|
DIST python-gentoo-patches-3.14.0a7.tar.xz 5680 BLAKE2B 72fdb5debdcae47143724a100736272994298f4b9c7c4954a1a506b247b93fc06f5dc25140c0fd1f5fdc9110d41b93d33451e11fa07219d394728f987324d7b5 SHA512 e4091ff450bf1ba328961c6e9fbfea233ba8027ded4682355129a67767827080ec2cf23995f7fde9517bc65fbc135820bf89578bdccd539e4559c7944345d15a
|
||||||
DIST python-gentoo-patches-3.8.20_p6.tar.xz 50876 BLAKE2B df0df21c75972fb73e36f66f0c90d3f953b14d7a59bf97ce4214dce6e6d937ed52fbf3db8f3eaf42cde141bfe4d7a731b06e41723285517461c790912706be9e SHA512 48ef567f6972e7975cb61d34a876d8c0db42f1a3c0b832f9366091dd5f2ca854c02887808843d314816c8cf6d7b0738c40e7835fedbba7b84e57f2515dde45e2
|
|
||||||
DIST python-gentoo-patches-3.8.20_p7.tar.xz 54544 BLAKE2B e31fc9fb5e98b62b0f70165670ec58ed4fa932cfc95d5287c249015a3a372fdbf0d1ba08cb98f63c2dc500700edfd6ffea6db670385d2c86a4fdb92ffb991192 SHA512 a9e7e4976be226931a503af2c986da207d060d4ce436af61f5e8427da513639adbed32bb0061963b83fef275a5de91707ab13b7a9abf3a7472ee0e2c5310eda1
|
DIST python-gentoo-patches-3.8.20_p7.tar.xz 54544 BLAKE2B e31fc9fb5e98b62b0f70165670ec58ed4fa932cfc95d5287c249015a3a372fdbf0d1ba08cb98f63c2dc500700edfd6ffea6db670385d2c86a4fdb92ffb991192 SHA512 a9e7e4976be226931a503af2c986da207d060d4ce436af61f5e8427da513639adbed32bb0061963b83fef275a5de91707ab13b7a9abf3a7472ee0e2c5310eda1
|
||||||
DIST python-gentoo-patches-3.9.21_p1.tar.xz 35404 BLAKE2B 7b5ac27e814b06791fa5f0566763711c1b65a7c82ba66f97e237eebc6076f0bfdad3d8269ece6c4d4c238b62cc75b01f68ea3a5d7c4fffc46e88f79b2ba3e7fc SHA512 92c8548b31100a921378c72cc94a81062c96fd795fa2cd001c57a71e4af39e91b21b99e9e84db12adb142d9c4bda809445519c5c8a35545bd10230926bd7eded
|
|
||||||
DIST python-gentoo-patches-3.9.22.tar.xz 35388 BLAKE2B b6acfa681bdb589f74094ea04bd053bfc122ef9f36b3413c33c352cfae4e101027b0348770b47b9fee769eaba8109406acb6418c1cb8c431fbc7cf1c69124dcb SHA512 335c32d696f9660c957dec0c9a54e2f04e34003d2dbb438e6c9e74ce0a6352b5849e8626397939e3ffa7dc3172ac88cfa2168dd0d120be306e8c898dc7b6b3dc
|
DIST python-gentoo-patches-3.9.22.tar.xz 35388 BLAKE2B b6acfa681bdb589f74094ea04bd053bfc122ef9f36b3413c33c352cfae4e101027b0348770b47b9fee769eaba8109406acb6418c1cb8c431fbc7cf1c69124dcb SHA512 335c32d696f9660c957dec0c9a54e2f04e34003d2dbb438e6c9e74ce0a6352b5849e8626397939e3ffa7dc3172ac88cfa2168dd0d120be306e8c898dc7b6b3dc
|
||||||
|
|||||||
@ -1,595 +0,0 @@
|
|||||||
# Copyright 1999-2025 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 ~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-libs/mpdecimal:=
|
|
||||||
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
|
|
||||||
|
|
||||||
# Set baseline test skip flags.
|
|
||||||
COMMON_TEST_SKIPS=(
|
|
||||||
-x test_gdb
|
|
||||||
)
|
|
||||||
|
|
||||||
# Arch-specific skips. See #931888 for a collection of these.
|
|
||||||
case ${CHOST} in
|
|
||||||
alpha*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_builtin
|
|
||||||
-x test_capi
|
|
||||||
-x test_cmath
|
|
||||||
-x test_float
|
|
||||||
# timeout
|
|
||||||
-x test_free_threading
|
|
||||||
-x test_math
|
|
||||||
-x test_numeric_tower
|
|
||||||
-x test_random
|
|
||||||
-x test_statistics
|
|
||||||
# bug 653850
|
|
||||||
-x test_resource
|
|
||||||
-x test_strtod
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
mips*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_ctypes
|
|
||||||
-x test_external_inspection
|
|
||||||
-x test_statistics
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
powerpc64-*) # big endian
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_descr
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
riscv*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_urllib2
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
sparc*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
# bug 788022
|
|
||||||
-x test_multiprocessing_fork
|
|
||||||
-x test_multiprocessing_forkserver
|
|
||||||
-x test_multiprocessing_spawn
|
|
||||||
|
|
||||||
-x test_ctypes
|
|
||||||
-x test_descr
|
|
||||||
# bug 931908
|
|
||||||
-x test_exceptions
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# musl-specific skips
|
|
||||||
use elibc_musl && COMMON_TEST_SKIPS+=(
|
|
||||||
# various musl locale deficiencies
|
|
||||||
-x test__locale
|
|
||||||
-x test_c_locale_coercion
|
|
||||||
-x test_locale
|
|
||||||
-x test_re
|
|
||||||
|
|
||||||
# known issues with find_library on musl
|
|
||||||
# https://bugs.python.org/issue21622
|
|
||||||
-x test_ctypes
|
|
||||||
|
|
||||||
# fpathconf, ttyname errno values
|
|
||||||
-x test_os
|
|
||||||
)
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
"${COMMON_TEST_SKIPS[@]}"
|
|
||||||
|
|
||||||
-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
|
|
||||||
)
|
|
||||||
|
|
||||||
# Arch-specific skips. See #931888 for a collection of these.
|
|
||||||
case ${CHOST} in
|
|
||||||
alpha*)
|
|
||||||
profile_task_flags+=(
|
|
||||||
-x test_os
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
hppa*)
|
|
||||||
profile_task_flags+=(
|
|
||||||
-x test_descr
|
|
||||||
# bug 931908
|
|
||||||
-x test_exceptions
|
|
||||||
-x test_os
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
powerpc64-*) # big endian
|
|
||||||
profile_task_flags+=(
|
|
||||||
# bug 931908
|
|
||||||
-x test_exceptions
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
riscv*)
|
|
||||||
profile_task_flags+=(
|
|
||||||
-x test_statistics
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
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-system-libmpdec
|
|
||||||
--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}
|
|
||||||
|
|
||||||
# Gentoo hack to disable accessing system site-packages
|
|
||||||
export GENTOO_CPYTHON_BUILD=1
|
|
||||||
|
|
||||||
if use pgo ; then
|
|
||||||
# bug 660358
|
|
||||||
local -x COLUMNS=80
|
|
||||||
local -x PYTHONDONTWRITEBYTECODE=
|
|
||||||
local -x TMPDIR=/var/tmp
|
|
||||||
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=(
|
|
||||||
--verbose3
|
|
||||||
-u-network
|
|
||||||
-j "$(makeopts_jobs)"
|
|
||||||
"${COMMON_TEST_SKIPS[@]}"
|
|
||||||
)
|
|
||||||
|
|
||||||
# bug 660358
|
|
||||||
local -x COLUMNS=80
|
|
||||||
local -x PYTHONDONTWRITEBYTECODE=
|
|
||||||
local -x TMPDIR=/var/tmp
|
|
||||||
|
|
||||||
nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
|
|
||||||
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
|
|
||||||
local ret=${?}
|
|
||||||
|
|
||||||
[[ ${ret} -eq 0 ]] || die "emake test failed"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
local libdir=${ED}/usr/lib/python${PYVER}
|
|
||||||
|
|
||||||
emake DESTDIR="${D}" TEST_MODULES=no 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} || 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
|
|
||||||
}
|
|
||||||
@ -1,626 +0,0 @@
|
|||||||
# Copyright 1999-2025 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI="8"
|
|
||||||
WANT_LIBTOOL="none"
|
|
||||||
|
|
||||||
inherit autotools check-reqs eapi9-ver 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 ~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-libs/mpdecimal:=
|
|
||||||
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 )
|
|
||||||
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 )
|
|
||||||
"
|
|
||||||
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
|
|
||||||
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
|
|
||||||
# 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_STATE=disabled
|
|
||||||
MODULE__DBM_STATE=disabled
|
|
||||||
MODULE__GDBM_STATE=disabled
|
|
||||||
MODULE__DBM_STATE=disabled
|
|
||||||
MODULE__SQLITE3_STATE=disabled
|
|
||||||
MODULE__HASHLIB_STATE=disabled
|
|
||||||
MODULE__SSL_STATE=disabled
|
|
||||||
MODULE__CURSES_STATE=disabled
|
|
||||||
MODULE__CURSES_PANEL_STATE=disabled
|
|
||||||
MODULE_READLINE_STATE=disabled
|
|
||||||
MODULE__TKINTER_STATE=disabled
|
|
||||||
MODULE_PYEXPAT_STATE=disabled
|
|
||||||
MODULE_ZLIB_STATE=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 --with-build-python value
|
|
||||||
# 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
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
# Set baseline test skip flags.
|
|
||||||
COMMON_TEST_SKIPS=(
|
|
||||||
# this is actually test_gdb.test_pretty_print
|
|
||||||
-x test_pretty_print
|
|
||||||
)
|
|
||||||
|
|
||||||
# Arch-specific skips. See #931888 for a collection of these.
|
|
||||||
case ${CHOST} in
|
|
||||||
alpha*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_builtin
|
|
||||||
-x test_capi
|
|
||||||
-x test_cmath
|
|
||||||
-x test_float
|
|
||||||
# timeout
|
|
||||||
-x test_free_threading
|
|
||||||
-x test_math
|
|
||||||
-x test_numeric_tower
|
|
||||||
-x test_random
|
|
||||||
-x test_statistics
|
|
||||||
# bug 653850
|
|
||||||
-x test_resource
|
|
||||||
-x test_strtod
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
mips*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_ctypes
|
|
||||||
-x test_external_inspection
|
|
||||||
-x test_statistics
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
powerpc64-*) # big endian
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_descr
|
|
||||||
-x test_gdb
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
riscv*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_urllib2
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
sparc*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
# bug 788022
|
|
||||||
-x test_multiprocessing_fork
|
|
||||||
-x test_multiprocessing_forkserver
|
|
||||||
-x test_multiprocessing_spawn
|
|
||||||
|
|
||||||
-x test_ctypes
|
|
||||||
-x test_descr
|
|
||||||
-x test_gdb
|
|
||||||
# bug 931908
|
|
||||||
-x test_exceptions
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# musl-specific skips
|
|
||||||
use elibc_musl && COMMON_TEST_SKIPS+=(
|
|
||||||
# various musl locale deficiencies
|
|
||||||
-x test__locale
|
|
||||||
-x test_c_locale_coercion
|
|
||||||
-x test_locale
|
|
||||||
-x test_re
|
|
||||||
|
|
||||||
# known issues with find_library on musl
|
|
||||||
# https://bugs.python.org/issue21622
|
|
||||||
-x test_ctypes
|
|
||||||
|
|
||||||
# fpathconf, ttyname errno values
|
|
||||||
-x test_os
|
|
||||||
)
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
"${COMMON_TEST_SKIPS[@]}"
|
|
||||||
|
|
||||||
-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
|
|
||||||
)
|
|
||||||
|
|
||||||
# Arch-specific skips. See #931888 for a collection of these.
|
|
||||||
case ${CHOST} in
|
|
||||||
alpha*)
|
|
||||||
profile_task_flags+=(
|
|
||||||
-x test_os
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
hppa*)
|
|
||||||
profile_task_flags+=(
|
|
||||||
-x test_descr
|
|
||||||
# bug 931908
|
|
||||||
-x test_exceptions
|
|
||||||
-x test_os
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
powerpc64-*) # big endian
|
|
||||||
profile_task_flags+=(
|
|
||||||
# bug 931908
|
|
||||||
-x test_exceptions
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
riscv*)
|
|
||||||
profile_task_flags+=(
|
|
||||||
-x test_statistics
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
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-system-libmpdec
|
|
||||||
--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)
|
|
||||||
)
|
|
||||||
|
|
||||||
# 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
|
|
||||||
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
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
# force-disable modules we don't want built
|
|
||||||
local disable_modules=( NIS )
|
|
||||||
use gdbm || disable_modules+=( _GDBM _DBM )
|
|
||||||
use sqlite || disable_modules+=( _SQLITE3 )
|
|
||||||
use ssl || disable_modules+=( _HASHLIB _SSL )
|
|
||||||
use ncurses || disable_modules+=( _CURSES _CURSES_PANEL )
|
|
||||||
use readline || disable_modules+=( READLINE )
|
|
||||||
use tk || disable_modules+=( _TKINTER )
|
|
||||||
|
|
||||||
local mod
|
|
||||||
for mod in "${disable_modules[@]}"; do
|
|
||||||
echo "MODULE_${mod}_STATE=disabled"
|
|
||||||
done >> Makefile || die
|
|
||||||
|
|
||||||
# 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
|
|
||||||
export PYTHONSTRICTEXTENSIONBUILD=1
|
|
||||||
|
|
||||||
# Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
|
|
||||||
# end up writing bytecode & violating sandbox.
|
|
||||||
# bug #831897
|
|
||||||
local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
|
|
||||||
|
|
||||||
# Gentoo hack to disable accessing system site-packages
|
|
||||||
export GENTOO_CPYTHON_BUILD=1
|
|
||||||
|
|
||||||
if use pgo ; then
|
|
||||||
# bug 660358
|
|
||||||
local -x COLUMNS=80
|
|
||||||
local -x PYTHONDONTWRITEBYTECODE=
|
|
||||||
local -x TMPDIR=/var/tmp
|
|
||||||
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=(
|
|
||||||
--verbose3
|
|
||||||
-u-network
|
|
||||||
-j "$(makeopts_jobs)"
|
|
||||||
"${COMMON_TEST_SKIPS[@]}"
|
|
||||||
)
|
|
||||||
|
|
||||||
# bug 660358
|
|
||||||
local -x COLUMNS=80
|
|
||||||
local -x PYTHONDONTWRITEBYTECODE=
|
|
||||||
local -x TMPDIR=/var/tmp
|
|
||||||
|
|
||||||
nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
|
|
||||||
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
|
|
||||||
local ret=${?}
|
|
||||||
|
|
||||||
[[ ${ret} -eq 0 ]] || die "emake test failed"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
local libdir=${ED}/usr/lib/python${PYVER}
|
|
||||||
|
|
||||||
# -j1 hack for now for bug #843458
|
|
||||||
emake -j1 DESTDIR="${D}" TEST_MODULES=no 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} || 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() {
|
|
||||||
if ver_replacing -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
|
|
||||||
}
|
|
||||||
@ -28,7 +28,7 @@ S="${WORKDIR}/${MY_P}"
|
|||||||
|
|
||||||
LICENSE="PSF-2"
|
LICENSE="PSF-2"
|
||||||
SLOT="${PYVER}"
|
SLOT="${PYVER}"
|
||||||
KEYWORDS="~alpha ~amd64 ~arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc ~x86"
|
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
|
||||||
IUSE="
|
IUSE="
|
||||||
bluetooth build debug +ensurepip examples gdbm libedit
|
bluetooth build debug +ensurepip examples gdbm libedit
|
||||||
+ncurses pgo +readline +sqlite +ssl test tk valgrind
|
+ncurses pgo +readline +sqlite +ssl test tk valgrind
|
||||||
|
|||||||
@ -28,7 +28,7 @@ S="${WORKDIR}/${MY_P}"
|
|||||||
|
|
||||||
LICENSE="PSF-2"
|
LICENSE="PSF-2"
|
||||||
SLOT="${PYVER}"
|
SLOT="${PYVER}"
|
||||||
KEYWORDS="~alpha amd64 arm ~arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
|
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
|
||||||
IUSE="
|
IUSE="
|
||||||
bluetooth build debug +ensurepip examples gdbm libedit
|
bluetooth build debug +ensurepip examples gdbm libedit
|
||||||
+ncurses pgo +readline +sqlite +ssl test tk valgrind
|
+ncurses pgo +readline +sqlite +ssl test tk valgrind
|
||||||
|
|||||||
@ -1,609 +0,0 @@
|
|||||||
# Copyright 1999-2025 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 ~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-libs/mpdecimal:=
|
|
||||||
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
|
|
||||||
|
|
||||||
# breaks tests when using --with-wheel-pkg-dir
|
|
||||||
rm -r Lib/test/wheeldata || 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
|
|
||||||
|
|
||||||
# Set baseline test skip flags.
|
|
||||||
COMMON_TEST_SKIPS=(
|
|
||||||
# this is actually test_gdb.test_pretty_print
|
|
||||||
-x test_pretty_print
|
|
||||||
)
|
|
||||||
|
|
||||||
# Arch-specific skips. See #931888 for a collection of these.
|
|
||||||
case ${CHOST} in
|
|
||||||
alpha*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_builtin
|
|
||||||
-x test_capi
|
|
||||||
-x test_cmath
|
|
||||||
-x test_float
|
|
||||||
# timeout
|
|
||||||
-x test_free_threading
|
|
||||||
-x test_math
|
|
||||||
-x test_numeric_tower
|
|
||||||
-x test_random
|
|
||||||
-x test_statistics
|
|
||||||
# bug 653850
|
|
||||||
-x test_resource
|
|
||||||
-x test_strtod
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
mips*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_ctypes
|
|
||||||
-x test_external_inspection
|
|
||||||
-x test_statistics
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
powerpc64-*) # big endian
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_gdb
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
riscv*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_urllib2
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
sparc*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
# bug 788022
|
|
||||||
-x test_multiprocessing_fork
|
|
||||||
-x test_multiprocessing_forkserver
|
|
||||||
-x test_multiprocessing_spawn
|
|
||||||
|
|
||||||
-x test_ctypes
|
|
||||||
-x test_gdb
|
|
||||||
# bug 931908
|
|
||||||
-x test_exceptions
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# musl-specific skips
|
|
||||||
use elibc_musl && COMMON_TEST_SKIPS+=(
|
|
||||||
# various musl locale deficiencies
|
|
||||||
-x test__locale
|
|
||||||
-x test_c_locale_coercion
|
|
||||||
-x test_locale
|
|
||||||
-x test_re
|
|
||||||
|
|
||||||
# known issues with find_library on musl
|
|
||||||
# https://bugs.python.org/issue21622
|
|
||||||
-x test_ctypes
|
|
||||||
|
|
||||||
# fpathconf, ttyname errno values
|
|
||||||
-x test_os
|
|
||||||
)
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
"${COMMON_TEST_SKIPS[@]}"
|
|
||||||
|
|
||||||
-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
|
|
||||||
)
|
|
||||||
|
|
||||||
# Arch-specific skips. See #931888 for a collection of these.
|
|
||||||
case ${CHOST} in
|
|
||||||
alpha*)
|
|
||||||
profile_task_flags+=(
|
|
||||||
-x test_os
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
hppa*)
|
|
||||||
profile_task_flags+=(
|
|
||||||
-x test_descr
|
|
||||||
# bug 931908
|
|
||||||
-x test_exceptions
|
|
||||||
-x test_os
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
powerpc64-*) # big endian
|
|
||||||
profile_task_flags+=(
|
|
||||||
# bug 931908
|
|
||||||
-x test_exceptions
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
riscv*)
|
|
||||||
profile_task_flags+=(
|
|
||||||
-x test_statistics
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
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-libmpdec
|
|
||||||
--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}
|
|
||||||
|
|
||||||
# Gentoo hack to disable accessing system site-packages
|
|
||||||
export GENTOO_CPYTHON_BUILD=1
|
|
||||||
|
|
||||||
if use pgo ; then
|
|
||||||
# bug 660358
|
|
||||||
local -x COLUMNS=80
|
|
||||||
local -x PYTHONDONTWRITEBYTECODE=
|
|
||||||
local -x TMPDIR=/var/tmp
|
|
||||||
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=(
|
|
||||||
--verbose3
|
|
||||||
-u-network
|
|
||||||
-j "$(makeopts_jobs)"
|
|
||||||
"${COMMON_TEST_SKIPS[@]}"
|
|
||||||
)
|
|
||||||
|
|
||||||
# bug 660358
|
|
||||||
local -x COLUMNS=80
|
|
||||||
local -x PYTHONDONTWRITEBYTECODE=
|
|
||||||
local -x TMPDIR=/var/tmp
|
|
||||||
|
|
||||||
nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
|
|
||||||
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
|
|
||||||
local ret=${?}
|
|
||||||
|
|
||||||
[[ ${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}" TEST_MODULES=no 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 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} || 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
|
|
||||||
}
|
|
||||||
@ -1,634 +0,0 @@
|
|||||||
# Copyright 1999-2025 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI="8"
|
|
||||||
|
|
||||||
LLVM_COMPAT=( 18 )
|
|
||||||
LLVM_OPTIONAL=1
|
|
||||||
WANT_LIBTOOL="none"
|
|
||||||
|
|
||||||
inherit autotools check-reqs flag-o-matic linux-info llvm-r1
|
|
||||||
inherit multiprocessing pax-utils python-utils-r1 toolchain-funcs
|
|
||||||
inherit verify-sig
|
|
||||||
|
|
||||||
MY_PV=${PV}
|
|
||||||
MY_P="Python-${MY_PV%_p*}"
|
|
||||||
PYVER="$(ver_cut 1-2)t"
|
|
||||||
PATCHSET="python-gentoo-patches-${MY_PV}"
|
|
||||||
|
|
||||||
DESCRIPTION="Freethreading (no-GIL) version of Python 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 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
|
||||||
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-libs/mpdecimal:=
|
|
||||||
dev-python/gentoo-common
|
|
||||||
>=sys-libs/zlib-1.1.3:=
|
|
||||||
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? (
|
|
||||||
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 '
|
|
||||||
llvm-core/clang:${LLVM_SLOT}
|
|
||||||
llvm-core/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%t}
|
|
||||||
# false positives -- functions specific to *BSD
|
|
||||||
QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags )
|
|
||||||
|
|
||||||
declare -rgA PYTHON_KERNEL_CHECKS=(
|
|
||||||
["CROSS_MEMORY_ATTACH"]="test_external_inspection" #bug 938589
|
|
||||||
["DNOTIFY"]="test_fcntl" # bug 938662
|
|
||||||
)
|
|
||||||
|
|
||||||
pkg_pretend() {
|
|
||||||
if use pgo || use test; then
|
|
||||||
check-reqs_pkg_pretend
|
|
||||||
fi
|
|
||||||
|
|
||||||
ewarn "Freethreading build is considered experimental upstream. Using it"
|
|
||||||
ewarn "could lead to unexpected breakage, including race conditions"
|
|
||||||
ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless"
|
|
||||||
ewarn "you can reproduce the problem with dev-lang/python. Instead,"
|
|
||||||
ewarn "please consider reporting freethreading problems upstream."
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
if [[ ${MERGE_TYPE} != binary ]]; then
|
|
||||||
use jit && llvm-r1_pkg_setup
|
|
||||||
if use test || use pgo; then
|
|
||||||
check-reqs_pkg_setup
|
|
||||||
|
|
||||||
local CONFIG_CHECK
|
|
||||||
for f in "${!PYTHON_KERNEL_CHECKS[@]}"; do
|
|
||||||
CONFIG_CHECK+="~${f} "
|
|
||||||
done
|
|
||||||
linux-info_pkg_setup
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
# breaks tests when using --with-wheel-pkg-dir
|
|
||||||
rm -r Lib/test/wheeldata || 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
|
|
||||||
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
|
|
||||||
|
|
||||||
# Set baseline test skip flags.
|
|
||||||
COMMON_TEST_SKIPS=(
|
|
||||||
# this is actually test_gdb.test_pretty_print
|
|
||||||
-x test_pretty_print
|
|
||||||
# https://bugs.gentoo.org/933840
|
|
||||||
-x test_perf_profiler
|
|
||||||
)
|
|
||||||
|
|
||||||
# Arch-specific skips. See #931888 for a collection of these.
|
|
||||||
case ${CHOST} in
|
|
||||||
alpha*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_builtin
|
|
||||||
-x test_capi
|
|
||||||
-x test_cmath
|
|
||||||
-x test_float
|
|
||||||
# timeout
|
|
||||||
-x test_free_threading
|
|
||||||
-x test_math
|
|
||||||
-x test_numeric_tower
|
|
||||||
-x test_random
|
|
||||||
-x test_statistics
|
|
||||||
# bug 653850
|
|
||||||
-x test_resource
|
|
||||||
-x test_strtod
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
hppa*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_gdb
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
mips*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_ctypes
|
|
||||||
-x test_external_inspection
|
|
||||||
-x test_statistics
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
powerpc64-*) # big endian
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_gdb
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
riscv*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_urllib2
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
sparc*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
# bug 788022
|
|
||||||
-x test_multiprocessing_fork
|
|
||||||
-x test_multiprocessing_forkserver
|
|
||||||
-x test_multiprocessing_spawn
|
|
||||||
|
|
||||||
-x test_ctypes
|
|
||||||
-x test_gdb
|
|
||||||
# bug 931908
|
|
||||||
-x test_exceptions
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Kernel-config specific skips
|
|
||||||
for option in "${!PYTHON_KERNEL_CHECKS[@]}"; do
|
|
||||||
if ! linux_config_exists || ! linux_chkconfig_present "${option}"
|
|
||||||
then
|
|
||||||
COMMON_TEST_SKIPS+=( -x "${PYTHON_KERNEL_CHECKS[${option}]}" )
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# musl-specific skips
|
|
||||||
use elibc_musl && COMMON_TEST_SKIPS+=(
|
|
||||||
# various musl locale deficiencies
|
|
||||||
-x test__locale
|
|
||||||
-x test_c_locale_coercion
|
|
||||||
-x test_locale
|
|
||||||
-x test_re
|
|
||||||
|
|
||||||
# known issues with find_library on musl
|
|
||||||
# https://bugs.python.org/issue21622
|
|
||||||
-x test_ctypes
|
|
||||||
|
|
||||||
# fpathconf, ttyname errno values
|
|
||||||
-x test_os
|
|
||||||
)
|
|
||||||
|
|
||||||
if use pgo; then
|
|
||||||
local profile_task_flags=(
|
|
||||||
-m test
|
|
||||||
"-j$(makeopts_jobs)"
|
|
||||||
--pgo-extended
|
|
||||||
--verbose3
|
|
||||||
-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
|
|
||||||
|
|
||||||
"${COMMON_TEST_SKIPS[@]}"
|
|
||||||
|
|
||||||
-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_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
|
|
||||||
# PGO sometimes fails randomly
|
|
||||||
local -x PROFILE_TASK="${profile_task_flags[*]} || true"
|
|
||||||
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-libmpdec
|
|
||||||
--with-platlibdir=lib
|
|
||||||
--with-pkg-config=yes
|
|
||||||
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
|
|
||||||
--disable-gil
|
|
||||||
|
|
||||||
$(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}
|
|
||||||
|
|
||||||
# Gentoo hack to disable accessing system site-packages
|
|
||||||
export GENTOO_CPYTHON_BUILD=1
|
|
||||||
|
|
||||||
if use pgo ; then
|
|
||||||
# bug 660358
|
|
||||||
local -x COLUMNS=80
|
|
||||||
local -x PYTHONDONTWRITEBYTECODE=
|
|
||||||
local -x TMPDIR=/var/tmp
|
|
||||||
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=(
|
|
||||||
--verbose3
|
|
||||||
-u-network
|
|
||||||
-j "$(makeopts_jobs)"
|
|
||||||
"${COMMON_TEST_SKIPS[@]}"
|
|
||||||
)
|
|
||||||
|
|
||||||
# bug 660358
|
|
||||||
local -x COLUMNS=80
|
|
||||||
local -x PYTHONDONTWRITEBYTECODE=
|
|
||||||
local -x TMPDIR=/var/tmp
|
|
||||||
|
|
||||||
nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
|
|
||||||
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
|
|
||||||
local ret=${?}
|
|
||||||
|
|
||||||
[[ ${ret} -eq 0 ]] || die "emake test failed"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
local libdir=${ED}/usr/lib/python${PYVER}
|
|
||||||
|
|
||||||
# -j1 hack for now for bug #843458
|
|
||||||
emake -j1 DESTDIR="${D}" TEST_MODULES=no altinstall
|
|
||||||
|
|
||||||
# Fix collisions between different slots of Python.
|
|
||||||
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
|
|
||||||
# Fix collision with GIL-enabled build.
|
|
||||||
rm "${ED}/usr/bin/python${PYVER%t}" || die
|
|
||||||
mv "${ED}"/usr/bin/pydoc{${PYVER%t},${PYVER}} || die
|
|
||||||
mv "${ED}"/usr/share/man/man1/python{${PYVER%t},${PYVER}}.1 || 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 sqlite; then
|
|
||||||
rm -r "${libdir}/"sqlite3 || die
|
|
||||||
fi
|
|
||||||
if use tk; then
|
|
||||||
# rename to avoid collision with dev-lang/python
|
|
||||||
mv "${ED}"/usr/bin/idle{${PYVER%t},${PYVER}} || die
|
|
||||||
else
|
|
||||||
rm -r "${ED}/usr/bin/idle${PYVER%t}" || die
|
|
||||||
rm -r "${libdir}/"{idlelib,tkinter} || 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
|
|
||||||
}
|
|
||||||
@ -1,629 +0,0 @@
|
|||||||
# Copyright 1999-2025 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI="8"
|
|
||||||
|
|
||||||
LLVM_COMPAT=( 18 )
|
|
||||||
LLVM_OPTIONAL=1
|
|
||||||
WANT_LIBTOOL="none"
|
|
||||||
|
|
||||||
inherit autotools check-reqs flag-o-matic linux-info llvm-r1
|
|
||||||
inherit multiprocessing pax-utils python-utils-r1 toolchain-funcs
|
|
||||||
inherit verify-sig
|
|
||||||
|
|
||||||
MY_PV=${PV}
|
|
||||||
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 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
|
|
||||||
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-libs/mpdecimal:=
|
|
||||||
dev-python/gentoo-common
|
|
||||||
>=sys-libs/zlib-1.1.3:=
|
|
||||||
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? (
|
|
||||||
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 '
|
|
||||||
llvm-core/clang:${LLVM_SLOT}
|
|
||||||
llvm-core/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 )
|
|
||||||
|
|
||||||
declare -rgA PYTHON_KERNEL_CHECKS=(
|
|
||||||
["CROSS_MEMORY_ATTACH"]="test_external_inspection" #bug 938589
|
|
||||||
["DNOTIFY"]="test_fcntl" # bug 938662
|
|
||||||
)
|
|
||||||
|
|
||||||
pkg_pretend() {
|
|
||||||
if use pgo || use test; then
|
|
||||||
check-reqs_pkg_pretend
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use jit; then
|
|
||||||
ewarn "USE=jit is considered experimental upstream. Using it"
|
|
||||||
ewarn "could lead to unexpected breakage, including race conditions"
|
|
||||||
ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless"
|
|
||||||
ewarn "you can reproduce the problem with dev-lang/python[-jit]. Instead,"
|
|
||||||
ewarn "please consider reporting JIT problems upstream."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
if [[ ${MERGE_TYPE} != binary ]]; then
|
|
||||||
use jit && llvm-r1_pkg_setup
|
|
||||||
if use test || use pgo; then
|
|
||||||
check-reqs_pkg_setup
|
|
||||||
|
|
||||||
local CONFIG_CHECK
|
|
||||||
for f in "${!PYTHON_KERNEL_CHECKS[@]}"; do
|
|
||||||
CONFIG_CHECK+="~${f} "
|
|
||||||
done
|
|
||||||
linux-info_pkg_setup
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
# breaks tests when using --with-wheel-pkg-dir
|
|
||||||
rm -r Lib/test/wheeldata || 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
|
|
||||||
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
|
|
||||||
|
|
||||||
# Set baseline test skip flags.
|
|
||||||
COMMON_TEST_SKIPS=(
|
|
||||||
# this is actually test_gdb.test_pretty_print
|
|
||||||
-x test_pretty_print
|
|
||||||
# https://bugs.gentoo.org/933840
|
|
||||||
-x test_perf_profiler
|
|
||||||
)
|
|
||||||
|
|
||||||
# Arch-specific skips. See #931888 for a collection of these.
|
|
||||||
case ${CHOST} in
|
|
||||||
alpha*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_builtin
|
|
||||||
-x test_capi
|
|
||||||
-x test_cmath
|
|
||||||
-x test_float
|
|
||||||
# timeout
|
|
||||||
-x test_free_threading
|
|
||||||
-x test_math
|
|
||||||
-x test_numeric_tower
|
|
||||||
-x test_random
|
|
||||||
-x test_statistics
|
|
||||||
# bug 653850
|
|
||||||
-x test_resource
|
|
||||||
-x test_strtod
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
hppa*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_gdb
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
mips*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_ctypes
|
|
||||||
-x test_external_inspection
|
|
||||||
-x test_statistics
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
powerpc64-*) # big endian
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_gdb
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
riscv*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_urllib2
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
sparc*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
# bug 788022
|
|
||||||
-x test_multiprocessing_fork
|
|
||||||
-x test_multiprocessing_forkserver
|
|
||||||
-x test_multiprocessing_spawn
|
|
||||||
|
|
||||||
-x test_ctypes
|
|
||||||
-x test_gdb
|
|
||||||
# bug 931908
|
|
||||||
-x test_exceptions
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Kernel-config specific skips
|
|
||||||
for option in "${!PYTHON_KERNEL_CHECKS[@]}"; do
|
|
||||||
if ! linux_config_exists || ! linux_chkconfig_present "${option}"
|
|
||||||
then
|
|
||||||
COMMON_TEST_SKIPS+=( -x "${PYTHON_KERNEL_CHECKS[${option}]}" )
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# musl-specific skips
|
|
||||||
use elibc_musl && COMMON_TEST_SKIPS+=(
|
|
||||||
# various musl locale deficiencies
|
|
||||||
-x test__locale
|
|
||||||
-x test_c_locale_coercion
|
|
||||||
-x test_locale
|
|
||||||
-x test_re
|
|
||||||
|
|
||||||
# known issues with find_library on musl
|
|
||||||
# https://bugs.python.org/issue21622
|
|
||||||
-x test_ctypes
|
|
||||||
|
|
||||||
# fpathconf, ttyname errno values
|
|
||||||
-x test_os
|
|
||||||
)
|
|
||||||
|
|
||||||
if use pgo; then
|
|
||||||
local profile_task_flags=(
|
|
||||||
-m test
|
|
||||||
"-j$(makeopts_jobs)"
|
|
||||||
--pgo-extended
|
|
||||||
--verbose3
|
|
||||||
-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
|
|
||||||
|
|
||||||
"${COMMON_TEST_SKIPS[@]}"
|
|
||||||
|
|
||||||
-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_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
|
|
||||||
# PGO sometimes fails randomly
|
|
||||||
local -x PROFILE_TASK="${profile_task_flags[*]} || true"
|
|
||||||
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-libmpdec
|
|
||||||
--with-platlibdir=lib
|
|
||||||
--with-pkg-config=yes
|
|
||||||
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
|
|
||||||
--enable-gil
|
|
||||||
|
|
||||||
$(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}
|
|
||||||
|
|
||||||
# Gentoo hack to disable accessing system site-packages
|
|
||||||
export GENTOO_CPYTHON_BUILD=1
|
|
||||||
|
|
||||||
if use pgo ; then
|
|
||||||
# bug 660358
|
|
||||||
local -x COLUMNS=80
|
|
||||||
local -x PYTHONDONTWRITEBYTECODE=
|
|
||||||
local -x TMPDIR=/var/tmp
|
|
||||||
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=(
|
|
||||||
--verbose3
|
|
||||||
-u-network
|
|
||||||
-j "$(makeopts_jobs)"
|
|
||||||
"${COMMON_TEST_SKIPS[@]}"
|
|
||||||
)
|
|
||||||
|
|
||||||
# bug 660358
|
|
||||||
local -x COLUMNS=80
|
|
||||||
local -x PYTHONDONTWRITEBYTECODE=
|
|
||||||
local -x TMPDIR=/var/tmp
|
|
||||||
|
|
||||||
nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
|
|
||||||
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
|
|
||||||
local ret=${?}
|
|
||||||
|
|
||||||
[[ ${ret} -eq 0 ]] || die "emake test failed"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
local libdir=${ED}/usr/lib/python${PYVER}
|
|
||||||
|
|
||||||
# -j1 hack for now for bug #843458
|
|
||||||
emake -j1 DESTDIR="${D}" TEST_MODULES=no 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 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} || 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
|
|
||||||
}
|
|
||||||
@ -32,7 +32,7 @@ S="${WORKDIR}/${MY_P}"
|
|||||||
|
|
||||||
LICENSE="PSF-2"
|
LICENSE="PSF-2"
|
||||||
SLOT="${PYVER}"
|
SLOT="${PYVER}"
|
||||||
KEYWORDS="~alpha amd64 arm ~arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
|
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
|
||||||
IUSE="
|
IUSE="
|
||||||
bluetooth build debug +ensurepip examples gdbm jit
|
bluetooth build debug +ensurepip examples gdbm jit
|
||||||
libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind
|
libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind
|
||||||
|
|||||||
@ -1,635 +0,0 @@
|
|||||||
# Copyright 1999-2025 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI="8"
|
|
||||||
|
|
||||||
LLVM_COMPAT=( 19 )
|
|
||||||
LLVM_OPTIONAL=1
|
|
||||||
VERIFY_SIG_METHOD=sigstore
|
|
||||||
WANT_LIBTOOL="none"
|
|
||||||
|
|
||||||
inherit autotools check-reqs flag-o-matic linux-info llvm-r1
|
|
||||||
inherit multiprocessing pax-utils python-utils-r1 toolchain-funcs
|
|
||||||
inherit verify-sig
|
|
||||||
|
|
||||||
MY_PV=${PV/_alpha/a}
|
|
||||||
MY_P="Python-${MY_PV%_p*}"
|
|
||||||
PYVER="$(ver_cut 1-2)t"
|
|
||||||
PATCHSET="python-gentoo-patches-${MY_PV}"
|
|
||||||
|
|
||||||
DESCRIPTION="Freethreading (no-GIL) version of Python 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.sigstore
|
|
||||||
)
|
|
||||||
"
|
|
||||||
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:=
|
|
||||||
>=dev-libs/expat-2.1:=
|
|
||||||
dev-libs/libffi:=
|
|
||||||
dev-libs/mpdecimal:=
|
|
||||||
dev-python/gentoo-common
|
|
||||||
>=sys-libs/zlib-1.1.3:=
|
|
||||||
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? (
|
|
||||||
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 '
|
|
||||||
llvm-core/clang:${LLVM_SLOT}
|
|
||||||
llvm-core/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
|
|
||||||
|
|
||||||
# https://www.python.org/downloads/metadata/sigstore/
|
|
||||||
VERIFY_SIG_CERT_IDENTITY=hugo@python.org
|
|
||||||
VERIFY_SIG_CERT_OIDC_ISSUER=https://github.com/login/oauth
|
|
||||||
|
|
||||||
# large file tests involve a 2.5G file being copied (duplicated)
|
|
||||||
CHECKREQS_DISK_BUILD=5500M
|
|
||||||
|
|
||||||
QA_PKGCONFIG_VERSION=${PYVER%t}
|
|
||||||
# false positives -- functions specific to *BSD
|
|
||||||
QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags )
|
|
||||||
|
|
||||||
declare -rgA PYTHON_KERNEL_CHECKS=(
|
|
||||||
["CROSS_MEMORY_ATTACH"]="test_external_inspection" #bug 938589
|
|
||||||
["DNOTIFY"]="test_fcntl" # bug 938662
|
|
||||||
)
|
|
||||||
|
|
||||||
pkg_pretend() {
|
|
||||||
if use pgo || use test; then
|
|
||||||
check-reqs_pkg_pretend
|
|
||||||
fi
|
|
||||||
|
|
||||||
ewarn "Freethreading build is considered experimental upstream. Using it"
|
|
||||||
ewarn "could lead to unexpected breakage, including race conditions"
|
|
||||||
ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless"
|
|
||||||
ewarn "you can reproduce the problem with dev-lang/python. Instead,"
|
|
||||||
ewarn "please consider reporting freethreading problems upstream."
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
if [[ ${MERGE_TYPE} != binary ]]; then
|
|
||||||
use jit && llvm-r1_pkg_setup
|
|
||||||
if use test || use pgo; then
|
|
||||||
check-reqs_pkg_setup
|
|
||||||
|
|
||||||
local CONFIG_CHECK
|
|
||||||
for f in "${!PYTHON_KERNEL_CHECKS[@]}"; do
|
|
||||||
CONFIG_CHECK+="~${f} "
|
|
||||||
done
|
|
||||||
linux-info_pkg_setup
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_unpack() {
|
|
||||||
if use verify-sig; then
|
|
||||||
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.sigstore}
|
|
||||||
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
|
|
||||||
|
|
||||||
# breaks tests when using --with-wheel-pkg-dir
|
|
||||||
rm -r Lib/test/wheeldata || 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
|
|
||||||
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
|
|
||||||
|
|
||||||
# Set baseline test skip flags.
|
|
||||||
COMMON_TEST_SKIPS=(
|
|
||||||
# this is actually test_gdb.test_pretty_print
|
|
||||||
-x test_pretty_print
|
|
||||||
# https://bugs.gentoo.org/933840
|
|
||||||
-x test_perf_profiler
|
|
||||||
)
|
|
||||||
|
|
||||||
# Arch-specific skips. See #931888 for a collection of these.
|
|
||||||
case ${CHOST} in
|
|
||||||
alpha*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_builtin
|
|
||||||
-x test_capi
|
|
||||||
-x test_cmath
|
|
||||||
-x test_float
|
|
||||||
# timeout
|
|
||||||
-x test_free_threading
|
|
||||||
-x test_math
|
|
||||||
-x test_numeric_tower
|
|
||||||
-x test_random
|
|
||||||
-x test_statistics
|
|
||||||
# bug 653850
|
|
||||||
-x test_resource
|
|
||||||
-x test_strtod
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
hppa*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_gdb
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
mips*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_ctypes
|
|
||||||
-x test_external_inspection
|
|
||||||
-x test_statistics
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
powerpc64-*) # big endian
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_gdb
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
riscv*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_urllib2
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
sparc*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
# bug 788022
|
|
||||||
-x test_multiprocessing_fork
|
|
||||||
-x test_multiprocessing_forkserver
|
|
||||||
-x test_multiprocessing_spawn
|
|
||||||
|
|
||||||
-x test_ctypes
|
|
||||||
-x test_gdb
|
|
||||||
# bug 931908
|
|
||||||
-x test_exceptions
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Kernel-config specific skips
|
|
||||||
for option in "${!PYTHON_KERNEL_CHECKS[@]}"; do
|
|
||||||
if ! linux_config_exists || ! linux_chkconfig_present "${option}"
|
|
||||||
then
|
|
||||||
COMMON_TEST_SKIPS+=( -x "${PYTHON_KERNEL_CHECKS[${option}]}" )
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# musl-specific skips
|
|
||||||
use elibc_musl && COMMON_TEST_SKIPS+=(
|
|
||||||
# various musl locale deficiencies
|
|
||||||
-x test__locale
|
|
||||||
-x test_c_locale_coercion
|
|
||||||
-x test_locale
|
|
||||||
-x test_re
|
|
||||||
|
|
||||||
# known issues with find_library on musl
|
|
||||||
# https://bugs.python.org/issue21622
|
|
||||||
-x test_ctypes
|
|
||||||
|
|
||||||
# fpathconf, ttyname errno values
|
|
||||||
-x test_os
|
|
||||||
)
|
|
||||||
|
|
||||||
if use pgo; then
|
|
||||||
local profile_task_flags=(
|
|
||||||
-m test
|
|
||||||
"-j$(makeopts_jobs)"
|
|
||||||
--pgo-extended
|
|
||||||
--verbose3
|
|
||||||
-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
|
|
||||||
|
|
||||||
"${COMMON_TEST_SKIPS[@]}"
|
|
||||||
|
|
||||||
-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_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
|
|
||||||
# PGO sometimes fails randomly
|
|
||||||
local -x PROFILE_TASK="${profile_task_flags[*]} || true"
|
|
||||||
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-libmpdec
|
|
||||||
--with-platlibdir=lib
|
|
||||||
--with-pkg-config=yes
|
|
||||||
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
|
|
||||||
--disable-gil
|
|
||||||
|
|
||||||
$(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}
|
|
||||||
|
|
||||||
# Gentoo hack to disable accessing system site-packages
|
|
||||||
export GENTOO_CPYTHON_BUILD=1
|
|
||||||
|
|
||||||
if use pgo ; then
|
|
||||||
# bug 660358
|
|
||||||
local -x COLUMNS=80
|
|
||||||
local -x PYTHONDONTWRITEBYTECODE=
|
|
||||||
local -x TMPDIR=/var/tmp
|
|
||||||
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=(
|
|
||||||
--verbose3
|
|
||||||
-u-network
|
|
||||||
-j "$(makeopts_jobs)"
|
|
||||||
"${COMMON_TEST_SKIPS[@]}"
|
|
||||||
)
|
|
||||||
|
|
||||||
# bug 660358
|
|
||||||
local -x COLUMNS=80
|
|
||||||
local -x PYTHONDONTWRITEBYTECODE=
|
|
||||||
local -x TMPDIR=/var/tmp
|
|
||||||
|
|
||||||
nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
|
|
||||||
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
|
|
||||||
local ret=${?}
|
|
||||||
|
|
||||||
[[ ${ret} -eq 0 ]] || die "emake test failed"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
local libdir=${ED}/usr/lib/python${PYVER}
|
|
||||||
|
|
||||||
# -j1 hack for now for bug #843458
|
|
||||||
emake -j1 DESTDIR="${D}" TEST_MODULES=no altinstall
|
|
||||||
|
|
||||||
# Fix collisions between different slots of Python.
|
|
||||||
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
|
|
||||||
# Fix collision with GIL-enabled build.
|
|
||||||
rm "${ED}/usr/bin/python${PYVER%t}" || die
|
|
||||||
mv "${ED}"/usr/bin/pydoc{${PYVER%t},${PYVER}} || die
|
|
||||||
mv "${ED}"/usr/share/man/man1/python{${PYVER%t},${PYVER}}.1 || 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 sqlite; then
|
|
||||||
rm -r "${libdir}/"sqlite3 || die
|
|
||||||
fi
|
|
||||||
if use tk; then
|
|
||||||
# rename to avoid collision with dev-lang/python
|
|
||||||
mv "${ED}"/usr/bin/idle{${PYVER%t},${PYVER}} || die
|
|
||||||
else
|
|
||||||
rm -r "${ED}/usr/bin/idle${PYVER%t}" || die
|
|
||||||
rm -r "${libdir}/"{idlelib,tkinter} || 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
|
|
||||||
}
|
|
||||||
@ -1,630 +0,0 @@
|
|||||||
# Copyright 1999-2025 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI="8"
|
|
||||||
|
|
||||||
LLVM_COMPAT=( 19 )
|
|
||||||
LLVM_OPTIONAL=1
|
|
||||||
VERIFY_SIG_METHOD=sigstore
|
|
||||||
WANT_LIBTOOL="none"
|
|
||||||
|
|
||||||
inherit autotools check-reqs flag-o-matic linux-info llvm-r1
|
|
||||||
inherit multiprocessing pax-utils python-utils-r1 toolchain-funcs
|
|
||||||
inherit 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.sigstore
|
|
||||||
)
|
|
||||||
"
|
|
||||||
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:=
|
|
||||||
>=dev-libs/expat-2.1:=
|
|
||||||
dev-libs/libffi:=
|
|
||||||
dev-libs/mpdecimal:=
|
|
||||||
dev-python/gentoo-common
|
|
||||||
>=sys-libs/zlib-1.1.3:=
|
|
||||||
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? (
|
|
||||||
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 '
|
|
||||||
llvm-core/clang:${LLVM_SLOT}
|
|
||||||
llvm-core/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
|
|
||||||
|
|
||||||
# https://www.python.org/downloads/metadata/sigstore/
|
|
||||||
VERIFY_SIG_CERT_IDENTITY=hugo@python.org
|
|
||||||
VERIFY_SIG_CERT_OIDC_ISSUER=https://github.com/login/oauth
|
|
||||||
|
|
||||||
# large file tests involve a 2.5G file being copied (duplicated)
|
|
||||||
CHECKREQS_DISK_BUILD=5500M
|
|
||||||
|
|
||||||
QA_PKGCONFIG_VERSION=${PYVER%t}
|
|
||||||
# false positives -- functions specific to *BSD
|
|
||||||
QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags )
|
|
||||||
|
|
||||||
declare -rgA PYTHON_KERNEL_CHECKS=(
|
|
||||||
["CROSS_MEMORY_ATTACH"]="test_external_inspection" #bug 938589
|
|
||||||
["DNOTIFY"]="test_fcntl" # bug 938662
|
|
||||||
)
|
|
||||||
|
|
||||||
pkg_pretend() {
|
|
||||||
if use pgo || use test; then
|
|
||||||
check-reqs_pkg_pretend
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use jit; then
|
|
||||||
ewarn "USE=jit is considered experimental upstream. Using it"
|
|
||||||
ewarn "could lead to unexpected breakage, including race conditions"
|
|
||||||
ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless"
|
|
||||||
ewarn "you can reproduce the problem with dev-lang/python[-jit]. Instead,"
|
|
||||||
ewarn "please consider reporting JIT problems upstream."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
if [[ ${MERGE_TYPE} != binary ]]; then
|
|
||||||
use jit && llvm-r1_pkg_setup
|
|
||||||
if use test || use pgo; then
|
|
||||||
check-reqs_pkg_setup
|
|
||||||
|
|
||||||
local CONFIG_CHECK
|
|
||||||
for f in "${!PYTHON_KERNEL_CHECKS[@]}"; do
|
|
||||||
CONFIG_CHECK+="~${f} "
|
|
||||||
done
|
|
||||||
linux-info_pkg_setup
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_unpack() {
|
|
||||||
if use verify-sig; then
|
|
||||||
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.sigstore}
|
|
||||||
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
|
|
||||||
|
|
||||||
# breaks tests when using --with-wheel-pkg-dir
|
|
||||||
rm -r Lib/test/wheeldata || 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
|
|
||||||
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
|
|
||||||
|
|
||||||
# Set baseline test skip flags.
|
|
||||||
COMMON_TEST_SKIPS=(
|
|
||||||
# this is actually test_gdb.test_pretty_print
|
|
||||||
-x test_pretty_print
|
|
||||||
# https://bugs.gentoo.org/933840
|
|
||||||
-x test_perf_profiler
|
|
||||||
)
|
|
||||||
|
|
||||||
# Arch-specific skips. See #931888 for a collection of these.
|
|
||||||
case ${CHOST} in
|
|
||||||
alpha*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_builtin
|
|
||||||
-x test_capi
|
|
||||||
-x test_cmath
|
|
||||||
-x test_float
|
|
||||||
# timeout
|
|
||||||
-x test_free_threading
|
|
||||||
-x test_math
|
|
||||||
-x test_numeric_tower
|
|
||||||
-x test_random
|
|
||||||
-x test_statistics
|
|
||||||
# bug 653850
|
|
||||||
-x test_resource
|
|
||||||
-x test_strtod
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
hppa*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_gdb
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
mips*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_ctypes
|
|
||||||
-x test_external_inspection
|
|
||||||
-x test_statistics
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
powerpc64-*) # big endian
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_gdb
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
riscv*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_urllib2
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
sparc*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
# bug 788022
|
|
||||||
-x test_multiprocessing_fork
|
|
||||||
-x test_multiprocessing_forkserver
|
|
||||||
-x test_multiprocessing_spawn
|
|
||||||
|
|
||||||
-x test_ctypes
|
|
||||||
-x test_gdb
|
|
||||||
# bug 931908
|
|
||||||
-x test_exceptions
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Kernel-config specific skips
|
|
||||||
for option in "${!PYTHON_KERNEL_CHECKS[@]}"; do
|
|
||||||
if ! linux_config_exists || ! linux_chkconfig_present "${option}"
|
|
||||||
then
|
|
||||||
COMMON_TEST_SKIPS+=( -x "${PYTHON_KERNEL_CHECKS[${option}]}" )
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# musl-specific skips
|
|
||||||
use elibc_musl && COMMON_TEST_SKIPS+=(
|
|
||||||
# various musl locale deficiencies
|
|
||||||
-x test__locale
|
|
||||||
-x test_c_locale_coercion
|
|
||||||
-x test_locale
|
|
||||||
-x test_re
|
|
||||||
|
|
||||||
# known issues with find_library on musl
|
|
||||||
# https://bugs.python.org/issue21622
|
|
||||||
-x test_ctypes
|
|
||||||
|
|
||||||
# fpathconf, ttyname errno values
|
|
||||||
-x test_os
|
|
||||||
)
|
|
||||||
|
|
||||||
if use pgo; then
|
|
||||||
local profile_task_flags=(
|
|
||||||
-m test
|
|
||||||
"-j$(makeopts_jobs)"
|
|
||||||
--pgo-extended
|
|
||||||
--verbose3
|
|
||||||
-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
|
|
||||||
|
|
||||||
"${COMMON_TEST_SKIPS[@]}"
|
|
||||||
|
|
||||||
-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_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
|
|
||||||
# PGO sometimes fails randomly
|
|
||||||
local -x PROFILE_TASK="${profile_task_flags[*]} || true"
|
|
||||||
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-libmpdec
|
|
||||||
--with-platlibdir=lib
|
|
||||||
--with-pkg-config=yes
|
|
||||||
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
|
|
||||||
--enable-gil
|
|
||||||
|
|
||||||
$(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}
|
|
||||||
|
|
||||||
# Gentoo hack to disable accessing system site-packages
|
|
||||||
export GENTOO_CPYTHON_BUILD=1
|
|
||||||
|
|
||||||
if use pgo ; then
|
|
||||||
# bug 660358
|
|
||||||
local -x COLUMNS=80
|
|
||||||
local -x PYTHONDONTWRITEBYTECODE=
|
|
||||||
local -x TMPDIR=/var/tmp
|
|
||||||
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=(
|
|
||||||
--verbose3
|
|
||||||
-u-network
|
|
||||||
-j "$(makeopts_jobs)"
|
|
||||||
"${COMMON_TEST_SKIPS[@]}"
|
|
||||||
)
|
|
||||||
|
|
||||||
# bug 660358
|
|
||||||
local -x COLUMNS=80
|
|
||||||
local -x PYTHONDONTWRITEBYTECODE=
|
|
||||||
local -x TMPDIR=/var/tmp
|
|
||||||
|
|
||||||
nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
|
|
||||||
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
|
|
||||||
local ret=${?}
|
|
||||||
|
|
||||||
[[ ${ret} -eq 0 ]] || die "emake test failed"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
local libdir=${ED}/usr/lib/python${PYVER}
|
|
||||||
|
|
||||||
# -j1 hack for now for bug #843458
|
|
||||||
emake -j1 DESTDIR="${D}" TEST_MODULES=no 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 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} || 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
|
|
||||||
}
|
|
||||||
@ -1,491 +0,0 @@
|
|||||||
# Copyright 1999-2025 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 ~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-libs/mpdecimal:=
|
|
||||||
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
|
|
||||||
|
|
||||||
# Set baseline test skip flags.
|
|
||||||
COMMON_TEST_SKIPS=(
|
|
||||||
-x test_gdb
|
|
||||||
)
|
|
||||||
|
|
||||||
# Arch-specific skips. See #931888 for a collection of these.
|
|
||||||
case ${CHOST} in
|
|
||||||
alpha*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_builtin
|
|
||||||
-x test_capi
|
|
||||||
-x test_cmath
|
|
||||||
-x test_float
|
|
||||||
# timeout
|
|
||||||
-x test_free_threading
|
|
||||||
-x test_math
|
|
||||||
-x test_numeric_tower
|
|
||||||
-x test_random
|
|
||||||
-x test_statistics
|
|
||||||
# bug 653850
|
|
||||||
-x test_resource
|
|
||||||
-x test_strtod
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
mips*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_ctypes
|
|
||||||
-x test_external_inspection
|
|
||||||
-x test_statistics
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
powerpc64-*) # big endian
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_descr
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
riscv*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_urllib2
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
sparc*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
# bug 788022
|
|
||||||
-x test_multiprocessing_fork
|
|
||||||
-x test_multiprocessing_forkserver
|
|
||||||
-x test_multiprocessing_spawn
|
|
||||||
|
|
||||||
-x test_ctypes
|
|
||||||
-x test_descr
|
|
||||||
# bug 931908
|
|
||||||
-x test_exceptions
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# musl-specific skips
|
|
||||||
use elibc_musl && COMMON_TEST_SKIPS+=(
|
|
||||||
# various musl locale deficiencies
|
|
||||||
-x test__locale
|
|
||||||
-x test_c_locale_coercion
|
|
||||||
-x test_locale
|
|
||||||
-x test_re
|
|
||||||
|
|
||||||
# known issues with find_library on musl
|
|
||||||
# https://bugs.python.org/issue21622
|
|
||||||
-x test_ctypes
|
|
||||||
|
|
||||||
# fpathconf, ttyname errno values
|
|
||||||
-x test_os
|
|
||||||
)
|
|
||||||
|
|
||||||
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-system-libmpdec
|
|
||||||
--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
|
|
||||||
|
|
||||||
# Gentoo hack to disable accessing system site-packages
|
|
||||||
export GENTOO_CPYTHON_BUILD=1
|
|
||||||
|
|
||||||
# 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=(
|
|
||||||
--verbose3
|
|
||||||
-u-network
|
|
||||||
-j "$(makeopts_jobs)"
|
|
||||||
"${COMMON_TEST_SKIPS[@]}"
|
|
||||||
)
|
|
||||||
|
|
||||||
# bug 660358
|
|
||||||
local -x COLUMNS=80
|
|
||||||
local -x PYTHONDONTWRITEBYTECODE=
|
|
||||||
local -x TMPDIR=/var/tmp
|
|
||||||
|
|
||||||
nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
|
|
||||||
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
|
|
||||||
local ret=${?}
|
|
||||||
|
|
||||||
[[ ${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
|
|
||||||
}
|
|
||||||
@ -1,584 +0,0 @@
|
|||||||
# Copyright 1999-2025 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 ~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-libs/mpdecimal:=
|
|
||||||
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
|
|
||||||
|
|
||||||
# Set baseline test skip flags.
|
|
||||||
COMMON_TEST_SKIPS=(
|
|
||||||
-x test_gdb
|
|
||||||
)
|
|
||||||
|
|
||||||
# Arch-specific skips. See #931888 for a collection of these.
|
|
||||||
case ${CHOST} in
|
|
||||||
alpha*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_builtin
|
|
||||||
-x test_capi
|
|
||||||
-x test_cmath
|
|
||||||
-x test_float
|
|
||||||
# timeout
|
|
||||||
-x test_free_threading
|
|
||||||
-x test_math
|
|
||||||
-x test_numeric_tower
|
|
||||||
-x test_random
|
|
||||||
-x test_statistics
|
|
||||||
# bug 653850
|
|
||||||
-x test_resource
|
|
||||||
-x test_strtod
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
mips*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_ctypes
|
|
||||||
-x test_external_inspection
|
|
||||||
-x test_statistics
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
powerpc64-*) # big endian
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_descr
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
riscv*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
-x test_urllib2
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
sparc*)
|
|
||||||
COMMON_TEST_SKIPS+=(
|
|
||||||
# bug 788022
|
|
||||||
-x test_multiprocessing_fork
|
|
||||||
-x test_multiprocessing_forkserver
|
|
||||||
-x test_multiprocessing_spawn
|
|
||||||
|
|
||||||
-x test_ctypes
|
|
||||||
-x test_descr
|
|
||||||
# bug 931908
|
|
||||||
-x test_exceptions
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# musl-specific skips
|
|
||||||
use elibc_musl && COMMON_TEST_SKIPS+=(
|
|
||||||
# various musl locale deficiencies
|
|
||||||
-x test__locale
|
|
||||||
-x test_c_locale_coercion
|
|
||||||
-x test_locale
|
|
||||||
-x test_re
|
|
||||||
|
|
||||||
# known issues with find_library on musl
|
|
||||||
# https://bugs.python.org/issue21622
|
|
||||||
-x test_ctypes
|
|
||||||
|
|
||||||
# fpathconf, ttyname errno values
|
|
||||||
-x test_os
|
|
||||||
)
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
"${COMMON_TEST_SKIPS[@]}"
|
|
||||||
|
|
||||||
-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
|
|
||||||
)
|
|
||||||
|
|
||||||
# Arch-specific skips. See #931888 for a collection of these.
|
|
||||||
case ${CHOST} in
|
|
||||||
alpha*)
|
|
||||||
profile_task_flags+=(
|
|
||||||
-x test_os
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
hppa*)
|
|
||||||
profile_task_flags+=(
|
|
||||||
-x test_descr
|
|
||||||
# bug 931908
|
|
||||||
-x test_exceptions
|
|
||||||
-x test_os
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
powerpc64-*) # big endian
|
|
||||||
profile_task_flags+=(
|
|
||||||
# bug 931908
|
|
||||||
-x test_exceptions
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
riscv*)
|
|
||||||
profile_task_flags+=(
|
|
||||||
-x test_statistics
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
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-system-libmpdec
|
|
||||||
--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}
|
|
||||||
|
|
||||||
# Gentoo hack to disable accessing system site-packages
|
|
||||||
export GENTOO_CPYTHON_BUILD=1
|
|
||||||
|
|
||||||
if use pgo ; then
|
|
||||||
# bug 660358
|
|
||||||
local -x COLUMNS=80
|
|
||||||
local -x PYTHONDONTWRITEBYTECODE=
|
|
||||||
local -x TMPDIR=/var/tmp
|
|
||||||
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=(
|
|
||||||
--verbose3
|
|
||||||
-u-network
|
|
||||||
-j "$(makeopts_jobs)"
|
|
||||||
"${COMMON_TEST_SKIPS[@]}"
|
|
||||||
)
|
|
||||||
|
|
||||||
# bug 660358
|
|
||||||
local -x COLUMNS=80
|
|
||||||
local -x PYTHONDONTWRITEBYTECODE=
|
|
||||||
local -x TMPDIR=/var/tmp
|
|
||||||
|
|
||||||
nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
|
|
||||||
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
|
|
||||||
local ret=${?}
|
|
||||||
|
|
||||||
[[ ${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
|
|
||||||
}
|
|
||||||
@ -553,6 +553,34 @@ DIST rust-1.86.0-x86_64-unknown-linux-gnu.tar.xz 192462932 BLAKE2B 75bb01181aad6
|
|||||||
DIST rust-1.86.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b7365bb0f74a12de2e80b4579323b3ae3b3e65460a216cad7c8f61d4fb4bb86bb55cc25721a6cbd8be5b2b5a92aec7601950d2f1b04f94644a890c91966bc20f SHA512 d57cd3221f0d1dbfe69dbe4c5417b0e2d292a09fa892ed46ea90df95b6502c5d0e54eb4916f1289041758dbcc30cd6910f2bd4edc99f2711abb6a9e246361c6b
|
DIST rust-1.86.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b7365bb0f74a12de2e80b4579323b3ae3b3e65460a216cad7c8f61d4fb4bb86bb55cc25721a6cbd8be5b2b5a92aec7601950d2f1b04f94644a890c91966bc20f SHA512 d57cd3221f0d1dbfe69dbe4c5417b0e2d292a09fa892ed46ea90df95b6502c5d0e54eb4916f1289041758dbcc30cd6910f2bd4edc99f2711abb6a9e246361c6b
|
||||||
DIST rust-1.86.0-x86_64-unknown-linux-musl.tar.xz 283110076 BLAKE2B 9881d9dc7ac8e1f6cdf632131b31eae7404d17f76d38873509e4b8e549e00c37dfef3bdb0663a20b6fb13dc8198a6d25f74931d6f7e4d017400420a6032ab374 SHA512 abb2d6ccc009840b32e48755b2af2a7f2b04eafe285e5c2f35593bf3219e12cfb8ce9e15429cf2315bc5a0ee5103d3b64c7eea121cb77cb8ff2e699bd685bf88
|
DIST rust-1.86.0-x86_64-unknown-linux-musl.tar.xz 283110076 BLAKE2B 9881d9dc7ac8e1f6cdf632131b31eae7404d17f76d38873509e4b8e549e00c37dfef3bdb0663a20b6fb13dc8198a6d25f74931d6f7e4d017400420a6032ab374 SHA512 abb2d6ccc009840b32e48755b2af2a7f2b04eafe285e5c2f35593bf3219e12cfb8ce9e15429cf2315bc5a0ee5103d3b64c7eea121cb77cb8ff2e699bd685bf88
|
||||||
DIST rust-1.86.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 9dbec80a7661d103e0b0a2187bd524eb5a4f255e6a15ac4bf59f82eb0b5710ef09dec0f35dd0e3015d374c701c2945ddc510a05c5bad2287ce855c30c0460935 SHA512 9664e026d85ed42227680c385bfc42a2cdfdb3a37858ced5cfcf2f7baec4840e01fc0e3e581fba1297a55245864f3d1483f430fc58295b98b84814df07f73c0c
|
DIST rust-1.86.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 9dbec80a7661d103e0b0a2187bd524eb5a4f255e6a15ac4bf59f82eb0b5710ef09dec0f35dd0e3015d374c701c2945ddc510a05c5bad2287ce855c30c0460935 SHA512 9664e026d85ed42227680c385bfc42a2cdfdb3a37858ced5cfcf2f7baec4840e01fc0e3e581fba1297a55245864f3d1483f430fc58295b98b84814df07f73c0c
|
||||||
|
DIST rust-1.87.0_beta20250420-aarch64-unknown-linux-gnu.tar.xz 167053492 BLAKE2B f2138a03c2e842daa3ad49bb25b2ea63b7cb40165e472cdb20aca778b9fbc6d21f6102e10a0de411e873ddac7726a52dd0221afc6869650aa9a4cdca2e7fa9c1 SHA512 1db6b9ccb1071e95af7900c891e2f72ce52b434d7157c5b89370288d4fc12f4b2f51edbac761e09be79777d2bd156a334a71535e9bd15fe8a67596a9853ff0c3
|
||||||
|
DIST rust-1.87.0_beta20250420-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 55efcb2f4a63e712934e25edb15adacbe5941b0fa795827526fb720b5fc4083de7cc093c763cd86324b107aef74a953d06f510033f398fd018152e24ae3574a9 SHA512 b5d609a91d2bd2254337c776c33f6b6322211a7aa03da9afd26683afbcd5f02fcd62938b0288e572c55d8f413bc32b4d3df6c6cd544c4a6d3a38630cb058c91f
|
||||||
|
DIST rust-1.87.0_beta20250420-aarch64-unknown-linux-musl.tar.xz 244278800 BLAKE2B 59b807b8c8e83c825a34734d6d317fb56a0fd670a629a20866ad2baa3afadc2e22353f81415b2ae073b705e063633f3961fcaf10ab34eb8eb6b2c05d2df204e4 SHA512 b6cb75ef359d48081dc4c40dc7e6f9794a121d750cec5b18f040aa0f80efa521d32eea0435cf74e467b59467af1bcbd971a3724d53a04963be7c0b21c5bcfdf8
|
||||||
|
DIST rust-1.87.0_beta20250420-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B ac1cecf73f8018a8aa9bcf42f452818b810e13b7ea00be9b2a10ec60605980458b223600389dee74e679134951277ef5cd3b0d402425ffdcf1285530c490e028 SHA512 fedabb1ed5f3a38c36b20cd4dbbc44e11044522ad86e328d804ff975725195a33b321b447c5b918afa7bcff1485b1d4078a37181db4e3584905a7dca8ec13be2
|
||||||
|
DIST rust-1.87.0_beta20250420-arm-unknown-linux-gnueabi.tar.xz 229437800 BLAKE2B c7f6f72c9f538832edb58443115b202e6947f6e4cb8bd2fbbb81ad36ef93ea899067d1a94970eccdb5e6577f9d6d5d60a829a125dac3b48dfb7892d029aa9b46 SHA512 601c2c9a0f4acd988bcd4ee1ba2515baa092c4558d8a2109a965873b26d91f5645605a9371cdadd8fa27eabc34c2d50a781f8921fc9f9eed91933f800f36ca69
|
||||||
|
DIST rust-1.87.0_beta20250420-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B af63985f0b853ef1b8f0ae5b4448afe277c304cbb783cb73eee51a9c1b4429a245e164e5d63a62c9a50b72e0a52328e58ec2505eda2f5bc87cf36e4218d741e9 SHA512 deb475f6dff36af8ccaa4c27794dfc48073ea2e32177631e7ddde3f8f6cbceec6963f16c27b1fba9c191c4e48a6040b1929c4dd792303d6ee6cdda53bb5c893d
|
||||||
|
DIST rust-1.87.0_beta20250420-arm-unknown-linux-gnueabihf.tar.xz 229830976 BLAKE2B 5cb3bc360d230b8b5fc3c5390b3d5097fefb76dfb73c47312ec229612fac1f1e34160b0a91d3374b7915dbece571f5edc05651bdfac344aebe6b99350b1d6042 SHA512 c1b6a2538967a05b336227d06e5cc7e73ad75e73abd39b1c690ffd6ddd9ec5f52adc2d209ace65672691da97ca12b200a7ecca3a0590f366af5aad0d190882e1
|
||||||
|
DIST rust-1.87.0_beta20250420-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 9a9f0c2cb9991f0131662b41e8dcfc6a8bc66b32baa844b58e25aae09699f902496927454377643987cec0031da23a9b7b358d07b28e327720f75b6426741926 SHA512 8145c0adfbef8179396ff9d65089f179a523e6b500908a9a272c858d86cbc6235909b1f5e91ef5188377d00ed6a22c8668baa3c16827620a1698c7abce42fd99
|
||||||
|
DIST rust-1.87.0_beta20250420-armv7-unknown-linux-gnueabihf.tar.xz 235549272 BLAKE2B 8df4bb650ee3f4d58227480e341db7cc9f0e7b065cb887c2931da46eab951edb304e6dcb3320496ac9da4a90e386973126fe4e197152c37554dd17c2b1cb624f SHA512 8699544f8faf3002afb973179b3555bf12afd03667d295ec48d95cc3737e4bfd65d21bada4b7d2ad2582c6060a785603ec86ef636063b2b382da1bfedbfea331
|
||||||
|
DIST rust-1.87.0_beta20250420-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 45cb81d2f9133c4c6929a0d866393858237d4d99eece49bf8878dc351ac31224e61cb9f19b96e2639cc29502cecc4475dd1eb4f1d96fbe6a45ad03e00a215ceb SHA512 c294dca3cff31b08e40394d8d25b4af5c7c98cfaaa7b2b1ee07b6c2af4b961181b56121b7638b42f6bcf36978b5a56e8311ec2c6f658b72daee39e4fbd360407
|
||||||
|
DIST rust-1.87.0_beta20250420-i686-unknown-linux-gnu.tar.xz 263549596 BLAKE2B b2e31c243b1514f17bc43c7715838e710dda3a8fa567c49a470b7bce082873b802b655cc790fdbf5325ab3df6c7fe5ccaa1ab9295ed0071dee532bce52f0b06b SHA512 d02a842878dac99812aff56c6d906d60c51c37a6e03185c6a956f2712ffb0a46b9b198fdd7b05d50e7f9c56505d819253be28fa035f02c042065796853f571ed
|
||||||
|
DIST rust-1.87.0_beta20250420-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 3f6b3b1aea710e68713f67fcb13ad0ff81879f3e2c95bc288bf73dff01d051ca0e9f4e586b802fbf91dc9f75b69988c0df764a0d6128c02e9dbbc992f70fb340 SHA512 b35be052c1dba1b8d9f673a99fc5b2c5b123f33feffc4c5b24de2d5528c4624dc0d0ef75b9904cd9e86db12db7148693d1c5c065a07377072fc515fa4395ffd2
|
||||||
|
DIST rust-1.87.0_beta20250420-loongarch64-unknown-linux-gnu.tar.xz 261203096 BLAKE2B efc35a94cba075d843bd800fb52cb26bd01bcb02567a708926a5f8163e50cfab20802f50a8f11b449448b7924df462aafd6756a25eca3dee9882efed7a987366 SHA512 da71cf2b582f95119fddfb2dadf668b3c9ce9d731cffa68510ca72a7d2f5304c91530f020c3edfdcd03f4aca73905e8e32e8d5c304d0eb81dea432e212e715e5
|
||||||
|
DIST rust-1.87.0_beta20250420-loongarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B fee28e7ed6d77dd9a4a1a67fcdb886213c8cb047187508a0f4557dabc9a4fb9ff1278ffaf9b5ec652ac3eea1801275c4019221077a787a1045bce38c8b8bb08a SHA512 6f9de5973a73eff1f44121e859aa97d74ca3df451ac1cdc20e5cf6f242368aa355157eb24c91084dcd7c2e594810b8c7ce4b6258fac5e68404e1789ef76a3bd9
|
||||||
|
DIST rust-1.87.0_beta20250420-powerpc-unknown-linux-gnu.tar.xz 255800912 BLAKE2B 56e2e716d97e96096563569f1f8823ad31b8f104f424bc75d23c2b694181df9dd81b2d6b550f18149fb367041e7c7f30463e4c0abe294b45f3b1853e6f1423eb SHA512 cd489c80bb6c901ba134af7f2d45afdd7ee1b82b3e1e4eb45049ec1316f9c067c463561459ddd7eab014ec8fdf4e00fc681baa63a36c1d953c2105df54acffe3
|
||||||
|
DIST rust-1.87.0_beta20250420-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c134bf010ec2db06a8643668ffb6474fa530be7c31a076b2700f47477cddd2d8591ab2288b19f11b228dc933cb78c0576b4e512b89f3346ce4f01a0d68afd65f SHA512 514039fa3faead4cdadaafbd7cc0583f7bb084a1accc295928b0f44657d94b0e47931d8badc69f80c13351ef6dd872a7d43856d7ba2ca63495a0f340c19f5c3c
|
||||||
|
DIST rust-1.87.0_beta20250420-powerpc64-unknown-linux-gnu.tar.xz 255799988 BLAKE2B 585274636abb052f26ffeee7918a2ab5ee38029e7e895fbb278f24b659b8e28f34f6613375f90c1eb7dcc8236f657d5bef760c55291d048e4d102845883eee21 SHA512 b5d464d78b9b7ce0ef960c71d0a1e9d683ae599b46acaf096639baa69e0f67153e3ccf70e08ee4d2e9d23f8778cf654c6e9c3383d39a862a01ce03ecf2033338
|
||||||
|
DIST rust-1.87.0_beta20250420-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5fe0d07c0fedc718143aa8bc43383a95397a96ac46affa15f5114cb782996430bd347bd2a488d2cbab162fd2570834761296ec5e837da145093a83444d5c9fb9 SHA512 9a3c2b157adff51a286815de379bb8e42990c6dc4ee345950ea866ef6ef7cd4da17f39868aafec8ad9682eed187ca5665f5d332af8dbdb9beb29ce21bf14ba0c
|
||||||
|
DIST rust-1.87.0_beta20250420-powerpc64le-unknown-linux-gnu.tar.xz 271492844 BLAKE2B b090331958ac17b08b24b28ef772307bef4788ba16b40fa6cc62b0e1c6e4f5fecf4151048ab7f0ab10ff41a8c1c714df65e62c162dc9fdd8d56b3cc7390d93d5 SHA512 688fd8f82fb690f95a86e9457caca313527dee737c4bc6f928cce449ed456c5a569f1448afe6b8cee770e16a7603f5a212c62566df44115277cfc12b6969692d
|
||||||
|
DIST rust-1.87.0_beta20250420-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 6b83e970941e484c36c6147bb629383bf6a79a535c99f9c0c73b9881e38f2fcd4193bd27ffee4262fe2f5e0d74c867d35f7b60ff6543b61edc67b05b7674a5ac SHA512 c849e801743a2a7f36d7a436309ed0bc5adf52cc3717a631a2dd56eeafd1942e97d624500f67d83d53187a821a56db88bdaad8928bd732bcea0a5d5e11803a41
|
||||||
|
DIST rust-1.87.0_beta20250420-riscv64gc-unknown-linux-gnu.tar.xz 250483088 BLAKE2B 175a7c391337c844879736d7b71e5a9ebb777fb6134cb8ad4e42a3de56815487b5cefca681089a93e354f1a1d8f8d5b3bfb5016bb7b80003db4d8e2f70be71fd SHA512 4ebafd8d1ebe0238e040c36c422b5b828b309c2f8322145ba07820a068e3c53a2ed7798c4ac67e2610baec1126c8d8e271c3b3004971490a253a5c59090c8fd7
|
||||||
|
DIST rust-1.87.0_beta20250420-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 72e0e1cb9f3e5fcd76e62c3efd42530f2cf04d54f05cbabeaaf3e1e16ce3f84a2d5f0ba0658da8cfdfd574bf85e4471a0b963a2ba57c1d790b314f0b89df9f56 SHA512 0e9ea30c181d46a8835c6c323bfb23f3eb1a7a267361b8aad056d4c820dd69b184ba210a9d0e1341d65178929eac473c69d11b4e0ec4f65de52f82f9bb93900b
|
||||||
|
DIST rust-1.87.0_beta20250420-s390x-unknown-linux-gnu.tar.xz 240064780 BLAKE2B 193ca1b6d4a65eab53be8b6c16acb7b0acade0cb3c41dc244e06c38d34a0c9b1a6ad7bf852cb2ce1e432ca8f509e890dbe63cfc48c4cca11f8dd72a52664c39f SHA512 060c876c11cd5783e7517ebeefe9d601b2f1e3220b69851200cb00d8fc06434c492740374798133248b3b5fd3b08e5d9ce9d458191896be9296a6245b7d30fe8
|
||||||
|
DIST rust-1.87.0_beta20250420-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B f41d5b89fbdc2f2d7fd7bfa56df5a481784bfa86563c2429a19cc86c397146151b9de31ce71f6a54986fd307533dc8f9df0ca23edbf659fa0efb1bd74613cfd2 SHA512 96968b74f64a7402be3d27e09867d62eb0554169553abac241c6ad4393c3854128494776bc9132bdcaee499e89e6a4875b8a25731af176d88297fa74f6c1dbea
|
||||||
|
DIST rust-1.87.0_beta20250420-x86_64-unknown-linux-gnu.tar.xz 198552720 BLAKE2B 89ed8af9a09c7dd63833d91482f87b727b9597978318c7e66cec36afd1adaa13ed8ed6c87a2a5e118d8d1d0fc022e6cf8e3c6c79c92edf95162df9baf83aca04 SHA512 33b1df17bda04cf0b4dcd04337185dbd1b99bb440a0cfa2b6aaaf72257acb739e07f417ee56b691e32b8739016149a8bd5492cca8a84c0daeb92cfd9c5d4560a
|
||||||
|
DIST rust-1.87.0_beta20250420-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 45a0d818111946afc5e6544deea84d649175a0059f6a4574b7d7d2095ff008285ad09945f7e79b02331b13627da51cdea535cf80e4454248572a1fe5524489f2 SHA512 47d46d2c48cbe2a0b72278bf4e60483b889d83371ee35eb568809cd50d1e5058eee62f416e1ba3871016e0a2957be57a3716882eae41eb6c384510f4e523e3af
|
||||||
|
DIST rust-1.87.0_beta20250420-x86_64-unknown-linux-musl.tar.xz 293222552 BLAKE2B 167b847bb5f23de2ab1b918976c7abe8cfa9d98b51ffad52aa208d986c9e409f37f72114280dd61a255496502d92d22e0d26c233c4034214d5e9f1565ecd32f1 SHA512 535e5320e11e70b86213146803994b7bf15475c24aa2822cf9f193586b01e8d77de509d9ba08cd6892f43b2caf1c22c657c4a1949582bc10283a47fc014de2d6
|
||||||
|
DIST rust-1.87.0_beta20250420-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B e25674a14e3efdfd95fe2269c9848bd9c78a9f7819d35a6fa54abc50478250eaf1207249719d92b9d8fa104943a3129ff3045cd4e7039febf94ad483098796fd SHA512 f493ca8b9604350e93deec6b698086662b82b8b774d66b7090815755657111255710b04105bff9f72d9d83de0268cb34df4db9c184f1066a364d5c44dda3331f
|
||||||
DIST rust-src-1.71.1.tar.xz 2460244 BLAKE2B e3a5b5bfb808310f96e760aab55310c7a790fa551d248c9c5dbb407e0a80653563d8df73a9e0973aa63d3286aad6c755b78098dd8db2dc1a2ed3cadb926b40e1 SHA512 659cc46e1ece2ddbcf5ab748bae48843bd36353cc633b59e4ac062d843af66919e8d5c39ccb72ebdbf94a0e26a8056ade6bd1c8fe9a936469bd405122a8ae35d
|
DIST rust-src-1.71.1.tar.xz 2460244 BLAKE2B e3a5b5bfb808310f96e760aab55310c7a790fa551d248c9c5dbb407e0a80653563d8df73a9e0973aa63d3286aad6c755b78098dd8db2dc1a2ed3cadb926b40e1 SHA512 659cc46e1ece2ddbcf5ab748bae48843bd36353cc633b59e4ac062d843af66919e8d5c39ccb72ebdbf94a0e26a8056ade6bd1c8fe9a936469bd405122a8ae35d
|
||||||
DIST rust-src-1.74.1.tar.xz 2544036 BLAKE2B d95431b69f102782f51878ff73ce8802cac6dab7909497c3231d1c479b95dc2a618cc6efd8bac9c6bd59a2b10dc6be05199f1e1bd74e45cc640ee52352c29268 SHA512 11467d0936193c5a5be8c2eba1aefe2b7028af48494698863de2c4057d68ce33dcee1fc66dc2d68b1d32f0202ce49e9b906727849de8f8d904dd07930e76d5a4
|
DIST rust-src-1.74.1.tar.xz 2544036 BLAKE2B d95431b69f102782f51878ff73ce8802cac6dab7909497c3231d1c479b95dc2a618cc6efd8bac9c6bd59a2b10dc6be05199f1e1bd74e45cc640ee52352c29268 SHA512 11467d0936193c5a5be8c2eba1aefe2b7028af48494698863de2c4057d68ce33dcee1fc66dc2d68b1d32f0202ce49e9b906727849de8f8d904dd07930e76d5a4
|
||||||
DIST rust-src-1.75.0.tar.xz 2570256 BLAKE2B 9db7ccff07ffe6991233e9f530321fd6ba48c561dcf1226537afa70c7d045421d8e83c5300b0866ec6fccfaae96dd67b9f204e9e0e12108c0c766d467cd78909 SHA512 e7565cea2f1658a05237a698e38880df2544319b41b6d8b0805db5f1f94fd3bb4f986967d0440fcdfe3a135e33246f3c747665b964f57ff5942f56133af78cdd
|
DIST rust-src-1.75.0.tar.xz 2570256 BLAKE2B 9db7ccff07ffe6991233e9f530321fd6ba48c561dcf1226537afa70c7d045421d8e83c5300b0866ec6fccfaae96dd67b9f204e9e0e12108c0c766d467cd78909 SHA512 e7565cea2f1658a05237a698e38880df2544319b41b6d8b0805db5f1f94fd3bb4f986967d0440fcdfe3a135e33246f3c747665b964f57ff5942f56133af78cdd
|
||||||
@ -569,3 +597,4 @@ DIST rust-src-1.84.1.tar.xz 3016012 BLAKE2B c9edeaf0797a22e384c54b3fe3e7c833464c
|
|||||||
DIST rust-src-1.85.0.tar.xz 3036988 BLAKE2B b7281b23eef60cf052e1641a29915c02c590166a73e5ae75890072ce80f95a2ab71cead3e3da7adf757ec0352d1dcc87ba4c3070282a27657b34420fe24a0c16 SHA512 613cfa603dc457cee34b154acef9573d766ce5757c9e8342b13d362f2e62b4cee47071a59df9fd5fa42ecade1a9efdada5784402aaf7254d5996558533bff8db
|
DIST rust-src-1.85.0.tar.xz 3036988 BLAKE2B b7281b23eef60cf052e1641a29915c02c590166a73e5ae75890072ce80f95a2ab71cead3e3da7adf757ec0352d1dcc87ba4c3070282a27657b34420fe24a0c16 SHA512 613cfa603dc457cee34b154acef9573d766ce5757c9e8342b13d362f2e62b4cee47071a59df9fd5fa42ecade1a9efdada5784402aaf7254d5996558533bff8db
|
||||||
DIST rust-src-1.85.1.tar.xz 3036412 BLAKE2B f137ffcebd2d231d8b3dc5c9072f6afe39a071bc9608ac468bca364fafaa9c277b91e40da870a083c802cc13b9b876a548d7fa8ae67ad9552321a7412b7d8cd8 SHA512 d230cbb1daae3e2f5168abef94c5b99fb118c34a980f018d5df3e43f6ead4e0a17d6ea29bcfbcd0fb745e215f7a4d0282a99a714dba77b98a16254bb27c2d2ad
|
DIST rust-src-1.85.1.tar.xz 3036412 BLAKE2B f137ffcebd2d231d8b3dc5c9072f6afe39a071bc9608ac468bca364fafaa9c277b91e40da870a083c802cc13b9b876a548d7fa8ae67ad9552321a7412b7d8cd8 SHA512 d230cbb1daae3e2f5168abef94c5b99fb118c34a980f018d5df3e43f6ead4e0a17d6ea29bcfbcd0fb745e215f7a4d0282a99a714dba77b98a16254bb27c2d2ad
|
||||||
DIST rust-src-1.86.0.tar.xz 3053544 BLAKE2B 2d1d8a4be4f9dc9355ce9a2d1599e0a57c5d1cb32f7b2eb413f6009dbce7d63db2533dc038cf50f5277a2d7bf4434f2076632c12a6fd33335ccf3a9f2ab685d1 SHA512 2818d94412bb0766ce53383932cd8ce96275a8e923f916c4bf7116fbcb7c2053cfb9714667add1a9d50b18366c973ba3ab4fe55d49c8abc8cc57656635c59f63
|
DIST rust-src-1.86.0.tar.xz 3053544 BLAKE2B 2d1d8a4be4f9dc9355ce9a2d1599e0a57c5d1cb32f7b2eb413f6009dbce7d63db2533dc038cf50f5277a2d7bf4434f2076632c12a6fd33335ccf3a9f2ab685d1 SHA512 2818d94412bb0766ce53383932cd8ce96275a8e923f916c4bf7116fbcb7c2053cfb9714667add1a9d50b18366c973ba3ab4fe55d49c8abc8cc57656635c59f63
|
||||||
|
DIST rust-src-1.87.0_beta20250420.tar.xz 3118744 BLAKE2B 44c32b7b91c1b8440eaa64ec22422775fcc47581b0620bb51fcf738fa9e73ee938c40df578885db095cd4b442f50d972c2ec44c64a77a6093c7cf65bcee04a70 SHA512 cb08ad457250112c696e5ea82606ecf1f49d0196bfac81d743587458dc1c23a728afcd33c2651690a107c9fb45c15033648c2a7e0228aa00860b9b21b3b1e9a6
|
||||||
|
|||||||
@ -1,6 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||||
<pkgmetadata>
|
<pkgmetadata>
|
||||||
|
<maintainer type="project">
|
||||||
|
<email>rust@gentoo.org</email>
|
||||||
|
<name>Rust Project</name>
|
||||||
|
</maintainer>
|
||||||
<maintainer type="person" proxied="yes">
|
<maintainer type="person" proxied="yes">
|
||||||
<email>randy@electronsweatshop.com</email>
|
<email>randy@electronsweatshop.com</email>
|
||||||
<name>Randy Barlow</name>
|
<name>Randy Barlow</name>
|
||||||
@ -13,10 +17,6 @@
|
|||||||
<email>matoro_gentoo@matoro.tk</email>
|
<email>matoro_gentoo@matoro.tk</email>
|
||||||
<name>Matoro Mahri</name>
|
<name>Matoro Mahri</name>
|
||||||
</maintainer>
|
</maintainer>
|
||||||
<maintainer type="project">
|
|
||||||
<email>rust@gentoo.org</email>
|
|
||||||
<name>Rust Project</name>
|
|
||||||
</maintainer>
|
|
||||||
<use>
|
<use>
|
||||||
<flag name="clippy">Install clippy, Rust code linter</flag>
|
<flag name="clippy">Install clippy, Rust code linter</flag>
|
||||||
<flag name="rustfmt">Install rustfmt, Rust code formatter</flag>
|
<flag name="rustfmt">Install rustfmt, Rust code formatter</flag>
|
||||||
|
|||||||
@ -10,7 +10,7 @@ inherit llvm-r1 multilib prefix rust-toolchain verify-sig multilib-minimal
|
|||||||
|
|
||||||
MY_P="rust-${PV}-r101"
|
MY_P="rust-${PV}-r101"
|
||||||
# curl -L static.rust-lang.org/dist/channel-rust-${PV}.toml 2>/dev/null | grep "xz_url.*rust-src"
|
# curl -L static.rust-lang.org/dist/channel-rust-${PV}.toml 2>/dev/null | grep "xz_url.*rust-src"
|
||||||
MY_SRC_URI="${RUST_TOOLCHAIN_BASEURL%/}/2024-06-13/rust-src-${PV}.tar.xz"
|
MY_SRC_URI="${RUST_TOOLCHAIN_BASEURL%/}/2024-05-02/rust-src-${PV}.tar.xz"
|
||||||
GENTOO_BIN_BASEURI="https://github.com/projg2/rust-bootstrap/releases/download/${PV}-r101" # omit leading slash
|
GENTOO_BIN_BASEURI="https://github.com/projg2/rust-bootstrap/releases/download/${PV}-r101" # omit leading slash
|
||||||
|
|
||||||
DESCRIPTION="Systems programming language from Mozilla"
|
DESCRIPTION="Systems programming language from Mozilla"
|
||||||
|
|||||||
@ -27,7 +27,7 @@ else
|
|||||||
$(rust_arch_uri powerpc64le-unknown-linux-musl rust-${PV})
|
$(rust_arch_uri powerpc64le-unknown-linux-musl rust-${PV})
|
||||||
) ) )
|
) ) )
|
||||||
"
|
"
|
||||||
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DESCRIPTION="Systems programming language from Mozilla"
|
DESCRIPTION="Systems programming language from Mozilla"
|
||||||
|
|||||||
@ -70,6 +70,7 @@ RDEPEND="
|
|||||||
)
|
)
|
||||||
!dev-lang/rust:stable
|
!dev-lang/rust:stable
|
||||||
!dev-lang/rust-bin:stable
|
!dev-lang/rust-bin:stable
|
||||||
|
!dev-lang/rust-bin:1.86
|
||||||
"
|
"
|
||||||
BDEPEND="
|
BDEPEND="
|
||||||
prefix? ( dev-util/patchelf )
|
prefix? ( dev-util/patchelf )
|
||||||
|
|||||||
314
sdk_container/src/third_party/portage-stable/dev-lang/rust-bin/rust-bin-1.87.0_beta20250420.ebuild
vendored
Normal file
314
sdk_container/src/third_party/portage-stable/dev-lang/rust-bin/rust-bin-1.87.0_beta20250420.ebuild
vendored
Normal file
@ -0,0 +1,314 @@
|
|||||||
|
# Copyright 1999-2025 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
LLVM_COMPAT=( 20 )
|
||||||
|
LLVM_OPTIONAL="yes"
|
||||||
|
|
||||||
|
inherit edo llvm-r1 multilib prefix rust-toolchain verify-sig multilib-minimal optfeature
|
||||||
|
|
||||||
|
if [[ ${PV} == *9999* ]]; then
|
||||||
|
# We need to fetch a tarball in src_unpack
|
||||||
|
PROPERTIES+=" live"
|
||||||
|
elif [[ ${PV} == *beta* ]]; then
|
||||||
|
# curl -Ls static.rust-lang.org/dist/channel-rust-beta.toml | grep "xz_url.*rust-src"
|
||||||
|
betaver=${PV//*beta}
|
||||||
|
BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
|
||||||
|
RUST_TOOLCHAIN_BASEURL=https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/
|
||||||
|
SRC_URI="$(rust_all_arch_uris rust-beta rust-${PV})
|
||||||
|
rust-src? ( ${RUST_TOOLCHAIN_BASEURL%/}/rust-src-beta.tar.xz -> rust-src-${PV}.tar.xz )
|
||||||
|
"
|
||||||
|
else
|
||||||
|
# curl -Ls static.rust-lang.org/dist/channel-rust-${PV}.toml | grep "xz_url.*rust-src"
|
||||||
|
SRC_URI="$(rust_all_arch_uris "${PV}")
|
||||||
|
rust-src? ( ${RUST_TOOLCHAIN_BASEURL%/}/2025-01-30/rust-src-${PV}.tar.xz )
|
||||||
|
"
|
||||||
|
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||||
|
fi
|
||||||
|
|
||||||
|
GENTOO_BIN_BASEURI="https://github.com/projg2/rust-bootstrap/releases/download/${PVR}" # omit trailing slash
|
||||||
|
|
||||||
|
DESCRIPTION="Systems programming language from Mozilla"
|
||||||
|
HOMEPAGE="https://www.rust-lang.org/"
|
||||||
|
|
||||||
|
if [[ ${PV} != *9999* && ${PV} != *beta* ]] ; then
|
||||||
|
# Keep this separate to allow easy commenting out if not yet built
|
||||||
|
SRC_URI+=" sparc? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-sparc64-unknown-linux-gnu.tar.xz ) "
|
||||||
|
SRC_URI+=" mips? (
|
||||||
|
abi_mips_o32? (
|
||||||
|
big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-mips-unknown-linux-gnu.tar.xz )
|
||||||
|
!big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-mipsel-unknown-linux-gnu.tar.xz )
|
||||||
|
)
|
||||||
|
abi_mips_n64? (
|
||||||
|
big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-mips64-unknown-linux-gnuabi64.tar.xz )
|
||||||
|
!big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-mips64el-unknown-linux-gnuabi64.tar.xz )
|
||||||
|
)
|
||||||
|
)"
|
||||||
|
SRC_URI+=" riscv? (
|
||||||
|
elibc_musl? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-riscv64gc-unknown-linux-musl.tar.xz )
|
||||||
|
)"
|
||||||
|
SRC_URI+=" ppc64? ( elibc_musl? (
|
||||||
|
big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-powerpc64-unknown-linux-musl.tar.xz )
|
||||||
|
!big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-powerpc64le-unknown-linux-musl.tar.xz )
|
||||||
|
) )"
|
||||||
|
fi
|
||||||
|
|
||||||
|
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
|
||||||
|
SLOT="${PV%%_*}" # Beta releases get to share the same SLOT as the eventual stable
|
||||||
|
IUSE="big-endian clippy cpu_flags_x86_sse2 doc prefix rust-analyzer rust-src rustfmt"
|
||||||
|
|
||||||
|
RDEPEND="
|
||||||
|
>=app-eselect/eselect-rust-20190311
|
||||||
|
dev-libs/openssl
|
||||||
|
sys-apps/lsb-release
|
||||||
|
|| (
|
||||||
|
llvm-runtimes/libgcc
|
||||||
|
sys-devel/gcc:*
|
||||||
|
)
|
||||||
|
!dev-lang/rust:stable
|
||||||
|
!dev-lang/rust-bin:stable
|
||||||
|
"
|
||||||
|
BDEPEND="
|
||||||
|
prefix? ( dev-util/patchelf )
|
||||||
|
verify-sig? ( sec-keys/openpgp-keys-rust )
|
||||||
|
"
|
||||||
|
[[ ${PV} == *9999* ]] && BDEPEND+=" net-misc/curl"
|
||||||
|
|
||||||
|
REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )"
|
||||||
|
|
||||||
|
# stripping rust may break it (at least on x86_64)
|
||||||
|
# https://github.com/rust-lang/rust/issues/112286
|
||||||
|
RESTRICT="strip"
|
||||||
|
|
||||||
|
QA_PREBUILT="
|
||||||
|
opt/rust-bin-${SLOT}/bin/.*
|
||||||
|
opt/rust-bin-${SLOT}/lib/.*.so*
|
||||||
|
opt/rust-bin-${SLOT}/libexec/.*
|
||||||
|
opt/rust-bin-${SLOT}/lib/rustlib/.*/bin/.*
|
||||||
|
opt/rust-bin-${SLOT}/lib/rustlib/.*/lib/.*
|
||||||
|
"
|
||||||
|
|
||||||
|
# An rmeta file is custom binary format that contains the metadata for the crate.
|
||||||
|
# rmeta files do not support linking, since they do not contain compiled object files.
|
||||||
|
# so we can safely silence the warning for this QA check.
|
||||||
|
QA_EXECSTACK="opt/${P}/lib/rustlib/*/lib*.rlib:lib.rmeta"
|
||||||
|
|
||||||
|
VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/rust.asc"
|
||||||
|
|
||||||
|
src_unpack() {
|
||||||
|
if [[ ${PV} == *9999* ]]; then
|
||||||
|
# We need to fetch the latest nightly listing and get the apprapriate src_uri for our arch
|
||||||
|
local rust_bin_url rustc_src_url
|
||||||
|
# Cut down on webrequests by fetching the nightly toml once
|
||||||
|
curl -Ls static.rust-lang.org/dist/channel-rust-nightly.toml > "${WORKDIR}/channel-rust-nightly.toml" ||
|
||||||
|
die "Failed to fetch nightly revision info"
|
||||||
|
rustc_src_url=$(grep 'xz_url.*rust-src' "${WORKDIR}/channel-rust-nightly.toml" | cut -d '"' -f 2)
|
||||||
|
rust_bin_url=$(grep "xz_url.*rust-nightly-$(rust_abi)" "${WORKDIR}/channel-rust-nightly.toml" | cut -d '"' -f 2)
|
||||||
|
einfo "Using nightly Rust from: ${rust_bin_url}"
|
||||||
|
|
||||||
|
if use rust-src; then
|
||||||
|
einfo "Using nightly Rust-src from: ${rustc_src_url}"
|
||||||
|
# We need to fetch the rust-src tarball
|
||||||
|
einfo "Fetching nightly rust-src tarball ..."
|
||||||
|
curl --progress-bar -L "${rustc_src_url}" -o "${WORKDIR}/rust-src-${PV}.tar.xz" ||
|
||||||
|
die "Failed to fetch nightly rust-src tarball."
|
||||||
|
# no verify-sig here, just unpack it
|
||||||
|
tar -xf "${WORKDIR}/rust-src-${PV}.tar.xz" || die "Failed to unpack nightly rust-src tarball"
|
||||||
|
fi
|
||||||
|
|
||||||
|
einfo "Fetching nightly Rust tarball ..."
|
||||||
|
curl --progress-bar -L "${rust_bin_url}" -O || die "Failed to fetch nightly tarball"
|
||||||
|
if use verify-sig; then
|
||||||
|
einfo "Fetching nightly signature ..."
|
||||||
|
curl --progress-bar -L "${rust_bin_url}.asc" -O || die "Failed to fetch nightly signature"
|
||||||
|
verify-sig_verify_detached "${WORKDIR}/rust-nightly-$(rust_abi).tar.xz" \
|
||||||
|
"${WORKDIR}/rust-nightly-$(rust_abi).tar.xz.asc"
|
||||||
|
fi
|
||||||
|
tar -xf "${WORKDIR}/rust-nightly-$(rust_abi).tar.xz" || die "Failed to unpack nightly tarball"
|
||||||
|
else
|
||||||
|
# sadly rust-src tarball does not have corresponding .asc file
|
||||||
|
# so do partial verification
|
||||||
|
if use verify-sig; then
|
||||||
|
for f in ${A}; do
|
||||||
|
if [[ -f ${DISTDIR}/${f}.asc ]]; then
|
||||||
|
verify-sig_verify_detached "${DISTDIR}/${f}" "${DISTDIR}/${f}.asc"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
default_src_unpack
|
||||||
|
|
||||||
|
fi
|
||||||
|
case ${PV} in
|
||||||
|
*9999*)
|
||||||
|
mv "${WORKDIR}/rust-nightly-$(rust_abi)" "${S}" || die
|
||||||
|
;;
|
||||||
|
*beta*)
|
||||||
|
mv "${WORKDIR}/rust-beta-$(rust_abi)" "${S}" || die
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
mv "${WORKDIR}/rust-${PV}-$(rust_abi)" "${S}" || die
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
patchelf_for_bin() {
|
||||||
|
local filetype=$(file -b ${1})
|
||||||
|
if [[ ${filetype} == *ELF*interpreter* ]]; then
|
||||||
|
einfo "${1}'s interpreter changed"
|
||||||
|
patchelf ${1} --set-interpreter ${2} || die
|
||||||
|
elif [[ ${filetype} == *script* ]]; then
|
||||||
|
hprefixify ${1}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
rust_native_abi_install() {
|
||||||
|
pushd "${S}" >/dev/null || die
|
||||||
|
local analysis="$(grep 'analysis' ./components || die "analysis not found in components")"
|
||||||
|
local std="$(grep 'std' ./components || die "std not found in components")"
|
||||||
|
local components=( "rustc" "cargo" "${std}" )
|
||||||
|
use doc && components+=( "rust-docs" )
|
||||||
|
use clippy && components+=( "clippy-preview" )
|
||||||
|
use rustfmt && components+=( "rustfmt-preview" )
|
||||||
|
use rust-analyzer && components+=( "rust-analyzer-preview" "${analysis}" )
|
||||||
|
# Rust component 'rust-src' is extracted from separate archive
|
||||||
|
if use rust-src; then
|
||||||
|
einfo "Combining rust and rust-src installers"
|
||||||
|
case ${PV} in
|
||||||
|
*9999*)
|
||||||
|
mv -v "${WORKDIR}/rust-src-nightly/rust-src" "${S}" || die
|
||||||
|
;;
|
||||||
|
*beta*)
|
||||||
|
mv -v "${WORKDIR}/rust-src-beta/rust-src" "${S}" || die
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
mv -v "${WORKDIR}/rust-src-${PV}/rust-src" "${S}" || die
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
echo rust-src >> ./components || die
|
||||||
|
components+=( "rust-src" )
|
||||||
|
fi
|
||||||
|
edo ./install.sh \
|
||||||
|
--components="$(IFS=,; echo "${components[*]}")" \
|
||||||
|
--disable-verify \
|
||||||
|
--prefix="${ED}/opt/rust-bin-${SLOT}" \
|
||||||
|
--mandir="${ED}/opt/rust-bin-${SLOT}/man" \
|
||||||
|
--disable-ldconfig
|
||||||
|
|
||||||
|
docompress /opt/${P}/man/
|
||||||
|
|
||||||
|
if use prefix; then
|
||||||
|
local interpreter=$(patchelf --print-interpreter "${EPREFIX}"/bin/bash)
|
||||||
|
ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/${SLOT}/bin"
|
||||||
|
find "${ED}/opt/${SLOT}/bin" -type f -print0 | \
|
||||||
|
while IFS= read -r -d '' filename; do
|
||||||
|
patchelf_for_bin ${filename} ${interpreter} \; || die
|
||||||
|
done
|
||||||
|
eend $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
local symlinks=(
|
||||||
|
cargo
|
||||||
|
rustc
|
||||||
|
rustdoc
|
||||||
|
rust-gdb
|
||||||
|
rust-gdbgui
|
||||||
|
rust-lldb
|
||||||
|
)
|
||||||
|
|
||||||
|
use clippy && symlinks+=( clippy-driver cargo-clippy )
|
||||||
|
use rustfmt && symlinks+=( rustfmt cargo-fmt )
|
||||||
|
use rust-analyzer && symlinks+=( rust-analyzer )
|
||||||
|
|
||||||
|
einfo "installing eselect-rust symlinks and paths"
|
||||||
|
local i
|
||||||
|
for i in "${symlinks[@]}"; do
|
||||||
|
# we need realpath on /usr/bin/* symlink return version-appended binary path.
|
||||||
|
# so /usr/bin/rustc should point to /opt/rust-bin-<ver>/bin/rustc-<ver>
|
||||||
|
local ver_i="${i}-bin-${SLOT}"
|
||||||
|
ln -v "${ED}/opt/rust-bin-${SLOT}/bin/${i}" "${ED}/opt/rust-bin-${SLOT}/bin/${ver_i}" || die
|
||||||
|
dosym -r "/opt/rust-bin-${SLOT}/bin/${ver_i}" "/usr/bin/${ver_i}"
|
||||||
|
done
|
||||||
|
|
||||||
|
# symlinks to switch components to active rust in eselect
|
||||||
|
dosym -r "/opt/rust-bin-${SLOT}/lib" "/usr/lib/rust/lib-bin-${SLOT}"
|
||||||
|
dosym -r "/opt/rust-bin-${SLOT}/man" "/usr/lib/rust/man-bin-${SLOT}"
|
||||||
|
dosym -r "/opt/rust-bin-${SLOT}/lib/rustlib" "/usr/lib/rustlib-bin-${SLOT}"
|
||||||
|
dosym -r "/opt/rust-bin-${SLOT}/share/doc/rust" "/usr/share/doc/rust-bin-${SLOT}"
|
||||||
|
|
||||||
|
# make all capital underscored variable
|
||||||
|
local CARGO_TRIPLET="$(rust_abi)"
|
||||||
|
CARGO_TRIPLET="${CARGO_TRIPLET//-/_}"
|
||||||
|
CARGO_TRIPLET="${CARGO_TRIPLET^^}"
|
||||||
|
cat <<-_EOF_ > "${T}/50${P}"
|
||||||
|
MANPATH="${EPREFIX}/usr/lib/rust/man-bin-${SLOT}"
|
||||||
|
$(usev elibc_musl "CARGO_TARGET_${CARGO_TRIPLET}_RUSTFLAGS=\"-C target-feature=-crt-static\"")
|
||||||
|
_EOF_
|
||||||
|
doenvd "${T}/50${P}"
|
||||||
|
|
||||||
|
# note: eselect-rust adds EROOT to all paths below
|
||||||
|
cat <<-_EOF_ > "${T}/provider-${PN}-${SLOT}"
|
||||||
|
/usr/bin/cargo
|
||||||
|
/usr/bin/rustdoc
|
||||||
|
/usr/bin/rust-gdb
|
||||||
|
/usr/bin/rust-gdbgui
|
||||||
|
/usr/bin/rust-lldb
|
||||||
|
/usr/lib/rustlib
|
||||||
|
/usr/lib/rust/lib
|
||||||
|
/usr/lib/rust/man
|
||||||
|
/usr/share/doc/rust
|
||||||
|
_EOF_
|
||||||
|
|
||||||
|
if use clippy; then
|
||||||
|
echo /usr/bin/clippy-driver >> "${T}/provider-${PN}-${SLOT}"
|
||||||
|
echo /usr/bin/cargo-clippy >> "${T}/provider-${PN}-${SLOT}"
|
||||||
|
fi
|
||||||
|
if use rustfmt; then
|
||||||
|
echo /usr/bin/rustfmt >> "${T}/provider-${PN}-${SLOT}"
|
||||||
|
echo /usr/bin/cargo-fmt >> "${T}/provider-${PN}-${SLOT}"
|
||||||
|
fi
|
||||||
|
if use rust-analyzer; then
|
||||||
|
echo /usr/bin/rust-analyzer >> "${T}/provider-${PN}-${SLOT}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
insinto /etc/env.d/rust
|
||||||
|
doins "${T}/provider-${PN}-${SLOT}"
|
||||||
|
popd >/dev/null || die
|
||||||
|
}
|
||||||
|
|
||||||
|
multilib_src_install() {
|
||||||
|
if multilib_is_native_abi; then
|
||||||
|
rust_native_abi_install
|
||||||
|
else
|
||||||
|
local rust_target
|
||||||
|
rust_target="$(rust_abi $(get_abi_CHOST ${v##*.}))"
|
||||||
|
dodir "/opt/${P}/lib/rustlib"
|
||||||
|
cp -vr "${WORKDIR}/rust-${PV}-${rust_target}/rust-std-${rust_target}/lib/rustlib/${rust_target}"\
|
||||||
|
"${ED}/opt/${P}/lib/rustlib" || die
|
||||||
|
fi
|
||||||
|
|
||||||
|
# BUG: installs x86_64 binary on other arches
|
||||||
|
rm -f "${ED}/opt/${P}/lib/rustlib/"*/bin/rust-llvm-dwp || die
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
eselect rust update
|
||||||
|
|
||||||
|
if has_version dev-debug/gdb || has_version llvm-core/lldb; then
|
||||||
|
elog "Rust installs helper scripts for calling GDB and LLDB,"
|
||||||
|
elog "for convenience they are installed under /usr/bin/rust-{gdb,lldb}-${PV}."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if has_version app-editors/emacs; then
|
||||||
|
optfeature "emacs support for rust" app-emacs/rust-mode
|
||||||
|
fi
|
||||||
|
|
||||||
|
if has_version app-editors/gvim || has_version app-editors/vim; then
|
||||||
|
optfeature "vim support for rust" app-vim/rust-vim
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postrm() {
|
||||||
|
eselect rust cleanup
|
||||||
|
}
|
||||||
@ -10,3 +10,5 @@ DIST rustc-1.85.1-src.tar.xz 274028992 BLAKE2B 1dddbbc0d14fe9551fd2eb59a47521ac7
|
|||||||
DIST rustc-1.85.1-src.tar.xz.asc 801 BLAKE2B 07409ef6c044b72394a28dfd5b5decb237ca540714010a4f81e4213a3bf7ffb2e14029789f930cea0dab115a6e986859f6cdefd3798be780c2ff21c3e5fa6593 SHA512 7f19653fd05c89390a4073f5184ca162863b7116cc4d8867a5aa4304568880707ebb9f9dda166d7d04f30b2df6ed223eedd98df1744f809773054edfcd2385ff
|
DIST rustc-1.85.1-src.tar.xz.asc 801 BLAKE2B 07409ef6c044b72394a28dfd5b5decb237ca540714010a4f81e4213a3bf7ffb2e14029789f930cea0dab115a6e986859f6cdefd3798be780c2ff21c3e5fa6593 SHA512 7f19653fd05c89390a4073f5184ca162863b7116cc4d8867a5aa4304568880707ebb9f9dda166d7d04f30b2df6ed223eedd98df1744f809773054edfcd2385ff
|
||||||
DIST rustc-1.86.0-src.tar.xz 275696736 BLAKE2B 9f33a710a3e567d92f56091920643f5ef2ddf2ad52acb5d9ee78496a7b5dbc10da5a51c72cf2a6f66d543a531d3138a49767c98501ae4e885e03988d2ccfbb59 SHA512 9ce195e24a03765f7163de16271e3d19d731d4b80fcc2bfd919106c9d42543eade018f712f6947ea3c6e57c6cb2e6841596aa668d608b8da15101a7da14f3097
|
DIST rustc-1.86.0-src.tar.xz 275696736 BLAKE2B 9f33a710a3e567d92f56091920643f5ef2ddf2ad52acb5d9ee78496a7b5dbc10da5a51c72cf2a6f66d543a531d3138a49767c98501ae4e885e03988d2ccfbb59 SHA512 9ce195e24a03765f7163de16271e3d19d731d4b80fcc2bfd919106c9d42543eade018f712f6947ea3c6e57c6cb2e6841596aa668d608b8da15101a7da14f3097
|
||||||
DIST rustc-1.86.0-src.tar.xz.asc 801 BLAKE2B 3e10a3894c7eee68d37bc5707d797548119f830667e27e652a199d13633199713bd01bd0f41a5f2af3c682561903e36abe27b36ef78d9a1d65bdf485527d2c15 SHA512 0b74dab9ee56d0a08e26e9cd40f722e4d99de63ac678f969f0c54d50737074fb28e170db5a36ce2627ec332e5ce3bb8a92167aefbccff7c70e4cb057bc0a94ac
|
DIST rustc-1.86.0-src.tar.xz.asc 801 BLAKE2B 3e10a3894c7eee68d37bc5707d797548119f830667e27e652a199d13633199713bd01bd0f41a5f2af3c682561903e36abe27b36ef78d9a1d65bdf485527d2c15 SHA512 0b74dab9ee56d0a08e26e9cd40f722e4d99de63ac678f969f0c54d50737074fb28e170db5a36ce2627ec332e5ce3bb8a92167aefbccff7c70e4cb057bc0a94ac
|
||||||
|
DIST rustc-1.87.0_beta20250420-src.tar.xz 283544556 BLAKE2B 70a59c7d695e881a4e21d500f19b7d83e3a86bc8d5dfaaaa28a4cd4631b12937a2743119e3181e84af7b348386c672f4e62675da8cfb399095fcdda527b072e0 SHA512 37e62954c21b0d5c232dca1d0fe476b165eb63b7315c1fcaa18068707f4fd00e2def09968ee1d243f62cb3eae3fbb4381493b8505179342705998dce08e23afe
|
||||||
|
DIST rustc-1.87.0_beta20250420-src.tar.xz.asc 801 BLAKE2B c0ed0686d3bc612e8b0edb96817928107905220328af81d2f9200552c3edb58d98ae8844f01b7dd20e59e6c0a173f6da11b2cd58d0c3b5d5f0bd8290528ea86c SHA512 e2e694feec13d8fb8d9b50442c0c2e3de5cef0a249730c945124880220e44d481b2109098c5a8479f765384a4298e293e63743c924e0866ed2e5aece3a35c98f
|
||||||
|
|||||||
@ -32,7 +32,7 @@ else
|
|||||||
verify-sig? ( https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz.asc )
|
verify-sig? ( https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz.asc )
|
||||||
"
|
"
|
||||||
S="${WORKDIR}/rustc-${MY_PV}-src"
|
S="${WORKDIR}/rustc-${MY_PV}-src"
|
||||||
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
|
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
|
||||||
|
|||||||
@ -0,0 +1,73 @@
|
|||||||
|
# Copyright 1999-2025 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
|
||||||
|
inherit shell-completion verify-sig
|
||||||
|
|
||||||
|
DESCRIPTION="Common files shared between multiple slots of Rust"
|
||||||
|
HOMEPAGE="https://www.rust-lang.org/"
|
||||||
|
|
||||||
|
if [[ ${PV} = *9999* ]]; then
|
||||||
|
inherit git-r3
|
||||||
|
# In case cargo is not in sync we'll fetch it as a submodule
|
||||||
|
# Nightly users will probably already have the repo cloned and up-to-date anyway.
|
||||||
|
EGIT_REPO_URI="https://github.com/rust-lang/rust.git"
|
||||||
|
EGIT_SUBMODULES=( "-*" "src/tools/cargo" )
|
||||||
|
elif [[ ${PV} == *beta* ]]; then
|
||||||
|
# Identify the snapshot date of the beta release:
|
||||||
|
# curl -Ls static.rust-lang.org/dist/channel-rust-beta.toml | grep beta-src.tar.xz
|
||||||
|
MY_PV=beta
|
||||||
|
betaver=${PV//*beta}
|
||||||
|
BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
|
||||||
|
SRC_URI="https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz
|
||||||
|
verify-sig? ( https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz.asc
|
||||||
|
-> rustc-${PV}-src.tar.xz.asc )
|
||||||
|
"
|
||||||
|
S="${WORKDIR}/rustc-${MY_PV}-src"
|
||||||
|
else
|
||||||
|
MY_PV=${PV}
|
||||||
|
SRC_URI="https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz
|
||||||
|
verify-sig? ( https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz.asc )
|
||||||
|
"
|
||||||
|
S="${WORKDIR}/rustc-${MY_PV}-src"
|
||||||
|
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
||||||
|
fi
|
||||||
|
|
||||||
|
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
|
||||||
|
SLOT="0"
|
||||||
|
|
||||||
|
# Legacy non-slotted versions bash completions will collide.
|
||||||
|
RDEPEND="
|
||||||
|
!dev-lang/rust:stable
|
||||||
|
!dev-lang/rust-bin:stable
|
||||||
|
"
|
||||||
|
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-rust )"
|
||||||
|
|
||||||
|
src_unpack() {
|
||||||
|
if [[ ${PV} == *9999* ]]; then
|
||||||
|
git-r3_src_unpack
|
||||||
|
else
|
||||||
|
if use verify-sig ; then
|
||||||
|
verify-sig_verify_detached "${DISTDIR}"/rustc-${PV}-src.tar.xz "${DISTDIR}"/rustc-${PV}-src.tar.xz.asc
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Avoid unpacking the whole tarball which would need check-reqs
|
||||||
|
tar -xf "${DISTDIR}"/rustc-${PV}-src.tar.xz \
|
||||||
|
"rustc-${MY_PV}-src/src/tools/cargo/src/etc/"{_cargo,cargo.bashcomp.sh} || die
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
:
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
:
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
|
||||||
|
dozshcomp src/tools/cargo/src/etc/_cargo
|
||||||
|
}
|
||||||
@ -30,3 +30,5 @@ DIST rustc-1.85.1-src.tar.xz 274028992 BLAKE2B 1dddbbc0d14fe9551fd2eb59a47521ac7
|
|||||||
DIST rustc-1.85.1-src.tar.xz.asc 801 BLAKE2B 07409ef6c044b72394a28dfd5b5decb237ca540714010a4f81e4213a3bf7ffb2e14029789f930cea0dab115a6e986859f6cdefd3798be780c2ff21c3e5fa6593 SHA512 7f19653fd05c89390a4073f5184ca162863b7116cc4d8867a5aa4304568880707ebb9f9dda166d7d04f30b2df6ed223eedd98df1744f809773054edfcd2385ff
|
DIST rustc-1.85.1-src.tar.xz.asc 801 BLAKE2B 07409ef6c044b72394a28dfd5b5decb237ca540714010a4f81e4213a3bf7ffb2e14029789f930cea0dab115a6e986859f6cdefd3798be780c2ff21c3e5fa6593 SHA512 7f19653fd05c89390a4073f5184ca162863b7116cc4d8867a5aa4304568880707ebb9f9dda166d7d04f30b2df6ed223eedd98df1744f809773054edfcd2385ff
|
||||||
DIST rustc-1.86.0-src.tar.xz 275696736 BLAKE2B 9f33a710a3e567d92f56091920643f5ef2ddf2ad52acb5d9ee78496a7b5dbc10da5a51c72cf2a6f66d543a531d3138a49767c98501ae4e885e03988d2ccfbb59 SHA512 9ce195e24a03765f7163de16271e3d19d731d4b80fcc2bfd919106c9d42543eade018f712f6947ea3c6e57c6cb2e6841596aa668d608b8da15101a7da14f3097
|
DIST rustc-1.86.0-src.tar.xz 275696736 BLAKE2B 9f33a710a3e567d92f56091920643f5ef2ddf2ad52acb5d9ee78496a7b5dbc10da5a51c72cf2a6f66d543a531d3138a49767c98501ae4e885e03988d2ccfbb59 SHA512 9ce195e24a03765f7163de16271e3d19d731d4b80fcc2bfd919106c9d42543eade018f712f6947ea3c6e57c6cb2e6841596aa668d608b8da15101a7da14f3097
|
||||||
DIST rustc-1.86.0-src.tar.xz.asc 801 BLAKE2B 3e10a3894c7eee68d37bc5707d797548119f830667e27e652a199d13633199713bd01bd0f41a5f2af3c682561903e36abe27b36ef78d9a1d65bdf485527d2c15 SHA512 0b74dab9ee56d0a08e26e9cd40f722e4d99de63ac678f969f0c54d50737074fb28e170db5a36ce2627ec332e5ce3bb8a92167aefbccff7c70e4cb057bc0a94ac
|
DIST rustc-1.86.0-src.tar.xz.asc 801 BLAKE2B 3e10a3894c7eee68d37bc5707d797548119f830667e27e652a199d13633199713bd01bd0f41a5f2af3c682561903e36abe27b36ef78d9a1d65bdf485527d2c15 SHA512 0b74dab9ee56d0a08e26e9cd40f722e4d99de63ac678f969f0c54d50737074fb28e170db5a36ce2627ec332e5ce3bb8a92167aefbccff7c70e4cb057bc0a94ac
|
||||||
|
DIST rustc-1.87.0_beta20250420-src.tar.xz 283544556 BLAKE2B 70a59c7d695e881a4e21d500f19b7d83e3a86bc8d5dfaaaa28a4cd4631b12937a2743119e3181e84af7b348386c672f4e62675da8cfb399095fcdda527b072e0 SHA512 37e62954c21b0d5c232dca1d0fe476b165eb63b7315c1fcaa18068707f4fd00e2def09968ee1d243f62cb3eae3fbb4381493b8505179342705998dce08e23afe
|
||||||
|
DIST rustc-1.87.0_beta20250420-src.tar.xz.asc 801 BLAKE2B c0ed0686d3bc612e8b0edb96817928107905220328af81d2f9200552c3edb58d98ae8844f01b7dd20e59e6c0a173f6da11b2cd58d0c3b5d5f0bd8290528ea86c SHA512 e2e694feec13d8fb8d9b50442c0c2e3de5cef0a249730c945124880220e44d481b2109098c5a8479f765384a4298e293e63743c924e0866ed2e5aece3a35c98f
|
||||||
|
|||||||
@ -1,156 +0,0 @@
|
|||||||
This patch bumps all libc dependencies and checksums to 0.2.146, which includes the fix for musl 1.2.4.
|
|
||||||
|
|
||||||
--- a/vendor/addr2line-0.20.0/Cargo.lock
|
|
||||||
+++ b/vendor/addr2line-0.20.0/Cargo.lock
|
|
||||||
@@ -246,9 +246,9 @@ checksum = "e2abad23fbc42b3700f2f279844d
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "libc"
|
|
||||||
-version = "0.2.141"
|
|
||||||
+version = "0.2.146"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
|
|
||||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "libtest-mimic"
|
|
||||||
--- a/vendor/backtrace-0.3.67/Cargo.lock
|
|
||||||
+++ b/vendor/backtrace-0.3.67/Cargo.lock
|
|
||||||
@@ -64,9 +64,9 @@ checksum = "dec7af912d60cdbd3677c1af9352
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "libc"
|
|
||||||
-version = "0.2.138"
|
|
||||||
+version = "0.2.146"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
-checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8"
|
|
||||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "libloading"
|
|
||||||
--- a/vendor/bstr/Cargo.lock
|
|
||||||
+++ b/vendor/bstr/Cargo.lock
|
|
||||||
@@ -34,9 +34,9 @@ dependencies = [
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "libc"
|
|
||||||
-version = "0.2.138"
|
|
||||||
+version = "0.2.146"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
-checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8"
|
|
||||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "memchr"
|
|
||||||
--- a/vendor/cranelift-jit/Cargo.lock
|
|
||||||
+++ b/vendor/cranelift-jit/Cargo.lock
|
|
||||||
@@ -224,9 +224,9 @@ dependencies = [
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "libc"
|
|
||||||
-version = "0.2.141"
|
|
||||||
+version = "0.2.146"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
|
|
||||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "log"
|
|
||||||
--- a/vendor/crossbeam-channel/Cargo.lock
|
|
||||||
+++ b/vendor/crossbeam-channel/Cargo.lock
|
|
||||||
@@ -50,9 +50,9 @@ dependencies = [
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "libc"
|
|
||||||
-version = "0.2.141"
|
|
||||||
+version = "0.2.146"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
|
|
||||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "num_cpus"
|
|
||||||
--- a/vendor/elasticlunr-rs/Cargo.lock
|
|
||||||
+++ b/vendor/elasticlunr-rs/Cargo.lock
|
|
||||||
@@ -555,9 +555,9 @@ checksum = "e2abad23fbc42b3700f2f279844d
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "libc"
|
|
||||||
-version = "0.2.140"
|
|
||||||
+version = "0.2.146"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
-checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
|
|
||||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "lindera"
|
|
||||||
--- a/vendor/handlebars/Cargo.lock
|
|
||||||
+++ b/vendor/handlebars/Cargo.lock
|
|
||||||
@@ -550,9 +550,9 @@ checksum = "e2abad23fbc42b3700f2f279844d
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "libc"
|
|
||||||
-version = "0.2.140"
|
|
||||||
+version = "0.2.146"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
-checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
|
|
||||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "lock_api"
|
|
||||||
--- a/vendor/icu_locid/Cargo.lock
|
|
||||||
+++ b/vendor/icu_locid/Cargo.lock
|
|
||||||
@@ -318,9 +318,9 @@ checksum = "e2abad23fbc42b3700f2f279844d
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "libc"
|
|
||||||
-version = "0.2.141"
|
|
||||||
+version = "0.2.146"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
|
|
||||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "litemap"
|
|
||||||
--- a/vendor/libffi/Cargo.lock
|
|
||||||
+++ b/vendor/libffi/Cargo.lock
|
|
||||||
@@ -10,9 +10,9 @@ checksum = "50d30906286121d95be3d479533b
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "libc"
|
|
||||||
-version = "0.2.140"
|
|
||||||
+version = "0.2.146"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
-checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
|
|
||||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "libffi"
|
|
||||||
--- a/vendor/terminal_size/Cargo.lock
|
|
||||||
+++ b/vendor/terminal_size/Cargo.lock
|
|
||||||
@@ -47,9 +47,9 @@ dependencies = [
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "libc"
|
|
||||||
-version = "0.2.140"
|
|
||||||
+version = "0.2.146"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
-checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
|
|
||||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "linux-raw-sys"
|
|
||||||
--- a/vendor/tracing-tree/Cargo.lock
|
|
||||||
+++ b/vendor/tracing-tree/Cargo.lock
|
|
||||||
@@ -100,9 +100,9 @@ checksum = "e2abad23fbc42b3700f2f279844d
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "libc"
|
|
||||||
-version = "0.2.141"
|
|
||||||
+version = "0.2.146"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
|
|
||||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "log"
|
|
||||||
@ -1,6 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||||
<pkgmetadata>
|
<pkgmetadata>
|
||||||
|
<maintainer type="project">
|
||||||
|
<email>rust@gentoo.org</email>
|
||||||
|
<name>Rust Project</name>
|
||||||
|
</maintainer>
|
||||||
<maintainer type="person" proxied="yes">
|
<maintainer type="person" proxied="yes">
|
||||||
<email>randy@electronsweatshop.com</email>
|
<email>randy@electronsweatshop.com</email>
|
||||||
<name>Randy Barlow</name>
|
<name>Randy Barlow</name>
|
||||||
@ -13,10 +17,6 @@
|
|||||||
<email>matoro_gentoo@matoro.tk</email>
|
<email>matoro_gentoo@matoro.tk</email>
|
||||||
<name>Matoro Mahri</name>
|
<name>Matoro Mahri</name>
|
||||||
</maintainer>
|
</maintainer>
|
||||||
<maintainer type="project">
|
|
||||||
<email>rust@gentoo.org</email>
|
|
||||||
<name>Rust Project</name>
|
|
||||||
</maintainer>
|
|
||||||
<use>
|
<use>
|
||||||
<flag name="clippy">Install clippy, Rust code linter</flag>
|
<flag name="clippy">Install clippy, Rust code linter</flag>
|
||||||
<flag name="dist">Install dist tarballs (used for bootstrapping)</flag>
|
<flag name="dist">Install dist tarballs (used for bootstrapping)</flag>
|
||||||
|
|||||||
@ -153,7 +153,6 @@ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
|
|||||||
|
|
||||||
PATCHES=(
|
PATCHES=(
|
||||||
"${FILESDIR}"/1.74.1-cross-compile-libz.patch
|
"${FILESDIR}"/1.74.1-cross-compile-libz.patch
|
||||||
#"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch # pending refresh
|
|
||||||
"${FILESDIR}"/1.70.0-ignore-broken-and-non-applicable-tests.patch
|
"${FILESDIR}"/1.70.0-ignore-broken-and-non-applicable-tests.patch
|
||||||
"${FILESDIR}"/1.62.1-musl-dynamic-linking.patch
|
"${FILESDIR}"/1.62.1-musl-dynamic-linking.patch
|
||||||
"${FILESDIR}"/1.67.0-doc-wasm.patch
|
"${FILESDIR}"/1.67.0-doc-wasm.patch
|
||||||
|
|||||||
@ -143,7 +143,6 @@ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
|
|||||||
PATCHES=(
|
PATCHES=(
|
||||||
"${FILESDIR}"/1.75.0-musl-dynamic-linking.patch
|
"${FILESDIR}"/1.75.0-musl-dynamic-linking.patch
|
||||||
"${FILESDIR}"/1.74.1-cross-compile-libz.patch
|
"${FILESDIR}"/1.74.1-cross-compile-libz.patch
|
||||||
#"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch # pending refresh
|
|
||||||
"${FILESDIR}"/1.70.0-ignore-broken-and-non-applicable-tests.patch
|
"${FILESDIR}"/1.70.0-ignore-broken-and-non-applicable-tests.patch
|
||||||
"${FILESDIR}"/1.67.0-doc-wasm.patch
|
"${FILESDIR}"/1.67.0-doc-wasm.patch
|
||||||
# This patch shouldn't be necessary for later versions of Rust because its
|
# This patch shouldn't be necessary for later versions of Rust because its
|
||||||
|
|||||||
@ -143,7 +143,6 @@ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
|
|||||||
PATCHES=(
|
PATCHES=(
|
||||||
"${FILESDIR}"/1.75.0-musl-dynamic-linking.patch
|
"${FILESDIR}"/1.75.0-musl-dynamic-linking.patch
|
||||||
"${FILESDIR}"/1.74.1-cross-compile-libz.patch
|
"${FILESDIR}"/1.74.1-cross-compile-libz.patch
|
||||||
#"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch # pending refresh
|
|
||||||
"${FILESDIR}"/1.70.0-ignore-broken-and-non-applicable-tests.patch
|
"${FILESDIR}"/1.70.0-ignore-broken-and-non-applicable-tests.patch
|
||||||
"${FILESDIR}"/1.67.0-doc-wasm.patch
|
"${FILESDIR}"/1.67.0-doc-wasm.patch
|
||||||
"${FILESDIR}"/1.75.0-handle-vendored-sources.patch
|
"${FILESDIR}"/1.75.0-handle-vendored-sources.patch
|
||||||
|
|||||||
@ -143,7 +143,6 @@ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
|
|||||||
PATCHES=(
|
PATCHES=(
|
||||||
"${FILESDIR}"/1.75.0-musl-dynamic-linking.patch
|
"${FILESDIR}"/1.75.0-musl-dynamic-linking.patch
|
||||||
"${FILESDIR}"/1.74.1-cross-compile-libz.patch
|
"${FILESDIR}"/1.74.1-cross-compile-libz.patch
|
||||||
#"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch # pending refresh
|
|
||||||
"${FILESDIR}"/1.70.0-ignore-broken-and-non-applicable-tests.patch
|
"${FILESDIR}"/1.70.0-ignore-broken-and-non-applicable-tests.patch
|
||||||
"${FILESDIR}"/1.67.0-doc-wasm.patch
|
"${FILESDIR}"/1.67.0-doc-wasm.patch
|
||||||
"${FILESDIR}"/1.76.0-loong-code-model.patch # remove for >=1.78.0
|
"${FILESDIR}"/1.76.0-loong-code-model.patch # remove for >=1.78.0
|
||||||
|
|||||||
@ -143,7 +143,6 @@ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
|
|||||||
PATCHES=(
|
PATCHES=(
|
||||||
"${FILESDIR}"/1.78.0-musl-dynamic-linking.patch
|
"${FILESDIR}"/1.78.0-musl-dynamic-linking.patch
|
||||||
"${FILESDIR}"/1.74.1-cross-compile-libz.patch
|
"${FILESDIR}"/1.74.1-cross-compile-libz.patch
|
||||||
#"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch # pending refresh
|
|
||||||
"${FILESDIR}"/1.78.0-ignore-broken-and-non-applicable-tests.patch
|
"${FILESDIR}"/1.78.0-ignore-broken-and-non-applicable-tests.patch
|
||||||
"${FILESDIR}"/1.67.0-doc-wasm.patch
|
"${FILESDIR}"/1.67.0-doc-wasm.patch
|
||||||
"${FILESDIR}"/1.79.0-revert-8c40426.patch
|
"${FILESDIR}"/1.79.0-revert-8c40426.patch
|
||||||
|
|||||||
@ -143,7 +143,6 @@ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
|
|||||||
PATCHES=(
|
PATCHES=(
|
||||||
"${FILESDIR}"/1.78.0-musl-dynamic-linking.patch
|
"${FILESDIR}"/1.78.0-musl-dynamic-linking.patch
|
||||||
"${FILESDIR}"/1.74.1-cross-compile-libz.patch
|
"${FILESDIR}"/1.74.1-cross-compile-libz.patch
|
||||||
#"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch # pending refresh
|
|
||||||
"${FILESDIR}"/1.78.0-ignore-broken-and-non-applicable-tests.patch
|
"${FILESDIR}"/1.78.0-ignore-broken-and-non-applicable-tests.patch
|
||||||
"${FILESDIR}"/1.67.0-doc-wasm.patch
|
"${FILESDIR}"/1.67.0-doc-wasm.patch
|
||||||
"${FILESDIR}"/1.79.0-revert-8c40426.patch
|
"${FILESDIR}"/1.79.0-revert-8c40426.patch
|
||||||
|
|||||||
@ -143,7 +143,6 @@ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
|
|||||||
PATCHES=(
|
PATCHES=(
|
||||||
"${FILESDIR}"/1.78.0-musl-dynamic-linking.patch
|
"${FILESDIR}"/1.78.0-musl-dynamic-linking.patch
|
||||||
"${FILESDIR}"/1.74.1-cross-compile-libz.patch
|
"${FILESDIR}"/1.74.1-cross-compile-libz.patch
|
||||||
#"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch # pending refresh
|
|
||||||
"${FILESDIR}"/1.67.0-doc-wasm.patch
|
"${FILESDIR}"/1.67.0-doc-wasm.patch
|
||||||
"${FILESDIR}"/1.79.0-revert-8c40426.patch
|
"${FILESDIR}"/1.79.0-revert-8c40426.patch
|
||||||
)
|
)
|
||||||
|
|||||||
@ -144,7 +144,6 @@ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
|
|||||||
PATCHES=(
|
PATCHES=(
|
||||||
"${FILESDIR}"/1.78.0-musl-dynamic-linking.patch
|
"${FILESDIR}"/1.78.0-musl-dynamic-linking.patch
|
||||||
"${FILESDIR}"/1.74.1-cross-compile-libz.patch
|
"${FILESDIR}"/1.74.1-cross-compile-libz.patch
|
||||||
#"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch # pending refresh
|
|
||||||
"${FILESDIR}"/1.67.0-doc-wasm.patch
|
"${FILESDIR}"/1.67.0-doc-wasm.patch
|
||||||
"${FILESDIR}"/1.79.0-revert-8c40426.patch
|
"${FILESDIR}"/1.79.0-revert-8c40426.patch
|
||||||
"${FILESDIR}/1.81.0-backport-bug937164.patch"
|
"${FILESDIR}/1.81.0-backport-bug937164.patch"
|
||||||
|
|||||||
@ -143,7 +143,6 @@ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
|
|||||||
PATCHES=(
|
PATCHES=(
|
||||||
"${FILESDIR}"/1.78.0-musl-dynamic-linking.patch
|
"${FILESDIR}"/1.78.0-musl-dynamic-linking.patch
|
||||||
"${FILESDIR}"/1.74.1-cross-compile-libz.patch
|
"${FILESDIR}"/1.74.1-cross-compile-libz.patch
|
||||||
#"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch # pending refresh
|
|
||||||
"${FILESDIR}"/1.67.0-doc-wasm.patch
|
"${FILESDIR}"/1.67.0-doc-wasm.patch
|
||||||
"${FILESDIR}"/1.82.0-dwarf-llvm-assertion.patch
|
"${FILESDIR}"/1.82.0-dwarf-llvm-assertion.patch
|
||||||
)
|
)
|
||||||
|
|||||||
@ -143,7 +143,6 @@ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
|
|||||||
PATCHES=(
|
PATCHES=(
|
||||||
"${FILESDIR}"/1.78.0-musl-dynamic-linking.patch
|
"${FILESDIR}"/1.78.0-musl-dynamic-linking.patch
|
||||||
"${FILESDIR}"/1.83.0-cross-compile-libz.patch
|
"${FILESDIR}"/1.83.0-cross-compile-libz.patch
|
||||||
#"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch # pending refresh
|
|
||||||
"${FILESDIR}"/1.67.0-doc-wasm.patch
|
"${FILESDIR}"/1.67.0-doc-wasm.patch
|
||||||
"${FILESDIR}"/1.83.0-dwarf-llvm-assertion.patch
|
"${FILESDIR}"/1.83.0-dwarf-llvm-assertion.patch
|
||||||
)
|
)
|
||||||
|
|||||||
@ -68,7 +68,12 @@ BDEPEND="${PYTHON_DEPS}
|
|||||||
>=sys-devel/gcc-4.7[cxx]
|
>=sys-devel/gcc-4.7[cxx]
|
||||||
>=llvm-core/clang-3.5
|
>=llvm-core/clang-3.5
|
||||||
)
|
)
|
||||||
lto? ( system-llvm? ( $(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}') ) )
|
lto? ( system-llvm? (
|
||||||
|
|| (
|
||||||
|
$(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}')
|
||||||
|
sys-devel/mold
|
||||||
|
)
|
||||||
|
) )
|
||||||
!system-llvm? (
|
!system-llvm? (
|
||||||
>=dev-build/cmake-3.13.4
|
>=dev-build/cmake-3.13.4
|
||||||
app-alternatives/ninja
|
app-alternatives/ninja
|
||||||
@ -144,7 +149,6 @@ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
|
|||||||
PATCHES=(
|
PATCHES=(
|
||||||
"${FILESDIR}"/1.78.0-musl-dynamic-linking.patch
|
"${FILESDIR}"/1.78.0-musl-dynamic-linking.patch
|
||||||
"${FILESDIR}"/1.83.0-cross-compile-libz.patch
|
"${FILESDIR}"/1.83.0-cross-compile-libz.patch
|
||||||
#"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch # pending refresh
|
|
||||||
"${FILESDIR}"/1.67.0-doc-wasm.patch
|
"${FILESDIR}"/1.67.0-doc-wasm.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -235,7 +239,7 @@ src_prepare() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if use lto && tc-is-clang && ! tc-ld-is-lld; then
|
if use lto && tc-is-clang && ! tc-ld-is-lld && ! tc-ld-is-mold; then
|
||||||
export RUSTFLAGS+=" -C link-arg=-fuse-ld=lld"
|
export RUSTFLAGS+=" -C link-arg=-fuse-ld=lld"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -391,7 +395,7 @@ src_configure() {
|
|||||||
dist-src = false
|
dist-src = false
|
||||||
remap-debuginfo = true
|
remap-debuginfo = true
|
||||||
lld = $(usex system-llvm false $(toml_usex wasm))
|
lld = $(usex system-llvm false $(toml_usex wasm))
|
||||||
$(if use lto && tc-is-clang ; then
|
$(if use lto && tc-is-clang && ! tc-ld-is-mold; then
|
||||||
echo "use-lld = true"
|
echo "use-lld = true"
|
||||||
fi)
|
fi)
|
||||||
# only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
|
# only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
|
||||||
|
|||||||
@ -68,7 +68,12 @@ BDEPEND="${PYTHON_DEPS}
|
|||||||
>=sys-devel/gcc-4.7[cxx]
|
>=sys-devel/gcc-4.7[cxx]
|
||||||
>=llvm-core/clang-3.5
|
>=llvm-core/clang-3.5
|
||||||
)
|
)
|
||||||
lto? ( system-llvm? ( $(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}') ) )
|
lto? ( system-llvm? (
|
||||||
|
|| (
|
||||||
|
$(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}')
|
||||||
|
sys-devel/mold
|
||||||
|
)
|
||||||
|
) )
|
||||||
!system-llvm? (
|
!system-llvm? (
|
||||||
>=dev-build/cmake-3.13.4
|
>=dev-build/cmake-3.13.4
|
||||||
app-alternatives/ninja
|
app-alternatives/ninja
|
||||||
@ -235,7 +240,7 @@ src_prepare() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if use lto && tc-is-clang && ! tc-ld-is-lld; then
|
if use lto && tc-is-clang && ! tc-ld-is-lld && ! tc-ld-is-mold; then
|
||||||
export RUSTFLAGS+=" -C link-arg=-fuse-ld=lld"
|
export RUSTFLAGS+=" -C link-arg=-fuse-ld=lld"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -391,7 +396,7 @@ src_configure() {
|
|||||||
dist-src = false
|
dist-src = false
|
||||||
remap-debuginfo = true
|
remap-debuginfo = true
|
||||||
lld = $(usex system-llvm false $(toml_usex wasm))
|
lld = $(usex system-llvm false $(toml_usex wasm))
|
||||||
$(if use lto && tc-is-clang ; then
|
$(if use lto && tc-is-clang && ! tc-ld-is-mold; then
|
||||||
echo "use-lld = true"
|
echo "use-lld = true"
|
||||||
fi)
|
fi)
|
||||||
# only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
|
# only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
|
||||||
|
|||||||
@ -94,7 +94,12 @@ BDEPEND="${PYTHON_DEPS}
|
|||||||
>=sys-devel/gcc-4.7[cxx]
|
>=sys-devel/gcc-4.7[cxx]
|
||||||
>=llvm-core/clang-3.5
|
>=llvm-core/clang-3.5
|
||||||
)
|
)
|
||||||
lto? ( system-llvm? ( $(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}') ) )
|
lto? ( system-llvm? (
|
||||||
|
|| (
|
||||||
|
$(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}')
|
||||||
|
sys-devel/mold
|
||||||
|
)
|
||||||
|
) )
|
||||||
!system-llvm? (
|
!system-llvm? (
|
||||||
>=dev-build/cmake-3.13.4
|
>=dev-build/cmake-3.13.4
|
||||||
app-alternatives/ninja
|
app-alternatives/ninja
|
||||||
@ -307,7 +312,7 @@ src_prepare() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if use lto && tc-is-clang && ! tc-ld-is-lld; then
|
if use lto && tc-is-clang && ! tc-ld-is-lld && ! tc-ld-is-mold; then
|
||||||
export RUSTFLAGS+=" -C link-arg=-fuse-ld=lld"
|
export RUSTFLAGS+=" -C link-arg=-fuse-ld=lld"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -478,7 +483,7 @@ src_configure() {
|
|||||||
dist-src = false
|
dist-src = false
|
||||||
remap-debuginfo = true
|
remap-debuginfo = true
|
||||||
lld = $(usex system-llvm false $(toml_usex wasm))
|
lld = $(usex system-llvm false $(toml_usex wasm))
|
||||||
$(if use lto && tc-is-clang ; then
|
$(if use lto && tc-is-clang && ! tc-ld-is-mold; then
|
||||||
echo "use-lld = true"
|
echo "use-lld = true"
|
||||||
fi)
|
fi)
|
||||||
# only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
|
# only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
|
||||||
|
|||||||
@ -94,7 +94,12 @@ BDEPEND="${PYTHON_DEPS}
|
|||||||
>=sys-devel/gcc-4.7[cxx]
|
>=sys-devel/gcc-4.7[cxx]
|
||||||
>=llvm-core/clang-3.5
|
>=llvm-core/clang-3.5
|
||||||
)
|
)
|
||||||
lto? ( system-llvm? ( $(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}') ) )
|
lto? ( system-llvm? (
|
||||||
|
|| (
|
||||||
|
$(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}')
|
||||||
|
sys-devel/mold
|
||||||
|
)
|
||||||
|
) )
|
||||||
!system-llvm? (
|
!system-llvm? (
|
||||||
>=dev-build/cmake-3.13.4
|
>=dev-build/cmake-3.13.4
|
||||||
app-alternatives/ninja
|
app-alternatives/ninja
|
||||||
@ -306,7 +311,7 @@ src_prepare() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if use lto && tc-is-clang && ! tc-ld-is-lld; then
|
if use lto && tc-is-clang && ! tc-ld-is-lld && ! tc-ld-is-mold; then
|
||||||
export RUSTFLAGS+=" -C link-arg=-fuse-ld=lld"
|
export RUSTFLAGS+=" -C link-arg=-fuse-ld=lld"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -477,7 +482,7 @@ src_configure() {
|
|||||||
dist-src = false
|
dist-src = false
|
||||||
remap-debuginfo = true
|
remap-debuginfo = true
|
||||||
lld = $(usex system-llvm false $(toml_usex wasm))
|
lld = $(usex system-llvm false $(toml_usex wasm))
|
||||||
$(if use lto && tc-is-clang ; then
|
$(if use lto && tc-is-clang && ! tc-ld-is-mold; then
|
||||||
echo "use-lld = true"
|
echo "use-lld = true"
|
||||||
fi)
|
fi)
|
||||||
# only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
|
# only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user