summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorkyechou2021-09-14 10:37:33 -0500
committerkyechou2021-09-14 10:37:33 -0500
commit3c1950620f0f466211d0dd8821fe0cccf3b4e4ec (patch)
treecac43309b9baa67706d85f00fbc3ac392521d9c9
parent282c71ce60d4e09c2b12b731621ce769dff0fb65 (diff)
downloadaur-3c1950620f0f466211d0dd8821fe0cccf3b4e4ec.tar.gz
Update to 0.1.4
-rw-r--r--.SRCINFO18
-rw-r--r--00-cxx-common-0.1.1.patch25
-rw-r--r--00-fix-missing-header.patch90
-rw-r--r--PKGBUILD35
4 files changed, 118 insertions, 50 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 40cfec88f59c..1c70a8041631 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,21 +1,21 @@
pkgbase = cxx-common
pkgdesc = Common dependency management for various Trail of Bits C++ codebases
- pkgver = 0.1.1
- pkgrel = 7
- url = https://github.com/trailofbits/cxx-common
+ pkgver = 0.1.4
+ 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
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.1.4.tar.gz
+ source = 00-fix-missing-header.patch
+ sha256sums = 03b9248af46f54e191abf0277b9d0d6d316d7927d1afa68006b0e50eb7d89077
+ sha256sums = 2872fbced5424a683615ff1c2d9af6bd6d4d364ff1f65f32581271a3ddaefaa9
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/00-fix-missing-header.patch b/00-fix-missing-header.patch
new file mode 100644
index 000000000000..4cbfcc2ea551
--- /dev/null
+++ b/00-fix-missing-header.patch
@@ -0,0 +1,90 @@
+diff --git a/ports/llvm-10/0026-fix-missing-header-limits.patch b/ports/llvm-10/0026-fix-missing-header-limits.patch
+new file mode 100644
+index 0000000..a6f1fac
+--- /dev/null
++++ b/ports/llvm-10/0026-fix-missing-header-limits.patch
+@@ -0,0 +1,12 @@
++diff --git a/llvm/utils/benchmark/src/benchmark_register.h b/llvm/utils/benchmark/src/benchmark_register.h
++index 0705e219f2fa..4caa5ad4da07 100644
++--- a/llvm/utils/benchmark/src/benchmark_register.h
+++++ b/llvm/utils/benchmark/src/benchmark_register.h
++@@ -1,6 +1,7 @@
++ #ifndef BENCHMARK_REGISTER_H
++ #define BENCHMARK_REGISTER_H
++
+++#include <limits>
++ #include <vector>
++
++ #include "check.h"
+diff --git a/ports/llvm-10/portfile.cmake b/ports/llvm-10/portfile.cmake
+index 2bb0147..6d65360 100644
+--- a/ports/llvm-10/portfile.cmake
++++ b/ports/llvm-10/portfile.cmake
+@@ -24,6 +24,7 @@ vcpkg_from_github(
+ 0023-fix-macos-libcxx-header-handling.patch
+ 0024-vcpkg-fix-clang-sys-include-dir-path.patch
+ 0025-remove-compiler-rt-tests.patch
++ 0026-fix-missing-header-limits.patch
+ )
+
+ include("${CURRENT_INSTALLED_DIR}/share/llvm-vcpkg-common/llvm-common-build.cmake")
+diff --git a/ports/llvm-11/0025-fix-missing-header-limits.patch b/ports/llvm-11/0025-fix-missing-header-limits.patch
+new file mode 100644
+index 0000000..a6f1fac
+--- /dev/null
++++ b/ports/llvm-11/0025-fix-missing-header-limits.patch
+@@ -0,0 +1,12 @@
++diff --git a/llvm/utils/benchmark/src/benchmark_register.h b/llvm/utils/benchmark/src/benchmark_register.h
++index 0705e219f2fa..4caa5ad4da07 100644
++--- a/llvm/utils/benchmark/src/benchmark_register.h
+++++ b/llvm/utils/benchmark/src/benchmark_register.h
++@@ -1,6 +1,7 @@
++ #ifndef BENCHMARK_REGISTER_H
++ #define BENCHMARK_REGISTER_H
++
+++#include <limits>
++ #include <vector>
++
++ #include "check.h"
+diff --git a/ports/llvm-11/portfile.cmake b/ports/llvm-11/portfile.cmake
+index 3836294..ff74a75 100644
+--- a/ports/llvm-11/portfile.cmake
++++ b/ports/llvm-11/portfile.cmake
+@@ -23,6 +23,7 @@ vcpkg_from_github(
+ 0022-llvm-config-bin-path.patch
+ 0023-fix-macos-libcxx-header-handling.patch
+ 0024-vcpkg-fix-clang-sys-include-dir-path.patch
++ 0025-fix-missing-header-limits.patch
+ )
+
+ include("${CURRENT_INSTALLED_DIR}/share/llvm-vcpkg-common/llvm-common-build.cmake")
+diff --git a/ports/llvm-9/0029-fix-missing-header-limits.patch b/ports/llvm-9/0029-fix-missing-header-limits.patch
+new file mode 100644
+index 0000000..a6f1fac
+--- /dev/null
++++ b/ports/llvm-9/0029-fix-missing-header-limits.patch
+@@ -0,0 +1,12 @@
++diff --git a/llvm/utils/benchmark/src/benchmark_register.h b/llvm/utils/benchmark/src/benchmark_register.h
++index 0705e219f2fa..4caa5ad4da07 100644
++--- a/llvm/utils/benchmark/src/benchmark_register.h
+++++ b/llvm/utils/benchmark/src/benchmark_register.h
++@@ -1,6 +1,7 @@
++ #ifndef BENCHMARK_REGISTER_H
++ #define BENCHMARK_REGISTER_H
++
+++#include <limits>
++ #include <vector>
++
++ #include "check.h"
+diff --git a/ports/llvm-9/portfile.cmake b/ports/llvm-9/portfile.cmake
+index 7e549aa..59890c6 100644
+--- a/ports/llvm-9/portfile.cmake
++++ b/ports/llvm-9/portfile.cmake
+@@ -26,6 +26,7 @@ vcpkg_from_github(
+ 0026-fix-macos-libcxx-header-handling.patch
+ 0027-vcpkg-fix-clang-sys-include-dir-path.patch
+ 0028-remove-compiler-rt-tests.patch
++ 0029-fix-missing-header-limits.patch
+ )
+
+ include("${CURRENT_INSTALLED_DIR}/share/llvm-vcpkg-common/llvm-common-build.cmake")
diff --git a/PKGBUILD b/PKGBUILD
index 3c73cb87e652..9749d20c139b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,47 +1,50 @@
# Maintainer: Kuan-Yen Chou <kuanyenchou at gmail dot com>
pkgname=cxx-common
-pkgver=0.1.1
-pkgrel=7
+pkgver=0.1.4
+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')
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')
+source=("https://github.com/lifting-bits/cxx-common/archive/refs/tags/v${pkgver}.tar.gz"
+ '00-fix-missing-header.patch')
+sha256sums=('03b9248af46f54e191abf0277b9d0d6d316d7927d1afa68006b0e50eb7d89077'
+ '2872fbced5424a683615ff1c2d9af6bd6d4d364ff1f65f32581271a3ddaefaa9')
prepare() {
cd "$srcdir/$pkgname-$pkgver"
- patch -Np1 -i "$srcdir/00-cxx-common-0.1.1.patch"
+ patch -Np1 -i "$srcdir/00-fix-missing-header.patch"
sed -i ./build_dependencies.sh \
-e '/bootstrap-vcpkg\.sh/s/$/ -useSystemBinaries -disableMetrics/'
}
build() {
cd "$srcdir/$pkgname-$pkgver"
- ./build_dependencies.sh --release llvm-10
+ CPPFLAGS='' ./build_dependencies.sh --release llvm-10
+
+ cd "$srcdir/$pkgname-$pkgver"/vcpkg/buildtrees/llvm-10/src/org-*/llvm/utils/lit
+ python setup.py build
}
package() {
cd "$srcdir/$pkgname-$pkgver"
- ./vcpkg/vcpkg export --x-all-installed \
- --overlay-ports=./ports --overlay-triplets=./triplets --raw \
+ ./vcpkg/vcpkg export --x-all-installed "@overlays.txt" --raw \
--output="$pkgdir/opt/$pkgname"
## fix prefix paths
- find $pkgdir/opt/$pkgname/installed/x64-linux-rel/lib/pkgconfig/ -type f \
+ find "$pkgdir/opt/$pkgname/installed/x64-linux-rel/lib/pkgconfig/" -type f \
-exec sed -i -e "s,$srcdir/$pkgname-$pkgver/vcpkg/packages/[^ ]*_x64-linux-rel,/opt/$pkgname/installed/x64-linux-rel,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-10/src/org-*/llvm/utils/lit
+ python setup.py install \
+ --prefix="/opt/$pkgname/installed/x64-linux-rel" \
+ --root="$pkgdir" -O1 --skip-build
}
# vim: set sw=4 ts=4 et: