[Midnightbsd-cvs] [MidnightBSD/mports] 8b8c19: lang/swift510: add Swift 5.10.1 port

Lucas Holt noreply at github.com
Fri Sep 11 17:43:45 EDT 2026


  Branch: refs/heads/lang/swift510
  Home:   https://github.com/MidnightBSD/mports
  Commit: 8b8c19e62a2f0b15024d4f4e427f934d69de1662
      https://github.com/MidnightBSD/mports/commit/8b8c19e62a2f0b15024d4f4e427f934d69de1662
  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

Import the FreeBSD lang/swift510 port and make it build on MidnightBSD.

The Swift build system identifies the host by OS name (uname, Python
platform.system(), CMAKE_SYSTEM_NAME), all of which report MidnightBSD,
while the base clang targets a FreeBSD triple. Without changes the build
fell into generic branches and installed runtime libraries into
lib/swift/midnightbsd, where the FreeBSD-triple compiler never looks.

Changes over the FreeBSD port:
- Treat MidnightBSD as FreeBSD in build-script host detection, the
  swift/llvm/compiler-rt/libdispatch CMake files, and the
  install-directory logic of Foundation, XCTest, llbuild, SwiftPM,
  indexstore-db and the swift-* helper packages.
- Derive the target triple from the base compiler (cc -dumpmachine) in
  the Makefile, config.guess and SwiftConfigureSDK.cmake instead of
  uname -r / CMAKE_SYSTEM_VERSION.
- Include <sys/param.h> in LLVM's Path.inc on MidnightBSD, where
  <osreldate.h> does not define __FreeBSD_version.
- Fix compiler-rt's OS directory so runtimes land in lib/clang/*/lib/freebsd.
- Add LICENSE, use TRUE_PREFIX for the install prefix so fake works, fix
  CONFLICTS to a plain package name, and register the port in lang/Makefile.

Validated with bmake clean; bmake package on MidnightBSD 4.0.6 amd64.
The staged swiftc compiles and runs a Foundation program, and
swift package init/build works.

AI-Assisted-by: Claude Fable 5.1 <noreply at anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply at anthropic.com>
Claude-Session: https://claude.ai/code/session_01EJMd8zHwNmoYyaYPtcv2Qo
Signed-off-by: Lucas Holt <luke at foolishgames.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