Sync with portage [Thu Aug 25 12:59:30 MSK 2022].

akrasnyh 2321
root 2 years ago
parent e3c3efc3cb
commit 2e8f82cc09

Binary file not shown.

Binary file not shown.

@ -11,3 +11,4 @@ DIST aws-cli-1.25.54.gh.tar.gz 2252442 BLAKE2B 7f3f55af39f52be60daa039c42cd494a8
DIST aws-cli-1.25.55.gh.tar.gz 2250376 BLAKE2B 21a61086d4eb737229990fbcacdde652e8bd94e146a027dbdcc8fcc8ab005f6dcd4525625276df196408da3d11e0c215c602df4cf298fea3f12f6bd923f7f191 SHA512 e53997ae7475fb125e08bab90ac63b49723abd7ff66312d15145ca452c806986237f8e20fc6cb467d4654087a288b0835fcec48f7be6ec8795e90345a0983ef5
DIST aws-cli-1.25.56.gh.tar.gz 2252989 BLAKE2B a082d42bd9ebaa858a3464bf885ba86a6f0f1b75d6ec89f9d6f1ab04dc753cf13cc6f7ced64cca35f8ddc460d589b44caa483c9d94bccb5b028c921fe7b970c0 SHA512 3a0fcd505b8a0c4fb322d2d39cc0ec3add977eb7ede14d7ff9fa3dd25b92e0e0d97128b73b6c32588d7e48344283c8c3eac293ea6cd470ea4feda1d1bf124e1b
DIST aws-cli-1.25.57.gh.tar.gz 2255779 BLAKE2B dddfd580d8af048111001151f3a28470d41026e21d4e9d3ec04972cc2d865c1670e306070114017911949ee8044a2a7840aa25374992721fc77fb045eb2cb9b0 SHA512 2b477f760ddba30a1d0f40dfc289ed84a96cf25a989cf5bc06a6e6432399f202f4418d8554f5892123e2b8a406f99ed2a5137204ba5f65d438a451badf0188be
DIST aws-cli-1.25.58.gh.tar.gz 2256521 BLAKE2B 752581d8e6cf82fa5a77f8b530d1d267f55888f0843affb580420267393d81e259e945bd527441be0a5973abeee29dfdd544750c9571b3ea9cd1caa0e4cfe72b SHA512 28a041e2c703723de972763965c25ad639a03eaa72c3e487d75c9471386eb35baa16eea775f623adc74675784830f9d1acdb060800e4eafd1be0c317bcca99b5

@ -0,0 +1,72 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{8..10} )
inherit bash-completion-r1 distutils-r1 multiprocessing
MY_P=aws-cli-${PV}
DESCRIPTION="Universal Command Line Environment for AWS"
HOMEPAGE="
https://github.com/aws/aws-cli/
https://pypi.org/project/awscli/
"
SRC_URI="
https://github.com/aws/aws-cli/archive/${PV}.tar.gz
-> ${MY_P}.gh.tar.gz
"
S=${WORKDIR}/${MY_P}
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~x86"
# botocore is x.(y+2).z
BOTOCORE_PV="$(ver_cut 1).$(( $(ver_cut 2) + 2)).$(ver_cut 3-)"
RDEPEND="
>=dev-python/botocore-${BOTOCORE_PV}[${PYTHON_USEDEP}]
dev-python/colorama[${PYTHON_USEDEP}]
dev-python/docutils[${PYTHON_USEDEP}]
dev-python/rsa[${PYTHON_USEDEP}]
>=dev-python/s3transfer-0.6.0[${PYTHON_USEDEP}]
dev-python/pyyaml[${PYTHON_USEDEP}]
!app-admin/awscli-bin
"
BDEPEND="
test? (
dev-python/pytest-forked[${PYTHON_USEDEP}]
dev-python/pytest-xdist[${PYTHON_USEDEP}]
)
"
distutils_enable_tests pytest
src_prepare() {
# do not rely on bundled deps in botocore (sic!)
find -name '*.py' -exec sed -i \
-e 's:from botocore[.]vendored import:import:' \
-e 's:from botocore[.]vendored[.]:from :' \
{} + || die
# strip overzealous upper bounds on requirements
sed -i -e 's:,<[0-9.]*::' -e 's:==:>=:' setup.py || die
distutils-r1_src_prepare
}
python_test() {
# integration tests require AWS credentials and Internet access
epytest tests/{functional,unit} -n "$(makeopts_jobs)" --forked
}
python_install_all() {
newbashcomp bin/aws_bash_completer aws
insinto /usr/share/zsh/site-functions
newins bin/aws_zsh_completer.sh _aws
distutils-r1_python_install_all
rm "${ED}"/usr/bin/{aws.cmd,aws_bash_completer,aws_zsh_completer.sh} || die
}

@ -9,7 +9,7 @@ SRC_URI="mirror://sourceforge/pwgen/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
IUSE="livecd"
src_configure() {

Binary file not shown.

@ -84,4 +84,11 @@ multilib_src_install() {
multilib_src_install_all() {
use python && distutils-r1_src_install
doman docs/brotli.1
local page
for page in constants decode encode types ; do
newman docs/${page}.h.3 ${PN}_${page}.h.3
done
}

@ -84,4 +84,11 @@ multilib_src_install() {
multilib_src_install_all() {
use python && distutils-r1_src_install
doman docs/brotli.1
local page
for page in constants decode encode types ; do
newman docs/${page}.h.3 ${PN}_${page}.h.3
done
}

@ -1,2 +1,3 @@
DIST unzip60.tar.gz 1376845 BLAKE2B 5016d300b4452018a391f4ebc03c6960c068df400a0407c0c60bd7bb5ec5012031f916d8b204a6149ba291c2c35beba40d9b43c76fc093026e79471329ab0e47 SHA512 0694e403ebc57b37218e00ec1a406cae5cc9c5b52b6798e0d4590840b6cdbf9ddc0d9471f67af783e960f8fa2e620394d51384257dca23d06bcd90224a80ce5d
DIST unzip_6.0-26.debian.tar.xz 23708 BLAKE2B 7655396df2f8c4443bbd37a2fab590f1e66b3b8531871a6d95f281ac702e64a0e602f2412a58ff2addf4ce9cae8d146af650a18b02919d120c9db6c49df480b5 SHA512 9a56e400ad0984f87c7ee0548429349be549e35a3cae4c9acb88a8fb97a1d1fbd116cfa3292622ad8b2c67ffe79ae268861ddec1269993ba98f1a6a411b7611f
DIST unzip_6.0-27.debian.tar.xz 24980 BLAKE2B e53a96f12af0cf5227600c73a35003484fca5de138cd37991eb1eb25b97b80371c3a566d989feeb04deb1a93acd9444253b091cd7e920b23520c87c5f5a94eeb SHA512 e1e605f023c7b314a6c5b2857a3bd630350df2d7e4bf6bb38ab8594f967336384666b4db8afad931251b85261ee4e2c38d78641c74ac7e5fd02523f26e92ddb2

@ -0,0 +1,93 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit flag-o-matic multilib toolchain-funcs
MY_PV="${PV//.}"
MY_PV="${MY_PV%_p*}"
MY_P="${PN}${MY_PV}"
DESCRIPTION="unzipper for pkzip-compressed files"
HOMEPAGE="http://www.info-zip.org/"
SRC_URI="mirror://sourceforge/infozip/${MY_P}.tar.gz
mirror://debian/pool/main/u/${PN}/${PN}_${PV/_p/-}.debian.tar.xz"
LICENSE="Info-ZIP"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="bzip2 natspec unicode"
DEPEND="bzip2? ( app-arch/bzip2 )
natspec? ( dev-libs/libnatspec )"
RDEPEND="${DEPEND}"
S="${WORKDIR}/${MY_P}"
PATCHES=(
"${WORKDIR}"/debian/patches
"${FILESDIR}"/${PN}-6.0-no-exec-stack.patch
"${FILESDIR}"/${PN}-6.0-format-security.patch
"${FILESDIR}"/${PN}-6.0-fix-false-overlap-detection-on-32bit-systems.patch
)
src_prepare() {
# bug #275244
use natspec && PATCHES+=( "${FILESDIR}"/${PN}-6.0-natspec.patch )
rm "${WORKDIR}"/debian/patches/02-this-is-debian-unzip.patch || die
default
sed -i -r \
-e '/^CFLAGS/d' \
-e '/CFLAGS/s:-O[0-9]?:$(CFLAGS) $(CPPFLAGS):' \
-e '/^STRIP/s:=.*:=true:' \
-e "s:\<CC *= *\"?g?cc2?\"?\>:CC=\"$(tc-getCC)\":" \
-e "s:\<LD *= *\"?(g?cc2?|ld)\"?\>:LD=\"$(tc-getCC)\":" \
-e "s:\<AS *= *\"?(g?cc2?|as)\"?\>:AS=\"$(tc-getCC)\":" \
-e 's:LF2 = -s:LF2 = :' \
-e 's:LF = :LF = $(LDFLAGS) :' \
-e 's:SL = :SL = $(LDFLAGS) :' \
-e 's:FL = :FL = $(LDFLAGS) :' \
-e "/^#L_BZ2/s:^$(use bzip2 && echo .)::" \
-e 's:$(AS) :$(AS) $(ASFLAGS) :g' \
unix/Makefile \
|| die "sed unix/Makefile failed"
# Delete bundled code to make sure we don't use it.
rm -r bzip2 || die
}
src_configure() {
case ${CHOST} in
i?86*-*linux*) TARGET="linux_asm" ;;
*linux*) TARGET="linux_noasm" ;;
i?86*-*bsd* | \
i?86*-dragonfly*) TARGET="freebsd" ;; # mislabelled bsd with x86 asm
*bsd* | *dragonfly*) TARGET="bsd" ;;
*-darwin*) TARGET="macosx" ;;
*-solaris*) TARGET="generic" ;;
*-cygwin*) TARGET="generic" ;;
*) die "Unknown target; please update the ebuild to handle ${CHOST} " ;;
esac
[[ ${CHOST} == *linux* ]] && append-cppflags -DNO_LCHMOD
use bzip2 && append-cppflags -DUSE_BZIP2
use unicode && append-cppflags -DUNICODE_SUPPORT -DUNICODE_WCHAR -DUTF8_MAYBE_NATIVE -DUSE_ICONV_MAPPING
# bug #281473
append-cppflags -DLARGE_FILE_SUPPORT
}
src_compile() {
ASFLAGS="${ASFLAGS} $(get_abi_CFLAGS)" emake -f unix/Makefile ${TARGET}
}
src_install() {
dobin unzip funzip unzipsfx unix/zipgrep
dosym unzip /usr/bin/zipinfo
doman man/*.1
dodoc BUGS History* README ToDo WHERE
}

Binary file not shown.

@ -2,6 +2,8 @@ DIST gnupg-2.2.35.tar.bz2 7262687 BLAKE2B 18b5965151ded3b3f28d139824e14d7a6f1673
DIST gnupg-2.2.35.tar.bz2.sig 119 BLAKE2B d95323703c12c9474b21fa91ddb70d4d4d464c794223e21f6ae5d4de955f07a5cabde50612e977168ea6071c4b12be3262cbafe9bcaa8e9a0b009318c0ff6718 SHA512 9043894730520e974e7bc17e0f95419c319fbcd514f102faf644e2f5580e238719cecb8b5e778ecf20f9212ee2554206eb0686e8b5fce7f8c556146657660fe2
DIST gnupg-2.2.36.tar.bz2 7273805 BLAKE2B 82f26f48380632ddffedacb5e7cff653aec7bea2cf90d88184e0ddeb4053bd2b0ed1ee7addeceb684ffcbf07ccc2cba699172d78e5ab023af2e3d777fbb702b0 SHA512 2d14000a0e8b36688d5e89372a1ef5f8a526b2724715377323d1f9abd23122aa9d0ab2c0988063c397f969afefbf205aedb7205915fd751c539336e680d8462a
DIST gnupg-2.2.36.tar.bz2.sig 119 BLAKE2B ad6dc03c34f6c0d13080ef0bdea2db152c12ea4f129783ba1b0b7f237965b8eeec22b2e79fcf42657dafdd20cae558d781b07378bed78386979a0b4c4ef4a49b SHA512 4ad3f9041aa1fbffaab3cc4aa0df038a67dc8eb200492cdd96259dcf1e0005cb39d6e6245280f1a2a8d4db9f686381e2b0f5bb80c412edbdbcb3fc11dca044c5
DIST gnupg-2.2.37.tar.bz2 7285172 BLAKE2B 40606f996aea3d26e28989466861bf486b8bf95e38d23377c0745b85f4817988f794fa07cbb1d5b8b7ae1da3c8bd5fcee5fabb1998b2fc1aa0b0e3ea4351575b SHA512 b56c47002948fd28fc9d5c23b46f5522e4210ed61c17f491c3b3fab5fab8893da33b1f8ff55a3bbef6367ff92b10c141c1f24d8350c37a0e756d2bdfbe86d7be
DIST gnupg-2.2.37.tar.bz2.sig 119 BLAKE2B b5166f574a35223eeadf056d6bc3e8bcbd02fad766713afba28e20d4d431fcf123b5566527274923fede092c1e48efefd32b825644583f016bf3db119af03209 SHA512 8a1c34a5cd6afa3a263669922bc43217274f796634dc14b54558e1361f5e38680c6897e402a5289ccbe08c91efa3647bccd741fa09f3259174b8dabf86ecbc6f
DIST gnupg-2.3.6.tar.bz2 7604761 BLAKE2B 6cbc749156c50b6633c126cde621271c6c9682a04efea51fbc5a2e92ee56493e8348814391ee0c337adcb4de4dd23293b9592db78998626905038c859ac4af6e SHA512 4540e8d2be836b491918f4987ba301a73fcdc4539b1f9abf6112a74c2d39c0e5dc3f17511212bac1dd7fd0594feecd91f95ecf78d4b2c1e70e818342a1802b85
DIST gnupg-2.3.6.tar.bz2.sig 119 BLAKE2B c7d4cdc81580b8b1e56c7bc83236d65c9d2c1bab2d210d14a0d3c58f635d656c9b449ef9596b9601027cb891bd437cc8f2a63eb3c17742c288531511984fba7f SHA512 85d155f9809c8d0f38723d8622c085e421531c016d19fcce2ae34dc9a4aeac0bc1895f7a094ee9cdf69a15b426fb0d72ee53319fe0a05665c92caa0e950c1797
DIST gnupg-2.3.7.tar.bz2 7599853 BLAKE2B 3e9e33c8357222f42cc0e2af538e9f1f1f0453f35d790aaadf47ce9df24229efa91457b6014b34f19084448a3a6603c82e7d07714b89a68c6a84a08af6fa0e02 SHA512 c7fe169050ef17051cdaac9ad476e7ea792483baad1208fc359d568fa9e138d920ecaa2cd9cae73b20f5472a7d8ca6540a62062ff7a06055cc656b0eb4b917b9

@ -0,0 +1,159 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/gnupg.asc
inherit flag-o-matic systemd toolchain-funcs verify-sig
MY_P="${P/_/-}"
DESCRIPTION="The GNU Privacy Guard, a GPL OpenPGP implementation"
HOMEPAGE="https://gnupg.org/"
SRC_URI="mirror://gnupg/gnupg/${MY_P}.tar.bz2"
SRC_URI+=" verify-sig? ( mirror://gnupg/gnupg/${P}.tar.bz2.sig )"
S="${WORKDIR}/${MY_P}"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="bzip2 doc ldap nls readline selinux +smartcard ssl test tofu tools usb user-socket wks-server"
RESTRICT="!test? ( test )"
# Existence of executables is checked during configuration.
# Note: On each bump, update dep bounds on each version from configure.ac!
DEPEND=">=dev-libs/libassuan-2.5.0
>=dev-libs/libgcrypt-1.8.0:=
>=dev-libs/libgpg-error-1.29
>=dev-libs/libksba-1.3.5
>=dev-libs/npth-1.2
>=net-misc/curl-7.10
sys-libs/zlib
bzip2? ( app-arch/bzip2 )
ldap? ( net-nds/openldap:= )
readline? ( sys-libs/readline:0= )
smartcard? ( usb? ( virtual/libusb:1 ) )
ssl? ( >=net-libs/gnutls-3.0:0= )
tofu? ( >=dev-db/sqlite-3.7 )"
RDEPEND="${DEPEND}
app-crypt/pinentry
nls? ( virtual/libintl )
selinux? ( sec-policy/selinux-gpg )
wks-server? ( virtual/mta )"
BDEPEND="virtual/pkgconfig
doc? ( sys-apps/texinfo )
nls? ( sys-devel/gettext )
verify-sig? ( sec-keys/openpgp-keys-gnupg )"
DOCS=(
ChangeLog NEWS README THANKS TODO VERSION
doc/FAQ doc/DETAILS doc/HACKING doc/TRANSLATE doc/OpenPGP doc/KEYSERVER
)
PATCHES=(
"${FILESDIR}"/${PN}-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch
)
src_prepare() {
default
# Inject SSH_AUTH_SOCK into user's sessions after enabling gpg-agent-ssh.socket in systemctl --user mode,
# idea borrowed from libdbus, see
# https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/bus/systemd-user/dbus.socket.in#L6
#
# This cannot be upstreamed, as it requires determining the exact prefix of 'systemctl',
# which in turn requires discovery in Autoconf, something that upstream deeply resents.
sed -e "/DirectoryMode=/a ExecStartPost=-${EPREFIX}/bin/systemctl --user set-environment SSH_AUTH_SOCK=%t/gnupg/S.gpg-agent.ssh" \
-i doc/examples/systemd-user/gpg-agent-ssh.socket || die
}
src_configure() {
local myconf=(
$(use_enable bzip2)
$(use_enable nls)
$(use_enable smartcard scdaemon)
$(use_enable ssl gnutls)
$(use_enable test all-tests)
$(use_enable test tests)
$(use_enable tofu)
$(use smartcard && use_enable usb ccid-driver || echo '--disable-ccid-driver')
$(use_enable wks-server wks-tools)
$(use_with ldap)
$(use_with readline)
--with-mailprog=/usr/libexec/sendmail
--disable-ntbtls
--enable-gpg
--enable-gpgsm
--enable-large-secmem
CC_FOR_BUILD="$(tc-getBUILD_CC)"
GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config"
KSBA_CONFIG="${ESYSROOT}/usr/bin/ksba-config"
LIBASSUAN_CONFIG="${ESYSROOT}/usr/bin/libassuan-config"
LIBGCRYPT_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-libgcrypt-config"
NPTH_CONFIG="${ESYSROOT}/usr/bin/npth-config"
$("${S}/configure" --help | grep -o -- '--without-.*-prefix')
)
if use prefix && use usb; then
# bug #649598
append-cppflags -I"${EPREFIX}/usr/include/libusb-1.0"
fi
# bug #663142
if use user-socket; then
myconf+=( --enable-run-gnupg-user-socket )
fi
# glib fails and picks up clang's internal stdint.h causing weird errors
tc-is-clang && export gl_cv_absolute_stdint_h="${ESYSROOT}"/usr/include/stdint.h
# Hardcode mailprog to /usr/libexec/sendmail even if it does not exist.
# As of GnuPG 2.3, the mailprog substitution is used for the binary called
# by wks-client & wks-server; and if it's autodetected but not not exist at
# build time, then then 'gpg-wks-client --send' functionality will not
# work. This has an unwanted side-effect in stage3 builds: there was a
# [R]DEPEND on virtual/mta, which also brought in virtual/logger, bloating
# the build where the install guide previously make the user chose the
# logger & mta early in the install.
econf "${myconf[@]}"
}
src_compile() {
default
use doc && emake -C doc html
}
src_test() {
# bug #638574
use tofu && export TESTFLAGS=--parallel
default
}
src_install() {
default
use tools &&
dobin \
tools/{convert-from-106,gpg-check-pattern} \
tools/{gpg-zip,gpgconf,gpgsplit,lspgpot,mail-signed-keys} \
tools/make-dns-cert
dosym gpg /usr/bin/gpg2
dosym gpgv /usr/bin/gpgv2
echo ".so man1/gpg.1" > "${ED}"/usr/share/man/man1/gpg2.1 || die
echo ".so man1/gpgv.1" > "${ED}"/usr/share/man/man1/gpgv2.1 || die
dodir /etc/env.d
echo "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" >> "${ED}"/etc/env.d/30gnupg || die
use doc && dodoc doc/gnupg.html/* doc/*.png
systemd_douserunit doc/examples/systemd-user/*.{service,socket}
}

@ -1 +1,3 @@
DIST pinentry-1.2.0.tar.bz2 498390 BLAKE2B 6e97b55fe39e9c17f8a87fa669d23fca56c1095c2533a9eebe459fafc95a3fcb0a5ea502077aae5480b5259a3096c5f85e05d4872c0b19ad33f3d9084a220cc7 SHA512 19cea79aa3982d1f0d75220c8e24ca38d6c49475c6f4c5aa7101151b4690db23ed316096a4a411136e716ba4eb471f48f9b09556e5c9837533c2356b9b384b63
DIST pinentry-1.2.1.tar.bz2 547698 BLAKE2B aa47612aa3a6f74c3676bf4018780356cb22ed4078792c1f466f9e0465199428c151c0e20dfbe6c784ef93c2b42b673daff0b6adc74c8c98fed9921e65ed42ea SHA512 a665315628f4dcf07e16a22db3f3be15d7e7e93b3deec0546c7275b71b0e3bd65535a08af5e12d6339fd6595132df86529401d9d12bd17c428a3466e8dfafab6
DIST pinentry-1.2.1.tar.bz2.sig 119 BLAKE2B 6a9fc12a09b5122bf531e875977f63fa7caa75d39afcb4e9a9a957df87ba0a6f6156ad9799cdde8625debe0b7c3cb9482616b0ab57c133ffd2f9120ddf47815f SHA512 b14525f6ace3d1fc3dc9e1173de8821fa2a960b870876beb10b98f41222378c1e3f4f79481f3f3854c1753e8dc9a7eb92862ffa583c7be0788ec25045a4e1176

@ -0,0 +1,98 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/gnupg.asc
inherit autotools qmake-utils verify-sig
DESCRIPTION="Simple passphrase entry dialogs which utilize the Assuan protocol"
HOMEPAGE="https://gnupg.org/aegypten2"
SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="caps efl emacs gnome-keyring gtk ncurses qt5"
DEPEND="
>=dev-libs/libassuan-2.1
>=dev-libs/libgcrypt-1.6.3
>=dev-libs/libgpg-error-1.17
efl? ( dev-libs/efl[X] )
gnome-keyring? ( app-crypt/libsecret )
ncurses? ( sys-libs/ncurses:= )
qt5? (
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtwidgets:5
)
"
RDEPEND="
${DEPEND}
gtk? ( app-crypt/gcr[gtk] )
"
BDEPEND="
sys-devel/gettext
virtual/pkgconfig
verify-sig? ( sec-keys/openpgp-keys-gnupg )
"
IDEPEND=">=app-eselect/eselect-pinentry-0.7.2"
DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
PATCHES=(
"${FILESDIR}/${PN}-1.0.0-AR.patch"
)
src_prepare() {
default
unset FLTK_CONFIG
eautoreconf
}
src_configure() {
export PATH="$(qt5_get_bindir):${PATH}"
export QTLIB="$(qt5_get_libdir)"
local myeconfargs=(
$(use_enable efl pinentry-efl)
$(use_enable emacs pinentry-emacs)
$(use_enable gnome-keyring libsecret)
$(use_enable gtk pinentry-gnome3)
$(use_enable ncurses fallback-curses)
$(use_enable ncurses pinentry-curses)
$(use_enable qt5 pinentry-qt)
--enable-pinentry-tty
--disable-pinentry-fltk
--disable-pinentry-gtk2
MOC="$(qt5_get_bindir)"/moc
GPG_ERROR_CONFIG="${ESYSROOT}"/usr/bin/${CHOST}-gpg-error-config
LIBASSUAN_CONFIG="${ESYSROOT}"/usr/bin/libassuan-config
$("${S}/configure" --help | grep -- '--without-.*-prefix' | sed -e 's/^ *\([^ ]*\) .*/\1/g')
)
econf "${myeconfargs[@]}"
}
src_install() {
default
rm "${ED}"/usr/bin/pinentry || die
use qt5 && dosym pinentry-qt /usr/bin/pinentry-qt5
}
pkg_postinst() {
eselect pinentry update ifunset
}
pkg_postrm() {
eselect pinentry update ifunset
}

@ -1,2 +1,3 @@
DIST yubikey-manager-4.0.8.tar.gz 147076 BLAKE2B efdefb15c3939bfb2171766aec195fb776668894d4439565840587d14387999e052aee6eb225b9332662f1ebdbf1db24fceb606393e23d591ff61b91c1ee96f5 SHA512 87352bbb133eead48d1588df2db5420687278a9f76ceb283a53af8eab3d29e30c86e01a588a6da2884e6dac6af192ad355a28745f2f8505ef6cd0e96dea3e9c7
DIST yubikey-manager-4.0.9.gh.tar.gz 145952 BLAKE2B e7a5488be1163e3f3f82c049b7c068c4be82debfccab1d6a60c1f9bdebcab4df94f257082e9c83d6bb0ea037bdab4b47b924d27890537d066205e2fbc28d2066 SHA512 bbffbdf9437d0f2de0b7713fe577a342c8da95e9d9512cb5118374b63637dbde6ee95e516dbb47bbea3af5b2e5edd495882c7e4adcbec1fd3eb750471a50add5
DIST yubikey-manager-4.0.9.gh.tar.gz.sig 310 BLAKE2B 7519032073c94c8aef3552bec3b2288993606ace9e6774fe0c1d2ae90b46a084d85cbf607fe060fbaa8c8edb0ef8e6cb07c22e94d215b18715d7845345f4b775 SHA512 b27e9725e9e1b28f405476c443d4c0bc70fc954f7302c6d2e35f2ad78d9fc6696ff5b011fc8df4226f740079ca6b4dadf754f48dd7862a68f18fa167395b0b9d

@ -6,21 +6,22 @@ EAPI=8
PYTHON_COMPAT=( python3_{8..11} )
DISTUTILS_USE_PEP517=poetry
inherit distutils-r1
inherit distutils-r1 verify-sig
DESCRIPTION="Python library and command line tool for configuring a YubiKey"
HOMEPAGE="https://developers.yubico.com/yubikey-manager/"
# Per https://github.com/Yubico/yubikey-manager/issues/217, Yubico is
# the official source for tarballs, not Github.
# Unfortunately in spite of having been mentioned on the Release Notes
# page since mid-July, as of mid-August 2022 there is still no trace
# of an official 4.0.9 tarball.
SRC_URI="https://github.com/Yubico/yubikey-manager/releases/download/${PV}/${P}.tar.gz -> ${P}.gh.tar.gz"
# According to https://github.com/Yubico/yubikey-manager/issues/518 the release
# tarballs on Yubico Web site and on GitHub should be identical, and at least
# for recent releases the latter are signed as well. Only the automatically
# generated "Source code (tar.gz)" tarballs should not be used.
SRC_URI="https://github.com/Yubico/${PN}/releases/download/${PV}/${P}.tar.gz -> ${P}.gh.tar.gz
verify-sig? ( https://github.com/Yubico/${PN}/releases/download/${PV}/${P}.tar.gz.sig -> ${P}.gh.tar.gz.sig )"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
IUSE="ssl"
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}/usr/share/openpgp-keys/yubico.com.asc"
# app-crypt/ccid required for
# - 'ykman oath'
@ -34,7 +35,8 @@ RDEPEND="
dev-python/pyscard[${PYTHON_USEDEP}]
ssl? ( >=dev-python/pyopenssl-0.15.1[${PYTHON_USEDEP}] )"
BDEPEND="
test? ( dev-python/makefun[${PYTHON_USEDEP}] )"
test? ( dev-python/makefun[${PYTHON_USEDEP}] )
verify-sig? ( >=sec-keys/openpgp-keys-yubico-20220824 )"
distutils_enable_tests pytest

Binary file not shown.

@ -1,3 +1,4 @@
DIST eclass-manpages-20220417.tar.xz 403944 BLAKE2B db0607e65f5e87d566bd632b4fa6e48522593907f8fb76f598a552fb23bf53ced466b467b45fc07154edc0e757dc92b9387484003dd847bdd63ea3a6f6635459 SHA512 ad9bcc55f9b7df7565d4d309d37e59553871a7116b3f00b87f6e29648bf4b235ec64a036348f76167ca1ce4d2b899b70176d1844d6e8bb325154e1d1a1dc951f
DIST eclass-manpages-20220716.tar.xz 409748 BLAKE2B 8e9c9ffc2d7d72647578cb876f0cb4e4a6c72cfe2236c435a7c232dc14638bd3ff98d085d06faec3c353e7d3263ee057736e6f8b5dff53d9890fa82d43d26002 SHA512 b4a45356a7441c258524c18a916df4b06d9317bc6ecb8e521d2cc43bcd7938e94ef266724c570456692e9f089332e0fb23e6d2d625a72424cfb479497b34f78d
DIST eclass-manpages-20220725.tar.xz 409300 BLAKE2B 740890c627577baa218f92edd4d3f4ee53232fc01fae3b42246ce1c14b9a382e009ebebd9ed692b480e47106b104f7cd4f4d7c0dd5a51f104365399ae64b2485 SHA512 e753cebde92c7f2d11cd548780e8f0d900cc1946b71c538805511296f8c754fb4bac49ae31bfce3e58ac581b975c29704fe4b98295b466dd35b020b42a89484e
DIST eclass-manpages-20220824.tar.xz 407700 BLAKE2B 7384e2d9100cdb8dca50bc5156b7f55f5ae52279d6c6563b0da3f6f11d49fcd24bfc7ae452587768a33489ddf83171f4f65433da3450e08ffb0125d2b3404d3c SHA512 ddac3f75ef6d228fd59ea323c94f6e7d725e41ecb7a7b49946e15ebc1c0fb97ebb9bbd464aef991944f1e5ef42198f0cb85a7ad6c5a96eb0524b191485c6421e

@ -0,0 +1,24 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Instructions to make a dist tarball:
# git clone https://github.com/mgorny/eclass-to-manpage.git
# cd eclass-to-manpage
# make dist ECLASSDIR=~/g/eclass/
DESCRIPTION="Collection of Gentoo eclass manpages"
HOMEPAGE="https://github.com/mgorny/eclass-to-manpage"
SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz"
LICENSE="GPL-2"
SLOT="0"
# Keep the keywords stable. No need to change to ~arch.
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-solaris"
BDEPEND="sys-apps/gawk"
src_install() {
emake install DESTDIR="${D}" PREFIX="${EPREFIX}/usr"
}

Binary file not shown.

@ -1 +1,2 @@
DIST dashboard-1.8.0_pre20220406.tar.gz 191442 BLAKE2B 8b105d8ed9b31e7439cc55b85c9e0bb46739fcb26f9e1e605492a552cbcfe9799794be6239b6c622bfbfc2f850d20f2944f759010eb502bcb75edb570ae7e5b8 SHA512 b3b714bbee034fecbf1172dccd5eebc38373c11a510c532a7b9ba31cac79daafe7e9ccf7c5e622abbdb44817c966f100ec4f7a447e8b0370f9d7e66ff55e45ca
DIST dashboard-1.8.0_pre20220809.tar.gz 192857 BLAKE2B 22a7be748b3308282deb7e0500269a0aa809c2c6a5e57e984e83ca13803b7e55364e2f5619380444a7daf320c1bc6da26daeb0451efc3c20fc82148e55fa7f3a SHA512 10e2cdd724731b0c5ae195f8a8b3c9ba83a4c6a0d5fba00e7ecc224b22673296ca522642d179449e68d852b06789665e2c5bbfef84dea5e878110ee9e3b23dce

@ -0,0 +1,38 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
H=49e5603cac7d028bfc4c679161a20ca40327956c
NEED_EMACS=26.1
inherit elisp
DESCRIPTION="Extensible Emacs dashboard, with sections for bookmarks, projects, agenda and more"
HOMEPAGE="https://github.com/emacs-dashboard/emacs-dashboard/"
SRC_URI="https://github.com/emacs-dashboard/emacs-${PN}/archive/${H}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}"/emacs-${PN}-${H}
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
RESTRICT="test" # tests not in the repository, require "Eask"
DOCS=( CHANGELOG.md README.org etc )
PATCHES=( "${FILESDIR}"/${PN}-dashboard-widgets.el-banners.patch )
ELISP_REMOVE=( .dir-locals.el )
SITEFILE="50${PN}-gentoo.el"
src_prepare() {
elisp_src_prepare
sed "s|@SITEETC@|${EPREFIX}${SITEETC}/${PN}|" -i dashboard-widgets.el || die
}
src_install() {
elisp_src_install
insinto "${SITEETC}"/${PN}
doins -r banners
}

Binary file not shown.

@ -102,4 +102,5 @@ pkg_postinst() {
optfeature "SSH_ASKPASS program implementation" lxqt-base/lxqt-openssh-askpass net-misc/ssh-askpass-fullscreen net-misc/x11-ssh-askpass
optfeature "QEMU host support" app-emulation/qemu[usbredir,spice]
optfeature "virt-install --location ISO support" dev-libs/libisoburn
}

Binary file not shown.

@ -1,4 +1,4 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -15,7 +15,7 @@ S="${WORKDIR}/${PN}-${COMMIT_HASH}"
LICENSE="MIT CC-BY-3.0"
SLOT="0"
KEYWORDS="~alpha amd64 ~arm arm64 ~ia64 ~ppc ppc64 ~riscv x86 ~amd64-linux ~x64-macos"
KEYWORDS="~alpha amd64 ~arm arm64 ~ia64 ~loong ~ppc ppc64 ~riscv x86 ~amd64-linux ~x64-macos"
IUSE="+oniguruma static-libs test"
ONIGURUMA_MINPV='>=dev-libs/oniguruma-6.1.3' # Keep this in sync with bundled modules/oniguruma/

Binary file not shown.

@ -1 +1,2 @@
DIST mythes-1.2.4.tar.gz 4910303 BLAKE2B aa091344aebd117618d90aa574ec5e68594782511e1aa85a2d46740ecc4ff2cdf1d9f9f6de9dfd454cc0056076bdb9a21ad14d2935e39e4fdbd7753930fda605 SHA512 a04da39812bcfb1391a2cba7de73e955eafe141679ec03ed6657d03bebf360b432480d0037dff9ed72a1dfda5a70d77d44ac2bb14cdb109fd8e2a38376feee21
DIST mythes-1.2.5.tar.xz 2891852 BLAKE2B e292e49187a9b225fdcfccb467afed0b8ce90769bbefe331d7d7f026f2dd6686543b14f3666af5b1693198467206c53da0bbd030420d87c94315f9da769f45a6 SHA512 304fd05619e0ae02c9c29d92a6ada8f4a85f41f331b87b8820728c1919f3dd9c5cd951dbef9a27e649466f94dc5daa19350c9fd09c90d49b198b73b1f9eb770e

@ -0,0 +1,28 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="Simple thesaurus for LibreOffice"
HOMEPAGE="https://github.com/hunspell/mythes"
SRC_URI="https://github.com/hunspell/${PN}/releases/download/v${PV}/${P}.tar.xz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
IUSE="debug"
RDEPEND="app-text/hunspell:="
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
src_configure() {
econf \
--disable-werror \
$(use_enable debug)
}
src_install() {
default
find "${ED}" -type f -name '*.la' -delete || die
}

Binary file not shown.

@ -11,7 +11,7 @@ SRC_URI="https://github.com/avrdudes/avrdude/archive/refs/tags/v${PV}.tar.gz ->
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
KEYWORDS="~amd64 arm ppc ppc64 ~x86"
IUSE="ftdi readline"
RDEPEND="

@ -1,73 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit toolchain-funcs
MY_DOC_PV=6.3
DESCRIPTION="AVR Downloader/UploaDEr"
HOMEPAGE="https://savannah.nongnu.org/projects/avrdude"
if [[ ${PV} == *9999* ]] ; then
ESVN_REPO_URI="svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude"
inherit autotools subversion
else
SRC_URI="mirror://nongnu/${PN}/${P}.tar.gz"
KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
fi
SRC_URI+=" doc? (
mirror://nongnu/${PN}/${PN}-doc-${MY_DOC_PV}.tar.gz
mirror://nongnu/${PN}/${PN}-doc-${MY_DOC_PV}.pdf
)"
LICENSE="GPL-2"
SLOT="0"
IUSE="doc ftdi ncurses readline"
RDEPEND="
virtual/libelf
virtual/libusb:1
virtual/libusb:0
ftdi? ( dev-embedded/libftdi:= )
ncurses? ( sys-libs/ncurses:0= )
readline? ( sys-libs/readline:0= )
"
DEPEND="${RDEPEND}"
src_prepare() {
default
[[ ${PV} == *9999* ]] && eautoreconf
}
src_configure() {
# somehow this doesnt get set when cross-compiling and breaks build
tc-export AR
export ac_cv_lib_ftdi_ftdi_usb_get_strings=$(usex ftdi)
export ac_cv_lib_ncurses_tputs=$(usex ncurses)
export ac_cv_lib_readline_readline=$(usex readline)
econf --disable-static
}
src_compile() {
# The automake target for these files does not use tempfiles or create
# these atomically, confusing a parallel build. So we force them first.
emake lexer.c config_gram.c config_gram.h
emake
}
src_install() {
default
if use doc ; then
newdoc "${DISTDIR}/${PN}-doc-${MY_DOC_PV}.pdf" avrdude.pdf
dodoc -r "${WORKDIR}/avrdude-html/"
fi
find "${ED}" -name '*.la' -delete || die
}

@ -1 +1,2 @@
DIST libjaylink-0.2.0.tar.bz2 59078 BLAKE2B 7928875248972bc00ec46511861e160491f7a53f729e0fbfe3a6d08335532fffc9e285e8a354a390037bebe696b6740bdc422164238947baf5e0fcf8f55c0dd5 SHA512 5a8c458982fdea2025aa3ce774d41cc58a283824dcd90a94531ee5e6ca50d9961b0ebb40a6dd3a97fdfcb44625437d685151560185449c3161fe399e0651da44
DIST libjaylink-0.3.0.tar.bz2 61075 BLAKE2B 84946fbe0a061117f92b8011c0b5eeb30f8f74817128a5fd6a6d519c7a0f07f447d87d0fe72d7a47d17ab2fa33cdc3820e0c556f75c5dedad30faf5e6cf5739d SHA512 714de9297fb59eccee7eb461f37b20459991bffd31aac8eb20014f00716bb94ff4cda96a3d1746419c7722b6b7d97e7a42df9fb3b5c4f83a3f1ac79647159426

@ -1,4 +1,4 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
@ -10,7 +10,7 @@ HOMEPAGE="https://gitlab.zapb.de/libjaylink/libjaylink"
SRC_URI="https://gitlab.zapb.de/libjaylink/libjaylink/-/archive/${PV}/${P}.tar.bz2"
LICENSE="GPL-2"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="amd64 arm ~riscv x86"
IUSE="static-libs"

@ -0,0 +1,45 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools udev
DESCRIPTION="Library to access J-Link devices"
HOMEPAGE="https://gitlab.zapb.de/libjaylink/libjaylink"
SRC_URI="https://gitlab.zapb.de/libjaylink/libjaylink/-/archive/${PV}/${P}.tar.bz2"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~arm ~riscv ~x86"
DEPEND="virtual/libusb:1"
RDEPEND="${DEPEND}"
BDEPEND="virtual/pkgconfig"
src_prepare() {
default
# Remove -Werror from CFLAGS.
sed -i '/^JAYLINK_CFLAGS=/s/ -Werror//' configure.ac || die
eautoreconf
}
src_configure() {
econf --disable-static
}
src_install() {
default
udev_dorules contrib/99-${PN}.rules
find "${D}" -type f -name '*.la' -delete || die
}
pkg_postinst() {
udev_reload
}
pkg_postrm() {
udev_reload
}

@ -1,36 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
EGIT_REPO_URI="https://gitlab.zapb.de/libjaylink/libjaylink.git"
inherit git-r3 autotools multilib-minimal
DESCRIPTION="Library to access J-Link devices"
HOMEPAGE="https://gitlab.zapb.de/libjaylink/libjaylink"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS=""
IUSE="static-libs"
DEPEND="virtual/libusb:1[${MULTILIB_USEDEP}]"
RDEPEND="${DEPEND}"
BDEPEND="virtual/pkgconfig"
src_prepare() {
sed -i -e "/^JAYLINK_CFLAGS=/ s/ -Werror / /" configure.ac || die
eapply_user
eautoreconf
multilib_copy_sources
}
multilib_src_configure() {
econf $(use_enable static-libs static)
}
multilib_src_install_all() {
einstalldocs
use static-libs || find "${D}" -name '*.la' -delete || die
}

@ -0,0 +1,2 @@
DIST pico-sdk-1.4.0.tar.gz 959068 BLAKE2B 95c5e61c4d66c345daa4b8aff8e9e2cd90bcc722289ac67c1a18ce00dfa02ef7fb07512a0fdc7558f989746c215cff31979f1ad8a582e20ff2d151fdd109914f SHA512 4be28cf41e5b808a504b4c949f6c3e9fbc425beb4f838a7898bfd78925cc54e0390ff56c036bc7f60a26efac0d6c1bd811b27f7b60a1c8d7bb4750f3fa37690e
DIST picotool-1.1.0.tar.gz 43994 BLAKE2B 2b8536540be912418be1f0f0d93bb59b9cd4832ce46854478fb0bfbcb4463b49e4806068897a1d665b73ea7a764bf0d96f0a56cde01ef6503c74e1eadc4ed9c2 SHA512 5c13a88e90baed28cf435c7641a84c1c814fc473d57f2502ebb594d84c71bbe82632bf0d24b7755ebfec270d85f4588c488917a224b68c93f40573e956026efc

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>matthew@gentoo.org</email>
<name>Matthew Smith</name>
</maintainer>
<upstream>
<remote-id type="github">raspberrypi/picotool</remote-id>
</upstream>
</pkgmetadata>

@ -0,0 +1,35 @@
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
SDK_PV=1.4.0
SDK_PN=pico-sdk
SDK_P=${SDK_PN}-${SDK_PV}
DESCRIPTION="tool for interacting with rp2040 devices and binaries"
HOMEPAGE="https://github.com/raspberrypi/picotool"
SRC_URI="
https://github.com/raspberrypi/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz
https://github.com/raspberrypi/${SDK_PN}/archive/refs/tags/${SDK_PV}.tar.gz -> ${SDK_P}.tar.gz
"
# picotool (BSD)
# |- clipp (MIT)
# |- pico-sdk (BSD)
LICENSE="BSD MIT"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="virtual/libusb:1"
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
src_configure() {
local mycmakeargs=(
-DPICO_SDK_PATH="${WORKDIR}"/${SDK_P}
)
cmake_src_configure
}

Binary file not shown.

@ -0,0 +1,2 @@
DIST go-critic-0.6.4-deps.tar.xz 26894844 BLAKE2B 4e78028cd4631ae263f9d696832a80d9cc3e580eacd6671021704f0a0cef4181c5f3f680efe4480eb0b791bf0b84d0ebe96976cc255ff10e540b1b50823d9b8f SHA512 3b0d4a3eae243ce5f8eded69f493155c76b9d6f97cec62268fc9916b17fffb676286a0c69ca5f707b6ce64a6fdcbf10a5864716a422d9f4fbfde69786f669c5c
DIST go-critic-0.6.4.tar.gz 176888 BLAKE2B 18b8877a800c5ee6d955e94f5258b994fb830f82696dc137c403d5b9f833dd2667ae2b9f952f71f34d6475b3d05b37f2afa711ef60717eda1cb668ab2624c61e SHA512 041df9446fb16e55d06887d8cbe0e8c32ef3bb9fb088d45d2c9dde58062fa3a8d326a3003ca238df56c14a33b7037315de59a1fb0b988e842cf0360fec851ee2

@ -0,0 +1,25 @@
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module
DESCRIPTION="The most opinionated Go source code linter for code audit"
HOMEPAGE="https://github.com/go-critic/go-critic"
SRC_URI="https://github.com/go-critic/go-critic/archive/v${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
# tests fail
RESTRICT="test"
src_compile() {
emake GOCRITIC_VERSION=v${PV} build-release
}
src_install() {
dobin bin/*
}

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>williamh@gentoo.org</email>
<name>William Hubbs</name>
</maintainer>
<upstream>
<remote-id type="github">go-critic/go-critic</remote-id>
</upstream>
</pkgmetadata>

@ -1,4 +1,4 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -10,7 +10,7 @@ HOMEPAGE="https://github.com/cpuguy83/go-md2man"
LICENSE="BSD-2 MIT"
SLOT="0"
KEYWORDS="amd64 ~arm arm64 ppc64 ~riscv ~x86"
KEYWORDS="amd64 ~arm arm64 ~loong ppc64 ~riscv ~x86"
# restrict tests because they need network-sandbox disabled
# bug https://bugs.gentoo.org/715028

Binary file not shown.

@ -18,7 +18,7 @@ SRC_URI="https://github.com/jnr/${PN}/archive/refs/tags/${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="1.3"
KEYWORDS="amd64 arm64 ppc64 ~x86"
KEYWORDS="amd64 arm64 ppc64 x86"
DEPEND=">=virtual/jdk-1.8:*
>=dev-libs/libffi-3.4.2-r2:="

@ -18,7 +18,7 @@ SRC_URI="https://github.com/jnr/${PN}/archive/${P}.tar.gz"
LICENSE="EPL-2.0 GPL-2 LGPL-2.1"
SLOT="3.0"
KEYWORDS="amd64 arm64 ~ppc64 x86"
KEYWORDS="amd64 arm64 ppc64 x86"
CP_DEPEND="
>=dev-java/jnr-ffi-2.2.12:2
@ -39,6 +39,16 @@ JAVA_TEST_GENTOO_CLASSPATH="junit-4"
JAVA_TEST_SRC_DIR="src/test/java"
src_test() {
if use ppc64; then
# Ignore testMessageHdrMultipleControl
# https://bugs.gentoo.org/866199
# https://github.com/jnr/jnr-posix/issues/178
sed \
-e '/testMessageHdrMultipleControl/i @Ignore' \
-e '/import org.junit.Test/a import org.junit.Ignore;' \
-i src/test/java/jnr/posix/LinuxPOSIXTest.java || die
fi
JAVA_TEST_EXCLUDES=(
# https://github.com/jnr/jnr-posix/blob/jnr-posix-3.1.15/pom.xml#L185
# <exclude>**/windows/*Test.java</exclude>

Binary file not shown.

@ -1,7 +1,5 @@
DIST lua-5.1.5.tar.gz 221213 BLAKE2B 915eb8e8c9d7e460eacf1d7a59309c60dfc0f5d9d3d76fbc9764e7cae85920b95096db1c27b69ac53378a145c29efde403e88166a1332a67150d9d3a897aba02 SHA512 0142fefcbd13afcd9b201403592aa60620011cc8e8559d4d2db2f92739d18186860989f48caa45830ff4f99bfc7483287fd3ff3a16d4dec928e2767ce4d542a9
DIST lua-5.3.4-tests.tar.gz 103438 BLAKE2B ac82708022e7729039111c3df4fe24302c8d0efb224afb4828871ac085a3d64c41d674a6f9369035de01ed1f7f75a3d2ce16917f37e774e923216aac0be03e09 SHA512 79575d100a2efabc8243f55b55d912443e09ef7e8b0219cb93541d85c2ba802fb9538015e1228703f09ca57bdb28a640a8f1fa0735716ba1e4bca2179c712dfb
DIST lua-5.3.6.tar.gz 303770 BLAKE2B 07c37c56f43095a4f6ca8eb8b3adf19afd53107c02b62b2bcb3619565cb2100d5f823493eef93092d5e312b30fc28885a6d9e8f0ba5a23b5bed86dc4515a5d61 SHA512 ccc380d5e114d54504de0bfb0321ca25ec325d6ff1bfee44b11870b660762d1a9bf120490c027a0088128b58bb6b5271bbc648400cab84d2dc22b512c4841681
DIST lua-5.4.2-tests.tar.gz 128901 BLAKE2B 10e4f0e8760f9cbd4761fa26665008ae7412539f79a6a7687029808f08f0ae4a24721e787e2e87e5080c16e9dcce8577a7a39ddc6d3e483a3cfe11756139594e SHA512 1516c59deca211c38444bbf97b18e988e939209b03915d3691d756eeed31b52e8d3a1f05b71ac0b561965274c7b6f3afc4244cd2e9069995696e737e2d9dd40b
DIST lua-5.4.2.tar.gz 353472 BLAKE2B 7e0e642684df635ed1c48db45989e86a2638024e30a170addf700b0c7d32276f1eaef80898539c671039c20cb0bed4861b12c58f4b8211653a17e89bad278d87 SHA512 9454a6ffd973598f2f4a2399834c31c4d5090bd12e716776e3189aa57760319d114ee64a8338bbc2ef5e08150bf0adc2ad94a1b2677f38538a43359969d4d920
DIST lua-5.4.4-tests.tar.gz 134094 BLAKE2B 63f5888a506f504f849fb2000cf551960df8eca3107601dcc8243e8ea5a1b13a70bff7dea4aebe3ab35b7e9df58c2ca44a7a27aa4de82240877eb8d7a017642e SHA512 08b3d764b3f362a2cddf5a23e71b16eea96a234a970fa0048bab358ebbd77f99d9bd132af12254383c5bb5426516e1ce2107e529e88d3963869255f5a41198ef
DIST lua-5.4.4.tar.gz 360876 BLAKE2B 8747ef5c83bd4c54b73eeaad6991ab5fccc54ee000973afd9cf3367b8945f03c54e843ec88c48043003cd9d3b42281c593cb485b7165add2744cfea06d8b7668 SHA512 af0c35d5ba00fecbb2dd617bd7b825edf7418a16a73076e04f2a0df58cdbf098dc3ff4402e974afd789eb5d86d2e12ec6df9c84b99b23656ea694a85f83bcd21

@ -1,151 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit multilib multilib-minimal portability toolchain-funcs
DESCRIPTION="A powerful light-weight programming language designed for extending applications"
HOMEPAGE="https://www.lua.org/"
SRC_URI="https://www.lua.org/ftp/${P}.tar.gz"
LICENSE="MIT"
SLOT="5.1"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="+deprecated readline"
COMMON_DEPEND="
>=app-eselect/eselect-lua-3
readline? ( >=sys-libs/readline-6.2_p5-r1:0=[${MULTILIB_USEDEP}] )
!dev-lang/lua:0"
DEPEND="${COMMON_DEPEND}"
RDEPEND="${COMMON_DEPEND}"
BDEPEND="sys-devel/libtool"
MULTILIB_WRAPPED_HEADERS=(
/usr/include/lua${SLOT}/luaconf.h
)
src_prepare() {
PATCHES=(
"${FILESDIR}/lua-5.1.5-make.patch"
"${FILESDIR}/${PN}-$(ver_cut 1-2)-module_paths.patch"
)
if ! use deprecated ; then
# patches from 5.1.4 still apply
PATCHES+=(
"${FILESDIR}"/${PN}-5.1.4-deprecated.patch
"${FILESDIR}"/${PN}-5.1.4-test.patch
)
fi
if ! use readline ; then
PATCHES+=(
"${FILESDIR}"/${PN}-$(ver_cut 1-2)-readline.patch
)
fi
default
# use glibtool on Darwin (versus Apple libtool)
if [[ ${CHOST} == *-darwin* ]] ; then
sed -i -e '/LIBTOOL = /s:libtool:glibtool:' \
Makefile src/Makefile || die
fi
# correct lua versioning
sed -i -e 's/\(LIB_VERSION = \)6:1:1/\16:5:1/' src/Makefile
sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html
# Using dynamic linked lua is not recommended for performance
# reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519
# Mainly, this is of concern if your arch is poor with GPRs, like x86
# Note that this only affects the interpreter binary (named lua), not the lua
# compiler (built statically) nor the lua libraries.
# A slotted Lua uses different directories for headers & names for
# libraries, and pkgconfig should reflect that.
sed -r -i \
-e "/^INSTALL_INC=/s,(/include)$,\1/lua${SLOT}," \
-e "/^includedir=/s,(/include)$,\1/lua${SLOT}," \
-e "/^Libs:/s,((-llua)($| )),\2${SLOT}\3," \
"${S}"/etc/lua.pc
# custom Makefiles
multilib_copy_sources
}
multilib_src_configure() {
# We want packages to find our things...
sed -i \
-e 's:/usr/local:'${EPREFIX}'/usr:' \
-e "s:\([/\"]\)\<lib\>:\1$(get_libdir):g" \
etc/lua.pc src/luaconf.h || die
}
multilib_src_compile() {
tc-export CC
myflags=
# what to link to liblua
liblibs="-lm"
liblibs="${liblibs} $(dlopen_lib)"
# what to link to the executables
mylibs=
if use readline; then
mylibs="-lreadline"
fi
cd src
emake CC="${CC}" CFLAGS="-DLUA_USE_LINUX ${CFLAGS}" \
RPATH="${EPREFIX}/usr/$(get_libdir)/" \
LUA_LIBS="${mylibs}" \
LIB_LIBS="${liblibs}" \
V=$(ver_cut 1-2) \
gentoo_all
mv lua_test ../test/lua.static
}
multilib_src_install() {
emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
V=${SLOT} gentoo_install
insinto /usr/$(get_libdir)/pkgconfig
newins etc/lua.pc lua${SLOT}.pc
}
multilib_src_install_all() {
DOCS="HISTORY README"
HTML_DOCS="doc/*.html doc/*.png doc/*.css doc/*.gif"
einstalldocs
newman doc/lua.1 lua${SLOT}.1
newman doc/luac.1 luac${SLOT}.1
find "${ED}" -name '*.la' -delete || die
find "${ED}" -name 'liblua*.a' -delete || die
}
multilib_src_test() {
local positive="bisect cf echo env factorial fib fibfor hello printf sieve
sort trace-calls trace-globals"
local negative="readonly"
local test
cd "${BUILD_DIR}" || die
for test in ${positive}; do
test/lua.static test/${test}.lua || die "test $test failed"
done
for test in ${negative}; do
test/lua.static test/${test}.lua && die "test $test failed"
done
}
pkg_postinst() {
eselect lua set --if-unset "${PN}${SLOT}"
if has_version "app-editor/emacs"; then
if ! has_version "app-emacs/lua-mode"; then
einfo "Install app-emacs/lua-mode for lua support for emacs"
fi
fi
}

@ -2,7 +2,8 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit multilib multilib-minimal portability toolchain-funcs
inherit multilib-minimal portability toolchain-funcs
DESCRIPTION="A powerful light-weight programming language designed for extending applications"
HOMEPAGE="https://www.lua.org/"

@ -1,200 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools multilib multilib-minimal portability toolchain-funcs
DESCRIPTION="A powerful light-weight programming language designed for extending applications"
HOMEPAGE="https://www.lua.org/"
TEST_PV="5.3.4"
TEST_P="${PN}-${TEST_PV}-tests"
SRC_URI="
https://www.lua.org/ftp/${P}.tar.gz
test? ( https://www.lua.org/tests/${TEST_P}.tar.gz )"
LICENSE="MIT"
SLOT="5.3"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="+deprecated readline test test-complete"
COMMON_DEPEND="
>=app-eselect/eselect-lua-3
readline? ( sys-libs/readline:0= )
!dev-lang/lua:0"
DEPEND="${COMMON_DEPEND}"
RDEPEND="${COMMON_DEPEND}"
BDEPEND="sys-devel/libtool"
RESTRICT="!test? ( test )"
MULTILIB_WRAPPED_HEADERS=(
/usr/include/lua${SLOT}/luaconf.h
)
PATCHES=(
"${FILESDIR}/lua-5.3.6-make.patch"
)
src_prepare() {
default
# use glibtool on Darwin (versus Apple libtool)
if [[ ${CHOST} == *-darwin* ]] ; then
sed -i -e '/LIBTOOL = /s:/libtool:/glibtool:' \
Makefile src/Makefile || die
fi
# correct lua versioning
sed -i -e 's/\(LIB_VERSION = \)6:1:1/\10:0:0/' src/Makefile || die
sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html || die
if ! use readline ; then
sed -i -e '/#define LUA_USE_READLINE/d' src/luaconf.h || die
fi
# Using dynamic linked lua is not recommended for performance
# reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519
# Mainly, this is of concern if your arch is poor with GPRs, like x86
# Note that this only affects the interpreter binary (named lua), not the lua
# compiler (built statically) nor the lua libraries.
# upstream does not use libtool, but we do (see bug #336167)
cp "${FILESDIR}/configure.in" "${S}/configure.ac" || die
eautoreconf
# custom Makefiles
multilib_copy_sources
}
multilib_src_configure() {
sed -i \
-e 's:\(define LUA_ROOT\s*\).*:\1"'${EPREFIX}'/usr/":' \
-e "s:\(define LUA_CDIR\s*LUA_ROOT \"\)lib:\1$(get_libdir):" \
src/luaconf.h \
|| die "failed patching luaconf.h"
econf
}
multilib_src_compile() {
tc-export CC
# what to link to liblua
liblibs="-lm"
liblibs="${liblibs} $(dlopen_lib)"
# what to link to the executables
mylibs=
use readline && mylibs="-lreadline"
cd src
local myCFLAGS=""
use deprecated && myCFLAGS="-DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2"
case "${CHOST}" in
*-mingw*) : ;;
*) myCFLAGS+=" -DLUA_USE_LINUX" ;;
esac
emake CC="${CC}" CFLAGS="${myCFLAGS} ${CFLAGS}" \
SYSLDFLAGS="${LDFLAGS}" \
RPATH="${EPREFIX}/usr/$(get_libdir)/" \
LUA_LIBS="${mylibs}" \
LIB_LIBS="${liblibs}" \
V=$(ver_cut 1-2) \
gentoo_all
}
multilib_src_install() {
emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
V=${SLOT} gentoo_install
case $SLOT in
0)
LIBNAME="lua"
INCLUDEDIR_SUFFIX=''
;;
*) LIBNAME="lua${SLOT}"
INCLUDEDIR_SUFFIX="/lua${SLOT}"
;;
esac
# We want packages to find our things...
# A slotted Lua uses different directories for headers & names for
# libraries, and pkgconfig should reflect that.
local PATCH_PV=$(ver_cut 1-2)
cp "${FILESDIR}/lua.pc" "${WORKDIR}" || die
sed -r -i \
-e "/^INSTALL_INC=/s,(/include)$,\1/lua${SLOT}," \
-e "s:^prefix= :prefix= ${EPREFIX}:" \
-e "s:^V=.*:V= ${PATCH_PV}:" \
-e "s:^R=.*:R= ${PV}:" \
-e "s:/,lib,:/$(get_libdir):g" \
-e "/^Libs:/s:( )(-llua)($| ):\1-l${LIBNAME}\3:" \
-e "/^includedir=/s:include$:include${INCLUDEDIR_SUFFIX}:" \
"${WORKDIR}/lua.pc" || die
insinto "/usr/$(get_libdir)/pkgconfig"
newins "${WORKDIR}/lua.pc" "lua${SLOT}.pc"
# Copy Debian's symlink support:
# https://salsa.debian.org/lua-team/lua5.3/blob/master/debian/rules#L19
# FreeBSD calls the pkgconfig 'lua-5.3.pc'
# Older systems called it 'lua53.pc'
dosym "lua${SLOT}.pc" "/usr/$(get_libdir)/pkgconfig/lua-${SLOT}.pc"
dosym "lua${SLOT}.pc" "/usr/$(get_libdir)/pkgconfig/lua${SLOT/.}.pc"
}
multilib_src_install_all() {
DOCS="README"
HTML_DOCS="doc/*.html doc/*.png doc/*.css doc/*.gif"
einstalldocs
newman doc/lua.1 lua${SLOT}.1
newman doc/luac.1 luac${SLOT}.1
find "${ED}" -name '*.la' -delete || die
find "${ED}" -name 'liblua*.a' -delete || die
}
# Makefile contains a dummy target that doesn't do tests
# but causes issues with slotted lua (bug #510360)
src_test() {
debug-print-function ${FUNCNAME} "$@"
cd "${WORKDIR}/lua-${TEST_PV}-tests" || die
# https://www.lua.org/tests/
# There are two sets:
# basic
# complete.
#
# The basic subset is selected by passing -e'_U=true'
# The complete set is noted to contain tests that may consume too much memory or have non-portable tests.
# attrib.lua for example needs some multilib customization (have to compile the stuff in libs/ for each ABI)
TEST_OPTS="$(usex test-complete '' '-e_U=true')"
TEST_MARKER="${T}/test.failed"
rm -f "${TEST_MARKER}"
# If we are failing, set the marker file, and only check it after done all ABIs
abi_src_test() {
debug-print-function ${FUNCNAME} "$@"
TEST_LOG="${T}/test.${MULTIBUILD_ID}.log"
eval "${BUILD_DIR}"/src/lua${SLOT} ${TEST_OPTS} all.lua 2>&1 | tee "${TEST_LOG}" || die
grep -sq -e "final OK" "${TEST_LOG}" || echo "FAIL ${MULTIBUILD_ID}" >>"${TEST_MARKER}"
return 0
}
multilib_foreach_abi abi_src_test
if [ -e "${TEST_MARKER}" ]; then
cat "${TEST_MARKER}"
die "Tests failed"
fi
}
pkg_postinst() {
eselect lua set --if-unset "${PN}${SLOT}"
if has_version "app-editor/emacs"; then
if ! has_version "app-emacs/lua-mode"; then
einfo "Install app-emacs/lua-mode for lua support for emacs"
fi
fi
}

@ -2,7 +2,8 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools multilib multilib-minimal portability toolchain-funcs
inherit autotools multilib-minimal portability toolchain-funcs
DESCRIPTION="A powerful light-weight programming language designed for extending applications"
HOMEPAGE="https://www.lua.org/"

@ -1,197 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools multilib multilib-minimal portability toolchain-funcs
DESCRIPTION="A powerful light-weight programming language designed for extending applications"
HOMEPAGE="https://www.lua.org/"
TEST_PV="5.4.2"
TEST_P="${PN}-${TEST_PV}-tests"
SRC_URI="
https://www.lua.org/ftp/${P}.tar.gz
test? ( https://www.lua.org/tests/${TEST_P}.tar.gz )"
LICENSE="MIT"
SLOT="5.4"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="+deprecated readline test test-complete"
COMMON_DEPEND="
>=app-eselect/eselect-lua-3
readline? ( sys-libs/readline:0= )
!dev-lang/lua:0"
DEPEND="${COMMON_DEPEND}"
RDEPEND="${COMMON_DEPEND}"
BDEPEND="sys-devel/libtool"
RESTRICT="!test? ( test )"
MULTILIB_WRAPPED_HEADERS=(
/usr/include/lua${SLOT}/luaconf.h
)
PATCHES=(
"${FILESDIR}"/lua-5.4.2-make.patch
)
src_prepare() {
default
# use glibtool on Darwin (versus Apple libtool)
if [[ ${CHOST} == *-darwin* ]] ; then
sed -i -e '/LIBTOOL = /s:/libtool:/glibtool:' \
Makefile src/Makefile || die
fi
# correct lua versioning
sed -i -e 's/\(LIB_VERSION = \)6:1:1/\10:0:0/' src/Makefile || die
sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html || die
# Using dynamic linked lua is not recommended for performance
# reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519
# Mainly, this is of concern if your arch is poor with GPRs, like x86
# Note that this only affects the interpreter binary (named lua), not the lua
# compiler (built statically) nor the lua libraries.
# upstream does not use libtool, but we do (see bug #336167)
cp "${FILESDIR}/configure.in" "${S}/configure.ac" || die
eautoreconf
# custom Makefiles
multilib_copy_sources
}
multilib_src_configure() {
sed -i \
-e 's:\(define LUA_ROOT\s*\).*:\1"'${EPREFIX}'/usr/":' \
-e "s:\(define LUA_CDIR\s*LUA_ROOT \"\)lib:\1$(get_libdir):" \
src/luaconf.h \
|| die "failed patching luaconf.h"
econf
}
multilib_src_compile() {
tc-export CC
# what to link to liblua
liblibs="-lm"
liblibs="${liblibs} $(dlopen_lib)"
# what to link to the executables
mylibs=
use readline && mylibs="-lreadline"
cd src
local myCFLAGS=""
use deprecated && myCFLAGS+="-DLUA_COMPAT_5_3 "
use readline && myCFLAGS+="-DLUA_USE_READLINE "
case "${CHOST}" in
*-mingw*) : ;;
*) myCFLAGS+="-DLUA_USE_LINUX " ;;
esac
emake CC="${CC}" CFLAGS="${myCFLAGS} ${CFLAGS}" \
SYSLDFLAGS="${LDFLAGS}" \
RPATH="${EPREFIX}/usr/$(get_libdir)/" \
LUA_LIBS="${mylibs}" \
LIB_LIBS="${liblibs}" \
V=$(ver_cut 1-2) \
gentoo_all
}
multilib_src_install() {
emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
V=${SLOT} gentoo_install
case $SLOT in
0)
LIBNAME="lua"
INCLUDEDIR_SUFFIX=''
;;
*) LIBNAME="lua${SLOT}"
INCLUDEDIR_SUFFIX="/lua${SLOT}"
;;
esac
# We want packages to find our things...
# A slotted Lua uses different directories for headers & names for
# libraries, and pkgconfig should reflect that.
local PATCH_PV=$(ver_cut 1-2)
cp "${FILESDIR}/lua.pc" "${WORKDIR}" || die
sed -r -i \
-e "/^INSTALL_INC=/s,(/include)$,\1/lua${SLOT}," \
-e "s:^prefix= :prefix= ${EPREFIX}:" \
-e "s:^V=.*:V= ${PATCH_PV}:" \
-e "s:^R=.*:R= ${PV}:" \
-e "s:/,lib,:/$(get_libdir):g" \
-e "/^Libs:/s:( )(-llua)($| ):\1-l${LIBNAME}\3:" \
-e "/^includedir=/s:include$:include${INCLUDEDIR_SUFFIX}:" \
"${WORKDIR}/lua.pc" || die
insinto "/usr/$(get_libdir)/pkgconfig"
newins "${WORKDIR}/lua.pc" "lua${SLOT}.pc"
# Copy Debian's symlink support:
# https://salsa.debian.org/lua-team/lua5.3/blob/master/debian/rules#L19
# FreeBSD calls the pkgconfig 'lua-5.3.pc'
# Older systems called it 'lua53.pc'
dosym "lua${SLOT}.pc" "/usr/$(get_libdir)/pkgconfig/lua-${SLOT}.pc"
dosym "lua${SLOT}.pc" "/usr/$(get_libdir)/pkgconfig/lua${SLOT/.}.pc"
}
multilib_src_install_all() {
DOCS="README"
HTML_DOCS="doc/*.html doc/*.png doc/*.css doc/*.gif"
einstalldocs
newman doc/lua.1 lua${SLOT}.1
newman doc/luac.1 luac${SLOT}.1
find "${ED}" -name '*.la' -delete || die
find "${ED}" -name 'liblua*.a' -delete || die
}
# Makefile contains a dummy target that doesn't do tests
# but causes issues with slotted lua (bug #510360)
src_test() {
debug-print-function ${FUNCNAME} "$@"
cd "${WORKDIR}/lua-${TEST_PV}-tests" || die
# https://www.lua.org/tests/
# There are two sets:
# basic
# complete.
#
# The basic subset is selected by passing -e'_U=true'
# The complete set is noted to contain tests that may consume too much memory or have non-portable tests.
# attrib.lua for example needs some multilib customization (have to compile the stuff in libs/ for each ABI)
TEST_OPTS="$(usex test-complete '' '-e_U=true')"
TEST_MARKER="${T}/test.failed"
rm -f "${TEST_MARKER}"
# If we are failing, set the marker file, and only check it after done all ABIs
abi_src_test() {
debug-print-function ${FUNCNAME} "$@"
TEST_LOG="${T}/test.${MULTIBUILD_ID}.log"
eval "${BUILD_DIR}"/src/lua${SLOT} ${TEST_OPTS} all.lua 2>&1 | tee "${TEST_LOG}" || die
grep -sq -e "final OK" "${TEST_LOG}" || echo "FAIL ${MULTIBUILD_ID}" >>"${TEST_MARKER}"
return 0
}
multilib_foreach_abi abi_src_test
if [ -e "${TEST_MARKER}" ]; then
cat "${TEST_MARKER}"
die "Tests failed"
fi
}
pkg_postinst() {
eselect lua set --if-unset "${PN}${SLOT}"
if has_version "app-editor/emacs"; then
if ! has_version "app-emacs/lua-mode"; then
einfo "Install app-emacs/lua-mode for lua support for emacs"
fi
fi
}

@ -1,203 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools multilib multilib-minimal portability toolchain-funcs
DESCRIPTION="A powerful light-weight programming language designed for extending applications"
HOMEPAGE="https://www.lua.org/"
TEST_PV="5.4.2"
TEST_P="${PN}-${TEST_PV}-tests"
SRC_URI="
https://www.lua.org/ftp/${P}.tar.gz
test? ( https://www.lua.org/tests/${TEST_P}.tar.gz )"
LICENSE="MIT"
SLOT="5.4"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="+deprecated readline test test-complete"
COMMON_DEPEND="
>=app-eselect/eselect-lua-3
readline? ( sys-libs/readline:0= )
!dev-lang/lua:0"
# Cross-compiling note:
# Must use libtool from the target system (DEPEND) because
# libtool from the build system (BDEPEND) is for building
# native binaries.
DEPEND="
${COMMON_DEPEND}
sys-devel/libtool"
RDEPEND="${COMMON_DEPEND}"
RESTRICT="!test? ( test )"
MULTILIB_WRAPPED_HEADERS=(
/usr/include/lua${SLOT}/luaconf.h
)
PATCHES=(
"${FILESDIR}"/lua-5.4.2-r2-make.patch
)
src_prepare() {
default
# use glibtool on Darwin (versus Apple libtool)
if [[ ${CHOST} == *-darwin* ]] ; then
sed -i -e '/LIBTOOL = /s:/libtool:/glibtool:' \
Makefile src/Makefile || die
fi
# correct lua versioning
sed -i -e 's/\(LIB_VERSION = \)6:1:1/\10:0:0/' src/Makefile || die
sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html || die
# Using dynamic linked lua is not recommended for performance
# reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519
# Mainly, this is of concern if your arch is poor with GPRs, like x86
# Note that this only affects the interpreter binary (named lua), not the lua
# compiler (built statically) nor the lua libraries.
# upstream does not use libtool, but we do (see bug #336167)
cp "${FILESDIR}/configure.in" "${S}/configure.ac" || die
eautoreconf
# custom Makefiles
multilib_copy_sources
}
multilib_src_configure() {
sed -i \
-e 's:\(define LUA_ROOT\s*\).*:\1"'${EPREFIX}'/usr/":' \
-e "s:\(define LUA_CDIR\s*LUA_ROOT \"\)lib:\1$(get_libdir):" \
src/luaconf.h \
|| die "failed patching luaconf.h"
econf
}
multilib_src_compile() {
tc-export CC
# what to link to liblua
liblibs="-lm"
liblibs="${liblibs} $(dlopen_lib)"
# what to link to the executables
mylibs=
use readline && mylibs="-lreadline"
cd src
local myCFLAGS=""
use deprecated && myCFLAGS+="-DLUA_COMPAT_5_3 "
use readline && myCFLAGS+="-DLUA_USE_READLINE "
case "${CHOST}" in
*-mingw*) : ;;
*) myCFLAGS+="-DLUA_USE_LINUX " ;;
esac
emake CC="${CC}" CFLAGS="${myCFLAGS} ${CFLAGS}" \
SYSLDFLAGS="${LDFLAGS}" \
RPATH="${EPREFIX}/usr/$(get_libdir)/" \
LUA_LIBS="${mylibs}" \
LIB_LIBS="${liblibs}" \
V=$(ver_cut 1-2) \
LIBTOOL="${ESYSROOT}/usr/bin/libtool" \
gentoo_all
}
multilib_src_install() {
emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
V=${SLOT} gentoo_install
case $SLOT in
0)
LIBNAME="lua"
INCLUDEDIR_SUFFIX=''
;;
*) LIBNAME="lua${SLOT}"
INCLUDEDIR_SUFFIX="/lua${SLOT}"
;;
esac
# We want packages to find our things...
# A slotted Lua uses different directories for headers & names for
# libraries, and pkgconfig should reflect that.
local PATCH_PV=$(ver_cut 1-2)
cp "${FILESDIR}/lua.pc" "${WORKDIR}" || die
sed -r -i \
-e "/^INSTALL_INC=/s,(/include)$,\1/lua${SLOT}," \
-e "s:^prefix= :prefix= ${EPREFIX}:" \
-e "s:^V=.*:V= ${PATCH_PV}:" \
-e "s:^R=.*:R= ${PV}:" \
-e "s:/,lib,:/$(get_libdir):g" \
-e "/^Libs:/s:( )(-llua)($| ):\1-l${LIBNAME}\3:" \
-e "/^includedir=/s:include$:include${INCLUDEDIR_SUFFIX}:" \
"${WORKDIR}/lua.pc" || die
insinto "/usr/$(get_libdir)/pkgconfig"
newins "${WORKDIR}/lua.pc" "lua${SLOT}.pc"
# Copy Debian's symlink support:
# https://salsa.debian.org/lua-team/lua5.3/blob/master/debian/rules#L19
# FreeBSD calls the pkgconfig 'lua-5.3.pc'
# Older systems called it 'lua53.pc'
dosym "lua${SLOT}.pc" "/usr/$(get_libdir)/pkgconfig/lua-${SLOT}.pc"
dosym "lua${SLOT}.pc" "/usr/$(get_libdir)/pkgconfig/lua${SLOT/.}.pc"
}
multilib_src_install_all() {
DOCS="README"
HTML_DOCS="doc/*.html doc/*.png doc/*.css doc/*.gif"
einstalldocs
newman doc/lua.1 lua${SLOT}.1
newman doc/luac.1 luac${SLOT}.1
find "${ED}" -name '*.la' -delete || die
find "${ED}" -name 'liblua*.a' -delete || die
}
# Makefile contains a dummy target that doesn't do tests
# but causes issues with slotted lua (bug #510360)
src_test() {
debug-print-function ${FUNCNAME} "$@"
cd "${WORKDIR}/lua-${TEST_PV}-tests" || die
# https://www.lua.org/tests/
# There are two sets:
# basic
# complete.
#
# The basic subset is selected by passing -e'_U=true'
# The complete set is noted to contain tests that may consume too much memory or have non-portable tests.
# attrib.lua for example needs some multilib customization (have to compile the stuff in libs/ for each ABI)
TEST_OPTS="$(usex test-complete '' '-e_U=true')"
TEST_MARKER="${T}/test.failed"
rm -f "${TEST_MARKER}"
# If we are failing, set the marker file, and only check it after done all ABIs
abi_src_test() {
debug-print-function ${FUNCNAME} "$@"
TEST_LOG="${T}/test.${MULTIBUILD_ID}.log"
eval "${BUILD_DIR}"/src/lua${SLOT} ${TEST_OPTS} all.lua 2>&1 | tee "${TEST_LOG}" || die
grep -sq -e "final OK" "${TEST_LOG}" || echo "FAIL ${MULTIBUILD_ID}" >>"${TEST_MARKER}"
return 0
}
multilib_foreach_abi abi_src_test
if [ -e "${TEST_MARKER}" ]; then
cat "${TEST_MARKER}"
die "Tests failed"
fi
}
pkg_postinst() {
eselect lua set --if-unset "${PN}${SLOT}"
if has_version "app-editor/emacs"; then
if ! has_version "app-emacs/lua-mode"; then
einfo "Install app-emacs/lua-mode for lua support for emacs"
fi
fi
}

@ -2,7 +2,8 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools multilib multilib-minimal portability toolchain-funcs
inherit autotools multilib-minimal portability toolchain-funcs
DESCRIPTION="A powerful light-weight programming language designed for extending applications"
HOMEPAGE="https://www.lua.org/"

@ -1,13 +1,7 @@
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-3.10.5.tar.xz 19361320 BLAKE2B 7f3629f8a16faeb0311947b7d5162bc45d9ed6b2c051f776027d01ebbbdd42e4849efd67921fa57975f68ec67dc34f3135345ce216f2d3f02bfcfa4245d266f1 SHA512 aa7f58a9b31de9824185b3e7bfa7da0dcf64ae9e89840664eae9d98d9048a650fa012cd5b873a62ff44b65b856db86f095c4003117406ec5e9583ec5f7e78e90
DIST Python-3.10.5.tar.xz.asc 833 BLAKE2B 36da2d557a5c38cfc473b2138412f9bc011d19c8538475e623bf41d81eb2c8f8e977945a3065a48c5b234d2b2c7d0dd5e83112c948591628cec344651dc9055c SHA512 72d0ab09900e2a10b85ccac804efd5536251152798e7347576e0e28bff4ab4a84b08d646329b225f9949047586686f9f4e7f05652526657a0948951b739c14e0
DIST Python-3.10.6.tar.xz 19600672 BLAKE2B b21398f68e13cf8464077aa2c7f08d9044198cc3d2e2829d12239d420c1c922cbad8427f3e0fae3fe62a4b8ebb7db7eff441266eff82f0c78d7a98a62d8e64c3 SHA512 f2bf424bf4f4caa524ee1248b431e8e06d0745c3fc3ba457710d75f3698e653733feb4b059cd124f1de2a9e851c30d847f567aa47abef12898c9dc8a6507b476
DIST Python-3.10.6.tar.xz.asc 833 BLAKE2B ea6546c01a4fbfe3f3e56b2f980da53f0692d9c638534bd25fb96a0f657424f979b6a82a01c77c05ddfded30441b4a0348cc407d5b29290ffc653a508ca32ec8 SHA512 9288e2f62f2e8c8208ad176372261545a64e675d737bb616403bcd888bc91177909257632e4cc0b5d688d612bea38a274030ec6989dc7d56c03064e32ad9903e
DIST Python-3.11.0b4.tar.xz 19573532 BLAKE2B d28b85c4af39ea8c8b1448857698a7018c9d115f0f861ff1649101e4c9d3ebbea14e1f5da8158b1734bf8743d96ed3683a8192e07ff06c0ccd964ec7ddee3832 SHA512 1530f4dcba6325ac8e9bb955604fc504a4306e3291b667d1d8490b78e1c50924d81ff8ab50d08c736e70d3e42788aabaa162179a77c03860ee8064f17f93bb09
DIST Python-3.11.0b4.tar.xz.asc 833 BLAKE2B eaedd106d3599c7ee6974ff9eee33899b119fdb45ab5b760f5f02e51e12ba58b3161f6853464a32638385fd596ddd350097c28dde55e3efeacc6719f16275d84 SHA512 8f6c633911755767d351fc86e031df6cedd6091ca5ec0ef55331ac65d2ad532c71e568c173513a2bbb2235e5e3fc9dd77e1b7ed230df1f0d8bd6e23da470b1e2
DIST Python-3.11.0b5.tar.xz 19792136 BLAKE2B 574ed58b2d063b954931c39c1154e776f5d233fe6e3f0803e5a93b68f48aacef1d9df60a2839df952b631d8988d6c44fee073dae5486420b808866944a3025d5 SHA512 b1013e449c9a0e9b61df5a266b5f05458d284b3524c6c44d44d8a5007bcb95ff754f21296cd695f353111575c7cce71f8a2808a9adf8c573512bf97f691d2200
DIST Python-3.11.0b5.tar.xz.asc 833 BLAKE2B 80594608751a141a6e5ded035c4de1a73716d72442228fa2dfcffc10d1ccb9928b864591fad4b5fb3a55e20629a22ad92fcc4a40d8e294858a85088b26d545af SHA512 6f658c7623e7750c0c8c18b4a2fe86d6a2414f3b411487ca4d2dd9840165ae3e6eea8b3468b1376862181b7b58d3fe99681a00d290172a6986f0f2ead5d6c3bd
DIST Python-3.11.0rc1.tar.xz 19815524 BLAKE2B 7dae240dbed052667b46927ccbb483a717b0fe0ba199721d526354d1b89a6dd2842ab0f6c3b078385e4acb7557d06f252d61aacb07d70c7f5598ed91567d2053 SHA512 2a72ea59277f8115e418ced671969fc0d5ba271c7740f70c665a4b450a59d7752278d061bd59f136dacfa608ed167f983c6589b214a973b1b63ea2115ea298bb
DIST Python-3.11.0rc1.tar.xz.asc 833 BLAKE2B da46a0ab62ef3f2b7a7921294a0d775ca6ab254e3229338232b3d11107aa1d74adc21911678f08f44cc1cd9184beada00d4b60dde60722ef91a247367b13e191 SHA512 d4cffc90c2ed7b8ea7228a21f7ac902a92f27003f1420ad751b1691de950974ea174cb0471b6e19ed1548dc5382012fa9ad5fcf83c34646c7ea2d73c88799e38
DIST Python-3.8.13.tar.xz 19023016 BLAKE2B d3cb8624496e56d93d34f2aa5082746869a99210197529bc19e6a9d265f4ce246e0e83a3528a7602a28aac8855bf84e6bf6495b85e9202fcf04ef90600cb5e43 SHA512 5c732b5d21b189b99a0e9ccd3ae59466bed60a930d5d3f437a262d38f0797b776cecbf12a1852eaebcfb638a6f2e28e471cc2ebf94237cc728144be21842cb81
@ -15,18 +9,7 @@ DIST Python-3.8.13.tar.xz.asc 833 BLAKE2B 918894777e1a783f2a7c7958a808610631cb7a
DIST Python-3.9.13.tar.xz 19754368 BLAKE2B 4f583f66c28b791e19cd6d79695fe9eb815fd333542be22aec8bd73d1f4d3f17f2c4e9de198e7b16c1ca6362a613a8a02fb965c7dc7db3e510fd31de15ba2d19 SHA512 e9664e7f908092df11236b22465d217531d6f0378e88d889108d19fe77f28f46ffb629b8733f84b41409e255367321893a2b1bd64518930d9d8cae5d1b774d23
DIST Python-3.9.13.tar.xz.asc 833 BLAKE2B db01c01be9d56cd15f9ab4a9e2cfa800faf4ebecb92b01c133865d3b3134bc910258a33b766306c3d01f98e35bbf9c03c7cba697760b7095999cbd63ed6c276c SHA512 9367afe8ec32195adbb64fa32eb9e3881cfdbbb38efcb5e0804a15486232aecbc81ed20a8ffed652f06a881744f3efd2c2df3cc652d70671c94d6668a17a391e
DIST python-gentoo-patches-2.7.18_p15.tar.xz 34956 BLAKE2B d173f276dd9c0ce31004dcc55a0d18e9ce25a47683c2df3c4dd62e967dfbbb35be59a2f08cf20f30a19475a8a2344dd95b17400eafa88b5fdbe9270a12ccbf32 SHA512 d9386808265f978808e5c0ffd384cefe54fb0e05aeccfd394167d5227d9cd66e25c8e93c54914762b2cfc3c2dd851b26a7a84d62634c6aa8a0798aacbb7ac25f
DIST python-gentoo-patches-3.10.5.tar.xz 8584 BLAKE2B d4a812a33e485b1eae5629e519dca4dc6625b743b07c7f7bbc62562f345d87723ba499893702310b1e96e443d2946e27a8d4971f32ca1125d4827d0d594ccaa6 SHA512 77f0478f7d0491e103857a83a97d6e04a9ec68740a7f9357cbbdd316462e7d98ea8236bd05a30e7556457ece5fbcfa4a7a78a25d4eb12779455ce2bb5b6f30d0
DIST python-gentoo-patches-3.10.6.tar.xz 8580 BLAKE2B 4ff3839be2f6bf172acdca22bbded702804809d6334e088190cee4ae4c61e25580a3bdc105bfe27b7f3c3b5f219d363cdca21ef895a3e91f13515afb348a77a0 SHA512 c58a85f7c48a4e822527411a6e0618be5408e1a82fe72b21a254dac77b4e5d4b01ac24cf70dc277cd16ccdc8499a9fa53b7cebae3b9f8facc9c978adcc8a2876
DIST python-gentoo-patches-3.10.6_p1.tar.xz 10592 BLAKE2B 0b0f54faf93e3b6a3ba5ae5fef01ff4adbb1560e3d5c0c8e7d69d80e2e10b15e7fc7f5471f82d5322c86a1eec762f10cda6e8ea650c993481342cda06a47a863 SHA512 c4a2ff7d16042729f5a23222d154bc0832f51b7ab5b1dafe4a6c6bd40b037c85a6d40d07516c1207cd0bc9a233865700d7cca4b01ed27a1f21516392992bc6eb
DIST python-gentoo-patches-3.10.6_p2.tar.xz 12040 BLAKE2B 75c93fab19137a966b3775308bc20142f4d3648bbb9364e82c4eaffae93beda54011192881c52b85d2e2493a06cfe2a90f50675609908c3d5ebdb0103fe41644 SHA512 7e451a8a18a62592c2cd7b2db71065b77256960f43e172a0d7856b22b69138dcb1552f53b39bec14585a761cfe729c81613551c1b616fe1ec8d2b59856b11453
DIST python-gentoo-patches-3.11.0b4.tar.xz 4388 BLAKE2B 16b112f1ecdce86022ed64d7c7007fb323b7bd4497b5802a48bb0a86667c282d1a9150d744f44cefbe9321af4916d35941707c1259a0cf175c0161c8e1b17e97 SHA512 f9c8c7180da20e839a0862571b9077b2702dbee8a1acd55ebb11329912cf9f81862ba615be484b92d39461c3eb6c38890f8d58bcbce2c4722418a967faedc1f5
DIST python-gentoo-patches-3.11.0b5.tar.xz 4384 BLAKE2B b036e9103f8315d6e2bb6e85a2db12ec60f8e05ccff083183f24c0b4ba16c807a2eb1fa43b88f8d7a253d5bbeef0880b31d60e13b449f7de992156319753ef33 SHA512 af6315f97b0f2463d6c0f18a99a5ff5f96c3d18567ae0d73461f0fc82ca2173a8f6c3fedc2fada2b9460547a457d4264bc2acb90f1906599229afe85bcc2afde
DIST python-gentoo-patches-3.11.0rc1.tar.xz 4384 BLAKE2B 31bcdc055bfaf3434dbb02543aaf66910eaccd01808d9a0e57bf7cb3b097fc0046c00ac44737d9c37e3b6d074c524f4dd3ab439a741e66d74a0425889ecaead5 SHA512 05b044e2d8f881c471528600ee300bfd9cf5160609dfb3d7cbdb8e43f47b681542582a85de97e28e6a3b89a3fb6c8d7398e029d31e20cea9c5a2a71700382d4e
DIST python-gentoo-patches-3.8.13_p2.tar.xz 18816 BLAKE2B 8612ca33e5569319c5d1a5a3fb1a81e860bd515bfde656b79f087ccf7020923fbd06b315178bef8630e4c36bb22c27299fe439aadc6a161f1ec93be8778314ee SHA512 be5668a0a4be0a03e61466436973125a3be4f33a61524e4a5c8d86745727cfcae59e5048477887c9f6bfc09727f3aef3652ad47a13a6bf0f1452d3172f1c34dc
DIST python-gentoo-patches-3.8.13_p4.tar.xz 23084 BLAKE2B 44be6b19275189bd04c9dcd3c4be4f4b8f92a0003710a12a12d60c0ab182942993a76d8d7f26b289cd0a4226eeeb9a39723822dfb896307fd6e75d6980c3898e SHA512 b78a39a15d361aed4ce887b4726c7967c09c0ee3add614f1dbca24b6f301bd20660fe074c03a58b325f8720ad853c109b334e41102de0b6cc362c467fb669feb
DIST python-gentoo-patches-3.8.13_p5.tar.xz 26620 BLAKE2B 24d05e3f46acf339d2e1d0d86efdb6b61719c09aba08879397df6ed40ce41a5bae892f3677bbafe694b4ced5b469a81c27c4002c1de271565a6cd413e627ae7c SHA512 d18d4e6a5fc10990e9ce1cdda311016e9486d6aa90ad73bcd6e306ffe89ca180ae81a905b3b8d94569e0834103e77d5fffea34238b7aeaec8aeeeaf04fb2f72b
DIST python-gentoo-patches-3.8.13_p6.tar.xz 27968 BLAKE2B 0cafbdfed47e0d58a9798c1e090abb17428472f769ebe4125cf1210218b90bcfd2ad8790fafbfdc1daccc51078a6bf5e068157f05151c2283eb80d5fe128d85c SHA512 b23d51478cc126a6f7f3d1d6d2302a13f3e873a3fac19c7b2b86b79f4b25bd421b60e5ecbe9bb606ee0eedc0e6871d20c0befd1b6596b525bf6ef79a19230ae2
DIST python-gentoo-patches-3.9.13.tar.xz 12836 BLAKE2B ba687a3d6e00baf4d9640ab78a29c3e21bf1872b5019198991521cf37bb0780f592db742ee4fdfe6bfb1cab1c1f6587889dfdb024cae72766b6c83c2ffe319be SHA512 e393992ff92625771c6ffeb500637862f0163c689c685fd245a6e5bbdd3128154ce439ecab56eaf1359e67ea0d173dfb19f65a4098ea2266922bfb43aba517dc
DIST python-gentoo-patches-3.9.13_p1.tar.xz 17036 BLAKE2B baf534d002c610426f9f183f53b935d83a4cf084834d3946986baa5d983e8197719b1d3e8568cc7f78a6aaa95b084dd8796e8539169415e19f2d9eb8f296242a SHA512 c7eb503defcc5e91d5de39eed84aeba748f96ef28f0d9ae3b3a98f111543d09311f51ae4fe321ec5f397c5f46dc8c715ecc401124f4e4a94c9fe8e2a6db9e052
DIST python-gentoo-patches-3.9.13_p2.tar.xz 20708 BLAKE2B e86a80405683228211ea763523e71aa130f716a19d4e343ec46d1d428804cd59d07cdad0efea09b09d92139bdec93f40f7667db20240b89ed3a7a6bb46b0981f SHA512 1e9f84d0cde9a251e191b3784ec551a307572e779350e7d20ace0164f6cbc47b883632ebc32638a8f5f16f9c0d618a13d9105ef471657a9745bc6a09bf1d13d9
DIST python-gentoo-patches-3.9.13_p4.tar.xz 22072 BLAKE2B a0e084eff35d075d2255b139d0db114d282cb6c9c0c2ea51a8ecb7f5f1dc8096d6578ae5f804b7583a2b7842152b5723ad802ca816d46813c40aaa756118afc8 SHA512 cdf8d43fd5263c4956be234f36c0767215ab2495705d4f2a060b32ecbfbe159e618e31693b0538a1b970f7b27ebe4953063f585930d074dcaf59f2f61486e6b6

@ -1,408 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
WANT_LIBTOOL="none"
inherit autotools check-reqs flag-o-matic multiprocessing pax-utils \
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/"
SRC_URI="
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
verify-sig? (
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
)
"
S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="bluetooth build examples gdbm hardened libedit lto +ncurses pgo +readline +sqlite +ssl test tk wininst +xml"
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-lang/python-exec[python_targets_python3_10(-)]
dev-libs/libffi:=
sys-apps/util-linux:=
>=sys-libs/zlib-1.1.3:=
virtual/libcrypt:=
virtual/libintl
gdbm? ( sys-libs/gdbm:=[berkdb] )
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
)
xml? ( >=dev-libs/expat-2.1:= )
!!<sys-apps/sandbox-2.21
"
# bluetooth requires headers from bluez
DEPEND="
${RDEPEND}
bluetooth? ( net-wireless/bluez )
test? ( app-arch/xz-utils[extra-filters(+)] )
"
# autoconf-archive needed to eautoreconf
BDEPEND="
sys-devel/autoconf-archive
virtual/awk
virtual/pkgconfig
verify-sig? ( sec-keys/openpgp-keys-python )
!sys-devel/gcc[libffi(-)]
"
RDEPEND+="
build? ( app-misc/mime-types )
"
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/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}
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, libffi and zlib are not used.
rm -fr Modules/expat || die
rm -fr Modules/_ctypes/libffi* || die
rm -fr Modules/zlib || die
local PATCHES=(
"${WORKDIR}/${PATCHSET}"
)
default
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
# force correct number of jobs
# https://bugs.gentoo.org/737660
local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
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() {
local disable
# disable automagic bluetooth headers detection
use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
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"
use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
export PYTHON_DISABLE_MODULES="${disable}"
if ! use xml; then
ewarn "You have configured Python without XML support."
ewarn "This is NOT a recommended configuration as you"
ewarn "may face problems parsing any XML documents."
fi
if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
fi
append-flags -fwrapv
filter-flags -malign-double
# https://bugs.gentoo.org/700012
if is-flagq -flto || is-flagq '-flto=*'; then
append-cflags $(test-flags-CC -ffat-lto-objects)
fi
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
tc-export CXX
# Fix implicit declarations on cross and prefix builds. Bug #674070.
use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
local dbmliborder
if use gdbm; then
dbmliborder+="${dbmliborder:+:}gdbm"
fi
if use pgo; then
local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
export PROFILE_TASK="-m test -j${jobs} --pgo-extended -x test_gdb -u-network"
# All of these seem to occasionally hang for PGO inconsistently
# They'll even hang here but be fine in src_test sometimes.
# bug #828535 (and related: bug #788022)
PROFILE_TASK+=" -x test_socket -x test_asyncio -x test_httpservers -x test_logging -x test_multiprocessing_fork -x test_xmlrpc"
if has_version "app-arch/rpm" ; then
# Avoid sandbox failure (attempts to write to /var/lib/rpm)
PROFILE_TASK+=" -x test_distutils"
fi
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
--with-system-expat
--with-system-ffi
$(use_with lto)
$(use_enable pgo optimizations)
$(use_with readline readline "$(usex libedit editline readline)")
)
# disable implicit optimization/debugging flags
local -x OPT=
# 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=
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
}
src_compile() {
# Ensure sed works as expected
# https://bugs.gentoo.org/594768
local -x LC_ALL=C
# Prevent using distutils bundled by setuptools.
# https://bugs.gentoo.org/823728
export SETUPTOOLS_USE_DISTUTILS=stdlib
# Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
# end up writing bytecode & violating sandbox.
# bug #831897
local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
if use pgo ; then
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
addpredict /usr/lib/python3.10/site-packages
fi
# also need to clear the flags explicitly here or they end up
# in _sysconfigdata*
emake CPPFLAGS= CFLAGS= LDFLAGS=
# Restore saved value from above.
local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
# Work around bug 329499. See also bug 413751 and 457194.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E python
else
pax-mark m python
fi
}
src_test() {
# Tests will not work when cross compiling.
if tc-is-cross-compiler; then
elog "Disabling tests due to crosscompiling."
return
fi
# Skip failing tests.
local skipped_tests="gdb"
if use sparc ; then
# bug #788022
skipped_tests+=" multiprocessing_fork"
skipped_tests+=" multiprocessing_forkserver"
fi
for test in ${skipped_tests}; do
mv "${S}"/Lib/test/test_${test}.py "${T}"
done
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
# workaround https://bugs.gentoo.org/775416
addwrite /usr/lib/python3.10/site-packages
local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
emake test EXTRATESTOPTS="-u-network -j${jobs}" \
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
local result=$?
for test in ${skipped_tests}; do
mv "${T}/test_${test}.py" "${S}"/Lib/test
done
elog "The following tests have been skipped:"
for test in ${skipped_tests}; do
elog "test_${test}.py"
done
elog "If you would like to run them, you may:"
elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'"
elog "and run the tests separately."
if [[ ${result} -ne 0 ]]; then
die "emake test failed"
fi
}
src_install() {
local libdir=${ED}/usr/lib/python${PYVER}
emake DESTDIR="${D}" altinstall
# Fix collisions between different slots of Python.
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
# Cheap hack to get version with ABIFLAGS
local abiver=$(cd "${ED}/usr/include"; echo python*)
if [[ ${abiver} != python${PYVER} ]]; then
# Replace python3.X with a symlink to python3.Xm
rm "${ED}/usr/bin/python${PYVER}" || die
dosym "${abiver}" "/usr/bin/python${PYVER}"
# Create python3.X-config symlink
dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
# Create python-3.5m.pc symlink
dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
fi
# python seems to get rebuilt in src_install (bug 569908)
# Work around it for now.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E "${ED}/usr/bin/${abiver}"
else
pax-mark m "${ED}/usr/bin/${abiver}"
fi
use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || 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 "${S}"/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"
local -x EPYTHON=python${PYVER}
# if not using a cross-compiler, use the fresh binary
if ! tc-is-cross-compiler; then
cat > python.wrap <<-EOF || die
#!/bin/sh
export LD_LIBRARY_PATH=\${PWD}\${LD_LIBRARY_PATH+:\${LD_LIBRARY_PATH}}
exec ./python "\${@}"
EOF
chmod +x python.wrap || die
local -x PYTHON=./python.wrap
else
local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
fi
echo "EPYTHON='${EPYTHON}'" > epython.py || die
python_domodule epython.py
# python-exec wrapping support
local pymajor=${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,408 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
WANT_LIBTOOL="none"
inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
inherit python-utils-r1 toolchain-funcs verify-sig
MY_PV=${PV/_rc/rc}
MY_P="Python-${MY_PV%_p*}"
PYVER=$(ver_cut 1-2)
PATCHSET="python-gentoo-patches-${MY_PV}"
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
HOMEPAGE="
https://www.python.org/
https://github.com/python/cpython/
"
SRC_URI="
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
verify-sig? (
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
)
"
S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="
bluetooth build +ensurepip examples gdbm hardened libedit lto
+ncurses pgo +readline +sqlite +ssl test tk +xml
"
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-lang/python-exec[python_targets_python3_10(-)]
dev-libs/libffi:=
sys-apps/util-linux:=
>=sys-libs/zlib-1.1.3:=
virtual/libcrypt:=
virtual/libintl
ensurepip? ( dev-python/ensurepip-wheels )
gdbm? ( sys-libs/gdbm:=[berkdb] )
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
)
xml? ( >=dev-libs/expat-2.1:= )
!!<sys-apps/sandbox-2.21
"
# bluetooth requires headers from bluez
DEPEND="
${RDEPEND}
bluetooth? ( net-wireless/bluez )
test? ( app-arch/xz-utils[extra-filters(+)] )
"
# autoconf-archive needed to eautoreconf
BDEPEND="
sys-devel/autoconf-archive
virtual/awk
virtual/pkgconfig
verify-sig? ( sec-keys/openpgp-keys-python )
!sys-devel/gcc[libffi(-)]
"
RDEPEND+="
!build? ( app-misc/mime-types )
"
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/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}
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"
use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
export PYTHON_DISABLE_MODULES="${disable}"
if ! use xml; then
ewarn "You have configured Python without XML support."
ewarn "This is NOT a recommended configuration as you"
ewarn "may face problems parsing any XML documents."
fi
if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
fi
append-flags -fwrapv
filter-flags -malign-double
# https://bugs.gentoo.org/700012
if is-flagq -flto || is-flagq '-flto=*'; then
append-cflags $(test-flags-CC -ffat-lto-objects)
fi
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
# PKG_CONFIG needed for cross.
tc-export CXX PKG_CONFIG
# Fix implicit declarations on cross and prefix builds. Bug #674070.
if use ncurses; then
append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
fi
local dbmliborder=
if use gdbm; then
dbmliborder+="${dbmliborder:+:}gdbm"
fi
if use pgo; then
local profile_task_flags=(
-m test
"-j$(makeopts_jobs)"
--pgo-extended
-x test_gdb
-u-network
# All of these seem to occasionally hang for PGO inconsistently
# They'll even hang here but be fine in src_test sometimes.
# bug #828535 (and related: bug #788022)
-x test_asyncio
-x test_httpservers
-x test_logging
-x test_multiprocessing_fork
-x test_socket
-x test_xmlrpc
)
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
--with-system-expat
--with-system-ffi
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
$(use_with lto)
$(use_enable pgo optimizations)
$(use_with readline readline "$(usex libedit editline readline)")
)
# disable implicit optimization/debugging flags
local -x OPT=
# 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=
econf "${myeconfargs[@]}"
if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
eerror "configure has detected that the sem_open function is broken."
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
die "Broken sem_open function (bug 496328)"
fi
# install epython.py as part of stdlib
echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
}
src_compile() {
# Ensure sed works as expected
# https://bugs.gentoo.org/594768
local -x LC_ALL=C
# Prevent using distutils bundled by setuptools.
# https://bugs.gentoo.org/823728
export SETUPTOOLS_USE_DISTUTILS=stdlib
# Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
# end up writing bytecode & violating sandbox.
# bug #831897
local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
if use pgo ; then
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
addpredict /usr/lib/python3.10/site-packages
fi
# also need to clear the flags explicitly here or they end up
# in _sysconfigdata*
emake CPPFLAGS= CFLAGS= LDFLAGS=
# Restore saved value from above.
local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
# Work around bug 329499. See also bug 413751 and 457194.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E python
else
pax-mark m python
fi
}
src_test() {
# Tests will not work when cross compiling.
if tc-is-cross-compiler; then
elog "Disabling tests due to crosscompiling."
return
fi
local test_opts=(
-u-network
-j "$(makeopts_jobs)"
# fails
-x test_gdb
)
if use sparc ; then
# bug #788022
test_opts+=(
-x test_multiprocessing_fork
-x test_multiprocessing_forkserver
)
fi
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
# workaround https://bugs.gentoo.org/775416
addwrite /usr/lib/python3.10/site-packages
emake test EXTRATESTOPTS="${test_opts[*]}" \
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty || die "emake test failed"
}
src_install() {
local libdir=${ED}/usr/lib/python${PYVER}
emake DESTDIR="${D}" altinstall
# Fix collisions between different slots of Python.
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
# Cheap hack to get version with ABIFLAGS
local abiver=$(cd "${ED}/usr/include"; echo python*)
if [[ ${abiver} != python${PYVER} ]]; then
# Replace python3.X with a symlink to python3.Xm
rm "${ED}/usr/bin/python${PYVER}" || die
dosym "${abiver}" "/usr/bin/python${PYVER}"
# Create python3.X-config symlink
dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
# Create python-3.5m.pc symlink
dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
fi
# python seems to get rebuilt in src_install (bug 569908)
# Work around it for now.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E "${ED}/usr/bin/${abiver}"
else
pax-mark m "${ED}/usr/bin/${abiver}"
fi
rm -r "${libdir}"/ensurepip/_bundled || die
if ! use ensurepip; then
rm -r "${libdir}"/ensurepip || die
fi
if ! use sqlite; then
rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
fi
if ! use tk; then
rm -r "${ED}/usr/bin/idle${PYVER}" || die
rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
fi
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,408 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
WANT_LIBTOOL="none"
inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
inherit python-utils-r1 toolchain-funcs verify-sig
MY_PV=${PV/_rc/rc}
MY_P="Python-${MY_PV%_p*}"
PYVER=$(ver_cut 1-2)
PATCHSET="python-gentoo-patches-${MY_PV}"
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
HOMEPAGE="
https://www.python.org/
https://github.com/python/cpython/
"
SRC_URI="
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
verify-sig? (
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
)
"
S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="
bluetooth build +ensurepip examples gdbm hardened libedit lto
+ncurses pgo +readline +sqlite +ssl test tk +xml
"
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-lang/python-exec[python_targets_python3_10(-)]
dev-libs/libffi:=
sys-apps/util-linux:=
>=sys-libs/zlib-1.1.3:=
virtual/libcrypt:=
virtual/libintl
ensurepip? ( dev-python/ensurepip-wheels )
gdbm? ( sys-libs/gdbm:=[berkdb] )
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
)
xml? ( >=dev-libs/expat-2.1:= )
!!<sys-apps/sandbox-2.21
"
# bluetooth requires headers from bluez
DEPEND="
${RDEPEND}
bluetooth? ( net-wireless/bluez )
test? ( app-arch/xz-utils[extra-filters(+)] )
"
# autoconf-archive needed to eautoreconf
BDEPEND="
sys-devel/autoconf-archive
virtual/awk
virtual/pkgconfig
verify-sig? ( sec-keys/openpgp-keys-python )
!sys-devel/gcc[libffi(-)]
"
RDEPEND+="
!build? ( app-misc/mime-types )
"
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/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}
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"
use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
export PYTHON_DISABLE_MODULES="${disable}"
if ! use xml; then
ewarn "You have configured Python without XML support."
ewarn "This is NOT a recommended configuration as you"
ewarn "may face problems parsing any XML documents."
fi
if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
fi
append-flags -fwrapv
filter-flags -malign-double
# https://bugs.gentoo.org/700012
if is-flagq -flto || is-flagq '-flto=*'; then
append-cflags $(test-flags-CC -ffat-lto-objects)
fi
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
# PKG_CONFIG needed for cross.
tc-export CXX PKG_CONFIG
# Fix implicit declarations on cross and prefix builds. Bug #674070.
if use ncurses; then
append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
fi
local dbmliborder=
if use gdbm; then
dbmliborder+="${dbmliborder:+:}gdbm"
fi
if use pgo; then
local profile_task_flags=(
-m test
"-j$(makeopts_jobs)"
--pgo-extended
-x test_gdb
-u-network
# All of these seem to occasionally hang for PGO inconsistently
# They'll even hang here but be fine in src_test sometimes.
# bug #828535 (and related: bug #788022)
-x test_asyncio
-x test_httpservers
-x test_logging
-x test_multiprocessing_fork
-x test_socket
-x test_xmlrpc
)
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
--with-system-expat
--with-system-ffi
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
$(use_with lto)
$(use_enable pgo optimizations)
$(use_with readline readline "$(usex libedit editline readline)")
)
# disable implicit optimization/debugging flags
local -x OPT=
# 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=
econf "${myeconfargs[@]}"
if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
eerror "configure has detected that the sem_open function is broken."
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
die "Broken sem_open function (bug 496328)"
fi
# install epython.py as part of stdlib
echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
}
src_compile() {
# Ensure sed works as expected
# https://bugs.gentoo.org/594768
local -x LC_ALL=C
# Prevent using distutils bundled by setuptools.
# https://bugs.gentoo.org/823728
export SETUPTOOLS_USE_DISTUTILS=stdlib
# Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
# end up writing bytecode & violating sandbox.
# bug #831897
local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
if use pgo ; then
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
addpredict /usr/lib/python3.10/site-packages
fi
# also need to clear the flags explicitly here or they end up
# in _sysconfigdata*
emake CPPFLAGS= CFLAGS= LDFLAGS=
# Restore saved value from above.
local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
# Work around bug 329499. See also bug 413751 and 457194.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E python
else
pax-mark m python
fi
}
src_test() {
# Tests will not work when cross compiling.
if tc-is-cross-compiler; then
elog "Disabling tests due to crosscompiling."
return
fi
local test_opts=(
-u-network
-j "$(makeopts_jobs)"
# fails
-x test_gdb
)
if use sparc ; then
# bug #788022
test_opts+=(
-x test_multiprocessing_fork
-x test_multiprocessing_forkserver
)
fi
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
# workaround https://bugs.gentoo.org/775416
addwrite /usr/lib/python3.10/site-packages
emake test EXTRATESTOPTS="${test_opts[*]}" \
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty || die "emake test failed"
}
src_install() {
local libdir=${ED}/usr/lib/python${PYVER}
emake DESTDIR="${D}" altinstall
# Fix collisions between different slots of Python.
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
# Cheap hack to get version with ABIFLAGS
local abiver=$(cd "${ED}/usr/include"; echo python*)
if [[ ${abiver} != python${PYVER} ]]; then
# Replace python3.X with a symlink to python3.Xm
rm "${ED}/usr/bin/python${PYVER}" || die
dosym "${abiver}" "/usr/bin/python${PYVER}"
# Create python3.X-config symlink
dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
# Create python-3.5m.pc symlink
dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
fi
# python seems to get rebuilt in src_install (bug 569908)
# Work around it for now.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E "${ED}/usr/bin/${abiver}"
else
pax-mark m "${ED}/usr/bin/${abiver}"
fi
rm -r "${libdir}"/ensurepip/_bundled || die
if ! use ensurepip; then
rm -r "${libdir}"/ensurepip || die
fi
if ! use sqlite; then
rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
fi
if ! use tk; then
rm -r "${ED}/usr/bin/idle${PYVER}" || die
rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
fi
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
}

@ -28,7 +28,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
KEYWORDS="~alpha ~amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="
bluetooth build +ensurepip examples gdbm hardened libedit lto
+ncurses pgo +readline +sqlite +ssl test tk +xml

@ -1,475 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
WANT_LIBTOOL="none"
inherit autotools check-reqs flag-o-matic multiprocessing pax-utils \
python-utils-r1 toolchain-funcs verify-sig
MY_PV=${PV/_beta/b}
MY_P="Python-${MY_PV%_p*}"
PYVER=$(ver_cut 1-2)
PATCHSET="python-gentoo-patches-${MY_PV}"
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
HOMEPAGE="
https://www.python.org/
https://github.com/python/cpython/
"
SRC_URI="
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
verify-sig? (
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
)
"
S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="bluetooth build examples gdbm hardened libedit lto +ncurses pgo +readline +sqlite +ssl test tk wininst"
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:=
sys-apps/util-linux:=
>=sys-libs/zlib-1.1.3:=
virtual/libcrypt:=
virtual/libintl
gdbm? ( sys-libs/gdbm:=[berkdb] )
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
)
!!<sys-apps/sandbox-2.21
"
# bluetooth requires headers from bluez
DEPEND="
${RDEPEND}
bluetooth? ( net-wireless/bluez )
test? ( app-arch/xz-utils[extra-filters(+)] )
"
# autoconf-archive needed to eautoreconf
BDEPEND="
sys-devel/autoconf-archive
virtual/awk
virtual/pkgconfig
verify-sig? ( sec-keys/openpgp-keys-python )
!sys-devel/gcc[libffi(-)]
"
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=${BROOT}/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}
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, libffi and zlib are not used.
rm -fr Modules/expat || die
rm -fr Modules/_ctypes/libffi* || die
rm -fr Modules/zlib || die
local PATCHES=(
"${WORKDIR}/${PATCHSET}"
)
default
# https://bugs.gentoo.org/850151
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" setup.py || die
# force correct number of jobs
# https://bugs.gentoo.org/737660
local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
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() {
local disable
# disable automagic bluetooth headers detection
use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
append-flags -fwrapv
filter-flags -malign-double
# https://bugs.gentoo.org/700012
if is-flagq -flto || is-flagq '-flto=*'; then
append-cflags $(test-flags-CC -ffat-lto-objects)
fi
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
# PKG_CONFIG needed for cross.
tc-export CXX PKG_CONFIG
# Fix implicit declarations on cross and prefix builds. Bug #674070.
use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
local dbmliborder
if use gdbm; then
dbmliborder+="${dbmliborder:+:}gdbm"
fi
if use pgo; then
local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
export PROFILE_TASK="-m test -j${jobs} --pgo-extended -x test_gdb -u-network"
# All of these seem to occasionally hang for PGO inconsistently
# They'll even hang here but be fine in src_test sometimes.
# bug #828535 (and related: bug #788022)
PROFILE_TASK+=" -x test_socket -x test_asyncio -x test_httpservers -x test_logging -x test_multiprocessing_fork -x test_xmlrpc"
if has_version "app-arch/rpm" ; then
# Avoid sandbox failure (attempts to write to /var/lib/rpm)
PROFILE_TASK+=" -x test_distutils"
fi
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
--with-system-expat
--with-system-ffi
--with-platlibdir=lib
--with-pkg-config=yes
$(use_with lto)
$(use_enable pgo optimizations)
$(use_with readline readline "$(usex libedit editline readline)")
)
# disable implicit optimization/debugging flags
local -x OPT=
# 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=
if tc-is-cross-compiler ; then
# We need to build our own Python on CBUILD first, and feed it in.
# bug #847910
local myeconfargs_cbuild=(
"${myeconfargs[@]}"
# 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
)
myeconfargs+=(
# Point the imminent CHOST build to the Python we just
# built for CBUILD.
--with-build-python="${WORKDIR}"/${P}-${CBUILD}/python
)
mkdir "${WORKDIR}"/${P}-${CBUILD} || die
pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
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.
emake
popd &> /dev/null || die
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
# 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}
if use pgo ; then
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
addpredict /usr/lib/python3.11/site-packages
fi
# also need to clear the flags explicitly here or they end up
# in _sysconfigdata*
emake CPPFLAGS= CFLAGS= LDFLAGS=
# Restore saved value from above.
local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
# Work around bug 329499. See also bug 413751 and 457194.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E python
else
pax-mark m python
fi
}
src_test() {
# Tests will not work when cross compiling.
if tc-is-cross-compiler; then
elog "Disabling tests due to crosscompiling."
return
fi
# Skip failing tests.
local skipped_tests="gdb"
if use sparc ; then
# bug #788022
skipped_tests+=" multiprocessing_fork"
skipped_tests+=" multiprocessing_forkserver"
fi
for test in ${skipped_tests}; do
mv "${S}"/Lib/test/test_${test}.py "${T}"
done
# Expects to find skipped tests and fails
mv "${S}"/Lib/test/test_tools/test_freeze.py "${T}" || die
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
# workaround https://bugs.gentoo.org/775416
addwrite /usr/lib/python3.11/site-packages
local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
emake test EXTRATESTOPTS="-u-network -j${jobs}" \
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
local result=$?
for test in ${skipped_tests}; do
mv "${T}/test_${test}.py" "${S}"/Lib/test
done
mv "${T}"/test_freeze.py "${S}"/Lib/test/test_tools/test_freeze.py || die
elog "The following tests have been skipped:"
for test in ${skipped_tests}; do
elog "test_${test}.py"
done
elog "If you would like to run them, you may:"
elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'"
elog "and run the tests separately."
if [[ ${result} -ne 0 ]]; then
die "emake test failed"
fi
}
src_install() {
local libdir=${ED}/usr/lib/python${PYVER}
# -j1 hack for now for bug #843458
emake -j1 DESTDIR="${D}" altinstall
# Fix collisions between different slots of Python.
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
# Cheap hack to get version with ABIFLAGS
local abiver=$(cd "${ED}/usr/include"; echo python*)
if [[ ${abiver} != python${PYVER} ]]; then
# Replace python3.X with a symlink to python3.Xm
rm "${ED}/usr/bin/python${PYVER}" || die
dosym "${abiver}" "/usr/bin/python${PYVER}"
# Create python3.X-config symlink
dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
# Create python-3.5m.pc symlink
dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
fi
# python seems to get rebuilt in src_install (bug 569908)
# Work around it for now.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E "${ED}/usr/bin/${abiver}"
else
pax-mark m "${ED}/usr/bin/${abiver}"
fi
use sqlite || rm -r "${libdir}/"sqlite3 || die
use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || 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 "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
sed \
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
-e "s:@PYDOC@:pydoc${PYVER}:" \
-i "${ED}/etc/conf.d/pydoc-${PYVER}" \
"${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
# python-exec wrapping support
local pymajor=${PYVER%.*}
local EPYTHON=python${PYVER}
local scriptdir=${D}$(python_get_scriptdir)
mkdir -p "${scriptdir}" || die
# python and pythonX
ln -s "../../../bin/${abiver}" \
"${scriptdir}/python${pymajor}" || die
ln -s "python${pymajor}" "${scriptdir}/python" || die
# python-config and pythonX-config
# note: we need to create a wrapper rather than symlinking it due
# to some random dirname(argv[0]) magic performed by python-config
cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
#!/bin/sh
exec "${abiver}-config" "\${@}"
EOF
chmod +x "${scriptdir}/python${pymajor}-config" || die
ln -s "python${pymajor}-config" \
"${scriptdir}/python-config" || die
# 2to3, pydoc
ln -s "../../../bin/2to3-${PYVER}" \
"${scriptdir}/2to3" || die
ln -s "../../../bin/pydoc${PYVER}" \
"${scriptdir}/pydoc" || die
# idle
if use tk; then
ln -s "../../../bin/idle${PYVER}" \
"${scriptdir}/idle" || die
fi
}
pkg_postinst() {
local v
for v in ${REPLACING_VERSIONS}; do
if ver_test "${v}" -lt 3.11.0_beta4-r2; then
ewarn "Python 3.11.0b4 has changed its module ABI. The .pyc files"
ewarn "installed previously are no longer valid and will be regenerated"
ewarn "(or ignored) on the next import. This may cause sandbox failures"
ewarn "when installing some packages and checksum mismatches when removing"
ewarn "old versions. To actively prevent this, rebuild all packages"
ewarn "installing Python 3.11 modules, e.g. using:"
ewarn
ewarn " emerge -1v /usr/lib/python3.11/site-packages"
fi
done
}

@ -1,482 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
WANT_LIBTOOL="none"
inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
inherit python-utils-r1 toolchain-funcs verify-sig
MY_PV=${PV/_beta/b}
MY_P="Python-${MY_PV%_p*}"
PYVER=$(ver_cut 1-2)
PATCHSET="python-gentoo-patches-${MY_PV}"
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
HOMEPAGE="
https://www.python.org/
https://github.com/python/cpython/
"
SRC_URI="
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
verify-sig? (
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
)
"
S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="
bluetooth build +ensurepip examples gdbm hardened libedit lto
+ncurses pgo +readline +sqlite +ssl test tk
"
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:=
sys-apps/util-linux:=
>=sys-libs/zlib-1.1.3:=
virtual/libcrypt:=
virtual/libintl
ensurepip? ( dev-python/ensurepip-wheels )
gdbm? ( sys-libs/gdbm:=[berkdb] )
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
)
!!<sys-apps/sandbox-2.21
"
# bluetooth requires headers from bluez
DEPEND="
${RDEPEND}
bluetooth? ( net-wireless/bluez )
test? ( app-arch/xz-utils[extra-filters(+)] )
"
# autoconf-archive needed to eautoreconf
BDEPEND="
sys-devel/autoconf-archive
virtual/awk
virtual/pkgconfig
verify-sig? ( sec-keys/openpgp-keys-python )
!sys-devel/gcc[libffi(-)]
"
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=${BROOT}/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}
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() {
local disable
# 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
# https://bugs.gentoo.org/700012
if is-flagq -flto || is-flagq '-flto=*'; then
append-cflags $(test-flags-CC -ffat-lto-objects)
fi
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
# PKG_CONFIG needed for cross.
tc-export CXX PKG_CONFIG
# Fix implicit declarations on cross and prefix builds. Bug #674070.
if use ncurses; then
append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
fi
local dbmliborder=
if use gdbm; then
dbmliborder+="${dbmliborder:+:}gdbm"
fi
if use pgo; then
local profile_task_flags=(
-m test
"-j$(makeopts_jobs)"
--pgo-extended
-x test_gdb
-u-network
# All of these seem to occasionally hang for PGO inconsistently
# They'll even hang here but be fine in src_test sometimes.
# bug #828535 (and related: bug #788022)
-x test_asyncio
-x test_httpservers
-x test_logging
-x test_multiprocessing_fork
-x test_socket
-x test_xmlrpc
)
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
--with-system-expat
--with-system-ffi
--with-platlibdir=lib
--with-pkg-config=yes
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
$(use_with lto)
$(use_enable pgo optimizations)
$(use_with readline readline "$(usex libedit editline readline)")
)
# disable implicit optimization/debugging flags
local -x OPT=
# 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=
if tc-is-cross-compiler ; then
# We need to build our own Python on CBUILD first, and feed it in.
# bug #847910
local myeconfargs_cbuild=(
"${myeconfargs[@]}"
# 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
)
myeconfargs+=(
# Point the imminent CHOST build to the Python we just
# built for CBUILD.
--with-build-python="${WORKDIR}"/${P}-${CBUILD}/python
)
mkdir "${WORKDIR}"/${P}-${CBUILD} || die
pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
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.
emake
popd &> /dev/null || die
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
# 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}
if use pgo ; then
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
addpredict /usr/lib/python3.11/site-packages
fi
# also need to clear the flags explicitly here or they end up
# in _sysconfigdata*
emake CPPFLAGS= CFLAGS= LDFLAGS=
# Restore saved value from above.
local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
# Work around bug 329499. See also bug 413751 and 457194.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E python
else
pax-mark m python
fi
}
src_test() {
# Tests will not work when cross compiling.
if tc-is-cross-compiler; then
elog "Disabling tests due to crosscompiling."
return
fi
# this just happens to skip test_support.test_freeze that is broken
# without bundled expat
# TODO: get a proper skip for it upstream
local -x LOGNAME=buildbot
local test_opts=(
-u-network
-j "$(makeopts_jobs)"
# fails
-x test_gdb
)
if use sparc ; then
# bug #788022
test_opts+=(
-x test_multiprocessing_fork
-x test_multiprocessing_forkserver
)
fi
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
# workaround https://bugs.gentoo.org/775416
addwrite /usr/lib/python3.11/site-packages
emake test EXTRATESTOPTS="${test_opts[*]}" \
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty || die "emake test failed"
}
src_install() {
local libdir=${ED}/usr/lib/python${PYVER}
# -j1 hack for now for bug #843458
emake -j1 DESTDIR="${D}" altinstall
# Fix collisions between different slots of Python.
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
# Cheap hack to get version with ABIFLAGS
local abiver=$(cd "${ED}/usr/include"; echo python*)
if [[ ${abiver} != python${PYVER} ]]; then
# Replace python3.X with a symlink to python3.Xm
rm "${ED}/usr/bin/python${PYVER}" || die
dosym "${abiver}" "/usr/bin/python${PYVER}"
# Create python3.X-config symlink
dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
# Create python-3.5m.pc symlink
dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
fi
# python seems to get rebuilt in src_install (bug 569908)
# Work around it for now.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E "${ED}/usr/bin/${abiver}"
else
pax-mark m "${ED}/usr/bin/${abiver}"
fi
rm -r "${libdir}"/ensurepip/_bundled || die
if ! use ensurepip; then
rm -r "${libdir}"/ensurepip || die
fi
if ! use sqlite; then
rm -r "${libdir}/"sqlite3 || die
fi
if ! use tk; then
rm -r "${ED}/usr/bin/idle${PYVER}" || die
rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
fi
dodoc Misc/{ACKS,HISTORY,NEWS}
if use examples; then
docinto examples
find Tools -name __pycache__ -exec rm -fr {} + || die
dodoc -r Tools
fi
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
local libname=$(
printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' |
emake --no-print-directory -s -f - 2>/dev/null
)
newins Tools/gdb/libpython.py "${libname}"-gdb.py
newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
sed \
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
-e "s:@PYDOC@:pydoc${PYVER}:" \
-i "${ED}/etc/conf.d/pydoc-${PYVER}" \
"${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
# python-exec wrapping support
local pymajor=${PYVER%.*}
local EPYTHON=python${PYVER}
local scriptdir=${D}$(python_get_scriptdir)
mkdir -p "${scriptdir}" || die
# python and pythonX
ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die
ln -s "python${pymajor}" "${scriptdir}/python" || die
# python-config and pythonX-config
# note: we need to create a wrapper rather than symlinking it due
# to some random dirname(argv[0]) magic performed by python-config
cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
#!/bin/sh
exec "${abiver}-config" "\${@}"
EOF
chmod +x "${scriptdir}/python${pymajor}-config" || die
ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die
# 2to3, pydoc
ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die
ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die
# idle
if use tk; then
ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die
fi
}
pkg_postinst() {
local v
for v in ${REPLACING_VERSIONS}; do
if ver_test "${v}" -lt 3.11.0_beta4-r2; then
ewarn "Python 3.11.0b4 has changed its module ABI. The .pyc files"
ewarn "installed previously are no longer valid and will be regenerated"
ewarn "(or ignored) on the next import. This may cause sandbox failures"
ewarn "when installing some packages and checksum mismatches when removing"
ewarn "old versions. To actively prevent this, rebuild all packages"
ewarn "installing Python 3.11 modules, e.g. using:"
ewarn
ewarn " emerge -1v /usr/lib/python3.11/site-packages"
fi
done
}

@ -1,358 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
WANT_LIBTOOL="none"
inherit autotools flag-o-matic multiprocessing pax-utils \
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/"
SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
verify-sig? (
https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc
)
"
S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="bluetooth build examples gdbm hardened +ncurses +readline +sqlite +ssl test tk wininst +xml"
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-lang/python-exec[python_targets_python3_8(-)]
dev-libs/libffi:=
sys-apps/util-linux:=
>=sys-libs/zlib-1.1.3:=
virtual/libcrypt:=
virtual/libintl
gdbm? ( sys-libs/gdbm:=[berkdb] )
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
)
xml? ( >=dev-libs/expat-2.1:= )
"
# bluetooth requires headers from bluez
DEPEND="
${RDEPEND}
bluetooth? ( net-wireless/bluez )
test? ( app-arch/xz-utils[extra-filters(+)] )
"
BDEPEND="
sys-devel/autoconf-archive
virtual/awk
virtual/pkgconfig
verify-sig? ( sec-keys/openpgp-keys-python )
!sys-devel/gcc[libffi(-)]
"
RDEPEND+="
build? ( app-misc/mime-types )
"
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc
QA_PKGCONFIG_VERSION=${PYVER}
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, libffi and zlib are not used.
rm -fr Modules/expat || die
rm -fr Modules/_ctypes/libffi* || die
rm -fr Modules/zlib || die
local PATCHES=(
"${WORKDIR}/${PATCHSET}"
)
default
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
# force correct number of jobs
# https://bugs.gentoo.org/737660
local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
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() {
local disable
# disable automagic bluetooth headers detection
use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
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"
use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
export PYTHON_DISABLE_MODULES="${disable}"
if ! use xml; then
ewarn "You have configured Python without XML support."
ewarn "This is NOT a recommended configuration as you"
ewarn "may face problems parsing any XML documents."
fi
if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
fi
append-flags -fwrapv
filter-flags -malign-double
# https://bugs.gentoo.org/700012
if is-flagq -flto || is-flagq '-flto=*'; then
append-cflags $(test-flags-CC -ffat-lto-objects)
fi
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
tc-export CXX
# Fix implicit declarations on cross and prefix builds. Bug #674070.
use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
local dbmliborder
if use gdbm; then
dbmliborder+="${dbmliborder:+:}gdbm"
fi
local myeconfargs=(
# glibc-2.30 removes it; since we can't cleanly force-rebuild
# Python on glibc upgrade, remove it proactively to give
# a chance for users rebuilding python before glibc
ac_cv_header_stropts_h=no
--enable-shared
--enable-ipv6
--infodir='${prefix}/share/info'
--mandir='${prefix}/share/man'
--with-computed-gotos
--with-dbmliborder="${dbmliborder}"
--with-libc=
--enable-loadable-sqlite-extensions
--without-ensurepip
--with-system-expat
--with-system-ffi
)
# disable implicit optimization/debugging flags
local -x OPT=
# 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=
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
}
src_compile() {
# Ensure sed works as expected
# https://bugs.gentoo.org/594768
local -x LC_ALL=C
# Prevent using distutils bundled by setuptools.
# https://bugs.gentoo.org/823728
export SETUPTOOLS_USE_DISTUTILS=stdlib
# also need to clear the flags explicitly here or they end up
# in _sysconfigdata*
emake CPPFLAGS= CFLAGS= LDFLAGS=
# Work around bug 329499. See also bug 413751 and 457194.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E python
else
pax-mark m python
fi
}
src_test() {
# Tests will not work when cross compiling.
if tc-is-cross-compiler; then
elog "Disabling tests due to crosscompiling."
return
fi
# Skip failing tests.
local skipped_tests="gdb"
if use sparc ; then
# bug #788022
skipped_tests+=" multiprocessing_fork"
skipped_tests+=" multiprocessing_forkserver"
fi
for test in ${skipped_tests}; do
mv "${S}"/Lib/test/test_${test}.py "${T}"
done
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
emake test EXTRATESTOPTS="-u-network -j${jobs}" \
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
local result=$?
for test in ${skipped_tests}; do
mv "${T}/test_${test}.py" "${S}"/Lib/test
done
elog "The following tests have been skipped:"
for test in ${skipped_tests}; do
elog "test_${test}.py"
done
elog "If you would like to run them, you may:"
elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'"
elog "and run the tests separately."
if [[ ${result} -ne 0 ]]; then
die "emake test failed"
fi
}
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
use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || 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 "${S}"/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"
local -x EPYTHON=python${PYVER}
# if not using a cross-compiler, use the fresh binary
if ! tc-is-cross-compiler; then
cat > python.wrap <<-EOF || die
#!/bin/sh
export LD_LIBRARY_PATH=\${PWD}\${LD_LIBRARY_PATH+:\${LD_LIBRARY_PATH}}
exec ./python "\${@}"
EOF
chmod +x python.wrap || die
local -x PYTHON=./python.wrap
else
local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
fi
echo "EPYTHON='${EPYTHON}'" > epython.py || die
python_domodule epython.py
# python-exec wrapping support
local pymajor=${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,349 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
WANT_LIBTOOL="none"
inherit autotools flag-o-matic multiprocessing pax-utils
inherit python-utils-r1 toolchain-funcs verify-sig
MY_PV=${PV/_rc/rc}
MY_P="Python-${MY_PV%_p*}"
PYVER=$(ver_cut 1-2)
PATCHSET="python-gentoo-patches-${MY_PV}"
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
HOMEPAGE="
https://www.python.org/
https://github.com/python/cpython/
"
SRC_URI="
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
verify-sig? (
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
)
"
S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="
bluetooth build +ensurepip examples gdbm hardened lto +ncurses pgo
+readline +sqlite +ssl test tk wininst +xml
"
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-lang/python-exec[python_targets_python3_8(-)]
dev-libs/libffi:=
sys-apps/util-linux:=
>=sys-libs/zlib-1.1.3:=
virtual/libcrypt:=
virtual/libintl
ensurepip? ( dev-python/ensurepip-wheels )
gdbm? ( sys-libs/gdbm:=[berkdb] )
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
)
xml? ( >=dev-libs/expat-2.1:= )
"
# bluetooth requires headers from bluez
DEPEND="
${RDEPEND}
bluetooth? ( net-wireless/bluez )
test? ( app-arch/xz-utils[extra-filters(+)] )
"
# autoconf-archive needed to eautoreconf
BDEPEND="
sys-devel/autoconf-archive
virtual/awk
virtual/pkgconfig
verify-sig? ( sec-keys/openpgp-keys-python )
!sys-devel/gcc[libffi(-)]
"
RDEPEND+="
!build? ( app-misc/mime-types )
"
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc
QA_PKGCONFIG_VERSION=${PYVER}
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"
use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
export PYTHON_DISABLE_MODULES="${disable}"
if ! use xml; then
ewarn "You have configured Python without XML support."
ewarn "This is NOT a recommended configuration as you"
ewarn "may face problems parsing any XML documents."
fi
if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
fi
append-flags -fwrapv
filter-flags -malign-double
# https://bugs.gentoo.org/700012
if is-flagq -flto || is-flagq '-flto=*'; then
append-cflags $(test-flags-CC -ffat-lto-objects)
fi
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
# PKG_CONFIG needed for cross.
tc-export CXX PKG_CONFIG
# Fix implicit declarations on cross and prefix builds. Bug #674070.
if use ncurses; then
append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
fi
local dbmliborder=
if use gdbm; then
dbmliborder+="${dbmliborder:+:}gdbm"
fi
local myeconfargs=(
# glibc-2.30 removes it; since we can't cleanly force-rebuild
# Python on glibc upgrade, remove it proactively to give
# a chance for users rebuilding python before glibc
ac_cv_header_stropts_h=no
--enable-shared
--enable-ipv6
--infodir='${prefix}/share/info'
--mandir='${prefix}/share/man'
--with-computed-gotos
--with-dbmliborder="${dbmliborder}"
--with-libc=
--enable-loadable-sqlite-extensions
--without-ensurepip
--with-system-expat
--with-system-ffi
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
)
# disable implicit optimization/debugging flags
local -x OPT=
# 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=
econf "${myeconfargs[@]}"
if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
eerror "configure has detected that the sem_open function is broken."
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
die "Broken sem_open function (bug 496328)"
fi
# install epython.py as part of stdlib
echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
}
src_compile() {
# Ensure sed works as expected
# https://bugs.gentoo.org/594768
local -x LC_ALL=C
# Prevent using distutils bundled by setuptools.
# https://bugs.gentoo.org/823728
export SETUPTOOLS_USE_DISTUTILS=stdlib
# also need to clear the flags explicitly here or they end up
# in _sysconfigdata*
emake CPPFLAGS= CFLAGS= LDFLAGS=
# Work around bug 329499. See also bug 413751 and 457194.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E python
else
pax-mark m python
fi
}
src_test() {
# Tests will not work when cross compiling.
if tc-is-cross-compiler; then
elog "Disabling tests due to crosscompiling."
return
fi
local test_opts=(
-u-network
-j "$(makeopts_jobs)"
# fails
-x test_gdb
)
if use sparc ; then
# bug #788022
test_opts+=(
-x test_multiprocessing_fork
-x test_multiprocessing_forkserver
)
fi
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
emake test EXTRATESTOPTS="${test_opts[*]}" \
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty || 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
if ! use wininst; then
rm "${libdir}/distutils/command/"wininst-*.exe || die
fi
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,349 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
WANT_LIBTOOL="none"
inherit autotools flag-o-matic multiprocessing pax-utils
inherit python-utils-r1 toolchain-funcs verify-sig
MY_PV=${PV/_rc/rc}
MY_P="Python-${MY_PV%_p*}"
PYVER=$(ver_cut 1-2)
PATCHSET="python-gentoo-patches-${MY_PV}"
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
HOMEPAGE="
https://www.python.org/
https://github.com/python/cpython/
"
SRC_URI="
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
verify-sig? (
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
)
"
S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="
bluetooth build +ensurepip examples gdbm hardened lto +ncurses pgo
+readline +sqlite +ssl test tk wininst +xml
"
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-lang/python-exec[python_targets_python3_8(-)]
dev-libs/libffi:=
sys-apps/util-linux:=
>=sys-libs/zlib-1.1.3:=
virtual/libcrypt:=
virtual/libintl
ensurepip? ( dev-python/ensurepip-wheels )
gdbm? ( sys-libs/gdbm:=[berkdb] )
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
)
xml? ( >=dev-libs/expat-2.1:= )
"
# bluetooth requires headers from bluez
DEPEND="
${RDEPEND}
bluetooth? ( net-wireless/bluez )
test? ( app-arch/xz-utils[extra-filters(+)] )
"
# autoconf-archive needed to eautoreconf
BDEPEND="
sys-devel/autoconf-archive
virtual/awk
virtual/pkgconfig
verify-sig? ( sec-keys/openpgp-keys-python )
!sys-devel/gcc[libffi(-)]
"
RDEPEND+="
!build? ( app-misc/mime-types )
"
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc
QA_PKGCONFIG_VERSION=${PYVER}
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"
use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
export PYTHON_DISABLE_MODULES="${disable}"
if ! use xml; then
ewarn "You have configured Python without XML support."
ewarn "This is NOT a recommended configuration as you"
ewarn "may face problems parsing any XML documents."
fi
if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
fi
append-flags -fwrapv
filter-flags -malign-double
# https://bugs.gentoo.org/700012
if is-flagq -flto || is-flagq '-flto=*'; then
append-cflags $(test-flags-CC -ffat-lto-objects)
fi
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
# PKG_CONFIG needed for cross.
tc-export CXX PKG_CONFIG
# Fix implicit declarations on cross and prefix builds. Bug #674070.
if use ncurses; then
append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
fi
local dbmliborder=
if use gdbm; then
dbmliborder+="${dbmliborder:+:}gdbm"
fi
local myeconfargs=(
# glibc-2.30 removes it; since we can't cleanly force-rebuild
# Python on glibc upgrade, remove it proactively to give
# a chance for users rebuilding python before glibc
ac_cv_header_stropts_h=no
--enable-shared
--enable-ipv6
--infodir='${prefix}/share/info'
--mandir='${prefix}/share/man'
--with-computed-gotos
--with-dbmliborder="${dbmliborder}"
--with-libc=
--enable-loadable-sqlite-extensions
--without-ensurepip
--with-system-expat
--with-system-ffi
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
)
# disable implicit optimization/debugging flags
local -x OPT=
# 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=
econf "${myeconfargs[@]}"
if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
eerror "configure has detected that the sem_open function is broken."
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
die "Broken sem_open function (bug 496328)"
fi
# install epython.py as part of stdlib
echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
}
src_compile() {
# Ensure sed works as expected
# https://bugs.gentoo.org/594768
local -x LC_ALL=C
# Prevent using distutils bundled by setuptools.
# https://bugs.gentoo.org/823728
export SETUPTOOLS_USE_DISTUTILS=stdlib
# also need to clear the flags explicitly here or they end up
# in _sysconfigdata*
emake CPPFLAGS= CFLAGS= LDFLAGS=
# Work around bug 329499. See also bug 413751 and 457194.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E python
else
pax-mark m python
fi
}
src_test() {
# Tests will not work when cross compiling.
if tc-is-cross-compiler; then
elog "Disabling tests due to crosscompiling."
return
fi
local test_opts=(
-u-network
-j "$(makeopts_jobs)"
# fails
-x test_gdb
)
if use sparc ; then
# bug #788022
test_opts+=(
-x test_multiprocessing_fork
-x test_multiprocessing_forkserver
)
fi
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
emake test EXTRATESTOPTS="${test_opts[*]}" \
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty || 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
if ! use wininst; then
rm "${libdir}/distutils/command/"wininst-*.exe || die
fi
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,402 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
WANT_LIBTOOL="none"
inherit autotools check-reqs flag-o-matic multiprocessing pax-utils \
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/"
SRC_URI="
https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
verify-sig? (
https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc
)
"
S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="bluetooth build examples gdbm hardened lto +ncurses pgo +readline +sqlite +ssl test tk wininst +xml"
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-lang/python-exec[python_targets_python3_9(-)]
dev-libs/libffi:=
sys-apps/util-linux:=
>=sys-libs/zlib-1.1.3:=
virtual/libcrypt:=
virtual/libintl
gdbm? ( sys-libs/gdbm:=[berkdb] )
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
)
xml? ( >=dev-libs/expat-2.1:= )
"
# bluetooth requires headers from bluez
DEPEND="
${RDEPEND}
bluetooth? ( net-wireless/bluez )
test? ( app-arch/xz-utils[extra-filters(+)] )
"
BDEPEND="
virtual/awk
virtual/pkgconfig
sys-devel/autoconf-archive
verify-sig? ( sec-keys/openpgp-keys-python )
!sys-devel/gcc[libffi(-)]
"
RDEPEND+="
!build? ( app-misc/mime-types )
"
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/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}
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, libffi and zlib are not used.
rm -fr Modules/expat || die
rm -fr Modules/_ctypes/libffi* || die
rm -fr Modules/zlib || die
local PATCHES=(
"${WORKDIR}/${PATCHSET}"
)
default
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
# force correct number of jobs
# https://bugs.gentoo.org/737660
local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
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() {
local disable
# disable automagic bluetooth headers detection
use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
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"
use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
export PYTHON_DISABLE_MODULES="${disable}"
if ! use xml; then
ewarn "You have configured Python without XML support."
ewarn "This is NOT a recommended configuration as you"
ewarn "may face problems parsing any XML documents."
fi
if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
fi
append-flags -fwrapv
filter-flags -malign-double
# https://bugs.gentoo.org/700012
if is-flagq -flto || is-flagq '-flto=*'; then
append-cflags $(test-flags-CC -ffat-lto-objects)
fi
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
tc-export CXX
# Fix implicit declarations on cross and prefix builds. Bug #674070.
use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
local dbmliborder
if use gdbm; then
dbmliborder+="${dbmliborder:+:}gdbm"
fi
if use pgo; then
local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
export PROFILE_TASK="-m test -j${jobs} --pgo-extended -x test_gdb -u-network"
# All of these seem to occasionally hang for PGO inconsistently
# They'll even hang here but be fine in src_test sometimes.
# bug #828535 (and related: bug #788022)
PROFILE_TASK+=" -x test_socket -x test_asyncio -x test_httpservers -x test_logging -x test_multiprocessing_fork -x test_xmlrpc"
if has_version "app-arch/rpm" ; then
# Avoid sandbox failure (attempts to write to /var/lib/rpm)
PROFILE_TASK+=" -x test_distutils"
fi
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
--with-system-expat
--with-system-ffi
$(use_with lto)
$(use_enable pgo optimizations)
)
# disable implicit optimization/debugging flags
local -x OPT=
# 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=
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
}
src_compile() {
# Ensure sed works as expected
# https://bugs.gentoo.org/594768
local -x LC_ALL=C
# Prevent using distutils bundled by setuptools.
# https://bugs.gentoo.org/823728
export SETUPTOOLS_USE_DISTUTILS=stdlib
# Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
# end up writing bytecode & violating sandbox.
# bug #831897
local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
if use pgo ; then
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
addpredict /usr/lib/python3.9/site-packages
fi
# also need to clear the flags explicitly here or they end up
# in _sysconfigdata*
emake CPPFLAGS= CFLAGS= LDFLAGS=
# Restore saved value from above.
local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
# Work around bug 329499. See also bug 413751 and 457194.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E python
else
pax-mark m python
fi
}
src_test() {
# Tests will not work when cross compiling.
if tc-is-cross-compiler; then
elog "Disabling tests due to crosscompiling."
return
fi
# Skip failing tests.
local skipped_tests="gdb"
if use sparc ; then
# bug #788022
skipped_tests+=" multiprocessing_fork"
skipped_tests+=" multiprocessing_forkserver"
fi
for test in ${skipped_tests}; do
mv "${S}"/Lib/test/test_${test}.py "${T}"
done
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
emake test EXTRATESTOPTS="-u-network -j${jobs}" \
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
local result=$?
for test in ${skipped_tests}; do
mv "${T}/test_${test}.py" "${S}"/Lib/test
done
elog "The following tests have been skipped:"
for test in ${skipped_tests}; do
elog "test_${test}.py"
done
elog "If you would like to run them, you may:"
elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'"
elog "and run the tests separately."
if [[ ${result} -ne 0 ]]; then
die "emake test failed"
fi
}
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
use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || 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 "${S}"/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"
local -x EPYTHON=python${PYVER}
# if not using a cross-compiler, use the fresh binary
if ! tc-is-cross-compiler; then
cat > python.wrap <<-EOF || die
#!/bin/sh
export LD_LIBRARY_PATH=\${PWD}\${LD_LIBRARY_PATH+:\${LD_LIBRARY_PATH}}
exec ./python "\${@}"
EOF
chmod +x python.wrap || die
local -x PYTHON=./python.wrap
else
local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
fi
echo "EPYTHON='${EPYTHON}'" > epython.py || die
python_domodule epython.py
# python-exec wrapping support
local pymajor=${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,403 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
WANT_LIBTOOL="none"
inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
inherit python-utils-r1 toolchain-funcs verify-sig
MY_PV=${PV/_rc/rc}
MY_P="Python-${MY_PV%_p*}"
PYVER=$(ver_cut 1-2)
PATCHSET="python-gentoo-patches-${MY_PV}"
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
HOMEPAGE="
https://www.python.org/
https://github.com/python/cpython/
"
SRC_URI="
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
verify-sig? (
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
)
"
S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="
bluetooth build +ensurepip examples gdbm hardened lto +ncurses pgo
+readline +sqlite +ssl test tk +xml
"
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-lang/python-exec[python_targets_python3_9(-)]
dev-libs/libffi:=
sys-apps/util-linux:=
>=sys-libs/zlib-1.1.3:=
virtual/libcrypt:=
virtual/libintl
ensurepip? ( dev-python/ensurepip-wheels )
gdbm? ( sys-libs/gdbm:=[berkdb] )
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
)
xml? ( >=dev-libs/expat-2.1:= )
"
# bluetooth requires headers from bluez
DEPEND="
${RDEPEND}
bluetooth? ( net-wireless/bluez )
test? ( app-arch/xz-utils[extra-filters(+)] )
"
# autoconf-archive needed to eautoreconf
BDEPEND="
sys-devel/autoconf-archive
virtual/awk
virtual/pkgconfig
verify-sig? ( sec-keys/openpgp-keys-python )
!sys-devel/gcc[libffi(-)]
"
RDEPEND+="
!build? ( app-misc/mime-types )
"
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/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}
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"
use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
export PYTHON_DISABLE_MODULES="${disable}"
if ! use xml; then
ewarn "You have configured Python without XML support."
ewarn "This is NOT a recommended configuration as you"
ewarn "may face problems parsing any XML documents."
fi
if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
fi
append-flags -fwrapv
filter-flags -malign-double
# https://bugs.gentoo.org/700012
if is-flagq -flto || is-flagq '-flto=*'; then
append-cflags $(test-flags-CC -ffat-lto-objects)
fi
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
# PKG_CONFIG needed for cross.
tc-export CXX PKG_CONFIG
# Fix implicit declarations on cross and prefix builds. Bug #674070.
if use ncurses; then
append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
fi
local dbmliborder=
if use gdbm; then
dbmliborder+="${dbmliborder:+:}gdbm"
fi
if use pgo; then
local profile_task_flags=(
-m test
"-j$(makeopts_jobs)"
--pgo-extended
-x test_gdb
-u-network
# All of these seem to occasionally hang for PGO inconsistently
# They'll even hang here but be fine in src_test sometimes.
# bug #828535 (and related: bug #788022)
-x test_asyncio
-x test_httpservers
-x test_logging
-x test_multiprocessing_fork
-x test_socket
-x test_xmlrpc
)
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
--with-system-expat
--with-system-ffi
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
$(use_with lto)
$(use_enable pgo optimizations)
)
# disable implicit optimization/debugging flags
local -x OPT=
# 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=
econf "${myeconfargs[@]}"
if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
eerror "configure has detected that the sem_open function is broken."
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
die "Broken sem_open function (bug 496328)"
fi
# install epython.py as part of stdlib
echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
}
src_compile() {
# Ensure sed works as expected
# https://bugs.gentoo.org/594768
local -x LC_ALL=C
# Prevent using distutils bundled by setuptools.
# https://bugs.gentoo.org/823728
export SETUPTOOLS_USE_DISTUTILS=stdlib
# Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
# end up writing bytecode & violating sandbox.
# bug #831897
local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
if use pgo ; then
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
addpredict /usr/lib/python3.9/site-packages
fi
# also need to clear the flags explicitly here or they end up
# in _sysconfigdata*
emake CPPFLAGS= CFLAGS= LDFLAGS=
# Restore saved value from above.
local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
# Work around bug 329499. See also bug 413751 and 457194.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E python
else
pax-mark m python
fi
}
src_test() {
# Tests will not work when cross compiling.
if tc-is-cross-compiler; then
elog "Disabling tests due to crosscompiling."
return
fi
local test_opts=(
-u-network
-j "$(makeopts_jobs)"
# fails
-x test_gdb
)
if use sparc ; then
# bug #788022
test_opts+=(
-x test_multiprocessing_fork
-x test_multiprocessing_forkserver
)
fi
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
emake test EXTRATESTOPTS="${test_opts[*]}" \
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty || 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
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,403 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
WANT_LIBTOOL="none"
inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
inherit python-utils-r1 toolchain-funcs verify-sig
MY_PV=${PV/_rc/rc}
MY_P="Python-${MY_PV%_p*}"
PYVER=$(ver_cut 1-2)
PATCHSET="python-gentoo-patches-${MY_PV}"
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
HOMEPAGE="
https://www.python.org/
https://github.com/python/cpython/
"
SRC_URI="
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
verify-sig? (
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
)
"
S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="
bluetooth build +ensurepip examples gdbm hardened lto +ncurses pgo
+readline +sqlite +ssl test tk +xml
"
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-lang/python-exec[python_targets_python3_9(-)]
dev-libs/libffi:=
sys-apps/util-linux:=
>=sys-libs/zlib-1.1.3:=
virtual/libcrypt:=
virtual/libintl
ensurepip? ( dev-python/ensurepip-wheels )
gdbm? ( sys-libs/gdbm:=[berkdb] )
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
)
xml? ( >=dev-libs/expat-2.1:= )
"
# bluetooth requires headers from bluez
DEPEND="
${RDEPEND}
bluetooth? ( net-wireless/bluez )
test? ( app-arch/xz-utils[extra-filters(+)] )
"
# autoconf-archive needed to eautoreconf
BDEPEND="
sys-devel/autoconf-archive
virtual/awk
virtual/pkgconfig
verify-sig? ( sec-keys/openpgp-keys-python )
!sys-devel/gcc[libffi(-)]
"
RDEPEND+="
!build? ( app-misc/mime-types )
"
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/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}
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"
use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
export PYTHON_DISABLE_MODULES="${disable}"
if ! use xml; then
ewarn "You have configured Python without XML support."
ewarn "This is NOT a recommended configuration as you"
ewarn "may face problems parsing any XML documents."
fi
if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
fi
append-flags -fwrapv
filter-flags -malign-double
# https://bugs.gentoo.org/700012
if is-flagq -flto || is-flagq '-flto=*'; then
append-cflags $(test-flags-CC -ffat-lto-objects)
fi
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
# PKG_CONFIG needed for cross.
tc-export CXX PKG_CONFIG
# Fix implicit declarations on cross and prefix builds. Bug #674070.
if use ncurses; then
append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
fi
local dbmliborder=
if use gdbm; then
dbmliborder+="${dbmliborder:+:}gdbm"
fi
if use pgo; then
local profile_task_flags=(
-m test
"-j$(makeopts_jobs)"
--pgo-extended
-x test_gdb
-u-network
# All of these seem to occasionally hang for PGO inconsistently
# They'll even hang here but be fine in src_test sometimes.
# bug #828535 (and related: bug #788022)
-x test_asyncio
-x test_httpservers
-x test_logging
-x test_multiprocessing_fork
-x test_socket
-x test_xmlrpc
)
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
--with-system-expat
--with-system-ffi
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
$(use_with lto)
$(use_enable pgo optimizations)
)
# disable implicit optimization/debugging flags
local -x OPT=
# 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=
econf "${myeconfargs[@]}"
if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
eerror "configure has detected that the sem_open function is broken."
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
die "Broken sem_open function (bug 496328)"
fi
# install epython.py as part of stdlib
echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
}
src_compile() {
# Ensure sed works as expected
# https://bugs.gentoo.org/594768
local -x LC_ALL=C
# Prevent using distutils bundled by setuptools.
# https://bugs.gentoo.org/823728
export SETUPTOOLS_USE_DISTUTILS=stdlib
# Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
# end up writing bytecode & violating sandbox.
# bug #831897
local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
if use pgo ; then
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
addpredict /usr/lib/python3.9/site-packages
fi
# also need to clear the flags explicitly here or they end up
# in _sysconfigdata*
emake CPPFLAGS= CFLAGS= LDFLAGS=
# Restore saved value from above.
local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
# Work around bug 329499. See also bug 413751 and 457194.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E python
else
pax-mark m python
fi
}
src_test() {
# Tests will not work when cross compiling.
if tc-is-cross-compiler; then
elog "Disabling tests due to crosscompiling."
return
fi
local test_opts=(
-u-network
-j "$(makeopts_jobs)"
# fails
-x test_gdb
)
if use sparc ; then
# bug #788022
test_opts+=(
-x test_multiprocessing_fork
-x test_multiprocessing_forkserver
)
fi
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
emake test EXTRATESTOPTS="${test_opts[*]}" \
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty || 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
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
}

@ -28,7 +28,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
KEYWORDS="~alpha amd64 ~arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="
bluetooth build +ensurepip examples gdbm hardened lto +ncurses pgo
+readline +sqlite +ssl test tk +xml

Binary file not shown.

@ -11,7 +11,7 @@ SRC_URI="https://github.com/libusb/hidapi/archive/${P}.tar.gz -> ${P}.tgz"
LICENSE="|| ( BSD GPL-3 HIDAPI )"
SLOT="0"
KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv x86"
KEYWORDS="amd64 arm ~arm64 ppc ppc64 ~riscv x86"
IUSE="doc fox"
RDEPEND="

@ -1,7 +1,7 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
EAPI=8
inherit autotools multilib-minimal

@ -1,5 +1,4 @@
DIST nss-3.68.4.tar.gz 82409303 BLAKE2B a3cf572e82ce29dbc77e9356e0db425170f7294f1468755843746539663fe486089660e1c1b379d0184003d9ccf57db6cf0b2c161d7038301c1cb5028175b16d SHA512 f97b63a9f8218f8fbd7b5d48c084b8166366d02cd50aac69a22d56324d2fea01c49d074e51430bd128f510c733085f3f43c9739ce4073a07a5666675e0ef3b15
DIST nss-3.79.1.tar.gz 84694831 BLAKE2B 209a502ba4b808bb4cb9b8775328fa26e36c55147ee5da7b8f661349129250f09685dd69919e24d7ff72cc55a2e9cbbbc9c059e543cf1b0a6a08e809be262d4c SHA512 e841efe9d0300d99b50e54c159c75df76c09c34c74bbc9b6ca007ad017b2cb91a8d33f6f4195e52bd8f3ed7be5d53f3ce7ce10825fa21abbf5dbba3db109e037
DIST nss-3.81.tar.gz 84842767 BLAKE2B 01b6bf96a1507f8f16693b11aec7897c2fd046a97109fe30dcd4dbd53f82247d9809d189d885fded1f9c89e87b4051d2c121003a30e180ba685a95c46d3232fd SHA512 206faa29ff9fc9c70f85cbb86690b55bd11003a1a5b1d49f5f3731fdd1221690f957a17d912ee5272505afb938968327f4532ae8f5d2d77e6e13370768229747
DIST nss-3.82.tar.gz 84708994 BLAKE2B 59d3ace416c725933a07c51dc911f2fa11d55b1daddc5252a01ef3ae9df3375cbb199eff92e8e2bb364b9381ad1066c74d4f93c00900847f5234591bbbb29824 SHA512 6e0f28c3f776178ab2d97c6e2436aa10d72c9c2668aea1a6695ccf49e8c3c4cd2d266168508bcb456c655f2e692dceb44eae53c80d50076d7156db3deac70057
DIST nss-cacert-class1-class3-r2.patch 21925 BLAKE2B 7627ff9a09f084c19d72d0490676865e3cab3ca7c920ae1ce4bea2db664f37fd0aa84fcda919809a516891ab2a62e2e7a43a9d6ada4c231adfe4c216525fac7d SHA512 1ce6ff9ab310aaca9005eafb461338b291df8523cc7044e096cd75774ce746c26eed19ec6bb2643c6c67f94650f2f309463492d80a90568f38ce2557f8ada2f4

@ -1,391 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit flag-o-matic multilib toolchain-funcs multilib-minimal
NSPR_VER="4.34"
RTM_NAME="NSS_${PV//./_}_RTM"
DESCRIPTION="Mozilla's Network Security Services library that implements PKI support"
HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS"
SRC_URI="https://archive.mozilla.org/pub/security/nss/releases/${RTM_NAME}/src/${P}.tar.gz
cacert? ( https://dev.gentoo.org/~whissi/dist/ca-certificates/nss-cacert-class1-class3-r2.patch )"
LICENSE="|| ( MPL-2.0 GPL-2 LGPL-2.1 )"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-solaris ~x86-solaris"
IUSE="cacert test +utils cpu_flags_ppc_altivec cpu_flags_ppc_vsx"
RESTRICT="!test? ( test )"
# pkg-config called by nss-config -> virtual/pkgconfig in RDEPEND
RDEPEND="
>=dev-libs/nspr-${NSPR_VER}[${MULTILIB_USEDEP}]
>=dev-db/sqlite-3.8.2[${MULTILIB_USEDEP}]
>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
virtual/pkgconfig
"
DEPEND="${RDEPEND}"
BDEPEND="dev-lang/perl"
S="${WORKDIR}/${P}/${PN}"
MULTILIB_CHOST_TOOLS=(
/usr/bin/nss-config
)
PATCHES=(
# Custom changes for gentoo
"${FILESDIR}/${PN}-3.53-gentoo-fixups.patch"
"${FILESDIR}/${PN}-3.21-gentoo-fixup-warnings.patch"
"${FILESDIR}/${PN}-3.23-hppa-byte_order.patch"
"${FILESDIR}/${PN}-3.79-gcc-13.patch"
)
QA_PKGCONFIG_VERSION="${PV}.0"
src_prepare() {
default
if use cacert ; then
eapply -p2 "${DISTDIR}"/nss-cacert-class1-class3-r2.patch
fi
pushd coreconf >/dev/null || die
# hack nspr paths
echo 'INCLUDES += -I$(DIST)/include/dbm' \
>> headers.mk || die "failed to append include"
# modify install path
sed -e '/CORE_DEPTH/s:SOURCE_PREFIX.*$:SOURCE_PREFIX = $(CORE_DEPTH)/dist:' \
-i source.mk || die
# Respect LDFLAGS
sed -i -e 's/\$(MKSHLIB) -o/\$(MKSHLIB) \$(LDFLAGS) -o/g' rules.mk
popd >/dev/null || die
# Fix pkgconfig file for Prefix
sed -i -e "/^PREFIX =/s:= /usr:= ${EPREFIX}/usr:" \
config/Makefile || die
# use host shlibsign if need be #436216
if tc-is-cross-compiler ; then
sed -i \
-e 's:"${2}"/shlibsign:shlibsign:' \
cmd/shlibsign/sign.sh || die
fi
# dirty hack
sed -i -e "/CRYPTOLIB/s:\$(SOFTOKEN_LIB_DIR):../freebl/\$(OBJDIR):" \
lib/ssl/config.mk || die
sed -i -e "/CRYPTOLIB/s:\$(SOFTOKEN_LIB_DIR):../../lib/freebl/\$(OBJDIR):" \
cmd/platlibs.mk || die
multilib_copy_sources
strip-flags
}
multilib_src_configure() {
# Ensure we stay multilib aware
sed -i -e "/@libdir@/ s:lib64:$(get_libdir):" config/Makefile || die
}
nssarch() {
# Most of the arches are the same as $ARCH
local t=${1:-${CHOST}}
case ${t} in
*86*-pc-solaris2*) echo "i86pc" ;;
aarch64*) echo "aarch64" ;;
hppa*) echo "parisc" ;;
i?86*) echo "i686" ;;
x86_64*) echo "x86_64" ;;
*) tc-arch ${t} ;;
esac
}
nssbits() {
local cc cppflags="${1}CPPFLAGS" cflags="${1}CFLAGS"
if [[ ${1} == BUILD_ ]]; then
cc=$(tc-getBUILD_CC)
else
cc=$(tc-getCC)
fi
echo > "${T}"/test.c || die
${cc} ${!cppflags} ${!cflags} -c "${T}"/test.c -o "${T}/${1}test.o" || die
case $(file "${T}/${1}test.o") in
*32-bit*x86-64*) echo USE_X32=1;;
*64-bit*|*ppc64*|*x86_64*) echo USE_64=1;;
*32-bit*|*ppc*|*i386*) ;;
*) die "Failed to detect whether ${cc} builds 64bits or 32bits, disable distcc if you're using it, please";;
esac
}
multilib_src_compile() {
# use ABI to determine bit'ness, or fallback if unset
local buildbits mybits
case "${ABI}" in
n32) mybits="USE_N32=1";;
x32) mybits="USE_X32=1";;
s390x|*64) mybits="USE_64=1";;
${DEFAULT_ABI})
einfo "Running compilation test to determine bit'ness"
mybits=$(nssbits)
;;
esac
# bitness of host may differ from target
if tc-is-cross-compiler; then
buildbits=$(nssbits BUILD_)
fi
local makeargs=(
CC="$(tc-getCC)"
CCC="$(tc-getCXX)"
AR="$(tc-getAR) rc \$@"
RANLIB="$(tc-getRANLIB)"
OPTIMIZER=
${mybits}
)
# Take care of nspr settings #436216
local myCPPFLAGS="${CPPFLAGS} $($(tc-getPKG_CONFIG) nspr --cflags)"
unset NSPR_INCLUDE_DIR
export NSS_ALLOW_SSLKEYLOGFILE=1
export NSS_ENABLE_WERROR=0 #567158
export BUILD_OPT=1
export NSS_USE_SYSTEM_SQLITE=1
export NSDISTMODE=copy
export FREEBL_NO_DEPEND=1
export FREEBL_LOWHASH=1
export NSS_SEED_ONLY_DEV_URANDOM=1
export USE_SYSTEM_ZLIB=1
export ZLIB_LIBS=-lz
export ASFLAGS=""
# Fix build failure on arm64
export NS_USE_GCC=1
# Detect compiler type and set proper environment value
if tc-is-gcc; then
export CC_IS_GCC=1
elif tc-is-clang; then
export CC_IS_CLANG=1
fi
export NSS_DISABLE_GTESTS=$(usex !test 1 0)
# explicitly disable altivec/vsx if not requested
# https://bugs.gentoo.org/789114
case ${ARCH} in
ppc*)
use cpu_flags_ppc_altivec || export NSS_DISABLE_ALTIVEC=1
use cpu_flags_ppc_vsx || export NSS_DISABLE_CRYPTO_VSX=1
;;
esac
local d
# Build the host tools first.
LDFLAGS="${BUILD_LDFLAGS}" \
XCFLAGS="${BUILD_CFLAGS}" \
NSPR_LIB_DIR="${T}/fakedir" \
emake -C coreconf \
CC="$(tc-getBUILD_CC)" \
${buildbits-${mybits}}
makeargs+=( NSINSTALL="${PWD}/$(find -type f -name nsinstall)" )
# Then build the target tools.
for d in . lib/dbm ; do
CPPFLAGS="${myCPPFLAGS}" \
XCFLAGS="${CFLAGS} ${CPPFLAGS}" \
NSPR_LIB_DIR="${T}/fakedir" \
emake "${makeargs[@]}" -C ${d} OS_TEST="$(nssarch)"
done
}
multilib_src_test() {
einfo "Tests can take a *long* time, especially on a multilib system."
einfo "30-45+ minutes per lib configuration. Bug #852755"
# https://www.linuxfromscratch.org/blfs/view/svn/postlfs/nss.html
# https://firefox-source-docs.mozilla.org/security/nss/legacy/nss_sources_building_testing/index.html#running_the_nss_test_suite
# https://www-archive.mozilla.org/projects/security/pki/nss/testnss_32.html (older)
export BUILD_OPT=1
export HOST="localhost"
export DOMSUF="localdomain"
export USE_IP=TRUE
export IP_ADDRESS="127.0.0.1"
NSINSTALL="${PWD}/$(find -type f -name nsinstall)"
cd "${BUILD_DIR}"/tests || die
# Hack to get current objdir (prefixed dir where built binaries are)
# Without this, at least multilib tests go wrong when building the amd64 variant
# after x86.
local objdir=$(find "${BUILD_DIR}"/dist -maxdepth 1 -iname Linux* | rev | cut -d/ -f1 | rev)
# Can tweak to a subset of tests in future if we need to, but would prefer not
OBJDIR="${objdir}" DIST="${BUILD_DIR}/dist" MOZILLA_ROOT="${BUILD_DIR}" ./all.sh || die
}
# Altering these 3 libraries breaks the CHK verification.
# All of the following cause it to break:
# - stripping
# - prelink
# - ELF signing
# http://www.mozilla.org/projects/security/pki/nss/tech-notes/tn6.html
# Either we have to NOT strip them, or we have to forcibly resign after
# stripping.
#local_libdir="$(get_libdir)"
#export STRIP_MASK="
# */${local_libdir}/libfreebl3.so*
# */${local_libdir}/libnssdbm3.so*
# */${local_libdir}/libsoftokn3.so*"
export NSS_CHK_SIGN_LIBS="freebl3 nssdbm3 softokn3"
generate_chk() {
local shlibsign="$1"
local libdir="$2"
einfo "Resigning core NSS libraries for FIPS validation"
shift 2
local i
for i in ${NSS_CHK_SIGN_LIBS} ; do
local libname=lib${i}.so
local chkname=lib${i}.chk
"${shlibsign}" \
-i "${libdir}"/${libname} \
-o "${libdir}"/${chkname}.tmp \
&& mv -f \
"${libdir}"/${chkname}.tmp \
"${libdir}"/${chkname} \
|| die "Failed to sign ${libname}"
done
}
cleanup_chk() {
local libdir="$1"
shift 1
local i
for i in ${NSS_CHK_SIGN_LIBS} ; do
local libfname="${libdir}/lib${i}.so"
# If the major version has changed, then we have old chk files.
[ ! -f "${libfname}" -a -f "${libfname}.chk" ] \
&& rm -f "${libfname}.chk"
done
}
multilib_src_install() {
pushd dist >/dev/null || die
dodir /usr/$(get_libdir)
cp -L */lib/*$(get_libname) "${ED}"/usr/$(get_libdir) || die "copying shared libs failed"
local i
for i in crmf freebl nssb nssckfw ; do
cp -L */lib/lib${i}.a "${ED}"/usr/$(get_libdir) || die "copying libs failed"
done
# Install nss-config and pkgconfig file
dodir /usr/bin
cp -L */bin/nss-config "${ED}"/usr/bin || die
dodir /usr/$(get_libdir)/pkgconfig
cp -L */lib/pkgconfig/nss.pc "${ED}"/usr/$(get_libdir)/pkgconfig || die
# create an nss-softokn.pc from nss.pc for libfreebl and some private headers
# bug 517266
sed -e 's#Libs:#Libs: -lfreebl#' \
-e 's#Cflags:#Cflags: -I${includedir}/private#' \
*/lib/pkgconfig/nss.pc >"${ED}"/usr/$(get_libdir)/pkgconfig/nss-softokn.pc \
|| die "could not create nss-softokn.pc"
# all the include files
insinto /usr/include/nss
doins public/nss/*.{h,api}
insinto /usr/include/nss/private
doins private/nss/{blapi,alghmac,cmac}.h
popd >/dev/null || die
local f nssutils
# Always enabled because we need it for chk generation.
nssutils=( shlibsign )
if multilib_is_native_abi ; then
if use utils; then
# The tests we do not need to install.
#nssutils_test="bltest crmftest dbtest dertimetest
#fipstest remtest sdrtest"
# checkcert utils has been removed in nss-3.22:
# https://bugzilla.mozilla.org/show_bug.cgi?id=1187545
# https://hg.mozilla.org/projects/nss/rev/df1729d37870
# certcgi has been removed in nss-3.36:
# https://bugzilla.mozilla.org/show_bug.cgi?id=1426602
nssutils+=(
addbuiltin
atob
baddbdir
btoa
certutil
cmsutil
conflict
crlutil
derdump
digest
makepqg
mangle
modutil
multinit
nonspr10
ocspclnt
oidcalc
p7content
p7env
p7sign
p7verify
pk11mode
pk12util
pp
rsaperf
selfserv
signtool
signver
ssltap
strsclnt
symkeyutil
tstclnt
vfychain
vfyserv
)
# install man-pages for utils (bug #516810)
doman doc/nroff/*.1
fi
pushd dist/*/bin >/dev/null || die
for f in ${nssutils[@]}; do
dobin ${f}
done
popd >/dev/null || die
fi
}
pkg_postinst() {
multilib_pkg_postinst() {
# We must re-sign the libraries AFTER they are stripped.
local shlibsign="${EROOT}/usr/bin/shlibsign"
# See if we can execute it (cross-compiling & such). #436216
"${shlibsign}" -h >&/dev/null
if [[ $? -gt 1 ]] ; then
shlibsign="shlibsign"
fi
generate_chk "${shlibsign}" "${EROOT}"/usr/$(get_libdir)
}
multilib_foreach_abi multilib_pkg_postinst
}
pkg_postrm() {
multilib_pkg_postrm() {
cleanup_chk "${EROOT}"/usr/$(get_libdir)
}
multilib_foreach_abi multilib_pkg_postrm
}

Binary file not shown.

@ -1 +1,2 @@
DIST busted-2.0.0.tar.gz 55002 BLAKE2B 39a3b7bf156911e25f94020f9e56b3f43b9f02b910a9d1c1f288dbdb83e5d53253d5b40d73df655844ed683cff7959d42c330c0d061db918385df07870e16da3 SHA512 3151694b1fba1acc52e3bcfee0231008b14934e89da5885d7e063c6f023479c42040c42a8c0aa6ff1f8303ad6b2a70f0687c8a218830de7231007ef8748457bf
DIST busted-2.1.1.tar.gz 62594 BLAKE2B 3afd49dd70b27243e32f69d5d5a0a0ee13e46fdbe46fe6921e1b854abddaa45dba098f19c5994d5656eca871beacd654cac20abe0662c21f6e7efaff19984753 SHA512 80a362094398b85f2783ca11adfae1f7ead38b9de7d11d2c2f8234f2d8f1289dc853f58c11c375b8edd6ea87807a65cc8bce01ebcf7cdf75701796ee528a75a0

@ -5,7 +5,7 @@ EAPI=8
LUA_COMPAT=( lua5-{1..4} luajit )
inherit lua toolchain-funcs
inherit lua
DESCRIPTION="Elegant Lua unit testing"
HOMEPAGE="http://olivinelabs.com/busted/"

@ -0,0 +1,63 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
LUA_COMPAT=( lua5-{1..4} luajit )
inherit lua
DESCRIPTION="Elegant Lua unit testing"
HOMEPAGE="http://olivinelabs.com/busted/"
SRC_URI="https://github.com/Olivine-Labs/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
IUSE="test"
REQUIRED_USE="${LUA_REQUIRED_USE}"
RESTRICT="test"
RDEPEND="
dev-lua/lua_cliargs[${LUA_USEDEP}]
dev-lua/luafilesystem[${LUA_USEDEP}]
dev-lua/luasystem[${LUA_USEDEP}]
dev-lua/dkjson[${LUA_USEDEP}]
dev-lua/say[${LUA_USEDEP}]
dev-lua/luassert[${LUA_USEDEP}]
dev-lua/lua-term[${LUA_USEDEP}]
dev-lua/penlight[${LUA_USEDEP}]
dev-lua/mediator_lua[${LUA_USEDEP}]
${LUA_DEPS}
"
DEPEND="${RDEPEND}"
BDEPEND="
virtual/pkgconfig
test? (
dev-lua/busted
${RDEPEND}
)
"
lua_src_test() {
busted --lua=${ELUA} || die
}
src_test() {
lua_foreach_impl lua_src_test
}
lua_src_install() {
insinto $(lua_get_lmod_dir)
doins -r busted
}
src_install() {
dobin bin/busted
lua_foreach_impl lua_src_install
einstalldocs
}

@ -1 +1,2 @@
DIST luassert-1.8.0.tar.gz 38874 BLAKE2B ebc4aab1de5dc830d0b9266726ca6bf361e03000f3a8acd27c04805a6c963373755c8e163b187714f64178acc5d755c05493d745b55c785e3254dd41aa4bef31 SHA512 18b296fececa6b0d5950b2a20c4d30da3bbf9b0932c568bbb8ca212b5c82a1047b73c52ee72b4505a41a393d41dd21321189367e038dd029152d177e11bafc93
DIST luassert-1.9.0.tar.gz 42645 BLAKE2B 2541184bb5ee7a6a7e0c8e2fead8c4926a5d8384345dc173d60c9b52bb4cffe9f50e90980293465e1e5cadee337823abf77421d1cfc423eb32d9d73a7594a306 SHA512 267d31f0061376a4766c7e978bda9e4a2396c8bf959d4aaa347ad40bd286a3873441e38983e1e86ea07a1be7cf7c92d91248c4ba70d6dd4ec82f02c7f7638e9f

@ -5,7 +5,7 @@ EAPI=8
LUA_COMPAT=( lua5-{1..4} luajit )
inherit lua toolchain-funcs
inherit lua
DESCRIPTION="Assertion library for Lua"
HOMEPAGE="http://olivinelabs.com/busted/"

@ -0,0 +1,54 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
LUA_COMPAT=( lua5-{1..4} luajit )
inherit lua
DESCRIPTION="Assertion library for Lua"
HOMEPAGE="http://olivinelabs.com/busted/"
SRC_URI="https://github.com/Olivine-Labs/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
IUSE="test"
REQUIRED_USE="${LUA_REQUIRED_USE}"
RESTRICT="!test? ( test )"
RDEPEND="
dev-lua/say[${LUA_USEDEP}]
${LUA_DEPS}
"
BDEPEND="
virtual/pkgconfig
test? (
dev-lua/busted[${LUA_USEDEP}]
dev-lua/lua_cliargs[${LUA_USEDEP}]
${RDEPEND}
)
"
DEPEND="${RDEPEND}"
lua_src_test() {
busted --lua=${ELUA} || die
}
src_test() {
lua_foreach_impl lua_src_test
}
lua_src_install() {
insinto $(lua_get_lmod_dir)/luassert
doins -r src/.
einstalldocs
}
src_install() {
lua_foreach_impl lua_src_install
}

Binary file not shown.

@ -1,2 +1 @@
DIST ansible-runner-1.4.9.tar.gz 48022 BLAKE2B 9d413a3502450ad964301fb22c280e6474794604a4d8a2d3bbbc92a1d2e7568351feabce3e9e6790916032ffb72881812c0ef9456a589e7af7cab1dea3d3182c SHA512 198091472c74ab2641dd3a72afa90fcdb4b120c0a10518b55055933f3ae9934bfe229a6a006e84646ce491ce3eec828f9ffa692e6b215398e64aa55afbcb3bae
DIST ansible-runner-2.1.0.tar.gz 158798 BLAKE2B b6a1a50c1b66210c9a29b0b52e798fc6a922a840664c5924e5234a3f5ec2cea32a137e676bae732115cb10a99155df660281233fe5bd10c10282926d0ec92abe SHA512 c96a7a122e4fdc02d6ebab79bbf3f2d9f96eb6c966789deae5c36e9b4c55aa9fede994b22309bdb18a8a4f1c9a615f9b454f01c4170c4d0c1fb5e447da52cf00

@ -1,38 +0,0 @@
# Copyright 2021-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{8..10} )
inherit distutils-r1
DESCRIPTION="A tool and python library that helps when interfacing with Ansible"
HOMEPAGE="https://github.com/ansible/ansible-runner"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="
dev-python/pexpect[${PYTHON_USEDEP}]
dev-python/psutil[${PYTHON_USEDEP}]
dev-python/python-daemon[${PYTHON_USEDEP}]
dev-python/pyyaml[${PYTHON_USEDEP}]
dev-python/setuptools[${PYTHON_USEDEP}]
dev-python/six[${PYTHON_USEDEP}]
"
BDEPEND="
test? (
dev-python/mock[${PYTHON_USEDEP}]
)
"
distutils_enable_tests pytest
python_prepare_all() {
sed -e 's|find_packages()|find_packages(exclude=["test", "test.*"])|' -i setup.py || die
distutils-r1_python_prepare_all
}

@ -2,3 +2,4 @@ DIST awxkit-21.1.0.gh.tar.gz 16516204 BLAKE2B 2891244e7dcb0aef7b2053713c4479b945
DIST awxkit-21.2.0.gh.tar.gz 16531568 BLAKE2B aa6677408415b2abd6a8d0f3286e2147f0e5ad3d7650feb98dfe018c89431bf9b4fdc8c6c1c76aa9a26fe0d7c8a438cfa209fbe16b7480c7295c60352e30e21e SHA512 d2be8ffacc5b82600ecac5d909450f9eef3d205075c9783849bc50030abcc84ca6cae3682baf20de8e0efb9f651aa03374941d59cf52f9d4cb4b7892d5c0353c
DIST awxkit-21.3.0.gh.tar.gz 15808522 BLAKE2B 0c8f563601e8140af763ef88d9c69232b1c5b5de726962c210883af78d400286f7a415971311a7543b150d165c10cadbfbbd11d58ea8b9336efe9db7a7d29493 SHA512 05f2996a51aedc059041d72a50c21b3dd161c958ac869e4c9d36b45ae483e2e4c6a743e8ba336acde8108fa43d9eec0131d76a8ef3cf0dbeec1416dc8317c698
DIST awxkit-21.4.0.gh.tar.gz 16058858 BLAKE2B 215b18809bd1050c6e93a03711fd8cb1b96299c2f335d01e7c40ea54ee9aaefab652f86826914e908ff4a19a02e79a61fc13edd5533c6b619366f76aa7fcfa46 SHA512 fc4513e7adcbf75aa801dfedb1f92a08e1dbe804a0a8b18809ec5ef98dd42bdf08856c486a9781cc6d34a932a86d587a90eac28099016e956c7468078d44d3ba
DIST awxkit-21.5.0.gh.tar.gz 16077945 BLAKE2B 06e4b67fd49f9f11d65c4209ef70732e4dc33613c1875f4827421da200d2e7a7eaf8774c14a8f7713ce9227fc477103b114f6d2c170ed180e1cd101c59ca4c4a SHA512 7d90e1cc8133c3e5dca3a73e718c6449fc75e85fe7a1e1e28c971bc4883d249ed2e17124b5d1de06fd0adac358e49a3987620cc5d274bd666a78bc5cd75577fc

@ -0,0 +1,41 @@
# Copyright 2021-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{8..10} )
inherit distutils-r1
DESCRIPTION="Command line interface for Ansible AWX"
HOMEPAGE="https://github.com/ansible/awx"
SRC_URI="https://github.com/ansible/awx/archive/${PV}.tar.gz -> ${P}.gh.tar.gz"
S="${WORKDIR}/awx-${PV}/awxkit"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="
dev-python/cryptography[${PYTHON_USEDEP}]
dev-python/pyyaml[${PYTHON_USEDEP}]
dev-python/requests[${PYTHON_USEDEP}]
dev-python/urllib3[${PYTHON_USEDEP}]
dev-python/websocket-client[${PYTHON_USEDEP}]
dev-python/pyjwt[${PYTHON_USEDEP}]
"
BDEPEND="
dev-python/setuptools_scm[${PYTHON_USEDEP}]
"
distutils_enable_tests pytest
src_prepare() {
export SETUPTOOLS_SCM_PRETEND_VERSION=${PV}
sed -e 's|websocket-client==[[:digit:]\.]*|websocket-client|' \
-e "/'clean'/d" \
-i setup.py || die
distutils-r1_src_prepare
}

@ -11,3 +11,4 @@ DIST boto3-1.24.54.gh.tar.gz 528596 BLAKE2B a34f5bdd4a72aecaa40b9235696b502702c3
DIST boto3-1.24.55.gh.tar.gz 529245 BLAKE2B 02a5bdbabcabc7019728da0be14d02c3e64a28e996f656664b329499668a064a13eeb4d9504a609b0ede0ade188bbd96f2b1c758e05da4e0ab67d5b70e5408a1 SHA512 539375585f93b699032755eda36bbba99364ff68f49898656cebcddd99ebead4546a01f28b1f81473d7a7eea01196832345a0b3a99a460f20ba4d4c081768bbf
DIST boto3-1.24.56.gh.tar.gz 529533 BLAKE2B 7d41281f9cc645e8ca83a71e6eabf1d54373208488cc14bd723b32f56a4e2e1d3b4fa407ab495a9409ae9635f1dc2b7ce2fdebc9bfd1c263e0d9b29d5925daec SHA512 ffc86fbf45fa1264f26474115edcee3f62abc93e0a23fd7ca800c1995924e4cf71e84f852d28217863427061646d1ffd9e24d68d1c531d8b480d126e449f76f0
DIST boto3-1.24.57.gh.tar.gz 530363 BLAKE2B a2f3f39f0de79fc68a32da9bacbef863c705cace82ec4650e17ab89b14f73a456b3583fa3376dc6a62139986063fe0bfade5511fea21d0490c57f9fb65cae425 SHA512 5dd4f0c53f772f5d8d2519e5b1230c5918537af7a265a64670996ff2384e2f8e226d33e91ad4491ce00932d8f99d61d6819ce0d10b0f493a514cef2183ac839c
DIST boto3-1.24.58.gh.tar.gz 530450 BLAKE2B 82746de410c03fd0757d088781a5a2ab8d60e3c63bed127f617aec0ccb1eafd7064aed6087f912466db37c257e02ba7328e5408573c0e429284893c3c8605803 SHA512 1d7f5335cd7c7683224d503f9b2787d8dc4a345cc4d13a2dcfab9e709652ffe5cef8b8866d7a3e0218a7efc30d1029a24bad1d8edf9d47911dead3f2d98435af

@ -0,0 +1,68 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{8..11} )
inherit distutils-r1 multiprocessing
DESCRIPTION="The AWS SDK for Python"
HOMEPAGE="
https://github.com/boto/boto3/
https://pypi.org/project/boto3/
"
LICENSE="Apache-2.0"
SLOT="0"
if [[ "${PV}" == "9999" ]]; then
EGIT_REPO_URI="https://github.com/boto/boto3"
inherit git-r3
BOTOCORE_PV=${PV}
else
SRC_URI="
https://github.com/boto/boto3/archive/${PV}.tar.gz
-> ${P}.gh.tar.gz
"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
# botocore is x.(y+3).z
BOTOCORE_PV="$(ver_cut 1).$(( $(ver_cut 2) + 3)).$(ver_cut 3-)"
fi
RDEPEND="
>=dev-python/botocore-${BOTOCORE_PV}[${PYTHON_USEDEP}]
>=dev-python/jmespath-0.7.1[${PYTHON_USEDEP}]
>=dev-python/s3transfer-0.6.0[${PYTHON_USEDEP}]
"
BDEPEND="
test? (
dev-python/mock[${PYTHON_USEDEP}]
dev-python/pytest-xdist[${PYTHON_USEDEP}]
)
"
distutils_enable_sphinx docs/source \
'dev-python/guzzle_sphinx_theme'
distutils_enable_tests pytest
python_prepare_all() {
# don't lock versions to narrow ranges
sed -e '/botocore/ d' \
-e '/jmespath/ d' \
-e '/s3transfer/ d' \
-i setup.py || die
# do not rely on bundled deps in botocore (sic!)
find -name '*.py' -exec sed -i \
-e 's:from botocore[.]vendored import:import:' \
-e 's:from botocore[.]vendored[.]:from :' \
{} + || die
distutils-r1_python_prepare_all
}
python_test() {
epytest tests/{functional,unit} -n "$(makeopts_jobs)"
}

@ -11,3 +11,4 @@ DIST botocore-1.27.54.gh.tar.gz 9535763 BLAKE2B e1797243102043564a369c519397a609
DIST botocore-1.27.55.gh.tar.gz 9543620 BLAKE2B cf9d20e5725276318578362e596bc73ed0b37c0fc0ecbba20c8de1740135fee87c93d7b849384ca34fa521f16de497fb4f2050f52bd04beddfe66b1c8ff4390e SHA512 1eea888ff68344943f0604d030c0c9f6d087211ef3338023693eb51e6dc92fcf6d32ebd14e9073e0ce7e1d44338c7a535a88a55286dcbaf7684a6617effdf14f
DIST botocore-1.27.56.gh.tar.gz 9545974 BLAKE2B 514c859f854aed83c3bb13ed3eab9999840d61e6f36e2c860f272f0fafde110d83da93f2843c419c577d0a8c737835c069438d322fc95581bb7c292ed16639a5 SHA512 c0bdeeb9254c5528034058932050874a0e40aee220f2d67a93c163e645e32badeae6517da23f69cf10452d5ed33a23188204bcdac385e43303882601e6e45922
DIST botocore-1.27.57.gh.tar.gz 9559970 BLAKE2B c48dbe694b501afc2e9b2292e544393da13cf10e895e29dbea36c62511ad3d487525ca568c2ac6e0f4767ec0ddaac07f25415b77a10737f45b8c5b4c823f8e7b SHA512 a2d6433a2f42199e20c899d1b0797eb7d65dbdfdb3be75317fab548f5d9d6b2319032c00ee800e9defa311672dd0f990462dd83d4511728b110ac58290daca14
DIST botocore-1.27.58.gh.tar.gz 9563088 BLAKE2B 66aecb836cac7bcddbba1fc6b29ce3a24fc7b9761f0f21104f901b5d47afaa25dba12eab7cdb134ac948cb523807373cab9971fe05ec83491f503a415a6662eb SHA512 0ee6616be77645f7d1300c381fa0212ce1b1dd94fd88f02912d256fe212ade8e104343e1ed31d0f705fcdfd36d76b6354145d13bbaee09bec3988ad18584aada

@ -0,0 +1,69 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{8..11} )
inherit distutils-r1 multiprocessing
DESCRIPTION="Low-level, data-driven core of boto 3"
HOMEPAGE="
https://github.com/boto/botocore/
https://pypi.org/project/botocore/
"
LICENSE="Apache-2.0"
SLOT="0"
if [[ "${PV}" == "9999" ]]; then
EGIT_REPO_URI="https://github.com/boto/botocore"
inherit git-r3
else
SRC_URI="
https://github.com/boto/botocore/archive/${PV}.tar.gz
-> ${P}.gh.tar.gz
"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
fi
RDEPEND="
dev-python/six[${PYTHON_USEDEP}]
<dev-python/jmespath-2[${PYTHON_USEDEP}]
dev-python/python-dateutil[${PYTHON_USEDEP}]
>=dev-python/urllib3-1.25.4[${PYTHON_USEDEP}]
"
BDEPEND="
test? (
dev-python/jsonschema[${PYTHON_USEDEP}]
dev-python/pytest-xdist[${PYTHON_USEDEP}]
)
"
distutils_enable_sphinx docs/source \
'dev-python/guzzle_sphinx_theme'
distutils_enable_tests pytest
src_prepare() {
# unpin deps
sed -i -e "s:>=.*':':" setup.py || die
# unbundle deps
rm -r botocore/vendored || die
find -name '*.py' -exec sed -i \
-e 's:from botocore[.]vendored import:import:' \
-e 's:from botocore[.]vendored[.]:from :' \
{} + || die
distutils-r1_src_prepare
}
python_test() {
local EPYTEST_DESELECT=(
# rely on bundled six
tests/functional/test_six_imports.py::test_no_bare_six_imports
tests/functional/test_six_threading.py::test_six_thread_safety
)
epytest tests/{functional,unit} -n "$(makeopts_jobs)"
}

@ -1 +1,2 @@
DIST flatbuffers-2.0.6.tar.gz 1724250 BLAKE2B b6969b28dba753c4551b33d27409d9925c10a640ae860264f8054c19a470ce3da366c0bf7917bf7fe4f6cb57acbfbe1837f175fde40b84d311df6d1378d146ce SHA512 be631f34064c28d81876bf137c796e9736623cf2cc4f2a05dd45372e7195729c99fad1fa795f8ce71a408756a842edbdc0c3bc714a7cf63203a1de8681d86fb6
DIST flatbuffers-2.0.7.gh.tar.gz 2018943 BLAKE2B 0fa27c79986292da1e3721c061d845b4ff3db5209956345ddf655dbbcd8fa8f460160d2359a77211139597b4635fc65fdc762cd3c62e87b361d65fb414d9c538 SHA512 15696f5f691414d2266f8bad1137ccbcf1e43e8d4fc22e8b5ef5b90351f6034b553bff7febf0e6f93a1be145e0714d7d4cb752786d0f67665165b1b6e5c1db24

@ -0,0 +1,25 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{8..11} )
inherit distutils-r1
DESCRIPTION="RFC 7049 - Concise Binary Object Representation"
HOMEPAGE="
https://github.com/google/flatbuffers/
https://pypi.org/project/flatbuffers/
"
SRC_URI="
https://github.com/google/${PN}/archive/v${PV}.tar.gz
-> ${P}.gh.tar.gz
"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
S=${WORKDIR}/${P}/python

@ -1,3 +1,4 @@
DIST fonttools-4.34.4.gh.tar.gz 3555013 BLAKE2B 0e4149321cea89fb9ec63a52a127f657421d2902f9d9ec72a918bd7230ce5c9117f876bb1fe0b6dfa986b774a5929f41ba8ff868462f240669f8b2067d4bcf39 SHA512 9c6ea7d6e9a9d74d2e705f7966853709ee834195f682bf595f932be2eab8fb728cf69b83680e5b95a308b40b1c17a7d1003efade9473d3f6d8e744ecfd1e2c62
DIST fonttools-4.35.0.gh.tar.gz 3560204 BLAKE2B d79bbd2e4cca6fc5dd9fd301d29c10e2ff07348be6b57f00744b23ed4b00bb5e10b2415b83477827c0c2dc65262f578c6b6dd90de1243d84d4e83e46537ea804 SHA512 d7919eae04faa61fd3ef8996349239db2a0d5dbdd743dd41a43d1664f0524c0554d314a6d5d0c9aa4468badc47018843b2810ea61996c1bb56906ecd3bb9a4bf
DIST fonttools-4.36.0.gh.tar.gz 3567028 BLAKE2B 45c2481680a314e101ed3a14915585b503a15853937846a5ceadd15e524f053663e0c6876bb105b0f2593ac790029da48cbede8139be98809764e5a6e3e2b11a SHA512 48a07548f72e9818292c1552675fce94b8ecb876172cd7adb429426c1d987f54a6e0482b7847e48c3b9854821567023cce402c613488d9e17277eff8a615d3c2
DIST fonttools-4.37.1.gh.tar.gz 3581903 BLAKE2B 50f060291e384295138c526a489de4e086614be01f58214f4be5223ab49899d7a80f17a7c04b2e6b92689179d36e9733576e064682b71e88cd02ae22b48bbcd6 SHA512 37c787cc2c9a9f4373e1329d78faeb1fc93213f3db3aefbdeba6dd6acf60a0245d5651a7a459cda68949327c8a96d8a2fdc10107c4edb75a07a2d1c4918c79a4

@ -0,0 +1,58 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{8..11} )
PYTHON_REQ_USE="xml(+)"
inherit distutils-r1 virtualx
DESCRIPTION="Library for manipulating TrueType, OpenType, AFM and Type1 fonts"
HOMEPAGE="https://github.com/fonttools/fonttools/"
SRC_URI="https://github.com/fonttools/fonttools/archive/${PV}.tar.gz -> ${P}.gh.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
RDEPEND=">=dev-python/fs-2.4.9[${PYTHON_USEDEP}]"
BDEPEND="${RDEPEND}
dev-python/cython[${PYTHON_USEDEP}]
test? (
app-arch/brotli[python,${PYTHON_USEDEP}]
app-arch/zopfli
)
"
distutils_enable_tests pytest
python_prepare_all() {
# When dev-python/pytest-shutil is installed, we get weird import errors.
# This is due to incomplete nesting in the Tests/ tree:
#
# Tests/feaLib/__init__.py
# Tests/ufoLib/__init__.py
# Tests/svgLib/path/__init__.py
# Tests/otlLib/__init__.py
# Tests/varLib/__init__.py
#
# This tree requires an __init__.py in Tests/svgLib/ too, bug #701148.
touch Tests/svgLib/__init__.py || die
distutils-r1_python_prepare_all
}
src_configure() {
export FONTTOOLS_WITH_CYTHON=1
}
src_test() {
# virtualx used when matplotlib is installed causing plot module tests to run
virtx distutils-r1_src_test
}
python_test() {
epytest Tests fontTools || die "Tests failed with ${EPYTHON}"
}

@ -1 +1,2 @@
DIST fritzconnection-1.10.0.gh.tar.gz 146309 BLAKE2B 64b01a561a015fae10dc3aced2576afce5d27555aba019028de32d5dc0ee9099f4248d900ac1de0f18321d52537dd7b77ff010ce44ca863ef9b5c5e228c61071 SHA512 86acce864624f67fdbd407157565cec434d029907b4d295a3e5e1bb41d8856ca1eae99681fd3c44033c6bcef8ecc594483f734e08c4fb733e685c01147dd3c29
DIST fritzconnection-1.9.1.gh.tar.gz 79580 BLAKE2B 6972c92aabb9c516e2b4d3d18bea2daf8002a12c9939a5badd1ceb8f7539a243f99778a3ded0cd057850b54e9cb2a0ca9d2c31be688eaf81f4b279b74d10fc55 SHA512 55642cf1db581c62091d63fdfa9bf4fe36c545df686eae7d0f886b4ef8c186668e6f8fb7bc7786e13936764ea771e0dba79e62b57f19348dd562bf23a27d6369

@ -0,0 +1,32 @@
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{8..11} )
inherit distutils-r1
DESCRIPTION="Lib/tool to communicate with AVM FRITZ! devices using TR-064 protocol over UPnP"
HOMEPAGE="https://github.com/kbr/fritzconnection"
LICENSE="MIT"
SLOT="0"
if [[ "${PV}" == "9999" ]]; then
EGIT_REPO_URI="https://github.com/kbr/fritzconnection"
inherit git-r3
else
SRC_URI="
https://github.com/kbr/fritzconnection/archive/${PV}.tar.gz
-> ${P}.gh.tar.gz
"
KEYWORDS="~amd64 ~x86"
fi
RDEPEND=">=dev-python/requests-2.22[${PYTHON_USEDEP}]"
BDEPEND="
test? (
dev-python/pytest-mock[${PYTHON_USEDEP}]
)
"
distutils_enable_tests pytest

@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( pypy3 python3_{8..10} )
PYTHON_COMPAT=( pypy3 python3_{8..11} )
inherit distutils-r1

@ -1 +1,2 @@
DIST openstacksdk-0.100.0.tar.gz 1065692 BLAKE2B 7941cb9a14f10924953ad114f9bce4847b7e26bbea4622790503209ab70a01c254f2ec59d3f794f64d1ecc8f320a9a2be2db8015cccad8b20fe06dc1e72683d0 SHA512 c3e47510518bc4abac78aab654f6f8aa7c0deec3f4355ec7ea064ffa32c1862a9015806fd04cc1975c3d7e688e9c5ee66e3837baa21ae6c82db8f39b4b8f8330
DIST openstacksdk-0.101.0.tar.gz 1072136 BLAKE2B f73103fd65bdf11340b765918bc226b2d681a9846cba11f0a8dbd5d97f300690f82c1846e10ebbab413900f4e4199aa81de9b6213d07bcbcc817233758ac78a9 SHA512 95580b7c53c901ef21280420c6b27dfac20341c12f5490e5c7611df3f8c3d309b5b967f8d574e6e2d939f5224b8785bb5e07fbb3941955530cfbbc8c0049b269

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save