[Midnightbsd-cvs] [MidnightBSD/mports] b3f0f5: lang/swift510: add Swift 5.10.1 port (#1234)
Lucas Holt
noreply at github.com
Fri Sep 11 22:30:08 EDT 2026
Branch: refs/heads/master
Home: https://github.com/MidnightBSD/mports
Commit: b3f0f5d32cfee525bdd5612286a224685edc47db
https://github.com/MidnightBSD/mports/commit/b3f0f5d32cfee525bdd5612286a224685edc47db
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-09-11 (Fri, 11 Sep 2026)
Changed paths:
M lang/Makefile
A lang/swift510/Makefile
A lang/swift510/distinfo
A lang/swift510/files/patch-indexstore-db_Sources_IndexStoreDB_CMakeLists.txt
A lang/swift510/files/patch-llbuild_Package.swift
A lang/swift510/files/patch-llbuild_include_llvm_Config_config.h
A lang/swift510/files/patch-llbuild_lib_LLBSQLite3_module.modulemap
A lang/swift510/files/patch-llbuild_lib_LLBSQLite3_sqlite.h
A lang/swift510/files/patch-llbuild_lib_llvm_Support_CMakeLists.txt
A lang/swift510/files/patch-llbuild_products_llbuildSwift_CMakeLists.txt
A lang/swift510/files/patch-llbuild_utils_adjust-times_adjust-times.cpp
A lang/swift510/files/patch-llvm-project_clang_tools_IndexStore_IndexStore.exports
A lang/swift510/files/patch-llvm-project_compiler-rt_CMakeLists.txt
A lang/swift510/files/patch-llvm-project_compiler-rt_cmake_base-config-ix.cmake
A lang/swift510/files/patch-llvm-project_compiler-rt_cmake_config-ix.cmake
A lang/swift510/files/patch-llvm-project_compiler-rt_lib_cfi_CMakeLists.txt
A lang/swift510/files/patch-llvm-project_compiler-rt_lib_msan_CMakeLists.txt
A lang/swift510/files/patch-llvm-project_compiler-rt_lib_tsan_CMakeLists.txt
A lang/swift510/files/patch-llvm-project_compiler-rt_lib_tsan_dd_CMakeLists.txt
A lang/swift510/files/patch-llvm-project_llvm_cmake_config.guess
A lang/swift510/files/patch-llvm-project_llvm_cmake_modules_AddLLVM.cmake
A lang/swift510/files/patch-llvm-project_llvm_cmake_modules_HandleLLVMOptions.cmake
A lang/swift510/files/patch-llvm-project_llvm_lib_Support_Unix_Path.inc
A lang/swift510/files/patch-llvm-project_llvm_tools_llvm-shlib_CMakeLists.txt
A lang/swift510/files/patch-swift-argument-parser_cmake_modules_SwiftSupport.cmake
A lang/swift510/files/patch-swift-asn1_cmake_modules_SwiftSupport.cmake
A lang/swift510/files/patch-swift-certificates_cmake_modules_SwiftSupport.cmake
A lang/swift510/files/patch-swift-collections_cmake_modules_SwiftSupport.cmake
A lang/swift510/files/patch-swift-corelibs-foundation_CMakeLists.txt
A lang/swift510/files/patch-swift-corelibs-foundation_CoreFoundation_Base.subproj_CFPlatform.c
A lang/swift510/files/patch-swift-corelibs-foundation_CoreFoundation_Base.subproj_CoreFoundation__Prefix.h
A lang/swift510/files/patch-swift-corelibs-foundation_CoreFoundation_NumberDate.subproj_CFDate.c
A lang/swift510/files/patch-swift-corelibs-foundation_CoreFoundation_PlugIn.subproj_CFBundle__Internal.h
A lang/swift510/files/patch-swift-corelibs-foundation_CoreFoundation_RunLoop.subproj_CFRunLoop.c
A lang/swift510/files/patch-swift-corelibs-foundation_Sources_BlocksRuntime_CMakeLists.txt
A lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_FileManager+POSIX.swift
A lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_FileManager.swift
A lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_Host.swift
A lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_NSError.swift
A lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_NSLock.swift
A lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_NSPlatform.swift
A lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_NSSwiftRuntime.swift
A lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_Port.swift
A lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_Process.swift
A lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_Thread.swift
A lang/swift510/files/patch-swift-corelibs-foundation_Sources_Tools_plutil_CMakeLists.txt
A lang/swift510/files/patch-swift-corelibs-foundation_Sources_UUID_CMakeLists.txt
A lang/swift510/files/patch-swift-corelibs-foundation_cmake_modules_SwiftSupport.cmake
A lang/swift510/files/patch-swift-corelibs-libdispatch_CMakeLists.txt
A lang/swift510/files/patch-swift-corelibs-libdispatch_cmake_modules_SwiftSupport.cmake
A lang/swift510/files/patch-swift-corelibs-libdispatch_dispatch_source.h
A lang/swift510/files/patch-swift-corelibs-libdispatch_src_apply.c
A lang/swift510/files/patch-swift-corelibs-libdispatch_src_data.c
A lang/swift510/files/patch-swift-corelibs-libdispatch_src_event_event__config.h
A lang/swift510/files/patch-swift-corelibs-libdispatch_src_event_event__kevent.c
A lang/swift510/files/patch-swift-corelibs-libdispatch_src_event_workqueue.c
A lang/swift510/files/patch-swift-corelibs-libdispatch_src_event_workqueue__internal.h
A lang/swift510/files/patch-swift-corelibs-libdispatch_src_init.c
A lang/swift510/files/patch-swift-corelibs-libdispatch_src_io.c
A lang/swift510/files/patch-swift-corelibs-libdispatch_src_queue.c
A lang/swift510/files/patch-swift-corelibs-libdispatch_src_shims_lock.c
A lang/swift510/files/patch-swift-corelibs-libdispatch_src_shims_lock.h
A lang/swift510/files/patch-swift-corelibs-libdispatch_src_swift_Source.swift
A lang/swift510/files/patch-swift-corelibs-libdispatch_src_swift_Wrapper.swift
A lang/swift510/files/patch-swift-corelibs-libdispatch_tests_CMakeLists.txt
A lang/swift510/files/patch-swift-corelibs-libdispatch_tests_bsdtestharness.c
A lang/swift510/files/patch-swift-corelibs-xctest_CMakeLists.txt
A lang/swift510/files/patch-swift-corelibs-xctest_cmake_modules_SwiftSupport.cmake
A lang/swift510/files/patch-swift-crypto
A lang/swift510/files/patch-swift-driver_Utilities_build-script-helper.py
A lang/swift510/files/patch-swift-stress-tester_SwiftEvolve_Package.swift
A lang/swift510/files/patch-swift-syntax_cmake_modules_AddSwiftHostLibrary.cmake
A lang/swift510/files/patch-swift-system_Sources_System_Errno.swift
A lang/swift510/files/patch-swift-system_Sources_System_Internals_Constants.swift
A lang/swift510/files/patch-swift-system_cmake_modules_SwiftSupport.cmake
A lang/swift510/files/patch-swift-tools-support-core_Sources_TSCBasic_Process.swift
A lang/swift510/files/patch-swift-tools-support-core_Sources_TSCUtility_FSWatch.swift
A lang/swift510/files/patch-swift-tools-support-core_Sources_TSCUtility_InterruptHandler.swift
A lang/swift510/files/patch-swift-tools-support-core_Sources_TSCUtility_Triple.swift
A lang/swift510/files/patch-swift_CMakeLists.txt
A lang/swift510/files/patch-swift_cmake_modules_AddSwiftUnittests.cmake
A lang/swift510/files/patch-swift_cmake_modules_SwiftCXXUtils.cmake
A lang/swift510/files/patch-swift_cmake_modules_SwiftConfigureSDK.cmake
A lang/swift510/files/patch-swift_include_swift_SILOptimizer_Differentiation_DifferentiationInvoker.h
A lang/swift510/files/patch-swift_lib_ClangImporter_ClangImporter.cpp
A lang/swift510/files/patch-swift_lib_IRGen_GenDecl.cpp
A lang/swift510/files/patch-swift_lib_IRGen_IRGen.cpp
A lang/swift510/files/patch-swift_stdlib_cmake_modules_AddSwiftStdlib.cmake
A lang/swift510/files/patch-swift_stdlib_public_Cxx_std_CMakeLists.txt
A lang/swift510/files/patch-swift_stdlib_public_Platform_Platform.swift
A lang/swift510/files/patch-swift_stdlib_public_Platform_glibc.modulemap.gyb
A lang/swift510/files/patch-swift_stdlib_public_SwiftShims_swift_shims_SwiftStdint.h
A lang/swift510/files/patch-swift_stdlib_public_core_CTypes.swift
A lang/swift510/files/patch-swift_stdlib_public_stubs_Random.cpp
A lang/swift510/files/patch-swift_tools_SourceKit_CMakeLists.txt
A lang/swift510/files/patch-swift_tools_SourceKit_cmake_modules_AddSwiftSourceKit.cmake
A lang/swift510/files/patch-swift_tools_libStaticMirror_CMakeLists.txt
A lang/swift510/files/patch-swift_tools_libSwiftScan_CMakeLists.txt
A lang/swift510/files/patch-swift_unittests_AST_CMakeLists.txt
A lang/swift510/files/patch-swift_unittests_ClangImporter_CMakeLists.txt
A lang/swift510/files/patch-swift_unittests_Driver_CMakeLists.txt
A lang/swift510/files/patch-swift_unittests_IDE_CMakeLists.txt
A lang/swift510/files/patch-swift_unittests_Parse_CMakeLists.txt
A lang/swift510/files/patch-swift_unittests_Sema_CMakeLists.txt
A lang/swift510/files/patch-swift_utils_build-script-impl
A lang/swift510/files/patch-swift_utils_swift__build__support_swift__build__support_cmake.py
A lang/swift510/files/patch-swift_utils_swift__build__support_swift__build__support_products_cmark.py
A lang/swift510/files/patch-swift_utils_swift__build__support_swift__build__support_targets.py
A lang/swift510/files/patch-swift_utils_swift__build__support_swift__build__support_toolchain.py
A lang/swift510/files/patch-swiftpm_Sources_Basics_Cancellator.swift
A lang/swift510/files/patch-swiftpm_Sources_Basics_DispatchTimeInterval+Extensions.swift
A lang/swift510/files/patch-swiftpm_Sources_Basics_Triple+Basics.swift
A lang/swift510/files/patch-swiftpm_Sources_Basics_Vendor_Triple+Platforms.swift
A lang/swift510/files/patch-swiftpm_Sources_Basics_Vendor_Triple.swift
A lang/swift510/files/patch-swiftpm_Sources_Build_BuildDescription_ClangTargetBuildDescription.swift
A lang/swift510/files/patch-swiftpm_Sources_Build_BuildPlan_BuildPlan+Product.swift
A lang/swift510/files/patch-swiftpm_Sources_CompilerPluginSupport_CMakeLists.txt
A lang/swift510/files/patch-swiftpm_Sources_PackageDescription_CMakeLists.txt
A lang/swift510/files/patch-swiftpm_Sources_PackagePlugin_CMakeLists.txt
A lang/swift510/files/patch-swiftpm_Sources_SPMSQLite3_CMakeLists.txt
A lang/swift510/files/patch-yams_cmake_modules_SwiftSupport.cmake
A lang/swift510/files/pkg-message.in
A lang/swift510/files/start-build.sh
A lang/swift510/pkg-descr
A lang/swift510/pkg-plist
Log Message:
-----------
lang/swift510: add Swift 5.10.1 port (#1234)
## Summary
- Import FreeBSD's `lang/swift510` and make it build on MidnightBSD 4.0.
- Swift's build system keys on the OS name (`uname -s`, Python
`platform.system()`, `CMAKE_SYSTEM_NAME`), which all say `MidnightBSD`,
while the base clang targets a FreeBSD triple. The patches treat
MidnightBSD as FreeBSD in host detection and install-directory logic
across swift, llvm/compiler-rt, libdispatch, Foundation, XCTest,
llbuild, SwiftPM, indexstore-db and the swift-* helper packages, and
derive the versioned triple from `cc -dumpmachine`.
- LLVM's `Path.inc` needs `<sys/param.h>` on MidnightBSD because
`<osreldate.h>` only defines `__MidnightBSD_version`.
- Makefile: add `LICENSE`, use `TRUE_PREFIX` for the install prefix so
`bmake fake` works, fix `CONFLICTS` to a plain package name, drop the
FreeBSD `PORTREVISION`, register in `lang/Makefile`.
## Test plan
- [x] `bmake clean && bmake package` on MidnightBSD 4.0.6 amd64 (clean
build, plist matches, package created)
- [x] Staged `swiftc` compiles and runs a Foundation-using program
- [x] `swift package init --type executable && swift build` works with
the staged toolchain
- [x] portlint: 0 fatal errors, 1 warning (`!=` assignment used to read
the compiler triple)
- [ ] aarch64 not tested (MidnightBSD has no aarch64 support yet;
`ONLY_FOR_ARCHS` kept from upstream)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01EJMd8zHwNmoYyaYPtcv2Qo
## Summary by Sourcery
Add a Swift 5.10.1 port that builds and packages a functional Swift
toolchain for MidnightBSD 4.0.
New Features:
- Add the Swift 5.10.1 toolchain as a new MidnightBSD language port,
including its SwiftPM, Foundation, XCTest, libdispatch, LLVM, and
related components.
Bug Fixes:
- Adapt Swift and bundled dependencies to build and operate correctly
with MidnightBSD’s FreeBSD-compatible compiler targets, platform APIs,
filesystem layout, and runtime behavior.
Enhancements:
- Align host detection, architecture naming, installation paths,
compiler triples, and runtime linking across the bundled Swift projects
for MidnightBSD.
Build:
- Add the port’s source dependencies, licensing metadata, build
orchestration, installation rules, package description, and complete
package plist.
Tests:
- Verify clean package builds, staged Swift/Foundation compilation,
SwiftPM executable builds, and portlint results on MidnightBSD 4.0.6
amd64.
Chores:
- Register swift510 in the language ports collection.
Signed-off-by: Lucas Holt <luke at foolishgames.com>
Co-authored-by: Claude Fable 5.1 <noreply at anthropic.com>
To unsubscribe from these emails, change your notification settings at https://github.com/MidnightBSD/mports/settings/notifications
More information about the Midnightbsd-cvs
mailing list