From b6d96be80c6bc8b11eccbd68ff0824ccaf03f4e5 Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Sun, 20 Dec 2020 14:57:37 -0600 Subject: [PATCH 1/1] gnu: bear: Update to 3.0.4. * gnu/local.mk (bear-disable-preinstall-tests.patch): Add patch. * gnu/packages/build-tools.scm (bear): Reference patch, and update. --- gnu/local.mk | 1 + gnu/packages/build-tools.scm | 44 +++++++++++++++++-- .../bear-disable-preinstall-tests.patch | 40 +++++++++++++++++ 3 files changed, 81 insertions(+), 4 deletions(-) create mode 100644 gnu/packages/patches/bear-disable-preinstall-tests.patch diff --git a/gnu/local.mk b/gnu/local.mk index 11cb580b92..d1c8b63fff 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -832,6 +832,7 @@ dist_patch_DATA = \ %D%/packages/patches/bastet-change-source-of-unordered_set.patch \ %D%/packages/patches/bazaar-CVE-2017-14176.patch \ %D%/packages/patches/bc-fix-cross-compilation.patch \ + %D%/packages/patches/bear-disable-preinstall-tests.patch \ %D%/packages/patches/bsd-games-2.17-64bit.patch \ %D%/packages/patches/bsd-games-add-configure-config.patch \ %D%/packages/patches/bsd-games-add-wrapper.patch \ diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm index 3f140efdb3..63417e5b81 100644 --- a/gnu/packages/build-tools.scm +++ b/gnu/packages/build-tools.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2018 Tomáš Čech ;;; Copyright © 2018, 2020 Marius Bakke ;;; Copyright © 2018 Alex Vong -;;; Copyright © 2019 Brett Gilio +;;; Copyright © 2019, 2020 Brett Gilio ;;; Copyright © 2019 Jonathan Brielmaier ;;; Copyright © 2020 Leo Prikler ;;; Copyright © 2020 Yuval Kogman @@ -36,18 +36,27 @@ #:use-module (guix git-download) #:use-module (guix build-system cmake) #:use-module (gnu packages) + #:use-module (gnu packages adns) #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages cpp) + #:use-module (gnu packages gcc) #:use-module (gnu packages linux) + #:use-module (gnu packages logging) #:use-module (gnu packages lua) #:use-module (gnu packages package-management) #:use-module (gnu packages pcre) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages pretty-print) + #:use-module (gnu packages protobuf) #:use-module (gnu packages python) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) + #:use-module (gnu packages regex) + #:use-module (gnu packages rpc) #:use-module (gnu packages sqlite) + #:use-module (gnu packages tls) #:use-module (gnu packages ninja) #:use-module (guix build-system gnu) #:use-module (guix build-system python)) @@ -90,19 +99,46 @@ makes a few sacrifices to acquire fast full and incremental build times.") (define-public bear (package (name "bear") - (version "2.4.4") + (version "3.0.4") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/rizsotto/Bear") (commit version))) (file-name (git-file-name name version)) + (patches (search-patches + "bear-disable-preinstall-tests.patch")) (sha256 (base32 - "184dqjcpxiwcfziyi67zzran2c4fal1r3j8nhjdjadcmfxf4389d")))) + "15r22sbk5bibrhf54lf0shiqw1gnsik24fr5as96w3hnj6iahgwn")))) (build-system cmake-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (add-before 'check 'set-build-environment + (lambda _ + (setenv "CC" "gcc") + #t)) + ;; TODO: Test Configuration is Incomplete + (replace 'check + (lambda _ + (invoke "ctest")))))) (inputs - `(("python" ,python-wrapper))) + `(("c-ares" ,c-ares) + ("fmt" ,fmt) + ("grpc" ,grpc) + ("json-modern-cxx" ,json-modern-cxx) + ("protobuf" ,protobuf) + ("python" ,python-wrapper) + ("re2" ,re2) + ("spdlog" ,spdlog))) + (native-inputs + `(("abseil-cpp" ,abseil-cpp) + ("gcc-9" ,gcc-9) ; for , #44896 + ("googletest" ,googletest) + ("openssl" ,openssl) + ("pkg-config" ,pkg-config) + ("python-lit" ,python-lit) + ("zlib" ,zlib))) (home-page "https://github.com/rizsotto/Bear") (synopsis "Tool for generating a compilation database") (description "A JSON compilation database is used in the Clang project to diff --git a/gnu/packages/patches/bear-disable-preinstall-tests.patch b/gnu/packages/patches/bear-disable-preinstall-tests.patch new file mode 100644 index 0000000000..c65095405f --- /dev/null +++ b/gnu/packages/patches/bear-disable-preinstall-tests.patch @@ -0,0 +1,40 @@ +From d7d0cdd48017679e8529f8475d1b9902944cf243 Mon Sep 17 00:00:00 2001 +From: Brett Gilio +Date: Sun, 20 Dec 2020 14:43:30 -0600 +Subject: [PATCH] Disallow Pre-install Checks + +--- + CMakeLists.txt | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 45c6d27..73b4ace 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -58,10 +58,6 @@ ExternalProject_Add(BearSource + -DROOT_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} + -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} + -DENABLE_UNIT_TESTS:BOOL=${ENABLE_UNIT_TESTS} +- TEST_BEFORE_INSTALL +- 1 +- TEST_COMMAND +- ctest # or `ctest -T memcheck` + ) + + # Run the functional tests +@@ -73,12 +69,8 @@ if (ENABLE_FUNC_TESTS) + BearSource + CMAKE_CACHE_ARGS + -DSTAGED_INSTALL_PREFIX:PATH=${STAGED_INSTALL_PREFIX} +- TEST_BEFORE_INSTALL +- 1 + INSTALL_COMMAND + "" +- TEST_COMMAND +- ctest --verbose + ) + endif () + +-- +2.29.2 + -- 2.20.1