From patchwork Sun Aug 27 12:53:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 53252 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 3D46427BBE2; Sun, 27 Aug 2023 13:55:50 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS 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 BA9ED27BBF0 for ; Sun, 27 Aug 2023 13:55:42 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qaFIM-0005Te-Md; Sun, 27 Aug 2023 08:55:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qaFIB-0005MC-6P for guix-patches@gnu.org; Sun, 27 Aug 2023 08:54:59 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qaFIA-0004i0-UK for guix-patches@gnu.org; Sun, 27 Aug 2023 08:54:58 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qaFIG-0005HV-MP for guix-patches@gnu.org; Sun, 27 Aug 2023 08:55:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#60571] [PATCH v2 3/4] gnu: Add icu4c-for-skia. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Aug 2023 12:55:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60571 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 60571@debbugs.gnu.org Cc: ngraves@ngraves.fr, maxim.cournoyer@gmail.com Received: via spool by 60571-submit@debbugs.gnu.org id=B60571.169314085020179 (code B ref 60571); Sun, 27 Aug 2023 12:55:04 +0000 Received: (at 60571) by debbugs.gnu.org; 27 Aug 2023 12:54:10 +0000 Received: from localhost ([127.0.0.1]:44359 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaFHO-0005FI-72 for submit@debbugs.gnu.org; Sun, 27 Aug 2023 08:54:10 -0400 Received: from 17.mo584.mail-out.ovh.net ([46.105.41.16]:48791) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaFHI-0005E7-3i for 60571@debbugs.gnu.org; Sun, 27 Aug 2023 08:54:06 -0400 Received: from director3.ghost.mail-out.ovh.net (unknown [10.109.138.76]) by mo584.mail-out.ovh.net (Postfix) with ESMTP id 9706723C2D for <60571@debbugs.gnu.org>; Sun, 27 Aug 2023 12:53:55 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-84g2d (unknown [10.108.20.53]) by director3.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 2E8AB1FE00; Sun, 27 Aug 2023 12:53:55 +0000 (UTC) Received: from ngraves.fr ([37.59.142.109]) by ghost-submission-6684bf9d7b-84g2d with ESMTPSA id 9qD8BmNH62RrbwAASGCVQA (envelope-from ); Sun, 27 Aug 2023 12:53:55 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-109S0032a2caf4e-1325-48ac-9f9f-51b38234b767, B461FFA8E1F6BE32FDECEAF7525921981C04578F) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 81.67.140.142 Date: Sun, 27 Aug 2023 14:53:41 +0200 Message-ID: <28d93ea0e4bda4dbbc9a653cfefb7e569b827ada.1693140822.git.ngraves@ngraves.fr> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-Ovh-Tracer-Id: 5143955200033743553 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedviedrudefvddgheekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhephfejueduiefhieejffekieehgeekkefgudfgudeltdfhffdvudeihffhhfejudetnecuffhomhgrihhnpehgohhoghhlvghsohhurhgtvgdrtghomhenucfkphepuddvjedrtddrtddruddpkedurdeijedrudegtddrudegvddpfeejrdehledrudegvddruddtleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqpdhnsggprhgtphhtthhopedupdhrtghpthhtohepiedtheejudesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheekgedpmhhouggvpehsmhhtphhouhht 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: , Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches X-Patchwork-Original-From: Nicolas Graves via Guix-patches via From: Nicolas Graves Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/icu4c.scm (icu4c-for-skia): New variable. --- gnu/packages/icu4c.scm | 101 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) diff --git a/gnu/packages/icu4c.scm b/gnu/packages/icu4c.scm index ba8b4915f2..eef8bd2cd3 100644 --- a/gnu/packages/icu4c.scm +++ b/gnu/packages/icu4c.scm @@ -27,14 +27,17 @@ (define-module (gnu packages icu4c) #:use-module (gnu packages) + #:use-module (gnu packages cpio) #:use-module (gnu packages java) #:use-module (gnu packages perl) + #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (guix gexp) #:use-module (guix licenses) #:use-module (guix packages) #:use-module (guix utils) #:use-module (guix download) + #:use-module (guix git-download) #:use-module (guix build-system ant) #:use-module (guix build-system gnu)) @@ -240,3 +243,101 @@ (define-public java-icu4j globalisation support for software applications. This package contains the Java part.") (license x11))) + +(define-public icu4c-for-skia + ;; The current version of skia needs commit-precise icu4c + ;; version for its test-dependencies. + (let ((commit "a0718d4f121727e30b8d52c7a189ebf5ab52421f") + (revision "0")) + (package + (inherit icu4c) + (name "icu4c-for-skia") + (version "skia") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://chromium.googlesource.com/chromium/deps/icu.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1qxws2p91f6dmhy7d3967r5ygz06r88pkmpm97px067x0zzdz384")))) + (native-inputs (list python cpio pkg-config)) + (arguments + (list + #:make-flags #~`(,(string-append "DESTDIR=" #$output)) + #:configure-flags #~'(;;"--enable-shared=no" "--enable-static=yes" + "--prefix=" "--exec-prefix=") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'chdir-to-source + (lambda _ (chdir "source"))) + (replace 'configure + (lambda* (#:key inputs parallel-build? configure-flags #:allow-other-keys) + (let ((bash (search-input-file inputs "/bin/sh"))) + ;; Replace bash executable. + (setenv "CONFIG_SHELL" bash) + (substitute* "./configure" + (("`/bin/sh") + (string-append "`" bash))) + ;; Make the static library position-independent. + ;; (substitute* "./icudefs.mk.in" + ;; (("^CFLAGS = ") + ;; "CFLAGS = -fPIC ") + ;; (("^CXXFLAGS = ") + ;; "CXXFLAGS = -fPIC ")) + ;; Update runpath. + (substitute* "./icudefs.mk.in" + (("= -L\\$\\(LIBDIR\\)") + (string-append "= -L$(LIBDIR)" + " -Wl,-rpath=\"" #$output "/lib\""))) + ;; Set prefix and exec-prefix. + (substitute* "./runConfigureICU" + (("^OPTS=") + (string-append "OPTS=\"" + (string-join configure-flags " ") + "\""))) + ;; Configure. + (invoke "./runConfigureICU" "Linux/gcc" + "--disable-layout" "--disable-tests")))) + (add-after 'install 'configure-filtered-data + (lambda* (#:key make-flags configure-flags #:allow-other-keys) + ;; Cleanup. + (with-directory-excursion "data" + `(,invoke "make" "clean" ,@make-flags)) + ;; Set prefix and exec-prefix. + (substitute* "./runConfigureICU" + (("^OPTS=") + (string-append + "OPTS=\"" (string-join configure-flags " ") "\""))) + ;; Configure for common data. + (setenv "ICU_DATA_FILTER_FILE" + (string-append (getcwd) "/../filters/common.json")) + (invoke "./runConfigureICU" "Linux/gcc" + "--disable-layout" "--disable-tests"))) + (add-after 'configure-filtered-data 'build-filtered-data + (lambda* (#:key parallel-build? make-flags #:allow-other-keys) + (let ((job-count (if parallel-build? + (number->string (parallel-job-count)) + "1"))) + `(,invoke "make" "-j" ,job-count ,@make-flags) + (setenv "DESTDIR" #$output) + (invoke "bash" "../scripts/copy_data.sh" "common")))) + (add-after 'build-filtered-data 'install-scripts-and-data + (lambda _ + (let* ((share (string-append #$output "/share")) + (scripts (string-append share "/scripts")) + (data (string-append share "/data/common"))) + ;; Install scripts. + (mkdir-p scripts) + (copy-recursively "../scripts/" scripts) + ;; Install data. + (mkdir-p data) + (copy-recursively "./dataout/common/data/out/tmp" data) + (symlink (string-append data "/icudt69l.dat") + (string-append data "/icudtl.dat"))))) + (add-before 'check 'disable-failing-uconv-test + (lambda _ + (substitute* "extra/uconv/Makefile.in" + (("check: check-local") + ""))))))))))