void-packages/srcpkgs/swift/template
Toyam Cox 1fc3adddb6 swift: mark nopie
It might be possible to fix it.
2016-09-11 10:24:28 -04:00

69 lines
2.2 KiB
Bash

# Template file for 'swift'
pkgname=swift
version=2.2.1
revision=2
nocross=yes
nopie=yes
depends="clang libswift"
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="
e971e2287055da72564356f369bad97e95821afb1ef36157e954a04a7e90753a
f7977e5bb275494b5dac4490afc5d634f894ba5f209f3b2dbd5b7e520fa5fce2
40bdfa7eec0497ec69005d6a5d018b12c85aa2c0959d3408ecaaa9e34ff0415f
2098043dbda98374e784d3357f71f8e931aea3ac958c042adf0df0fae7bc22a3
254d3c02bf2b03ad456fa3ad27b4da854e36318fcaf6b6f199fdb3e978a90803
"
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
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
}
}