From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Woodcroft Subject: [PATCH 2/2] gnu: perl: Enable threading support. Date: Tue, 20 Sep 2016 14:56:07 +1000 Message-ID: <20160920045607.18936-3-donttrustben@gmail.com> References: <20160920045607.18936-1-donttrustben@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36446) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmD83-0001RM-VF for guix-devel@gnu.org; Tue, 20 Sep 2016 00:58:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmD7y-0004RP-T5 for guix-devel@gnu.org; Tue, 20 Sep 2016 00:57:58 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:33329) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmD7y-0004RK-MG for guix-devel@gnu.org; Tue, 20 Sep 2016 00:57:54 -0400 Received: by mail-pf0-f196.google.com with SMTP id q2so367470pfj.0 for ; Mon, 19 Sep 2016 21:57:54 -0700 (PDT) Received: from localhost.localdomain ([103.25.181.216]) by smtp.googlemail.com with ESMTPSA id r7sm12637130pfk.49.2016.09.19.21.56.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Sep 2016 21:56:49 -0700 (PDT) In-Reply-To: <20160920045607.18936-1-donttrustben@gmail.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * gnu/packages/perl.scm (perl)[arguments]: Enable threading support. * gnu/packages/commencement.scm (perl-boot0): Do not inherit 'configure' phase from perl. --- gnu/packages/commencement.scm | 57 +++++++++++++++++++++++++++++-------------- gnu/packages/perl.scm | 4 +++ 2 files changed, 43 insertions(+), 18 deletions(-) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 8f1ecf8..60822a9 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2014 Andreas Enge ;;; Copyright © 2012 Nikita Karetnikov ;;; Copyright © 2014, 2015 Mark H Weaver +;;; Copyright © 2016 Ben Woodcroft ;;; ;;; This file is part of GNU Guix. ;;; @@ -269,24 +270,44 @@ (package-native-inputs gcc)))))) (define perl-boot0 - (let ((perl (package - (inherit perl) - (name "perl-boot0") - (replacement #f) - (arguments - ;; At the very least, this must not depend on GCC & co. - (let ((args `(#:disallowed-references - ,(list %bootstrap-binutils)))) - (substitute-keyword-arguments (package-arguments perl) - ((#:phases phases) - `(modify-phases ,phases - ;; Pthread support is missing in the bootstrap compiler - ;; (broken spec file), so disable it. - (add-before 'configure 'disable-pthreads - (lambda _ - (substitute* "Configure" - (("^libswanted=(.*)pthread" _ before) - (string-append "libswanted=" before))))))))))))) + (let ((perl + (package + (inherit perl) + (name "perl-boot0") + (replacement #f) + (arguments + ;; At the very least, this must not depend on GCC & co. + (let ((args `(#:disallowed-references + ,(list %bootstrap-binutils)))) + (substitute-keyword-arguments (package-arguments perl) + ((#:phases phases) + `(modify-phases ,phases + ;; Pthread support is missing in the bootstrap compiler + ;; (broken spec file), so disable it. + (add-before 'configure 'disable-pthreads + (lambda _ + (substitute* "Configure" + (("^libswanted=(.*)pthread" _ before) + (string-append "libswanted=" before))))) + ;; This phase is largely shared with 'perl' but we + ;; configure without threading support. + (replace 'configure + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (libc (assoc-ref inputs "libc"))) + (zero? + (system* + "./Configure" + (string-append "-Dprefix=" out) + (string-append "-Dman1dir=" out "/share/man/man1") + (string-append "-Dman3dir=" out "/share/man/man3") + "-de" "-Dcc=gcc" + "-Uinstallusrbinperl" + "-Dinstallstyle=lib/perl5" + "-Duseshrplib" + (string-append "-Dlocincpth=" libc "/include") + (string-append "-Dloclibpth=" libc + "/lib")))))))))))))) (package-with-bootstrap-guile (package-with-explicit-inputs perl %boot0-inputs diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index f0c4e36..273e4d0 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -77,6 +77,9 @@ #t)) (replace 'configure + ;; This configure phase is largely shared with 'perl-boot0', so if + ;; changes are made in this phase they may also be applicable + ;; there. (lambda* (#:key inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")) (libc (assoc-ref inputs "libc"))) @@ -89,6 +92,7 @@ "-Uinstallusrbinperl" "-Dinstallstyle=lib/perl5" "-Duseshrplib" + "-Dusethreads" (string-append "-Dlocincpth=" libc "/include") (string-append "-Dloclibpth=" libc "/lib")))))) -- 2.10.0