diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 63 |
1 files changed, 16 insertions, 47 deletions
@@ -1,66 +1,35 @@ # Maintainer: Kuan-Yen Chou <kuanyenchou at gmail dot com> pkgname=cxx-common -pkgver=0.0.14 -pkgrel=5 +pkgver=0.1.1 +pkgrel=1 pkgdesc="Common dependency management for various Trail of Bits C++ codebases" arch=('x86_64') url="https://github.com/trailofbits/cxx-common" license=('Apache') -depends=('python' 'openssl' 'ncurses' 'libxml2' 'zlib') -makedepends=('python-setuptools' 'clang' 'cmake' 'ninja' 'git') +depends=('openssl' 'ncurses' 'libxml2' 'zlib') +makedepends=('clang' 'cmake' 'ninja' 'git') checkdepends=() options=('staticlibs' '!strip') source=("https://github.com/trailofbits/cxx-common/archive/v${pkgver}.tar.gz") -sha256sums=('1f7c3de3fa491cfba52abd4ae5fe5cc00112309239737b89ecc8c00a9b6cb2c2') +sha256sums=('97a0a35f9dcf65b2f1406aa77fb27594212ed4271a6e21dc26b430adfbf4e92d') -build() { - export LLVM_VERSION=1000 - export BOOTSTRAP="$srcdir/bootstrap" - export LIBRARIES="$srcdir/libraries" +prepare() { cd "$srcdir/$pkgname-$pkgver" + sed -i ./build_dependencies.sh \ + -e '/bootstrap-vcpkg\.sh/s/$/ -useSystemBinaries -disableMetrics/' +} - ## bootstrap cmake - ./pkgman.py \ - --verbose \ - --c_compiler=/usr/bin/clang \ - --cxx_compiler=/usr/bin/clang++ \ - --repository_path="${BOOTSTRAP}" \ - --packages=cmake - - ## build z3 and llvm - ./pkgman.py \ - --verbose \ - --c_compiler=/usr/bin/clang \ - --cxx_compiler=/usr/bin/clang++ \ - --llvm_version=${LLVM_VERSION} \ - --exclude_libcxx \ - --additional_paths="${BOOTSTRAP}/cmake/bin" \ - --repository_path="${LIBRARIES}" \ - --packages=z3,llvm - - rm -rf "$srcdir/$pkgname-$pkgver"/build/cmake* - - ## build the rest of the libraries - ./pkgman.py \ - --verbose \ - --c_compiler="${LIBRARIES}/llvm/bin/clang" \ - --cxx_compiler="${LIBRARIES}/llvm/bin/clang++" \ - --additional_paths="${BOOTSTRAP}/cmake/bin:${LIBRARIES}/llvm/bin" \ - --repository_path="${LIBRARIES}" \ - --packages=cmake,google,xed +build() { + cd "$srcdir/$pkgname-$pkgver" + ./build_dependencies.sh --release llvm-11 } package() { - install -dm 755 "$pkgdir/opt/$pkgname" - cp -r "$srcdir/libraries" "$pkgdir/opt/$pkgname/" - find "$pkgdir/opt/$pkgname"/libraries/*/lib/pkgconfig -type f -name '*.pc' \ - -exec sed -i -e "s|$srcdir|/opt/$pkgname|g" {} \; - - ## install lit - pushd "$srcdir/$pkgname-$pkgver"/sources/llvm-*.src/utils/lit - python3 setup.py install --root="$pkgdir" -O1 - popd + cd "$srcdir/$pkgname-$pkgver" + ./vcpkg/vcpkg export --x-all-installed \ + --overlay-ports=./ports --overlay-triplets=./triplets --raw \ + --output="$pkgdir/opt/$pkgname" } # vim: set sw=4 ts=4 et: |