summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorYiyao Yu2021-08-27 16:10:26 -0400
committerYiyao Yu2021-08-27 16:10:26 -0400
commit98a56c9651265783c309f06eb6301e5aeadece1e (patch)
tree3aa78503d31fa93a567fe43a404423b5633110c0
parent08c99b3c332ad8b816db9dee29a4337cdd4a9539 (diff)
downloadaur-98a56c9651265783c309f06eb6301e5aeadece1e.tar.gz
3.0.13-2: removed old home dir workaround, added patch for nlohmann
-rw-r--r--.SRCINFO4
-rw-r--r--00-nlohmann-310.patch39
-rw-r--r--PKGBUILD18
3 files changed, 53 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f99099ef1e86..fd23e57ea43d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = bear
pkgdesc = tool to generate compilation database for clang tooling
pkgver = 3.0.13
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/rizsotto/Bear
arch = i686
arch = x86_64
@@ -16,6 +16,8 @@ pkgbase = bear
conflicts = bear
conflicts = interception-tools
source = Bear-3.0.13.tar.gz::https://github.com/rizsotto/Bear/archive/3.0.13.tar.gz
+ source = 00-nlohmann-310.patch
sha256sums = b57d9b139acbbad6439f5b1133266fa5afc5eb095a61cfa07cd9e8941943ae22
+ sha256sums = b3c825ccf7544b95e6c842fd2c43b4dded6f6078904f6b08b61f00a01c625a6a
pkgname = bear
diff --git a/00-nlohmann-310.patch b/00-nlohmann-310.patch
new file mode 100644
index 000000000000..e24d6b298a99
--- /dev/null
+++ b/00-nlohmann-310.patch
@@ -0,0 +1,39 @@
+From c261dc8bb451340ea44e726f339713e55afc23ec Mon Sep 17 00:00:00 2001
+From: Laszlo Nagy <rizsotto@gmail.com>
+Date: Fri, 20 Aug 2021 16:12:54 +1000
+Subject: [PATCH] citnames: fix #396 (new release of json library)
+
+---
+ source/citnames/source/Output.cc | 2 +-
+ third_party/nlohmann_json/CMakeLists.txt | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/source/citnames/source/Output.cc b/source/citnames/source/Output.cc
+index 8df1a981..2d004ff6 100644
+--- a/source/citnames/source/Output.cc
++++ b/source/citnames/source/Output.cc
+@@ -184,7 +184,7 @@ namespace cs {
+ throw error;
+ });
+ } else {
+- throw nlohmann::json::out_of_range::create(403, "key 'command' or 'arguments' not found");
++ throw std::runtime_error("Field 'command' or 'arguments' not found");
+ }
+
+ validate(entry);
+diff --git a/third_party/nlohmann_json/CMakeLists.txt b/third_party/nlohmann_json/CMakeLists.txt
+index bcd8a052..4621c571 100644
+--- a/third_party/nlohmann_json/CMakeLists.txt
++++ b/third_party/nlohmann_json/CMakeLists.txt
+@@ -9,9 +9,9 @@ else ()
+ include(ExternalProject)
+ ExternalProject_Add(nlohmann_json_dependency
+ URL
+- https://github.com/nlohmann/json/archive/v3.9.1.tar.gz
++ https://github.com/nlohmann/json/archive/v3.10.0.tar.gz
+ URL_HASH
+- MD5=e386222fb57dd2fcb8a7879fc016d037
++ MD5=78d0f567b2940341704c1d838a11fad2
+ DOWNLOAD_NO_PROGRESS
+ 1
+ UPDATE_COMMAND
diff --git a/PKGBUILD b/PKGBUILD
index 73e5d22024c5..40758e747098 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=bear
_pkgname=Bear
pkgver=3.0.13
-pkgrel=1
+pkgrel=2
pkgdesc="tool to generate compilation database for clang tooling"
arch=('i686' 'x86_64')
url="https://github.com/rizsotto/Bear"
@@ -13,8 +13,16 @@ makedepends=('cmake' 'ninja' 'nlohmann-json')
depends=('grpc' 'fmt' 'spdlog')
conflicts=('bear' 'interception-tools')
provides=('bear')
-source=("$_pkgname-$pkgver.tar.gz::https://github.com/rizsotto/$_pkgname/archive/$pkgver.tar.gz")
-sha256sums=('b57d9b139acbbad6439f5b1133266fa5afc5eb095a61cfa07cd9e8941943ae22')
+source=("$_pkgname-$pkgver.tar.gz::https://github.com/rizsotto/$_pkgname/archive/$pkgver.tar.gz"
+ "00-nlohmann-310.patch")
+sha256sums=('b57d9b139acbbad6439f5b1133266fa5afc5eb095a61cfa07cd9e8941943ae22'
+ 'b3c825ccf7544b95e6c842fd2c43b4dded6f6078904f6b08b61f00a01c625a6a')
+prepare() {
+ cd "${srcdir}/${_pkgname}-${pkgver}"
+ for p in ${srcdir}/*.patch; do
+ patch -Np1 -i "$p"
+ done
+}
build() {
cd "${srcdir}/${_pkgname}-${pkgver}"
@@ -31,8 +39,4 @@ build() {
package() {
cd "${srcdir}/${_pkgname}-${pkgver}"
DESTDIR="${pkgdir}" make install
-
- # Workaround for including compile dir in package
- rm -rf "${pkgdir}${srcdir}"
- find "${pkgdir}" -empty -type d -delete
}