summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorkyechou2022-02-13 16:57:35 -0600
committerkyechou2022-02-13 16:57:35 -0600
commit83d7c6c3599f0c29358f188fdf7f5d7c3786c78c (patch)
treeaf9175ccab800c0fc0729bceaf40e49783c74949
parentc76570c7fe1453b8165773cb545f0743ec1cec1d (diff)
downloadaur-83d7c6c3599f0c29358f188fdf7f5d7c3786c78c.tar.gz
Update to 0.1.8 (llvm-13)
-rw-r--r--.SRCINFO10
-rw-r--r--00-fix-missing-header.patch90
-rw-r--r--PKGBUILD45
3 files changed, 21 insertions, 124 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cb34681e7364..363662daafe1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = cxx-common
pkgdesc = Common dependency management for various Trail of Bits C++ codebases
- pkgver = 0.1.4
- pkgrel = 2
+ pkgver = 0.1.8
+ pkgrel = 1
url = https://github.com/lifting-bits/cxx-common
arch = x86_64
license = Apache
@@ -13,9 +13,7 @@ pkgbase = cxx-common
makedepends = python
options = staticlibs
options = !strip
- 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
+ source = https://github.com/lifting-bits/cxx-common/archive/refs/tags/v0.1.8.tar.gz
+ sha256sums = c3b7825739ea353460b969ed6fc5502eaf882bf11a9a9d881c8b7bbd49e4f1de
pkgname = cxx-common
diff --git a/00-fix-missing-header.patch b/00-fix-missing-header.patch
deleted file mode 100644
index 4cbfcc2ea551..000000000000
--- a/00-fix-missing-header.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-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 f75cf4b0539e..f9b889621ad6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,8 @@
# Maintainer: Kuan-Yen Chou <kuanyenchou at gmail dot com>
pkgname=cxx-common
-pkgver=0.1.4
-pkgrel=2
+pkgver=0.1.8
+pkgrel=1
pkgdesc="Common dependency management for various Trail of Bits C++ codebases"
arch=('x86_64')
url="https://github.com/lifting-bits/cxx-common"
@@ -11,40 +11,29 @@ depends=()
makedepends=('clang' 'lld' 'cmake' 'ninja' 'git' 'python')
checkdepends=()
options=('staticlibs' '!strip')
-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-fix-missing-header.patch"
- sed -i ./build_dependencies.sh \
- -e '/bootstrap-vcpkg\.sh/s/$/ -useSystemBinaries -disableMetrics/'
-}
-
-build() {
- cd "$srcdir/$pkgname-$pkgver"
- CPPFLAGS='' ./build_dependencies.sh --release llvm-11
-
- cd "$srcdir/$pkgname-$pkgver"/vcpkg/buildtrees/llvm-11/src/org-*/llvm/utils/lit
- python setup.py build
-}
+source=("https://github.com/lifting-bits/cxx-common/archive/refs/tags/v${pkgver}.tar.gz")
+sha256sums=('c3b7825739ea353460b969ed6fc5502eaf882bf11a9a9d881c8b7bbd49e4f1de')
package() {
+ export LLVM_VER=13
+ export TRIPLET=x64-linux-rel
+ export VCPKG_DEFAULT_HOST_TRIPLET=$TRIPLET # https://github.com/lifting-bits/cxx-common/pull/876
+
cd "$srcdir/$pkgname-$pkgver"
- ./vcpkg/vcpkg export --x-all-installed "@overlays.txt" --raw \
- --output="$pkgdir/opt/$pkgname"
+ mkdir -p "$pkgdir/opt/$pkgname"
+ ./build_dependencies.sh --release --clean \
+ --export-dir "$pkgdir/opt/$pkgname" \
+ llvm-$LLVM_VER
## fix prefix paths
- 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" {} +
+ 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
- cd "$srcdir/$pkgname-$pkgver"/vcpkg/buildtrees/llvm-11/src/org-*/llvm/utils/lit
+ cd "$srcdir/$pkgname-$pkgver"/vcpkg/buildtrees/llvm-$LLVM_VER/src/org-*/llvm/utils/lit
python setup.py install \
- --prefix="/opt/$pkgname/installed/x64-linux-rel" \
- --root="$pkgdir" -O1 --skip-build
+ --prefix="/opt/$pkgname/installed/$TRIPLET" \
+ --root="$pkgdir" --optimize=1
}
# vim: set sw=4 ts=4 et: