summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Hansen2017-05-03 15:54:50 -0700
committerMichael Hansen2017-05-03 15:54:50 -0700
commit04712f8ad8b99570d7b7b78fc79726822d762c1e (patch)
treeea3fcd95768c87de51fc7bbcdb57eb0a163d1be2
parente8d173a06f17d02dfd8723ce9d9660e0871e8142 (diff)
downloadaur-04712f8ad8b99570d7b7b78fc79726822d762c1e.tar.gz
Update to 2017-04-24 snapshot with fixes from release
-rw-r--r--.SRCINFO61
-rw-r--r--PKGBUILD144
-rw-r--r--icu59.patch100
-rw-r--r--sourcekit_link_order.patch12
-rw-r--r--swift-sphinx2.patch20
5 files changed, 227 insertions, 110 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3ebb406cd8ae..abf57538228a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
# Generated by mksrcinfo v8
-# Mon Sep 12 16:30:54 UTC 2016
+# Wed May 3 22:53:29 UTC 2017
pkgbase = swift-development
pkgdesc = The Swift programming language and debugger - latest development snapshot
- pkgver = DEVELOPMENT.SNAPSHOT.2016.09.11.a
+ pkgver = DEVELOPMENT.SNAPSHOT.2017.04.24.a
pkgrel = 1
url = http://swift.org/
arch = i686
@@ -16,6 +16,8 @@ pkgbase = swift-development
makedepends = python2-six
makedepends = perl
makedepends = python2-sphinx
+ makedepends = python2-requests
+ makedepends = rsync
depends = python2
depends = libutil-linux
depends = icu
@@ -25,30 +27,35 @@ pkgbase = swift-development
depends = sqlite
depends = ncurses
depends = libkqueue
- source = swift-DEVELOPMENT-SNAPSHOT-2016-09-11-a.tar.gz::https://github.com/apple/swift/archive/swift-DEVELOPMENT-SNAPSHOT-2016-09-11-a.tar.gz
- source = swift-llvm-DEVELOPMENT-SNAPSHOT-2016-09-11-a.tar.gz::https://github.com/apple/swift-llvm/archive/swift-DEVELOPMENT-SNAPSHOT-2016-09-11-a.tar.gz
- source = swift-clang-DEVELOPMENT-SNAPSHOT-2016-09-11-a.tar.gz::https://github.com/apple/swift-clang/archive/swift-DEVELOPMENT-SNAPSHOT-2016-09-11-a.tar.gz
- source = swift-lldb-DEVELOPMENT-SNAPSHOT-2016-09-11-a.tar.gz::https://github.com/apple/swift-lldb/archive/swift-DEVELOPMENT-SNAPSHOT-2016-09-11-a.tar.gz
- source = swift-cmark-DEVELOPMENT-SNAPSHOT-2016-09-11-a.tar.gz::https://github.com/apple/swift-cmark/archive/swift-DEVELOPMENT-SNAPSHOT-2016-09-11-a.tar.gz
- source = swift-llbuild-DEVELOPMENT-SNAPSHOT-2016-09-11-a.tar.gz::https://github.com/apple/swift-llbuild/archive/swift-DEVELOPMENT-SNAPSHOT-2016-09-11-a.tar.gz
- source = swift-package-manager-DEVELOPMENT-SNAPSHOT-2016-09-11-a.tar.gz::https://github.com/apple/swift-package-manager/archive/swift-DEVELOPMENT-SNAPSHOT-2016-09-11-a.tar.gz
- source = swift-corelibs-xctest-DEVELOPMENT-SNAPSHOT-2016-09-11-a.tar.gz::https://github.com/apple/swift-corelibs-xctest/archive/swift-DEVELOPMENT-SNAPSHOT-2016-09-11-a.tar.gz
- source = swift-corelibs-foundation-DEVELOPMENT-SNAPSHOT-2016-09-11-a.tar.gz::https://github.com/apple/swift-corelibs-foundation/archive/swift-DEVELOPMENT-SNAPSHOT-2016-09-11-a.tar.gz
- source = swift-corelibs-libdispatch-DEVELOPMENT-SNAPSHOT-2016-09-11-a.tar.gz::https://github.com/apple/swift-corelibs-libdispatch/archive/swift-DEVELOPMENT-SNAPSHOT-2016-09-11-a.tar.gz
- source = swift-integration-tests-DEVELOPMENT-SNAPSHOT-2016-09-11-a.tar.gz::https://github.com/apple/swift-integration-tests/archive/swift-DEVELOPMENT-SNAPSHOT-2016-09-11-a.tar.gz
- source = swift-sphinx2.patch
- sha256sums = 58199b8609ccacef040ff7e59d35c7a0b8654a645f174af7e2c0d261cadcd5e7
- sha256sums = 12cbf808dc2dd5e9a6e2e7d240fd5801ca8cfe34e29ca45bae7580f09151aee2
- sha256sums = ad7049aa2605a89979bd8b2b8d6351ed4404ed333321afc57e48809e65cb8d82
- sha256sums = 9bf136b61a96da54ae17711e8f795114db5366167f31f4f351db29c19303c957
- sha256sums = ff563d8a7b9dc637c0d2112f3d15880a3d9e1773bf0636a0ac2ea15938246d32
- sha256sums = 8db094fb8d2060e18691ceac256810f7d25ad466db74022523532769716dcf0a
- sha256sums = 02809c30b4ff55b349e52b6c4371a28fdb9732a9e6151480b3fb091de0148a15
- sha256sums = 0af3adcd3a503aefb6f94d75ca5d77bc8bfa5a9f25575c4546b4cbff5b5f8c85
- sha256sums = 91126e3bdf3fc9650b874af99ad7e89a8b6fda1f3185201d51feeff35393ee8e
- sha256sums = fa0820028b5eb4376b6555d0ab6b7fce29fc32509a7a501b81d9f4e7459f8295
- sha256sums = c63e5493b70e494c9998f7c657b6ba7314f583134c420f35d019b9d5e5ebdf0a
- sha256sums = 93bbe769666aab15b15d12e2423f213b39d6c47237eafc781569698c8367535f
+ depends = libblocksruntime
+ source = swift-DEVELOPMENT-SNAPSHOT-2017-04-24-a.tar.gz::https://github.com/apple/swift/archive/swift-DEVELOPMENT-SNAPSHOT-2017-04-24-a.tar.gz
+ source = swift-llvm-DEVELOPMENT-SNAPSHOT-2017-04-24-a.tar.gz::https://github.com/apple/swift-llvm/archive/swift-DEVELOPMENT-SNAPSHOT-2017-04-24-a.tar.gz
+ source = swift-clang-DEVELOPMENT-SNAPSHOT-2017-04-24-a.tar.gz::https://github.com/apple/swift-clang/archive/swift-DEVELOPMENT-SNAPSHOT-2017-04-24-a.tar.gz
+ source = swift-lldb-DEVELOPMENT-SNAPSHOT-2017-04-24-a.tar.gz::https://github.com/apple/swift-lldb/archive/swift-DEVELOPMENT-SNAPSHOT-2017-04-24-a.tar.gz
+ source = swift-cmark-DEVELOPMENT-SNAPSHOT-2017-04-24-a.tar.gz::https://github.com/apple/swift-cmark/archive/swift-DEVELOPMENT-SNAPSHOT-2017-04-24-a.tar.gz
+ source = swift-llbuild-DEVELOPMENT-SNAPSHOT-2017-04-24-a.tar.gz::https://github.com/apple/swift-llbuild/archive/swift-DEVELOPMENT-SNAPSHOT-2017-04-24-a.tar.gz
+ source = swift-package-manager-DEVELOPMENT-SNAPSHOT-2017-04-24-a.tar.gz::https://github.com/apple/swift-package-manager/archive/swift-DEVELOPMENT-SNAPSHOT-2017-04-24-a.tar.gz
+ source = swift-corelibs-xctest-DEVELOPMENT-SNAPSHOT-2017-04-24-a.tar.gz::https://github.com/apple/swift-corelibs-xctest/archive/swift-DEVELOPMENT-SNAPSHOT-2017-04-24-a.tar.gz
+ source = swift-corelibs-foundation-DEVELOPMENT-SNAPSHOT-2017-04-24-a.tar.gz::https://github.com/apple/swift-corelibs-foundation/archive/swift-DEVELOPMENT-SNAPSHOT-2017-04-24-a.tar.gz
+ source = swift-corelibs-libdispatch-DEVELOPMENT-SNAPSHOT-2017-04-24-a.tar.gz::https://github.com/apple/swift-corelibs-libdispatch/archive/swift-DEVELOPMENT-SNAPSHOT-2017-04-24-a.tar.gz
+ source = swift-integration-tests-DEVELOPMENT-SNAPSHOT-2017-04-24-a.tar.gz::https://github.com/apple/swift-integration-tests/archive/swift-DEVELOPMENT-SNAPSHOT-2017-04-24-a.tar.gz
+ source = libpwq-18437d2be372f4422b207ec6442c8caf7974025d.tar.gz::https://github.com/mheily/libpwq/archive/18437d2be372f4422b207ec6442c8caf7974025d.tar.gz
+ source = sourcekit_link_order.patch
+ source = icu59.patch
+ sha256sums = 494d69f05d711e8df08cc7a7183e3f9735e091bc12bda7000ba5d6108c1c3275
+ sha256sums = 30dd5dbe9fa2247bc02a2150fdd4bc874d98f5cf15f179a7134bff664cc05667
+ sha256sums = 2e4379158a6170c8602aab69efe21553a6847cb06747dc20ebea8028d9512ace
+ sha256sums = e488bf6a9fe4d2b5813ca9263134a198341aa50c5f92be1117d96bd4421aedc2
+ sha256sums = eb1cdc5d8b6192cc3b77356c30c203c6f7d60202e91af3920fa4c087f5ba38d4
+ sha256sums = 6909e33f2de65967b8b378d49c85169338db0b360c954ed490ea167920c3d8f7
+ sha256sums = fc815e12e435eba96dab858596403bc1d0e5a069471da4a8dfc1a99de374785f
+ sha256sums = 812be01ed103624a49a9cc722b77ecd0c237b61412604de881dabe47abbe984a
+ sha256sums = 4cffca269ab81ce725143c1c630de1b4ab385b79f49dd8c1c9bf41cd31f7bb6b
+ sha256sums = 38fe4ec76f99477f4ed3e1a769e3d5fd9671b3daa9f5a4005d6252845b8a5b5f
+ sha256sums = 392055443e04515a5c94a1ab736d6959ce2354ac2ee8418c8bf3dc2124240969
+ sha256sums = d6290d649d25230813cd27dbad49ea0b68bb9302df76c3fdd0f24ebc8b1b5b00
+ sha256sums = c9aa6e167a57ed31002471204d39bf24bb4ebecc38322571515ac73f02b237b6
+ sha256sums = 3fedb626b375f6ad8b4601abd336f4560718a9c9134716f0c3a4e823b8c12857
pkgname = swift-development
pkgdesc = The Swift programming language compiler and tools - development snapshot
@@ -62,7 +69,7 @@ pkgname = swift-development
pkgname = swift-lldb-development
pkgdesc = The Swift programming language debugger (LLDB) and REPL - development snapshot
- depends = swift-language
+ depends = swift-development
depends = python2-six
provides = lldb
provides = swift-lldb
diff --git a/PKGBUILD b/PKGBUILD
index 0989ddd45137..85fea291ea5a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,8 @@
+# Maintainer: Michael Hansen <zrax0111 gmail com>
+
pkgbase=swift-development
pkgname=(swift-development swift-lldb-development)
-_swiftver=DEVELOPMENT-SNAPSHOT-2016-09-11-a
+_swiftver=DEVELOPMENT-SNAPSHOT-2017-04-24-a
pkgver=${_swiftver//-/.}
pkgrel=1
pkgdesc="The Swift programming language and debugger - latest development snapshot"
@@ -8,9 +10,11 @@ arch=('i686' 'x86_64')
url="http://swift.org/"
license=('apache')
depends=('python2' 'libutil-linux' 'icu' 'libbsd' 'libedit' 'libxml2'
- 'sqlite' 'ncurses' 'libkqueue')
+ 'sqlite' 'ncurses' 'libkqueue' 'libblocksruntime')
makedepends=('git' 'cmake' 'ninja' 'swig' 'clang>=3.8' 'python2-six' 'perl'
- 'python2-sphinx')
+ 'python2-sphinx' 'python2-requests' 'rsync')
+
+_libpwq_ref=18437d2be372f4422b207ec6442c8caf7974025d
source=(
"swift-${_swiftver}.tar.gz::https://github.com/apple/swift/archive/swift-${_swiftver}.tar.gz"
"swift-llvm-${_swiftver}.tar.gz::https://github.com/apple/swift-llvm/archive/swift-${_swiftver}.tar.gz"
@@ -23,20 +27,24 @@ source=(
"swift-corelibs-foundation-${_swiftver}.tar.gz::https://github.com/apple/swift-corelibs-foundation/archive/swift-${_swiftver}.tar.gz"
"swift-corelibs-libdispatch-${_swiftver}.tar.gz::https://github.com/apple/swift-corelibs-libdispatch/archive/swift-${_swiftver}.tar.gz"
"swift-integration-tests-${_swiftver}.tar.gz::https://github.com/apple/swift-integration-tests/archive/swift-${_swiftver}.tar.gz"
- "swift-sphinx2.patch"
+ "libpwq-${_libpwq_ref}.tar.gz::https://github.com/mheily/libpwq/archive/${_libpwq_ref}.tar.gz"
+ "sourcekit_link_order.patch"
+ "icu59.patch"
)
-sha256sums=('58199b8609ccacef040ff7e59d35c7a0b8654a645f174af7e2c0d261cadcd5e7'
- '12cbf808dc2dd5e9a6e2e7d240fd5801ca8cfe34e29ca45bae7580f09151aee2'
- 'ad7049aa2605a89979bd8b2b8d6351ed4404ed333321afc57e48809e65cb8d82'
- '9bf136b61a96da54ae17711e8f795114db5366167f31f4f351db29c19303c957'
- 'ff563d8a7b9dc637c0d2112f3d15880a3d9e1773bf0636a0ac2ea15938246d32'
- '8db094fb8d2060e18691ceac256810f7d25ad466db74022523532769716dcf0a'
- '02809c30b4ff55b349e52b6c4371a28fdb9732a9e6151480b3fb091de0148a15'
- '0af3adcd3a503aefb6f94d75ca5d77bc8bfa5a9f25575c4546b4cbff5b5f8c85'
- '91126e3bdf3fc9650b874af99ad7e89a8b6fda1f3185201d51feeff35393ee8e'
- 'fa0820028b5eb4376b6555d0ab6b7fce29fc32509a7a501b81d9f4e7459f8295'
- 'c63e5493b70e494c9998f7c657b6ba7314f583134c420f35d019b9d5e5ebdf0a'
- '93bbe769666aab15b15d12e2423f213b39d6c47237eafc781569698c8367535f')
+sha256sums=('494d69f05d711e8df08cc7a7183e3f9735e091bc12bda7000ba5d6108c1c3275'
+ '30dd5dbe9fa2247bc02a2150fdd4bc874d98f5cf15f179a7134bff664cc05667'
+ '2e4379158a6170c8602aab69efe21553a6847cb06747dc20ebea8028d9512ace'
+ 'e488bf6a9fe4d2b5813ca9263134a198341aa50c5f92be1117d96bd4421aedc2'
+ 'eb1cdc5d8b6192cc3b77356c30c203c6f7d60202e91af3920fa4c087f5ba38d4'
+ '6909e33f2de65967b8b378d49c85169338db0b360c954ed490ea167920c3d8f7'
+ 'fc815e12e435eba96dab858596403bc1d0e5a069471da4a8dfc1a99de374785f'
+ '812be01ed103624a49a9cc722b77ecd0c237b61412604de881dabe47abbe984a'
+ '4cffca269ab81ce725143c1c630de1b4ab385b79f49dd8c1c9bf41cd31f7bb6b'
+ '38fe4ec76f99477f4ed3e1a769e3d5fd9671b3daa9f5a4005d6252845b8a5b5f'
+ '392055443e04515a5c94a1ab736d6959ce2354ac2ee8418c8bf3dc2124240969'
+ 'd6290d649d25230813cd27dbad49ea0b68bb9302df76c3fdd0f24ebc8b1b5b00'
+ 'c9aa6e167a57ed31002471204d39bf24bb4ebecc38322571515ac73f02b237b6'
+ '3fedb626b375f6ad8b4601abd336f4560718a9c9134716f0c3a4e823b8c12857')
prepare() {
# Use python2 where appropriate
@@ -49,7 +57,8 @@ prepare() {
sed -i '/^cmake_minimum_required/a set(Python_ADDITIONAL_VERSIONS 2.7)' \
"$srcdir/swift-lldb-swift-${_swiftver}/CMakeLists.txt"
sed -i 's/\<python\>/&2/' \
- "$srcdir/swift-swift-${_swiftver}/utils/build-script-impl"
+ "$srcdir/swift-swift-${_swiftver}/utils/build-script-impl" \
+ "$srcdir/swift-swift-${_swiftver}/test/sil-passpipeline-dump/basic.test-sh"
# Use directory names which build-script expects
for sdir in llvm clang lldb cmark llbuild; do
@@ -63,20 +72,46 @@ prepare() {
ln -sf swift-swift-${_swiftver} swift
ln -sf swift-package-manager-swift-${_swiftver} swiftpm
- # Sphinx 1.3.5 raises a warning (promoted to error) when using an unknown
- # syntax highlighting language (like "swift").
- ( cd "${srcdir}/swift" && patch -p1 -i "${srcdir}/swift-sphinx2.patch" )
+ # Put libpwq in the right submodule location
+ rmdir swift-corelibs-libdispatch/libpwq
+ mv libpwq-${_libpwq_ref} swift-corelibs-libdispatch/libpwq
+
+ # Fix library link order for sourcekitd-test
+ ( cd "${srcdir}/swift" && patch -p1 -i "${srcdir}/sourcekit_link_order.patch" )
+
+ # ICU 59 changed the type of UChar to char16_t
+ ( cd "${srcdir}/swift" && patch -p1 -i "${srcdir}/icu59.patch" )
}
+_common_build_params=(
+ --install-prefix=/usr
+ --lldb
+ --llbuild
+ --swiftpm
+ --xctest
+ --foundation
+ --libdispatch
+)
+
build() {
cd "$srcdir/swift"
export SWIFT_SOURCE_ROOT="$srcdir"
- export LDFLAGS='-ldl -lpthread'
export PATH="$PATH:/usr/bin/core_perl"
- utils/build-script -R \
- --lldb --llbuild --swiftpm --xctest --foundation --libdispatch \
- -j "$(lscpu --parse=CPU | grep -v '^#' | wc -l)"
+ utils/build-script -R "${_common_build_params[@]}"
+
+ # Run the build a second time, this time with SourceKit enabled
+ # This is required because SourceKit depends on libdispatch, which
+ # in turn depends on swift, where SourceKit is located
+ utils/build-script -R "${_common_build_params[@]}" \
+ --extra-cmake-options="-DSWIFT_BUILD_SOURCEKIT=TRUE" \
+ --reconfigure
+
+ # Fix the lldb swig binding's import path (matches Arch LLDB package)
+ # Need to do this before check(), since the test suite uses the lldb
+ # python bindings directly from the build dir
+ sed -i "/import_module('_lldb')/s/_lldb/lldb.&/" \
+ "${srcdir}/build/Ninja-ReleaseAssert/lldb-linux-${CARCH}/lib/python2.7/site-packages/lldb/__init__.py"
}
check() {
@@ -92,19 +127,25 @@ package_swift-development() {
conflicts=('swift-language-git' 'swift-git' 'swift-bin' 'swift')
optdepends=('swift-lldb: Swift REPL and debugger')
- cd "$srcdir/build/Ninja-ReleaseAssert"
+ cd "$srcdir/swift"
- install -dm755 "$pkgdir/usr/bin"
- install -dm755 "$pkgdir/usr/lib/swift"
+ export SWIFT_SOURCE_ROOT="$srcdir"
+ utils/build-script -R "${_common_build_params[@]}" \
+ --install-destdir="$pkgdir" \
+ --install-llbuild --install-swiftpm --install-xctest \
+ --install-foundation
+
+ cd "$srcdir/build/Ninja-ReleaseAssert"
- # Swift's components don't provide an install target :(
- # These are based roughly on what's included in the binary release packages
+ # Some projects' install targets don't work correctly :(
(
cd swift-linux-$CARCH
install -m755 bin/swift bin/swift-{demangle,ide-test} "$pkgdir/usr/bin"
ln -s swift "$pkgdir/usr/bin/swiftc"
ln -s swift "$pkgdir/usr/bin/swift-autolink-extract"
+ install -m644 lib/libsourcekitdInProc.so "$pkgdir/usr/lib"
+
install -dm755 "$pkgdir/usr/share/man/man1"
install -m644 docs/tools/swift.1 "$pkgdir/usr/share/man/man1"
@@ -112,37 +153,14 @@ package_swift-development() {
cp -rL lib/swift/{clang,linux,shims} "$pkgdir/usr/lib/swift/"
)
(
- cd llbuild-linux-$CARCH
- install -m755 bin/swift-build-tool "$pkgdir/usr/bin"
- )
- (
- cd swiftpm-linux-$CARCH
- install -m755 debug/swift-{build,test,package} "$pkgdir/usr/bin"
-
- install -dm755 "$pkgdir/usr/lib/swift/pm"
- install -m755 lib/swift/pm/libPackageDescription.so "$pkgdir/usr/lib/swift/pm"
- install -m644 lib/swift/pm/PackageDescription.swiftmodule "$pkgdir/usr/lib/swift/pm"
- )
- (
- cd xctest-linux-$CARCH
- install -m755 libXCTest.so "$pkgdir/usr/lib/swift/linux/"
- install -m644 XCTest.swiftdoc "$pkgdir/usr/lib/swift/linux/$CARCH"
- install -m644 XCTest.swiftmodule "$pkgdir/usr/lib/swift/linux/$CARCH"
- )
- (
- cd foundation-linux-$CARCH
- install -m755 Foundation/libFoundation.so "$pkgdir/usr/lib/swift/linux/"
- install -m644 Foundation/Foundation.swiftdoc "$pkgdir/usr/lib/swift/linux/$CARCH"
- install -m644 Foundation/Foundation.swiftmodule "$pkgdir/usr/lib/swift/linux/$CARCH"
-
- umask 0022
- cp -r Foundation/usr/lib/swift/CoreFoundation "$pkgdir/usr/lib/swift/"
- )
- (
cd libdispatch-linux-$CARCH
make install DESTDIR="$pkgdir"
)
+ # Some install targets provide an empty /usr/local/include
+ rmdir "$pkgdir/usr/local/include"
+ rmdir "$pkgdir/usr/local"
+
# License file
install -dm755 "$pkgdir/usr/share/licenses/swift"
install -m644 "$srcdir/swift/LICENSE.txt" "$pkgdir/usr/share/licenses/swift"
@@ -150,19 +168,19 @@ package_swift-development() {
package_swift-lldb-development() {
pkgdesc='The Swift programming language debugger (LLDB) and REPL - development snapshot'
- depends=('swift-language' 'python2-six')
+ depends=('swift-development' 'python2-six')
provides=('lldb' 'swift-lldb')
conflicts=('lldb' 'swift-lldb')
options=('!strip') # Don't strip repl_swift -- we need its symbols
- cd "$srcdir/build/Ninja-ReleaseAssert"
+ cd "$srcdir/swift"
- # Install swift-capable lldb
- (
- cd lldb-linux-$CARCH
- DESTDIR="$pkgdir" ninja install
- )
+ export SWIFT_SOURCE_ROOT="$srcdir"
+ utils/build-script -R "${_common_build_params[@]}" \
+ --install-destdir="$pkgdir" \
+ --install-lldb
# This should be provided from python2-six
rm "$pkgdir/usr/lib/python2.7/site-packages/six.py"
+ rm "$pkgdir/usr/lib/python2.7/site-packages/six.pyc"
}
diff --git a/icu59.patch b/icu59.patch
new file mode 100644
index 000000000000..1fe69f72b626
--- /dev/null
+++ b/icu59.patch
@@ -0,0 +1,100 @@
+diff -rupN a/stdlib/public/stubs/UnicodeNormalization.cpp b/stdlib/public/stubs/UnicodeNormalization.cpp
+--- a/stdlib/public/stubs/UnicodeNormalization.cpp 2017-05-02 15:42:43.465819610 -0700
++++ b/stdlib/public/stubs/UnicodeNormalization.cpp 2017-05-02 15:46:47.788404828 -0700
+@@ -86,11 +86,7 @@ private:
+ for (unsigned char c = 0; c < 128; ++c) {
+ UErrorCode ErrorCode = U_ZERO_ERROR;
+ intptr_t NumCollationElts = 0;
+-#if defined(__CYGWIN__) || defined(_MSC_VER)
+ UChar Buffer[1];
+-#else
+- uint16_t Buffer[1];
+-#endif
+ Buffer[0] = c;
+
+ UCollationElements *CollationIterator =
+@@ -127,18 +123,12 @@ swift::_swift_stdlib_unicode_compare_utf
+ int32_t LeftLength,
+ const uint16_t *RightString,
+ int32_t RightLength) {
+-#if defined(__CYGWIN__) || defined(_MSC_VER)
+- // ICU UChar type is platform dependent. In Cygwin, it is defined
+- // as wchar_t which size is 2. It seems that the underlying binary
++ // ICU UChar type is always char16_t as of ICU 59.
++ // It seems that the underlying binary
+ // representation is same with swift utf16 representation.
+ return ucol_strcoll(GetRootCollator(),
+ reinterpret_cast<const UChar *>(LeftString), LeftLength,
+ reinterpret_cast<const UChar *>(RightString), RightLength);
+-#else
+- return ucol_strcoll(GetRootCollator(),
+- LeftString, LeftLength,
+- RightString, RightLength);
+-#endif
+ }
+
+ /// Compares the strings via the Unicode Collation Algorithm on the root locale.
+@@ -156,12 +146,8 @@ swift::_swift_stdlib_unicode_compare_utf
+ UErrorCode ErrorCode = U_ZERO_ERROR;
+
+ uiter_setUTF8(&LeftIterator, reinterpret_cast<const char *>(LeftString), LeftLength);
+-#if defined(__CYGWIN__) || defined(_MSC_VER)
+ uiter_setString(&RightIterator, reinterpret_cast<const UChar *>(RightString),
+ RightLength);
+-#else
+- uiter_setString(&RightIterator, RightString, RightLength);
+-#endif
+
+ uint32_t Diff = ucol_strcollIter(GetRootCollator(),
+ &LeftIterator, &RightIterator, &ErrorCode);
+@@ -199,14 +185,9 @@ swift::_swift_stdlib_unicode_compare_utf
+ void *swift::_swift_stdlib_unicodeCollationIterator_create(
+ const __swift_uint16_t *Str, __swift_uint32_t Length) {
+ UErrorCode ErrorCode = U_ZERO_ERROR;
+-#if defined(__CYGWIN__) || defined(_MSC_VER)
+ UCollationElements *CollationIterator = ucol_openElements(
+ GetRootCollator(), reinterpret_cast<const UChar *>(Str), Length,
+ &ErrorCode);
+-#else
+- UCollationElements *CollationIterator = ucol_openElements(
+- GetRootCollator(), Str, Length, &ErrorCode);
+-#endif
+ if (U_FAILURE(ErrorCode)) {
+ swift::crash("_swift_stdlib_unicodeCollationIterator_create: ucol_openElements() failed.");
+ }
+@@ -244,17 +225,11 @@ swift::_swift_stdlib_unicode_strToUpper(
+ const uint16_t *Source,
+ int32_t SourceLength) {
+ UErrorCode ErrorCode = U_ZERO_ERROR;
+-#if defined(__CYGWIN__) || defined(_MSC_VER)
+ uint32_t OutputLength = u_strToUpper(reinterpret_cast<UChar *>(Destination),
+ DestinationCapacity,
+ reinterpret_cast<const UChar *>(Source),
+ SourceLength,
+ "", &ErrorCode);
+-#else
+- uint32_t OutputLength = u_strToUpper(Destination, DestinationCapacity,
+- Source, SourceLength,
+- "", &ErrorCode);
+-#endif
+ if (U_FAILURE(ErrorCode) && ErrorCode != U_BUFFER_OVERFLOW_ERROR) {
+ swift::crash("u_strToUpper: Unexpected error uppercasing unicode string.");
+ }
+@@ -271,17 +246,11 @@ swift::_swift_stdlib_unicode_strToLower(
+ const uint16_t *Source,
+ int32_t SourceLength) {
+ UErrorCode ErrorCode = U_ZERO_ERROR;
+-#if defined(__CYGWIN__) || defined(_MSC_VER)
+ uint32_t OutputLength = u_strToLower(reinterpret_cast<UChar *>(Destination),
+ DestinationCapacity,
+ reinterpret_cast<const UChar *>(Source),
+ SourceLength,
+ "", &ErrorCode);
+-#else
+- uint32_t OutputLength = u_strToLower(Destination, DestinationCapacity,
+- Source, SourceLength,
+- "", &ErrorCode);
+-#endif
+ if (U_FAILURE(ErrorCode) && ErrorCode != U_BUFFER_OVERFLOW_ERROR) {
+ swift::crash("u_strToLower: Unexpected error lowercasing unicode string.");
+ }
diff --git a/sourcekit_link_order.patch b/sourcekit_link_order.patch
new file mode 100644
index 000000000000..b73df976286d
--- /dev/null
+++ b/sourcekit_link_order.patch
@@ -0,0 +1,12 @@
+diff -rupN a/tools/SourceKit/tools/sourcekitd-test/CMakeLists.txt b/tools/SourceKit/tools/sourcekitd-test/CMakeLists.txt
+--- a/tools/SourceKit/tools/sourcekitd-test/CMakeLists.txt 2017-04-05 13:13:52.288068101 -0700
++++ b/tools/SourceKit/tools/sourcekitd-test/CMakeLists.txt 2017-04-06 11:05:37.613626721 -0700
+@@ -15,7 +15,7 @@ endif()
+ add_sourcekit_executable(sourcekitd-test
+ sourcekitd-test.cpp
+ TestOptions.cpp
+- DEPENDS ${SOURCEKITD_TEST_DEPEND} SourceKitSupport
++ DEPENDS SourceKitSupport ${SOURCEKITD_TEST_DEPEND}
+ clangRewrite clangLex clangBasic
+ LLVM_COMPONENT_DEPENDS core support option coverage lto
+ )
diff --git a/swift-sphinx2.patch b/swift-sphinx2.patch
deleted file mode 100644
index ca37917232e4..000000000000
--- a/swift-sphinx2.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff -rupN a/docs/CMakeLists.txt b/docs/CMakeLists.txt
---- a/docs/CMakeLists.txt 2016-06-01 09:50:24.174184477 -0700
-+++ b/docs/CMakeLists.txt 2016-06-01 09:51:02.687901780 -0700
-@@ -1,7 +1,7 @@
- add_subdirectory(tools)
-
- find_program(SPHINX_EXECUTABLE
-- NAMES sphinx-build
-+ NAMES sphinx-build2
- HINTS $ENV{SPHINX_DIR}
- PATH_SUFFIXES bin
- DOC "Sphinx documentation generator")
-@@ -10,7 +10,6 @@ SET(SWIFT_SPHINX_PAPER_SIZE "letter"
- CACHE STRING "Paper size for generated documentation")
-
- SET(SPHINX_ARGS
-- -W
- -D latex_paper_size=${SWIFT_SPHINX_PAPER_SIZE}
- -d ${CMAKE_BINARY_DIR}/doctrees)
-