From 7b7b468ea401caca306f01c679d39ee09ef99be7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 9 Oct 2020 23:18:09 +0200 Subject: [PATCH] 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. --- gnu/packages/boost.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 ;;; Copyright © 2015 Andreas Enge ;;; Copyright © 2016 Eric Bavier -;;; Copyright © 2015, 2019 Ludovic Courtès +;;; Copyright © 2015, 2019, 2020 Ludovic Courtès ;;; Copyright © 2017 Thomas Danckaert ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018 Arun Isaac @@ -40,6 +40,7 @@ (define-module (gnu packages boost) #: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 @@ (define-public boost ,(%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