summaryrefslogtreecommitdiff
path: root/gnu/packages/boost.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-10-09 23:18:09 +0200
committerLudovic Courtès <ludo@gnu.org>2020-10-09 23:59:14 +0200
commit7b7b468ea401caca306f01c679d39ee09ef99be7 (patch)
tree41d1b77a2567266639d879ad2173fccd73701c03 /gnu/packages/boost.scm
parenta279f7c61c61d821d481c6c241372bd5bd1dcf67 (diff)
downloadguix-7b7b468ea401caca306f01c679d39ee09ef99be7.tar.gz
guix-7b7b468ea401caca306f01c679d39ee09ef99be7.tar.xz
gnu: boost: Allow compilation on/to GNU/Hurd.
* gnu/packages/boost.scm (boost)[arguments]: In 'configure' phase, patch "#if defined(__MACH__)" to deal with GNU/Hurd.
Diffstat (limited to 'gnu/packages/boost.scm')
-rw-r--r--gnu/packages/boost.scm12
1 files changed, 11 insertions, 1 deletions
diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm
index 6a08b0d6c7..b1ab8a4ec9 100644
--- a/gnu/packages/boost.scm
+++ b/gnu/packages/boost.scm
@@ -3,7 +3,7 @@
;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
-;;; Copyright © 2015, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
@@ -40,6 +40,7 @@
#:use-module (guix build-system trivial)
#:use-module (gnu packages)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages hurd)
#:use-module (gnu packages icu4c)
#:use-module (gnu packages perl)
#:use-module (gnu packages python)
@@ -138,6 +139,15 @@
,(%current-target-system)))))
'())
+ ;; Change an #ifdef __MACH__ that really targets macOS.
+ ;; TODO: Inline this on the next rebuild cycle.
+ ,@(if (hurd-target?)
+ '((substitute* "boost/test/utils/timer.hpp"
+ (("defined\\(__MACH__\\)")
+ "(defined __MACH__ && !defined __GNU__)"))
+ #t)
+ '())
+
(invoke "./bootstrap.sh"
(string-append "--prefix=" out)
;; Auto-detection looks for ICU only in traditional