summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Hogan <code@greghogan.com>2021-11-03 15:22:19 +0000
committerLudovic Courtès <ludo@gnu.org>2022-02-08 13:34:01 +0100
commit7fbb6fe0e1035e2a09fe9ffcd5b91c1586510f99 (patch)
tree86c9089620fd2076c8e2b072d66f58e9c7470def
parent4469990f2e4b300781c93dfd41a82c41611842e3 (diff)
downloadguix-patches-7fbb6fe0e1035e2a09fe9ffcd5b91c1586510f99.tar
guix-patches-7fbb6fe0e1035e2a09fe9ffcd5b91c1586510f99.tar.gz
gnu: Add bloomberg-bde.
* gnu/packages/cpp.scm (bloomberg-bde): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/cpp.scm75
-rw-r--r--gnu/packages/patches/bloomberg-bde-cmake-module-path.patch16
3 files changed, 91 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 82c08cfa02..f14daf2edd 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -912,6 +912,7 @@ dist_patch_DATA = \
%D%/packages/patches/binutils-mingw-w64-timestamp.patch \
%D%/packages/patches/binutils-mingw-w64-deterministic.patch \
%D%/packages/patches/binutils-CVE-2021-45078.patch \
+ %D%/packages/patches/bloomberg-bde-cmake-module-path.patch \
%D%/packages/patches/bloomberg-bde-tools-fix-install-path.patch \
%D%/packages/patches/bpftrace-disable-bfd-disasm.patch \
%D%/packages/patches/byobu-writable-status.patch \
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 3bc77ff017..a77ac84f17 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -80,7 +80,8 @@
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages tls)
#:use-module (gnu packages web)
- #:use-module (gnu packages xml))
+ #:use-module (gnu packages xml)
+ #:use-module (ice-9 match))
(define-public argagg
(let ((commit "79e4adfa2c6e2bfbe63da05cc668eb9ad5596748") (revision "0"))
@@ -1613,3 +1614,75 @@ validation.")
"This package provides the cmake imports needed to build bloomberg-bde.")
(home-page "https://github.com/bloomberg/bde-tools")
(license license:asl2.0))))
+
+(define-public bloomberg-bde
+ (let ((commit "b6bcc0e24a5862bf77aea7edd831dedf50e21d64"))
+ (package
+ (name "bloomberg-bde")
+ ;; Recent releases are not tagged so commit must be used for checkout.
+ (version "3.98.0.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/bloomberg/bde")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0y3lipi1lj9qazgc935851r2qsx5aq3vvc4y52jq57riyz8wg3ma"))
+ (patches
+ (search-patches
+ "bloomberg-bde-cmake-module-path.patch"))
+ ;;(modules '((guix build utils)))
+ (snippet
+ `(begin
+ ;; FIXME: Delete bundled software. The third-party packages
+ ;; may be patched or modified from upstream sources.
+ ;;(for-each delete-file-recursively
+ ;; (list "thirdparty"))
+ ;; Delete failing tests.
+ (for-each
+ delete-file
+ (list "groups/bal/ball/ball_asyncfileobserver.t.cpp"
+ "groups/bal/ball/ball_fileobserver2.t.cpp"
+ "groups/bal/ball/ball_recordstringformatter.t.cpp"
+ "groups/bal/balst/balst_stacktraceutil.t.cpp"
+ "groups/bdl/bdlmt/bdlmt_eventscheduler.t.cpp"
+ "groups/bdl/bdlmt/bdlmt_timereventscheduler.t.cpp"
+ "groups/bdl/bdls/bdls_filesystemutil.t.cpp"
+ "groups/bsl/bslh/bslh_hashpair.t.cpp"
+ "groups/bsl/bsls/bsls_platform.t.cpp"
+ "groups/bsl/bsls/bsls_stackaddressutil.t.cpp"
+ "groups/bsl/bsls/bsls_stopwatch.t.cpp"
+ "groups/bsl/bslstl/bslstl_function_invokerutil.t.cpp"))
+ #t))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:parallel-tests? #f ; Test parallelism may fail inconsistently.
+ ;; Set UFID to build shared libraries. Flag descriptions can be found at
+ ;; https://bloomberg.github.io/bde-tools/reference/bde_repo.html#ufid
+ #:configure-flags ,(match %current-system
+ ((or "i686-linux" "armhf-linux")
+ ''("-DUFID=opt_dbg_exc_mt_32_shr_cpp17"))
+ (_
+ ''("-DUFID=opt_dbg_exc_mt_64_shr_cpp17")))
+ #:phases
+ (modify-phases %standard-phases
+ ;; Explicitly build tests separate from the main build.
+ (add-after 'build 'build-tests
+ (lambda* (#:key make-flags #:allow-other-keys)
+ (apply invoke "make" "all.t"
+ `(,@(if #:parallel-build?
+ `("-j" ,(number->string (parallel-job-count)))
+ '())
+ ,@make-flags)))))))
+ (native-inputs
+ (list bloomberg-bde-tools pkg-config python))
+ (synopsis "Foundational C++ libraries used at Bloomberg")
+ (description
+ "The BDE Development Environment libraries provide an enhanced
+implementation of STL containers, vocabulary types for representing common
+concepts (like dates and times), and building blocks for developing
+multi-threaded applications and network applications.")
+ (home-page "https://github.com/bloomberg/bde")
+ (license license:asl2.0))))
diff --git a/gnu/packages/patches/bloomberg-bde-cmake-module-path.patch b/gnu/packages/patches/bloomberg-bde-cmake-module-path.patch
new file mode 100644
index 0000000000..b08ca5eac0
--- /dev/null
+++ b/gnu/packages/patches/bloomberg-bde-cmake-module-path.patch
@@ -0,0 +1,16 @@
+This package requires CMAKE_MODULE_PATH be set by the calling process. This
+patch uses the CMAKE_PREFIX_PATH passed from Guix as the search path for
+locating the bloomberg-bde-tools CMake modules.
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,8 +1,6 @@
+ cmake_minimum_required(VERSION 3.15)
+
+-if (NOT CMAKE_MODULE_PATH)
+- message(FATAL "Please specify path to BDE cmake modules.")
+-endif()
++string(REPLACE ":" "cmake/;" CMAKE_MODULE_PATH "$ENV{CMAKE_PREFIX_PATH}cmake/")
+
+ get_filename_component(repoName ${CMAKE_CURRENT_LIST_DIR} NAME)
+