diff options
author | kyechou | 2020-11-20 17:12:22 -0600 |
---|---|---|
committer | kyechou | 2020-11-20 18:00:57 -0600 |
commit | d7a746bc3032cc434919ae3d27f0891a9b06db47 (patch) | |
tree | c6be5c2eaa2a4445ea899d3a011cbf7d70268126 | |
parent | 440a8c6a3cbd322e590adb0f8a79b323dfb3ce02 (diff) | |
download | aur-d7a746bc3032cc434919ae3d27f0891a9b06db47.tar.gz |
Build the package locally
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | PKGBUILD | 50 |
2 files changed, 54 insertions, 9 deletions
@@ -1,17 +1,24 @@ pkgbase = cxx-common pkgdesc = Common dependency management for various Trail of Bits C++ codebases pkgver = 0.0.14 - pkgrel = 3 + pkgrel = 4 url = https://github.com/trailofbits/cxx-common arch = x86_64 license = Apache + makedepends = python-setuptools + makedepends = clang + makedepends = cmake + makedepends = ninja + makedepends = git + depends = python depends = openssl depends = ncurses + depends = libxml2 depends = zlib options = staticlibs options = !strip - source = https://github.com/trailofbits/cxx-common/releases/download/v0.0.14/libraries-llvm1000-ubuntu20.04-amd64.tar.xz - sha256sums = 1d6f576978b7aa4ab52133d3ee587e2c2b84893aa5b77c2f869be00113d31acd + source = https://github.com/trailofbits/cxx-common/archive/v0.0.14.tar.gz + sha256sums = 1f7c3de3fa491cfba52abd4ae5fe5cc00112309239737b89ecc8c00a9b6cb2c2 pkgname = cxx-common @@ -2,22 +2,60 @@ pkgname=cxx-common pkgver=0.0.14 -pkgrel=3 -_LLVMver=1000 # 10.0.0 +pkgrel=4 pkgdesc="Common dependency management for various Trail of Bits C++ codebases" arch=('x86_64') url="https://github.com/trailofbits/cxx-common" license=('Apache') -depends=('openssl' 'ncurses' 'zlib') -makedepends=() +depends=('python' 'openssl' 'ncurses' 'libxml2' 'zlib') +makedepends=('python-setuptools' 'clang' 'cmake' 'ninja' 'git') checkdepends=() options=('staticlibs' '!strip') -source=("https://github.com/trailofbits/cxx-common/releases/download/v${pkgver}/libraries-llvm${_LLVMver}-ubuntu20.04-amd64.tar.xz") -sha256sums=('1d6f576978b7aa4ab52133d3ee587e2c2b84893aa5b77c2f869be00113d31acd') +source=("https://github.com/trailofbits/cxx-common/archive/v${pkgver}.tar.gz") +sha256sums=('1f7c3de3fa491cfba52abd4ae5fe5cc00112309239737b89ecc8c00a9b6cb2c2') + +build() { + export LLVM_VERSION=1000 + export BOOTSTRAP="$srcdir/bootstrap" + export LIBRARIES="$srcdir/libraries" + cd "$srcdir/$pkgname-$pkgver" + + ## 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 +} 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" {} \; } # vim: set sw=4 ts=4 et: |