dev-lang/swift-bootstrap: add 1.1

Introduces the `binary` USE flag (on by default) which allows
bootstrapping from `dev-lang/swift-bin` instead of building from source
using `dev-lang/swift`.

Swift 5.10 is becoming increassingly less desirable as a standalone
Swift version, and more difficult to build over time with newer
toolchain versions. For bootstrapping specifically, using a pre-built
binary is likely an acceptable default.

Signed-off-by: Itai Ferber <itai@itaiferber.net>
This commit is contained in:
Itai Ferber
2026-06-05 15:46:32 -04:00
parent 59969d41a0
commit af8b48ff36
2 changed files with 29 additions and 0 deletions

View File

@@ -13,6 +13,9 @@
install of Swift on a new machine, this package vends a base version of
Swift that newer versions can BDEPEND on.
</longdescription>
<use>
<flag name="binary">Bootstrap from binary (dev-lang/swift-bin:5/10) instead of building from source (dev-lang/swift:5/10).</flag>
</use>
<upstream>
<remote-id type="github">swiftlang/swift</remote-id>
</upstream>

View File

@@ -0,0 +1,26 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="A virtual package providing a base Swift to bootstrap future versions with."
HOMEPAGE="https://www.swift.org"
S="${WORKDIR}"
LICENSE="GPL-2"
SLOT="5/10"
KEYWORDS="~amd64"
IUSE="+binary"
# `dev-lang/swift` BDEPENDS on either this package or `dev-lang/swift` itself. When any version of `dev-lang/swift` is
# installed, it will be preferred over this package; when no version of `dev-lang/swift` is installed, `emerge` will
# fall back to installing this.
#
# Because `dev-lang/swift` is versioned by SLOT, any updates to newer versions of Swift will record the current version
# in the @world set, leaving them around; this allows `swift-bootstrap` to eventually get cleaned up.
RDEPEND="
binary? ( dev-lang/swift-bin:5/10 )
!binary? ( dev-lang/swift:5/10 )
"