unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#52812] [PATCH]: gnu: Add b2
@ 2021-12-26 21:17 Sharlatan Hellseher
  2022-08-14 16:36 ` [bug#52812] Sharlatan Hellseher
  0 siblings, 1 reply; 2+ messages in thread
From: Sharlatan Hellseher @ 2021-12-26 21:17 UTC (permalink / raw)
  To: 52812

[-- Attachment #1: Type: text/plain, Size: 1376 bytes --]

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
https://www.boost.org/build/doc/html/bbv2/faq/names.html
- boost-build
- b2
- bjam
- boost-b2

so I've stope on boost-b2 but it may be renamed to something more suitable.

> 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.

https://www.bfgroup.xyz/b2/
https://github.com/boostorg/build/tree/master

Sharlatan Hellseher (1):
  gnu: Add b2 (Boost Build, BJam)

 gnu/packages/boost.scm | 70 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 70 insertions(+)


base-commit: ea780316b0d8063d58994ca37bb503204b0f3af5


-- 
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.

[-- Attachment #2: 0001-gnu-Add-b2-Boost-Build-BJam.patch --]
[-- Type: text/x-patch, Size: 4147 bytes --]

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(+)

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [bug#52812]
  2021-12-26 21:17 [bug#52812] [PATCH]: gnu: Add b2 Sharlatan Hellseher
@ 2022-08-14 16:36 ` Sharlatan Hellseher
  0 siblings, 0 replies; 2+ messages in thread
From: Sharlatan Hellseher @ 2022-08-14 16:36 UTC (permalink / raw)
  To: 52812

Hi Guix team!

Is anything blocking to review this patch?

-- 
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-14 16:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-26 21:17 [bug#52812] [PATCH]: gnu: Add b2 Sharlatan Hellseher
2022-08-14 16:36 ` [bug#52812] Sharlatan Hellseher

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).