summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO18
-rw-r--r--00-cxx-common-0.1.1.patch25
-rw-r--r--PKGBUILD48
3 files changed, 30 insertions, 61 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6a2ae668bf77..7338f2572eea 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,21 +1,19 @@
pkgbase = cxx-common
pkgdesc = Common dependency management for various Trail of Bits C++ codebases
- pkgver = 0.1.1
- pkgrel = 6
- url = https://github.com/trailofbits/cxx-common
+ pkgver = 0.4.1
+ pkgrel = 1
+ url = https://github.com/lifting-bits/cxx-common
arch = x86_64
license = Apache
makedepends = clang
+ makedepends = lld
makedepends = cmake
makedepends = ninja
makedepends = git
- makedepends = python2
+ makedepends = python
+ makedepends = python-setuptools
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
+ source = https://github.com/lifting-bits/cxx-common/archive/refs/tags/v0.4.1.tar.gz
+ sha256sums = 922b92b1fc99e16e4828b2e2463dec5605d131b152de138b5f1990e21bdeee0b
pkgname = cxx-common
-
diff --git a/00-cxx-common-0.1.1.patch b/00-cxx-common-0.1.1.patch
deleted file mode 100644
index c2bad224bdae..000000000000
--- a/00-cxx-common-0.1.1.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-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 {} +
- )
- )
-
diff --git a/PKGBUILD b/PKGBUILD
index 4a61a5b81eb8..8ae1b64228be 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,43 +1,39 @@
# Maintainer: Kuan-Yen Chou <kuanyenchou at gmail dot com>
pkgname=cxx-common
-pkgver=0.1.1
-pkgrel=6
+pkgver=0.4.1
+pkgrel=1
pkgdesc="Common dependency management for various Trail of Bits C++ codebases"
arch=('x86_64')
-url="https://github.com/trailofbits/cxx-common"
+url="https://github.com/lifting-bits/cxx-common"
license=('Apache')
depends=()
-makedepends=('clang' 'cmake' 'ninja' 'git' 'python2') # python2 is needed for vcpkg's Z3
+makedepends=('clang' 'lld' 'cmake' 'ninja' 'git' 'python' 'python-setuptools')
checkdepends=()
-options=('staticlibs' '!strip')
-source=("https://github.com/trailofbits/cxx-common/archive/v${pkgver}.tar.gz"
- '00-cxx-common-0.1.1.patch')
-sha256sums=('97a0a35f9dcf65b2f1406aa77fb27594212ed4271a6e21dc26b430adfbf4e92d'
- 'a8823b585aec0eb58f9eca35d72074ba5832d2edf1fa6766cc09a27b9b0a4606')
+options=('staticlibs')
+source=("https://github.com/lifting-bits/cxx-common/archive/refs/tags/v${pkgver}.tar.gz")
+sha256sums=('922b92b1fc99e16e4828b2e2463dec5605d131b152de138b5f1990e21bdeee0b')
-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/'
-}
+package() {
+ export LLVM_VER=15
+ export TRIPLET=x64-linux-rel
+ export VCPKG_DEFAULT_HOST_TRIPLET=$TRIPLET # https://github.com/lifting-bits/cxx-common/pull/876
-build() {
cd "$srcdir/$pkgname-$pkgver"
- ./build_dependencies.sh --release llvm-10
-}
+ mkdir -p "$pkgdir/opt/$pkgname"
+ ./build_dependencies.sh --release \
+ --export-dir "$pkgdir/opt/$pkgname" \
+ llvm-$LLVM_VER
-package() {
- cd "$srcdir/$pkgname-$pkgver"
- ./vcpkg/vcpkg export --x-all-installed \
- --overlay-ports=./ports --overlay-triplets=./triplets --raw \
- --output="$pkgdir/opt/$pkgname"
+ ## fix prefix paths
+ find "$pkgdir/opt/$pkgname/installed/$TRIPLET/lib/pkgconfig/" -type f \
+ -exec sed -i -e "s,$srcdir/$pkgname-$pkgver/vcpkg/packages/[^ /]*_\($TRIPLET\),/opt/$pkgname/installed/\1,g" {} +
## install lit
- pushd "$srcdir/$pkgname-$pkgver"/vcpkg/buildtrees/llvm-10/src/org-*/llvm/utils/lit
- python3 setup.py install --root="$pkgdir" -O1
- popd
+ cd "$srcdir/$pkgname-$pkgver"/vcpkg/buildtrees/llvm-$LLVM_VER/src/org-*/llvm/utils/lit
+ python setup.py install \
+ --prefix="/opt/$pkgname/installed/$TRIPLET" \
+ --root="$pkgdir" --optimize=1
}
# vim: set sw=4 ts=4 et: