public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: dev-lang/swift/, dev-lang/swift/files/swift-6.0.1-r1/
@ 2024-10-31 15:12 Itai Ferber
  0 siblings, 0 replies; only message in thread
From: Itai Ferber @ 2024-10-31 15:12 UTC (permalink / raw
  To: gentoo-commits

commit:     59307e2fb072d0fa6f17b3dfb6de49dd68eae69a
Author:     Itai Ferber <itai <AT> itaiferber <DOT> net>
AuthorDate: Thu Oct 31 02:14:20 2024 +0000
Commit:     Itai Ferber <itai <AT> itaiferber <DOT> net>
CommitDate: Thu Oct 31 15:11:56 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=59307e2f

dev-lang/swift: add 6.0.1-r1

* Enables backtracing on Swift program abort
* Disables unconditional `-Werror` in swift-corelibs-libdispatch
* Adds correct dependency on Swift 5.10.1 via dev-lang/swift-bootstrap

Signed-off-by: Itai Ferber <itai <AT> itaiferber.net>

 .../swift-6.0.1-r1/backtracing-noexecstack.patch   |  1 +
 .../disable-libdispatch-werror.patch               | 11 +++++
 .../files/swift-6.0.1-r1/gentoo-build-preset.patch | 50 ++++++++++++++++++++++
 .../files/swift-6.0.1-r1/link-ncurses-tinfo.patch  |  1 +
 .../swift/files/swift-6.0.1-r1/link-with-lld.patch |  1 +
 .../{swift-6.0.1.ebuild => swift-6.0.1-r1.ebuild}  |  9 ++--
 dev-lang/swift/swift-6.0.1.ebuild                  |  2 +-
 7 files changed, 70 insertions(+), 5 deletions(-)

diff --git a/dev-lang/swift/files/swift-6.0.1-r1/backtracing-noexecstack.patch b/dev-lang/swift/files/swift-6.0.1-r1/backtracing-noexecstack.patch
new file mode 120000
index 000000000..58b20ae89
--- /dev/null
+++ b/dev-lang/swift/files/swift-6.0.1-r1/backtracing-noexecstack.patch
@@ -0,0 +1 @@
+../swift-6.0.1/backtracing-noexecstack.patch
\ No newline at end of file

diff --git a/dev-lang/swift/files/swift-6.0.1-r1/disable-libdispatch-werror.patch b/dev-lang/swift/files/swift-6.0.1-r1/disable-libdispatch-werror.patch
new file mode 100644
index 000000000..3257019a8
--- /dev/null
+++ b/dev-lang/swift/files/swift-6.0.1-r1/disable-libdispatch-werror.patch
@@ -0,0 +1,11 @@
+# Packages should not have `-Werror` unconditionally enabled.
+
+--- a/swift-corelibs-libdispatch/cmake/modules/DispatchCompilerWarnings.cmake
++++ b/swift-corelibs-libdispatch/cmake/modules/DispatchCompilerWarnings.cmake
+@@ -6,7 +6,6 @@ elseif(WIN32)
+   # so that we can use __popcnt64
+   add_compile_options($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:-fms-extensions>)
+ else()
+-  add_compile_options($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:-Werror>)
+   add_compile_options($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:-Wall>)
+   add_compile_options($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:-Wextra>)

diff --git a/dev-lang/swift/files/swift-6.0.1-r1/gentoo-build-preset.patch b/dev-lang/swift/files/swift-6.0.1-r1/gentoo-build-preset.patch
new file mode 100644
index 000000000..592874ba2
--- /dev/null
+++ b/dev-lang/swift/files/swift-6.0.1-r1/gentoo-build-preset.patch
@@ -0,0 +1,50 @@
+# Individual preset options:
+#
+# 1. mixin-preset: building for Linux, without compiler assertions, and with
+#    most tests disabled
+# 2. build-ninja=0, libicu=0, skip-build-curl, skip-build-zlib: we'd prefer to
+#    pick these up from the system
+# 3. build-swift-libexec=0: don't build binaries normally installed in
+#    `/usr/local/libexec` because we're not allowed to install there ourselves
+# 4. extra-cmake-options:
+#    * -DSWIFT_USE_LINKER=lld: let Swift know we'll be building it with `lld`
+#    * -DBUILD_TESTING, -DSWIFT_INCLUDE_TESTS, -DSWIFT_INCLUDE_TEST_BINARIES:
+#      the `no_test` preset disables building most, but not all tests; we don't
+#      need to build any of them
+#    * -DCOMPILER_RT_BUILD_ORC: the `compiler-rt` library defaults to building
+#      the ORC LLVM JIT library, which we don't require; we disable it because
+#      it builds with executable stacks, which trip up warnings on installation
+#    * -DPython3_FIND_UNVERSIONED_NAMES: LLDB ships with Python bindings, and
+#      uses CMake to search for Python. By default, CMake tries to find the
+#      latest version installed on disk (currently, `python3.13`, then
+#      `python3.12`, then...). This might not be the version of Python specified
+#      by `PYTHON_SINGLE_TARGET`, which we want to respect. We use
+#      `python_setup` to place `${EPYTHON}` at the front of `PATH` as the
+#      unversioned `python3`, so we want CMake to discover and use this binary
+#      first before falling back to its search
+# 5. llvm-targets-to-build: we don't currently support architectures other than
+#    amd64, so there's no point in building LLVM for multiple architectures; if
+#    this changes (or we start supporting cross-compilation), we'll need to
+#    build for more than just the host
+
+--- a/swift/utils/build-presets.ini
++++ b/swift/utils/build-presets.ini
+@@ -3040,3 +3040,18 @@ skip-test-cmark
+ skip-test-swift
+ skip-build-benchmarks
+ skip-test-foundation
++
++[preset: gentoo]
++mixin-preset=buildbot_linux,no_assertions,no_test
++build-ninja=0
++extra-cmake-options=
++       -DLLVM_USE_LINKER:STRING=lld
++       -DBUILD_TESTING:BOOL=NO
++       -DSWIFT_INCLUDE_TESTS:BOOL=NO
++       -DSWIFT_INCLUDE_TEST_BINARIES:BOOL=NO
++       -DCOMPILER_RT_BUILD_ORC:BOOL=NO
++       -DPython3_FIND_UNVERSIONED_NAMES:STRING=FIRST
++libicu=0
++llvm-targets-to-build=host
++skip-build-curl
++skip-build-zlib

diff --git a/dev-lang/swift/files/swift-6.0.1-r1/link-ncurses-tinfo.patch b/dev-lang/swift/files/swift-6.0.1-r1/link-ncurses-tinfo.patch
new file mode 120000
index 000000000..6d7f0366a
--- /dev/null
+++ b/dev-lang/swift/files/swift-6.0.1-r1/link-ncurses-tinfo.patch
@@ -0,0 +1 @@
+../swift-6.0.1/link-ncurses-tinfo.patch
\ No newline at end of file

diff --git a/dev-lang/swift/files/swift-6.0.1-r1/link-with-lld.patch b/dev-lang/swift/files/swift-6.0.1-r1/link-with-lld.patch
new file mode 120000
index 000000000..d3179be6c
--- /dev/null
+++ b/dev-lang/swift/files/swift-6.0.1-r1/link-with-lld.patch
@@ -0,0 +1 @@
+../swift-6.0.1/link-with-lld.patch
\ No newline at end of file

diff --git a/dev-lang/swift/swift-6.0.1.ebuild b/dev-lang/swift/swift-6.0.1-r1.ebuild
similarity index 97%
copy from dev-lang/swift/swift-6.0.1.ebuild
copy to dev-lang/swift/swift-6.0.1-r1.ebuild
index d222ce5dc..10d82cbce 100644
--- a/dev-lang/swift/swift-6.0.1.ebuild
+++ b/dev-lang/swift/swift-6.0.1-r1.ebuild
@@ -16,7 +16,6 @@ SRC_URI="
 	https://github.com/apple/swift-atomics/archive/refs/tags/1.2.0.tar.gz -> swift-atomics-1.2.0.tar.gz
 	https://github.com/apple/swift-certificates/archive/refs/tags/1.0.1.tar.gz -> swift-certificates-1.0.1.tar.gz
 	https://github.com/apple/swift-collections/archive/refs/tags/1.1.2.tar.gz -> swift-collections-1.1.2.tar.gz
-	https://github.com/apple/swift-corelibs-libdispatch/archive/refs/tags/${P}-RELEASE.tar.gz -> swift-corelibs-libdispatch-${PV}.tar.gz
 	https://github.com/apple/swift-crypto/archive/refs/tags/3.0.0.tar.gz -> swift-crypto-3.0.0.tar.gz
 	https://github.com/apple/swift-nio-ssl/archive/refs/tags/2.15.0.tar.gz -> swift-nio-ssl-2.15.0.tar.gz
 	https://github.com/apple/swift-nio/archive/refs/tags/2.31.2.tar.gz -> swift-nio-2.31.2.tar.gz
@@ -28,6 +27,7 @@ SRC_URI="
 	https://github.com/swiftlang/sourcekit-lsp/archive/refs/tags/${P}-RELEASE.tar.gz -> sourcekit-lsp-${PV}.tar.gz
 	https://github.com/swiftlang/swift-cmark/archive/refs/tags/${P}-RELEASE.tar.gz -> swift-cmark-${PV}.tar.gz
 	https://github.com/swiftlang/swift-corelibs-foundation/archive/refs/tags/${P}-RELEASE.tar.gz -> swift-corelibs-foundation-${PV}.tar.gz
+	https://github.com/swiftlang/swift-corelibs-libdispatch/archive/refs/tags/${P}-RELEASE.tar.gz -> swift-corelibs-libdispatch-${PV}.tar.gz
 	https://github.com/swiftlang/swift-corelibs-xctest/archive/refs/tags/${P}-RELEASE.tar.gz -> swift-corelibs-xctest-${PV}.tar.gz
 	https://github.com/swiftlang/swift-docc-render-artifact/archive/refs/tags/${P}-RELEASE.tar.gz -> swift-docc-render-artifact-${PV}.tar.gz
 	https://github.com/swiftlang/swift-docc-symbolkit/archive/refs/tags/${P}-RELEASE.tar.gz -> swift-docc-symbolkit-${PV}.tar.gz
@@ -53,6 +53,7 @@ SRC_URI="
 
 PATCHES=(
 	"${FILESDIR}/${PF}/backtracing-noexecstack.patch"
+	"${FILESDIR}/${PF}/disable-libdispatch-werror.patch"
 	"${FILESDIR}/${PF}/gentoo-build-preset.patch"
 	"${FILESDIR}/${PF}/link-ncurses-tinfo.patch"
 	"${FILESDIR}/${PF}/link-with-lld.patch"
@@ -69,7 +70,6 @@ RESTRICT="strip"
 RDEPEND="
 	${PYTHON_DEPS}
 	!~dev-lang/swift-5.10.1:0
-	>=app-eselect/eselect-swift-1.0
 	>=dev-db/sqlite-3
 	>=dev-libs/icu-69
 	>=dev-libs/libedit-20221030
@@ -77,6 +77,7 @@ RDEPEND="
 	>=net-misc/curl-8.4
 	>=sys-libs/ncurses-6
 	>=sys-libs/zlib-1.3
+	app-eselect/eselect-swift
 	dev-lang/python
 	$(llvm_gen_dep 'sys-devel/lld:${LLVM_SLOT}=')
 "
@@ -95,8 +96,8 @@ BDEPEND="
 	>=sys-libs/ncurses-6
 	>=sys-libs/zlib-1.3
 	|| (
-		<dev-lang/swift-${PV}:*
-		>dev-lang/swift-${PV}:*
+		dev-lang/swift
+		dev-lang/swift-bootstrap
 	)
 	$(llvm_gen_dep '
 		sys-devel/clang:${LLVM_SLOT}=

diff --git a/dev-lang/swift/swift-6.0.1.ebuild b/dev-lang/swift/swift-6.0.1.ebuild
index d222ce5dc..fe5e94d93 100644
--- a/dev-lang/swift/swift-6.0.1.ebuild
+++ b/dev-lang/swift/swift-6.0.1.ebuild
@@ -16,7 +16,6 @@ SRC_URI="
 	https://github.com/apple/swift-atomics/archive/refs/tags/1.2.0.tar.gz -> swift-atomics-1.2.0.tar.gz
 	https://github.com/apple/swift-certificates/archive/refs/tags/1.0.1.tar.gz -> swift-certificates-1.0.1.tar.gz
 	https://github.com/apple/swift-collections/archive/refs/tags/1.1.2.tar.gz -> swift-collections-1.1.2.tar.gz
-	https://github.com/apple/swift-corelibs-libdispatch/archive/refs/tags/${P}-RELEASE.tar.gz -> swift-corelibs-libdispatch-${PV}.tar.gz
 	https://github.com/apple/swift-crypto/archive/refs/tags/3.0.0.tar.gz -> swift-crypto-3.0.0.tar.gz
 	https://github.com/apple/swift-nio-ssl/archive/refs/tags/2.15.0.tar.gz -> swift-nio-ssl-2.15.0.tar.gz
 	https://github.com/apple/swift-nio/archive/refs/tags/2.31.2.tar.gz -> swift-nio-2.31.2.tar.gz
@@ -28,6 +27,7 @@ SRC_URI="
 	https://github.com/swiftlang/sourcekit-lsp/archive/refs/tags/${P}-RELEASE.tar.gz -> sourcekit-lsp-${PV}.tar.gz
 	https://github.com/swiftlang/swift-cmark/archive/refs/tags/${P}-RELEASE.tar.gz -> swift-cmark-${PV}.tar.gz
 	https://github.com/swiftlang/swift-corelibs-foundation/archive/refs/tags/${P}-RELEASE.tar.gz -> swift-corelibs-foundation-${PV}.tar.gz
+	https://github.com/swiftlang/swift-corelibs-libdispatch/archive/refs/tags/${P}-RELEASE.tar.gz -> swift-corelibs-libdispatch-${PV}.tar.gz
 	https://github.com/swiftlang/swift-corelibs-xctest/archive/refs/tags/${P}-RELEASE.tar.gz -> swift-corelibs-xctest-${PV}.tar.gz
 	https://github.com/swiftlang/swift-docc-render-artifact/archive/refs/tags/${P}-RELEASE.tar.gz -> swift-docc-render-artifact-${PV}.tar.gz
 	https://github.com/swiftlang/swift-docc-symbolkit/archive/refs/tags/${P}-RELEASE.tar.gz -> swift-docc-symbolkit-${PV}.tar.gz


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-10-31 15:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-31 15:12 [gentoo-commits] repo/proj/guru:dev commit in: dev-lang/swift/, dev-lang/swift/files/swift-6.0.1-r1/ Itai Ferber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox