Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 567514 - dev-lang/swift: high-performance system programming language by Apple
Summary: dev-lang/swift: high-performance system programming language by Apple
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal with 7 votes (vote)
Assignee: Default Assignee for New Packages
Depends on:
Reported: 2015-12-04 02:34 UTC by Seong-ho Cho
Modified: 2022-02-03 05:47 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---

dev-libs/cmark-9999.ebuild (cmark-9999.ebuild,747 bytes, text/plain)
2015-12-05 17:16 UTC, LE GARREC Vincent
=dev-lang/swift-2.2 (dev-lang-swift.tar.gz,5.10 KB, application/gzip)
2016-02-23 03:46 UTC, Andrey Ovcharov
Improved Swift ebuild for version 2.2 (swift-2.2.ebuild,7.05 KB, text/plain)
2016-02-26 14:45 UTC, Anselm Busse
build-swift-2.2.log.xz (build-swift-2.2.log.xz,37.88 KB, application/x-xz)
2016-02-27 21:22 UTC, LE GARREC Vincent
Improved Swift ebuild for version 2.2, <dev-python/sphinx-1.3.5 required (swift-2.2.ebuild,7.06 KB, text/plain)
2016-02-28 16:05 UTC, Anselm Busse
build-swift-2.2_2.log.xz (build-swift-2.2_2.log.xz,68.46 KB, application/x-tar)
2016-02-29 18:11 UTC, LE GARREC Vincent
swift-3.0.2.ebuild (swift-3.0.2.ebuild,5.74 KB, text/plain)
2016-12-16 06:51 UTC, LE GARREC Vincent
swift-3.0-script-impl.patch (swift-3.0-script-impl.patch,535 bytes, patch)
2016-12-16 06:53 UTC, LE GARREC Vincent
Details | Diff
build-3.0.2.log.xz (build-3.0.2.log.xz,43.67 KB, application/x-xz)
2016-12-16 07:02 UTC, LE GARREC Vincent
build-log.3.1.1.xz (build.log-3.1.1.xz,74.32 KB, application/x-xz)
2017-08-20 15:15 UTC, LE GARREC Vincent
swift-3.1.1-ebuild.tar.xz (swift-3.1.1-ebuild.tar.xz,3.20 KB, application/x-xz)
2017-08-20 15:17 UTC, LE GARREC Vincent
swift-9999 ebuild (swift-9999.ebuild,6.29 KB, text/plain)
2021-01-01 16:46 UTC, Rullie
build-9999.log.gz (build.log.gz,125.13 KB, application/gzip)
2021-02-14 13:19 UTC, LE GARREC Vincent
swift-bin-5.5.2 (swift-bin-5.5.2.ebuild,4.30 KB, text/plain)
2022-01-30 19:36 UTC, Rullie

Note You need to log in before you can comment on or make changes to this bug.
Description Seong-ho Cho 2015-12-04 02:34:16 UTC
as we know, apple opens swift compiler, library, and any other things useful to program by using swift language.

so I suggest to add dev-lang/swift-9999 from to the official gentoo portage tree.
Comment 1 LE GARREC Vincent 2015-12-05 07:33:11 UTC
I'm actually trying to write an ebuild and I have two problems:

1) EGIT_REPO_URI does not looks to support multiples repositories. Does it mean that I will need to write one ebuild for each source ? The main script of swift needs all repositories. Is it possible, at first, to create fake ebuilds just to download the source in "egit-src", then a true one that compile all source ?

2) Apple have its own repository for llvm. Should I use this one or force to use the one from ? Does someone knows if there is a difference between those two ?
Comment 2 LE GARREC Vincent 2015-12-05 17:16:20 UTC
Created attachment 418608 [details]

The first dependency not in the tree. Also, my first ebuild. Tell me if there is a problem.
Next ebuild (swift) will take few time too.
Comment 3 LE GARREC Vincent 2015-12-05 21:23:49 UTC
I had a look inside tĥe ebuild of llvm and I found answer for all my questions from comment #2.

But my last question is: does swift really need an ebuild or just an USE flag ? I'm asking because lldb is already an USE flag of llvm, so swift should be too, no ? Maybe llvm's mainteners could do it ?
Comment 4 Chloe Stars 2016-01-25 00:52:11 UTC
AUR has a PKGBUILD ( Could look at that for example usage.
Comment 5 Andrey Ovcharov 2016-02-23 03:46:11 UTC
Created attachment 426280 [details]

=dev-lang/swift-2.2 translated from PKGBUILD.
src_prepare work fine else not so.
Comment 6 Anselm Busse 2016-02-26 14:45:35 UTC
Created attachment 426644 [details]
Improved Swift ebuild for version 2.2
Comment 7 Anselm Busse 2016-02-26 14:46:19 UTC
> =dev-lang/swift-2.2 translated from PKGBUILD.
> src_prepare work fine else not so.

I modified the ebuild and it builds for me now; however I've only tested a "hello world" Swift program both with the compiler and interpreter. The claim by the arch guys that Swift has no installer is not entirely accurate, but it seems to be broken and ongoing work. So I stayed with the "manual" installation. I also made the lldb part depend on a flag. Unfortunately, this part is also broken in the ebuild because it uses the swift installer as well. So far I have no idea how the PKGBUILD works with it.
Comment 8 LE GARREC Vincent 2016-02-27 21:22:46 UTC
Created attachment 426808 [details]

I just tried the second ebuild (too much troubles with the fisrt one sorry), it compiles well but it does not install swift. Please find enclosed the log. At the very end, it looks like there's troubles :

QA Notice: Symbolic link /usr/bin/swiftc points to /usr/bin/swift which does not exist.

and during installation :
>>> Install swift-2.2 into /home/legarrec/info/portage/dev-lang/swift-2.2/image/ category dev-lang
/usr/bin/install: cannot stat 'bin/swift': No such file or directory
/home/legarrec/info/portage/dev-lang/swift-2.2/temp/environment: line 3689: cd: llbuild-linux-x86_64: No such file or directory
/usr/bin/install: cannot stat 'bin/swift-build-tool': No such file or directory
/home/legarrec/info/portage/dev-lang/swift-2.2/temp/environment: line 3691: cd: swiftpm-linux-x86_64: No such file or directory
/usr/bin/install: cannot stat 'debug/swift-build': No such file or directory
/usr/bin/install: cannot stat 'lib/swift/pm/': No such file or directory
/usr/bin/install: cannot stat 'lib/swift/pm/PackageDescription.swiftmodule': No such file or directory
/home/legarrec/info/portage/dev-lang/swift-2.2/temp/environment: line 3696: cd: foundation-linux-x86_64: No such file or directory
/usr/bin/install: cannot stat 'Foundation/': No such file or directory
/usr/bin/install: cannot stat 'Foundation/Foundation.swiftdoc': No such file or directory
/usr/bin/install: cannot stat 'Foundation/Foundation.swiftmodule': No such file or directory
cp: cannot stat 'Foundation/usr/lib/swift/CoreFoundation': No such file or directory
/home/legarrec/info/portage/dev-lang/swift-2.2/temp/environment: line 3702: cd: xctest-linux-x86_64: No such file or directory
/usr/bin/install: cannot stat '': No such file or directory
/usr/bin/install: cannot stat 'XCTest.swiftdoc': No such file or directory
/usr/bin/install: cannot stat 'XCTest.swiftmodule': No such file or directory
/home/legarrec/info/portage/dev-lang/swift-2.2/temp/environment: line 3707: cd: lldb-linux-x86_64: No such file or directory
ninja: error: loading '': No such file or directory
>>> Completed installing swift-2.2 into /home/legarrec/info/portage/dev-lang/swift-2.2/image/

When you build your application, does swift is compiled after the line ?
[473/509] Building HTML documentation FAILED
Comment 9 Anselm Busse 2016-02-28 15:47:21 UTC
Ok, looks like you have the problem with Sphinx not knowing about Swift highlighting. The Arch guys have a patch for that, but because it worked for me, I assumed it was just a problem for them with some outdated software. What version of dev-python/pygments do you have on your system?

The installation just starts because the compile phase does not fail properly. I will fix that, but first have a look at the Sphinx problem.
Comment 10 LE GARREC Vincent 2016-02-28 15:56:47 UTC
I will try to apply the patch for sphinx but be patient, every compilation failure takes about 6 hours of my computer.

Portage 2.2.27 (python 3.4.3-final-0, default/linux/amd64/13.0/desktop/gnome/systemd, gcc-5.3.0, glibc-2.22-r2, 4.4.0-gentoo-r1 x86_64)
                         System Settings
System uname: Linux-4.4.0-gentoo-r1-x86_64-Intel-R-_Core-TM-_i7-3770_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:     8128816 total,    306264 free
KiB Swap:    9767516 total,   9766176 free
Timestamp of repository gentoo: Sun, 28 Feb 2016 07:30:01 +0000
sh bash 4.3_p42-r2
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42-r2::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.22.1::gentoo
dev-lang/python:          2.7.11-r2::gentoo, 3.4.3-r7::gentoo, 3.5.1-r2::gentoo
dev-util/cmake:           3.4.3::gentoo
dev-util/pkgconfig:       0.29::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.20.5::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.6.4::gentoo, 4.7.4::gentoo, 4.8.5::gentoo, 4.9.3::gentoo, 5.3.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r2::gentoo

    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://
    priority: -1000

    location: /home/legarrec/info/overlay
    masters: gentoo
    priority: 0

    location: /var/lib/layman/gentoo-zh
    masters: gentoo
    priority: 50

    location: /var/lib/layman/kde
    masters: gentoo
    priority: 50

    location: /var/lib/layman/science
    masters: gentoo
    priority: 50

    location: /var/lib/layman/steam-overlay
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer"
EMERGE_DEFAULT_OPTS="-j9 --load-average=9"
FCFLAGS="-march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer"
FEATURES="assume-digests binpkg-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news noclean parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer"
LDFLAGS="-Wl,--as-needed -Wl,-O0"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
USE="X a52 aac accessibility acl acpi alsa amd64 berkdb branding bzip2 cairo cdda cdr cli colord cracklib crypt cuda cups cxx dbus declarative dhcpcd dri dts dvd dvdr eds emboss encode evo exif fam firefox flac fortran gdbm gif glamor gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk gtk3 iconv introspection ipv6 jpeg kde kipi lcms ldap libav libnotify libsecret mad mmx mmxext mng modules mp3 mp4 mpeg multilib nautilus ncurses nls nptl ogg opencl opengl openmp pam pango pcre pdf phonon plasma png policykit ppds pulseaudio qml qt3support qt4 qt5 readline sdl seccomp semantic-desktop session spell sse sse2 ssl startup-notification svg systemd tcpd tiff tracker truetype udev udisks unicode upower usb vorbis widgets wxwidgets x264 xattr xcb xcomposite xinerama xml xscreensaver xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4 sse4_1 sse4_2 ssse3" CURL_SSL="openssl" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver" LINGUAS="fr en ja" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

                        Package Settings

dev-python/sphinx-1.3.5::gentoo was built with the following:
USE="-doc -latex -test" ABI_X86="64" PYTHON_TARGETS="python2_7 python3_4 -pypy -python3_3 -python3_5"
dev-python/pygments-2.1.1::gentoo was built with the following:
USE="-doc -test" ABI_X86="64" PYTHON_TARGETS="python2_7 python3_4 -pypy -pypy3 -python3_3 -python3_5"
Comment 11 Anselm Busse 2016-02-28 16:00:07 UTC
No need, I already figured out the problem. You have the unstable version of Sphinx 1.3.5 while I have the stable 1.3.1-r1. 1.3.5 introduced the problem (see So basically we now have two possibilities, stay with Sphinx <1.3.5 until it the mentioned bug is fixed or go with the Arch patch. I would prefer the former one.
Comment 12 Anselm Busse 2016-02-28 16:05:18 UTC
Created attachment 426906 [details]
Improved Swift ebuild for version 2.2, <dev-python/sphinx-1.3.5 required

As just mentioned <dev-python/sphinx-1.3.5 breaks the build process right now. Please see if this ebuild works.
Comment 13 LE GARREC Vincent 2016-02-29 18:11:15 UTC
Created attachment 427022 [details]

This is working better with sphinx-1.3.4.
I was be able to run swift.

swift without args :
"LLVM ERROR: Compiler-internal integrated REPL unimplemented for this platform; use the LLDB-enhanced REPL instead."

but :

echo 'print("Hello World")' > swifthello.swift
swift swifthello.swift

is working well and :

swiftc swifthello.swift -o mypro

is working too.

But in my log, I have :

-- Installing: /home/legarrec/info/portage/dev-lang/swift-2.2/image/usr/include/lldb/lldb-private-enumerations.h
CMake Error at scripts/cmake_install.cmake:36 (file):
  file INSTALL cannot find
Call Stack (most recent call first):
  cmake_install.cmake:42 (include)

The truth is that I don't have …lldb-linux-x86_64/lib/python2.7 but I have …lldb-linux-x86_64/lib64/python2.7

Do you think that cmake_install.cmake should be patch depend on the platform or the modification should be done somewhere else ?
Comment 14 Anselm Busse 2016-03-01 19:22:26 UTC
Yes, I know that this doesn't work as I have indicated in a previous post. The installation process of Swift seems to be ongoing work and as I have already stated none of the installation scripts are working. That's why the Arch guys are doing a "manual" installation, and that's why I adopted it.

Unfortunately, the lldb part is an exception in the PKGBUILD. It uses the installation routine of Swift, which is currently failing on Gentoo as you have experienced. I haven't figured out yet, why it seems to work on Arch but not on Gentoo. Does anyone have an idea whats going wrong, except the obvious that the path doesn't match?
Comment 16 Andrey Ovcharov 2016-09-15 03:26:40 UTC
swift-3.0 is out
Comment 17 Amy Liffey gentoo-dev 2016-12-12 13:43:29 UTC
Would you be willing to maintain this package through Proxy Maintainers project?
Comment 18 Anselm Busse 2016-12-12 14:47:35 UTC
Are you refering to me or Andrey?
Comment 19 Amy Liffey gentoo-dev 2016-12-12 16:03:16 UTC
(In reply to Anselm Busse from comment #18)
> Are you refering to me or Andrey?

Anyone who would be willing to take care about this ebuild or you can also both work on it :)
Comment 20 Seong-ho Cho 2016-12-14 14:28:54 UTC
telling overlay containing swift ebuild seems to encourage us to participate test aggressively.

we're not late ;-) but, i don't know and i'm not sure it's ok now.
Comment 21 LE GARREC Vincent 2016-12-16 06:51:44 UTC
Created attachment 456358 [details]

I tried to convert swift-2.2 to swift 3.0.2. (python 2 => python 3)
Comment 22 LE GARREC Vincent 2016-12-16 06:53:17 UTC
Created attachment 456360 [details, diff]

but it required a new patch file
Comment 23 LE GARREC Vincent 2016-12-16 07:02:05 UTC
Created attachment 456362 [details]

unfortunately, compilation fails (swift crashes) and I still have the problem during installation :

cp: cannot stat 'lib64/swift/clang': No such file or directory
Comment 24 LE GARREC Vincent 2017-08-20 15:14:14 UTC
I worked again with swift.

Now all compile well, all install well but I can't figure what's the problem about the final message : 

Files matching a file type that is not allowed:
 * ERROR: dev-lang/swift-3.1.1::crossdev failed:
 *   multilib-strict check failed!

If i'm right, that's because there's file in …/dev-lang/swift-3.1.1/image/usr/lib  instead of …/usr/lib64 ? Do I have to patch the install so it install in /usr/lib64 instead of /usr/lib (in 64-bit arch) ?
Comment 25 LE GARREC Vincent 2017-08-20 15:15:32 UTC
Created attachment 489784 [details]
Comment 26 LE GARREC Vincent 2017-08-20 15:17:28 UTC
Created attachment 489786 [details]
Comment 27 Rullie 2021-01-01 16:46:30 UTC
Created attachment 680533 [details]
swift-9999 ebuild

I've been tinkering with this and got 9999 to work on amd64, though swift-5.3 branch didn't compile. Overlay is here

Attached the ebuild as well.
Comment 28 LE GARREC Vincent 2021-02-14 13:18:15 UTC
Thanks for your work. I tried you new ebuild. I compiled with success but I have a sandbox violation.

F: open_wr
S: deny
P: /dev/nvidiactl
A: /dev/nvidiactl
R: /dev/nvidiactl
C: /home/legarrec/info/portage/dev-lang/swift-9999/work/build/Ninja-ReleaseAssert/llvm-linux-x86_64/CMakeFiles/CMakeTmp/cmTC_897ea
Comment 29 LE GARREC Vincent 2021-02-14 13:19:37 UTC
Created attachment 686688 [details]
Comment 30 Rullie 2022-01-30 19:36:49 UTC
Created attachment 764005 [details]
Comment 31 Rullie 2022-01-30 19:37:33 UTC
Dialed back on ambition and just tried to work with Apple's official released bin variant. Had some moderate success with latest 5.5.2 release.

See swift-bin-5.5.2 in

Ran into some trouble with LLDB support for Swift REPL. The LLDB from portage seems different from the one Apple ships in their tar file.  So to use REPL you can't have lldb on your system.
Comment 32 Rullie 2022-01-30 19:43:40 UTC
Comment on attachment 764005 [details]

># Copyright 2020 Gentoo Authors
># Distributed under the terms of the GNU General Public License v2
>inherit multilib-minimal
>DESCRIPTION="Swift programming language from Apple"
>KEYWORDS="~amd64 ~x86"
>REQUIRED_USE="clang? ( !repl )"
>IUSE="repl icu clang"
>RESTRICT="repl? ( strip )"
>		!!sys-devel/clang:10
>		!!dev-lang/swift
>		"
>		clang? ( sys-devel/clang:13 )
>		repl? ( !!dev-util/lldb 
>                        dev-libs/libedit )
>		dev-lang/python:3.7
>		sys-devel/lld
>		icu? ( dev-libs/icu-layoutex )
>		dev-util/systemtap
>		"
>src_install() {
>	ZIPDIR=swift-${PV}-RELEASE-amazonlinux2
>	if ! use clang; then
>		dobin ${WORKDIR}/${ZIPDIR}/usr/bin/clang-10
>		dobin ${WORKDIR}/${ZIPDIR}/usr/bin/clangd
>		dosym clang-10 /usr/bin/clang
>		dosym clang /usr/bin/clang++
>		dosym clang /usr/bin/clang-cl
>		dosym clang /usr/bin/clang-cpp
>	fi
>	#dobin ${WORKDIR}/${ZIPDIR}/usr/bin/lld
>	if use repl; then
>		dobin ${WORKDIR}/${ZIPDIR}/usr/bin/lldb
>		dobin ${WORKDIR}/${ZIPDIR}/usr/bin/lldb-argdumper
>		dobin ${WORKDIR}/${ZIPDIR}/usr/bin/lldb-server
>	fi
>	dobin ${WORKDIR}/${ZIPDIR}/usr/bin/plutil
>	dobin ${WORKDIR}/${ZIPDIR}/usr/bin/repl_swift
>	dobin ${WORKDIR}/${ZIPDIR}/usr/bin/sourcekit-lsp
>	dobin ${WORKDIR}/${ZIPDIR}/usr/bin/
>	dobin ${WORKDIR}/${ZIPDIR}/usr/bin/swift-build
>	dobin ${WORKDIR}/${ZIPDIR}/usr/bin/swift-build-sdk-interfaces
>	dobin ${WORKDIR}/${ZIPDIR}/usr/bin/swift-build-tool
>	dobin ${WORKDIR}/${ZIPDIR}/usr/bin/swift-demangle
>	dobin ${WORKDIR}/${ZIPDIR}/usr/bin/swift-driver
>	dobin ${WORKDIR}/${ZIPDIR}/usr/bin/swift-frontend
>	dobin ${WORKDIR}/${ZIPDIR}/usr/bin/swift-help
>	dobin ${WORKDIR}/${ZIPDIR}/usr/bin/swift-package
>	dobin ${WORKDIR}/${ZIPDIR}/usr/bin/swift-package-collection
>	dobin ${WORKDIR}/${ZIPDIR}/usr/bin/swift-run
>	dobin ${WORKDIR}/${ZIPDIR}/usr/bin/swift-test
>	#dosym lld /usr/bin/ld64.lld
>	#dosym lld /usr/bin/ld64.lld.darwinnew
>	#dosym lld /usr/bin/ld.lld
>	#dosym lld /usr/bin/lld-link
>	#dosym lld /usr/bin/wasm-ld
>	dosym swift-frontend /usr/bin/swift
>	dosym swift-frontend /usr/bin/swift-api-digester
>	dosym swift-frontend /usr/bin/swift-api-extract
>	dosym swift-frontend /usr/bin/swift-autolink-extract
>	dosym swift-frontend /usr/bin/swiftc
>	dosym swift-frontend /usr/bin/swift-symbolgraph-extract
>	dosym swift-frontend /usr/bin/swift-symbolgraph-extract
>	doheader -r ${WORKDIR}/${ZIPDIR}/usr/include
> ${WORKDIR}/${ZIPDIR}/usr/lib/
> ${WORKDIR}/${ZIPDIR}/usr/lib/
> ${WORKDIR}/${ZIPDIR}/usr/lib/
>	if use repl; then
> ${WORKDIR}/${ZIPDIR}/usr/lib/
>	fi
>	insinto /usr/lib
>	doins -r ${WORKDIR}/${ZIPDIR}/usr/lib/swift
>	doins -r ${WORKDIR}/${ZIPDIR}/usr/lib/swift_static
>	dosym /usr/lib64/
>	if use repl; then
>		dosym /usr/lib64/
>		dosym /usr/lib64/
>	fi
>	dosym ../lib64/ /usr/lib/
>	dosym ../lib64/ /usr/lib/
>	if use repl; then
>		dosym ../lib64/ /usr/lib/
>		dosym ../lib64/ /usr/lib/
>		dosym ../lib64/ /usr/lib/
>	fi
>	dosym ../lib64/ /usr/lib/
>	dosym ../lib64/ /usr/lib/
>	if use clang; then
>		# We need to fix symlink path to clang
>		CLANG_VERSION=`clang --version | grep "clang version"`
>		dosym ../../lib/clang/${CLANG_VERSION_TOKEN[2]} /usr/lib64/swift/clang
>		dosym ../../lib/clang/${CLANG_VERSION_TOKEN[2]} /usr/lib64/swift_static/clang
>		# Hard coded to 13 for now
>		dosym ../lib/llvm/13/bin/clang /usr/bin/clang
>	else
>		# Or use use Apple's built in Clang 10.0.0
>		insinto /usr/lib/clang/
>		doins -r ${WORKDIR}/${ZIPDIR}/usr/lib/clang/10.0.0
>	fi
>	insinto /usr/local
>	doins -r ${WORKDIR}/${ZIPDIR}/usr/local/include
>	dodoc -r ${WORKDIR}/${ZIPDIR}/usr/share/doc/swift
>	insinto /usr/share
>	doins -r ${WORKDIR}/${ZIPDIR}/usr/share/icuswift
>	doins -r ${WORKDIR}/${ZIPDIR}/usr/share/swift
>	doman ${WORKDIR}/${ZIPDIR}/usr/share/man/man1/*.1