blob: 5ecad571fe547924be8ee7e5bf4becf5577f40d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# Maintainer: Theo Tosini <theo.tosini@theoduino.me>
pkgname=swift-language-git
pkgver=swift.2.2.SNAPSHOT.2015.12.01.b.r537.g072a459
pkgrel=1
pkgdesc="The Swift programming language, taken directly from the Apple repository"
arch=('x86_64')
url="https://swift.org/"
license=('apache2')
groups=()
depends=('icu' 'libedit' 'libxml2' 'swig' 'python2' 'libbsd' 'ncurses' )
makedepends=('git' 'ninja' 'cmake' 'clang')
provides=('swift-language')
conflicts=('swift-language-bin')
replaces=()
backup=()
options=()
install=
source=('git+https://github.com/apple/swift'
'llvm::git+https://github.com/apple/swift-llvm'
'clang::git+https://github.com/apple/swift-clang'
'lldb::git+https://github.com/apple/swift-lldb'
'cmark::git+https://github.com/apple/swift-cmark'
'llbuild::git+https://github.com/apple/swift-llbuild'
'swiftpm::git+https://github.com/apple/swift-package-manager'
'git+https://github.com/apple/swift-corelibs-xctest'
'git+https://github.com/apple/swift-corelibs-foundation')
noextract=()
md5sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP')
pkgver() {
cd "$srcdir/swift"
git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
cd "$srcdir/swift"
# Patch to use python2
find "$srcdir" -type f -print0 | xargs -0 sed -i 's/\/usr\/bin\/env python/\/usr\/bin\/env python2/g'
# Fix /usr/include error
find "$srcdir" -type f -print0 | xargs -0 sed -i 's|/usr/include/x86_64-linux-gnu|/usr/include|g'
# Release build
LDFLAGS='-ldl -lpthread' python2 utils/build-script -b -p --foundation --xctest -R
}
check() {
cd "$srcdir/swift"
python2 utils/build-script -t
}
package() {
cd "$srcdir/build"
mkdir -p "$pkgdir/opt" "$pkgdir/usr/bin"
cp -R Ninja-ReleaseAssert "$pkgdir/opt/swift"
ln -s /opt/swift/swift-linux-$CARCH/bin/{lldb-moduleimport-test,sil-extract,sil-opt,swift,swift-autolink-extract,swiftc,swift-demangle,swift-ide-test,swift-llvm-opt} "$pkgdir/usr/bin"
}
# vim:set ts=2 sw=2 et:
|