From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 5/zvM5ZkyGO0SgEAbAwnHQ (envelope-from ) for ; Wed, 18 Jan 2023 22:28:54 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 8C4TMpZkyGMoDQEAG6o9tA (envelope-from ) for ; Wed, 18 Jan 2023 22:28:54 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 803053D041 for ; Wed, 18 Jan 2023 22:28:54 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIFyV-0006sl-RA; Wed, 18 Jan 2023 16:28:03 -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 1pIFyU-0006sK-3C for guix-patches@gnu.org; Wed, 18 Jan 2023 16:28:02 -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 1pIFyT-0008Lk-QR for guix-patches@gnu.org; Wed, 18 Jan 2023 16:28:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pIFyT-00052j-LL for guix-patches@gnu.org; Wed, 18 Jan 2023 16:28:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60939] [PATCH v2 1/2] gnu: Add skia-for-libreoffice. References: <87pmbblmz5.fsf@ngraves.fr> In-Reply-To: <87pmbblmz5.fsf@ngraves.fr> Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 18 Jan 2023 21:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60939 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60939@debbugs.gnu.org Cc: ngraves@ngraves.fr Received: via spool by 60939-submit@debbugs.gnu.org id=B60939.167407727019355 (code B ref 60939); Wed, 18 Jan 2023 21:28:01 +0000 Received: (at 60939) by debbugs.gnu.org; 18 Jan 2023 21:27:50 +0000 Received: from localhost ([127.0.0.1]:41924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIFyI-000526-1s for submit@debbugs.gnu.org; Wed, 18 Jan 2023 16:27:50 -0500 Received: from 4.mo560.mail-out.ovh.net ([87.98.172.75]:54597) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIFyF-00051v-1e for 60939@debbugs.gnu.org; Wed, 18 Jan 2023 16:27:48 -0500 Received: from director4.ghost.mail-out.ovh.net (unknown [10.109.143.146]) by mo560.mail-out.ovh.net (Postfix) with ESMTP id C7B1D23B4B for <60939@debbugs.gnu.org>; Wed, 18 Jan 2023 21:27:44 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-2sdkm (unknown [10.110.171.191]) by director4.ghost.mail-out.ovh.net (Postfix) with ESMTPS id E02C41FF02; Wed, 18 Jan 2023 21:27:42 +0000 (UTC) Received: from ngraves.fr ([37.59.142.103]) by ghost-submission-6684bf9d7b-2sdkm with ESMTPSA id 8JsZO05kyGNB1C0AHxIKmQ (envelope-from ); Wed, 18 Jan 2023 21:27:42 +0000 X-OVh-ClientIp: 81.67.140.142 Date: Wed, 18 Jan 2023 22:27:34 +0100 Message-Id: <20230118212735.27131-1-ngraves@ngraves.fr> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 7228277404560122594 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedruddtkedgudegkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecunecujfgurhephffvvefufffkofgggfestdekredtredttdenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpeefhedugefhjeefffeluefggfeuhfeuiedugedukeffvddvgfdtvefhgedvheeffeenucffohhmrghinheplhhisghrvghofhhfihgtvgdrohhrghdpshhkihgrrdhorhhgnecukfhppeduvdejrddtrddtrddupdefjedrheelrddugedvrddutdefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopeeitdelfeelseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehiedtpdhmohguvgepshhmthhpohhuth 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 From: Nicolas Graves via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1674077334; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=AnfcE0x7SEPCZt5JP8scve1UZ1aDwOFGRQZZFiLDjIc=; b=tW5yd/Hcm+pMNQGOpf5uBXtS2Ze3XSgBRy7U+hQ8PVuN+60DrYIKChNfMOjAm8QjkR4vRN ELRV069CfGVdj/vSNVH8Y1k2QLwQNz5w2IFz5a+PFxw7ncWq2GDqr5UKef7YsUBsZMHM1x 5eaLTnuhkOvndPn4RNG5ji4cvW2V/XFN7Zf0JJaXUWNd3xrWRid1x9G5nfcUU2/zzSkYOd caNuhNO/M4IIT35gb66j40dRpFsT9LY83wbHwWvP5IF+Ju7S5d8YfqefQu1eno9+scKIgt Oxi9POwvYhAOYQWfY855ESmLqnsmPnUKJJE7AJcbKMk1YXSG2kZ+a601RKkuKQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1674077334; a=rsa-sha256; cv=none; b=bEjRO862TPX1tf5WWrPTnAEI8waeBOS339vNJW4S468IleoixKtLAaQoeBJUpfVjX5HpXw 3OTpbEu5yYJhAWsa9TXYcuIUR3H5ZbcFVHsQDxt08ojpNk3JF0CDFL1EkDVgrvu2Op5Pk3 cw2wypomN73vxlp9AKNyWAFdoUzzqKwDF7omfEpWTX4q6ktfJbMHqidIu/WyfGh0kup5jr 4jPw21wObnUBQgIUhV88Jy0t+5Tlo6hHJ86NQWS43uQ47Nv7mtnr370mDAsMKl706etO3L b7Gi218K0mEi5LHzmjZ4kTuyybW5oE5A+vH5fGzs3ULtARv3UBICp8mra7Hg6w== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -1.63 X-Spam-Score: -1.63 X-Migadu-Queue-Id: 803053D041 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-TUID: sGy0rvTqNfmp * gnu/packages/libreoffice.scm (skia-for-libreoffice): New variable. --- gnu/packages/libreoffice.scm | 66 ++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm index b959470d8f..372b18a24f 100644 --- a/gnu/packages/libreoffice.scm +++ b/gnu/packages/libreoffice.scm @@ -75,6 +75,7 @@ (define-module (gnu packages libreoffice) #:use-module (gnu packages image) #:use-module (gnu packages java) #:use-module (gnu packages linux) + #:use-module (gnu packages llvm) #:use-module (gnu packages logging) #:use-module (gnu packages m4) #:use-module (gnu packages maths) @@ -1155,3 +1156,68 @@ (define (install-appdata app) '((release-monitoring-url . "https://www.libreoffice.org/download/download-libreoffice/"))) (license license:mpl2.0))) + +(define skia-tarball + (origin + (method url-fetch) + (uri "https://dev-www.libreoffice.org/src/skia-m103-b301ff025004c9cd82816c86c547588e6c24b466.tar.xz") + (sha256 + (base32 "1navlqbm6ja78whj5p1jwnlg3fmnpqjwh00dmbm4n424gqjad560")))) + +(define-public skia-for-libreoffice + (package + (inherit libreoffice) + (name "skia-for-libreoffice") + (arguments + (substitute-keyword-arguments (package-arguments libreoffice) + ((#:phases phases '%standard-phases) + #~(modify-phases #$phases + (delete 'include-built-skia) + (delete 'bin-and-desktop-install) + (add-after 'insert-external-tarballs 'insert-skia-tarball + (lambda _ + (copy-file + #$skia-tarball + (string-append + "external/tarballs/" + "skia-m103-b301ff025004c9cd82816c86c547588e6c24b466.tar.xz")))) + (replace 'build + (lambda _ (invoke "make" "Library_skia"))) + (replace 'install + (lambda _ + (with-directory-excursion "instdir/program" + (for-each + (lambda (lib) + (install-file lib (string-append #$output "/lib"))) + (find-files "." "\\.so$"))) + (define* (install-header header) + (let* ((inc (string-append #$output "/include/")) + (ridx (string-rindex header #\/)) + (dir (string-append inc (string-take header ridx)))) + (install-file header dir))) + (with-directory-excursion "workdir/UnpackedTarball" + (for-each install-header (find-files "skia" "\\.h"))))))) + ((#:configure-flags flags) + ;; Else needs llvm gold linker. + `(delete "--enable-lto" ,flags)) + ((#:validate-runpath? _ #f) #f))) + (native-inputs (modify-inputs + (append (package-native-inputs libreoffice) + ;; here because of configure step + (package-inputs libreoffice)) + (prepend clang-11) + ;; Avoid circular dependency. + (delete "skia-for-libreoffice"))) + (inputs (list expat fontconfig freetype harfbuzz mesa libwebp zlib)) + (home-page "https://skia.org/") + (synopsis "2D graphics library") + (description + "Skia is a 2D graphics library for drawing text, geometries, and images. +It supports: +@itemize +@item 3x3 matrices with perspective +@item antialiasing, transparency, filters +@item shaders, xfermodes, maskfilters, patheffects +@item subpixel text +@end itemize") + (license license:bsd-3))) -- 2.38.1