[PATCH]: gnu: Add b2

  • Open
  • quality assurance status badge
Details
One participant
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Sharlatan Hellseher
Severity
normal
S
S
Sharlatan Hellseher wrote on 26 Dec 2021 22:17
(address . guix-patches@gnu.org)
CAO+9K5rgV_JxY6Ocq1S-LikOZyJCEq873+0knyOJGpQuaokqTw@mail.gmail.com
Hi Guix team!
Here is the Boost Build system which became a stand alone project now.
It would be nice have a build system base on it, there are a number of
projects which are built with it. Boost package may be rewritten and
simplified as well.
I was not sure about the nameing becouse of
- boost-build
- b2
- bjam
- boost-b2
so I've stope on boost-b2 but it may be renamed to something more suitable.
Toggle quote (1 lines)
> B2 makes it easy to build C++ projects, everywhere. B2 has been the primary build system for the Boost C++ Libraries for many years. The main development now lives here at BFG in order to grow the audience outside of Boost.
Sharlatan Hellseher (1):
gnu: Add b2 (Boost Build, BJam)
gnu/packages/boost.scm | 70 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 70 insertions(+)
base-commit: ea780316b0d8063d58994ca37bb503204b0f3af5
--
… ??? ????? - ???????????? ?????????????? ?????? ??????? ????????
????? ????? ????? ? ??? ??????, ??????????? ????? ???????, ??
?????????? ?? ? ????????? ??????? ????? ? ?????????????????.
From 9f9e8529884ce28761cc440999cb997ddaed5991 Mon Sep 17 00:00:00 2001
From: Sharlatan Hellseher <sharlatanus@gmail.com>
Date: Sun, 26 Dec 2021 21:08:55 +0000
Subject: [PATCH 1/1] gnu: Add b2 (Boost Build, BJam)

* gnu/packages/boost.scm: (boost-b2): New variable
---
gnu/packages/boost.scm | 70 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 70 insertions(+)

Toggle diff (94 lines)
diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm
index b53b1f4257..99a3d35806 100644
--- a/gnu/packages/boost.scm
+++ b/gnu/packages/boost.scm
@@ -19,6 +19,7 @@
;;; Copyright © 2021 Franck Pérignon <franck.perignon@univ-grenoble-alpes.fr>
;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
;;; Copyright © 2021 Aleksandr Vityazev <avityazev@posteo.org>
+;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -44,6 +45,7 @@ (define-module (gnu packages boost)
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
#:use-module (gnu packages)
+ #:use-module (gnu packages bison)
#:use-module (gnu packages compression)
#:use-module (gnu packages hurd)
#:use-module (gnu packages icu4c)
@@ -468,3 +470,71 @@ (define-public mdds
for C++. It includes flat segment trees, segment trees, rectangle sets,
point quad trees, multi-type vectors and multi-type matrices.")
(license license:expat)))
+
+(define-public boost-b2
+ (package
+ (name "boost-b2")
+ (version "4.7.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ ;; Developed under Boost before
+ ;; https://github.com/boostorg/build
+ (url "https://github.com/bfgroup/b2")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0ijw9fqgaiwch8hzvm9fqf986p140839mdqjgg7qcf8kffwa0myb"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags
+ (list (string-append "--prefix=" (assoc-ref %outputs "out")))
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'bootstrap)
+ (delete 'build)
+ (replace 'configure
+ (lambda _
+ (substitute* '("src/engine/execunix.cpp")
+ (("/bin/sh") (which "sh")))
+ (setenv "SHELL" (which "sh"))
+ (setenv "CONFIG_SHELL" (which "sh"))
+ (invoke "./src/engine/build.sh" "--verbose" "gcc")
+ #t))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (chdir "test")
+ ;; NOTE: (Sharlatan-20211226T140846+0000): Some tests failed,
+ ;; check and patch them if needed later
+ ;;
+ ;; 164 passed
+ ;; 2 failed
+ ;;
+ (substitute* "test_all.py"
+ (("\"project_test3\"," all)
+ (string-append "# " all)))
+ (substitute* "test_all.py"
+ (("\"project_test4\"," all)
+ (string-append "# " all)))
+ ;; NOTE: (Sharlatan-20211226T175253+0000): probably it needs some
+ ;; simplification here to reduce amount of jumps with `chdir'.
+ ;; Without them `install' phase failes
+ (invoke "python" "test_all.py" "gcc")
+ (chdir ".."))))
+ (replace 'install
+ (lambda* (#:key make-flags outputs #:allow-other-keys)
+ (apply invoke "./src/engine/b2" "install" "toolset=gcc" make-flags)
+ #t)))))
+ (native-inputs
+ (list bison
+ python-wrapper))
+ (home-page "https://www.bfgroup.xyz/b2/")
+ (synopsis "Boost Build (B2, ex BJam) Make like tool for C++ projects")
+ (description
+ "B2 makes it easy to build C++ projects, everywhere. B2 has been the
+primary build system for the Boost C++ Libraries for many years.")
+ (license (license:x11-style "https://www.bfgroup.xyz/b2/LICENSE.txt"
+ "Some components have other similar licences."))))
--
2.34.0
S
S
Sharlatan Hellseher wrote on 14 Aug 2022 18:36
(address . 52812@debbugs.gnu.org)
CAO+9K5rce33BveqfEfGZE4_Gun_-UCF_3rbPvj4o8xLtnoFfDA@mail.gmail.com
Hi Guix team!
Is anything blocking to review this patch?
--
… ??? ????? - ???????????? ?????????????? ?????? ??????? ????????
????? ????? ????? ? ??? ??????, ??????????? ????? ???????, ??
?????????? ?? ? ????????? ??????? ????? ? ?????????????????.
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 52812@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 52812
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch