From patchwork Tue Aug 10 18:18:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Xinglu Chen X-Patchwork-Id: 32002 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 E3A2627BC82; Tue, 10 Aug 2021 19:20:38 +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_H2,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 607B227BC78 for ; Tue, 10 Aug 2021 19:20:38 +0100 (BST) Received: from localhost ([::1]:57146 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDWMf-0001QA-CF for patchwork@mira.cbaines.net; Tue, 10 Aug 2021 14:20:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55816) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDWM6-0001Nc-Fr for guix-patches@gnu.org; Tue, 10 Aug 2021 14:20:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49254) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mDWM6-0006rg-9F for guix-patches@gnu.org; Tue, 10 Aug 2021 14:20:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mDWM6-0004ZU-4Q for guix-patches@gnu.org; Tue, 10 Aug 2021 14:20:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49984] [PATCH] gnu: Add ocaml-4.12. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 10 Aug 2021 18:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49984 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49984@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162861955417505 (code B ref -1); Tue, 10 Aug 2021 18:20:02 +0000 Received: (at submit) by debbugs.gnu.org; 10 Aug 2021 18:19:14 +0000 Received: from localhost ([127.0.0.1]:60800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDWLJ-0004YH-Q9 for submit@debbugs.gnu.org; Tue, 10 Aug 2021 14:19:14 -0400 Received: from lists.gnu.org ([209.51.188.17]:43214) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDWLH-0004Y9-S4 for submit@debbugs.gnu.org; Tue, 10 Aug 2021 14:19:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55694) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDWLH-0000Pp-Fy for guix-patches@gnu.org; Tue, 10 Aug 2021 14:19:11 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:50976 helo=mail.yoctocell.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDWLF-0006Ex-7O for guix-patches@gnu.org; Tue, 10 Aug 2021 14:19:11 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1628619540; bh=M2knuSmQkrWxe65qeohlnWXaMpJYkWulO42rQeJr+xQ=; h=From:To:Subject:References:Date; b=G3HtvijmrJkoXKD11fnenPm+PXHM+9tb8eIvgNJGhosCaEwogNjSXTzRmK4x2xRh9 OUTeRqponHmIvV3MEZVFGCpG4OtIwwzMNSZ8y/tAGfVdOZjWGSj34kJpYBr3DWCHdW mct/fHBJgqIKPIVf4xpeMVsB1Dh2QZSX5AxGQWrw= References: ~a: changing `\"/bin/sh\"' to `~a'~%" Message-Id: Date: Tue, 10 Aug 2021 20:18:55 +0200 MIME-Version: 1.0 Received-SPF: pass client-ip=87.96.130.155; envelope-from=public@yoctocell.xyz; helo=mail.yoctocell.xyz X-Spam_score_int: 18 X-Spam_score: 1.8 X-Spam_bar: + X-Spam_report: (1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_SUSPICIOUS_NTLD=0.498, FROM_SUSPICIOUS_NTLD_FP=0.386, PDS_OTHER_BAD_TLD=1.997, PDS_RDNS_DYNAMIC_FP=0.001, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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/ocaml.scm (ocaml-4.12): New variable. (ocaml-4.11): Inherit from ‘ocaml-4.12’. --- I tried to inherit as much as possible without having to rebuild ‘ocaml-4.11’. gnu/packages/ocaml.scm | 57 +++++++++++++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 15 deletions(-) base-commit: 1fa4485fb033874fd56b025e8ec998aebc245fe5 diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 112751ddec..4108bc0b5f 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -176,10 +176,10 @@ OCaml and can effectively bootstrap OCaml 4.07. This package produces a native @command{ocamlc} and a bytecode @command{ocamllex}.") (license license:expat)))) -(define-public ocaml-4.11 +(define-public ocaml-4.12 (package (name "ocaml") - (version "4.11.1") + (version "4.12.0") (source (origin (method url-fetch) (uri (string-append @@ -188,7 +188,7 @@ This package produces a native @command{ocamlc} and a bytecode @command{ocamllex "/ocaml-" version ".tar.xz")) (sha256 (base32 - "0k4521c0p10c5ams6vjv5qkkjhmpkb0bfn04llcz46ah0f3r2jpa")))) + "1hxy349jfa2vkfgmxf6pvd9w4z5bmcgsg0fxfdabcghyvjw9vvir")))) (build-system gnu-build-system) (native-search-paths (list (search-path-specification @@ -205,6 +205,44 @@ This package produces a native @command{ocamlc} and a bytecode @command{ocamllex `(("libx11" ,libx11) ("libiberty" ,libiberty) ;needed for objdump support ("zlib" ,zlib))) ;also needed for objdump support + (arguments + `(#:configure-flags '("--enable-ocamltest") + #:test-target "tests" + #:make-flags '("world.opt") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-/bin/sh-references + (lambda* (#:key inputs #:allow-other-keys) + (let ((sh (string-append (assoc-ref inputs "bash") + "/bin/sh"))) + (substitute* (find-files "." "\\.ml$") + (("\"/bin/sh\"") + (string-append "\"" sh "\""))))))))) + (home-page "https://ocaml.org/") + (synopsis "The OCaml programming language") + (description + "OCaml is a general purpose industrial-strength programming language with +an emphasis on expressiveness and safety. Developed for more than 20 years at +Inria it benefits from one of the most advanced type systems and supports +functional, imperative and object-oriented styles of programming.") + ;; The compiler is distributed under qpl1.0 with a change to choice of + ;; law: the license is governed by the laws of France. The library is + ;; distributed under lgpl2.0. + (license (list license:qpl license:lgpl2.0)))) + +(define-public ocaml-4.11 + (package + (inherit ocaml-4.12) + (version "4.11.1") + (source (origin + (method url-fetch) + (uri (string-append + "http://caml.inria.fr/pub/distrib/ocaml-" + (version-major+minor version) + "/ocaml-" version ".tar.xz")) + (sha256 + (base32 + "0k4521c0p10c5ams6vjv5qkkjhmpkb0bfn04llcz46ah0f3r2jpa")))) (arguments `(#:phases (modify-phases %standard-phases @@ -232,18 +270,7 @@ patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%" (replace 'check (lambda _ (with-directory-excursion "testsuite" - (invoke "make" "all"))))))) - (home-page "https://ocaml.org/") - (synopsis "The OCaml programming language") - (description - "OCaml is a general purpose industrial-strength programming language with -an emphasis on expressiveness and safety. Developed for more than 20 years at -Inria it benefits from one of the most advanced type systems and supports -functional, imperative and object-oriented styles of programming.") - ;; The compiler is distributed under qpl1.0 with a change to choice of - ;; law: the license is governed by the laws of France. The library is - ;; distributed under lgpl2.0. - (license (list license:qpl license:lgpl2.0)))) + (invoke "make" "all"))))))))) (define-public ocaml-4.09 (package