2016-03-23 18:24:41 +01:00
|
|
|
# Template file for 'swift'
|
|
|
|
pkgname=swift
|
2016-04-27 15:19:19 +02:00
|
|
|
version=2.2.1
|
2016-05-08 15:57:00 +02:00
|
|
|
revision=2
|
2016-03-23 18:24:41 +01:00
|
|
|
nocross=yes
|
2016-05-08 15:57:00 +02:00
|
|
|
depends="clang libswift"
|
2016-03-23 18:24:41 +01:00
|
|
|
makedepends="libxml2-devel libuuid-devel libbsd-devel icu-devel libedit-devel"
|
|
|
|
only_for_archs="x86_64"
|
|
|
|
hostmakedepends="pkg-config ninja cmake icu swig clang python perl"
|
|
|
|
short_desc="The Swift Programming Language"
|
|
|
|
maintainer="pancake <pancake@nopcode.org>"
|
|
|
|
license="Apache-2.0"
|
|
|
|
homepage="https://www.swift.org/"
|
|
|
|
_head="https://github.com/apple/"
|
|
|
|
_tail="archive/${pkgname}-${version}-RELEASE.tar.gz"
|
|
|
|
wrksrc="swift-swift-${version}-RELEASE"
|
|
|
|
distfiles="
|
|
|
|
${_head}/swift/${_tail}>swift-${version}.tar.gz
|
|
|
|
${_head}/swift-llvm/${_tail}>swift-llvm-${version}.tar.gz
|
|
|
|
${_head}/swift-clang/${_tail}>swift-clang-${version}.tar.gz
|
|
|
|
${_head}/swift-lldb/${_tail}>swift-lldb-${version}.tar.gz
|
|
|
|
${_head}/swift-cmark/${_tail}>swift-cmark-${version}.tar.gz
|
|
|
|
"
|
|
|
|
checksum="
|
2016-05-08 15:57:00 +02:00
|
|
|
e971e2287055da72564356f369bad97e95821afb1ef36157e954a04a7e90753a
|
2016-04-27 15:19:19 +02:00
|
|
|
f7977e5bb275494b5dac4490afc5d634f894ba5f209f3b2dbd5b7e520fa5fce2
|
|
|
|
40bdfa7eec0497ec69005d6a5d018b12c85aa2c0959d3408ecaaa9e34ff0415f
|
|
|
|
2098043dbda98374e784d3357f71f8e931aea3ac958c042adf0df0fae7bc22a3
|
|
|
|
254d3c02bf2b03ad456fa3ad27b4da854e36318fcaf6b6f199fdb3e978a90803
|
2016-03-23 18:24:41 +01:00
|
|
|
"
|
|
|
|
|
|
|
|
do_build() {
|
|
|
|
(
|
|
|
|
cd ..
|
|
|
|
for a in llvm clang lldb cmark; do
|
|
|
|
ln -sf swift-${a}-swift-${version}-RELEASE ${a}
|
|
|
|
done
|
|
|
|
ln -sf swift-swift-${version}-RELEASE swift
|
|
|
|
sed -i 's|/usr/include/x86_64-linux-gnu|/usr/include|g' clang/lib/Driver/ToolChains.cpp
|
|
|
|
)
|
|
|
|
export LDFLAGS="-ldl -lpthread"
|
|
|
|
utils/build-script -R -t -j${XBPS_MAKEJOBS}
|
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
|
|
|
vlicense LICENSE.txt
|
|
|
|
cd ../build/Ninja-ReleaseAssert/swift-linux-${XBPS_TARGET_MACHINE}
|
|
|
|
vbin bin/sil-opt
|
|
|
|
vbin bin/sil-extract
|
|
|
|
vbin bin/swift-demangle
|
|
|
|
vbin bin/swift
|
|
|
|
ln -fs swift ${DESTDIR}/usr/bin/swiftc
|
|
|
|
ln -fs swift ${DESTDIR}/usr/bin/swift-autolink-extract
|
|
|
|
vmkdir usr/lib/swift/clang/include
|
|
|
|
vcopy ../llvm-linux-${XBPS_TARGET_MACHINE}/lib/clang/3.8.0/include/* usr/lib/swift/clang/include
|
2016-05-08 15:57:00 +02:00
|
|
|
vcopy lib/swift/shims usr/lib/swift
|
|
|
|
vman docs/tools/swift.1
|
|
|
|
}
|
|
|
|
|
|
|
|
libswift_package() {
|
|
|
|
short_desc+=" - shared libraries"
|
|
|
|
pkg_install() {
|
|
|
|
cd ../build/Ninja-ReleaseAssert/swift-linux-${XBPS_TARGET_MACHINE}
|
|
|
|
vmkdir usr/lib/swift
|
|
|
|
vcopy lib/swift/linux usr/lib/swift
|
|
|
|
vcopy lib/swift/glibc usr/lib/swift
|
|
|
|
}
|
2016-03-23 18:24:41 +01:00
|
|
|
}
|