aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md10
-rw-r--r--dev-lang/python/Manifest3
-rw-r--r--dev-lang/python/python-3.12.8_p1.ebuild (renamed from dev-lang/python/python-3.9.20_p1.ebuild)262
-rw-r--r--dev-lang/python/python-3.13.1_p1.ebuild638
-rw-r--r--dev-lang/rust/Manifest2
-rw-r--r--dev-lang/rust/files/1.47.0-ignore-broken-and-non-applicable-tests.patch75
-rw-r--r--dev-lang/rust/files/1.49.0-gentoo-musl-target-specs.patch164
-rw-r--r--dev-lang/rust/files/1.53.0-rustversion-1.0.5.patch234
-rw-r--r--dev-lang/rust/files/1.54.0-parallel-miri.patch43
-rw-r--r--dev-lang/rust/files/1.84.1-fix-cross.patch30
-rw-r--r--dev-lang/rust/files/llvm/12/cstdint-signals-h.patch24
-rw-r--r--dev-lang/rust/metadata.xml1
-rw-r--r--dev-lang/rust/rust-1.71.1-r100.ebuild12
-rw-r--r--dev-lang/rust/rust-1.74.1-r100.ebuild334
-rw-r--r--dev-lang/rust/rust-1.75.0-r100.ebuild12
-rw-r--r--dev-lang/rust/rust-1.76.0-r100.ebuild12
-rw-r--r--dev-lang/rust/rust-1.77.1-r100.ebuild12
-rw-r--r--dev-lang/rust/rust-1.78.0-r100.ebuild12
-rw-r--r--dev-lang/rust/rust-1.79.0-r100.ebuild12
-rw-r--r--dev-lang/rust/rust-1.80.1-r100.ebuild12
-rw-r--r--dev-lang/rust/rust-1.81.0-r100.ebuild12
-rw-r--r--dev-lang/rust/rust-1.82.0-r100.ebuild12
-rw-r--r--dev-lang/rust/rust-1.82.0-r101.ebuild12
-rw-r--r--dev-lang/rust/rust-1.83.0-r1.ebuild16
-rw-r--r--dev-lang/rust/rust-1.84.0.ebuild13
-rw-r--r--dev-lang/rust/rust-1.84.1.ebuild753
-rw-r--r--dev-python/aioquic/Manifest1
-rw-r--r--dev-python/aioquic/aioquic-1.2.0.ebuild39
-rw-r--r--dev-python/aioquic/files/aioquic-1.2.0-libressl.patch19
-rw-r--r--dev-python/aioquic/metadata.xml11
-rw-r--r--dev-qt/qtbase/Manifest3
-rw-r--r--dev-qt/qtbase/files/qtbase-6.7.2-CVE-2024-39936.patch200
-rw-r--r--dev-qt/qtbase/files/qtbase-6.7.2-float16-sse2.patch43
-rw-r--r--dev-qt/qtbase/files/qtbase-6.7.2-gcc15-odr.patch32
-rw-r--r--dev-qt/qtbase/files/qtbase-6.7.2-haswell-no-rdrnd.patch100
-rw-r--r--dev-qt/qtbase/files/qtbase-6.7.2-qcontiguouscache.patch8
-rw-r--r--dev-qt/qtbase/files/qtbase-6.7.2-qwindowprivate-crash.patch28
-rw-r--r--dev-qt/qtbase/files/qtbase-6.7.3-QTBUG-125053.patch46
-rw-r--r--dev-qt/qtbase/files/qtbase-6.7.3-erratic-mouse-input.patch156
-rw-r--r--dev-qt/qtbase/files/qtbase-6.8.2-QTBUG-133500.patch58
-rw-r--r--dev-qt/qtbase/qtbase-6.7.2-r5.ebuild366
-rw-r--r--dev-qt/qtbase/qtbase-6.8.2-r1.ebuild (renamed from dev-qt/qtbase/qtbase-6.7.3-r2.ebuild)24
-rw-r--r--dev-util/maturin/maturin-1.8.1.ebuild2
-rw-r--r--net-dialup/ppp/ppp-2.5.1-r1.ebuild6
-rw-r--r--net-libs/libssh/Manifest4
-rw-r--r--net-libs/libssh/files/libssh-0.11.1-libressl.patch28
-rw-r--r--net-libs/libssh/libssh-0.11.1-r1.ebuild135
-rw-r--r--net-libs/libssh/metadata.xml19
-rw-r--r--net-misc/curl/Manifest4
-rw-r--r--net-misc/curl/curl-8.10.1-r2.ebuild4
-rw-r--r--net-misc/curl/curl-8.11.1-r2.ebuild6
-rw-r--r--net-misc/curl/curl-8.12.0-r1.ebuild (renamed from net-misc/curl/curl-8.11.0-r1.ebuild)29
-rw-r--r--net-misc/curl/curl-8.12.0.ebuild384
-rw-r--r--net-misc/curl/curl-8.9.1-r2.ebuild4
-rw-r--r--net-misc/curl/files/curl-8.12.0-multi.patch136
-rw-r--r--net-misc/curl/files/curl-prefix-4.patch35
-rw-r--r--net-misc/curl/metadata.xml1
-rw-r--r--net-vpn/tor/Manifest3
-rw-r--r--net-vpn/tor/tor-0.4.8.14.ebuild200
59 files changed, 3146 insertions, 1710 deletions
diff --git a/README.md b/README.md
index d125e4f..528c22b 100644
--- a/README.md
+++ b/README.md
@@ -31,6 +31,16 @@ the LibreSSL package and then remove the OpenSSL package before installing
# emerge @preserved-rebuild
```
+The `net-misc/curl` package when built with the `quic` USE flag requires
+`net-libs/ngtcp2` to be built with the `openssl` USE flag, but this is
+masked in the Gentoo repo so it must be unmasked by editing or creating
+the `/etc/portage/profile/package.use.mask/net-libs` file with the
+following contents:
+```
+net-libs/ngtcp2 -openssl
+```
+See LibreSSL issue https://github.com/libressl/portable/issues/1114 for rationale.
+
## links
[Gentoo bug report](https://bugs.gentoo.org/show_bug.cgi?id=508750)
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index 5484dbe..b5acd69 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -18,8 +18,9 @@ DIST python-gentoo-patches-2.7.18_p16.tar.xz 35448 BLAKE2B 0139c0944f62f9cdd236f
DIST python-gentoo-patches-3.10.16_p1.tar.xz 24964 BLAKE2B 93cf5d208f80f1017e4afdcf7d3551d150a1d68c378312af43c668156d98f10087d2b6f315f717823a9aae1114e2baa999f61ce179639e5511d30ed9620c9570 SHA512 74ad92d3256d744e3572c0d858b4ba4d5f0f6fda84d8f3c1a1fb675376c2d525e2d9fd636a65c8a859a0a312eda00877b13ba311f620b6a51e47dfb082843333
DIST python-gentoo-patches-3.11.11_p1.tar.xz 11644 BLAKE2B d080e1b987ea0e1b397113f20a5c84f6a34d6619a3ed9f7389fd10d95636169563fba97d212477ca7f9b93d2bd0b66c9521fc61963bb468805a661ca3ab287a7 SHA512 f6045adf25923053fc9a60506b9164c9c062580d6886f1a3dcaca00dc4affe69aa9e138f8ce93f093798ccf33322ccca2aca674ab87457df98a93dcaca234b44
DIST python-gentoo-patches-3.12.8.tar.xz 10772 BLAKE2B 9833b5ee6c307a4aa1335fd966fcd64a0f3732a97a190abdd3121b3496ea68ead9436af4ec5e3e8c0e781fd68df41403a1b2e5f29f264fc8569a883141e5f7f9 SHA512 d5906845a6259f7349a0299e185f569750b493c64ea1f6537dc8bfc0babc9b54de7db1c4f1b5b6ec2f7076937ad07ca0ca9c4941bbb8d542da6c687957bdbd5e
+DIST python-gentoo-patches-3.12.8_p1.tar.xz 11088 BLAKE2B 4d7ccf4759b624aafde1ef2a0a341cda8f4d3e7c4d86586201a910d77327219e61b134985f2fe85e83892ad4ba607b4e661aed675cc038e4cc193efe9fbe6f6e SHA512 6f1d6ab2b9e958ae7d2ca3f204b7c7eb1435998919cf5a577a82bbf1339232f92a2f517c248afb9e1802850acd2b59b84c41e87f4b8582e19ec88155743cdaae
DIST python-gentoo-patches-3.13.0.tar.xz 8316 BLAKE2B 8fb8ba8f41f310140ad7066b614952023112d5043e5d82058364125611785144c1843e87eecb7669bcbab51c40d0694069526219f7419a7009517ce0821b74ba SHA512 0eb31ebfa3411020aa70b3b66fd7eec98b4b7a686b0e8f1f7ed76a8186a7c1ee85ccd9565a86a1d7ec13b975855eeb7303036af05e2dfdce3d64e4ad99299df4
DIST python-gentoo-patches-3.13.1.tar.xz 8320 BLAKE2B 2fef9c501df7ed7603eabb3e01a8c3bde5bcfae3a8ac9bbe772b458cb04ffa9598cf38f3a74f6dcbcda29e7bd294d664b8fb12f7ddd9e0e42ed6268300947bb0 SHA512 419e1f12daaf19ed2d2195699b5e8c2c604779562d84d6a68adb4016dcb13fc3e0383ccc4b01eb153930600e6c9cdcc518929ffce3d6343019226a6111e9d617
-DIST python-gentoo-patches-3.9.20_p1.tar.xz 34944 BLAKE2B 332454661adc03033c7e8a5fcc91081b7d405826e9bf89bb2c2e178a0795e4415c9e87ae923756470ee973441f242e194b397354964b8f43dadd4965d210a4f4 SHA512 19bf7227535526a733633723b75d49786dfd8738595c1115b4e05665bc13a1ea70cbf0cc62cb27e81c75f5db2aa56ab985eaa5abde6243697caccb2cb5288005
+DIST python-gentoo-patches-3.13.1_p1.tar.xz 8672 BLAKE2B d35b8b47c6d549753d9a764fbc3538cb6517c809e69901f3221110ccbb0ea9eed10ba1f1637a5ffe4f90d8c3932f53815c7dcf844a7350ad89458763bf0aeea1 SHA512 0505bc1f7c8e264fdcad5459900e37d12ed9bea57e615ea42492fa211d3f0641e79c3e711a6970cd34a3a6275f36a22ed7ba64fd71c988bcdaebfcefc7b6a1d2
DIST python-gentoo-patches-3.9.20_p2.tar.xz 36140 BLAKE2B af0a9e08f3bfd8eb631760d100ec8f54db968a6bd201820192c4ea63ec88e0f83ffe77c709fcf4da43ad8d44eeb239ca1984561c3e7846e3fe4edd757d2321a4 SHA512 d451b41401de631eed996c34f40f2146d4d2f11bfa04fffa762c9b654e690d0ef95be0f51224a964a7c33784bb9b21e58434f6fee17cf39c20b5af34200569d5
DIST python-gentoo-patches-3.9.21_p1.tar.xz 35404 BLAKE2B 7b5ac27e814b06791fa5f0566763711c1b65a7c82ba66f97e237eebc6076f0bfdad3d8269ece6c4d4c238b62cc75b01f68ea3a5d7c4fffc46e88f79b2ba3e7fc SHA512 92c8548b31100a921378c72cc94a81062c96fd795fa2cd001c57a71e4af39e91b21b99e9e84db12adb142d9c4bda809445519c5c8a35545bd10230926bd7eded
diff --git a/dev-lang/python/python-3.9.20_p1.ebuild b/dev-lang/python/python-3.12.8_p1.ebuild
index 87b2304..7d5e02c 100644
--- a/dev-lang/python/python-3.9.20_p1.ebuild
+++ b/dev-lang/python/python-3.12.8_p1.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
WANT_LIBTOOL="none"
inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
-inherit prefix python-utils-r1 toolchain-funcs verify-sig
+inherit python-utils-r1 toolchain-funcs verify-sig
MY_PV=${PV/_rc/rc}
MY_P="Python-${MY_PV%_p*}"
@@ -28,10 +28,10 @@ S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="
- bluetooth build debug +ensurepip examples gdbm +ncurses pgo
- +readline +sqlite +ssl test tk valgrind
+ bluetooth build debug +ensurepip examples gdbm libedit
+ +ncurses pgo +readline +sqlite +ssl test tk valgrind
"
RESTRICT="!test? ( test )"
@@ -43,6 +43,7 @@ RESTRICT="!test? ( test )"
RDEPEND="
app-arch/bzip2:=
app-arch/xz-utils:=
+ app-crypt/libb2
>=dev-libs/expat-2.1:=
dev-libs/libffi:=
dev-libs/mpdecimal:=
@@ -50,11 +51,14 @@ RDEPEND="
>=sys-libs/zlib-1.1.3:=
virtual/libcrypt:=
virtual/libintl
- ensurepip? ( dev-python/ensurepip-wheels )
+ ensurepip? ( dev-python/ensurepip-pip )
gdbm? ( sys-libs/gdbm:=[berkdb] )
kernel_linux? ( sys-apps/util-linux:= )
ncurses? ( >=sys-libs/ncurses-5.2:= )
- readline? ( >=sys-libs/readline-4.1:= )
+ 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? (
@@ -68,7 +72,12 @@ RDEPEND="
DEPEND="
${RDEPEND}
bluetooth? ( net-wireless/bluez )
- test? ( app-arch/xz-utils )
+ test? (
+ app-arch/xz-utils
+ dev-python/ensurepip-pip
+ dev-python/ensurepip-setuptools
+ dev-python/ensurepip-wheel
+ )
valgrind? ( dev-debug/valgrind )
"
# autoconf-archive needed to eautoreconf
@@ -76,11 +85,16 @@ BDEPEND="
dev-build/autoconf-archive
app-alternatives/awk
virtual/pkgconfig
- verify-sig? ( sec-keys/openpgp-keys-python )
+ verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 )
"
RDEPEND+="
!build? ( app-misc/mime-types )
"
+if [[ ${PV} != *_alpha* ]]; then
+ RDEPEND+="
+ dev-lang/python-exec[python_targets_python${PYVER/./_}(-)]
+ "
+fi
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
@@ -108,48 +122,95 @@ src_unpack() {
src_prepare() {
# Ensure that internal copies of expat and libffi are not used.
- rm -r Modules/expat || die
- rm -r Modules/_ctypes/libffi* || die
-
- # Causes runtime issues with libressl
- rm "${WORKDIR}/${PATCHSET}"/0013-bpo-43998-Default-to-TLS-1.2-and-increase-cipher-sui.patch || die
+ # TODO: Makefile has annoying deps on expat headers
+ #rm -r Modules/expat || die
local PATCHES=(
"${WORKDIR}/${PATCHSET}"
- "${FILESDIR}"/${PN}-3.9.19-libressl.patch
+ "${FILESDIR}"/${PN}-3.12.4-libressl.patch
)
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
+ sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die
+
+ # breaks tests when using --with-wheel-pkg-dir
+ rm -r Lib/test/wheeldata || die
eautoreconf
}
+build_cbuild_python() {
+ # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
+ local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi)
+
+ # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
+ # propagated to sysconfig for built extensions
+ #
+ # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway)
+ local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto"
+ local -x LDFLAGS_NODIST=${BUILD_LDFLAGS}
+ local -x CFLAGS= LDFLAGS=
+ local -x BUILD_CFLAGS="${CFLAGS_NODIST}"
+ local -x BUILD_LDFLAGS=${LDFLAGS_NODIST}
+
+ # We need to build our own Python on CBUILD first, and feed it in.
+ # bug #847910
+ local myeconfargs_cbuild=(
+ "${myeconfargs[@]}"
+
+ --prefix="${BROOT}"/usr
+ --libdir="${cbuild_libdir:2}"
+
+ # Avoid needing to load the right libpython.so.
+ --disable-shared
+
+ # As minimal as possible for the mini CBUILD Python
+ # we build just for cross to satisfy --with-build-python.
+ --without-lto
+ --without-readline
+ --disable-optimizations
+ )
+
+ mkdir "${WORKDIR}"/${P}-${CBUILD} || die
+ pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
+
+ # Avoid as many dependencies as possible for the cross build.
+ mkdir Modules || die
+ cat > Modules/Setup.local <<-EOF || die
+ *disabled*
+ nis
+ _dbm _gdbm
+ _sqlite3
+ _hashlib _ssl
+ _curses _curses_panel
+ readline
+ _tkinter
+ pyexpat
+ zlib
+ # We disabled these for CBUILD because Python's setup.py can't handle locating
+ # libdir correctly for cross. This should be rechecked for the pure Makefile approach,
+ # and uncommented if needed.
+ #_ctypes _crypt
+ EOF
+
+ ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
+
+ # Unfortunately, we do have to build this immediately, and
+ # not in src_compile, because CHOST configure for Python
+ # will check the existence of the --with-build-python value
+ # immediately.
+ emake
+ popd &> /dev/null || die
+}
+
src_configure() {
# disable automagic bluetooth headers detection
if ! use bluetooth; then
local -x ac_cv_header_bluetooth_bluetooth_h=no
fi
- local disable
- use gdbm || disable+=" gdbm"
- use ncurses || disable+=" _curses _curses_panel"
- use readline || disable+=" readline"
- use sqlite || disable+=" _sqlite3"
- use ssl || export PYTHON_DISABLE_SSL="1"
- use tk || disable+=" _tkinter"
- export PYTHON_DISABLE_MODULES="${disable}"
-
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
- fi
append-flags -fwrapv
filter-flags -malign-double
@@ -165,7 +226,8 @@ src_configure() {
# Set baseline test skip flags.
COMMON_TEST_SKIPS=(
- -x test_gdb
+ # this is actually test_gdb.test_pretty_print
+ -x test_pretty_print
)
# Arch-specific skips. See #931888 for a collection of these.
@@ -196,7 +258,7 @@ src_configure() {
;;
powerpc64-*) # big endian
COMMON_TEST_SKIPS+=(
- -x test_descr
+ -x test_gdb
)
;;
riscv*)
@@ -212,7 +274,7 @@ src_configure() {
-x test_multiprocessing_spawn
-x test_ctypes
- -x test_descr
+ -x test_gdb
# bug 931908
-x test_exceptions
)
@@ -264,6 +326,11 @@ src_configure() {
# Hangs (actually runs indefinitely executing itself w/ many cpython builds)
# bug #900429
-x test_tools
+
+ # Fails with LibreSSL
+ # https://github.com/libressl/portable/issues/1133
+ -x test_hashlib
+ -x test_ssl
)
# Arch-specific skips. See #931888 for a collection of these.
@@ -309,7 +376,11 @@ src_configure() {
# a chance for users rebuilding python before glibc
ac_cv_header_stropts_h=no
+ # libressl doesn't find hashlib (From OpenBSD)
+ ac_cv_working_openssl_hashlib=yes
+
--enable-shared
+ --without-static-libpython
--enable-ipv6
--infodir='${prefix}/share/info'
--mandir='${prefix}/share/man'
@@ -320,18 +391,17 @@ src_configure() {
--without-ensurepip
--without-lto
--with-system-expat
- --with-system-ffi
--with-system-libmpdec
+ --with-platlibdir=lib
+ --with-pkg-config=yes
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
$(use_with debug assertions)
$(use_enable pgo optimizations)
+ $(use_with readline readline "$(usex libedit editline readline)")
$(use_with valgrind)
)
- # disable implicit optimization/debugging flags
- local -x OPT=
-
# https://bugs.gentoo.org/700012
if tc-is-lto; then
append-cflags $(test-flags-CC -ffat-lto-objects)
@@ -340,70 +410,29 @@ src_configure() {
)
fi
+ # Force-disable modules we don't want built.
+ # See Modules/Setup for docs on how this works. Setup.local contains our local deviations.
+ cat > Modules/Setup.local <<-EOF || die
+ *disabled*
+ nis
+ $(usev !gdbm '_gdbm _dbm')
+ $(usev !sqlite '_sqlite3')
+ $(usev !ssl '_hashlib _ssl')
+ $(usev !ncurses '_curses _curses_panel')
+ $(usev !readline 'readline')
+ $(usev !tk '_tkinter')
+ EOF
+
+ # disable implicit optimization/debugging flags
+ local -x OPT=
+
if tc-is-cross-compiler ; then
- # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
- local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi)
-
- # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
- # propagated to sysconfig for built extensions
- #
- # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway)
- local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto"
- local -x LDFLAGS_NODIST=${BUILD_LDFLAGS}
- local -x CFLAGS= LDFLAGS=
- local -x BUILD_CFLAGS="${CFLAGS_NODIST}"
- local -x BUILD_LDFLAGS=${LDFLAGS_NODIST}
-
- # We need to build our own Python on CBUILD first, and feed it in.
- # bug #847910 and bug #864911.
- local myeconfargs_cbuild=(
- "${myeconfargs[@]}"
-
- --libdir="${cbuild_libdir:2}"
-
- # Avoid needing to load the right libpython.so.
- --disable-shared
-
- # As minimal as possible for the mini CBUILD Python
- # we build just for cross.
- --without-lto
- --disable-optimizations
+ build_cbuild_python
+ myeconfargs+=(
+ # Point the imminent CHOST build to the Python we just
+ # built for CBUILD.
+ --with-build-python="${WORKDIR}"/${P}-${CBUILD}/python
)
-
- # Point the imminent CHOST build to the Python we just
- # built for CBUILD.
- export PATH="${WORKDIR}/${P}-${CBUILD}:${PATH}"
-
- mkdir "${WORKDIR}"/${P}-${CBUILD} || die
- pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
- # We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating
- # libdir correctly for cross.
- PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" \
- ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
-
- # Avoid as many dependencies as possible for the cross build.
- cat >> Makefile <<-EOF || die
- MODULE_NIS=disabled
- MODULE__DBM=disabled
- MODULE__GDBM=disabled
- MODULE__DBM=disabled
- MODULE__SQLITE3=disabled
- MODULE__HASHLIB=disabled
- MODULE__SSL=disabled
- MODULE__CURSES=disabled
- MODULE__CURSES_PANEL=disabled
- MODULE_READLINE=disabled
- MODULE__TKINTER=disabled
- MODULE_PYEXPAT=disabled
- MODULE_ZLIB=disabled
- EOF
-
- # Unfortunately, we do have to build this immediately, and
- # not in src_compile, because CHOST configure for Python
- # will check the existence of the Python it was pointed to
- # immediately.
- PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" emake
- popd &> /dev/null || die
fi
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
@@ -417,7 +446,6 @@ src_configure() {
append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
fi
- hprefixify setup.py
econf "${myeconfargs[@]}"
if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
@@ -434,9 +462,7 @@ 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.
@@ -450,7 +476,7 @@ src_compile() {
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
- local -x TMPDIR=/tmp
+ local -x TMPDIR=/var/tmp
fi
# also need to clear the flags explicitly here or they end up
@@ -475,6 +501,11 @@ src_test() {
return
fi
+ # this just happens to skip test_support.test_freeze that is broken
+ # without bundled expat
+ # TODO: get a proper skip for it upstream
+ local -x LOGNAME=buildbot
+
local test_opts=(
--verbose3
-u-network
@@ -485,7 +516,7 @@ src_test() {
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
- local -x TMPDIR=/tmp
+ local -x TMPDIR=/var/tmp
nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
@@ -497,10 +528,12 @@ src_test() {
src_install() {
local libdir=${ED}/usr/lib/python${PYVER}
- emake DESTDIR="${D}" altinstall
+ # the Makefile rules are broken
+ # https://github.com/python/cpython/issues/100221
+ mkdir -p "${libdir}"/lib-dynload || die
- # Remove static library
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
+ # -j1 hack for now for bug #843458
+ emake -j1 DESTDIR="${D}" TEST_MODULES=no altinstall
# Fix collisions between different slots of Python.
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
@@ -526,15 +559,12 @@ src_install() {
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
+ 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
+ rm -r "${libdir}/"{idlelib,tkinter} || die
fi
ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die
diff --git a/dev-lang/python/python-3.13.1_p1.ebuild b/dev-lang/python/python-3.13.1_p1.ebuild
new file mode 100644
index 0000000..6a31745
--- /dev/null
+++ b/dev-lang/python/python-3.13.1_p1.ebuild
@@ -0,0 +1,638 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+LLVM_COMPAT=( 18 )
+LLVM_OPTIONAL=1
+WANT_LIBTOOL="none"
+
+inherit autotools check-reqs flag-o-matic linux-info llvm-r1
+inherit multiprocessing pax-utils python-utils-r1 toolchain-funcs
+inherit verify-sig
+
+MY_PV=${PV}
+MY_P="Python-${MY_PV%_p*}"
+PYVER=$(ver_cut 1-2)
+PATCHSET="python-gentoo-patches-${MY_PV}"
+
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
+HOMEPAGE="
+ https://www.python.org/
+ https://github.com/python/cpython/
+"
+SRC_URI="
+ https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
+ https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
+ verify-sig? (
+ https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
+ )
+"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="PSF-2"
+SLOT="${PYVER}"
+KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+IUSE="
+ bluetooth build debug +ensurepip examples gdbm jit
+ libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind
+"
+REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )"
+RESTRICT="!test? ( test )"
+
+# Do not add a dependency on dev-lang/python to this ebuild.
+# If you need to apply a patch which requires python for bootstrapping, please
+# run the bootstrap code on your dev box and include the results in the
+# patchset. See bug 447752.
+
+RDEPEND="
+ app-arch/bzip2:=
+ app-arch/xz-utils:=
+ app-crypt/libb2
+ >=dev-libs/expat-2.1:=
+ dev-libs/libffi:=
+ dev-libs/mpdecimal:=
+ dev-python/gentoo-common
+ >=sys-libs/zlib-1.1.3:=
+ virtual/libintl
+ ensurepip? ( dev-python/ensurepip-pip )
+ gdbm? ( sys-libs/gdbm:=[berkdb] )
+ kernel_linux? ( sys-apps/util-linux:= )
+ ncurses? ( >=sys-libs/ncurses-5.2:= )
+ readline? (
+ !libedit? ( >=sys-libs/readline-4.1:= )
+ libedit? ( dev-libs/libedit:= )
+ )
+ sqlite? ( >=dev-db/sqlite-3.3.8:3= )
+ ssl? ( >=dev-libs/openssl-1.1.1:= )
+ tk? (
+ >=dev-lang/tcl-8.0:=
+ >=dev-lang/tk-8.0:=
+ dev-tcltk/blt:=
+ dev-tcltk/tix
+ )
+"
+# bluetooth requires headers from bluez
+DEPEND="
+ ${RDEPEND}
+ bluetooth? ( net-wireless/bluez )
+ test? (
+ dev-python/ensurepip-pip
+ dev-python/ensurepip-setuptools
+ dev-python/ensurepip-wheel
+ )
+ valgrind? ( dev-debug/valgrind )
+"
+# autoconf-archive needed to eautoreconf
+BDEPEND="
+ dev-build/autoconf-archive
+ app-alternatives/awk
+ virtual/pkgconfig
+ jit? (
+ $(llvm_gen_dep '
+ llvm-core/clang:${LLVM_SLOT}
+ llvm-core/llvm:${LLVM_SLOT}
+ ')
+ )
+ verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 )
+"
+RDEPEND+="
+ !build? ( app-misc/mime-types )
+"
+if [[ ${PV} != *_alpha* ]]; then
+ RDEPEND+="
+ dev-lang/python-exec[python_targets_python${PYVER/./_}(-)]
+ "
+fi
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
+
+# large file tests involve a 2.5G file being copied (duplicated)
+CHECKREQS_DISK_BUILD=5500M
+
+QA_PKGCONFIG_VERSION=${PYVER}
+# false positives -- functions specific to *BSD
+QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags )
+
+declare -rgA PYTHON_KERNEL_CHECKS=(
+ ["CROSS_MEMORY_ATTACH"]="test_external_inspection" #bug 938589
+ ["DNOTIFY"]="test_fcntl" # bug 938662
+)
+
+pkg_pretend() {
+ if use pgo || use test; then
+ check-reqs_pkg_pretend
+ fi
+
+ if use jit; then
+ ewarn "USE=jit is considered experimental upstream. Using it"
+ ewarn "could lead to unexpected breakage, including race conditions"
+ ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless"
+ ewarn "you can reproduce the problem with dev-lang/python[-jit]. Instead,"
+ ewarn "please consider reporting JIT problems upstream."
+ fi
+}
+
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ use jit && llvm-r1_pkg_setup
+ if use test || use pgo; then
+ check-reqs_pkg_setup
+
+ local CONFIG_CHECK
+ for f in "${!PYTHON_KERNEL_CHECKS[@]}"; do
+ CONFIG_CHECK+="~${f} "
+ done
+ linux-info_pkg_setup
+ fi
+ fi
+}
+
+src_unpack() {
+ if use verify-sig; then
+ verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
+ fi
+ default
+}
+
+src_prepare() {
+ # Ensure that internal copies of expat and libffi are not used.
+ # TODO: Makefile has annoying deps on expat headers
+ #rm -r Modules/expat || die
+
+ local PATCHES=(
+ "${WORKDIR}/${PATCHSET}"
+ "${FILESDIR}"/${PN}-3.12.4-libressl.patch
+ )
+
+ default
+
+ # force the correct number of jobs
+ # https://bugs.gentoo.org/737660
+ sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die
+
+ # breaks tests when using --with-wheel-pkg-dir
+ rm -r Lib/test/wheeldata || die
+
+ eautoreconf
+}
+
+build_cbuild_python() {
+ # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
+ local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi)
+
+ # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
+ # propagated to sysconfig for built extensions
+ #
+ # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway)
+ local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto"
+ local -x LDFLAGS_NODIST=${BUILD_LDFLAGS}
+ local -x CFLAGS= LDFLAGS=
+ local -x BUILD_CFLAGS="${CFLAGS_NODIST}"
+ local -x BUILD_LDFLAGS=${LDFLAGS_NODIST}
+
+ # We need to build our own Python on CBUILD first, and feed it in.
+ # bug #847910
+ local myeconfargs_cbuild=(
+ "${myeconfargs[@]}"
+
+ --prefix="${BROOT}"/usr
+ --libdir="${cbuild_libdir:2}"
+
+ # Avoid needing to load the right libpython.so.
+ --disable-shared
+
+ # As minimal as possible for the mini CBUILD Python
+ # we build just for cross to satisfy --with-build-python.
+ --without-lto
+ --without-readline
+ --disable-optimizations
+ )
+
+ mkdir "${WORKDIR}"/${P}-${CBUILD} || die
+ pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
+
+ # Avoid as many dependencies as possible for the cross build.
+ mkdir Modules || die
+ cat > Modules/Setup.local <<-EOF || die
+ *disabled*
+ nis
+ _dbm _gdbm
+ _sqlite3
+ _hashlib _ssl
+ _curses _curses_panel
+ readline
+ _tkinter
+ pyexpat
+ zlib
+ # We disabled these for CBUILD because Python's setup.py can't handle locating
+ # libdir correctly for cross. This should be rechecked for the pure Makefile approach,
+ # and uncommented if needed.
+ #_ctypes
+ EOF
+
+ ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
+
+ # Unfortunately, we do have to build this immediately, and
+ # not in src_compile, because CHOST configure for Python
+ # will check the existence of the --with-build-python value
+ # immediately.
+ emake
+ popd &> /dev/null || die
+}
+
+src_configure() {
+ # disable automagic bluetooth headers detection
+ if ! use bluetooth; then
+ local -x ac_cv_header_bluetooth_bluetooth_h=no
+ fi
+
+ append-flags -fwrapv
+ filter-flags -malign-double
+
+ # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
+ # PKG_CONFIG needed for cross.
+ tc-export CXX PKG_CONFIG
+
+ local dbmliborder=
+ if use gdbm; then
+ dbmliborder+="${dbmliborder:+:}gdbm"
+ fi
+
+ # Set baseline test skip flags.
+ COMMON_TEST_SKIPS=(
+ # this is actually test_gdb.test_pretty_print
+ -x test_pretty_print
+ # https://bugs.gentoo.org/933840
+ -x test_perf_profiler
+ )
+
+ # Arch-specific skips. See #931888 for a collection of these.
+ case ${CHOST} in
+ alpha*)
+ COMMON_TEST_SKIPS+=(
+ -x test_builtin
+ -x test_capi
+ -x test_cmath
+ -x test_float
+ # timeout
+ -x test_free_threading
+ -x test_math
+ -x test_numeric_tower
+ -x test_random
+ -x test_statistics
+ # bug 653850
+ -x test_resource
+ -x test_strtod
+ )
+ ;;
+ hppa*)
+ COMMON_TEST_SKIPS+=(
+ -x test_gdb
+ )
+ ;;
+ mips*)
+ COMMON_TEST_SKIPS+=(
+ -x test_ctypes
+ -x test_external_inspection
+ -x test_statistics
+ )
+ ;;
+ powerpc64-*) # big endian
+ COMMON_TEST_SKIPS+=(
+ -x test_gdb
+ )
+ ;;
+ riscv*)
+ COMMON_TEST_SKIPS+=(
+ -x test_urllib2
+ )
+ ;;
+ sparc*)
+ COMMON_TEST_SKIPS+=(
+ # bug 788022
+ -x test_multiprocessing_fork
+ -x test_multiprocessing_forkserver
+ -x test_multiprocessing_spawn
+
+ -x test_ctypes
+ -x test_gdb
+ # bug 931908
+ -x test_exceptions
+ )
+ ;;
+ esac
+
+ # Kernel-config specific skips
+ for option in "${!PYTHON_KERNEL_CHECKS[@]}"; do
+ if ! linux_config_exists || ! linux_chkconfig_present "${option}"
+ then
+ COMMON_TEST_SKIPS+=( -x "${PYTHON_KERNEL_CHECKS[${option}]}" )
+ fi
+ done
+
+ # musl-specific skips
+ use elibc_musl && COMMON_TEST_SKIPS+=(
+ # various musl locale deficiencies
+ -x test__locale
+ -x test_c_locale_coercion
+ -x test_locale
+ -x test_re
+
+ # known issues with find_library on musl
+ # https://bugs.python.org/issue21622
+ -x test_ctypes
+
+ # fpathconf, ttyname errno values
+ -x test_os
+ )
+
+ if use pgo; then
+ local profile_task_flags=(
+ -m test
+ "-j$(makeopts_jobs)"
+ --pgo-extended
+ --verbose3
+ -u-network
+
+ # We use a timeout because of how often we've had hang issues
+ # here. It also matches the default upstream PROFILE_TASK.
+ --timeout 1200
+
+ "${COMMON_TEST_SKIPS[@]}"
+
+ -x test_dtrace
+
+ # All of these seem to occasionally hang for PGO inconsistently
+ # They'll even hang here but be fine in src_test sometimes.
+ # bug #828535 (and related: bug #788022)
+ -x test_asyncio
+ -x test_httpservers
+ -x test_logging
+ -x test_multiprocessing_fork
+ -x test_socket
+ -x test_xmlrpc
+
+ # Hangs (actually runs indefinitely executing itself w/ many cpython builds)
+ # bug #900429
+ -x test_tools
+
+ # Fails with LibreSSL
+ # https://github.com/libressl/portable/issues/1133
+ -x test_hashlib
+ -x test_ssl
+ )
+
+ if has_version "app-arch/rpm" ; then
+ # Avoid sandbox failure (attempts to write to /var/lib/rpm)
+ profile_task_flags+=(
+ -x test_distutils
+ )
+ fi
+ # PGO sometimes fails randomly
+ local -x PROFILE_TASK="${profile_task_flags[*]} || true"
+ fi
+
+ local myeconfargs=(
+ # glibc-2.30 removes it; since we can't cleanly force-rebuild
+ # Python on glibc upgrade, remove it proactively to give
+ # a chance for users rebuilding python before glibc
+ ac_cv_header_stropts_h=no
+
+ # libressl doesn't find hashlib (From OpenBSD)
+ ac_cv_working_openssl_hashlib=yes
+
+ --enable-shared
+ --without-static-libpython
+ --enable-ipv6
+ --infodir='${prefix}/share/info'
+ --mandir='${prefix}/share/man'
+ --with-computed-gotos
+ --with-dbmliborder="${dbmliborder}"
+ --with-libc=
+ --enable-loadable-sqlite-extensions
+ --without-ensurepip
+ --without-lto
+ --with-system-expat
+ --with-system-libmpdec
+ --with-platlibdir=lib
+ --with-pkg-config=yes
+ --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
+ --enable-gil
+
+ $(use_with debug assertions)
+ $(use_enable jit experimental-jit)
+ $(use_enable pgo optimizations)
+ $(use_with readline readline "$(usex libedit editline readline)")
+ $(use_with valgrind)
+ )
+
+ # https://bugs.gentoo.org/700012
+ if tc-is-lto; then
+ append-cflags $(test-flags-CC -ffat-lto-objects)
+ myeconfargs+=(
+ --with-lto
+ )
+ fi
+
+ # Force-disable modules we don't want built.
+ # See Modules/Setup for docs on how this works. Setup.local contains our local deviations.
+ cat > Modules/Setup.local <<-EOF || die
+ *disabled*
+ nis
+ $(usev !gdbm '_gdbm _dbm')
+ $(usev !sqlite '_sqlite3')
+ $(usev !ssl '_hashlib _ssl')
+ $(usev !ncurses '_curses _curses_panel')
+ $(usev !readline 'readline')
+ $(usev !tk '_tkinter')
+ EOF
+
+ # disable implicit optimization/debugging flags
+ local -x OPT=
+
+ if tc-is-cross-compiler ; then
+ build_cbuild_python
+ myeconfargs+=(
+ # Point the imminent CHOST build to the Python we just
+ # built for CBUILD.
+ --with-build-python="${WORKDIR}"/${P}-${CBUILD}/python
+ )
+ fi
+
+ # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
+ # propagated to sysconfig for built extensions
+ local -x CFLAGS_NODIST=${CFLAGS}
+ local -x LDFLAGS_NODIST=${LDFLAGS}
+ local -x CFLAGS= LDFLAGS=
+
+ # Fix implicit declarations on cross and prefix builds. Bug #674070.
+ if use ncurses; then
+ append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
+ fi
+
+ econf "${myeconfargs[@]}"
+
+ if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
+ eerror "configure has detected that the sem_open function is broken."
+ eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
+ die "Broken sem_open function (bug 496328)"
+ fi
+
+ # install epython.py as part of stdlib
+ echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
+}
+
+src_compile() {
+ # Ensure sed works as expected
+ # https://bugs.gentoo.org/594768
+ local -x LC_ALL=C
+ export PYTHONSTRICTEXTENSIONBUILD=1
+
+ # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
+ # end up writing bytecode & violating sandbox.
+ # bug #831897
+ local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
+
+ # Gentoo hack to disable accessing system site-packages
+ export GENTOO_CPYTHON_BUILD=1
+
+ if use pgo ; then
+ # bug 660358
+ local -x COLUMNS=80
+ local -x PYTHONDONTWRITEBYTECODE=
+ local -x TMPDIR=/var/tmp
+ fi
+
+ # also need to clear the flags explicitly here or they end up
+ # in _sysconfigdata*
+ emake CPPFLAGS= CFLAGS= LDFLAGS=
+
+ # Restore saved value from above.
+ local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
+
+ # Work around bug 329499. See also bug 413751 and 457194.
+ if has_version dev-libs/libffi[pax-kernel]; then
+ pax-mark E python
+ else
+ pax-mark m python
+ fi
+}
+
+src_test() {
+ # Tests will not work when cross compiling.
+ if tc-is-cross-compiler; then
+ elog "Disabling tests due to crosscompiling."
+ return
+ fi
+
+ # this just happens to skip test_support.test_freeze that is broken
+ # without bundled expat
+ # TODO: get a proper skip for it upstream
+ local -x LOGNAME=buildbot
+
+ local test_opts=(
+ --verbose3
+ -u-network
+ -j "$(makeopts_jobs)"
+ "${COMMON_TEST_SKIPS[@]}"
+ )
+
+ # bug 660358
+ local -x COLUMNS=80
+ local -x PYTHONDONTWRITEBYTECODE=
+ local -x TMPDIR=/var/tmp
+
+ nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
+ CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
+ local ret=${?}
+
+ [[ ${ret} -eq 0 ]] || die "emake test failed"
+}
+
+src_install() {
+ local libdir=${ED}/usr/lib/python${PYVER}
+
+ # -j1 hack for now for bug #843458
+ emake -j1 DESTDIR="${D}" TEST_MODULES=no altinstall
+
+ # Fix collisions between different slots of Python.
+ rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
+
+ # Cheap hack to get version with ABIFLAGS
+ local abiver=$(cd "${ED}/usr/include"; echo python*)
+ if [[ ${abiver} != python${PYVER} ]]; then
+ # Replace python3.X with a symlink to python3.Xm
+ rm "${ED}/usr/bin/python${PYVER}" || die
+ dosym "${abiver}" "/usr/bin/python${PYVER}"
+ # Create python3.X-config symlink
+ dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
+ # Create python-3.5m.pc symlink
+ dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
+ fi
+
+ # python seems to get rebuilt in src_install (bug 569908)
+ # Work around it for now.
+ if has_version dev-libs/libffi[pax-kernel]; then
+ pax-mark E "${ED}/usr/bin/${abiver}"
+ else
+ pax-mark m "${ED}/usr/bin/${abiver}"
+ fi
+
+ rm -r "${libdir}"/ensurepip/_bundled || die
+ if ! use sqlite; then
+ rm -r "${libdir}/"sqlite3 || die
+ fi
+ if ! use tk; then
+ rm -r "${ED}/usr/bin/idle${PYVER}" || die
+ rm -r "${libdir}/"{idlelib,tkinter} || die
+ fi
+
+ ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die
+
+ dodoc Misc/{ACKS,HISTORY,NEWS}
+
+ if use examples; then
+ docinto examples
+ find Tools -name __pycache__ -exec rm -fr {} + || die
+ dodoc -r Tools
+ fi
+ insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
+ local libname=$(
+ printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' |
+ emake --no-print-directory -s -f - 2>/dev/null
+ )
+ newins Tools/gdb/libpython.py "${libname}"-gdb.py
+
+ newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
+ newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
+ sed \
+ -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
+ -e "s:@PYDOC@:pydoc${PYVER}:" \
+ -i "${ED}/etc/conf.d/pydoc-${PYVER}" \
+ "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
+
+ # python-exec wrapping support
+ local pymajor=${PYVER%.*}
+ local EPYTHON=python${PYVER}
+ local scriptdir=${D}$(python_get_scriptdir)
+ mkdir -p "${scriptdir}" || die
+ # python and pythonX
+ ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die
+ ln -s "python${pymajor}" "${scriptdir}/python" || die
+ # python-config and pythonX-config
+ # note: we need to create a wrapper rather than symlinking it due
+ # to some random dirname(argv[0]) magic performed by python-config
+ cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
+ #!/bin/sh
+ exec "${abiver}-config" "\${@}"
+ EOF
+ chmod +x "${scriptdir}/python${pymajor}-config" || die
+ ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die
+ # pydoc
+ ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die
+ # idle
+ if use tk; then
+ ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die
+ fi
+}
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index 74d3965..f47aaa2 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -22,3 +22,5 @@ DIST rustc-1.83.0-src.tar.xz 353808388 BLAKE2B 217c85f7351a7c57a2684da2c7c81a320
DIST rustc-1.83.0-src.tar.xz.asc 801 BLAKE2B 3bacb43d50ebba579dc2d4f1726298a7887e303e15f039ef72b840e30d90bc2cf9cdbe4617a9ee113a2b1a48f1982e72cf30323d72cdfb9a65b5b4d734ca0024 SHA512 84b252ccaddc06cb05858ff64f582dd25823818c81b1e3a00362deeda06f09e6c36948fd316d5f0ca5e24949e6f99bb14a14dbd2af1cfbb85e679e27ab0a813c
DIST rustc-1.84.0-src.tar.xz 354993944 BLAKE2B e4697d8a9f42484556ed490390aef535b2214ccb3715ade57936211c1c637737da5f2b9a6c53a30df0fba1744fbd80d4d1382c0b74f6b36b36098bf187557201 SHA512 9e964c1b964e74083a9002fa04b072fa8fe7a520b24ad55e88a89bb2a2a2cd5727c5438d6db425b824ae7502ab215c2dd3f49777efd65f76bae09965df2e070a
DIST rustc-1.84.0-src.tar.xz.asc 801 BLAKE2B b1846702f36b92c479499f5eb704ce1e272131fc1b6b625c8d64c873a82ed79b1de8cceb1f21ae4b9dccf81e258547debf367b7b769ac94ed10a59dee18f79f1 SHA512 5ada0e0fed9901044eaa0d7cb657f685c7e183e91245714abe4a0a8bf3062a7de281932c7de7587220df0542511f6011d057bd8bed19d98c755eab74091cdfdb
+DIST rustc-1.84.1-src.tar.xz 355078168 BLAKE2B 849e8c909493bf76ce9749b9dcb1967180223b91a41d690bc477e78557d4e24949c9a8d8276d824af8c54ad62bc4a998e7a8efbc0bbd2008a4f64f51a7690d48 SHA512 f1cc4765736551508408126e44086988e8ddc30c1a929bf7b61c6be85ad0d65928dd5fb1041cfaeee8eb37d2208f2c1917e276aef2bc9a8e40e34f6713b349e1
+DIST rustc-1.84.1-src.tar.xz.asc 801 BLAKE2B f3decd3470fd1eff33adbb376490a30eb8db28dd4176bde0fefe4f60acf79c3dd0e1a330d519b5319360136ea7d0a124f6720dea08617202d9e9298da992ccf6 SHA512 a241fe3efba293f3e872b74f09dd0d184e0239afd1416326d57bf1134d92721c65b187f5c99962b51671877a539f18e82d2d797c76af42615c11a8bb3905f796
diff --git a/dev-lang/rust/files/1.47.0-ignore-broken-and-non-applicable-tests.patch b/dev-lang/rust/files/1.47.0-ignore-broken-and-non-applicable-tests.patch
deleted file mode 100644
index ff1707f..0000000
--- a/dev-lang/rust/files/1.47.0-ignore-broken-and-non-applicable-tests.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From 1879d1d1a284bf51c752e47db284ce22701ed5d0 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sun, 16 Sep 2018 16:38:48 +0000
-Subject: [PATCH 12/15] Ignore broken and non-applicable tests
-
-c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
-env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
-long-linker-command-lines: takes >10 minutes to run (but still passes)
-simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
-sparc-struct-abi: no sparc target
-sysroot-crates-are-unstable: can't run rustc without RPATH
----
- src/test/codegen/sparc-struct-abi.rs | 1 +
- src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile | 2 ++
- src/test/run-make-fulldeps/long-linker-command-lines/Makefile | 2 ++
- src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile | 2 ++
- src/test/ui/env-funky-keys.rs | 1 +
- 6 files changed, 10 insertions(+)
-
-diff --git a/src/test/codegen/sparc-struct-abi.rs b/src/test/codegen/sparc-struct-abi.rs
-index 78e5b14a212..6f93e93286b 100644
---- a/src/test/codegen/sparc-struct-abi.rs
-+++ b/src/test/codegen/sparc-struct-abi.rs
-@@ -4,6 +4,7 @@
-
- // only-sparc64
- // compile-flags: -O --target=sparc64-unknown-linux-gnu --crate-type=rlib
-+// ignore-test
- #![feature(no_core, lang_items)]
- #![no_core]
-
-diff --git a/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile b/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile
-index f124ca2ab61..363b18f0985 100644
---- a/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile
-+++ b/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile
-@@ -1,3 +1,5 @@
-+# ignore-aarch64
-+
- -include ../tools.mk
-
- all:
-diff --git a/src/test/run-make-fulldeps/long-linker-command-lines/Makefile b/src/test/run-make-fulldeps/long-linker-command-lines/Makefile
-index 5876fbc94bc..5f167ece1a2 100644
---- a/src/test/run-make-fulldeps/long-linker-command-lines/Makefile
-+++ b/src/test/run-make-fulldeps/long-linker-command-lines/Makefile
-@@ -1,3 +1,5 @@
-+# ignore-test
-+
- -include ../tools.mk
-
- all:
-diff --git a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
-index 9e770706857..6d92ec5cec8 100644
---- a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
-+++ b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
-@@ -1,1 +1,3 @@
-+# ignore-test
-+
- all:
- python2.7 test.py
-diff --git a/src/test/ui/env-funky-keys.rs b/src/test/ui/env-funky-keys.rs
-index c5c824ac58d..f3fe047a79c 100644
---- a/src/test/ui/env-funky-keys.rs
-+++ b/src/test/ui/env-funky-keys.rs
-@@ -1,6 +1,7 @@
- // run-pass
- // Ignore this test on Android, because it segfaults there.
-
-+// ignore-test
- // ignore-android
- // ignore-windows
- // ignore-cloudabi no execve
---
-2.24.1
-
diff --git a/dev-lang/rust/files/1.49.0-gentoo-musl-target-specs.patch b/dev-lang/rust/files/1.49.0-gentoo-musl-target-specs.patch
deleted file mode 100644
index 25f1f27..0000000
--- a/dev-lang/rust/files/1.49.0-gentoo-musl-target-specs.patch
+++ /dev/null
@@ -1,164 +0,0 @@
-From 671ef2d1c228aed031b4232b8bea96f17b825263 Mon Sep 17 00:00:00 2001
-From: Georgy Yakovlev <gyakovlev@gentoo.org>
-Date: Mon, 23 Nov 2020 14:52:04 -0800
-Subject: [PATCH] add gentoo musl target specs
-
----
- .../src/spec/aarch64_gentoo_linux_musl.rs | 11 +++++++++++
- .../src/spec/armv7_gentoo_linux_musleabihf.rs | 11 +++++++++++
- .../rustc_target/src/spec/i686_gentoo_linux_musl.rs | 11 +++++++++++
- compiler/rustc_target/src/spec/mod.rs | 8 ++++++++
- .../src/spec/powerpc64_gentoo_linux_musl.rs | 11 +++++++++++
- .../src/spec/powerpc64le_gentoo_linux_musl.rs | 11 +++++++++++
- .../src/spec/powerpc_gentoo_linux_musl.rs | 11 +++++++++++
- .../rustc_target/src/spec/x86_64_gentoo_linux_musl.rs | 11 +++++++++++
- 8 files changed, 85 insertions(+)
- create mode 100644 compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs
- create mode 100644 compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs
- create mode 100644 compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs
- create mode 100644 compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs
- create mode 100644 compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs
- create mode 100644 compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs
- create mode 100644 compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs
-
-diff --git a/compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs
-new file mode 100644
-index 0000000..420fe7c
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::aarch64_unknown_linux_musl::target();
-+
-+ base.llvm_target = "aarch64-gentoo-linux-musl".to_string();
-+ base.options.vendor = "gentoo".to_string();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
-diff --git a/compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs b/compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs
-new file mode 100644
-index 0000000..067e2d6
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::armv7_unknown_linux_musleabihf::target();
-+
-+ base.llvm_target = "armv7-gentoo-linux-musleabihf".to_string();
-+ base.options.vendor = "gentoo".to_string();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
-diff --git a/compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs
-new file mode 100644
-index 0000000..1cd39cd
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::i686_unknown_linux_musl::target();
-+
-+ base.llvm_target = "i686-gentoo-linux-musl".to_string();
-+ base.options.vendor = "gentoo".to_string();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
-diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
-index f1e8330..d8c0ba0 100644
---- a/compiler/rustc_target/src/spec/mod.rs
-+++ b/compiler/rustc_target/src/spec/mod.rs
-@@ -490,6 +490,14 @@ macro_rules! supported_targets {
- }
-
- supported_targets! {
-+ ("aarch64-gentoo-linux-musl", aarch64_gentoo_linux_musl),
-+ ("armv7-gentoo-linux-musleabihf", armv7_gentoo_linux_musleabihf),
-+ ("i686-gentoo-linux-musl", i686_gentoo_linux_musl),
-+ ("powerpc-gentoo-linux-musl", powerpc_gentoo_linux_musl),
-+ ("powerpc64-gentoo-linux-musl", powerpc64_gentoo_linux_musl),
-+ ("powerpc64le-gentoo-linux-musl", powerpc64le_gentoo_linux_musl),
-+ ("x86_64-gentoo-linux-musl", x86_64_gentoo_linux_musl),
-+
- ("x86_64-unknown-linux-gnu", x86_64_unknown_linux_gnu),
- ("x86_64-unknown-linux-gnux32", x86_64_unknown_linux_gnux32),
- ("i686-unknown-linux-gnu", i686_unknown_linux_gnu),
-diff --git a/compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs
-new file mode 100644
-index 0000000..e840bb2
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::powerpc64_unknown_linux_musl::target();
-+
-+ base.llvm_target = "powerpc64-gentoo-linux-musl".to_string();
-+ base.options.vendor = "gentoo".to_string();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
-diff --git a/compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs
-new file mode 100644
-index 0000000..1037d82
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::powerpc64le_unknown_linux_musl::target();
-+
-+ base.llvm_target = "powerpc64le-gentoo-linux-musl".to_string();
-+ base.options.vendor = "gentoo".to_string();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
-diff --git a/compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs
-new file mode 100644
-index 0000000..a623ffe
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::powerpc_unknown_linux_musl::target();
-+
-+ base.llvm_target = "powerpc-gentoo-linux-musl".to_string();
-+ base.options.vendor = "gentoo".to_string();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
-diff --git a/compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs
-new file mode 100644
-index 0000000..f330473
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::x86_64_unknown_linux_musl::target();
-+
-+ base.llvm_target = "x86_64-gentoo-linux-musl".to_string();
-+ base.options.vendor = "gentoo".to_string();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
---
-2.29.2
-
diff --git a/dev-lang/rust/files/1.53.0-rustversion-1.0.5.patch b/dev-lang/rust/files/1.53.0-rustversion-1.0.5.patch
deleted file mode 100644
index bc6ae8b..0000000
--- a/dev-lang/rust/files/1.53.0-rustversion-1.0.5.patch
+++ /dev/null
@@ -1,234 +0,0 @@
-From 12efa21eb88cb43d3b927952da0c5635373ac92b Mon Sep 17 00:00:00 2001
-From: David Tolnay <dtolnay@gmail.com>
-Date: Thu, 17 Jun 2021 22:34:55 -0700
-Subject: [PATCH] Update rustversion to 1.0.5
-
----
- Cargo.lock | 4 +--
- vendor/rustversion/.cargo-checksum.json | 2 +-
- vendor/rustversion/Cargo.toml | 2 +-
- vendor/rustversion/build/build.rs | 6 ++++
- vendor/rustversion/build/rustc.rs | 30 +++++++++-----------
- vendor/rustversion/src/lib.rs | 15 ++++++++++
- vendor/rustversion/src/time.rs | 13 +++++++--
- vendor/rustversion/tests/test_parse.rs | 10 +++++++
- vendor/rustversion/tests/ui/bad-bound.stderr | 4 +--
- vendor/rustversion/tests/ui/bad-date.stderr | 4 +--
- 10 files changed, 63 insertions(+), 27 deletions(-)
-
-diff --git a/Cargo.lock b/Cargo.lock
-index 0939f19cdfe..26a89caf050 100644
---- a/Cargo.lock
-+++ b/Cargo.lock
-@@ -4582,9 +4582,9 @@ dependencies = [
-
- [[package]]
- name = "rustversion"
--version = "1.0.4"
-+version = "1.0.5"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "cb5d2a036dc6d2d8fd16fde3498b04306e29bd193bf306a57427019b823d5acd"
-+checksum = "61b3909d758bb75c79f23d4736fac9433868679d3ad2ea7a61e3c25cfda9a088"
-
- [[package]]
- name = "ryu"
-diff --git a/vendor/rustversion/.cargo-checksum.json b/vendor/rustversion/.cargo-checksum.json
-index e1277df7b59..0a134695aaf 100644
---- a/vendor/rustversion/.cargo-checksum.json
-+++ b/vendor/rustversion/.cargo-checksum.json
-@@ -1 +1 @@
--{"files":{"Cargo.toml":"1a91782510461d54726e816ae776042b95c79c9949d49c11b8782caefc22ead2","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"01dc6a1bf499a12bd0bfbbfe4db2ca8460b2c151235bcf2aad2356de4c2ec50a","build/build.rs":"481daf363b7004c90ffc3e012863a4102e9f26b9aaa2a4a295c2dd78f690be28","build/rustc.rs":"4dc8f1764672137bd15758cc19242740b0d6ab99e4a69171ad0999f9112a15a6","src/attr.rs":"9301cd4aff5a9648c057d5d8de9eb66921f0c3a715c51ada4459576bd49c8b19","src/bound.rs":"44bda74d3aacfeeeac9dae2f7eef3acc844d4c3c7eaa9d3e6288e5aeff269dff","src/constfn.rs":"613b8f53b21cc06b4f619fce9000993d3e7873b650701ca01cef1e53bed5b40a","src/date.rs":"454c749a60db8144a706a813e06fe3ae39c981920ba9832ef82f3f9debe1f052","src/error.rs":"cb37102f03ebbaca313d80f9714fe08dfef92fe956789ee87d93eb6121705f4f","src/expr.rs":"8e8ca76f4f5838436d9d7273f499c698bb41f6c15bc07d32ec5c1cb8bd3dd731","src/iter.rs":"8d4b817b9abc4e817105b673e15f29ef9bb8284a010ce01ac2d83387fe136947","src/lib.rs":"f8347832d8072058dbb4af6b8d67a834a02fe9c5460bbaa26defec4b66317f1b","src/release.rs":"abb8ddd877c39a023bf5e7bd67063d6e4144e79758a8bafa338167f9d15b89f1","src/time.rs":"45fb48ff0a0046a5a1b108b9ce53b14885637ad868ede1d66970379c2b7f16ef","src/token.rs":"824ce765f692db73afa02d3ebb0281c750748035efc98fa547be29d3072665ce","src/version.rs":"afdb048bba95bbb885945eba5527b6bf0eca0105642bfc304c2f82a8b7d556df","tests/compiletest.rs":"0a52a44786aea1c299c695bf948b2ed2081e4cc344e5c2cadceab4eb03d0010d","tests/test_const.rs":"a8297ca6559f895a3b2664964a42b6f82bbbc3c8faa9556a513006e6e1827995","tests/test_eval.rs":"6f0ee3f49c9a0d0c374a4d0e9a9dce753cd9fc2ca7725e000a435dbd5f4a9ce3","tests/test_parse.rs":"fbf9695f4208263743715e6c8b6294dfffee21462a65dfeb9339a70c0e18dbc6","tests/ui/bad-bound.rs":"25bde278fcaabf62868417148a5e5f2006bf589d7ebd7bf6004fb8d78e47594f","tests/ui/bad-bound.stderr":"bc9297f758c2541fb0a8b48d5785f4bbcd0d2a07d876ba0baf2fc9de9275e7e6","tests/ui/bad-date.rs":"6e23714dae8b6346fefe50dacd4abba3265248bbadfdd60c739138aa8a0037ba","tests/ui/bad-date.stderr":"1ac3cab13ee900fc8344e8fab21ff4d9cad476aca44925a4c1b2293a6b59b742","tests/ui/bad-not.rs":"f003df8bd245e9dd8edc3a6d94078ee5162fac7a98db881271f0f5b6db98d45d","tests/ui/bad-not.stderr":"d4ef78fae4a82419e737757158796cb103a5920df498956eaf57ed201797b463","tests/ui/bad-version.rs":"f4ea2cd038e6c63deb9c2e3ceffce93dbf179d9ce18c16d88f3b6cd7138a8c8e","tests/ui/bad-version.stderr":"60ed51c62f4c2fb6ff95cff7523cfca379ed434f319da9d82704318588792338","tests/ui/const-not-fn.rs":"10bbe38f0d89391fff0698756e4cfd4e72a41090360393a0c951b67df14d1c35","tests/ui/const-not-fn.stderr":"9551f7f222445b31d7af2415d467301c332d55bb3d5a143846484f2f00047a01"},"package":"cb5d2a036dc6d2d8fd16fde3498b04306e29bd193bf306a57427019b823d5acd"}
-\ No newline at end of file
-+{"files":{"Cargo.toml":"a09ee758f816eddff8a8c7fb5be54dd95e74caad18a207251faedd251ecfaf1c","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"01dc6a1bf499a12bd0bfbbfe4db2ca8460b2c151235bcf2aad2356de4c2ec50a","build/build.rs":"bae427f344972e6e0e348ec48dce0947274b3ec6cac0938497a8d3da5c9834e5","build/rustc.rs":"3e4acf7ea679f9331dd4e8dbe42a08a312f58379ea1eee5898793a9848d06d8c","src/attr.rs":"9301cd4aff5a9648c057d5d8de9eb66921f0c3a715c51ada4459576bd49c8b19","src/bound.rs":"44bda74d3aacfeeeac9dae2f7eef3acc844d4c3c7eaa9d3e6288e5aeff269dff","src/constfn.rs":"613b8f53b21cc06b4f619fce9000993d3e7873b650701ca01cef1e53bed5b40a","src/date.rs":"454c749a60db8144a706a813e06fe3ae39c981920ba9832ef82f3f9debe1f052","src/error.rs":"cb37102f03ebbaca313d80f9714fe08dfef92fe956789ee87d93eb6121705f4f","src/expr.rs":"8e8ca76f4f5838436d9d7273f499c698bb41f6c15bc07d32ec5c1cb8bd3dd731","src/iter.rs":"8d4b817b9abc4e817105b673e15f29ef9bb8284a010ce01ac2d83387fe136947","src/lib.rs":"5652f6f84fc80136bd29b2125f7676e80e0df7d40aac274b0658c99cecbd871d","src/release.rs":"abb8ddd877c39a023bf5e7bd67063d6e4144e79758a8bafa338167f9d15b89f1","src/time.rs":"bdd05a743b07a6bbfa0dbc9d4e415e051aba4a51a430c3be1e23447eae298c8b","src/token.rs":"824ce765f692db73afa02d3ebb0281c750748035efc98fa547be29d3072665ce","src/version.rs":"afdb048bba95bbb885945eba5527b6bf0eca0105642bfc304c2f82a8b7d556df","tests/compiletest.rs":"0a52a44786aea1c299c695bf948b2ed2081e4cc344e5c2cadceab4eb03d0010d","tests/test_const.rs":"a8297ca6559f895a3b2664964a42b6f82bbbc3c8faa9556a513006e6e1827995","tests/test_eval.rs":"6f0ee3f49c9a0d0c374a4d0e9a9dce753cd9fc2ca7725e000a435dbd5f4a9ce3","tests/test_parse.rs":"cdfe376020b9391330292968046117b0935c828d73385e8faeb2e333ec897088","tests/ui/bad-bound.rs":"25bde278fcaabf62868417148a5e5f2006bf589d7ebd7bf6004fb8d78e47594f","tests/ui/bad-bound.stderr":"a03dc78b380191c10d3b3406b1fd3208bb2609d4c26b9c33ccd335721e3cd072","tests/ui/bad-date.rs":"6e23714dae8b6346fefe50dacd4abba3265248bbadfdd60c739138aa8a0037ba","tests/ui/bad-date.stderr":"3a607fb950a69f7dc1b503295bce53541f9dee9f4674edc5d13ee3a69ff0e8cd","tests/ui/bad-not.rs":"f003df8bd245e9dd8edc3a6d94078ee5162fac7a98db881271f0f5b6db98d45d","tests/ui/bad-not.stderr":"d4ef78fae4a82419e737757158796cb103a5920df498956eaf57ed201797b463","tests/ui/bad-version.rs":"f4ea2cd038e6c63deb9c2e3ceffce93dbf179d9ce18c16d88f3b6cd7138a8c8e","tests/ui/bad-version.stderr":"60ed51c62f4c2fb6ff95cff7523cfca379ed434f319da9d82704318588792338","tests/ui/const-not-fn.rs":"10bbe38f0d89391fff0698756e4cfd4e72a41090360393a0c951b67df14d1c35","tests/ui/const-not-fn.stderr":"9551f7f222445b31d7af2415d467301c332d55bb3d5a143846484f2f00047a01"},"package":"61b3909d758bb75c79f23d4736fac9433868679d3ad2ea7a61e3c25cfda9a088"}
-\ No newline at end of file
-diff --git a/vendor/rustversion/Cargo.toml b/vendor/rustversion/Cargo.toml
-index 56995ff0792..c72b1b2b343 100644
---- a/vendor/rustversion/Cargo.toml
-+++ b/vendor/rustversion/Cargo.toml
-@@ -13,7 +13,7 @@
- [package]
- edition = "2018"
- name = "rustversion"
--version = "1.0.4"
-+version = "1.0.5"
- authors = ["David Tolnay <dtolnay@gmail.com>"]
- build = "build/build.rs"
- description = "Conditional compilation according to rustc compiler version"
-diff --git a/vendor/rustversion/build/build.rs b/vendor/rustversion/build/build.rs
-index 2a8bc4af39f..15312510d68 100644
---- a/vendor/rustversion/build/build.rs
-+++ b/vendor/rustversion/build/build.rs
-@@ -1,3 +1,9 @@
-+#![allow(
-+ clippy::enum_glob_use,
-+ clippy::must_use_candidate,
-+ clippy::single_match_else
-+)]
-+
- mod rustc;
-
- use std::env;
-diff --git a/vendor/rustversion/build/rustc.rs b/vendor/rustversion/build/rustc.rs
-index 723e6bdd0e2..dfc6a05166f 100644
---- a/vendor/rustversion/build/rustc.rs
-+++ b/vendor/rustversion/build/rustc.rs
-@@ -48,23 +48,21 @@ pub fn parse(string: &str) -> Option<Version> {
- Some(channel) if channel == "dev" => Dev,
- Some(channel) if channel.starts_with("beta") => Beta,
- Some(channel) if channel == "nightly" => match words.next() {
-- Some(hash) => {
-- if !hash.starts_with('(') {
-- return None;
-+ Some(hash) if hash.starts_with('(') => match words.next() {
-+ None if hash.ends_with(')') => Dev,
-+ Some(date) if date.ends_with(')') => {
-+ let mut date = date[..date.len() - 1].split('-');
-+ let year = date.next()?.parse().ok()?;
-+ let month = date.next()?.parse().ok()?;
-+ let day = date.next()?.parse().ok()?;
-+ match date.next() {
-+ None => Nightly(Date { year, month, day }),
-+ Some(_) => return None,
-+ }
- }
-- let date = words.next()?;
-- if !date.ends_with(')') {
-- return None;
-- }
-- let mut date = date[..date.len() - 1].split('-');
-- let year = date.next()?.parse().ok()?;
-- let month = date.next()?.parse().ok()?;
-- let day = date.next()?.parse().ok()?;
-- match date.next() {
-- None => Nightly(Date { year, month, day }),
-- Some(_) => return None,
-- }
-- }
-+ None | Some(_) => return None,
-+ },
-+ Some(_) => return None,
- None => Dev,
- },
- Some(_) => return None,
-diff --git a/vendor/rustversion/src/lib.rs b/vendor/rustversion/src/lib.rs
-index 2614105dd1a..172eb89382f 100644
---- a/vendor/rustversion/src/lib.rs
-+++ b/vendor/rustversion/src/lib.rs
-@@ -145,6 +145,21 @@
- //!
- //! <br>
-
-+#![allow(
-+ clippy::cast_lossless,
-+ clippy::cast_possible_truncation,
-+ clippy::doc_markdown,
-+ clippy::enum_glob_use,
-+ clippy::from_iter_instead_of_collect,
-+ clippy::module_name_repetitions,
-+ clippy::must_use_candidate,
-+ clippy::needless_doctest_main,
-+ clippy::needless_pass_by_value,
-+ clippy::redundant_else,
-+ clippy::toplevel_ref_arg,
-+ clippy::unreadable_literal
-+)]
-+
- extern crate proc_macro;
-
- mod attr;
-diff --git a/vendor/rustversion/src/time.rs b/vendor/rustversion/src/time.rs
-index 1e6dd9066b4..3c21463dd80 100644
---- a/vendor/rustversion/src/time.rs
-+++ b/vendor/rustversion/src/time.rs
-@@ -1,4 +1,5 @@
- use crate::date::Date;
-+use std::env;
- use std::time::{SystemTime, UNIX_EPOCH};
-
- // Timestamp of 2016-03-01 00:00:00 in UTC.
-@@ -13,14 +14,20 @@
-
- pub fn today() -> Date {
- let default = Date {
-- year: 2019,
-- month: 1,
-- day: 1,
-+ year: 2020,
-+ month: 2,
-+ day: 25,
- };
- try_today().unwrap_or(default)
- }
-
- fn try_today() -> Option<Date> {
-+ if let Some(pkg_name) = env::var_os("CARGO_PKG_NAME") {
-+ if pkg_name.to_str() == Some("rustversion-tests") {
-+ return None; // Stable date for ui testing.
-+ }
-+ }
-+
- let now = SystemTime::now();
- let since_epoch = now.duration_since(UNIX_EPOCH).ok()?;
- let secs = since_epoch.as_secs();
-diff --git a/vendor/rustversion/tests/test_parse.rs b/vendor/rustversion/tests/test_parse.rs
-index 843bd73d3e5..cb39b3179f5 100644
---- a/vendor/rustversion/tests/test_parse.rs
-+++ b/vendor/rustversion/tests/test_parse.rs
-@@ -1,3 +1,5 @@
-+#![allow(clippy::enum_glob_use, clippy::must_use_candidate)]
-+
- include!("../build/rustc.rs");
-
- #[test]
-@@ -76,6 +78,14 @@ fn test_parse() {
- }),
- },
- ),
-+ (
-+ "rustc 1.52.1-nightly (gentoo)",
-+ Version {
-+ minor: 52,
-+ patch: 1,
-+ channel: Dev,
-+ },
-+ ),
- ];
-
- for (string, expected) in cases {
-diff --git a/vendor/rustversion/tests/ui/bad-bound.stderr b/vendor/rustversion/tests/ui/bad-bound.stderr
-index f8c498c8577..2c56acbdb33 100644
---- a/vendor/rustversion/tests/ui/bad-bound.stderr
-+++ b/vendor/rustversion/tests/ui/bad-bound.stderr
-@@ -1,10 +1,10 @@
--error: expected rustc release number like 1.31, or nightly date like 2020-10-26
-+error: expected rustc release number like 1.31, or nightly date like 2020-02-25
- --> $DIR/bad-bound.rs:1:22
- |
- 1 | #[rustversion::since(stable)]
- | ^^^^^^
-
--error: expected rustc release number like 1.31, or nightly date like 2020-10-26
-+error: expected rustc release number like 1.31, or nightly date like 2020-02-25
- --> $DIR/bad-bound.rs:4:26
- |
- 4 | #[rustversion::any(since(stable))]
-diff --git a/vendor/rustversion/tests/ui/bad-date.stderr b/vendor/rustversion/tests/ui/bad-date.stderr
-index 734d7889075..c523ccc02bf 100644
---- a/vendor/rustversion/tests/ui/bad-date.stderr
-+++ b/vendor/rustversion/tests/ui/bad-date.stderr
-@@ -1,10 +1,10 @@
--error: expected nightly date, like 2020-10-26
-+error: expected nightly date, like 2020-02-25
- --> $DIR/bad-date.rs:1:24
- |
- 1 | #[rustversion::nightly(stable)]
- | ^^^^^^
-
--error: expected nightly date, like 2020-10-26
-+error: expected nightly date, like 2020-02-25
- --> $DIR/bad-date.rs:4:28
- |
- 4 | #[rustversion::any(nightly(stable))]
---
-2.32.0
-
diff --git a/dev-lang/rust/files/1.54.0-parallel-miri.patch b/dev-lang/rust/files/1.54.0-parallel-miri.patch
deleted file mode 100644
index 68239d9..0000000
--- a/dev-lang/rust/files/1.54.0-parallel-miri.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From a789b49e4c0e7d742cc39713484596293d844537 Mon Sep 17 00:00:00 2001
-From: hyd-dev <yd-huang@outlook.com>
-Date: Fri, 30 Jul 2021 21:28:34 +0800
-Subject: [PATCH] Use `Lrc` instead of `Rc` in `MiriCompilerCalls::config()`
-
----
- src/bin/miri.rs | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/src/tools/miri/src/bin/miri.rs b/src/tools/miri/src/bin/miri.rs
-index 5a8f07263..18c393815 100644
---- a/src/tools/miri/src/bin/miri.rs
-+++ b/src/tools/miri/src/bin/miri.rs
-@@ -1,5 +1,6 @@
- #![feature(rustc_private, bool_to_option, stmt_expr_attributes)]
-
-+extern crate rustc_data_structures;
- extern crate rustc_driver;
- extern crate rustc_errors;
- extern crate rustc_hir;
-@@ -12,12 +13,12 @@ use std::convert::TryFrom;
- use std::env;
- use std::num::NonZeroU64;
- use std::path::PathBuf;
--use std::rc::Rc;
- use std::str::FromStr;
-
- use hex::FromHexError;
- use log::debug;
-
-+use rustc_data_structures::sync::Lrc;
- use rustc_driver::Compilation;
- use rustc_errors::emitter::{ColorConfig, HumanReadableErrorType};
- use rustc_hir::{self as hir, def_id::LOCAL_CRATE, Node};
-@@ -42,7 +43,7 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
- // HACK: rustc will emit "crate ... required to be available in rlib format, but
- // was not found in this form" errors once we use `tcx.dependency_formats()` if
- // there's no rlib provided, so setting a dummy path here to workaround those errors.
-- Rc::make_mut(&mut crate_source).rlib = Some((PathBuf::new(), PathKind::All));
-+ Lrc::make_mut(&mut crate_source).rlib = Some((PathBuf::new(), PathKind::All));
- crate_source
- };
- });
diff --git a/dev-lang/rust/files/1.84.1-fix-cross.patch b/dev-lang/rust/files/1.84.1-fix-cross.patch
new file mode 100644
index 0000000..47d7766
--- /dev/null
+++ b/dev-lang/rust/files/1.84.1-fix-cross.patch
@@ -0,0 +1,30 @@
+https://github.com/rust-lang/rust/issues/133629
+https://github.com/rust-lang/rust/commit/a24d859f19bbefe5371694f318568b0ab5a13299
+
+From: onur-ozkan <work@onurozkan.dev>
+Date: Thu, 30 Jan 2025 16:51:08 +0000
+Subject: [PATCH] set rustc dylib on manually constructed rustc command
+
+Signed-off-by: onur-ozkan <work@onurozkan.dev>
+--- a/src/bootstrap/src/core/builder/cargo.rs
++++ b/src/bootstrap/src/core/builder/cargo.rs
+@@ -653,7 +653,10 @@ impl Builder<'_> {
+ // Build proc macros both for the host and the target unless proc-macros are not
+ // supported by the target.
+ if target != compiler.host && cmd_kind != Kind::Check {
+- let error = command(self.rustc(compiler))
++ let mut rustc_cmd = command(self.rustc(compiler));
++ self.add_rustc_lib_path(compiler, &mut rustc_cmd);
++
++ let error = rustc_cmd
+ .arg("--target")
+ .arg(target.rustc_target_arg())
+ .arg("--print=file-names")
+@@ -661,6 +664,7 @@ impl Builder<'_> {
+ .arg("-")
+ .run_capture(self)
+ .stderr();
++
+ let not_supported = error
+ .lines()
+ .any(|line| line.contains("unsupported crate type `proc-macro`"));
diff --git a/dev-lang/rust/files/llvm/12/cstdint-signals-h.patch b/dev-lang/rust/files/llvm/12/cstdint-signals-h.patch
deleted file mode 100644
index 1945372..0000000
--- a/dev-lang/rust/files/llvm/12/cstdint-signals-h.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-https://gitweb.gentoo.org/fork/llvm-project.git/commit/llvm/include/llvm/Support/Signals.h?h=gentoo-15.0.7-r7&id=ff1681ddb303223973653f7f5f3f3435b48a1983
-From: Sergei Trofimovich <slyich@gmail.com>
-Date: Mon, 23 May 2022 08:03:23 +0100
-Subject: [Support] Add missing <cstdint> header to Signals.h
-
-Without the change llvm build fails on this week's gcc-13 snapshot as:
-
- [ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Signals.cpp.o
- In file included from llvm/lib/Support/Signals.cpp:14:
- llvm/include/llvm/Support/Signals.h:119:8: error: variable or field 'CleanupOnSignal' declared void
- 119 | void CleanupOnSignal(uintptr_t Context);
- | ^~~~~~~~~~~~~~~
---- a/src/llvm-project/llvm/include/llvm/Support/Signals.h
-+++ b/src/llvm-project/llvm/include/llvm/Support/Signals.h
-@@ -14,6 +14,7 @@
- #ifndef LLVM_SUPPORT_SIGNALS_H
- #define LLVM_SUPPORT_SIGNALS_H
-
-+#include <cstdint>
- #include <string>
-
- namespace llvm {
---
-cgit v1.2.3-65-gdbad
diff --git a/dev-lang/rust/metadata.xml b/dev-lang/rust/metadata.xml
index c634998..94b0499 100644
--- a/dev-lang/rust/metadata.xml
+++ b/dev-lang/rust/metadata.xml
@@ -21,6 +21,7 @@
<flag name="clippy">Install clippy, Rust code linter</flag>
<flag name="dist">Install dist tarballs (used for bootstrapping)</flag>
<flag name="miri">Install miri, an interpreter for Rust's mid-level intermediate representation (requires USE=nightly, sometimes is broken)</flag>
+ <flag name="mrustc-bootstrap">Use <pkg>dev-lang/mrustc</pkg> to build the bootstrap Rust sysroot from this package's source</flag>
<flag name="nightly">Enable nightly (UNSTABLE) features (NOTE: it does not install nightly version, just enables features marked as nightly at time of release)</flag>
<flag name="parallel-compiler">Build a multi-threaded rustc (experimental, not tested by upstream)</flag>
<flag name="rustfmt">Install rustfmt, Rust code formatter</flag>
diff --git a/dev-lang/rust/rust-1.71.1-r100.ebuild b/dev-lang/rust/rust-1.71.1-r100.ebuild
index 7f94f6f..b2ee38f 100644
--- a/dev-lang/rust/rust-1.71.1-r100.ebuild
+++ b/dev-lang/rust/rust-1.71.1-r100.ebuild
@@ -38,6 +38,8 @@ ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai LoongArch Mips MSP43
ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa )
+
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4 UoI-NCSA"
SLOT="${PV}"
@@ -251,6 +253,14 @@ src_configure() {
rust_target="$(rust_abi)"
+ LLVM_EXPERIMENTAL_TARGETS=()
+ for _x in "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}"; do
+ if use llvm_targets_${_x} ; then
+ LLVM_EXPERIMENTAL_TARGETS+=( ${_x} )
+ fi
+ done
+ LLVM_EXPERIMENTAL_TARGETS=${LLVM_EXPERIMENTAL_TARGETS[@]}
+
local cm_btype="$(usex debug DEBUG RELEASE)"
cat <<- _EOF_ > "${S}"/config.toml
changelog-seen = 2
@@ -261,7 +271,7 @@ src_configure() {
assertions = $(toml_usex debug)
ninja = true
targets = "${LLVM_TARGETS// /;}"
- experimental-targets = ""
+ experimental-targets = "${LLVM_EXPERIMENTAL_TARGETS// /;}"
link-shared = $(toml_usex system-llvm)
$(if is_libcxx_linked; then
# https://bugs.gentoo.org/732632
diff --git a/dev-lang/rust/rust-1.74.1-r100.ebuild b/dev-lang/rust/rust-1.74.1-r100.ebuild
index 098902e..5e6ef2c 100644
--- a/dev-lang/rust/rust-1.74.1-r100.ebuild
+++ b/dev-lang/rust/rust-1.74.1-r100.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -8,8 +8,12 @@ PYTHON_COMPAT=( python3_{10..12} )
RUST_MAX_VER=${PV}
RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0"
+RUST_OPTIONAL=1
-inherit check-reqs estack flag-o-matic llvm-r1 multiprocessing multilib multilib-build \
+MRUSTC_VERSION="0.11.2"
+MRUSTC_RUST_VERSION="1.74.0"
+
+inherit check-reqs cmake edo estack flag-o-matic llvm-r1 multiprocessing multilib multilib-build \
optfeature python-any-r1 rust rust-toolchain toolchain-funcs verify-sig
if [[ ${PV} = *beta* ]]; then
@@ -40,10 +44,12 @@ ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai
ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa )
+
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
SLOT="${PV}"
-IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind +lto miri nightly parallel-compiler rustfmt rust-analyzer rust-src system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind +lto miri mrustc-bootstrap nightly parallel-compiler rustfmt rust-analyzer rust-src system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
LLVM_DEPEND=()
# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
@@ -65,6 +71,12 @@ BDEPEND="${PYTHON_DEPS}
)
test? ( dev-debug/gdb )
verify-sig? ( sec-keys/openpgp-keys-rust )
+ mrustc-bootstrap? (
+ ~dev-lang/mrustc-${MRUSTC_VERSION}
+ dev-build/cmake
+ sys-devel/gcc:*
+ )
+ !mrustc-bootstrap? ( ${RUST_DEPEND} )
"
DEPEND="
@@ -179,6 +191,9 @@ pre_build_checks() {
fi
eshopts_pop
M=$(( $(usex doc 256 0) + ${M} ))
+ if use mrustc-bootstrap; then
+ M=$(( 2 * ${M} ))
+ fi
CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
}
@@ -202,31 +217,46 @@ pkg_pretend() {
}
pkg_setup() {
- pre_build_checks
- python-any-r1_pkg_setup
-
- export LIBGIT2_NO_PKG_CONFIG=1 #749381
- if tc-is-cross-compiler; then
- use system-llvm && die "USE=system-llvm not allowed when cross-compiling"
- local cross_llvm_target="$(llvm_tuple_to_target "${CBUILD}")"
- use "llvm_targets_${cross_llvm_target}" || \
- die "Must enable LLVM_TARGETS=${cross_llvm_target} matching CBUILD=${CBUILD} when cross-compiling"
- fi
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ pre_build_checks
+ python-any-r1_pkg_setup
+
+ export LIBGIT2_NO_PKG_CONFIG=1 #749381
+ if tc-is-cross-compiler; then
+ use system-llvm && die "USE=system-llvm not allowed when cross-compiling"
+ local cross_llvm_target="$(llvm_tuple_to_target "${CBUILD}")"
+ use "llvm_targets_${cross_llvm_target}" || \
+ die "Must enable LLVM_TARGETS=${cross_llvm_target} matching CBUILD=${CBUILD} when cross-compiling"
+ fi
- rust_pkg_setup
+ if use mrustc-bootstrap; then
+ if ! tc-is-gcc; then
+ die "USE=mrustc-bootstrap reqires that the build environment use GCC"
+ fi
+ else
+ rust_pkg_setup
+ fi
- if use system-llvm; then
- llvm-r1_pkg_setup
+ if use system-llvm; then
+ llvm-r1_pkg_setup
- local llvm_config="$(get_llvm_prefix)/bin/llvm-config"
- export LLVM_LINK_SHARED=1
- export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)"
+ local llvm_config="$(get_llvm_prefix)/bin/llvm-config"
+ export LLVM_LINK_SHARED=1
+ export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)"
+ fi
fi
}
src_prepare() {
eapply_crate openssl-sys "${FILESDIR}"/1.72.0-libressl-openssl-sys.patch
default
+ # We'll need to revert this after the bootstrap.
+ if use mrustc-bootstrap; then
+ pushd "${S}" 2>/dev/null || die
+ patch -p0 < "${BROOT}"/usr/share/mrustc-${MRUSTC_VERSION}/patches/rustc-${MRUSTC_RUST_VERSION}-src.patch ||
+ die "Failed to patch sources to enable bootstrap with mrustc"
+ popd 2>/dev/null || die
+ fi
}
src_configure() {
@@ -263,14 +293,26 @@ src_configure() {
use rust-analyzer && tools+=',"rust-analyzer"'
use rust-src && tools+=',"src"'
- local rust_stage0_root="$(${RUSTC} --print sysroot || die "Can't determine rust's sysroot")"
- # in case of prefix it will be already prefixed, as --print sysroot returns full path
- [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
+ if use mrustc-bootstrap; then
+ local rust_stage0_root="${WORKDIR}/bootstrap/rust-${PV}"
+ else
+ local rust_stage0_root="$(${RUSTC} --print sysroot || die "Can't determine rust's sysroot")"
+ # in case of prefix it will be already prefixed, as --print sysroot returns full path
+ [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
+ fi
rust_target="$(rust_abi)"
rust_build="$(rust_abi "${CBUILD}")"
rust_host="$(rust_abi "${CHOST}")"
+ LLVM_EXPERIMENTAL_TARGETS=()
+ for _x in "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}"; do
+ if use llvm_targets_${_x} ; then
+ LLVM_EXPERIMENTAL_TARGETS+=( ${_x} )
+ fi
+ done
+ LLVM_EXPERIMENTAL_TARGETS=${LLVM_EXPERIMENTAL_TARGETS[@]}
+
local cm_btype="$(usex debug DEBUG RELEASE)"
cat <<- _EOF_ > "${S}"/config.toml
changelog-seen = 2
@@ -281,7 +323,7 @@ src_configure() {
assertions = $(toml_usex debug)
ninja = true
targets = "${LLVM_TARGETS// /;}"
- experimental-targets = ""
+ experimental-targets = "${LLVM_EXPERIMENTAL_TARGETS// /;}"
link-shared = $(toml_usex system-llvm)
$(if is_libcxx_linked; then
# https://bugs.gentoo.org/732632
@@ -516,7 +558,253 @@ src_configure() {
echo
}
+# Build a very minimal llvm that we can use for bootstrap rustc codegen
+llvm_bootstrap() {
+ # Reference ${P}/src/bootstrap/native.rs for these values
+ local llvm_cmake_opts=(
+ "-G Ninja"
+ "-DLLVM_TARGET_ARCH=${CFG_COMPILER_HOST_TRIPLE%%-*}"
+ "-DLLVM_DEFAULT_TARGET_TRIPLE=${CFG_COMPILER_HOST_TRIPLE}"
+ "-DLLVM_TARGETS_TO_BUILD=${BOOTSTRAP_LLVM_TARGETS:=X86;ARM;AArch64}" #;Mips;PowerPC;SystemZ;JSBackend;MSP430;Sparc;NVPTX
+ "-DLLVM_ENABLE_ASSERTIONS=OFF"
+ "-DLLVM_INCLUDE_EXAMPLES=OFF"
+ "-DLLVM_INCLUDE_TESTS=OFF"
+ "-DLLVM_INCLUDE_DOCS=OFF"
+ "-DLLVM_INCLUDE_BENCHMARKS=OFF"
+ "-DLLVM_ENABLE_ZLIB=OFF"
+ "-DLLVM_ENABLE_TERMINFO=OFF"
+ "-DLLVM_ENABLE_LIBEDIT=OFF"
+ "-DCMAKE_CXX_COMPILER=$(tc-getCXX)"
+ "-DCMAKE_C_COMPILER=$(tc-getCC)"
+ "-DCMAKE_BUILD_TYPE=Release"
+ )
+
+ if [[ -z "${LLVM_CMAKE_OPTS_EXTRA}" ]]; then
+ llvm_cmake_opts+=( "${LLVM_CMAKE_OPTS_EXTRA}")
+ fi
+
+ elog "Building bootstrap llvm ..."
+
+ mkdir -p "${WORKDIR}/bootstrap/llvm" || die
+ pushd "${WORKDIR}/bootstrap/llvm" 2>/dev/null || die
+ edo cmake ${llvm_cmake_opts[*]} "${S}/src/llvm-project/llvm"
+ eninja || die "Failed to build bootstrap llvm"
+ popd 2>/dev/null || die
+}
+
+# High level steps:
+# Our system mrustc package has built stdlib for our current platform.
+# - Step 1: Use system-installed mrustc, (m)rust(c) stdlib, and minicargo to
+# bootstrap a `cargo` and `rustc` (mrustc-stage0)
+# - Step 2: Use minicargo and the built `rustc` to build a working `sysroot`
+# (includes `std`, `panic_unwind``, `test`, etc.) (mrustc-stage0)
+# - Step 3: Build build libs again (this time using `cargo` and `rustc`) (mrustc-stage1)
+# - Step 4: Build a `rustc` using those libs (mrustc-stage1)
+# - Done so there's an optimised rustc arollvm_cmake_optsund (mrustc is bad at codegen)
+# - Step 5: Build `libstd` with this `rustc` (mrustc-stage2)
+# - Needed to match ABIs
+# Stages:
+# - mrustc-stage0: mrustc-built cargo and rustc
+# - mrustc-stage1: rustc and sysroot built with mrustc-stage0
+# - mrustc-stage2: rustc from stage1 with sysroot built with stage0
+# See:
+# - https://github.com/thepowersgang/mrustc/blob/master/run_rustc/Makefile
+# - https://github.com/thepowersgang/mrustc/blob/master/TestRustcBootstrap.sh
+# - Upstream Windows .cmd files are also a good reference for early bootstrap
+mrustc_bootstrap() {
+ export RUSTC_BOOTSTRAP=1 # Possibly the only intended use of this variable in ::gentoo
+ # export these variables now and unset them at the end of the function so they don't leak
+ # into the rest of the build.
+ export CFG_COMPILER_HOST_TRIPLE="$(rust_abi)"
+ export CFG_RELEASE="${MRUSTC_RUST_VERSION}" # Let's pretend we're 1.74.0
+ export CFG_RELEASE_CHANNEL="stable"
+ export CFG_VERSION="${MRUSTC_RUST_VERSION}-stable-mrustc"
+ export CFG_PREFIX="mrustc"
+ export CFG_LIBDIR_RELATIVE="lib"
+ export RUSTC_INSTALL_BINDIR="bin"
+ export REAL_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
+
+ # These flags are used in every invocation of our bootstrap `cargo`.
+ local cargo_flags="--target ${CFG_COMPILER_HOST_TRIPLE} -j $(makeopts_jobs) --release --verbose"
+
+ if use system-llvm; then
+ export LLVM_CONFIG="$(get_llvm_prefix)/bin/llvm-config"
+ else
+ llvm_bootstrap
+ export LLVM_CONFIG="${WORKDIR}/bootstrap/llvm/bin/llvm-config"
+ fi
+
+ # define the mrustc sysroot and common minicargo arguments.
+ local mrustc_sysroot="${BROOT}/usr/lib/rust/mrustc-${MRUSTC_VERSION}/lib/rustlib/${CFG_COMPILER_HOST_TRIPLE}/lib"
+ local minicargo_common_args=(
+ "-L" "${mrustc_sysroot}"
+ "-j" "$(makeopts_jobs)"
+ "--vendor-dir" "${S}/vendor"
+ "--manifest-overrides"
+ "${BROOT}/usr/share/mrustc-${MRUSTC_VERSION}/patches/rustc-${MRUSTC_RUST_VERSION}-overrides.toml"
+ )
+ # There's a very good chance that minicargo and mrustc are not in the PATH.
+ if ! command -v minicargo &> /dev/null; then
+ export PATH="${BROOT}/usr/lib/rust/mrustc-${MRUSTC_VERSION}/bin:${PATH}"
+ fi
+ # Sanity check our bootstrap compiler & stdlib.
+ elog "Sanity checking mrustc and stdlib ..."
+ edo mrustc "${S}/tests/ui/hello_world/main.rs" -L "${mrustc_sysroot}" -o "${T}"/hello -g
+ "${T}"/hello || die "Failed to run hello_world"
+ # Seems fine, let's build some tools!
+
+ # Step 1: Build a `cargo` and `rustc` using system-installed mrustc
+ # Anything we produce is going to be terribly unoptimised; mrustc does not do fantastic codegen.
+ # It's good enough to bootstrap the "real" rustc though.
+ elog "Building bootstrap cargo and rustc using mrustc and minicargo (mrustc-stage0) ..."
+ local stage0="${WORKDIR}/bootstrap/mrustc-stage0"
+ mkdir -p "${stage0}" || die
+ edo minicargo "${S}"/src/tools/cargo --output-dir "${stage0}"/cargo-build ${minicargo_common_args[*]}
+ "${stage0}"/cargo-build/cargo --version || die "Bootstrap cargo failed basic sanity check"
+ edo minicargo "${S}"/compiler/rustc --output-dir "${stage0}"/rustc-build ${minicargo_common_args[*]} \
+ --features llvm
+ "${stage0}"/rustc-build/rustc_main --version || die "Bootstrap rustc failed basic sanity check"
+ # minicargo has special-casing for `rustc` so we need to rename it.
+ mv "${stage0}"/rustc-build/rustc_main "${stage0}"/rustc-build/rustc || die "Failed to rename rustc_main to rustc"
+ # rustc wants these here
+ mkdir -p "${stage0}"/codegen-backends || die
+ mv "${stage0}"/rustc-build/librustc_codegen_llvm.* "${stage0}"/codegen-backends || die
+
+ # Step 2: use the bootstrapped rustc to build sysroot; we need to use `minicargo` for this -
+ # mrustc does not accept all of the arguments that rustc does, even with the rustc_proxy wrapper.
+ # `--script-overrides`: If the overrides are available, build scripts (and build-deps) are not built
+ # which is good since we don't have a working compiler yet, and can't build them.
+
+ local stage0_sysroot_lib="${stage0}/lib/rustlib/${CFG_COMPILER_HOST_TRIPLE}/lib"
+ # minicargo <= 0.11.2 doesn't create this directory and silently fails, besides it's better to be explicit, right?
+ mkdir -p "${stage0_sysroot_lib}" || die "Failed to create stage0 directory"
+
+ elog "Building 'sysroot' using bootstrap rustc (mrustc-stage0) ..."
+ edo env MRUSTC_PATH="${stage0}/rustc-build/rustc" minicargo -j $(makeopts_jobs) --vendor-dir "${S}"/vendor \
+ --script-overrides "${BROOT}/usr/share/mrustc-0.11.2/script-overrides/stable-${MRUSTC_RUST_VERSION}-linux/" \
+ --output-dir "${stage0_sysroot_lib}" "${S}"/library/sysroot ||
+ die "Failed to build sysroot with bootstrap rust (mrustc-stage0)"
+
+ elog "Sanity checking sysroot and rustc ..."
+ mkdir -p "${T}"/stage0-hello || die
+ edo "${stage0}"/rustc-build/rustc -L "${stage0_sysroot_lib}" -g "${S}/tests/ui/hello_world/main.rs" \
+ -o "${T}"/stage0-hello/hello
+ "${T}"/stage0-hello/hello || die "Failed to run hello_world built with bootstrap rust stage0"
+
+ elog "mrustc bootstrap stage0 complete!"
+
+ # Step 3: Build a "proper" libstd, including dynamic libs using our bootstrap cargo and rustc.
+ elog "Building 'sysroot' with the stage0 rustc (mrustc-stage1) ..."
+ local stage1="${WORKDIR}/bootstrap/mrustc-stage1"
+ local stage1_sysroot_lib="${stage1}/lib/rustlib/${CFG_COMPILER_HOST_TRIPLE}/lib"
+ mkdir -p "${stage1_sysroot_lib}" || die "Failed to create stage1 directory"
+ mkdir -p "${stage1}/bin" || die
+
+ # Simplified to avoid calling rustc_proxy; We don't need stage1 rustc until after this is built...
+ edo env RUSTFLAGS="-Z force-unstable-if-unmarked" CARGO_TARGET_DIR="${stage1}/sysroot-build" \
+ RUSTC="${stage0}/rustc-build/rustc" "${stage0}"/cargo-build/cargo build ${cargo_flags} \
+ --manifest-path "${S}/library/sysroot/Cargo.toml" --features panic-unwind
+
+ # Move the built libs into the sysroot libdir.
+ mv "${stage1}/sysroot-build/${CFG_COMPILER_HOST_TRIPLE}/release/deps"/*.{rlib,rmeta,so} \
+ "${stage1_sysroot_lib}" || die "Failed to move stage1 libs to stage1 sysroot"
+
+ # We need to copy the stage0 rustc to the stage1 sysroot; this "updates" the sysroot location and enables
+ # resolution of stage1 libs. (run `rustc --print sysroot` on stage0 and stage1 rustc to verify)
+ cp "${stage0}/rustc-build/rustc" "${stage1}/bin/rustc" || die "Failed to copy rustc to stage1 sysroot"
+
+ # Step 4: Build `rustc` with itself, so we have a rustc with the right ABI.
+ # This will be our final `rustc` for the bootstrap process.
+ elog "Building rustc with stage1 libs (mrustc-stage1) ..."
+ mkdir -p "${stage1}/rustc-build" || die
+ edo env RUSTFLAGS="-Z force-unstable-if-unmarked -C link_args=-Wl,-rpath,\$ORIGIN/../lib" \
+ LD_LIBRARY_PATH="${stage2_sysroot_lib}" CARGO_TARGET_DIR="${stage1}/rustc-build" \
+ RUSTC="${stage1}/bin/rustc" TMPDIR="${T}" "${stage0}"/cargo-build/cargo build ${cargo_flags} \
+ --manifest-path "${S}/compiler/rustc/Cargo.toml" --features llvm
+
+ # Step 5: Build `sysroot` with this `rustc` - Needed to match ABI
+ # We need to use the previous sysroot; we could reuse that dir but it's easier to just copy it.
+ elog "Building final 'sysroot' with the final rustc (mrustc-stage2) ..."
+ local stage2="${WORKDIR}/bootstrap/mrustc-stage2"
+ local stage2_sysroot_lib="${stage2}/lib/rustlib/${CFG_COMPILER_HOST_TRIPLE}/lib"
+ mkdir -p "${stage2_sysroot_lib}" || die "Failed to create stage2 directory"
+ mkdir -p "${stage2}/bin" || die
+
+ # Copy required files from stage1 to stage2 sysroot
+ cp "${stage1}/rustc-build/${CFG_COMPILER_HOST_TRIPLE}"/release/rustc-main "${stage2}/bin/rustc_binary" ||
+ die "Failed to copy final rustc to stage2 sysroot"
+ cp "${stage1}/rustc-build/${CFG_COMPILER_HOST_TRIPLE}"/release/librustc_driver.so "${stage2}/lib" ||
+ die "Failed to copy librustc_driver to sysroot"
+ cp "${stage1}/rustc-build/${CFG_COMPILER_HOST_TRIPLE}"/release/deps/*.{rlib,so} "${stage2_sysroot_lib}" ||
+ die "Failed to copy final rustc libs to stage2 sysroot"
+ cp "${stage1_sysroot_lib}"/* "${stage2_sysroot_lib}" || die "Failed to copy stage1 so files to stage2 sysroot"
+
+ # There's a magic script used in place of rustc so that libs can be found
+ cat <<- EOF > "${stage2}/bin/rustc" || die "Failed to create rustc wrapper"
+ #!/bin/sh
+ LD_LIBRARY_PATH="${stage2}/lib:${stage2_sysroot_lib}" ${stage2}/bin/rustc_binary "\$@"
+ EOF
+ chmod +x "${stage2}/bin/rustc" || die "Failed to make rustc wrapper executable"
+
+ # Use rustc to build 'sysroot'; this is the final step in the bootstrap process.
+ # rpath probably isn't needed here, but it doesn't hurt.
+ edo env RUSTFLAGS="-Z force-unstable-if-unmarked -C link_args=-Wl,-rpath,\$ORIGIN/../lib" \
+ CARGO_TARGET_DIR="${stage2}/stdlib-build" RUSTC="${stage2}/bin/rustc" \
+ "${stage0}"/cargo-build/cargo build ${cargo_flags} --manifest-path "${S}/library/sysroot/Cargo.toml" \
+ --features panic-unwind
+
+ # Build our final output sysroot
+ local output="${WORKDIR}/bootstrap/rust-${PV}"
+ local output_sysroot_lib="${output}/lib/rustlib/${CFG_COMPILER_HOST_TRIPLE}/lib"
+ mkdir -p "${output_sysroot_lib}" || die "Failed to create output directory"
+ mkdir -p "${output}/bin" || die "Failed to create output directory"
+
+ # Copy our various output files into the output sysroot
+ # rustc
+ cp "${stage1}/rustc-build/${CFG_COMPILER_HOST_TRIPLE}"/release/rustc-main "${output}/bin/rustc_binary" ||
+ die "Failed to copy final rustc to output"
+ cp "${stage1}/rustc-build/${CFG_COMPILER_HOST_TRIPLE}"/release/librustc_driver.so "${output}/lib" ||
+ die "Failed to copy librustc_driver to output"
+ cp "${stage1}/rustc-build/${CFG_COMPILER_HOST_TRIPLE}"/release/deps/*.{rlib,so} "${output_sysroot_lib}" ||
+ die "Failed to copy final rustc libs to output"
+ # cargo; no need to build an optimised cargo if we're using this to build a complelety new Rust.
+ cp "${stage0}/cargo-build/cargo" "${output}/bin/cargo" || die "Failed to copy cargo to output"
+ # libs
+ mv "${stage2}/stdlib-build/${CFG_COMPILER_HOST_TRIPLE}/release/deps"/*.{rlib,rmeta,so} "${output_sysroot_lib}" ||
+ die "Failed to copy stage2 libs to output"
+ # Our trusty rustc wrapper
+ cat <<- EOF > "${output}/bin/rustc" || die "Failed to create rustc wrapper"
+ #!/bin/sh
+ LD_LIBRARY_PATH="${output}/lib:${output_sysroot_lib}" ${output}/bin/rustc_binary "\$@"
+ EOF
+ chmod +x "${output}/bin/rustc" || die "Failed to make rustc wrapper executable"
+
+ # Perform a sanity check on the final Rust.
+ mkdir -p "${T}"/output-hello || die
+ edo "${output}/bin/rustc" -L "${output_sysroot_lib}" -g "${S}/tests/ui/hello_world/main.rs" \
+ -o "${T}"/output-hello/hello
+ "${T}"/output-hello/hello || die "Failed to run hello_world built with bootstrapped Rust"
+
+ elog "Successfully bootstrapped Rust using mrustc!"
+
+ # Note: The Rust sysroot that we've produced is pretty close to what we'd expect from a normal Rust build.
+ # If someone was so inclined they could build an optimised cargo using the stage2 rustc and sysroot,
+ # and install the output directly. This is untested, as I'm sure there's more to it than that.
+ # I'm satisfied with being able to build Rust normally at this point.
+
+ # Tidy up the Rust sources; revert mrustc changes so Rust can be built normally.
+ pushd "${S}" 2>/dev/null || die
+ patch -R -p0 < "${BROOT}"/usr/share/mrustc-${MRUSTC_VERSION}/patches/rustc-${MRUSTC_RUST_VERSION}-src.patch ||
+ die "Failed to revert mrustc patches"
+ popd 2>/dev/null || die
+
+ # Tidy up any environment variables we've set in the bootstrap process.
+ unset CFG_COMPILER_HOST_TRIPLE CFG_RELEASE CFG_RELEASE_CHANNEL CFG_PREFIX CFG_VERSION
+ unset CFG_LIBDIR_RELATIVE LLVM_CONFIG REAL_LIBRARY_PATH_VAR RUSTFLAGS RUSTC_BOOTSTRAP RUSTC_INSTALL_BINDIR
+}
+
src_compile() {
+ use mrustc-bootstrap && mrustc_bootstrap
RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die
}
diff --git a/dev-lang/rust/rust-1.75.0-r100.ebuild b/dev-lang/rust/rust-1.75.0-r100.ebuild
index 943431a..74e0aab 100644
--- a/dev-lang/rust/rust-1.75.0-r100.ebuild
+++ b/dev-lang/rust/rust-1.75.0-r100.ebuild
@@ -39,6 +39,8 @@ ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai
ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa )
+
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
SLOT="${PV}"
@@ -273,6 +275,14 @@ src_configure() {
rust_build="$(rust_abi "${CBUILD}")"
rust_host="$(rust_abi "${CHOST}")"
+ LLVM_EXPERIMENTAL_TARGETS=()
+ for _x in "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}"; do
+ if use llvm_targets_${_x} ; then
+ LLVM_EXPERIMENTAL_TARGETS+=( ${_x} )
+ fi
+ done
+ LLVM_EXPERIMENTAL_TARGETS=${LLVM_EXPERIMENTAL_TARGETS[@]}
+
local cm_btype="$(usex debug DEBUG RELEASE)"
cat <<- _EOF_ > "${S}"/config.toml
changelog-seen = 2
@@ -283,7 +293,7 @@ src_configure() {
assertions = $(toml_usex debug)
ninja = true
targets = "${LLVM_TARGETS// /;}"
- experimental-targets = ""
+ experimental-targets = "${LLVM_EXPERIMENTAL_TARGETS// /;}"
link-shared = $(toml_usex system-llvm)
$(if is_libcxx_linked; then
# https://bugs.gentoo.org/732632
diff --git a/dev-lang/rust/rust-1.76.0-r100.ebuild b/dev-lang/rust/rust-1.76.0-r100.ebuild
index e4b73d9..02d2e94 100644
--- a/dev-lang/rust/rust-1.76.0-r100.ebuild
+++ b/dev-lang/rust/rust-1.76.0-r100.ebuild
@@ -39,6 +39,8 @@ ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai
ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa )
+
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
SLOT="${PV}"
@@ -273,6 +275,14 @@ src_configure() {
rust_build="$(rust_abi "${CBUILD}")"
rust_host="$(rust_abi "${CHOST}")"
+ LLVM_EXPERIMENTAL_TARGETS=()
+ for _x in "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}"; do
+ if use llvm_targets_${_x} ; then
+ LLVM_EXPERIMENTAL_TARGETS+=( ${_x} )
+ fi
+ done
+ LLVM_EXPERIMENTAL_TARGETS=${LLVM_EXPERIMENTAL_TARGETS[@]}
+
local cm_btype="$(usex debug DEBUG RELEASE)"
cat <<- _EOF_ > "${S}"/config.toml
changelog-seen = 2
@@ -283,7 +293,7 @@ src_configure() {
assertions = $(toml_usex debug)
ninja = true
targets = "${LLVM_TARGETS// /;}"
- experimental-targets = ""
+ experimental-targets = "${LLVM_EXPERIMENTAL_TARGETS// /;}"
link-shared = $(toml_usex system-llvm)
$(if is_libcxx_linked; then
# https://bugs.gentoo.org/732632
diff --git a/dev-lang/rust/rust-1.77.1-r100.ebuild b/dev-lang/rust/rust-1.77.1-r100.ebuild
index 24f837f..8987f11 100644
--- a/dev-lang/rust/rust-1.77.1-r100.ebuild
+++ b/dev-lang/rust/rust-1.77.1-r100.ebuild
@@ -39,6 +39,8 @@ ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai
ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa )
+
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
SLOT="${PV}"
@@ -272,6 +274,14 @@ src_configure() {
rust_build="$(rust_abi "${CBUILD}")"
rust_host="$(rust_abi "${CHOST}")"
+ LLVM_EXPERIMENTAL_TARGETS=()
+ for _x in "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}"; do
+ if use llvm_targets_${_x} ; then
+ LLVM_EXPERIMENTAL_TARGETS+=( ${_x} )
+ fi
+ done
+ LLVM_EXPERIMENTAL_TARGETS=${LLVM_EXPERIMENTAL_TARGETS[@]}
+
local cm_btype="$(usex debug DEBUG RELEASE)"
cat <<- _EOF_ > "${S}"/config.toml
changelog-seen = 2
@@ -282,7 +292,7 @@ src_configure() {
assertions = $(toml_usex debug)
ninja = true
targets = "${LLVM_TARGETS// /;}"
- experimental-targets = ""
+ experimental-targets = "${LLVM_EXPERIMENTAL_TARGETS// /;}"
link-shared = $(toml_usex system-llvm)
$(if is_libcxx_linked; then
# https://bugs.gentoo.org/732632
diff --git a/dev-lang/rust/rust-1.78.0-r100.ebuild b/dev-lang/rust/rust-1.78.0-r100.ebuild
index a878ab3..b1f28be 100644
--- a/dev-lang/rust/rust-1.78.0-r100.ebuild
+++ b/dev-lang/rust/rust-1.78.0-r100.ebuild
@@ -39,6 +39,8 @@ ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai
ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa )
+
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
SLOT="${PV}"
@@ -272,6 +274,14 @@ src_configure() {
rust_build="$(rust_abi "${CBUILD}")"
rust_host="$(rust_abi "${CHOST}")"
+ LLVM_EXPERIMENTAL_TARGETS=()
+ for _x in "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}"; do
+ if use llvm_targets_${_x} ; then
+ LLVM_EXPERIMENTAL_TARGETS+=( ${_x} )
+ fi
+ done
+ LLVM_EXPERIMENTAL_TARGETS=${LLVM_EXPERIMENTAL_TARGETS[@]}
+
local cm_btype="$(usex debug DEBUG RELEASE)"
cat <<- _EOF_ > "${S}"/config.toml
[llvm]
@@ -281,7 +291,7 @@ src_configure() {
assertions = $(toml_usex debug)
ninja = true
targets = "${LLVM_TARGETS// /;}"
- experimental-targets = ""
+ experimental-targets = "${LLVM_EXPERIMENTAL_TARGETS// /;}"
link-shared = $(toml_usex system-llvm)
$(if is_libcxx_linked; then
# https://bugs.gentoo.org/732632
diff --git a/dev-lang/rust/rust-1.79.0-r100.ebuild b/dev-lang/rust/rust-1.79.0-r100.ebuild
index 9b09276..94c0d9f 100644
--- a/dev-lang/rust/rust-1.79.0-r100.ebuild
+++ b/dev-lang/rust/rust-1.79.0-r100.ebuild
@@ -39,6 +39,8 @@ ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai
ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa )
+
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
SLOT="${PV}"
@@ -272,6 +274,14 @@ src_configure() {
rust_build="$(rust_abi "${CBUILD}")"
rust_host="$(rust_abi "${CHOST}")"
+ LLVM_EXPERIMENTAL_TARGETS=()
+ for _x in "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}"; do
+ if use llvm_targets_${_x} ; then
+ LLVM_EXPERIMENTAL_TARGETS+=( ${_x} )
+ fi
+ done
+ LLVM_EXPERIMENTAL_TARGETS=${LLVM_EXPERIMENTAL_TARGETS[@]}
+
local cm_btype="$(usex debug DEBUG RELEASE)"
cat <<- _EOF_ > "${S}"/config.toml
[llvm]
@@ -281,7 +291,7 @@ src_configure() {
assertions = $(toml_usex debug)
ninja = true
targets = "${LLVM_TARGETS// /;}"
- experimental-targets = ""
+ experimental-targets = "${LLVM_EXPERIMENTAL_TARGETS// /;}"
link-shared = $(toml_usex system-llvm)
$(if is_libcxx_linked; then
# https://bugs.gentoo.org/732632
diff --git a/dev-lang/rust/rust-1.80.1-r100.ebuild b/dev-lang/rust/rust-1.80.1-r100.ebuild
index 19e126f..92cf96a 100644
--- a/dev-lang/rust/rust-1.80.1-r100.ebuild
+++ b/dev-lang/rust/rust-1.80.1-r100.ebuild
@@ -39,6 +39,8 @@ ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai
ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa )
+
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
SLOT="${PV}"
@@ -271,6 +273,14 @@ src_configure() {
rust_build="$(rust_abi "${CBUILD}")"
rust_host="$(rust_abi "${CHOST}")"
+ LLVM_EXPERIMENTAL_TARGETS=()
+ for _x in "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}"; do
+ if use llvm_targets_${_x} ; then
+ LLVM_EXPERIMENTAL_TARGETS+=( ${_x} )
+ fi
+ done
+ LLVM_EXPERIMENTAL_TARGETS=${LLVM_EXPERIMENTAL_TARGETS[@]}
+
local cm_btype="$(usex debug DEBUG RELEASE)"
cat <<- _EOF_ > "${S}"/config.toml
[llvm]
@@ -280,7 +290,7 @@ src_configure() {
assertions = $(toml_usex debug)
ninja = true
targets = "${LLVM_TARGETS// /;}"
- experimental-targets = ""
+ experimental-targets = "${LLVM_EXPERIMENTAL_TARGETS// /;}"
link-shared = $(toml_usex system-llvm)
$(if is_libcxx_linked; then
# https://bugs.gentoo.org/732632
diff --git a/dev-lang/rust/rust-1.81.0-r100.ebuild b/dev-lang/rust/rust-1.81.0-r100.ebuild
index c0008a0..9b9934d 100644
--- a/dev-lang/rust/rust-1.81.0-r100.ebuild
+++ b/dev-lang/rust/rust-1.81.0-r100.ebuild
@@ -40,6 +40,8 @@ ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai
ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa )
+
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
SLOT="${PV}"
@@ -275,6 +277,14 @@ src_configure() {
rust_build="$(rust_abi "${CBUILD}")"
rust_host="$(rust_abi "${CHOST}")"
+ LLVM_EXPERIMENTAL_TARGETS=()
+ for _x in "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}"; do
+ if use llvm_targets_${_x} ; then
+ LLVM_EXPERIMENTAL_TARGETS+=( ${_x} )
+ fi
+ done
+ LLVM_EXPERIMENTAL_TARGETS=${LLVM_EXPERIMENTAL_TARGETS[@]}
+
local cm_btype="$(usex debug DEBUG RELEASE)"
cat <<- _EOF_ > "${S}"/config.toml
[llvm]
@@ -284,7 +294,7 @@ src_configure() {
assertions = $(toml_usex debug)
ninja = true
targets = "${LLVM_TARGETS// /;}"
- experimental-targets = ""
+ experimental-targets = "${LLVM_EXPERIMENTAL_TARGETS// /;}"
link-shared = $(toml_usex system-llvm)
$(if is_libcxx_linked; then
# https://bugs.gentoo.org/732632
diff --git a/dev-lang/rust/rust-1.82.0-r100.ebuild b/dev-lang/rust/rust-1.82.0-r100.ebuild
index fd3d0e3..82e6b14 100644
--- a/dev-lang/rust/rust-1.82.0-r100.ebuild
+++ b/dev-lang/rust/rust-1.82.0-r100.ebuild
@@ -39,6 +39,8 @@ ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai
ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa )
+
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
SLOT="${PV}"
@@ -279,6 +281,14 @@ src_configure() {
rust_build="$(rust_abi "${CBUILD}")"
rust_host="$(rust_abi "${CHOST}")"
+ LLVM_EXPERIMENTAL_TARGETS=()
+ for _x in "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}"; do
+ if use llvm_targets_${_x} ; then
+ LLVM_EXPERIMENTAL_TARGETS+=( ${_x} )
+ fi
+ done
+ LLVM_EXPERIMENTAL_TARGETS=${LLVM_EXPERIMENTAL_TARGETS[@]}
+
local cm_btype="$(usex debug DEBUG RELEASE)"
cat <<- _EOF_ > "${S}"/config.toml
[llvm]
@@ -288,7 +298,7 @@ src_configure() {
assertions = $(toml_usex debug)
ninja = true
targets = "${LLVM_TARGETS// /;}"
- experimental-targets = ""
+ experimental-targets = "${LLVM_EXPERIMENTAL_TARGETS// /;}"
link-shared = $(toml_usex system-llvm)
$(if is_libcxx_linked; then
# https://bugs.gentoo.org/732632
diff --git a/dev-lang/rust/rust-1.82.0-r101.ebuild b/dev-lang/rust/rust-1.82.0-r101.ebuild
index 129109e..a4e9dc9 100644
--- a/dev-lang/rust/rust-1.82.0-r101.ebuild
+++ b/dev-lang/rust/rust-1.82.0-r101.ebuild
@@ -39,6 +39,8 @@ ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai
ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa )
+
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
SLOT="${PV}"
@@ -280,6 +282,14 @@ src_configure() {
rust_build="$(rust_abi "${CBUILD}")"
rust_host="$(rust_abi "${CHOST}")"
+ LLVM_EXPERIMENTAL_TARGETS=()
+ for _x in "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}"; do
+ if use llvm_targets_${_x} ; then
+ LLVM_EXPERIMENTAL_TARGETS+=( ${_x} )
+ fi
+ done
+ LLVM_EXPERIMENTAL_TARGETS=${LLVM_EXPERIMENTAL_TARGETS[@]}
+
local cm_btype="$(usex debug DEBUG RELEASE)"
cat <<- _EOF_ > "${S}"/config.toml
[llvm]
@@ -289,7 +299,7 @@ src_configure() {
assertions = $(toml_usex debug)
ninja = true
targets = "${LLVM_TARGETS// /;}"
- experimental-targets = ""
+ experimental-targets = "${LLVM_EXPERIMENTAL_TARGETS// /;}"
link-shared = $(toml_usex system-llvm)
$(if is_libcxx_linked; then
# https://bugs.gentoo.org/732632
diff --git a/dev-lang/rust/rust-1.83.0-r1.ebuild b/dev-lang/rust/rust-1.83.0-r1.ebuild
index c872f90..2bff578 100644
--- a/dev-lang/rust/rust-1.83.0-r1.ebuild
+++ b/dev-lang/rust/rust-1.83.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -20,7 +20,7 @@ if [[ ${PV} = *beta* ]]; then
else
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+ KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
fi
DESCRIPTION="Systems programming language from Mozilla"
@@ -39,6 +39,8 @@ ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai
ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa )
+
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
SLOT="${PV}"
@@ -282,6 +284,14 @@ src_configure() {
rust_build="$(rust_abi "${CBUILD}")"
rust_host="$(rust_abi "${CHOST}")"
+ LLVM_EXPERIMENTAL_TARGETS=()
+ for _x in "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}"; do
+ if use llvm_targets_${_x} ; then
+ LLVM_EXPERIMENTAL_TARGETS+=( ${_x} )
+ fi
+ done
+ LLVM_EXPERIMENTAL_TARGETS=${LLVM_EXPERIMENTAL_TARGETS[@]}
+
local cm_btype="$(usex debug DEBUG RELEASE)"
cat <<- _EOF_ > "${S}"/config.toml
[llvm]
@@ -291,7 +301,7 @@ src_configure() {
assertions = $(toml_usex debug)
ninja = true
targets = "${LLVM_TARGETS// /;}"
- experimental-targets = ""
+ experimental-targets = "${LLVM_EXPERIMENTAL_TARGETS// /;}"
link-shared = $(toml_usex system-llvm)
$(if is_libcxx_linked; then
# https://bugs.gentoo.org/732632
diff --git a/dev-lang/rust/rust-1.84.0.ebuild b/dev-lang/rust/rust-1.84.0.ebuild
index f6c683d..0671da6 100644
--- a/dev-lang/rust/rust-1.84.0.ebuild
+++ b/dev-lang/rust/rust-1.84.0.ebuild
@@ -39,6 +39,9 @@ ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai
ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+# https://github.com/rust-lang/llvm-project/blob/rustc-1.84.0/llvm/CMakeLists.txt
+ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa )
+
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
SLOT="${PV}"
@@ -281,6 +284,14 @@ src_configure() {
rust_build="$(rust_abi "${CBUILD}")"
rust_host="$(rust_abi "${CHOST}")"
+ LLVM_EXPERIMENTAL_TARGETS=()
+ for _x in "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}"; do
+ if use llvm_targets_${_x} ; then
+ LLVM_EXPERIMENTAL_TARGETS+=( ${_x} )
+ fi
+ done
+ LLVM_EXPERIMENTAL_TARGETS=${LLVM_EXPERIMENTAL_TARGETS[@]}
+
local cm_btype="$(usex debug DEBUG RELEASE)"
cat <<- _EOF_ > "${S}"/config.toml
# https://github.com/rust-lang/rust/issues/135358 (bug #947897)
@@ -292,7 +303,7 @@ src_configure() {
assertions = $(toml_usex debug)
ninja = true
targets = "${LLVM_TARGETS// /;}"
- experimental-targets = ""
+ experimental-targets = "${LLVM_EXPERIMENTAL_TARGETS// /;}"
link-shared = $(toml_usex system-llvm)
$(if is_libcxx_linked; then
# https://bugs.gentoo.org/732632
diff --git a/dev-lang/rust/rust-1.84.1.ebuild b/dev-lang/rust/rust-1.84.1.ebuild
new file mode 100644
index 0000000..7df95b6
--- /dev/null
+++ b/dev-lang/rust/rust-1.84.1.ebuild
@@ -0,0 +1,753 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LLVM_COMPAT=( 19 )
+PYTHON_COMPAT=( python3_{10..13} )
+
+RUST_MAX_VER=${PV}
+RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0"
+
+inherit check-reqs estack flag-o-matic llvm-r1 multiprocessing optfeature \
+ multilib multilib-build python-any-r1 rust rust-toolchain toolchain-funcs verify-sig
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="
+ https://static.rust-lang.org/dist/${SRC}
+ verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
+"
+S="${WORKDIR}/${MY_P}-src"
+
+# keep in sync with llvm ebuild of the same version as bundled one.
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai
+ LoongArch M68k Mips MSP430 NVPTX PowerPC RISCV Sparc SPIRV SystemZ VE
+ WebAssembly X86 XCore Xtensa )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+
+# https://github.com/rust-lang/llvm-project/blob/rustc-1.84.0/llvm/CMakeLists.txt
+ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa )
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
+SLOT="${PV}"
+
+IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind lto miri nightly parallel-compiler rustfmt rust-analyzer rust-src system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+
+LLVM_DEPEND=()
+# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
+for _x in "${ALL_LLVM_TARGETS[@]}"; do
+ LLVM_DEPEND+=( " ${_x}? ( $(llvm_gen_dep "llvm-core/llvm:\${LLVM_SLOT}[${_x}]") )" )
+done
+LLVM_DEPEND+=( " wasm? ( $(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}') )" )
+LLVM_DEPEND+=( " $(llvm_gen_dep 'llvm-core/llvm:${LLVM_SLOT}')" )
+
+BDEPEND="${PYTHON_DEPS}
+ app-eselect/eselect-rust
+ || (
+ >=sys-devel/gcc-4.7
+ >=llvm-core/clang-3.5
+ )
+ !system-llvm? (
+ >=dev-build/cmake-3.13.4
+ app-alternatives/ninja
+ )
+ test? ( dev-debug/gdb )
+ verify-sig? ( sec-keys/openpgp-keys-rust )
+"
+
+DEPEND="
+ >=app-arch/xz-utils-5.2
+ net-misc/curl:=[http2,ssl]
+ sys-libs/zlib:=
+ dev-libs/openssl:0=
+ system-llvm? (
+ ${LLVM_DEPEND[*]}
+ llvm-libunwind? ( llvm-runtimes/libunwind:= )
+ )
+ !system-llvm? (
+ !llvm-libunwind? (
+ elibc_musl? ( sys-libs/libunwind:= )
+ )
+ )
+"
+
+RDEPEND="${DEPEND}
+ app-eselect/eselect-rust
+ dev-lang/rust-common
+ sys-apps/lsb-release
+ !dev-lang/rust:stable
+ !dev-lang/rust-bin:stable
+"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ miri? ( nightly )
+ parallel-compiler? ( nightly )
+ rust-analyzer? ( rust-src )
+ test? ( ${ALL_LLVM_TARGETS[*]} )
+ wasm? ( llvm_targets_WebAssembly )
+ x86? ( cpu_flags_x86_sse2 )
+"
+
+# we don't use cmake.eclass, but can get a warning
+CMAKE_WARN_UNUSED_CLI=no
+
+QA_FLAGS_IGNORED="
+ usr/lib/${PN}/${PV}/bin/.*
+ usr/lib/${PN}/${PV}/libexec/.*
+ usr/lib/${PN}/${PV}/lib/lib.*.so
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_SONAME="
+ usr/lib/${PN}/${PV}/lib/lib.*.so.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_PRESTRIPPED="
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/self-contained/crtn.o
+"
+
+# An rmeta file is custom binary format that contains the metadata for the crate.
+# rmeta files do not support linking, since they do not contain compiled object files.
+# so we can safely silence the warning for this QA check.
+QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
+
+# causes double bootstrap
+RESTRICT="test"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
+
+PATCHES=(
+ "${FILESDIR}"/1.78.0-musl-dynamic-linking.patch
+ "${FILESDIR}"/1.83.0-cross-compile-libz.patch
+ "${FILESDIR}"/1.67.0-doc-wasm.patch
+ "${FILESDIR}"/1.84.1-fix-cross.patch # already upstreamed
+)
+
+clear_vendor_checksums() {
+ sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" || die
+}
+
+eapply_crate() {
+ pushd "vendor/${1:?}" > /dev/null || die
+ eapply "${2:?}"
+ popd > /dev/null || die
+ clear_vendor_checksums "${1}"
+}
+
+toml_usex() {
+ usex "${1}" true false
+}
+
+pre_build_checks() {
+ local M=9216
+ # multiply requirements by 1.3 if we are doing x86-multilib
+ if use amd64; then
+ M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 ))
+ fi
+ M=$(( $(usex clippy 128 0) + ${M} ))
+ M=$(( $(usex miri 128 0) + ${M} ))
+ M=$(( $(usex rustfmt 256 0) + ${M} ))
+ # add 2G if we compile llvm and 256M per llvm_target
+ if ! use system-llvm; then
+ M=$(( 2048 + ${M} ))
+ local ltarget
+ for ltarget in ${ALL_LLVM_TARGETS[@]}; do
+ M=$(( $(usex ${ltarget} 256 0) + ${M} ))
+ done
+ fi
+ M=$(( $(usex wasm 256 0) + ${M} ))
+ M=$(( $(usex debug 2 1) * ${M} ))
+ eshopts_push -s extglob
+ if is-flagq '-g?(gdb)?([1-9])'; then
+ M=$(( 15 * ${M} / 10 ))
+ fi
+ eshopts_pop
+ M=$(( $(usex doc 256 0) + ${M} ))
+ CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
+}
+
+llvm_check_deps() {
+ has_version -r "llvm-core/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]"
+}
+
+# Is LLVM being linked against libc++?
+is_libcxx_linked() {
+ local code='#include <ciso646>
+#if defined(_LIBCPP_VERSION)
+ HAVE_LIBCXX
+#endif
+'
+ local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1
+ [[ ${out} == *HAVE_LIBCXX* ]]
+}
+
+pkg_pretend() {
+ pre_build_checks
+}
+
+pkg_setup() {
+ pre_build_checks
+ python-any-r1_pkg_setup
+
+ export LIBGIT2_NO_PKG_CONFIG=1 #749381
+ if tc-is-cross-compiler; then
+ use system-llvm && die "USE=system-llvm not allowed when cross-compiling"
+ local cross_llvm_target="$(llvm_tuple_to_target "${CBUILD}")"
+ use "llvm_targets_${cross_llvm_target}" || \
+ die "Must enable LLVM_TARGETS=${cross_llvm_target} matching CBUILD=${CBUILD} when cross-compiling"
+ fi
+
+ rust_pkg_setup
+
+ if use system-llvm; then
+ llvm-r1_pkg_setup
+
+ local llvm_config="$(get_llvm_prefix)/bin/llvm-config"
+ export LLVM_LINK_SHARED=1
+ export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)"
+ fi
+}
+
+src_prepare() {
+ eapply_crate openssl-sys-0.9.72 "${FILESDIR}"/1.83.0-libressl-openssl-sys-0.9.72.patch
+ eapply_crate openssl-sys-0.9.92 "${FILESDIR}"/1.72.0-libressl-openssl-sys.patch
+ eapply_crate openssl-sys-0.9.102 "${FILESDIR}"/1.79.0-libressl-openssl-sys.patch
+ eapply_crate openssl-sys-0.9.104 "${FILESDIR}"/1.84.0-libressl-openssl-sys-0.9.104.patch
+
+ # Rust baselines to Pentium4 on x86, this patch lowers the baseline to i586 when sse2 is not set.
+ if use x86; then
+ if ! use cpu_flags_x86_sse2; then
+ eapply "${FILESDIR}/1.82.0-i586-baseline.patch"
+ #grep -rl cmd.args.push\(\"-march=i686\" . | xargs sed -i 's/march=i686/-march=i586/g' || die
+ fi
+ fi
+
+ default
+}
+
+src_configure() {
+ if tc-is-cross-compiler; then
+ export PKG_CONFIG_ALLOW_CROSS=1
+ export PKG_CONFIG_PATH="${ESYSROOT}/usr/$(get_libdir)/pkgconfig"
+ export OPENSSL_INCLUDE_DIR="${ESYSROOT}/usr/include"
+ export OPENSSL_LIB_DIR="${ESYSROOT}/usr/$(get_libdir)"
+ fi
+
+ filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
+
+ local rust_target="" rust_targets="" arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_targets+=",\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+ done
+ if use wasm; then
+ rust_targets+=",\"wasm32-unknown-unknown\""
+ if use system-llvm; then
+ # un-hardcode rust-lld linker for this target
+ # https://bugs.gentoo.org/715348
+ sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/base/wasm.rs || die
+ fi
+ fi
+ rust_targets="${rust_targets#,}"
+
+ # cargo and rustdoc are mandatory and should always be included
+ local tools='"cargo","rustdoc"'
+ use clippy && tools+=',"clippy"'
+ use miri && tools+=',"miri"'
+ use rustfmt && tools+=',"rustfmt"'
+ use rust-analyzer && tools+=',"rust-analyzer","rust-analyzer-proc-macro-srv"'
+ use rust-src && tools+=',"src"'
+
+ local rust_stage0_root="$(${RUSTC} --print sysroot || die "Can't determine rust's sysroot")"
+ # in case of prefix it will be already prefixed, as --print sysroot returns full path
+ [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
+
+ rust_target="$(rust_abi)"
+ rust_build="$(rust_abi "${CBUILD}")"
+ rust_host="$(rust_abi "${CHOST}")"
+
+ LLVM_EXPERIMENTAL_TARGETS=()
+ for _x in "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}"; do
+ if use llvm_targets_${_x} ; then
+ LLVM_EXPERIMENTAL_TARGETS+=( ${_x} )
+ fi
+ done
+ LLVM_EXPERIMENTAL_TARGETS=${LLVM_EXPERIMENTAL_TARGETS[@]}
+
+ local cm_btype="$(usex debug DEBUG RELEASE)"
+ cat <<- _EOF_ > "${S}"/config.toml
+ # https://github.com/rust-lang/rust/issues/135358 (bug #947897)
+ profile = "dist"
+ [llvm]
+ download-ci-llvm = false
+ optimize = $(toml_usex !debug)
+ release-debuginfo = $(toml_usex debug)
+ assertions = $(toml_usex debug)
+ ninja = true
+ targets = "${LLVM_TARGETS// /;}"
+ experimental-targets = "${LLVM_EXPERIMENTAL_TARGETS// /;}"
+ link-shared = $(toml_usex system-llvm)
+ $(if is_libcxx_linked; then
+ # https://bugs.gentoo.org/732632
+ echo "use-libcxx = true"
+ echo "static-libstdcpp = false"
+ fi)
+ $(case "${rust_target}" in
+ i586-*-linux-*)
+ # https://github.com/rust-lang/rust/issues/93059
+ echo 'cflags = "-fcf-protection=none"'
+ echo 'cxxflags = "-fcf-protection=none"'
+ echo 'ldflags = "-fcf-protection=none"'
+ ;;
+ *)
+ ;;
+ esac)
+ enable-warnings = false
+ [llvm.build-config]
+ CMAKE_VERBOSE_MAKEFILE = "ON"
+ $(if ! tc-is-cross-compiler; then
+ # When cross-compiling, LLVM is compiled twice, once for host and
+ # once for target. Unfortunately, this build configuration applies
+ # to both, which means any flags applicable to one target but not
+ # the other will break. Conditionally disable respecting user
+ # flags when cross-compiling.
+ echo "CMAKE_C_FLAGS_${cm_btype} = \"${CFLAGS}\""
+ echo "CMAKE_CXX_FLAGS_${cm_btype} = \"${CXXFLAGS}\""
+ echo "CMAKE_EXE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = \"${ARFLAGS}\""
+ fi)
+ [build]
+ build-stage = 2
+ test-stage = 2
+ build = "${rust_build}"
+ host = ["${rust_host}"]
+ target = [${rust_targets}]
+ cargo = "${rust_stage0_root}/bin/cargo"
+ rustc = "${rust_stage0_root}/bin/rustc"
+ rustfmt = "${rust_stage0_root}/bin/rustfmt"
+ docs = $(toml_usex doc)
+ compiler-docs = false
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ extended = true
+ tools = [${tools}]
+ verbose = 2
+ sanitizers = false
+ profiler = true
+ cargo-native-static = false
+ [install]
+ prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
+ sysconfdir = "etc"
+ docdir = "share/doc/rust"
+ bindir = "bin"
+ libdir = "lib"
+ mandir = "share/man"
+ [rust]
+ # https://github.com/rust-lang/rust/issues/54872
+ codegen-units-std = 1
+ optimize = true
+ debug = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ debug-assertions-std = $(toml_usex debug)
+ debuginfo-level = $(usex debug 2 0)
+ debuginfo-level-rustc = $(usex debug 2 0)
+ debuginfo-level-std = $(usex debug 2 0)
+ debuginfo-level-tools = $(usex debug 2 0)
+ debuginfo-level-tests = 0
+ backtrace = true
+ incremental = false
+ $(if ! tc-is-cross-compiler; then
+ echo "default-linker = \"$(tc-getCC)\""
+ fi)
+ parallel-compiler = $(toml_usex parallel-compiler)
+ channel = "$(usex nightly nightly stable)"
+ description = "gentoo"
+ rpath = false
+ verbose-tests = true
+ optimize-tests = $(toml_usex !debug)
+ codegen-tests = true
+ dist-src = false
+ remap-debuginfo = true
+ lld = $(usex system-llvm false $(toml_usex wasm))
+ # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
+ # https://github.com/rust-lang/rust/issues/74976
+ # https://github.com/rust-lang/rust/issues/76526
+ deny-warnings = $(usex wasm $(usex doc false true) true)
+ backtrace-on-ice = true
+ jemalloc = false
+ # See https://github.com/rust-lang/rust/issues/121124
+ lto = "$(usex lto thin off)"
+ [dist]
+ src-tarball = false
+ compression-formats = ["xz"]
+ compression-profile = "balanced"
+ _EOF_
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ export CFLAGS_${rust_target//-/_}="${arch_cflags}"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${rust_target}]
+ ar = "$(tc-getAR)"
+ cc = "$(tc-getCC)"
+ cxx = "$(tc-getCXX)"
+ linker = "$(tc-getCC)"
+ ranlib = "$(tc-getRANLIB)"
+ llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix)/bin/llvm-config"
+ _EOF_
+ fi
+ # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ # but we patch it and set to false here as well
+ if use elibc_musl; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ crt-static = false
+ musl-root = "$($(tc-getCC) -print-sysroot)/usr"
+ _EOF_
+ fi
+ done
+ if use wasm; then
+ wasm_target="wasm32-unknown-unknown"
+ export CFLAGS_${wasm_target//-/_}="$(filter-flags '-mcpu*' '-march*' '-mtune*'; echo "$CFLAGS")"
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.wasm32-unknown-unknown]
+ linker = "$(usex system-llvm lld rust-lld)"
+ # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
+ profiler = false
+ _EOF_
+ fi
+
+ if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
+ # experimental cross support
+ # discussion: https://bugs.gentoo.org/679878
+ # TODO: c*flags, clang, system-llvm, cargo.eclass target support
+ # it would be much better if we could split out stdlib
+ # complilation to separate ebuild and abuse CATEGORY to
+ # just install to /usr/lib/rustlib/<target>
+
+ # extra targets defined as a bash array
+ # spec format: <LLVM target>:<rust-target>:<CTARGET>
+ # best place would be /etc/portage/env/dev-lang/rust
+ # Example:
+ # RUST_CROSS_TARGETS=(
+ # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
+ # )
+ # no extra hand holding is done, no target transformations, all
+ # values are passed as-is with just basic checks, so it's up to user to supply correct values
+ # valid rust targets can be obtained with
+ # rustc --print target-list
+ # matching cross toolchain has to be installed
+ # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
+ # only gcc toolchains installed with crossdev are checked for now.
+
+ # BUG: we can't pass host flags to cross compiler, so just filter for now
+ # BUG: this should be more fine-grained.
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*'
+
+ local cross_target_spec
+ for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
+ # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
+ local cross_llvm_target="${cross_target_spec%%:*}"
+ # extracts toolchain triples, <rust-target>:<CTARGET>
+ local cross_triples="${cross_target_spec#*:}"
+ # extracts first element after before : separator
+ local cross_rust_target="${cross_triples%%:*}"
+ # extracts last element after : separator
+ local cross_toolchain="${cross_triples##*:}"
+ use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
+ command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${cross_rust_target}]
+ ar = "${cross_toolchain}-ar"
+ cc = "${cross_toolchain}-gcc"
+ cxx = "${cross_toolchain}-g++"
+ linker = "${cross_toolchain}-gcc"
+ ranlib = "${cross_toolchain}-ranlib"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix)/bin/llvm-config"
+ _EOF_
+ fi
+ if [[ "${cross_toolchain}" == *-musl* ]]; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
+ _EOF_
+ fi
+
+ # append cross target to "normal" target list
+ # example 'target = ["powerpc64le-unknown-linux-gnu"]'
+ # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
+
+ rust_targets="${rust_targets},\"${cross_rust_target}\""
+ sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
+
+ ewarn
+ ewarn "Enabled ${cross_rust_target} rust target"
+ ewarn "Using ${cross_toolchain} cross toolchain"
+ ewarn
+ if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
+ ewarn "'sys-devel/binutils[multitarget]' is not installed"
+ ewarn "'strip' will be unable to strip cross libraries"
+ ewarn "cross targets will be installed with full debug information"
+ ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
+ ewarn
+ ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
+ ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
+ ewarn
+ fi
+ done
+ fi # I_KNOW_WHAT_I_AM_DOING_CROSS
+
+ einfo "Rust configured with the following flags:"
+ echo
+ echo RUSTFLAGS="\"${RUSTFLAGS}\""
+ echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\""
+ echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\""
+ echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\""
+ env | grep "CARGO_TARGET_.*_RUSTFLAGS="
+ env | grep "CFLAGS_.*"
+ echo
+ einfo "config.toml contents:"
+ cat "${S}"/config.toml || die
+ echo
+}
+
+src_compile() {
+ RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+}
+
+src_test() {
+ # https://rustc-dev-guide.rust-lang.org/tests/intro.html
+
+ # those are basic and codegen tests.
+ local tests=(
+ codegen
+ codegen-units
+ compile-fail
+ incremental
+ mir-opt
+ pretty
+ run-make
+ )
+
+ # fails if llvm is not built with ALL targets.
+ # and known to fail with system llvm sometimes.
+ use system-llvm || tests+=( assembly )
+
+ # fragile/expensive/less important tests
+ # or tests that require extra builds
+ # TODO: instead of skipping, just make some nonfatal.
+ if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
+ tests+=(
+ rustdoc
+ rustdoc-js
+ rustdoc-js-std
+ rustdoc-ui
+ run-make-fulldeps
+ ui
+ ui-fulldeps
+ )
+ fi
+
+ local i failed=()
+ einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
+ for i in "${tests[@]}"; do
+ local t="src/test/${i}"
+ einfo "rust_src_test: running ${t}"
+ if ! RUST_BACKTRACE=1 "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
+ -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
+ then
+ failed+=( "${t}" )
+ eerror "rust_src_test: ${t} failed"
+ fi
+ done
+
+ if [[ ${#failed[@]} -ne 0 ]]; then
+ eerror "rust_src_test: failure summary: ${failed[@]}"
+ die "aborting due to test failures"
+ fi
+}
+
+src_install() {
+ DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+
+ docompress /usr/lib/${PN}/${PV}/share/man/
+
+ # bug #689562, #689160
+ rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
+ rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
+
+ local symlinks=(
+ cargo
+ rustc
+ rustdoc
+ rust-gdb
+ rust-gdbgui
+ rust-lldb
+ )
+
+ use clippy && symlinks+=( clippy-driver cargo-clippy )
+ use miri && symlinks+=( miri cargo-miri )
+ use rustfmt && symlinks+=( rustfmt cargo-fmt )
+ use rust-analyzer && symlinks+=( rust-analyzer )
+
+ einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
+ local i
+ for i in "${symlinks[@]}"; do
+ # we need realpath on /usr/bin/* symlink return version-appended binary path.
+ # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
+ # need to fix eselect-rust to remove this hack.
+ local ver_i="${i}-${PV}"
+ if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
+ einfo "Installing ${i} symlink"
+ ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
+ else
+ ewarn "${i} symlink requested, but source file not found"
+ ewarn "please report this"
+ fi
+ dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
+ done
+
+ # symlinks to switch components to active rust in eselect
+ dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
+ use rust-analyzer && dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
+ dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
+ dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
+ dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
+
+ newenvd - "50${P}" <<-_EOF_
+ LDPATH="${EPREFIX}/usr/lib/rust/lib-${PV}"
+ MANPATH="${EPREFIX}/usr/lib/rust/man-${PV}"
+ _EOF_
+
+ rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/bin"/*.old || die
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die
+
+ # note: eselect-rust adds EROOT to all paths below
+ cat <<-_EOF_ > "${T}/provider-${P}"
+ /usr/bin/cargo
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ /usr/bin/rust-gdbgui
+ /usr/bin/rust-lldb
+ /usr/lib/rustlib
+ /usr/lib/rust/lib
+ /usr/lib/rust/man
+ /usr/share/doc/rust
+ _EOF_
+
+ if use clippy; then
+ echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
+ fi
+ if use miri; then
+ echo /usr/bin/miri >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
+ fi
+ if use rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+ if use rust-analyzer; then
+ echo /usr/lib/rust/libexec >> "${T}/provider-${P}"
+ echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
+ fi
+
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+
+ if use dist; then
+ "${EPYTHON}" ./x.py dist -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+ insinto "/usr/lib/${PN}/${PV}/dist"
+ doins -r "${S}/build/dist/."
+ fi
+}
+
+pkg_preinst() {
+ # 943308 and friends; basically --keep-going can forget to unmerge old rust
+ # but the soft blocker allows us to install conflicting files.
+ # This results in duplicated .{rlib,so} files which confuses rustc and results in
+ # the need for manual intervention.
+ if has_version -b "dev-lang/rust:stable/$(ver_cut 1-2)"; then
+ # we need to find all .{rlib,so} files in the old rust lib directory
+ # and store them in an array for later use
+ readarray -d '' old_rust_libs < <(
+ find "${EROOT}/usr/lib/rust/${PV}/lib/rustlib" \
+ -type f \( -name '*.rlib' -o -name '*.so' \) -print0)
+ export old_rust_libs
+ if [[ ${#old_rust_libs[@]} -gt 0 ]]; then
+ einfo "Found old .rlib and .so files in the old rust lib directory"
+ else
+ die "Found no old .rlib and .so files but old rust version is installed. Bailing!"
+ fi
+ fi
+}
+
+pkg_postinst() {
+
+ if has_version -b "dev-lang/rust:stable/$(ver_cut 1-2)"; then
+ # Be _extra_ careful here as we're removing files from the live filesystem
+ local f
+ for f in "${old_rust_libs[@]}"; do
+ [[ -f ${f} ]] || die "old_rust_libs array contains non-existent file"
+ local base_name="${f%-*}"
+ local ext="${f##*.}"
+ local matching_files=("${base_name}"-*.${ext})
+ if [[ ${#matching_files[@]} -ne 2 ]]; then
+ die "Expected exactly two files matching ${base_name}-\*.rlib, but found ${#matching_files[@]}"
+ fi
+ einfo "Removing old .rlib file ${f}"
+ rm "${f}" || die
+ done
+ fi
+
+ eselect rust update
+
+ if has_version dev-debug/gdb || has_version llvm-core/lldb; then
+ elog "Rust installs helper scripts for calling GDB and LLDB,"
+ elog "for convenience they are installed under /usr/bin/rust-{gdb,lldb}-${PV}."
+ fi
+
+ if has_version app-editors/emacs; then
+ optfeature "emacs support for rust" app-emacs/rust-mode
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ optfeature "vim support for rust" app-vim/rust-vim
+ fi
+}
+
+pkg_postrm() {
+ eselect rust cleanup
+}
diff --git a/dev-python/aioquic/Manifest b/dev-python/aioquic/Manifest
new file mode 100644
index 0000000..f964990
--- /dev/null
+++ b/dev-python/aioquic/Manifest
@@ -0,0 +1 @@
+DIST aioquic-1.2.0.tar.gz 179891 BLAKE2B fcf7821a93c166c98cdb7e6e2eb3b80df65c1faa484268faa0fc1386bb59bdfffdf801a8de23c2a2d9dec826640ad75717b068b558081959089e9be7d414bca3 SHA512 6833a19e52ac702a3ae12fdfa3dcd3011125e38d9c16ae88881533f6c607d61c6eac43215eae80c75513d616432a98d124fc92545d63697159658e611af50ee9
diff --git a/dev-python/aioquic/aioquic-1.2.0.ebuild b/dev-python/aioquic/aioquic-1.2.0.ebuild
new file mode 100644
index 0000000..feeb7e0
--- /dev/null
+++ b/dev-python/aioquic/aioquic-1.2.0.ebuild
@@ -0,0 +1,39 @@
+# Copyright 2024-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( pypy3 python3_{10..13} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="An implementation of QUIC and HTTP/3"
+HOMEPAGE="
+ https://github.com/aiortc/aioquic/
+ https://pypi.org/project/aioquic/
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64"
+
+DEPEND="
+ dev-libs/openssl:=
+"
+RDEPEND="
+ ${DEPEND}
+ dev-python/certifi[${PYTHON_USEDEP}]
+ >=dev-python/cryptography-42.0.0[${PYTHON_USEDEP}]
+ <dev-python/pylsqpack-0.4.0[${PYTHON_USEDEP}]
+ >=dev-python/pylsqpack-0.3.3[${PYTHON_USEDEP}]
+ >=dev-python/pyopenssl-24[${PYTHON_USEDEP}]
+ >=dev-python/service-identity-24.1.0[${PYTHON_USEDEP}]
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.2.0-libressl.patch
+)
+
+distutils_enable_tests pytest
diff --git a/dev-python/aioquic/files/aioquic-1.2.0-libressl.patch b/dev-python/aioquic/files/aioquic-1.2.0-libressl.patch
new file mode 100644
index 0000000..8948a11
--- /dev/null
+++ b/dev-python/aioquic/files/aioquic-1.2.0-libressl.patch
@@ -0,0 +1,19 @@
+https://github.com/openbsd/ports/blob/def9b91f126f8a28562549593c6b5c17d41692ca/www/py-aioquic/patches/patch-src_aioquic__crypto_c
+
+Index: src/aioquic/_crypto.c
+--- a/src/aioquic/_crypto.c.orig
++++ b/src/aioquic/_crypto.c
+@@ -407,10 +407,13 @@ PyInit__crypto(void)
+ PyModule_AddObject(m, "HeaderProtection", HeaderProtectionType);
+
+ // ensure required ciphers are initialised
++ // LibreSSL loads all cipher by default, and doesn't support add_cipher
++#ifndef LIBRESSL_VERSION_NUMBER
+ EVP_add_cipher(EVP_aes_128_ecb());
+ EVP_add_cipher(EVP_aes_128_gcm());
+ EVP_add_cipher(EVP_aes_256_ecb());
+ EVP_add_cipher(EVP_aes_256_gcm());
++#endif
+
+ return m;
+ }
diff --git a/dev-python/aioquic/metadata.xml b/dev-python/aioquic/metadata.xml
new file mode 100644
index 0000000..530257f
--- /dev/null
+++ b/dev-python/aioquic/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">aiortc/aioquic</remote-id>
+ <remote-id type="pypi">aioquic</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtbase/Manifest b/dev-qt/qtbase/Manifest
index a3255ea..e4c7649 100644
--- a/dev-qt/qtbase/Manifest
+++ b/dev-qt/qtbase/Manifest
@@ -1,3 +1,2 @@
-DIST qtbase-everywhere-src-6.7.2.tar.xz 49364504 BLAKE2B b48b8a8decafe3262d459b9446c25561851fef88b3316107c2909f5964e8122a558b5501a3e59667bdf4776d36ea5ba0d9f227538c45c1f8e94fbc8fff4244a6 SHA512 eb4b2f1fb02ab0ed5508d32449e140778278ff1a619cfcae14920b276b5c46e01a566d73fb8f84cf2cfc81e19cb11e53ab500df6b27d12ab875aa8c07bd15d6b
-DIST qtbase-everywhere-src-6.7.3.tar.xz 49426156 BLAKE2B da7eacd64bd122bf2b320c0cec41ae7630e55e0d588912bc2cc6ef7ecc755af0f375ca84c6fe0bb8381e4008da2fd43fc491c5c88ecc7694223c62700761ed37 SHA512 99495c6ed942b3a7bd19f9471bac76502baaafc20ad7e139adf25726f699c1b4deffa1ab761fe9a49a3ffe6a36d830422a20f8a369aded67a083652bf4a19290
DIST qtbase-everywhere-src-6.8.1.tar.xz 48220752 BLAKE2B b42d562f9069cf3d68807c63492f0ae1dcb9cb9a057a8d8548a7d134b36af169e403324e2902fa59c6c82ce087add107173c7606dff952dbbbc06c33b056ddff SHA512 87b7df95a63f7c28bfc7659f19658e4151b9da55b0dc4d34dc0e04c5270254b01a72f8deac0b2fc5543fce8d7542128addb398833de9c3248196aa96b2dd1601
+DIST qtbase-everywhere-src-6.8.2.tar.xz 48264736 BLAKE2B 3c4a71a0c515d7433eda3a6155a0499ea43ce708fb25614843499bf8a7a71ef06ba93dad9e7dd04a28b86a88eea00151ad3500d06bd09b9b37a4e070774e2684 SHA512 4a074aca1c8bcca536fd428c969c0119f5131d0d52b67028edbb75a81dc6e0c15394f69e29cef513e6d8c6e93384cedc38dd03b0eed6ab1bbafbe2b5bbc85799
diff --git a/dev-qt/qtbase/files/qtbase-6.7.2-CVE-2024-39936.patch b/dev-qt/qtbase/files/qtbase-6.7.2-CVE-2024-39936.patch
deleted file mode 100644
index cc6238a..0000000
--- a/dev-qt/qtbase/files/qtbase-6.7.2-CVE-2024-39936.patch
+++ /dev/null
@@ -1,200 +0,0 @@
-https://bugs.gentoo.org/935869
-https://github.com/qt/qtbase/commit/2b1e36e183ce75c224305c7a94457b92f7a5cf58
-From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= <marten.nordheim@qt.io>
-Date: Tue, 25 Jun 2024 17:09:35 +0200
-Subject: [PATCH] HTTP2: Delay any communication until encrypted() can be
- responded to
-
-We have the encrypted() signal that lets users do extra checks on the
-established connection. It is emitted as BlockingQueued, so the HTTP
-thread stalls until it is done emitting. Users can potentially call
-abort() on the QNetworkReply at that point, which is passed as a Queued
-call back to the HTTP thread. That means that any currently queued
-signal emission will be processed before the abort() call is processed.
-
-In the case of HTTP2 it is a little special since it is multiplexed and
-the code is built to start requests as they are available. This means
-that, while the code worked fine for HTTP1, since one connection only
-has one request, it is not working for HTTP2, since we try to send more
-requests in-between the encrypted() signal and the abort() call.
-
-This patch changes the code to delay any communication until the
-encrypted() signal has been emitted and processed, for HTTP2 only.
-It's done by adding a few booleans, both to know that we have to return
-early and so we can keep track of what events arose and what we need to
-resume once enough time has passed that any abort() call must have been
-processed.
-
-Fixes: QTBUG-126610
---- a/src/network/access/qhttp2protocolhandler.cpp
-+++ b/src/network/access/qhttp2protocolhandler.cpp
-@@ -304,10 +304,10 @@
- }
-
-- if (!prefaceSent && !sendClientPreface())
-- return false;
--
- if (!requests.size())
- return true;
-
-+ if (!prefaceSent && !sendClientPreface())
-+ return false;
-+
- m_channel->state = QHttpNetworkConnectionChannel::WritingState;
- // Check what was promised/pushed, maybe we do not have to send a request
---- a/src/network/access/qhttpnetworkconnectionchannel.cpp
-+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
-@@ -210,4 +210,8 @@
- {
- Q_ASSERT(protocolHandler);
-+ if (waitingForPotentialAbort) {
-+ needInvokeSendRequest = true;
-+ return false; // this return value is unused
-+ }
- return protocolHandler->sendRequest();
- }
-@@ -222,7 +226,6 @@
- {
- QMetaObject::invokeMethod(this, [this] {
-- Q_ASSERT(protocolHandler);
- if (reply)
-- protocolHandler->sendRequest();
-+ sendRequest();
- }, Qt::ConnectionType::QueuedConnection);
- }
-@@ -231,4 +234,8 @@
- {
- Q_ASSERT(protocolHandler);
-+ if (waitingForPotentialAbort) {
-+ needInvokeReceiveReply = true;
-+ return;
-+ }
- protocolHandler->_q_receiveReply();
- }
-@@ -237,4 +244,8 @@
- {
- Q_ASSERT(protocolHandler);
-+ if (waitingForPotentialAbort) {
-+ needInvokeReadyRead = true;
-+ return;
-+ }
- protocolHandler->_q_readyRead();
- }
-@@ -1240,5 +1251,16 @@
- // Similar to HTTP/1.1 counterpart below:
- const auto &pair = std::as_const(h2RequestsToSend).first();
-+ waitingForPotentialAbort = true;
- emit pair.second->encrypted();
-+
-+ // We don't send or handle any received data until any effects from
-+ // emitting encrypted() have been processed. This is necessary
-+ // because the user may have called abort(). We may also abort the
-+ // whole connection if the request has been aborted and there is
-+ // no more requests to send.
-+ QMetaObject::invokeMethod(this,
-+ &QHttpNetworkConnectionChannel::checkAndResumeCommunication,
-+ Qt::QueuedConnection);
-+
- // In case our peer has sent us its settings (window size, max concurrent streams etc.)
- // let's give _q_receiveReply a chance to read them first ('invokeMethod', QueuedConnection).
-@@ -1258,4 +1280,26 @@
- }
-
-+
-+void QHttpNetworkConnectionChannel::checkAndResumeCommunication()
-+{
-+ Q_ASSERT(connection->connectionType() == QHttpNetworkConnection::ConnectionTypeHTTP2
-+ || connection->connectionType() == QHttpNetworkConnection::ConnectionTypeHTTP2Direct);
-+
-+ // Because HTTP/2 requires that we send a SETTINGS frame as the first thing we do, and respond
-+ // to a SETTINGS frame with an ACK, we need to delay any handling until we can ensure that any
-+ // effects from emitting encrypted() have been processed.
-+ // This function is called after encrypted() was emitted, so check for changes.
-+
-+ if (!reply && h2RequestsToSend.isEmpty())
-+ abort();
-+ waitingForPotentialAbort = false;
-+ if (needInvokeReadyRead)
-+ _q_readyRead();
-+ if (needInvokeReceiveReply)
-+ _q_receiveReply();
-+ if (needInvokeSendRequest)
-+ sendRequest();
-+}
-+
- void QHttpNetworkConnectionChannel::requeueHttp2Requests()
- {
---- a/src/network/access/qhttpnetworkconnectionchannel_p.h
-+++ b/src/network/access/qhttpnetworkconnectionchannel_p.h
-@@ -75,4 +75,8 @@
- bool ssl;
- bool isInitialized;
-+ bool waitingForPotentialAbort = false;
-+ bool needInvokeReceiveReply = false;
-+ bool needInvokeReadyRead = false;
-+ bool needInvokeSendRequest = false;
- ChannelState state;
- QHttpNetworkRequest request; // current request, only used for HTTP
-@@ -147,4 +151,6 @@
- void resendCurrentRequest();
-
-+ void checkAndResumeCommunication();
-+
- bool isSocketBusy() const;
- bool isSocketWriting() const;
---- a/tests/auto/network/access/http2/tst_http2.cpp
-+++ b/tests/auto/network/access/http2/tst_http2.cpp
-@@ -107,4 +107,6 @@
- void duplicateRequestsWithAborts();
-
-+ void abortOnEncrypted();
-+
- protected slots:
- // Slots to listen to our in-process server:
-@@ -1480,4 +1482,46 @@
- }
-
-+void tst_Http2::abortOnEncrypted()
-+{
-+#if !QT_CONFIG(ssl)
-+ QSKIP("TLS support is needed for this test");
-+#else
-+ clearHTTP2State();
-+ serverPort = 0;
-+
-+ ServerPtr targetServer(newServer(defaultServerSettings, H2Type::h2Direct));
-+
-+ QMetaObject::invokeMethod(targetServer.data(), "startServer", Qt::QueuedConnection);
-+ runEventLoop();
-+
-+ nRequests = 1;
-+ nSentRequests = 0;
-+
-+ const auto url = requestUrl(H2Type::h2Direct);
-+ QNetworkRequest request(url);
-+ request.setAttribute(QNetworkRequest::Http2DirectAttribute, true);
-+
-+ std::unique_ptr<QNetworkReply> reply{manager->get(request)};
-+ reply->ignoreSslErrors();
-+ connect(reply.get(), &QNetworkReply::encrypted, reply.get(), [reply = reply.get()](){
-+ reply->abort();
-+ });
-+ connect(reply.get(), &QNetworkReply::errorOccurred, this, &tst_Http2::replyFinishedWithError);
-+
-+ runEventLoop();
-+ STOP_ON_FAILURE
-+
-+ QCOMPARE(nRequests, 0);
-+ QCOMPARE(reply->error(), QNetworkReply::OperationCanceledError);
-+
-+ const bool res = QTest::qWaitFor(
-+ [this, server = targetServer.get()]() {
-+ return serverGotSettingsACK || prefaceOK || nSentRequests > 0;
-+ },
-+ 500);
-+ QVERIFY(!res);
-+#endif // QT_CONFIG(ssl)
-+}
-+
- void tst_Http2::serverStarted(quint16 port)
- {
diff --git a/dev-qt/qtbase/files/qtbase-6.7.2-float16-sse2.patch b/dev-qt/qtbase/files/qtbase-6.7.2-float16-sse2.patch
deleted file mode 100644
index a54c9da..0000000
--- a/dev-qt/qtbase/files/qtbase-6.7.2-float16-sse2.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Backport from 6.7.3 as it may cause major problems for x86 sse2-less
-systems using gcc14.
-
-https://github.com/qt/qtbase/commit/39fa7e7bef90be2940c5f736935f963e3969e0bd
-From: Dmitry Shachnev <mitya57@gmail.com>
-Date: Sat, 27 Jul 2024 23:03:07 +0300
-Subject: [PATCH] Use _Float16 only when SSE2 is enabled
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The GCC documentation [1] says: “On x86 targets with SSE2 enabled, GCC
-supports half-precision (16-bit) floating point via the _Float16 type”.
-
-On non-SSE2 x86 (such as Debian i386 baseline [2]), __FLT16_MAX__ is
-defined starting with GCC 14 [3], however any non-trivial use of the
-_Float16 type results in an error:
-
-error: operation not permitted on type ‘_Float16’ without option ‘-msse2’
-
-which makes some packages fail to build on i386 architecture [4].
-
-[1]: https://gcc.gnu.org/onlinedocs/gcc/Half-Precision.html
-[2]: https://wiki.debian.org/ArchitectureSpecificsMemo#i386-1
-[3]: https://gcc.gnu.org/g:9a19fa8b616f83474c35cc5b34a3865073ced829
-[4]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1076986
---- a/src/corelib/global/qtypes.h
-+++ b/src/corelib/global/qtypes.h
-@@ -264,11 +264,10 @@
- # define QFLOAT16_IS_NATIVE 1
- using NativeFloat16Type = decltype(__FLT16_MAX__);
--#elif defined(Q_CC_GNU_ONLY) && defined(__FLT16_MAX__)
-+#elif defined(Q_CC_GNU_ONLY) && defined(__FLT16_MAX__) && defined(__ARM_FP16_FORMAT_IEEE)
- # define QFLOAT16_IS_NATIVE 1
--# ifdef __ARM_FP16_FORMAT_IEEE
- using NativeFloat16Type = __fp16;
--# else
-+#elif defined(Q_CC_GNU_ONLY) && defined(__FLT16_MAX__) && defined(__SSE2__)
-+# define QFLOAT16_IS_NATIVE 1
- using NativeFloat16Type = _Float16;
--# endif
- #else
- # define QFLOAT16_IS_NATIVE 0
diff --git a/dev-qt/qtbase/files/qtbase-6.7.2-gcc15-odr.patch b/dev-qt/qtbase/files/qtbase-6.7.2-gcc15-odr.patch
deleted file mode 100644
index 64cedb1..0000000
--- a/dev-qt/qtbase/files/qtbase-6.7.2-gcc15-odr.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-https://codereview.qt-project.org/c/qt/qtbase/+/582403
-From: Sam James <sam@gentoo.org>
-Date: Sat, 10 Aug 2024 16:43:05 +0100
-Subject: [PATCH] Fix ODR violation for IsFloatType_v
-
-With recent GCC 15 trunk, I started to see:
-```
-ld: .../kwalletentry.cc.o:(.rodata+0x0): multiple definition of `QtPrivate::IsFloatType_v<_Float16>';
- src/runtime/kwalletd/backend/CMakeFiles/KF6WalletBackend.dir/cbc.cc.o:(.rodata+0x0): first defined here
-```
-
-The issue is that constexpr is only implicitly inline for functions or
-static data members [0], so the two constexpr IsFloatType_v definitions
-here cause an ODR violation.
-
-Explicitly mark them as inline constexpr.
-
-[0] http://eel.is/c++draft/dcl.constexpr#1.sentence-3
---- a/src/corelib/global/qcomparehelpers.h
-+++ b/src/corelib/global/qcomparehelpers.h
-@@ -348,9 +348,9 @@
-
- template <typename T>
--constexpr bool IsFloatType_v = std::is_floating_point_v<T>;
-+inline constexpr bool IsFloatType_v = std::is_floating_point_v<T>;
-
- #if QFLOAT16_IS_NATIVE
- template <>
--constexpr bool IsFloatType_v<QtPrivate::NativeFloat16Type> = true;
-+inline constexpr bool IsFloatType_v<QtPrivate::NativeFloat16Type> = true;
- #endif
-
diff --git a/dev-qt/qtbase/files/qtbase-6.7.2-haswell-no-rdrnd.patch b/dev-qt/qtbase/files/qtbase-6.7.2-haswell-no-rdrnd.patch
deleted file mode 100644
index 0427315..0000000
--- a/dev-qt/qtbase/files/qtbase-6.7.2-haswell-no-rdrnd.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-https://bugreports.qt.io/browse/QTBUG-129193
-https://forums.gentoo.org/viewtopic-t-1170690.html
-https://forums.gentoo.org/viewtopic-t-1169619.html
-https://codereview.qt-project.org/c/qt/qtbase/+/593073
-From: Thiago Macieira <thiago.macieira@intel.com>
-Date: Mon, 23 Sep 2024 13:44:31 -0700
-Subject: [PATCH] qsimd_x86: disable the requirement that CPUs must have RNGs
-
-Intel CPUs have had this since 2013 (Ivy Bridge), but some older
-Bulldozer AMD CPUs appear to be missing it. This creates a mismatch
-between when the __haswell__ macro gets declared in qsimd_p.h and the
-runtime check using the CpuArchHaswell value. That in turn creates a
-condition where qInitDrawhelperFunctions() in qdrawhelper.cpp leaves the
-memfill pointers set to null.
-
-#elif defined(__SSE2__)
-# ifndef __haswell__
- qt_memfill32 = qt_memfill32_sse2;
- qt_memfill64 = qt_memfill64_sse2;
-# endif
-...
-#if defined(QT_COMPILER_SUPPORTS_AVX2)
- if (qCpuHasFeature(ArchHaswell)) {
- qt_memfill32 = qt_memfill32_avx2;
- qt_memfill64 = qt_memfill64_avx2;
-
-It does this so the qt_memfillXX_sse2 functions don't have to be defined
-anywhere, so the QtGui build won't carry unnecessary dead code.
-
-This is old code (from Qt 4.x) and several improvements I've made for
-QtCore are not applied yet. My work for qSimdDispatcher[1] isn't
-complete: it might have avoided this problem here, but it would also
-have required major work for the draw helpers to work in the first
-place.
-
-[1] https://codereview.qt-project.org/c/qt/qtbase/+/537384
-
-Pick-to: 6.8 6.7 6.5 6.2
-Fixes: QTBUG-129193
-Change-Id: Ia427a9e502b0fb46b2bdfffda8e2131b7091c9e9
-Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
---- a/src/corelib/global/qsimd_x86_p.h
-+++ b/src/corelib/global/qsimd_x86_p.h
-@@ -85,16 +85,14 @@
- #define cpu_snb (cpu_wsm \
- | cpu_feature_avx)
- #define cpu_ivb (cpu_snb \
-- | cpu_feature_f16c \
-- | cpu_feature_rdrnd)
-+ | cpu_feature_f16c)
- #define cpu_hsw (cpu_ivb \
- | cpu_feature_avx2 \
- | cpu_feature_fma \
- | cpu_feature_bmi \
- | cpu_feature_bmi2 \
- | cpu_feature_movbe)
--#define cpu_bdw (cpu_hsw \
-- | cpu_feature_rdseed)
-+#define cpu_bdw (cpu_hsw)
- #define cpu_bdx (cpu_bdw)
- #define cpu_skl (cpu_bdw)
- #define cpu_skx (cpu_skl \
-@@ -237,9 +235,9 @@
- #define QT_FUNCTION_TARGET_STRING_ARCH_NHM QT_FUNCTION_TARGET_STRING_ARCH_CORE2 ",sse4.1,sse4.2,popcnt"
- #define QT_FUNCTION_TARGET_STRING_ARCH_WSM QT_FUNCTION_TARGET_STRING_ARCH_NHM
- #define QT_FUNCTION_TARGET_STRING_ARCH_SNB QT_FUNCTION_TARGET_STRING_ARCH_WSM ",avx"
--#define QT_FUNCTION_TARGET_STRING_ARCH_IVB QT_FUNCTION_TARGET_STRING_ARCH_SNB ",f16c,rdrnd,fsgsbase"
-+#define QT_FUNCTION_TARGET_STRING_ARCH_IVB QT_FUNCTION_TARGET_STRING_ARCH_SNB ",f16c,fsgsbase"
- #define QT_FUNCTION_TARGET_STRING_ARCH_HSW QT_FUNCTION_TARGET_STRING_ARCH_IVB ",avx2,fma,bmi,bmi2,lzcnt,movbe"
--#define QT_FUNCTION_TARGET_STRING_ARCH_BDW QT_FUNCTION_TARGET_STRING_ARCH_HSW ",adx,rdseed"
-+#define QT_FUNCTION_TARGET_STRING_ARCH_BDW QT_FUNCTION_TARGET_STRING_ARCH_HSW ",adx"
- #define QT_FUNCTION_TARGET_STRING_ARCH_BDX QT_FUNCTION_TARGET_STRING_ARCH_BDW
- #define QT_FUNCTION_TARGET_STRING_ARCH_SKL QT_FUNCTION_TARGET_STRING_ARCH_BDW ",xsavec,xsaves"
- #define QT_FUNCTION_TARGET_STRING_ARCH_SKX QT_FUNCTION_TARGET_STRING_ARCH_SKL ",avx512f,avx512dq,avx512cd,avx512bw,avx512vl"
-@@ -473,9 +471,9 @@
- CpuArchNHM = cpu_nhm,
- CpuArchWSM = cpu_wsm,
- CpuArchSNB = cpu_snb,
-- CpuArchIVB = cpu_ivb,
-+ CpuArchIVB = cpu_ivb, ///< rdrnd
- CpuArchHSW = cpu_hsw, ///< hle,rtm
-- CpuArchBDW = cpu_bdw,
-+ CpuArchBDW = cpu_bdw, ///< rdseed
- CpuArchBDX = cpu_bdx,
- CpuArchSKL = cpu_skl,
- CpuArchSKX = cpu_skx, ///< clwb
---- a/util/x86simdgen/3rdparty/simd-intel.conf
-+++ b/util/x86simdgen/3rdparty/simd-intel.conf
-@@ -142,9 +142,9 @@
- arch=NHM Core2 sse4.1,sse4.2,popcnt
- arch=WSM NHM
- arch=SNB WSM avx
--arch=IVB SNB f16c,rdrnd,fsgsbase
-+arch=IVB SNB f16c,fsgsbase # rdrnd
- arch=HSW IVB avx2,fma,bmi,bmi2,lzcnt,movbe # hle,rtm
--arch=BDW HSW adx,rdseed
-+arch=BDW HSW adx # rdseed
- arch=BDX BDW
- arch=SKL BDW xsavec,xsaves
- arch=SKX SKL avx512f,avx512dq,avx512cd,avx512bw,avx512vl #clwb
diff --git a/dev-qt/qtbase/files/qtbase-6.7.2-qcontiguouscache.patch b/dev-qt/qtbase/files/qtbase-6.7.2-qcontiguouscache.patch
deleted file mode 100644
index 02219fe..0000000
--- a/dev-qt/qtbase/files/qtbase-6.7.2-qcontiguouscache.patch
+++ /dev/null
@@ -1,8 +0,0 @@
-https://bugs.gentoo.org/938475
-Older version of https://codereview.qt-project.org/c/qt/qtbase/+/585668 for 6.7
---- a/src/corelib/tools/qcontiguouscache.h
-+++ b/src/corelib/tools/qcontiguouscache.h
-@@ -10,2 +10,3 @@
- #include <QtCore/qtcoreexports.h>
-+#include <QtCore/qglobal.h>
- #include <QtCore/qtypeinfo.h>
diff --git a/dev-qt/qtbase/files/qtbase-6.7.2-qwindowprivate-crash.patch b/dev-qt/qtbase/files/qtbase-6.7.2-qwindowprivate-crash.patch
deleted file mode 100644
index 3533839..0000000
--- a/dev-qt/qtbase/files/qtbase-6.7.2-qwindowprivate-crash.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-https://bugs.kde.org/show_bug.cgi?id=490791
-https://codereview.qt-project.org/c/qt/qtbase/+/584636
-From: David Edmundson <davidedmundson@kde.org>
-Date: Wed, 31 Jul 2024 11:59:14 +0100
-Subject: [PATCH] QWidget: Store initialScreen as QPointer
-
-A Toplevel QWidget can hold a pointer to the screen where it will
-eventually show contents, before a QWidgetWindow is created which then
-takes precedence.
-
-The screen member of QWindows is always kept up-to-date when a screen is
-removed, but not the contents of a toplevel window. If a widget has
-setScreen called but is never shown, it has potentially dangling pointer
-which can cause issues in the future.
-
-Pick-to: 6.5
-Change-Id: Ia7c80549e8b3c90a75cdde745487e87ecddaca63
-Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-(cherry picked from commit d67acf94afffde6a71498be6e30447f3acf7558e)
-Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-(cherry picked from commit 6af4e5f604fff40cdb3be40099b8884362806ef4)
---- a/src/widgets/kernel/qwidget_p.h
-+++ b/src/widgets/kernel/qwidget_p.h
-@@ -110,3 +110,3 @@
- Qt::WindowFlags savedFlags; // Save widget flags while showing fullscreen
-- QScreen *initialScreen; // Screen when passing a QDesktop[Screen]Widget as parent.
-+ QPointer<QScreen> initialScreen; // Screen when passing a QDesktop[Screen]Widget as parent.
-
diff --git a/dev-qt/qtbase/files/qtbase-6.7.3-QTBUG-125053.patch b/dev-qt/qtbase/files/qtbase-6.7.3-QTBUG-125053.patch
deleted file mode 100644
index fc60e30..0000000
--- a/dev-qt/qtbase/files/qtbase-6.7.3-QTBUG-125053.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-https://bugreports.qt.io/browse/QTBUG-125053
-https://bugreports.qt.io/browse/QTBUG-127340
-https://codereview.qt-project.org/c/qt/qtbase/+/593123
---- a/src/corelib/itemmodels/qabstractitemmodel.cpp
-+++ b/src/corelib/itemmodels/qabstractitemmodel.cpp
-@@ -3396,4 +3396,11 @@
- void QAbstractItemModel::beginResetModel()
- {
-+ Q_D(QAbstractItemModel);
-+ if (d->resetting) {
-+ qWarning() << "beginResetModel called on" << this << "without calling endResetModel first";
-+ // Warn, but don't return early in case user code relies on the incorrect behavior.
-+ }
-+
-+ d->resetting = true;
- emit modelAboutToBeReset(QPrivateSignal());
- }
-@@ -3413,6 +3420,12 @@
- {
- Q_D(QAbstractItemModel);
-+ if (!d->resetting) {
-+ qWarning() << "endResetModel called on" << this << "without calling beginResetModel first";
-+ // Warn, but don't return early in case user code relies on the incorrect behavior.
-+ }
-+
- d->invalidatePersistentIndexes();
- resetInternalData();
-+ d->resetting = false;
- emit modelReset(QPrivateSignal());
- }
---- a/src/corelib/itemmodels/qabstractitemmodel_p.h
-+++ b/src/corelib/itemmodels/qabstractitemmodel_p.h
-@@ -46,4 +46,6 @@
- ~QAbstractItemModelPrivate();
-
-+ static const QAbstractItemModelPrivate *get(const QAbstractItemModel *model) { return model->d_func(); }
-+
- void removePersistentIndexData(QPersistentModelIndexData *data);
- void movePersistentIndexes(const QList<QPersistentModelIndexData *> &indexes, int change, const QModelIndex &parent,
-@@ -116,4 +118,6 @@
- } persistent;
-
-+ bool resetting = false;
-+
- static const QHash<int,QByteArray> &defaultRoleNames();
- static bool isVariantLessThan(const QVariant &left, const QVariant &right,
diff --git a/dev-qt/qtbase/files/qtbase-6.7.3-erratic-mouse-input.patch b/dev-qt/qtbase/files/qtbase-6.7.3-erratic-mouse-input.patch
deleted file mode 100644
index 14bdf14..0000000
--- a/dev-qt/qtbase/files/qtbase-6.7.3-erratic-mouse-input.patch
+++ /dev/null
@@ -1,156 +0,0 @@
-https://bugreports.qt.io/browse/QTBUG-129509
-https://bugreports.qt.io/browse/QTBUG-129514
-https://codereview.qt-project.org/c/qt/qtbase/+/594889
-From 42845904d51ad14b2ab41a165bd9b9b1a9459840 Mon Sep 17 00:00:00 2001
-From: Liang Qi <liang.qi@qt.io>
-Date: Tue, 01 Oct 2024 12:46:30 +0200
-Subject: [PATCH] Revert "xcb: handle XI2 input button and motion events from slave devices"
-
-This reverts commit b71be292780b858f2c55ce92601452e2ea946de2, which causes a regression when using mouse wheel and moving cursor together
-on scroll bar for some qt applications, like qutebrowser and
-qbittorrent.
-
-Fixes: QTBUG-129509
-Fixes: QTBUG-129514
-Task-number: QTBUG-110841
-Pick-to: 6.8.0 6.8 6.7 6.5 6.2 5.15
-Change-Id: I703158874413a1306ea99217bced4ba38382f543
---- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
-+++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
-@@ -683,94 +683,21 @@
- }
-
--//implementation is ported from https://codereview.qt-project.org/c/qt/qtbase/+/231552/12/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp#558
--namespace {
--
--/*! \internal
--
-- Qt listens for XIAllDevices to avoid losing mouse events. This function
-- ensures that we don't process the same event twice: from a slave device and
-- then again from a master device.
--
-- In a normal use case (e.g. mouse press and release inside a window), we will
-- drop events from master devices as duplicates. Other advantage of processing
-- events from slave devices is that they don't share button state. All buttons
-- on a master device share the state.
--
-- Examples of special cases:
--
--\list
--
--\li During system move/resize, window manager (_NET_WM_MOVERESIZE) grabs the
-- master pointer, in this case we process the matching release from the slave
-- device. A master device event is not sent by the server, hence no duplicate
-- event to drop. If we listened for XIAllMasterDevices instead, we would never
-- see a release event in this case.
--
--\li If we dismiss a context menu by clicking somewhere outside a Qt application,
-- we will process the mouse press from the master pointer as that is the
-- device we are grabbing. We are not grabbing slave devices (grabbing on the
-- slave device is buggy according to 19d289ab1b5bde3e136765e5432b5c7d004df3a4).
-- And since the event occurs outside our window, the slave device event is
-- not sent to us by the server, hence no duplicate event to drop.
--
--\endlist
--*/
--bool isDuplicateEvent(xcb_ge_event_t *event)
--{
-- Q_ASSERT(event);
--
-- struct qXIEvent {
-- bool isValid = false;
-- uint16_t sourceid;
-- uint8_t evtype;
-- uint32_t detail;
-- int32_t root_x;
-- int32_t root_y;
-- };
-- static qXIEvent lastSeenEvent;
--
-- bool isDuplicate = false;
-- auto *xiDeviceEvent = reinterpret_cast<qt_xcb_input_device_event_t *>(event);
-- if (lastSeenEvent.isValid) {
-- isDuplicate = lastSeenEvent.sourceid == xiDeviceEvent->sourceid &&
-- lastSeenEvent.evtype == xiDeviceEvent->event_type &&
-- lastSeenEvent.detail == xiDeviceEvent->detail &&
-- lastSeenEvent.root_x == xiDeviceEvent->root_x &&
-- lastSeenEvent.root_y == xiDeviceEvent->root_y;
-- } else {
-- lastSeenEvent.isValid = true;
-- }
-- lastSeenEvent.sourceid = xiDeviceEvent->sourceid;
-- lastSeenEvent.evtype = xiDeviceEvent->event_type;
-- lastSeenEvent.detail = xiDeviceEvent->detail;
-- lastSeenEvent.root_x = xiDeviceEvent->root_x;
-- lastSeenEvent.root_y = xiDeviceEvent->root_y;
--
-- if (isDuplicate) {
-- qCDebug(lcQpaXInputEvents, "Duplicate XI2 event %d", event->event_type);
-- // This sanity check ensures that special cases like QTBUG-59277 keep working.
-- lastSeenEvent.isValid = false; // An event can be a duplicate only once.
-- }
--
-- return isDuplicate;
--}
--
--} // namespace
--
- void QXcbConnection::xi2HandleEvent(xcb_ge_event_t *event)
- {
- auto *xiEvent = reinterpret_cast<qt_xcb_input_device_event_t *>(event);
-- if (m_xiSlavePointerIds.contains(xiEvent->deviceid)) {
-- if (!(xiEvent->event_type == XCB_INPUT_BUTTON_PRESS
-- || xiEvent->event_type == XCB_INPUT_BUTTON_RELEASE
-- || xiEvent->event_type == XCB_INPUT_MOTION)) {
-- if (!m_duringSystemMoveResize)
-- return;
-- if (xiEvent->event == XCB_NONE)
-- return;
--
-- if (xiEvent->event_type == XCB_INPUT_TOUCH_END)
-- abortSystemMoveResize(xiEvent->event);
-+ setTime(xiEvent->time);
-+ if (m_xiSlavePointerIds.contains(xiEvent->deviceid) && xiEvent->event_type != XCB_INPUT_PROPERTY) {
-+ if (!m_duringSystemMoveResize)
-+ return;
-+ if (xiEvent->event == XCB_NONE)
-+ return;
-
-+ if (xiEvent->event_type == XCB_INPUT_BUTTON_RELEASE
-+ && xiEvent->detail == XCB_BUTTON_INDEX_1 ) {
-+ abortSystemMoveResize(xiEvent->event);
-+ } else if (xiEvent->event_type == XCB_INPUT_TOUCH_END) {
-+ abortSystemMoveResize(xiEvent->event);
-+ return;
-+ } else {
- return;
- }
-@@ -784,25 +711,9 @@
- case XCB_INPUT_BUTTON_PRESS:
- case XCB_INPUT_BUTTON_RELEASE:
-- case XCB_INPUT_MOTION: {
-- if (isDuplicateEvent(event))
-- return;
-- if (m_xiSlavePointerIds.contains(xiEvent->deviceid)) {
-- if (m_duringSystemMoveResize) {
-- if (xiEvent->event_type == XCB_INPUT_BUTTON_RELEASE
-- && xiEvent->detail == XCB_BUTTON_INDEX_1 ) {
-- abortSystemMoveResize(xiEvent->event);
-- } else {
-- return;
-- }
-- }
-- }
-- xiDeviceEvent = xiEvent;
-- eventListener = windowEventListenerFromId(xiDeviceEvent->event);
-- sourceDeviceId = xiDeviceEvent->sourceid; // use the actual device id instead of the master
-- break;
-- }
-+ case XCB_INPUT_MOTION:
- case XCB_INPUT_TOUCH_BEGIN:
- case XCB_INPUT_TOUCH_UPDATE:
-- case XCB_INPUT_TOUCH_END: {
-+ case XCB_INPUT_TOUCH_END:
-+ {
- xiDeviceEvent = xiEvent;
- eventListener = windowEventListenerFromId(xiDeviceEvent->event);
diff --git a/dev-qt/qtbase/files/qtbase-6.8.2-QTBUG-133500.patch b/dev-qt/qtbase/files/qtbase-6.8.2-QTBUG-133500.patch
new file mode 100644
index 0000000..89a388e
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.8.2-QTBUG-133500.patch
@@ -0,0 +1,58 @@
+Combined backport of [1][2][3] from upcoming Qt 6.8.3 for [4][5][6].
+
+[1] https://github.com/qt/qtbase/commit/12d4bf1ab52748cb84894f50d437064b439e0b7d
+[2] https://github.com/qt/qtbase/commit/2ef615228bba9a8eb282437bfb7472f925610e89
+[3] https://github.com/qt/qtbase/commit/a43c7e58046604796aa69974ea1c5d3e2648c755
+[4] https://bugreports.qt.io/browse/QTBUG-133206
+[5] https://bugreports.qt.io/browse/QTBUG-133500
+[6] https://bugs.kde.org/show_bug.cgi?id=499537
+--- a/src/corelib/global/qlibraryinfo.cpp
++++ b/src/corelib/global/qlibraryinfo.cpp
+@@ -7,4 +7,5 @@
+ #include "qfile.h"
+ #if QT_CONFIG(settings)
++#include "qresource.h"
+ #include "qsettings.h"
+ #endif
+@@ -104,5 +105,5 @@
+
+ QString qtconfig = QStringLiteral(":/qt/etc/qt.conf");
+- if (QFile::exists(qtconfig))
++ if (QResource(qtconfig, QLocale::c()).isValid())
+ return std::make_unique<QSettings>(qtconfig, QSettings::IniFormat);
+ #ifdef Q_OS_DARWIN
+--- a/src/corelib/text/qlocale.cpp
++++ b/src/corelib/text/qlocale.cpp
+@@ -1113,8 +1113,11 @@
+
+ QLocale::QLocale()
+- : d(*defaultLocalePrivate)
++ : d(c_private())
+ {
+- // Make sure system data is up to date:
+- systemData();
++ if (!defaultLocalePrivate.isDestroyed()) {
++ // Make sure system data is up to date:
++ systemData();
++ d = *defaultLocalePrivate;
++ }
+ }
+
+--- a/src/corelib/text/qlocale_unix.cpp
++++ b/src/corelib/text/qlocale_unix.cpp
+@@ -128,4 +128,6 @@
+ {
+ QSystemLocaleData *d = qSystemLocaleData();
++ if (!d)
++ return QVariant();
+
+ if (type == LocaleChanged) {
+--- a/src/corelib/text/qlocale_win.cpp
++++ b/src/corelib/text/qlocale_win.cpp
+@@ -829,4 +829,6 @@
+ {
+ QSystemLocalePrivate *d = systemLocalePrivate();
++ if (!d)
++ return QVariant();
+ switch(type) {
+ case DecimalPoint:
diff --git a/dev-qt/qtbase/qtbase-6.7.2-r5.ebuild b/dev-qt/qtbase/qtbase-6.7.2-r5.ebuild
deleted file mode 100644
index 1fb2d47..0000000
--- a/dev-qt/qtbase/qtbase-6.7.2-r5.ebuild
+++ /dev/null
@@ -1,366 +0,0 @@
-# Copyright 2021-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit flag-o-matic qt6-build toolchain-funcs
-
-DESCRIPTION="Cross-platform application development framework"
-
-if [[ ${QT6_BUILD_TYPE} == release ]]; then
- KEYWORDS="amd64 arm arm64 ~hppa ~loong ppc ppc64 ~riscv x86"
-fi
-
-declare -A QT6_IUSE=(
- [global]="+ssl +udev zstd"
- [core]="icu journald syslog"
- [modules]="+concurrent +dbus +gui +network +sql +xml"
-
- [gui]="
- +X accessibility eglfs evdev gles2-only +libinput
- opengl renderdoc tslib vulkan wayland +widgets
- "
- [network]="brotli gssapi libproxy sctp"
- [sql]="mysql oci8 odbc postgres +sqlite"
- [widgets]="cups gtk"
-
- [optfeature]="nls" #810802
-)
-IUSE="${QT6_IUSE[*]}"
-REQUIRED_USE="
- ?? ( journald syslog )
- $(
- printf '%s? ( gui ) ' ${QT6_IUSE[gui]//+/}
- printf '%s? ( network ) ' ${QT6_IUSE[network]//+/}
- printf '%s? ( sql ) ' ${QT6_IUSE[sql]//+/}
- printf '%s? ( gui widgets ) ' ${QT6_IUSE[widgets]//+/}
- )
- accessibility? ( dbus )
- eglfs? ( opengl )
- gles2-only? ( opengl )
- gui? ( || ( X eglfs wayland ) )
- libinput? ( udev )
- sql? ( || ( ${QT6_IUSE[sql]//+/} ) )
- test? ( icu sql? ( sqlite ) )
-"
-
-# groups:
-# - global (configure.cmake)
-# - qtcore (src/corelib/configure.cmake)
-# - qtgui (src/gui/configure.cmake)
-# - qtnetwork (src/network/configure.cmake)
-# - qtprintsupport (src/printsupport/configure.cmake) [gui+widgets]
-# - qtsql (src/plugins/sqldrivers/configure.cmake)
-# nolink: renderdoc, systemd
-COMMON_DEPEND="
- sys-libs/zlib:=
- ssl? ( dev-libs/openssl:= )
- udev? ( virtual/libudev:= )
- zstd? ( app-arch/zstd:= )
-
- app-crypt/libb2
- dev-libs/double-conversion:=
- dev-libs/glib:2
- dev-libs/libpcre2:=[pcre16,unicode(+)]
- icu? ( dev-libs/icu:= )
- journald? ( sys-apps/systemd )
-
- dbus? ( sys-apps/dbus )
- gui? (
- media-libs/fontconfig
- media-libs/freetype:2
- media-libs/harfbuzz:=
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- x11-libs/libdrm
- x11-libs/libxkbcommon[X?]
- X? (
- x11-libs/libICE
- x11-libs/libSM
- x11-libs/libX11
- x11-libs/libxcb:=
- x11-libs/xcb-util-cursor
- x11-libs/xcb-util-image
- x11-libs/xcb-util-keysyms
- x11-libs/xcb-util-renderutil
- x11-libs/xcb-util-wm
- )
- accessibility? ( app-accessibility/at-spi2-core:2 )
- eglfs? ( media-libs/mesa[gbm(+)] )
- evdev? ( sys-libs/mtdev )
- libinput? ( dev-libs/libinput:= )
- opengl? (
- gles2-only? ( media-libs/libglvnd )
- !gles2-only? ( media-libs/libglvnd[X?] )
- )
- renderdoc? ( media-gfx/renderdoc )
- tslib? ( x11-libs/tslib )
- widgets? (
- cups? ( net-print/cups )
- gtk? (
- x11-libs/gdk-pixbuf:2
- >=x11-libs/gtk+-3.24.41-r1:3[X?,wayland?]
- x11-libs/pango
- )
- )
- )
- network? (
- brotli? ( app-arch/brotli:= )
- gssapi? ( virtual/krb5 )
- libproxy? ( net-libs/libproxy )
- )
- sql? (
- mysql? ( dev-db/mysql-connector-c:= )
- oci8? ( dev-db/oracle-instantclient:=[sdk] )
- odbc? ( dev-db/unixODBC )
- postgres? ( dev-db/postgresql:* )
- sqlite? ( dev-db/sqlite:3 )
- )
-"
-RDEPEND="
- ${COMMON_DEPEND}
- syslog? ( virtual/logger )
-"
-DEPEND="
- ${COMMON_DEPEND}
- X? ( x11-base/xorg-proto )
- gui? (
- vulkan? ( dev-util/vulkan-headers )
- )
- network? (
- sctp? ( net-misc/lksctp-tools )
- )
- test? (
- elibc_musl? ( sys-libs/timezone-data )
- )
-"
-BDEPEND="zstd? ( app-arch/libarchive[zstd] )" #910392
-PDEPEND="
- nls? ( ~dev-qt/qttranslations-${PV}:6 )
- wayland? ( ~dev-qt/qtwayland-${PV}:6 )
-"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-6.6.0-libressl.patch
- "${FILESDIR}"/${PN}-6.5.2-hppa-forkfd-grow-stack.patch
- "${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
- "${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
- "${FILESDIR}"/${PN}-6.6.3-gcc14-avx512fp16.patch
- "${FILESDIR}"/${PN}-6.7.2-CVE-2024-39936.patch
- "${FILESDIR}"/${PN}-6.7.2-gcc15-odr.patch
- "${FILESDIR}"/${PN}-6.7.2-float16-sse2.patch
- "${FILESDIR}"/${PN}-6.7.2-qwindowprivate-crash.patch
- "${FILESDIR}"/${PN}-6.7.2-qcontiguouscache.patch
- "${FILESDIR}"/${PN}-6.7.2-haswell-no-rdrnd.patch
-)
-
-src_prepare() {
- qt6-build_src_prepare
-
- if use test; then
- # test itself has -Werror=strict-aliasing issues, drop for simplicity
- sed -e '/add_subdirectory(qsharedpointer)/d' \
- -i tests/auto/corelib/tools/CMakeLists.txt || die
-
- # workaround for __extendhfxf2 being used for tst_qfloat16.cpp
- # which is unavailable with compiler-rt (assume used if clang)
- if tc-is-clang; then
- sed -e '/add_subdirectory(qfloat16)/d' \
- -i tests/auto/corelib/global/CMakeLists.txt || die
- fi
- fi
-}
-
-src_configure() {
- # The only component that uses gdk backends is the qgtk3 platformtheme plugin
- if use gtk; then
- # defang automagic dependencies
- use wayland || append-cxxflags -DGENTOO_GTK_HIDE_WAYLAND
- use X || append-cxxflags -DGENTOO_GTK_HIDE_X11
- fi
-
- local mycmakeargs=(
- -DBUILD_WITH_PCH=OFF
-
- -DINSTALL_ARCHDATADIR="${QT6_ARCHDATADIR}"
- -DINSTALL_BINDIR="${QT6_BINDIR}"
- -DINSTALL_DATADIR="${QT6_DATADIR}"
- -DINSTALL_DOCDIR="${QT6_DOCDIR}"
- -DINSTALL_EXAMPLESDIR="${QT6_EXAMPLESDIR}"
- -DINSTALL_INCLUDEDIR="${QT6_HEADERDIR}"
- -DINSTALL_LIBDIR="${QT6_LIBDIR}"
- -DINSTALL_LIBEXECDIR="${QT6_LIBEXECDIR}"
- -DINSTALL_MKSPECSDIR="${QT6_MKSPECSDIR}"
- -DINSTALL_PLUGINSDIR="${QT6_PLUGINDIR}"
- -DINSTALL_QMLDIR="${QT6_QMLDIR}"
- -DINSTALL_SYSCONFDIR="${QT6_SYSCONFDIR}"
- -DINSTALL_TRANSLATIONSDIR="${QT6_TRANSLATIONDIR}"
-
- -DQT_UNITY_BUILD=ON # ~30% faster build, affects other dev-qt/* too
-
- -DQT_FEATURE_relocatable=OFF #927691
- $(qt_feature ssl openssl)
- $(qt_feature ssl openssl_linked)
- $(qt_feature udev libudev)
- $(qt_feature zstd)
-
- # qtcore
- $(qt_feature icu)
- $(qt_feature journald)
- $(qt_feature syslog)
-
- # tools
- -DQT_FEATURE_androiddeployqt=OFF
-
- # modules
- $(qt_feature concurrent)
- $(qt_feature dbus)
- $(qt_feature gui)
- $(qt_feature network)
- $(qt_feature sql)
- # trivial, and is often needed (sometimes even when not building tests)
- -DQT_FEATURE_testlib=ON
- $(qt_feature xml)
- )
-
- use gui && mycmakeargs+=(
- $(qt_feature X xcb)
- $(qt_feature X system_xcb_xinput)
- $(qt_feature X xkbcommon_x11)
- $(cmake_use_find_package X X11) # needed for truly no automagic
- $(qt_feature accessibility accessibility_atspi_bridge)
- $(qt_feature eglfs)
- $(qt_feature evdev)
- $(qt_feature evdev mtdev)
- $(qt_feature libinput)
- $(qt_feature renderdoc graphicsframecapture)
- $(qt_feature tslib)
- $(qt_feature vulkan)
- $(qt_feature wayland)
- $(qt_feature widgets)
- -DINPUT_opengl=$(usex opengl $(usex gles2-only es2 desktop) no)
- -DQT_FEATURE_system_textmarkdownreader=OFF # TODO?: package md4c
- ) && use widgets && mycmakeargs+=(
- # note: qtprintsupport is enabled w/ gui+widgets regardless of USE=cups
- $(qt_feature cups)
- $(qt_feature gtk gtk3)
- )
-
- use network && mycmakeargs+=(
- $(qt_feature brotli)
- $(qt_feature gssapi)
- $(qt_feature libproxy)
- $(qt_feature sctp)
- $(usev test -DQT_SKIP_DOCKER_COMPOSE=ON)
- -DQT_FEATURE_dtls=OFF # Required for LibreSSL
- )
-
- use sql && mycmakeargs+=(
- -DQT_FEATURE_sql_db2=OFF # unpackaged
- -DQT_FEATURE_sql_ibase=OFF # unpackaged
- -DQT_FEATURE_sql_mimer=OFF # unpackaged
- $(qt_feature mysql sql_mysql)
- $(qt_feature oci8 sql_oci)
- $(usev oci8 -DOracle_ROOT="${ESYSROOT}"/usr/$(get_libdir)/oracle/client)
- $(qt_feature odbc sql_odbc)
- $(qt_feature postgres sql_psql)
- $(qt_feature sqlite sql_sqlite)
- $(qt_feature sqlite system_sqlite)
- )
-
- qt6-build_src_configure
-}
-
-src_test() {
- local -x TZ=UTC
- local -x LC_TIME=C
-
- local CMAKE_SKIP_TESTS=(
- # broken with out-of-source + if qtbase is not already installed
- tst_moc
- tst_qmake
- # similarly broken when relocatable=OFF (bug #927691)
- tst_qapplication
- tst_qt_cmake_create
- tst_uic
- # needs x11/opengl, we *could* run these but tend to be flaky
- # when opengl rendering is involved (even if software-only)
- tst_qopengl{,config,widget,window}
- tst_qgraphicsview
- tst_qx11info
- # fails with network sandbox
- tst_qdnslookup
- # fails with sandbox
- tst_qsharedmemory
- # typical to lack SCTP support on non-generic kernels
- tst_qsctpsocket
- # randomly fails without -j1, and not worth it over this (bug #916181)
- tst_qfiledialog{,2}
- # may randomly hang+timeout, perhaps related to -j as well
- tst_qprocess #936484
- tst_qtimer
- # these can be flaky depending on the environment/toolchain
- tst_qlogging # backtrace log test can easily vary
- tst_q{,raw}font # affected by available fonts / settings (bug #914737)
- tst_qprinter # checks system's printers (bug #916216)
- tst_qhighdpi # may detect users' settings and fail (bug #935364)
- tst_qstorageinfo # checks mounted filesystems
- # flaky due to using different test framework and fails with USE=-gui
- tst_selftests
- # known failing when using clang+glibc+stdc++, needs looking into
- tst_qthread
- # partially failing on x86 chroots and seemingly(?) harmless (dev-qt
- # revdeps tests pass), skip globally to avoid keywording flakiness
- tst_json
- tst_qcolorspace
- tst_qdoublevalidator
- tst_qglobal
- tst_qglyphrun
- tst_qvectornd
- tst_rcc
- # similarly, but on armv7 and potentially others (bug #914028)
- tst_qlineedit
- tst_qpainter
- # likewise, known failing on BE arches (bug #914033,914371,918878)
- tst_qimagereader
- tst_qimagewriter
- tst_qpluginloader
- tst_quuid # >=6.6.2 had related fixes, needs retesting
- # partially broken on llvm-musl, needs looking into but skip to have
- # a baseline for regressions (rest of dev-qt still passes with musl)
- $(usev elibc_musl '
- tst_qicoimageformat
- tst_qimagereader
- tst_qimage
- ')
- # fails due to hppa's NaN handling, needs looking into (bug #914371)
- $(usev hppa '
- tst_qcborvalue
- tst_qnumeric
- ')
- # note: for linux, upstream only really runs+maintains tests for amd64
- # https://doc.qt.io/qt-6/supported-platforms.html
- )
-
- qt6-build_src_test
-}
-
-src_install() {
- qt6-build_src_install
-
- if use test; then
- local delete_bins=( # need a better way to handle this
- clientserver copier crashingServer desktopsettingsaware_helper
- echo fileWriterProcess modal_helper nospace 'one space'
- paster qcommandlineparser_test_helper qfileopeneventexternal
- socketprocess syslocaleapp tst_qhashseed_helper 'two space s'
- write-read-write
- )
- local delete=( # sigh
- "${D}${QT6_BINDIR}"/test*
- "${delete_bins[@]/#/${D}${QT6_BINDIR}/}"
- )
- # using -f given not tracking which tests may be skipped or not
- rm -rf -- "${delete[@]}" || die
- fi
-}
diff --git a/dev-qt/qtbase/qtbase-6.7.3-r2.ebuild b/dev-qt/qtbase/qtbase-6.8.2-r1.ebuild
index 32da29a..25f54df 100644
--- a/dev-qt/qtbase/qtbase-6.7.3-r2.ebuild
+++ b/dev-qt/qtbase/qtbase-6.8.2-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2021-2024 Gentoo Authors
+# Copyright 2021-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -8,7 +8,7 @@ inherit flag-o-matic qt6-build toolchain-funcs
DESCRIPTION="Cross-platform application development framework"
if [[ ${QT6_BUILD_TYPE} == release ]]; then
- KEYWORDS="amd64 arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv x86"
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~x86"
fi
declare -A QT6_IUSE=(
@@ -146,10 +146,8 @@ PATCHES=(
"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
"${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
"${FILESDIR}"/${PN}-6.6.3-gcc14-avx512fp16.patch
- "${FILESDIR}"/${PN}-6.7.2-qcontiguouscache.patch
- "${FILESDIR}"/${PN}-6.7.2-haswell-no-rdrnd.patch
- "${FILESDIR}"/${PN}-6.7.3-erratic-mouse-input.patch
- "${FILESDIR}"/${PN}-6.7.3-QTBUG-125053.patch
+ "${FILESDIR}"/${PN}-6.8.0-qcontiguouscache.patch
+ "${FILESDIR}"/${P}-QTBUG-133500.patch
)
src_prepare() {
@@ -218,6 +216,18 @@ src_configure() {
# trivial, and is often needed (sometimes even when not building tests)
-DQT_FEATURE_testlib=ON
$(qt_feature xml)
+
+ # let gentoo's defaults and/or users control security *FLAGS
+ -DQT_FEATURE_glibc_fortify_source=OFF
+ -DQT_FEATURE_intelcet=OFF
+ -DQT_FEATURE_libcpp_hardening=OFF
+ -DQT_FEATURE_libstdcpp_assertions=OFF
+ -DQT_FEATURE_relro_now_linker=OFF
+ -DQT_FEATURE_stack_clash_protection=OFF
+ -DQT_FEATURE_stack_protector=OFF
+ -DQT_FEATURE_trivial_auto_var_init_pattern=OFF
+
+ -DQT_INTERNAL_AVOID_OVERRIDING_SYNCQT_CONFIG=ON # would force -O3
)
use gui && mycmakeargs+=(
@@ -296,6 +306,8 @@ src_test() {
# may randomly hang+timeout, perhaps related to -j as well
tst_qprocess #936484
tst_qtimer
+ # haystacksWithMoreThan4GiBWork can easily OOM (16GB ram not enough)
+ tst_qlatin1stringmatcher
# these can be flaky depending on the environment/toolchain
tst_qlogging # backtrace log test can easily vary
tst_q{,raw}font # affected by available fonts / settings (bug #914737)
diff --git a/dev-util/maturin/maturin-1.8.1.ebuild b/dev-util/maturin/maturin-1.8.1.ebuild
index 8fdcb07..285214c 100644
--- a/dev-util/maturin/maturin-1.8.1.ebuild
+++ b/dev-util/maturin/maturin-1.8.1.ebuild
@@ -24,7 +24,7 @@ LICENSE+="
MIT MPL-2.0 Unicode-3.0 Unicode-DFS-2016
" # crates
SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+KEYWORDS="amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc x86"
IUSE="doc +ssl test"
RESTRICT="!test? ( test )"
diff --git a/net-dialup/ppp/ppp-2.5.1-r1.ebuild b/net-dialup/ppp/ppp-2.5.1-r1.ebuild
index 0c79eed..f9f2d4a 100644
--- a/net-dialup/ppp/ppp-2.5.1-r1.ebuild
+++ b/net-dialup/ppp/ppp-2.5.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -11,7 +11,7 @@ SRC_URI="https://download.samba.org/pub/ppp/${P}.tar.gz"
LICENSE="BSD GPL-2"
SLOT="0/${PV}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="activefilter atm gtk pam selinux systemd"
DEPEND="
@@ -72,7 +72,7 @@ src_prepare() {
}
src_configure() {
- # bug #944065
+ # https://bugs.gentoo.org/943931
append-cflags -std=gnu17
local args=(
diff --git a/net-libs/libssh/Manifest b/net-libs/libssh/Manifest
new file mode 100644
index 0000000..91230e1
--- /dev/null
+++ b/net-libs/libssh/Manifest
@@ -0,0 +1,4 @@
+AUX libssh-0.11.1-libressl.patch 951 BLAKE2B b7518de5335906e75a69f5c51f1360331495f883ebc35cc3d83f9c354cbc2d8554e6830fb57f1c718cf98643f2811ee50d3ae086b5604055c66263abc87d4bed SHA512 f98a9fdf45c5c05eaf098429a1735576b35909caa41123e19063100986e8e6ba0667af9eb6e842186ba3d7eade7f5ad009af4189d35335291e7a517918fd7aee
+DIST libssh-0.11.1.tar.xz 621108 BLAKE2B 87079b4eaf66ceb77803b3d854f847b3f3fb6a67ac3bfa756ebcf8f06bf2b313e976044e0a1d81227fb5278fb04bc56f1a82877d14a6ee76bec0c690b14f38a7 SHA512 284d376ad9ea30b0274b4ac754b27d168286dca862ece43ef15ca6d89e66865ad7a6703cc12dd4a8564a60b8449ae9b36e6496fd51d34cc27ac4030f6cf216d6
+EBUILD libssh-0.11.1-r1.ebuild 3463 BLAKE2B e4e06d4276f435e83638ed7ffa2aa1a74abc329cf73e40b42476a3a2fade453e3c4d71fe5a9508807970044be52997a8a41ca4d32349c7e0d54a7401e833d6a1 SHA512 d10df56baad19f88d789988b7865299eb5dd70c6c8ce437403137eec2faf8418d030a5dbfcd3510ced605ce31cc4fc283f3deded75e7462c4251cb8768968d56
+MISC metadata.xml 704 BLAKE2B 5a3e9f32decb26a947dc4c51845cb8979ee071e90782367d1f0bec0eb89b54f0374bc0943e4cefcfbd5c0033bca49f613824c31f302873cccd14fdbc15eb696e SHA512 6b6fc79261d7e7d921be1b7f288a5207d5d95ba36b93db3719e39527ef6036716698412bc7fb214667040e6ca0651aedb0b09ee726e3351af44fab9ce64bdd6a
diff --git a/net-libs/libssh/files/libssh-0.11.1-libressl.patch b/net-libs/libssh/files/libssh-0.11.1-libressl.patch
new file mode 100644
index 0000000..b4e4b73
--- /dev/null
+++ b/net-libs/libssh/files/libssh-0.11.1-libressl.patch
@@ -0,0 +1,28 @@
+https://github.com/openbsd/ports/blob/5a722226e826c40b57b2d67b36b2d3221eeb3069/security/libssh/patches/patch-ConfigureChecks_cmake
+
+We have EVP_chacha20 but not EVP_PKEY_POLY1305 so the code using it
+fails.
+
+Fix exit code.
+
+Index: ConfigureChecks.cmake
+--- a/ConfigureChecks.cmake.orig
++++ b/ConfigureChecks.cmake
+@@ -102,7 +102,7 @@ if (OPENSSL_FOUND)
+ check_function_exists(EVP_KDF_CTX_new HAVE_OPENSSL_EVP_KDF_CTX_NEW)
+ check_function_exists(FIPS_mode HAVE_OPENSSL_FIPS_MODE)
+ check_function_exists(RAND_priv_bytes HAVE_OPENSSL_RAND_PRIV_BYTES)
+- check_function_exists(EVP_chacha20 HAVE_OPENSSL_EVP_CHACHA20)
++ #check_function_exists(EVP_chacha20 HAVE_OPENSSL_EVP_CHACHA20)
+
+ unset(CMAKE_REQUIRED_INCLUDES)
+ unset(CMAKE_REQUIRED_LIBRARIES)
+@@ -261,7 +261,7 @@ check_c_source_compiles("
+ __thread int tls;
+
+ int main(void) {
+- return 0;
++ return tls;
+ }" HAVE_GCC_THREAD_LOCAL_STORAGE)
+
+ check_c_source_compiles("
diff --git a/net-libs/libssh/libssh-0.11.1-r1.ebuild b/net-libs/libssh/libssh-0.11.1-r1.ebuild
new file mode 100644
index 0000000..5a5eee6
--- /dev/null
+++ b/net-libs/libssh/libssh-0.11.1-r1.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake-multilib
+
+DESCRIPTION="Access a working SSH implementation by means of a library"
+HOMEPAGE="https://www.libssh.org/"
+
+if [[ ${PV} == *9999* ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://git.libssh.org/projects/libssh.git"
+else
+ SRC_URI="https://www.libssh.org/files/$(ver_cut 1-2)/${P}.tar.xz"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0/4" # subslot = soname major version
+IUSE="debug doc examples gssapi mbedtls pcap server +sftp static-libs test zlib"
+# Maintainer: check IUSE-defaults at DefineOptions.cmake
+
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ !mbedtls? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] )
+ gssapi? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
+ mbedtls? ( net-libs/mbedtls:0=[${MULTILIB_USEDEP}] )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}
+ test? (
+ >=dev-util/cmocka-0.3.1[${MULTILIB_USEDEP}]
+ elibc_musl? ( sys-libs/argp-standalone )
+ )
+"
+BDEPEND="doc? ( app-text/doxygen[dot] )"
+
+DOCS=( AUTHORS CHANGELOG README )
+
+PATCHES=( "${FILESDIR}"/${PN}-0.11.1-libressl.patch )
+
+src_prepare() {
+ cmake_src_prepare
+
+ # just install the examples, do not compile them
+ cmake_comment_add_subdirectory examples
+
+ sed -e "/^check_include_file.*HAVE_VALGRIND_VALGRIND_H/s/^/#DONT /" \
+ -i ConfigureChecks.cmake || die
+
+ if use test; then
+ local skip_tests=(
+ # keyfile torture test is currently broken
+ -e "/torture_keyfiles/d"
+
+ # Tries to expand ~ which fails w/ portage homedir
+ # (torture_path_expand_tilde_unix and torture_config_make_absolute_no_sshdir)
+ -e "/torture_misc/d"
+ -e "/torture_config/d"
+ )
+
+ # Disable tests that take too long (bug #677006)
+ if use sparc; then
+ skip_tests+=(
+ -e "/torture_threads_pki_rsa/d"
+ -e "/torture_pki_dsa/d"
+ )
+ fi
+
+ if (( ${#skip_tests[@]} )) ; then
+ sed -i "${skip_tests[@]}" tests/unittests/CMakeLists.txt || die
+ fi
+
+ if use elibc_musl; then
+ sed -e "/SOLARIS/d" \
+ -i tests/CMakeLists.txt || die
+ fi
+ fi
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DWITH_NACL=OFF
+ -DWITH_STACK_PROTECTOR=OFF
+ -DWITH_STACK_PROTECTOR_STRONG=OFF
+ -DWITH_DEBUG_CALLTRACE=$(usex debug)
+ -DWITH_DEBUG_CRYPTO=$(usex debug)
+ -DWITH_GCRYPT=OFF
+ -DWITH_GSSAPI=$(usex gssapi)
+ -DWITH_MBEDTLS=$(usex mbedtls)
+ -DWITH_PCAP=$(usex pcap)
+ -DWITH_SERVER=$(usex server)
+ -DWITH_SFTP=$(usex sftp)
+ -DBUILD_STATIC_LIB=$(usex static-libs)
+ # TODO: try enabling {CLIENT,SERVER}_TESTING
+ -DUNIT_TESTING=$(usex test)
+ -DWITH_ZLIB=$(usex zlib)
+ )
+
+ multilib_is_native_abi || mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON )
+
+ cmake_src_configure
+}
+
+multilib_src_compile() {
+ cmake_src_compile
+ multilib_is_native_abi && use doc && cmake_src_compile docs
+}
+
+multilib_src_test() {
+ cmake_src_test --timeout 3000
+}
+
+multilib_src_install() {
+ cmake_src_install
+ multilib_is_native_abi && use doc && local HTML_DOCS=( "${BUILD_DIR}"/doc/html/. )
+
+ use static-libs && dolib.a src/libssh.a
+
+ # compatibility symlink until all consumers have been updated
+ # to no longer use libssh_threads.so
+ dosym libssh.so /usr/$(get_libdir)/libssh_threads.so
+}
+
+multilib_src_install_all() {
+ use mbedtls && DOCS+=( README.mbedtls )
+ einstalldocs
+
+ if use examples; then
+ docinto examples
+ dodoc examples/*.{c,h,cpp}
+ fi
+}
diff --git a/net-libs/libssh/metadata.xml b/net-libs/libssh/metadata.xml
new file mode 100644
index 0000000..4107f06
--- /dev/null
+++ b/net-libs/libssh/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>kde@gentoo.org</email>
+ <name>Gentoo KDE Project</name>
+ </maintainer>
+ <use>
+ <flag name="gssapi">Enable gssapi support</flag>
+ <flag name="mbedtls">Use <pkg>net-libs/mbedtls</pkg> as TLS provider</flag>
+ <flag name="pcap">Build with PCAP output support</flag>
+ <flag name="server">Build with SSH server support</flag>
+ <flag name="sftp">Build with SFTP support</flag>
+ </use>
+ <upstream>
+ <remote-id type="gitlab">libssh/libssh-mirror</remote-id>
+ <remote-id type="cpe">cpe:/a:libssh:libssh</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/curl/Manifest b/net-misc/curl/Manifest
index b6b6c4c..24f5ecb 100644
--- a/net-misc/curl/Manifest
+++ b/net-misc/curl/Manifest
@@ -1,8 +1,8 @@
DIST curl-8.10.1.tar.xz 2726748 BLAKE2B bfdfa24f6d652884044c5e8eea5d70daad651b46255c99c9df502f9595a2dcbf8c4034446becf9e87f8e8a3f397a8fda29ab3e0d6020ac0dae62dd42b8136b78 SHA512 f1c7a12492dcfb8ba08be69b96a83ce9074592cbaa6b95c72b3c16fc58ad35e9f9deec7b72baca7d360d013b0b1c7ea38bd4edae464903ac67aa3c76238d8c6c
DIST curl-8.10.1.tar.xz.asc 488 BLAKE2B 8e8f2b628d4e8964a76c1c43c5557aacbfc2d2dbc51be8a0fa1b157c257f15f29aedba842cba7cb270c4adcf0b4a5d9c8b0b3d49633c48b061fb3e1472303d66 SHA512 21d6d560c027efc9e3e5db182a77501d6376442221ba910df817e2ec980bee44a9fe2afc698205f8d5e8313ae47915a341d60206a46b46e816d73ee357a894ac
-DIST curl-8.11.0.tar.xz 2750684 BLAKE2B 3db13ed558bee332e07e1eab878b5ecae14cd049c115eea3a25fcb78cf28aadfe577dc224df75b62844529994ec478a9a74fed5c9bae338f809d231420ae5d0a SHA512 3a642d421e0a5c09ecb681bea18498f2c6124e9af4d8afdc074dfb85a9b0211d8972ade9cf00ab44b5dfed9303262cd83551dd3b5e0976d11fc19da3c4a0987e
-DIST curl-8.11.0.tar.xz.asc 488 BLAKE2B 5d91dc654d6a62c66e344ca92676b42e7a49f437e14f9fb714f7ae64a266d24d9bb7006b4512fc323459072ff0d9e05f627e494f34f845eadbedbd83acacc2ce SHA512 71073dde48e8f0013e392eb88bf70f6b8a4a4f0c955a3fb56db98e74aa10acc1004e2a0483f30be082e61b59a76fa75ae1d90545ace7c6b07bca8164078375f0
DIST curl-8.11.1.tar.xz 2751236 BLAKE2B a87ec2c78c5d6daf44eee4cf8e3ed124849d067f6c63145205fda18f33ddd3adce386058ead8f9b713f8e595f5e059acd13479eb00edc226247aabd3c2234112 SHA512 7c7c47a49505575b610c56b455f0919ea5082a993bf5483eeb258ead167aadb87078d626b343b417dcfc5439c53556425c8fb4fe3b01b53a87b47c01686a3e57
DIST curl-8.11.1.tar.xz.asc 488 BLAKE2B 53d58ebb8ab722d8394b7ce94b646c876324cd89b3e47d9129bddcfbb6db338c1dbe93a5e72a25caf7be9ddd450c2b0832cfee17beb8ba701bdeefe653235d53 SHA512 c09bedb67e83fb8ca3ad73c5bd0d92fed7fc2c26dbe5a71cccb193fd151c7219713241a9fe74baefcd1d008cfafba78142bf04cec24dd4a88d67179184d35824
+DIST curl-8.12.0.tar.xz 2777552 BLAKE2B b38c7465a38f6bbdc6daa1e8a27dc810f970c9172ddf532881e83965e1fa6001beff1bf358e5138e1a0ae1121d877f6a5a4f38ef7ea7e03c8b06dc46fbf24022 SHA512 ed35f0020541050ce387f4ba80f9e87562ececd99082da1bae85840dee81c49b86a4a55909e15fcbf4eb116106a796c29a9b2678dee11326f80db75992c6edc5
+DIST curl-8.12.0.tar.xz.asc 488 BLAKE2B 8977dabab96b6f188e8b16497e7a4e589f05b5512a9bc6ec0ee36797615c720b9cb5c34bc90df6ee037d898b8fa7f708ad2b2ff789163adcb5308a2e0d7cf9df SHA512 8526554ffb2187b48b6a4c6a0d4a8c73d484ef3ce4c3791add0e759baf953ac7ae0b2f88d688365b1f09c5745198611fa1761aa14d02ddf52823c4ff238779cd
DIST curl-8.9.1.tar.xz 2782364 BLAKE2B 6e38e20e2b03ab5bfbb8d9797442dfdd9644fc80d7b1f7c1efb1f44e0d730524e82ccf7413b2c6f4555bd61ae42f91ec7c0201e2c0d563811c85164aa234aada SHA512 a0fe234402875db194aad4e4208b7e67e7ffc1562622eea90948d4b9b0122c95c3dde8bbe2f7445a687cb3de7cb09f20e5819d424570442d976aa4c913227fc7
DIST curl-8.9.1.tar.xz.asc 488 BLAKE2B 437268f6e5ba5db73f205fd87f3ded1e5fc200e8bf63a83cdb7e21dfbf2f4a4620e598cd0bf5d8fa1548ade08d45b386599542cd988df46a238b85790409f42e SHA512 18acd58436d70900ab6912b84774da2c451b9dbfc83d6d00f85bbbe7894b67075918e58956fdb753fcc1486e4f10caa31139d7c68b037d7c83dc2e9c2fae9f9b
diff --git a/net-misc/curl/curl-8.10.1-r2.ebuild b/net-misc/curl/curl-8.10.1-r2.ebuild
index 65a1729..9dda829 100644
--- a/net-misc/curl/curl-8.10.1-r2.ebuild
+++ b/net-misc/curl/curl-8.10.1-r2.ebuild
@@ -29,7 +29,7 @@ SLOT="0"
IUSE="+adns +alt-svc brotli debug +ftp gnutls gopher +hsts +http2 +http3 idn +imap kerberos ldap mbedtls +openssl +pop3"
IUSE+=" +psl +progress-meter +quic rtmp rustls samba +smtp ssh ssl sslv3 static-libs test telnet +tftp +websockets zstd"
# These select the default tls implementation / which quic impl to use
-IUSE+=" +curl_quic_openssl curl_quic_ngtcp2 curl_ssl_gnutls curl_ssl_mbedtls +curl_ssl_openssl curl_ssl_rustls"
+IUSE+=" curl_quic_openssl +curl_quic_ngtcp2 curl_ssl_gnutls curl_ssl_mbedtls +curl_ssl_openssl curl_ssl_rustls"
RESTRICT="!test? ( test )"
# Only one default ssl / quic provider can be enabled
@@ -90,7 +90,7 @@ RDEPEND="
psl? ( net-libs/libpsl[${MULTILIB_USEDEP}] )
quic? (
curl_quic_openssl? ( >=dev-libs/openssl-3.3.0:=[quic,${MULTILIB_USEDEP}] )
- curl_quic_ngtcp2? ( >=net-libs/ngtcp2-1.2.0[ssl,${MULTILIB_USEDEP}] )
+ curl_quic_ngtcp2? ( >=net-libs/ngtcp2-1.2.0[ssl,openssl,${MULTILIB_USEDEP}] )
)
rtmp? ( media-video/rtmpdump[${MULTILIB_USEDEP}] )
ssh? ( >=net-libs/libssh2-1.0.0[${MULTILIB_USEDEP}] )
diff --git a/net-misc/curl/curl-8.11.1-r2.ebuild b/net-misc/curl/curl-8.11.1-r2.ebuild
index d9af3e3..5f68dfe 100644
--- a/net-misc/curl/curl-8.11.1-r2.ebuild
+++ b/net-misc/curl/curl-8.11.1-r2.ebuild
@@ -21,7 +21,7 @@ else
https://curl.se/download/${P}.tar.xz
verify-sig? ( https://curl.se/download/${P}.tar.xz.asc )
"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
LICENSE="BSD curl ISC test? ( BSD-4 )"
@@ -29,7 +29,7 @@ SLOT="0"
IUSE="+adns +alt-svc brotli debug +ftp gnutls gopher +hsts +http2 +http3 idn +imap kerberos ldap mbedtls +openssl +pop3"
IUSE+=" +psl +progress-meter +quic rtmp rustls samba +smtp ssh ssl sslv3 static-libs test telnet +tftp +websockets zstd"
# These select the default tls implementation / which quic impl to use
-IUSE+=" +curl_quic_openssl curl_quic_ngtcp2 curl_ssl_gnutls curl_ssl_mbedtls +curl_ssl_openssl curl_ssl_rustls"
+IUSE+=" curl_quic_openssl +curl_quic_ngtcp2 curl_ssl_gnutls curl_ssl_mbedtls +curl_ssl_openssl curl_ssl_rustls"
RESTRICT="!test? ( test )"
# Only one default ssl / quic provider can be enabled
@@ -90,7 +90,7 @@ RDEPEND="
psl? ( net-libs/libpsl[${MULTILIB_USEDEP}] )
quic? (
curl_quic_openssl? ( >=dev-libs/openssl-3.3.0:=[quic,${MULTILIB_USEDEP}] )
- curl_quic_ngtcp2? ( >=net-libs/ngtcp2-1.2.0[ssl,${MULTILIB_USEDEP}] )
+ curl_quic_ngtcp2? ( >=net-libs/ngtcp2-1.2.0[ssl,openssl,${MULTILIB_USEDEP}] )
)
rtmp? ( media-video/rtmpdump[${MULTILIB_USEDEP}] )
ssh? ( >=net-libs/libssh2-1.0.0[${MULTILIB_USEDEP}] )
diff --git a/net-misc/curl/curl-8.11.0-r1.ebuild b/net-misc/curl/curl-8.12.0-r1.ebuild
index ce9b05e..952ae72 100644
--- a/net-misc/curl/curl-8.11.0-r1.ebuild
+++ b/net-misc/curl/curl-8.12.0-r1.ebuild
@@ -29,7 +29,7 @@ SLOT="0"
IUSE="+adns +alt-svc brotli debug +ftp gnutls gopher +hsts +http2 +http3 idn +imap kerberos ldap mbedtls +openssl +pop3"
IUSE+=" +psl +progress-meter +quic rtmp rustls samba +smtp ssh ssl sslv3 static-libs test telnet +tftp +websockets zstd"
# These select the default tls implementation / which quic impl to use
-IUSE+=" +curl_quic_openssl curl_quic_ngtcp2 curl_ssl_gnutls curl_ssl_mbedtls +curl_ssl_openssl curl_ssl_rustls"
+IUSE+=" curl_quic_openssl +curl_quic_ngtcp2 curl_ssl_gnutls curl_ssl_mbedtls +curl_ssl_openssl curl_ssl_rustls"
RESTRICT="!test? ( test )"
# Only one default ssl / quic provider can be enabled
@@ -90,7 +90,7 @@ RDEPEND="
psl? ( net-libs/libpsl[${MULTILIB_USEDEP}] )
quic? (
curl_quic_openssl? ( >=dev-libs/openssl-3.3.0:=[quic,${MULTILIB_USEDEP}] )
- curl_quic_ngtcp2? ( >=net-libs/ngtcp2-1.2.0[ssl,${MULTILIB_USEDEP}] )
+ curl_quic_ngtcp2? ( >=net-libs/ngtcp2-1.2.0[ssl,openssl,${MULTILIB_USEDEP}] )
)
rtmp? ( media-video/rtmpdump[${MULTILIB_USEDEP}] )
ssh? ( >=net-libs/libssh2-1.0.0[${MULTILIB_USEDEP}] )
@@ -152,15 +152,9 @@ QA_CONFIG_IMPL_DECL_SKIP=(
)
PATCHES=(
- "${FILESDIR}/${PN}-prefix-3.patch"
+ "${FILESDIR}/${PN}-prefix-4.patch"
"${FILESDIR}/${PN}-respect-cflags-3.patch"
- "${FILESDIR}/${P}-cmdline-ech-docs.patch"
- "${FILESDIR}/${P}-curl-libssh-ipv6-brackets.patch"
- "${FILESDIR}/${P}-mbedtls-global-init.patch"
- "${FILESDIR}/${P}-setopt-http_content_decoding.patch"
- "${FILESDIR}/${P}-cookie-case-sensitive.patch"
- "${FILESDIR}/${P}-duphandle-init-netrc.patch"
- "${FILESDIR}/${P}-netrc-large-file.patch"
+ "${FILESDIR}/${P}-multi.patch"
)
src_prepare() {
@@ -273,15 +267,12 @@ multilib_src_configure() {
--enable-socketpair
--disable-sspi
$(use_enable static-libs static)
- --enable-pthreads
- --enable-threaded-resolver
--disable-versioned-symbols
--without-amissl
--without-bearssl
$(use_with brotli)
--with-fish-functions-dir="${EPREFIX}"/usr/share/fish/vendor_completions.d
$(use_with http2 nghttp2)
- --without-hyper
$(use_with idn libidn2)
$(use_with kerberos gssapi "${EPREFIX}"/usr)
--without-libgsasl
@@ -317,9 +308,17 @@ multilib_src_configure() {
)
fi
- if [[ ${CHOST} == *mingw* ]] ; then
+ # Since 8.12.0 adns/c-ares and the threaded resolver are mutually exclusive
+ # This is in support of some work to enable `httpsrr` to use adns and the rest
+ # of curl to use the threaded resolver; we'll just make `httpsrr` conditional on adns
+ # when the time comes.
+ if use adns; then
myconf+=(
- --disable-pthreads
+ --disable-threaded-resolver
+ )
+ else
+ myconf+=(
+ --enable-threaded-resolver
)
fi
diff --git a/net-misc/curl/curl-8.12.0.ebuild b/net-misc/curl/curl-8.12.0.ebuild
new file mode 100644
index 0000000..8e9833f
--- /dev/null
+++ b/net-misc/curl/curl-8.12.0.ebuild
@@ -0,0 +1,384 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Maintainers should subscribe to the 'curl-distros' ML for backports etc
+# https://daniel.haxx.se/blog/2024/03/25/curl-distro-report/
+# https://lists.haxx.se/listinfo/curl-distros
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/danielstenberg.asc
+inherit autotools multilib-minimal multiprocessing prefix toolchain-funcs verify-sig
+
+DESCRIPTION="A Client that groks URLs"
+HOMEPAGE="https://curl.se/"
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/curl/curl.git"
+else
+ SRC_URI="
+ https://curl.se/download/${P}.tar.xz
+ verify-sig? ( https://curl.se/download/${P}.tar.xz.asc )
+ "
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+fi
+
+LICENSE="BSD curl ISC test? ( BSD-4 )"
+SLOT="0"
+IUSE="+adns +alt-svc brotli debug +ftp gnutls gopher +hsts +http2 +http3 idn +imap kerberos ldap mbedtls +openssl +pop3"
+IUSE+=" +psl +progress-meter +quic rtmp rustls samba +smtp ssh ssl sslv3 static-libs test telnet +tftp +websockets zstd"
+# These select the default tls implementation / which quic impl to use
+IUSE+=" curl_quic_openssl +curl_quic_ngtcp2 curl_ssl_gnutls curl_ssl_mbedtls +curl_ssl_openssl curl_ssl_rustls"
+RESTRICT="!test? ( test )"
+
+# Only one default ssl / quic provider can be enabled
+# The default provider needs its USE satisfied
+# HTTP/3 and MultiSSL are mutually exclusive; it's not clear if MultiSSL offers any benefit at all in the modern day.
+# https://github.com/curl/curl/commit/65ece771f4602107d9cdd339dff4b420280a2c2e
+REQUIRED_USE="
+ quic? (
+ !curl_quic_openssl
+ curl_quic_ngtcp2
+ http3
+ ssl
+ )
+ ssl? (
+ ^^ (
+ curl_ssl_gnutls
+ curl_ssl_mbedtls
+ curl_ssl_openssl
+ curl_ssl_rustls
+ )
+ )
+ curl_quic_openssl? (
+ curl_ssl_openssl
+ quic
+ !gnutls
+ !mbedtls
+ !rustls
+ )
+ curl_quic_ngtcp2? (
+ quic
+ !mbedtls
+ !rustls
+ )
+ curl_ssl_gnutls? ( gnutls )
+ curl_ssl_mbedtls? ( mbedtls )
+ curl_ssl_openssl? ( openssl )
+ curl_ssl_rustls? ( rustls )
+ http3? ( alt-svc quic )
+"
+
+# cURL's docs and CI/CD are great resources for confirming supported versions
+# particulary for fast-moving targets like HTTP/2 and TCP/2 e.g.:
+# - https://github.com/curl/curl/blob/master/docs/INTERNALS.md (core dependencies + minimum versions)
+# - https://github.com/curl/curl/blob/master/docs/HTTP3.md (example of a feature that moves quickly)
+# - https://github.com/curl/curl/blob/master/.github/workflows/http3-linux.yml (CI/CD for TCP/2)
+# However 'supported' vs 'works' are two entirely different things; be sane but
+# don't be afraid to require a later version.
+# ngtcp2 = https://bugs.gentoo.org/912029 - can only build with one tls backend at a time.
+RDEPEND="
+ >=sys-libs/zlib-1.1.4[${MULTILIB_USEDEP}]
+ adns? ( >=net-dns/c-ares-1.16.0:=[${MULTILIB_USEDEP}] )
+ brotli? ( app-arch/brotli:=[${MULTILIB_USEDEP}] )
+ http2? ( >=net-libs/nghttp2-1.15.0:=[${MULTILIB_USEDEP}] )
+ http3? ( >=net-libs/nghttp3-1.1.0[${MULTILIB_USEDEP}] )
+ idn? ( >=net-dns/libidn2-2.0.0:=[static-libs?,${MULTILIB_USEDEP}] )
+ kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
+ ldap? ( >=net-nds/openldap-2.0.0:=[static-libs?,${MULTILIB_USEDEP}] )
+ psl? ( net-libs/libpsl[${MULTILIB_USEDEP}] )
+ quic? (
+ curl_quic_openssl? ( >=dev-libs/openssl-3.3.0:=[quic,${MULTILIB_USEDEP}] )
+ curl_quic_ngtcp2? ( >=net-libs/ngtcp2-1.2.0[ssl,openssl,${MULTILIB_USEDEP}] )
+ )
+ rtmp? ( media-video/rtmpdump[${MULTILIB_USEDEP}] )
+ ssh? ( >=net-libs/libssh2-1.0.0[${MULTILIB_USEDEP}] )
+ ssl? (
+ gnutls? (
+ app-misc/ca-certificates
+ >=net-libs/gnutls-3.1.10:=[static-libs?,${MULTILIB_USEDEP}]
+ dev-libs/nettle:=[${MULTILIB_USEDEP}]
+ )
+ mbedtls? (
+ app-misc/ca-certificates
+ net-libs/mbedtls:0=[${MULTILIB_USEDEP}]
+ )
+ openssl? (
+ >=dev-libs/openssl-0.9.7:=[sslv3(-)=,static-libs?,${MULTILIB_USEDEP}]
+ )
+ rustls? (
+ >=net-libs/rustls-ffi-0.14.0:=[${MULTILIB_USEDEP}]
+ )
+ )
+ zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
+"
+
+DEPEND="${RDEPEND}"
+
+BDEPEND="
+ dev-lang/perl
+ virtual/pkgconfig
+ test? (
+ sys-apps/diffutils
+ http2? ( >=net-libs/nghttp2-1.15.0:=[utils,${MULTILIB_USEDEP}] )
+ http3? ( net-libs/nghttp2:=[utils,${MULTILIB_USEDEP}] )
+ )
+ verify-sig? ( sec-keys/openpgp-keys-danielstenberg )
+"
+
+DOCS=( README docs/{FEATURES.md,INTERNALS.md,FAQ,BUGS.md,CONTRIBUTE.md} )
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/curl/curlbuild.h
+)
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/curl-config
+)
+
+QA_CONFIG_IMPL_DECL_SKIP=(
+ __builtin_available
+ closesocket
+ CloseSocket
+ getpass_r
+ ioctlsocket
+ IoctlSocket
+ mach_absolute_time
+ setmode
+ _fseeki64
+ # custom AC_LINK_IFELSE code fails to link even without -Werror
+ OSSL_QUIC_client_method
+)
+
+PATCHES=(
+ "${FILESDIR}/${PN}-prefix-4.patch"
+ "${FILESDIR}/${PN}-respect-cflags-3.patch"
+)
+
+src_prepare() {
+ default
+
+ eprefixify curl-config.in
+ eautoreconf
+}
+
+multilib_src_configure() {
+ # We make use of the fact that later flags override earlier ones
+ # So start with all ssl providers off until proven otherwise
+ # TODO: in the future, we may want to add wolfssl (https://www.wolfssl.com/)
+ local myconf=()
+
+ myconf+=( --without-ca-fallback --with-ca-bundle="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt )
+ if use ssl; then
+ myconf+=( --without-gnutls --without-mbedtls --without-rustls )
+
+ if use gnutls; then
+ multilib_is_native_abi && einfo "SSL provided by gnutls"
+ myconf+=( --with-gnutls )
+ fi
+ if use mbedtls; then
+ multilib_is_native_abi && einfo "SSL provided by mbedtls"
+ myconf+=( --with-mbedtls )
+ fi
+ if use openssl; then
+ multilib_is_native_abi && einfo "SSL provided by openssl"
+ myconf+=( --with-ssl --with-ca-path="${EPREFIX}"/etc/ssl/certs )
+ fi
+ if use rustls; then
+ multilib_is_native_abi && einfo "SSL provided by rustls"
+ myconf+=( --with-rustls )
+ fi
+ if use curl_ssl_gnutls; then
+ multilib_is_native_abi && einfo "Default SSL provided by gnutls"
+ myconf+=( --with-default-ssl-backend=gnutls )
+ elif use curl_ssl_mbedtls; then
+ multilib_is_native_abi && einfo "Default SSL provided by mbedtls"
+ myconf+=( --with-default-ssl-backend=mbedtls )
+ elif use curl_ssl_openssl; then
+ multilib_is_native_abi && einfo "Default SSL provided by openssl"
+ myconf+=( --with-default-ssl-backend=openssl )
+ elif use curl_ssl_rustls; then
+ multilib_is_native_abi && einfo "Default SSL provided by rustls"
+ myconf+=( --with-default-ssl-backend=rustls )
+ else
+ eerror "We can't be here because of REQUIRED_USE."
+ die "Please file a bug, hit impossible condition w/ USE=ssl handling."
+ fi
+
+ else
+ myconf+=( --without-ssl )
+ einfo "SSL disabled"
+ fi
+
+ # These configuration options are organized alphabetically
+ # within each category. This should make it easier if we
+ # ever decide to make any of them contingent on USE flags:
+ # 1) protocols first. To see them all do
+ # 'grep SUPPORT_PROTOCOLS configure.ac'
+ # 2) --enable/disable options second.
+ # 'grep -- --enable configure | grep Check | awk '{ print $4 }' | sort
+ # 3) --with/without options third.
+ # grep -- --with configure | grep Check | awk '{ print $4 }' | sort
+
+ myconf+=(
+ $(use_enable alt-svc)
+ --enable-basic-auth
+ --enable-bearer-auth
+ --enable-digest-auth
+ --enable-kerberos-auth
+ --enable-negotiate-auth
+ --enable-aws
+ --enable-dict
+ --disable-ech
+ --enable-file
+ $(use_enable ftp)
+ $(use_enable gopher)
+ $(use_enable hsts)
+ --enable-http
+ $(use_enable imap)
+ $(use_enable ldap)
+ $(use_enable ldap ldaps)
+ --enable-ntlm
+ $(use_enable pop3)
+ --enable-rt
+ --enable-rtsp
+ $(use_enable samba smb)
+ $(use_with ssh libssh2)
+ $(use_enable smtp)
+ $(use_enable telnet)
+ $(use_enable tftp)
+ --enable-tls-srp
+ $(use_enable adns ares)
+ --enable-cookies
+ --enable-dateparse
+ --enable-dnsshuffle
+ --enable-doh
+ --enable-symbol-hiding
+ --enable-http-auth
+ --enable-ipv6
+ --enable-largefile
+ --enable-manual
+ --enable-mime
+ --enable-netrc
+ $(use_enable progress-meter)
+ --enable-proxy
+ --enable-socketpair
+ --disable-sspi
+ $(use_enable static-libs static)
+ --disable-versioned-symbols
+ --without-amissl
+ --without-bearssl
+ $(use_with brotli)
+ --with-fish-functions-dir="${EPREFIX}"/usr/share/fish/vendor_completions.d
+ $(use_with http2 nghttp2)
+ $(use_with idn libidn2)
+ $(use_with kerberos gssapi "${EPREFIX}"/usr)
+ --without-libgsasl
+ $(use_with psl libpsl)
+ --without-msh3
+ $(use_with http3 nghttp3)
+ $(use_with curl_quic_ngtcp2 ngtcp2)
+ $(use_with curl_quic_openssl openssl-quic)
+ --without-quiche
+ $(use_with rtmp librtmp)
+ --without-schannel
+ --without-secure-transport
+ --without-test-caddy
+ --without-test-httpd
+ --without-test-nghttpx
+ $(use_enable websockets)
+ --without-winidn
+ --without-wolfssl
+ --with-zlib
+ $(use_with zstd)
+ --with-zsh-functions-dir="${EPREFIX}"/usr/share/zsh/site-functions
+ )
+
+ if use debug; then
+ myconf+=(
+ --enable-debug
+ )
+ fi
+
+ if use test && multilib_is_native_abi && ( use http2 || use http3 ); then
+ myconf+=(
+ --with-test-nghttpx="${BROOT}/usr/bin/nghttpx"
+ )
+ fi
+
+ # Since 8.12.0 adns/c-ares and the threaded resolver are mutually exclusive
+ # This is in support of some work to enable `httpsrr` to use adns and the rest
+ # of curl to use the threaded resolver; we'll just make `httpsrr` conditional on adns
+ # when the time comes.
+ if use adns; then
+ myconf+=(
+ --disable-threaded-resolver
+ )
+ else
+ myconf+=(
+ --enable-threaded-resolver
+ )
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
+
+ if ! multilib_is_native_abi; then
+ # Avoid building the client (we just want libcurl for multilib)
+ sed -i -e '/SUBDIRS/s:src::' Makefile || die
+ sed -i -e '/SUBDIRS/s:scripts::' Makefile || die
+ fi
+
+}
+
+multilib_src_compile() {
+ default
+
+ if multilib_is_native_abi; then
+ # Shell completions
+ ! tc-is-cross-compiler && emake -C scripts
+ fi
+}
+
+# There is also a pytest harness that tests for bugs in some very specific
+# situations; we can rely on upstream for this rather than adding additional test deps.
+multilib_src_test() {
+ # See https://github.com/curl/curl/blob/master/tests/runtests.pl#L5721
+ # -n: no valgrind (unreliable in sandbox and doesn't work correctly on all arches)
+ # -v: verbose
+ # -a: keep going on failure (so we see everything that breaks, not just 1st test)
+ # -k: keep test files after completion
+ # -am: automake style TAP output
+ # -p: print logs if test fails
+ # Note: if needed, we can skip specific tests. See e.g. Fedora's packaging
+ # or just read https://github.com/curl/curl/tree/master/tests#run.
+ # Note: we don't run the testsuite for cross-compilation.
+ # Upstream recommend 7*nproc as a starting point for parallel tests, but
+ # this ends up breaking when nproc is huge (like -j80).
+ # The network sandbox causes tests 241 and 1083 to fail; these are typically skipped
+ # as most gentoo users don't have an 'ip6-localhost'
+ multilib_is_native_abi && emake test TFLAGS="-n -v -a -k -am -p -j$((2*$(makeopts_jobs))) !241 !1083"
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ if multilib_is_native_abi; then
+ # Shell completions
+ ! tc-is-cross-compiler && emake -C scripts DESTDIR="${D}" install
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ find "${ED}" -type f -name '*.la' -delete || die
+ rm -rf "${ED}"/etc/ || die
+}
+
+pkg_postinst() {
+ if use debug; then
+ ewarn "USE=debug has been selected, enabling debug codepaths and making cURL extra verbose."
+ ewarn "Use this _only_ for testing. Debug builds should _not_ be used in anger."
+ ewarn "hic sunt dracones; you have been warned."
+ fi
+}
diff --git a/net-misc/curl/curl-8.9.1-r2.ebuild b/net-misc/curl/curl-8.9.1-r2.ebuild
index 3fe19dc..aa6c650 100644
--- a/net-misc/curl/curl-8.9.1-r2.ebuild
+++ b/net-misc/curl/curl-8.9.1-r2.ebuild
@@ -29,7 +29,7 @@ SLOT="0"
IUSE="+adns +alt-svc brotli debug +ftp gnutls gopher +hsts +http2 +http3 idn +imap kerberos ldap mbedtls +openssl +pop3"
IUSE+=" +psl +progress-meter +quic rtmp rustls samba +smtp ssh ssl sslv3 static-libs test telnet +tftp websockets zstd"
# These select the default tls implementation / which quic impl to use
-IUSE+=" +curl_quic_openssl curl_quic_ngtcp2 curl_ssl_gnutls curl_ssl_mbedtls +curl_ssl_openssl curl_ssl_rustls"
+IUSE+=" curl_quic_openssl +curl_quic_ngtcp2 curl_ssl_gnutls curl_ssl_mbedtls +curl_ssl_openssl curl_ssl_rustls"
RESTRICT="!test? ( test )"
# Only one default ssl / quic provider can be enabled
@@ -90,7 +90,7 @@ RDEPEND="
psl? ( net-libs/libpsl[${MULTILIB_USEDEP}] )
quic? (
curl_quic_openssl? ( >=dev-libs/openssl-3.3.0:=[quic,${MULTILIB_USEDEP}] )
- curl_quic_ngtcp2? ( >=net-libs/ngtcp2-1.2.0[ssl,${MULTILIB_USEDEP}] )
+ curl_quic_ngtcp2? ( >=net-libs/ngtcp2-1.2.0[ssl,openssl,${MULTILIB_USEDEP}] )
)
rtmp? ( media-video/rtmpdump[${MULTILIB_USEDEP}] )
ssh? ( >=net-libs/libssh2-1.0.0[${MULTILIB_USEDEP}] )
diff --git a/net-misc/curl/files/curl-8.12.0-multi.patch b/net-misc/curl/files/curl-8.12.0-multi.patch
new file mode 100644
index 0000000..b9405af
--- /dev/null
+++ b/net-misc/curl/files/curl-8.12.0-multi.patch
@@ -0,0 +1,136 @@
+https://github.com/curl/curl/issues/16236#issuecomment-2645385845
+https://github.com/curl/curl/commit/242a1439e7d8cdb72ae6a2fa2e705e2d9a2b7501
+
+
+--- a/lib/setopt.c
++++ b/lib/setopt.c
+@@ -1584,10 +1584,6 @@ static CURLcode setopt_pointers(struct Curl_easy *data, CURLoption option,
+ if(data->share->hsts == data->hsts)
+ data->hsts = NULL;
+ #endif
+-#ifdef USE_SSL
+- if(data->share->ssl_scache == data->state.ssl_scache)
+- data->state.ssl_scache = data->multi ? data->multi->ssl_scache : NULL;
+-#endif
+ #ifdef USE_LIBPSL
+ if(data->psl == &data->share->psl)
+ data->psl = data->multi ? &data->multi->psl : NULL;
+@@ -1628,10 +1624,6 @@ static CURLcode setopt_pointers(struct Curl_easy *data, CURLoption option,
+ data->hsts = data->share->hsts;
+ }
+ #endif
+-#ifdef USE_SSL
+- if(data->share->ssl_scache)
+- data->state.ssl_scache = data->share->ssl_scache;
+-#endif
+ #ifdef USE_LIBPSL
+ if(data->share->specifier & (1 << CURL_LOCK_DATA_PSL))
+ data->psl = &data->share->psl;
+--- a/lib/transfer.c
++++ b/lib/transfer.c
+@@ -567,12 +567,6 @@ CURLcode Curl_pretransfer(struct Curl_easy *data)
+ #endif
+ data->state.httpreq = data->set.method;
+
+-#ifdef USE_SSL
+- if(!data->state.ssl_scache)
+- /* There was no ssl session cache set via a share, use the multi one */
+- data->state.ssl_scache = data->multi->ssl_scache;
+-#endif
+-
+ data->state.requests = 0;
+ data->state.followlocation = 0; /* reset the location-follow counter */
+ data->state.this_is_a_follow = FALSE; /* reset this */
+--- a/lib/urldata.h
++++ b/lib/urldata.h
+@@ -1199,7 +1199,6 @@ struct UrlState {
+ curl_prot_t first_remote_protocol;
+
+ int retrycount; /* number of retries on a new connection */
+- struct Curl_ssl_scache *ssl_scache; /* TLS session pool */
+ int os_errno; /* filled in with errno whenever an error occurs */
+ long followlocation; /* redirect counter */
+ int requests; /* request counter: redirects + authentication retakes */
+--- a/lib/vtls/vtls_scache.c
++++ b/lib/vtls/vtls_scache.c
+@@ -82,6 +82,17 @@ struct Curl_ssl_scache {
+ long age;
+ };
+
++static struct Curl_ssl_scache *cf_ssl_scache_get(struct Curl_easy *data)
++{
++ struct Curl_ssl_scache *scache = NULL;
++ /* If a share is present, its ssl_scache has preference over the multi */
++ if(data->share && data->share->ssl_scache)
++ scache = data->share->ssl_scache;
++ else if(data->multi && data->multi->ssl_scache)
++ scache = data->multi->ssl_scache;
++ return scache;
++}
++
+ static void cf_ssl_scache_clear_session(struct Curl_ssl_session *s)
+ {
+ if(s->sdata) {
+@@ -792,7 +803,7 @@ CURLcode Curl_ssl_scache_put(struct Curl_cfilter *cf,
+ const char *ssl_peer_key,
+ struct Curl_ssl_session *s)
+ {
+- struct Curl_ssl_scache *scache = data->state.ssl_scache;
++ struct Curl_ssl_scache *scache = cf_ssl_scache_get(data);
+ struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
+ CURLcode result;
+ DEBUGASSERT(ssl_config);
+@@ -826,7 +837,7 @@ CURLcode Curl_ssl_scache_take(struct Curl_cfilter *cf,
+ const char *ssl_peer_key,
+ struct Curl_ssl_session **ps)
+ {
+- struct Curl_ssl_scache *scache = data->state.ssl_scache;
++ struct Curl_ssl_scache *scache = cf_ssl_scache_get(data);
+ struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
+ struct Curl_ssl_scache_peer *peer = NULL;
+ struct Curl_llist_node *n;
+@@ -870,7 +881,7 @@ CURLcode Curl_ssl_scache_add_obj(struct Curl_cfilter *cf,
+ void *sobj,
+ Curl_ssl_scache_obj_dtor *sobj_free)
+ {
+- struct Curl_ssl_scache *scache = data->state.ssl_scache;
++ struct Curl_ssl_scache *scache = cf_ssl_scache_get(data);
+ struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
+ struct Curl_ssl_scache_peer *peer = NULL;
+ CURLcode result;
+@@ -898,7 +909,7 @@ bool Curl_ssl_scache_get_obj(struct Curl_cfilter *cf,
+ const char *ssl_peer_key,
+ void **sobj)
+ {
+- struct Curl_ssl_scache *scache = data->state.ssl_scache;
++ struct Curl_ssl_scache *scache = cf_ssl_scache_get(data);
+ struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
+ struct Curl_ssl_scache_peer *peer = NULL;
+ CURLcode result;
+@@ -924,7 +935,7 @@ void Curl_ssl_scache_remove_all(struct Curl_cfilter *cf,
+ struct Curl_easy *data,
+ const char *ssl_peer_key)
+ {
+- struct Curl_ssl_scache *scache = data->state.ssl_scache;
++ struct Curl_ssl_scache *scache = cf_ssl_scache_get(data);
+ struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
+ struct Curl_ssl_scache_peer *peer = NULL;
+ CURLcode result;
+@@ -1021,7 +1032,7 @@ CURLcode Curl_ssl_session_import(struct Curl_easy *data,
+ const unsigned char *shmac, size_t shmac_len,
+ const unsigned char *sdata, size_t sdata_len)
+ {
+- struct Curl_ssl_scache *scache = data->state.ssl_scache;
++ struct Curl_ssl_scache *scache = cf_ssl_scache_get(data);
+ struct Curl_ssl_scache_peer *peer = NULL;
+ struct Curl_ssl_session *s = NULL;
+ bool locked = FALSE;
+@@ -1092,7 +1103,7 @@ CURLcode Curl_ssl_session_export(struct Curl_easy *data,
+ curl_ssls_export_cb *export_fn,
+ void *userptr)
+ {
+- struct Curl_ssl_scache *scache = data->state.ssl_scache;
++ struct Curl_ssl_scache *scache = cf_ssl_scache_get(data);
+ struct Curl_ssl_scache_peer *peer;
+ struct dynbuf sbuf, hbuf;
+ struct Curl_llist_node *n;
diff --git a/net-misc/curl/files/curl-prefix-4.patch b/net-misc/curl/files/curl-prefix-4.patch
new file mode 100644
index 0000000..796b67f
--- /dev/null
+++ b/net-misc/curl/files/curl-prefix-4.patch
@@ -0,0 +1,35 @@
+From f18f4362d7ca60fb12248a559dab26aea330771c Mon Sep 17 00:00:00 2001
+From: Matt Jolly <kangie@gentoo.org>
+Date: Wed, 5 Feb 2025 17:27:11 +1000
+Subject: [PATCH] Update prefix patch for 8.12.0
+
+Signed-off-by: Matt Jolly <kangie@gentoo.org>
+---
+ curl-config.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/curl-config.in b/curl-config.in
+index 55184167b..df31fdb46 100644
+--- a/curl-config.in
++++ b/curl-config.in
+@@ -141,7 +141,7 @@ while test "$#" -gt 0; do
+ ;;
+
+ --cflags)
+- if test "X@includedir@" = 'X/usr/include'; then
++ if test "X@includedir@" = "X@GENTOO_PORTAGE_EPREFIX@/usr/include"; then
+ echo '@LIBCURL_PC_CFLAGS@'
+ else
+ echo "@LIBCURL_PC_CFLAGS@ -I@includedir@"
+@@ -149,7 +149,7 @@ while test "$#" -gt 0; do
+ ;;
+
+ --libs)
+- if test "X@libdir@" != 'X/usr/lib' -a "X@libdir@" != 'X/usr/lib64'; then
++ if test "X@libdir@" != "X@GENTOO_PORTAGE_EPREFIX@/usr/lib" -a "X@libdir@" != "X@GENTOO_PORTAGE_EPREFIX@/usr/lib64"; then
+ curllibdir="-L@libdir@ "
+ else
+ curllibdir=''
+--
+2.48.0
+
diff --git a/net-misc/curl/metadata.xml b/net-misc/curl/metadata.xml
index 884608c..b3581ad 100644
--- a/net-misc/curl/metadata.xml
+++ b/net-misc/curl/metadata.xml
@@ -17,7 +17,6 @@
<flag name="hsts">Enable HTTP Strict Transport Security</flag>
<flag name="imap">Enable Internet Message Access Protocol support</flag>
<flag name="mbedtls">Enable mbedtls ssl backend</flag>
- <flag name="nghttp3">Enable HTTP/3 support using <pkg>net-libs/nghttp3</pkg></flag>
<flag name="http3">Enable HTTP/3 support</flag>
<flag name="openssl">Enable openssl ssl backend</flag>
<flag name="pop3">Enable Post Office Protocol 3 support</flag>
diff --git a/net-vpn/tor/Manifest b/net-vpn/tor/Manifest
index 5d5bdf4..d8170c2 100644
--- a/net-vpn/tor/Manifest
+++ b/net-vpn/tor/Manifest
@@ -4,3 +4,6 @@ DIST tor-0.4.8.12.tar.gz.sha256sum.asc 716 BLAKE2B 8c92a7de4e0e4cab15df534c34d36
DIST tor-0.4.8.13.tar.gz 9912610 BLAKE2B b55b29b5b2d4aa391f8d9d22657833647064af354ac8b6751ddc096fa30d0b43399851d11b0e8a41c7537aa134b61aa65c9b94f2a1854eea7c01a2bfa63f1110 SHA512 7a095931ed709333a512535212048360d9d90907c3c71a8c6dc55fd52ccf515aa42c7ec6e18c7fb5fde7f5e1b1da1753f1380a274743b6420ac49ed1a3bb1a0c
DIST tor-0.4.8.13.tar.gz.sha256sum 86 BLAKE2B 8e2fce0973e9798c3396fc4c070afe5d4ecf42368aa35e7ee13737c7a0b1c6a45c628605ec1879c9c923380bfb1b9d401b2527cf5bb3768630ac526b22d0be18 SHA512 b059030226b70224c10dabb3517c1d33419d138505b2f339f3a921844e921bed0056a4836559789d74b10fe552897c12716d956dae46474634bb814ab19211f0
DIST tor-0.4.8.13.tar.gz.sha256sum.asc 716 BLAKE2B 8f708838cc4b642168b689e9ce9bd8daca513db308d86a4d0193edaee8ad47cb52bb0b5af9236da302b9cce542f2dd52a5c86130cd30b5320560e58b7f71fb9c SHA512 879ee66396cd1a751980686c79b03cf85ae19828255b0e0058540d72d0d365aa82778f009824cab310403bda98c968fac956905a9cb8f6877b960897e0476dd0
+DIST tor-0.4.8.14.tar.gz 9965322 BLAKE2B 335b76dec29139199ebfbc5f598b66f31bcc1d34c06bc51a4bcc64831a6cfb639fbe1fc91b1686720a4024a10c9b203d7813c734e9db47e087628e85b557fe65 SHA512 96f6c8ce00542e97d75516fcf10cf5649243f695b7c7dd3e52bdda095ea9019743648335a2689fa2e23c046e64728fecdd72b48f2ec2db30fb4216393db7f641
+DIST tor-0.4.8.14.tar.gz.sha256sum 86 BLAKE2B 340def77987ebde18f94339f46e566d11dc76b0ac87f995716aafe00de5727c3274e2065ad1832695b986245e95457773b4fb9c8a8cb3817c417b9ffe8ec5bee SHA512 e2e5d952342b22a78fcb4b92518146ca8e0214af85c7b03b6bf67c38f18c85792423dc64c215db922acc6b4422ed4aa10d05da1f3fa6e2a410684b78e67e6349
+DIST tor-0.4.8.14.tar.gz.sha256sum.asc 716 BLAKE2B 98d5bfb4e8db7e16ed643b5cb819fe91d09f8c981e8023278a9082936eeeee6afc712de958375ed522d10a2f8e4ac5a896b843965bf59e3edcc57985dcf4e844 SHA512 5c75db16edde17a007bc92f103559a49e2731fa4182f06d120a0f8735bada0094c878aed0d062b8e089cd9e8c6c64d2ffb17da274b014fcfdff8f949edcea59b
diff --git a/net-vpn/tor/tor-0.4.8.14.ebuild b/net-vpn/tor/tor-0.4.8.14.ebuild
new file mode 100644
index 0000000..ebb3d93
--- /dev/null
+++ b/net-vpn/tor/tor-0.4.8.14.ebuild
@@ -0,0 +1,200 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/torproject.org.asc
+inherit edo python-any-r1 readme.gentoo-r1 systemd verify-sig
+
+MY_PV="$(ver_rs 4 -)"
+MY_PF="${PN}-${MY_PV}"
+DESCRIPTION="Anonymizing overlay network for TCP"
+HOMEPAGE="https://www.torproject.org/ https://gitlab.torproject.org/tpo/core/tor/"
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://gitlab.torproject.org/tpo/core/tor"
+ inherit autotools git-r3
+else
+ SRC_URI="
+ https://www.torproject.org/dist/${MY_PF}.tar.gz
+ https://archive.torproject.org/tor-package-archive/${MY_PF}.tar.gz
+ verify-sig? (
+ https://dist.torproject.org/${MY_PF}.tar.gz.sha256sum
+ https://dist.torproject.org/${MY_PF}.tar.gz.sha256sum.asc
+ )
+ "
+
+ S="${WORKDIR}/${MY_PF}"
+
+ if [[ ${PV} != *_alpha* && ${PV} != *_beta* && ${PV} != *_rc* ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~ppc-macos"
+ fi
+
+ BDEPEND="verify-sig? ( >=sec-keys/openpgp-keys-tor-20230727 )"
+fi
+
+# BSD in general, but for PoW, needs --enable-gpl (GPL-3 per --version)
+# We also already had GPL-2 listed here for the init script, but obviously
+# that's different from the actual binary.
+LICENSE="BSD GPL-2 GPL-3"
+SLOT="0"
+IUSE="caps doc lzma +man scrypt seccomp selinux +server systemd tor-hardening test zstd"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=dev-libs/libevent-2.1.12-r1:=[ssl]
+ dev-libs/openssl:=[-bindist(-)]
+ sys-libs/zlib
+ caps? ( sys-libs/libcap )
+ man? ( app-text/asciidoc )
+ lzma? ( app-arch/xz-utils )
+ scrypt? ( app-crypt/libscrypt )
+ seccomp? ( >=sys-libs/libseccomp-2.4.1 )
+ systemd? ( sys-apps/systemd:= )
+ zstd? ( app-arch/zstd:= )
+"
+DEPEND="
+ ${RDEPEND}
+ test? (
+ ${DEPEND}
+ ${PYTHON_DEPS}
+ )
+"
+RDEPEND+="
+ acct-user/tor
+ acct-group/tor
+ selinux? ( sec-policy/selinux-tor )
+"
+BDEPEND+="
+ acct-user/tor
+ acct-group/tor
+"
+
+DOCS=()
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.2.7.4-torrc.sample.patch
+ "${FILESDIR}"/${PN}-0.4.7.13-opensslconf.patch
+)
+
+QA_CONFIG_IMPL_DECL_SKIP=(
+ # test correctly fails because -lnacl fails if not available
+ # https://bugs.gentoo.org/900092
+ crypto_scalarmult_curve25519
+)
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_unpack() {
+ if [[ ${PV} == 9999 ]] ; then
+ git-r3_src_unpack
+ else
+ if use verify-sig; then
+ cd "${DISTDIR}" || die
+ verify-sig_verify_detached ${MY_PF}.tar.gz.sha256sum{,.asc}
+ verify-sig_verify_unsigned_checksums \
+ ${MY_PF}.tar.gz.sha256sum sha256 ${MY_PF}.tar.gz
+ cd "${WORKDIR}" || die
+ fi
+
+ default
+ fi
+}
+
+src_prepare() {
+ default
+
+ # Running shellcheck automagically isn't useful for ebuild testing.
+ echo "exit 0" > scripts/maint/checkShellScripts.sh || die
+
+ if [[ ${PV} == 9999 ]] ; then
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ use doc && DOCS+=( README.md ChangeLog ReleaseNotes doc/HACKING )
+
+ export ac_cv_lib_cap_cap_init=$(usex caps)
+ export tor_cv_PYTHON="${EPYTHON}"
+
+ local myeconfargs=(
+ --localstatedir="${EPREFIX}/var"
+ --disable-all-bugs-are-fatal
+ --enable-system-torrc
+ --disable-android
+ --disable-coverage
+ --disable-html-manual
+ --disable-libfuzzer
+ --enable-missing-doc-warnings
+ --disable-module-dirauth
+ --enable-pic
+ --disable-restart-debugging
+
+ # Unless someone asks & has a compelling reason, just always
+ # build in GPL mode for pow, given we don't want yet another USE
+ # flag combination to have to test just for the sake of it.
+ # (PoW requires GPL.)
+ --enable-gpl
+ --enable-module-pow
+
+ $(use_enable man asciidoc)
+ $(use_enable man manpage)
+ $(use_enable lzma)
+ $(use_enable scrypt libscrypt)
+ $(use_enable seccomp)
+ $(use_enable server module-relay)
+ $(use_enable systemd)
+ $(use_enable tor-hardening gcc-hardening)
+ $(use_enable tor-hardening linker-hardening)
+ $(use_enable test unittests)
+ $(use_enable zstd)
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+src_test() {
+ local skip_tests=(
+ # Fails in sandbox
+ :sandbox/open_filename
+ :sandbox/openat_filename
+ )
+
+ if use arm ; then
+ skip_tests+=(
+ # bug #920905
+ # https://gitlab.torproject.org/tpo/core/tor/-/issues/40912
+ :sandbox/opendir_dirname
+ :sandbox/openat_filename
+ :sandbox/chmod_filename
+ :sandbox/chown_filename
+ :sandbox/rename_filename
+ )
+ fi
+
+ # The makefile runs these by parallel by chunking them with a script
+ # but that means we lose verbosity and can't skip individual tests easily
+ # either.
+ edo ./src/test/test --verbose "${skip_tests[@]}"
+}
+
+src_install() {
+ default
+ readme.gentoo_create_doc
+
+ newconfd "${FILESDIR}"/tor.confd tor
+ newinitd "${FILESDIR}"/tor.initd-r9 tor
+ systemd_dounit "${FILESDIR}"/tor.service
+
+ keepdir /var/lib/tor
+
+ fperms 750 /var/lib/tor
+ fowners tor:tor /var/lib/tor
+
+ insinto /etc/tor/
+ newins "${FILESDIR}"/torrc-r2 torrc
+}