diff options
author | kyechou | 2020-12-26 16:10:51 -0600 |
---|---|---|
committer | kyechou | 2020-12-26 16:10:51 -0600 |
commit | 6dc075a89093879d809ce66b8d825bf56de305c8 (patch) | |
tree | e2a8691f63526e68666db6a790d33813cf03e3cd | |
parent | 31d5a40606aaa2d15cbcb02dfd33a4f46edb775c (diff) | |
download | aur-6dc075a89093879d809ce66b8d825bf56de305c8.tar.gz |
Use clang as the default compiler and fix the protoc permission issue
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | 00-cxx-common-0.1.1.patch | 25 | ||||
-rw-r--r-- | PKGBUILD | 12 |
3 files changed, 36 insertions, 6 deletions
@@ -1,10 +1,11 @@ pkgbase = cxx-common pkgdesc = Common dependency management for various Trail of Bits C++ codebases pkgver = 0.1.1 - pkgrel = 3 + pkgrel = 4 url = https://github.com/trailofbits/cxx-common arch = x86_64 license = Apache + makedepends = clang makedepends = cmake makedepends = ninja makedepends = git @@ -16,7 +17,9 @@ pkgbase = cxx-common options = staticlibs options = !strip source = https://github.com/trailofbits/cxx-common/archive/v0.1.1.tar.gz + source = 00-cxx-common-0.1.1.patch sha256sums = 97a0a35f9dcf65b2f1406aa77fb27594212ed4271a6e21dc26b430adfbf4e92d + sha256sums = a8823b585aec0eb58f9eca35d72074ba5832d2edf1fa6766cc09a27b9b0a4606 pkgname = cxx-common diff --git a/00-cxx-common-0.1.1.patch b/00-cxx-common-0.1.1.patch new file mode 100644 index 000000000000..c2bad224bdae --- /dev/null +++ b/00-cxx-common-0.1.1.patch @@ -0,0 +1,25 @@ +diff --git a/build_dependencies.sh b/build_dependencies.sh +index 11b16ba..1229009 100755 +--- a/build_dependencies.sh ++++ b/build_dependencies.sh +@@ -73,12 +73,20 @@ msg " " "$@" + cd "${repo_dir}" + ( + set -x ++ ++ if type clang >/dev/null 2>&1; then ++ export CC="${CC:-$(which clang)}" ++ export CXX="${CXX:-$(which clang++)}" ++ fi ++ + # TODO: Better way to remove all unspecified packages that we're about to + # install for specified triplet? Need this because different LLVM versions + # conflict when installed at the same time + rm -rf "${vcpkg_dir:?}/installed" || true + "${vcpkg_dir}/vcpkg" install "${extra_vcpkg_args[@]}" '@overlays.txt' '@dependencies.txt' "$@" + "${vcpkg_dir}/vcpkg" upgrade "${extra_vcpkg_args[@]}" '@overlays.txt' --no-dry-run ++ ++ find "${vcpkg_dir}"/installed/*/tools/protobuf/ -type f -exec chmod 755 {} + + ) + ) + @@ -2,20 +2,23 @@ pkgname=cxx-common pkgver=0.1.1 -pkgrel=3 +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' 'libxml2' 'zlib') -makedepends=('cmake' 'ninja' 'git' 'python2') # python2 is needed for vcpkg's Z3 +makedepends=('clang' 'cmake' 'ninja' 'git' 'python2') # python2 is needed for vcpkg's Z3 checkdepends=() options=('staticlibs' '!strip') -source=("https://github.com/trailofbits/cxx-common/archive/v${pkgver}.tar.gz") -sha256sums=('97a0a35f9dcf65b2f1406aa77fb27594212ed4271a6e21dc26b430adfbf4e92d') +source=("https://github.com/trailofbits/cxx-common/archive/v${pkgver}.tar.gz" + '00-cxx-common-0.1.1.patch') +sha256sums=('97a0a35f9dcf65b2f1406aa77fb27594212ed4271a6e21dc26b430adfbf4e92d' + 'a8823b585aec0eb58f9eca35d72074ba5832d2edf1fa6766cc09a27b9b0a4606') prepare() { cd "$srcdir/$pkgname-$pkgver" + patch -Np1 -i "$srcdir/00-cxx-common-0.1.1.patch" sed -i ./build_dependencies.sh \ -e '/bootstrap-vcpkg\.sh/s/$/ -useSystemBinaries -disableMetrics/' } @@ -30,7 +33,6 @@ package() { ./vcpkg/vcpkg export --x-all-installed \ --overlay-ports=./ports --overlay-triplets=./triplets --raw \ --output="$pkgdir/opt/$pkgname" - chmod a+x "$pkgdir/opt/$pkgname/installed/x64-linux-rel/tools/protobuf/protoc-3.14.0.0" } # vim: set sw=4 ts=4 et: |