From patchwork Fri Jan 28 17:48:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Wurmus X-Patchwork-Id: 36861 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 716D327BBEA; Fri, 28 Jan 2022 17:51:16 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E38E127BBE9 for ; Fri, 28 Jan 2022 17:51:15 +0000 (GMT) Received: from localhost ([::1]:36188 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nDVP1-0004e7-21 for patchwork@mira.cbaines.net; Fri, 28 Jan 2022 12:51:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36310) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nDVNr-0004Gq-0H for guix-patches@gnu.org; Fri, 28 Jan 2022 12:50:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:39309) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nDVNq-0002Sh-6P for guix-patches@gnu.org; Fri, 28 Jan 2022 12:50:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nDVNq-0001QI-4r for guix-patches@gnu.org; Fri, 28 Jan 2022 12:50:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53609] [PATCH 1/2] gnu: Add perl-5.14. References: <8735l7hi2k.fsf@elephly.net> In-Reply-To: <8735l7hi2k.fsf@elephly.net> Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 28 Jan 2022 17:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53609 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53609@debbugs.gnu.org Cc: Ricardo Wurmus Received: via spool by 53609-submit@debbugs.gnu.org id=B53609.16433921435367 (code B ref 53609); Fri, 28 Jan 2022 17:50:02 +0000 Received: (at 53609) by debbugs.gnu.org; 28 Jan 2022 17:49:03 +0000 Received: from localhost ([127.0.0.1]:60442 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDVMs-0001OK-F6 for submit@debbugs.gnu.org; Fri, 28 Jan 2022 12:49:02 -0500 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21137) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDVMq-0001Nv-EO for 53609@debbugs.gnu.org; Fri, 28 Jan 2022 12:49:01 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1643392138; cv=none; d=zohomail.com; s=zohoarc; b=ZblUvvqo+ybOvKS7KU23kjUBM8j8dlJ6IXE2TwbSYnax7dy/pgMXUTD/U/D+A9tMgHA47IPJFBLBUS2l7Fv8JE4xmf8YnOo7Y+3/6dnBUEVZ6jfxWMUXZxATIm0yNKwE36q0mwgCUybQLsWZrX/UOx5QsDPpw24hAxNTP9bxRUc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1643392138; h=Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=gU+vPBSVH8fT77ogLYseKao6T6bdFl1i9ecLMA9jPjc=; b=gEYs9RFnuadIijXj4kWB0s1KKVu5Kig7I5T5kyMMPTLj7Pq8BjhxJ7jA6YZCjSGWOJQ4ha028ohDqKNRvAnxPhIECOsGOgn4kxTE8SmbYr0nka3+ozLSyAOme8ri6tUcKQDOp0oT3YrB8kX7QU7ixhIDOGOCBAJSMXtiNVPdHv4= 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= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1643392138; s=zoho; d=elephly.net; i=rekado@elephly.net; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Transfer-Encoding; bh=gU+vPBSVH8fT77ogLYseKao6T6bdFl1i9ecLMA9jPjc=; b=KYsSQGym+6JW/DYoqpY/6fetOot0Wm8/H5pPNN9VVp8Wo5YSDmODWEXgiLee6Ls3 XfY1MC2dxp5em5qI1e43KkFB7Ha7rPe47Sly6wyTSDJhvFPePoTuYGzo+qtCa/RFDuN uXtVV+RF8CKtajbuv/dn+eia0nl47dZbd63UYj+s= Received: from localhost (p54ad4fa1.dip0.t-ipconnect.de [84.173.79.161]) by mx.zohomail.com with SMTPS id 1643392137612372.75862891820145; Fri, 28 Jan 2022 09:48:57 -0800 (PST) From: Ricardo Wurmus Date: Fri, 28 Jan 2022 18:48:51 +0100 Message-Id: <20220128174852.10637-1-rekado@elephly.net> X-Mailer: git-send-email 2.34.0 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/perl.scm (perl-5.14): New variable. --- gnu/packages/perl.scm | 73 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index d2c9d0d24e..b70db30e8d 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -65,6 +65,7 @@ (define-module (gnu packages perl) #:use-module (gnu packages databases) #:use-module (gnu packages fontutils) #:use-module (gnu packages freedesktop) + #:use-module (gnu packages gcc) #:use-module (gnu packages gd) #:use-module (gnu packages gl) #:use-module (gnu packages gtk) @@ -258,6 +259,78 @@ (define-public perl (home-page "https://www.perl.org/") (license license:gpl1+))) ; or "Artistic" +(define-public perl-5.14 + (package + (name "perl") + (version "5.14.4") + (source (origin + (method url-fetch) + (uri (string-append "mirror://cpan/src/5.0/perl-" + version ".tar.gz")) + (sha256 + (base32 + "1js47zzna3v38fjnirf2vq6y0rjp8m86ysj5vagzgkig956d8gw0")) + (patches (search-patches + "perl-5.14-no-sys-dirs.patch" + "perl-5.14-autosplit-default-time.patch" + "perl-5.14-module-pluggable-search.patch")))) + (properties `((release-date . "2013-03-10"))) + (build-system gnu-build-system) + (arguments + '(#:tests? #f + #:phases + (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (libc (assoc-ref inputs "libc"))) + ;; Use the right path for `pwd'. + (substitute* "dist/Cwd/Cwd.pm" + (("/bin/pwd") + (which "pwd"))) + + (invoke "./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") + + ;; Force the library search path to contain only libc + ;; because it is recorded in Config.pm and + ;; Config_heavy.pl; we don't want to keep a reference + ;; to everything that's in $LIBRARY_PATH at build + ;; time (Binutils, bzip2, file, etc.) + (string-append "-Dlibpth=" libc "/lib") + (string-append "-Dplibpth=" libc "/lib"))))) + + (add-before 'strip 'make-shared-objects-writable + (lambda* (#:key outputs #:allow-other-keys) + ;; The 'lib/perl5' directory contains ~50 MiB of .so. Make them + ;; writable so that 'strip' actually strips them. + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib"))) + (for-each (lambda (dso) + (chmod dso #o755)) + (find-files lib "\\.so$")))))))) + (native-inputs + (list gcc-7)) + (native-search-paths (list (search-path-specification + (variable "PERL5LIB") + (files '("lib/perl5/site_perl"))))) + (home-page "https://www.perl.org/") + (synopsis "Implementation of the Perl programming language") + (description + "Perl is a general-purpose programming language originally developed for +text manipulation and now used for a wide range of tasks including system +administration, web development, network programming, GUI development, and +more.") + (license license:gpl1+))) + (define-public perl-algorithm-c3 (package (name "perl-algorithm-c3") From patchwork Fri Jan 28 17:48:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Wurmus X-Patchwork-Id: 36860 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 85A6627BBEA; Fri, 28 Jan 2022 17:50:45 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E90D827BBE9 for ; Fri, 28 Jan 2022 17:50:44 +0000 (GMT) Received: from localhost ([::1]:35702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nDVOW-0004Hs-4t for patchwork@mira.cbaines.net; Fri, 28 Jan 2022 12:50:44 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36312) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nDVNr-0004Gs-2w for guix-patches@gnu.org; Fri, 28 Jan 2022 12:50:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:39310) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nDVNq-0002Sk-Op for guix-patches@gnu.org; Fri, 28 Jan 2022 12:50:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nDVNq-0001QP-KE for guix-patches@gnu.org; Fri, 28 Jan 2022 12:50:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53609] [PATCH 2/2] gnu: Add ghc-4. Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 28 Jan 2022 17:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53609 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53609@debbugs.gnu.org Cc: Ricardo Wurmus Received: via spool by 53609-submit@debbugs.gnu.org id=B53609.16433921535395 (code B ref 53609); Fri, 28 Jan 2022 17:50:02 +0000 Received: (at 53609) by debbugs.gnu.org; 28 Jan 2022 17:49:13 +0000 Received: from localhost ([127.0.0.1]:60445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDVMx-0001Or-TX for submit@debbugs.gnu.org; Fri, 28 Jan 2022 12:49:13 -0500 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21140) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDVMu-0001Og-6V for 53609@debbugs.gnu.org; Fri, 28 Jan 2022 12:49:04 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1643392143; cv=none; d=zohomail.com; s=zohoarc; b=iuXdW6evE1BtsuN+UfYKx4IyQTLRGQ7Ww+wAqeuh6oUlxi3mbvlwrPpOjYSfBZwMyxKYtrjVxrm36g1dRnD3WaO6FjmPAvcH68j6YTBsEEhRJMykdqFPHenfuRG0scRl9wZLOE4ws/3s252Qipg8P01MppaPdnmQKtbXh+LOd1s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1643392143; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=x97BrmwcZBuBB6ifzIISWdGsE5E3FeCIWyWqoud/gtk=; b=eAbgRZxE8KpxQh/+orL/yOahhQc2L9m/8VJLnILUHA2lTzy30++lBoacFwI6liu0n0ZYVoVx9E1Gm1zepty0/1fgA3Hesdmv3hhw99HF3Z2DIvUFTRqOD183kv+HvbM+AOI7/l0s6cpnjXF6uzbvPmZuQrZu4EivZZYOzJWt+rE= 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= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1643392143; s=zoho; d=elephly.net; i=rekado@elephly.net; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding; bh=x97BrmwcZBuBB6ifzIISWdGsE5E3FeCIWyWqoud/gtk=; b=QafsXfB7iCZ7y6sz0ByqOdTpUG39hNsAQl2muia7RghLM3fiKYONoVnz5dTX3wJH g4G8sB0oN8l0/rfhzO4o89fWlvmN0LV+menmZpnJnDTBPd+J0YGpnfsDETz2e6faxhi mw9s6kEDdXXwbQf+5p5YZ7awPh7zng23e+n/uI50= Received: from localhost (p54ad4fa1.dip0.t-ipconnect.de [84.173.79.161]) by mx.zohomail.com with SMTPS id 1643392140918723.5731038276593; Fri, 28 Jan 2022 09:49:00 -0800 (PST) From: Ricardo Wurmus Date: Fri, 28 Jan 2022 18:48:52 +0100 Message-Id: <20220128174852.10637-2-rekado@elephly.net> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220128174852.10637-1-rekado@elephly.net> References: <20220128174852.10637-1-rekado@elephly.net> 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/commencement.scm (ghc-4): New variable. --- gnu/packages/commencement.scm | 131 ++++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 96d914344d..03f1ea276c 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -30,6 +30,7 @@ (define-module (gnu packages commencement) #:use-module (gnu packages) + #:use-module (gnu packages autotools) #:use-module (gnu packages bootstrap) #:use-module (gnu packages base) #:use-module (gnu packages bash) @@ -3902,5 +3903,135 @@ (define-public gfortran-toolchain gfortran, as well as libc (headers and binaries, plus debugging symbols in the @code{debug} output), and binutils."))) +(define-public ghc-4 + (package + (name "ghc") + (version "4.08.2") + (source + (origin + (method url-fetch) + (uri (string-append "https://www.haskell.org/ghc/dist/" + version "/" name "-" version "-src.tar.bz2")) + (sha256 + (base32 + "0ar4nxy4cr5vwvfj71gmc174vx0n3lg9ka05sa1k60c8z0g3xp1q")))) + (build-system gnu-build-system) + (supported-systems '("i686-linux" "x86_64-linux")) + (arguments + `(#:system "i686-linux" + #:implicit-inputs? #f + #:strip-binaries? #f + #:phases + (modify-phases %standard-phases + (replace 'bootstrap + (lambda* (#:key inputs #:allow-other-keys) + (delete-file "configure") + (delete-file "config.sub") + (install-file (string-append (assoc-ref inputs "automake") + "/share/automake-1.16/config.sub") + ".") + (let ((bash (which "bash"))) + (substitute* '("configure.in" + "ghc/configure.in" + "ghc/rts/gmp/mpn/configure.in" + "ghc/rts/gmp/mpz/configure.in" + "ghc/rts/gmp/configure.in" + "distrib/configure-bin.in") + (("`/bin/sh") (string-append "`" bash)) + (("SHELL=/bin/sh") (string-append "SHELL=" bash)) + (("^#! /bin/sh") (string-append "#! " bash))) + + (substitute* '("mk/config.mk.in" + "ghc/rts/gmp/mpz/Makefile.in" + "ghc/rts/gmp/Makefile.in") + (("^SHELL.*=.*/bin/sh") (string-append "SHELL = " bash))) + (substitute* "aclocal.m4" + (("SHELL=/bin/sh") (string-append "SHELL=" bash)))) + + (invoke "autoreconf" "--verbose" "--force"))) + (add-before 'configure 'configure-gmp + (lambda* (#:key build inputs outputs #:allow-other-keys) + (with-directory-excursion "ghc/rts/gmp" + (let ((bash (which "bash")) + (out (assoc-ref outputs "out"))) + (setenv "CONFIG_SHELL" bash) + (setenv "SHELL" bash) + (invoke bash "./configure"))))) + (replace 'configure + (lambda* (#:key build inputs outputs #:allow-other-keys) + (let ((bash (which "bash")) + (out (assoc-ref outputs "out"))) + (setenv "CONFIG_SHELL" bash) + (setenv "SHELL" bash) + (invoke bash "./configure" + "--enable-hc-boot" + (string-append "--prefix=" out) + (string-append "--build=" build) + (string-append "--host=" build))))) + (replace 'build + (lambda _ + ;; mkdirhier doesn't get built, so just use mkdir -p. + (substitute* "mk/paths.mk" + (("^INSTALL_DIR.*") + "INSTALL_DIR = mkdir -p")) + + #; + (substitute* "ghc/driver/ghc-asm.prl" + (("local\\(\\$\\*\\) = 1;") "") + (("endef\\$/") "endef$/s")) + + (invoke "make" "boot") + (invoke "make")))))) + (native-inputs + `(("gcc" ,gcc-mesboot0) + ("libc" ,glibc-mesboot0) + ("binutils" ,binutils-mesboot0) + + ("autoconf" ,autoconf-2.13) + ("automake" ,automake) + + ("make" ,gnu-make-final) + ("sed" ,sed-final) + ("grep" ,grep-final) + ("coreutils" ,coreutils-final) + ("bash" ,bash-final) + ("ld-wrapper" ,ld-wrapper) + ("kernel-headers" ,%bootstrap-linux-libre-headers) + ("tar" ,tar) + ("bzip2" ,bzip2) + ("diffutils" ,diffutils) + ("file" ,file) + ("findutils" ,findutils) + ("gawk" ,gawk) + + ;; TODO: Perl used to allow setting $* to enable multi-line + ;; matching. If we want to use a more recent Perl we need to + ;; patch all expressions that require multi-line matching. Hard + ;; to tell. + ("perl" ,perl-5.14))) + (native-search-paths (list (search-path-specification + (variable "GHC_PACKAGE_PATH") + (files (list + (string-append "lib/ghc-" version))) + (file-pattern ".*\\.conf\\.d$") + (file-type 'directory)))) + (home-page "https://www.haskell.org/ghc") + (synopsis "The Glasgow Haskell Compiler") + (description + "The Glasgow Haskell Compiler (GHC) is a state-of-the-art compiler and +interactive environment for the functional language Haskell.") + (license license:bsd-3))) + (native-search-paths (list (search-path-specification + (variable "GHC_PACKAGE_PATH") + (files (list + (string-append "lib/ghc-" version))) + (file-pattern ".*\\.conf\\.d$") + (file-type 'directory)))) + (home-page "https://www.haskell.org/ghc") + (synopsis "The Glasgow Haskell Compiler") + (description + "The Glasgow Haskell Compiler (GHC) is a state-of-the-art compiler and +interactive environment for the functional language Haskell.") + (license license:bsd-3))) ;;; commencement.scm ends here