summaryrefslogtreecommitdiff
path: root/community/libc++/PKGBUILD
blob: 51e25423335af8a70607e1363fe4b3fa84679f70 (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
# Maintainer: Daniel Micay <danielmicay@gmail.com>
# Contributor: MThinkCpp <mtc.maintainer[at]outlook.com>
pkgname='libc++'
pkgver=3.3
pkgrel=1
pkgdesc='A new implementation of the C++ standard library, targeting C++11.'
url='http://libcxx.llvm.org'
license=('custom:University of Illinois/NCSA Open Source License')
arch=('i686' 'x86_64')
depends=('glibc' 'gcc-libs') # gcc-libs for libsupc++ binary
makedepends=('clang' 'subversion' 'cmake' 'gcc') # gcc provides libsupc++ headers
source=("http://www.llvm.org/releases/${pkgver}/libcxx-${pkgver}.src.tar.gz")
md5sums=('SKIP')

build() {
  _gcc_include_dir=/usr/include/c++/$(gcc -dumpversion)
  _gcc_platform_include_dir=$_gcc_include_dir/$(gcc -dumpmachine)
  mkdir -p libcxx-${pkgver}.src/build
  cd libcxx-${pkgver}.src/build
  cmake -G "Unix Makefiles" -DLIBCXX_CXX_ABI=libsupc++ \
    -DLIBCXX_LIBSUPCXX_INCLUDE_PATHS="${_gcc_include_dir};${_gcc_platform_include_dir}" \
    -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr "${srcdir}/libcxx-${pkgver}.src"
  make
}
package() {
  install -Dm644 libcxx-${pkgver}.src/LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/license.txt"
  cd libcxx-${pkgver}.src/build
  make DESTDIR="$pkgdir" install
}