I was able to get makecatalogs cross-compiled to x86-64-linux:
Swift-on-Linux works with SwiftPM and not Xcodeproj. I was able to make a Package.swift for makecatalogs, and got it compiling to macOS successfully.
Then I switched to the Linux SDK and:
a) CryptoKit doesn’t exist, so I used tayloraswift/swift-hash for SHA256 icon hashing.
b) NetFS doesn’t exist, so FileRepo.swift needed some munging. I just bypassed GitFileRepo for this POC.
c) CFString isn’t present, so a few CFStrings needed handling. The adminPref() call can be bypassed (CFPreferences also not a thing) and prefs.swift not included in the source list, that cuts down a large number of issues.
d) A few other minor changes that are probably more Swift 6 / Foundation changes...
and I have a binary that actually worked on my Linux package server, generating catalogs and icon hashes!
I can submit this as a PR with some cleaning. I don’t know if this is the stage you’re looking for such things or not.
—Jim