From patchwork Fri Apr 23 14:31:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ricardo Wurmus X-Patchwork-Id: 28820 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3861527BC7D; Fri, 23 Apr 2021 15:33:16 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D48BF27BC7C for ; Fri, 23 Apr 2021 15:33:14 +0100 (BST) Received: from localhost ([::1]:41274 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZwrp-00035y-U6 for patchwork@mira.cbaines.net; Fri, 23 Apr 2021 10:33:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50764) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZwre-00035i-Kp for guix-patches@gnu.org; Fri, 23 Apr 2021 10:33:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55146) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lZwre-0005MF-DF for guix-patches@gnu.org; Fri, 23 Apr 2021 10:33:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lZwre-00076u-6y for guix-patches@gnu.org; Fri, 23 Apr 2021 10:33:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47972] [PATCH 1/6] gnu: Add boost-for-irods. References: <878s59qe0b.fsf@elephly.net> In-Reply-To: <878s59qe0b.fsf@elephly.net> Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 23 Apr 2021 14:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47972 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 47972@debbugs.gnu.org Cc: Ricardo Wurmus Received: via spool by 47972-submit@debbugs.gnu.org id=B47972.161918834227219 (code B ref 47972); Fri, 23 Apr 2021 14:33:02 +0000 Received: (at 47972) by debbugs.gnu.org; 23 Apr 2021 14:32:22 +0000 Received: from localhost ([127.0.0.1]:38444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZwqt-00074h-1W for submit@debbugs.gnu.org; Fri, 23 Apr 2021 10:32:22 -0400 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21149) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZwqr-00074Y-Ic for 47972@debbugs.gnu.org; Fri, 23 Apr 2021 10:32:14 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1619188330; cv=none; d=zohomail.com; s=zohoarc; b=Li2lNLmBR1+j8YfGMkpr36N6zO816fYJY1BybulB0xQNrCYu2Ys4gxM09HhSSNf2fPv+Jeuoq/TwZloFXgUmh9499hlNEmYRwi3BUTTFkM6xM0Lp2NeVsu1cbeODPfDkYu3OziHdiEZXq+a5w+1t+CrDkLNHyCDIXvHzA5zniMQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619188330; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=uITkuPX9azIr+9MwMETzafoEIDf3XmcsN4srDoE2Ep8=; b=Exj6kE1/P3aHyGtptdETQO4eYvvqsUbXlOgqIIggo5rviPUGUZfUfb7Y0vCZ19cmth0kynSzMGdOvjYgZ4JLP7VaNIqPs5fuHVM4xQVCbPjWdT64y5iWiR6Qsf3CXOch5RKZ5FsLulqcwa5hZhauO1uLMeI5wo/RrMXnbQT/15Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1619188330; s=zoho; d=elephly.net; i=rekado@elephly.net; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=uITkuPX9azIr+9MwMETzafoEIDf3XmcsN4srDoE2Ep8=; b=cShXu0JPy7yKqD/ubbjqfI54xs+4JqdRHwkaFIMBjjtddIx6nWE6d+6398osfkcF Y2BAb8JcnCy0BOaSHUdaEIiaSgwzYmE82+1hc/G3Kblw4omp9aC4EUxEsOz2hLYiQ+b e3C4mPaYLSLK5NeOHXepCt88CGjTz1iPpJGIdDiY= Received: from localhost (p54ad4fb3.dip0.t-ipconnect.de [84.173.79.179]) by mx.zohomail.com with SMTPS id 161918832777828.881278899562403; Fri, 23 Apr 2021 07:32:07 -0700 (PDT) From: Ricardo Wurmus Date: Fri, 23 Apr 2021 16:31:56 +0200 Message-Id: <20210423143201.12831-1-rekado@elephly.net> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-ZohoMailClient: External X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/boost.scm (boost-for-irods): New variable. --- gnu/packages/boost.scm | 94 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 93 insertions(+), 1 deletion(-) diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm index a59bb01f3d..0ab62a4d90 100644 --- a/gnu/packages/boost.scm +++ b/gnu/packages/boost.scm @@ -7,7 +7,7 @@ ;;; Copyright © 2017 Thomas Danckaert ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018 Arun Isaac -;;; Copyright © 2018, 2019 Ricardo Wurmus +;;; Copyright © 2018, 2019, 2021 Ricardo Wurmus ;;; Copyright © 2018 Maxim Cournoyer ;;; Copyright © 2018, 2020 Efraim Flashner ;;; Copyright © 2019 Mathieu Othacehe @@ -43,6 +43,7 @@ #:use-module (gnu packages compression) #:use-module (gnu packages hurd) #:use-module (gnu packages icu4c) + #:use-module (gnu packages llvm) #:use-module (gnu packages perl) #:use-module (gnu packages python) #:use-module (gnu packages shells) @@ -201,6 +202,97 @@ across a broad spectrum of applications.") (license (license:x11-style "https://www.boost.org/LICENSE_1_0.txt" "Some components have other similar licences.")))) +;; Sadly, this is needed for irods. It won't link with 1.69 or later. +(define-public boost-for-irods + (package + (name "boost-for-irods") + (version "1.68.0") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://sourceforge/boost/boost/" version "/boost_" + (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version) + ".tar.bz2")) + (sha256 + (base32 + "1dyqsr9yb01y0nnjdq9b8q5s2kvhxbayk34832k5cpzn7jy30qbz")))) + (build-system gnu-build-system) + (inputs + `(("icu4c" ,icu4c) + ("zlib" ,zlib))) + (native-inputs + `(("clang" ,clang-6) + ("libcxx" ,libcxx+libcxxabi-6) + ("libcxxabi" ,libcxxabi-6) + ("perl" ,perl) + ("tcsh" ,tcsh))) + (arguments + `(#:tests? #f + #:make-flags + (list "threading=multi" "link=shared" + "cxxflags=-stdlib=libc++" + "--without-python" + + ;; Set the RUNPATH to $libdir so that the libs find each other. + (string-append "linkflags=-stdlib=libc++ -Wl,-rpath=" + (assoc-ref %outputs "out") "/lib")) + #:phases + (modify-phases %standard-phases + (delete 'bootstrap) + (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH + (lambda* (#:key inputs #:allow-other-keys) + (let ((gcc (assoc-ref inputs "gcc"))) + (setenv "CPLUS_INCLUDE_PATH" + (string-join + (cons (string-append (assoc-ref inputs "libcxx") + "/include/c++/v1") + ;; Hide GCC's C++ headers so that they do not interfere with + ;; the Clang headers. + (delete (string-append gcc "/include/c++") + (string-split (getenv "CPLUS_INCLUDE_PATH") + #\:))) + ":")) + (format #true + "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%" + (getenv "CPLUS_INCLUDE_PATH"))))) + (replace 'configure + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((icu (assoc-ref inputs "icu4c")) + (zlib (assoc-ref inputs "zlib")) + (out (assoc-ref outputs "out"))) + (substitute* '("libs/config/configure" + "libs/spirit/classic/phoenix/test/runtest.sh" + "tools/build/src/engine/execunix.c" + "tools/build/src/engine/Jambase" + "tools/build/src/engine/jambase.c") + (("/bin/sh") (which "sh"))) + + (setenv "SHELL" (which "sh")) + (setenv "CONFIG_SHELL" (which "sh")) + + (invoke "./bootstrap.sh" + (string-append "--prefix=" out) + ;; Auto-detection looks for ICU only in traditional + ;; install locations. + (string-append "--with-icu=" icu) + "--with-toolset=clang")))) + (replace 'build + (lambda* (#:key inputs make-flags #:allow-other-keys) + (let ((zlib (assoc-ref inputs "zlib"))) + (apply invoke "./b2" + (format #f "-j~a" (parallel-job-count)) + make-flags)))) + (replace 'install + (lambda* (#:key make-flags #:allow-other-keys) + (apply invoke "./b2" "install" make-flags)))))) + (home-page "https://www.boost.org") + (synopsis "Peer-reviewed portable C++ source libraries") + (description + "A collection of libraries intended to be widely useful, and usable +across a broad spectrum of applications.") + (license (license:x11-style "https://www.boost.org/LICENSE_1_0.txt" + "Some components have other similar licences.")))) + (define-public boost-with-python2 (package/inherit boost (name "boost-python2")