summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLlewelyn Trahaearn2019-01-17 13:30:03 -0800
committerLlewelyn Trahaearn2019-01-17 13:30:03 -0800
commitb41ed94583d126647723fc782e86c71068f20384 (patch)
treefc3baac894523fc4aeb3b2c178f76a06b94829c2
parentef618acd88353f718b539807b80782697b7c7d2a (diff)
downloadaur-b41ed94583d126647723fc782e86c71068f20384.tar.gz
Clean up PKGBUILD and include static libs.
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD81
2 files changed, 38 insertions, 51 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cfbaf511712..0624413a120 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = libc++
pkgver = 7.0.1
- pkgrel = 1
+ pkgrel = 2
url = https://libcxx.llvm.org/
arch = i686
arch = x86_64
@@ -35,12 +35,14 @@ pkgbase = libc++
pkgname = libc++
pkgdesc = LLVM C++ standard library.
- depends = libc++abi=7.0.1-1
+ depends = libc++abi=7.0.1-2
+ options = staticlibs
pkgname = libc++abi
pkgdesc = Low level support for the LLVM C++ standard library.
+ options = staticlibs
pkgname = libc++experimental
pkgdesc = LLVM C++ experimental library.
- depends = libc++=7.0.1-1
+ depends = libc++=7.0.1-2
diff --git a/PKGBUILD b/PKGBUILD
index 533071db176..f46d38713ca 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
pkgbase=libc++
pkgname=(${pkgbase}{,abi,experimental})
pkgver=7.0.1
-pkgrel=1
+pkgrel=2
url="https://libcxx.llvm.org/"
license=('MIT' 'custom:University of Illinois/NCSA Open Source License')
arch=('i686' 'x86_64')
@@ -21,30 +21,15 @@ sha512sums=('ac43a3cb71a53deb55e3693653847cf20bf6f5d9056f224e6956c96d63bc59ebee9
'SKIP'
'92e8d28f329e9a8cce296f0fddd88324198f722db3a748bb2164b28ae8eca6047c89ed1e70af00bbedd93ce4285b2ab1e0307a65b88dc60e581eebfd6cbd2038'
'SKIP')
-# see https://releases.llvm.org/download.html
-validpgpkeys=(# Tom Stellard <tstellar@redhat.com> (.1 releases)
- # https://pgp.mit.edu/pks/lookup?op=get&search=0xA2C794A986419D8A
- 474E22316ABF4785A88C6E8EA2C794A986419D8A
- # Hans Wennborg <hans@chromium.org> (.0 releases)
- # https://releases.llvm.org/7.0.0/hans-gpg-key.asc
- B6C8F98282B944E3B0D5C2530FC3042E345AD05D)
+validpgpkeys=('474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard <tstellar@redhat.com> (.1 releases) # Hans Wennborg <hans@chromium.org> (.0 releases)
+validpgpkeys+=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans@chromium.org> (.0 releases)
prepare() {
- [[ -d llvm ]] || mkdir llvm
- bsdtar --strip-components 1 --uid 0 --gid 0 -zxf \
- ${srcdir}/${source[0]##*/} -C \
- llvm
- [[ -d llvm/projects/libcxx ]] || mkdir llvm/projects/libcxx
- bsdtar --strip-components 1 --uid 0 --gid 0 -zxf \
- ${srcdir}/${source[2]##*/} -C \
- llvm/projects/libcxx
- [[ -d llvm/projects/libcxxabi ]] || mkdir llvm/projects/libcxxabi
- bsdtar --strip-components 1 --uid 0 --gid 0 -zxf \
- ${srcdir}/${source[4]##*/} -C \
- llvm/projects/libcxxabi
- sed -i 's/CREDITS.TXT/CREDITS/' llvm/projects/libcxx/LICENSE.TXT
- sed -i 's/CREDITS.TXT/CREDITS/' llvm/projects/libcxxabi/LICENSE.TXT
- [[ -d build ]] || mkdir build
+ mkdir -p build llvm/projects/libcxx llvm/projects/libcxxabi
+ bsdtar --strip-components 1 -zxf "${source[0]##*/}" -C llvm
+ bsdtar --strip-components 1 -zxf "${source[2]##*/}" -C llvm/projects/libcxx
+ bsdtar --strip-components 1 -zxf "${source[4]##*/}" -C llvm/projects/libcxxabi
+ sed -i 's/CREDITS.TXT/CREDITS/' llvm/projects/libcxx/LICENSE.TXT llvm/projects/libcxxabi/LICENSE.TXT
}
build() {
@@ -55,50 +40,50 @@ build() {
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
- -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=On \
- -DLIBCXX_INSTALL_EXPERIMENTAL_LIBRARY=Off \
- ${srcdir}/llvm
- ninja cxx cxx_experimental
+ -DLIBCXX_INSTALL_EXPERIMENTAL_LIBRARY=NO \
+ -DLIBCXX_INSTALL_FILESYSTEM_LIBRARY=NO \
+ "$srcdir"/llvm
+ ninja cxx cxx_experimental cxx_filesystem
}
check() {
cd build
- ninja check-cxx
+ ninja check-cxx check-cxxabi
}
package_libc++() {
pkgdesc='LLVM C++ standard library.'
- depends=("libc++abi=${pkgver}-${pkgrel}")
- cd ${srcdir}/build
- DESTDIR="${pkgdir}" ninja install-libcxx
+ depends=("libc++abi=$pkgver-$pkgrel")
+ options=('staticlibs')
- # Remove ABI headers.
- rm "${pkgdir}/usr/include/c++/v1/cxxabi.h"
- rm "${pkgdir}/usr/include/c++/v1/__cxxabi_config.h"
+ cd build
+ DESTDIR="$pkgdir" ninja install-libcxx
- # Remove experimental headers.
- rm -rf "${pkgdir}/usr/include/c++/v1/experimental"
+ # Remove ABI and experimental headers.
+ rm -rf "$pkgdir"/usr/include/c++/v1/cxxabi.h "$pkgdir"/usr/include/c++/v1/__cxxabi_config.h "$pkgdir"/usr/include/c++/v1/experimental
# License.
- install -Dm644 ${srcdir}/llvm/projects/libcxx/CREDITS.TXT "${pkgdir}/usr/share/licenses/${pkgname}/CREDITS"
- install -Dm644 ${srcdir}/llvm/projects/libcxx/LICENSE.TXT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -Dm0644 "$srcdir"/llvm/projects/libcxx/CREDITS.TXT "$pkgdir"/usr/share/licenses/"$pkgname"/CREDITS
+ install -Dm0644 "$srcdir"/llvm/projects/libcxx/LICENSE.TXT "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE
}
package_libc++abi() {
pkgdesc='Low level support for the LLVM C++ standard library.'
- cd ${srcdir}/build
- DESTDIR="${pkgdir}" ninja install-libcxxabi
- install -Dm644 ${srcdir}/build/include/c++/v1/cxxabi.h "${pkgdir}/usr/include/c++/v1/cxxabi.h"
- install -Dm644 ${srcdir}/build/include/c++/v1/__cxxabi_config.h "${pkgdir}/usr/include/c++/v1/__cxxabi_config.h"
- install -Dm644 ${srcdir}/llvm/projects/libcxxabi/CREDITS.TXT "${pkgdir}/usr/share/licenses/${pkgname}/CREDITS"
- install -Dm644 ${srcdir}/llvm/projects/libcxxabi/LICENSE.TXT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ options=('staticlibs')
+
+ cd build
+ DESTDIR="$pkgdir" ninja install-libcxxabi
+ install -Dm0644 -t "$pkgdir"/usr/include/c++/v1 include/c++/v1/cxxabi.h include/c++/v1/__cxxabi_config.h
+ install -Dm0644 "$srcdir"/llvm/projects/libcxxabi/CREDITS.TXT "$pkgdir"/usr/share/licenses/"$pkgname"/CREDITS
+ install -Dm0644 "$srcdir"/llvm/projects/libcxxabi/LICENSE.TXT "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE
}
package_libc++experimental() {
depends=("libc++=$pkgver-$pkgrel")
pkgdesc='LLVM C++ experimental library.'
- install -Dm644 ${srcdir}/build/lib/libc++experimental.a ${pkgdir}/usr/lib/libc++experimental.a
- install -Dm644 -t ${pkgdir}/usr/include/c++/v1/experimental ${srcdir}/build/include/c++/v1/experimental/*
- install -Dm644 ${srcdir}/llvm/projects/libcxx/CREDITS.TXT "${pkgdir}/usr/share/licenses/${pkgname}/CREDITS"
- install -Dm644 ${srcdir}/llvm/projects/libcxx/LICENSE.TXT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ install -Dm0644 -t "$pkgdir"/usr/lib/ build/lib/libc++experimental.a build/lib/libc++fs.a
+ install -Dm0644 -t "$pkgdir"/usr/include/c++/v1/experimental build/include/c++/v1/experimental/*
+ install -Dm0644 llvm/projects/libcxx/CREDITS.TXT "$pkgdir"/usr/share/licenses/"$pkgname"/CREDITS
+ install -Dm0644 llvm/projects/libcxx/LICENSE.TXT "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE
}