From patchwork Thu Jan 5 12:18: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: 45861 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 A424F27BBEB; Thu, 5 Jan 2023 12:21:09 +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=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 B0A7527BBE9 for ; Thu, 5 Jan 2023 12:21:04 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDPEe-0001Vd-ED; Thu, 05 Jan 2023 07:20:40 -0500 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 1pDPE4-0001MF-Fv for guix-patches@gnu.org; Thu, 05 Jan 2023 07:20:34 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pDPE3-00037I-I4 for guix-patches@gnu.org; Thu, 05 Jan 2023 07:20:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pDPE3-0002uV-CC for guix-patches@gnu.org; Thu, 05 Jan 2023 07:20:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60571] [PATCH 3/4] gnu: Add icu4c-for-skia. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 05 Jan 2023 12:20:03 +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 Received: via spool by 60571-submit@debbugs.gnu.org id=B60571.167292115111086 (code B ref 60571); Thu, 05 Jan 2023 12:20:03 +0000 Received: (at 60571) by debbugs.gnu.org; 5 Jan 2023 12:19:11 +0000 Received: from localhost ([127.0.0.1]:50444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDPDC-0002sj-Gc for submit@debbugs.gnu.org; Thu, 05 Jan 2023 07:19:10 -0500 Received: from 1.mo550.mail-out.ovh.net ([178.32.127.22]:54967) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDPDA-0002sU-Gt for 60571@debbugs.gnu.org; Thu, 05 Jan 2023 07:19:09 -0500 Received: from director5.ghost.mail-out.ovh.net (unknown [10.108.4.72]) by mo550.mail-out.ovh.net (Postfix) with ESMTP id BA57A250D2 for <60571@debbugs.gnu.org>; Thu, 5 Jan 2023 12:19:05 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-c52db (unknown [10.110.208.177]) by director5.ghost.mail-out.ovh.net (Postfix) with ESMTPS id C03CC1FF21; Thu, 5 Jan 2023 12:19:03 +0000 (UTC) Received: from ngraves.fr ([37.59.142.101]) by ghost-submission-6684bf9d7b-c52db with ESMTPSA id fEvGMDfAtmPoxwAABnm1Sg (envelope-from ); Thu, 05 Jan 2023 12:19:03 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-101G004c586ae94-ced5-4bb4-94a6-9e7977fb6e5b, CCCEE37B4F29B2D663A2C00FBFAE6261951393C8) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 194.57.247.3 Date: Thu, 5 Jan 2023 13:18:41 +0100 Message-Id: <20230105121842.18662-3-ngraves@ngraves.fr> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230105121842.18662-1-ngraves@ngraves.fr> References: <20230105121842.18662-1-ngraves@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 13851102132087153378 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrjeekgdeflecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecunecujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpefhjeeuudeihfeijeffkeeiheegkeekgfdugfduledthfffvdduiefhhffhjeduteenucffohhmrghinhepghhoohhglhgvshhouhhrtggvrdgtohhmnecukfhppeduvdejrddtrddtrddupdefjedrheelrddugedvrddutddunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopeeitdehjeduseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehhedtpdhmohguvgepshhmthhpohhuth 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 | 99 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/gnu/packages/icu4c.scm b/gnu/packages/icu4c.scm index 1e4f66d956..05911addcd 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)) @@ -243,3 +246,99 @@ (define-public java-icu4j globalisation support for software applications. This package contains the Java part.") (license x11))) + +(define-public icu4c-for-skia + (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") + ""))))))))))