From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id eNb7Iwph7mTH4wAAG6o9tA:P1 (envelope-from ) for ; Tue, 29 Aug 2023 23:20:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id eNb7Iwph7mTH4wAAG6o9tA (envelope-from ) for ; Tue, 29 Aug 2023 23:20:10 +0200 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 0CCFDE25D for ; Tue, 29 Aug 2023 23:20:10 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=none; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1693344010; 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=NMa/HJpM1HVlyE5cP5MI4RmYTUzFcOAeeuJBtg7kfKs=; b=HrXIClroSrHHgRC8Rddp5NREPeHNteEdFJ4LBpH0tNP4VQEC6eG6+K4gMXQpETY6jflbT2 y22DSeKYsuoJK8qbwHoRWNmCBZm6nv7NzJkJ6NkjOtYjIbDdOvHTmMWpM8AKmaQV5z01Dk i/HjCuogjcaj+yyGFbeDByAq//IPAJsyvIiMdWfv6zojuhQv3NgG2cIlBPq7t0YwS3AuoN k3yNvCkkvpV/X0NIEfIO3TiOG8rT/+GrEbxOjilheuvqDtWPph5IKNC3NBmKlzfAnbHFqA 6lWeWBoc8Gi4GEEE17OrKdZtI4o2er85JUDBIyEiuXB10fEl1hbsoXoAB7qyIQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1693344010; a=rsa-sha256; cv=none; b=lrB1f5DS0hZ+rwLHWgFWLCEPuF1ZchVcT/HT11zkqfG+2NcUYn6U6gfaExSqauxbomQ8QI HQFNgs550febQUbfGwDk3yvsygl6bLuTlAbAVt1KIwj5M5IH8fvEdk16pMt04Y7Qe2402Q Qe8thboklZsNhgLxGcCUvj/hhrfdt42fB4Mzjjgf4EAvKYQkpBy2LpOV3tx4NIRNl/B8ue wDXLkMU0EIDyW4EKEBn0Hp8b96d9gERsddilUFzsvlBWrzePZRsU5D5REumC4FCePC9zOG taPPZWvZGfz+ZnmFhoQT3QxrDPRbpE63uv9FX4pc+CBxd028vyi4zu4dFxlHNQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qb67j-0001pO-J5; Tue, 29 Aug 2023 17:19:43 -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 1qb61A-0000RS-4x for guix-patches@gnu.org; Tue, 29 Aug 2023 17:12:56 -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 1qb619-00045q-TB for guix-patches@gnu.org; Tue, 29 Aug 2023 17:12:55 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qb61H-0008Ju-0C for guix-patches@gnu.org; Tue, 29 Aug 2023 17:13:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#60571] [PATCH v3 2/3] gnu: skia: Activate tests. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 29 Aug 2023 21:13:02 +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.169334352731905 (code B ref 60571); Tue, 29 Aug 2023 21:13:02 +0000 Received: (at 60571) by debbugs.gnu.org; 29 Aug 2023 21:12:07 +0000 Received: from localhost ([127.0.0.1]:51721 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qb60M-0008IS-RW for submit@debbugs.gnu.org; Tue, 29 Aug 2023 17:12:07 -0400 Received: from 1.mo583.mail-out.ovh.net ([188.165.57.91]:40791) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qb60H-0008Hj-UC for 60571@debbugs.gnu.org; Tue, 29 Aug 2023 17:12:04 -0400 Received: from director3.ghost.mail-out.ovh.net (unknown [10.108.16.31]) by mo583.mail-out.ovh.net (Postfix) with ESMTP id 25DB72591F for <60571@debbugs.gnu.org>; Tue, 29 Aug 2023 21:11:53 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-7cdx6 (unknown [10.110.103.234]) by director3.ghost.mail-out.ovh.net (Postfix) with ESMTPS id BE9C01FE53; Tue, 29 Aug 2023 21:11:52 +0000 (UTC) Received: from ngraves.fr ([37.59.142.103]) by ghost-submission-6684bf9d7b-7cdx6 with ESMTPSA id bTzNKhhf7mTyGAAAUbvt3A (envelope-from ); Tue, 29 Aug 2023 21:11:52 +0000 X-OVh-ClientIp: 81.67.140.142 Date: Tue, 29 Aug 2023 23:11:38 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <4a4bbbda4ea4bfbf65915cf0ce29be066f0c6916.1693343499.git.ngraves@ngraves.fr> References: <4a4bbbda4ea4bfbf65915cf0ce29be066f0c6916.1693343499.git.ngraves@ngraves.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 6852508310712672961 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedviedrudefiedgudehlecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecunecujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpefhieekvddtveevgeeiiefgleelieehvdfghfeuvdevheffveekieettdeuhfeiteenucffohhmrghinhepshhkihgrrdhorhhgnecukfhppeduvdejrddtrddtrddupdekuddrieejrddugedtrddugedvpdefjedrheelrddugedvrddutdefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopeeitdehjeduseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehkeefpdhmohguvgepshhmthhpohhuth 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 X-Migadu-Spam-Score: -1.73 X-Spam-Score: -1.73 X-Migadu-Scanner: mx0.migadu.com X-Migadu-Queue-Id: 0CCFDE25D X-TUID: AWzCwxaTvZkt * gnu/packages/graphics.scm (skia): Activate tests. --- gnu/packages/graphics.scm | 147 ++++++++++++++++++++++++++++++++++---- 1 file changed, 135 insertions(+), 12 deletions(-) diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index 2a94bd51cc..207da49e05 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -83,6 +83,7 @@ (define-module (gnu packages graphics) #:use-module (gnu packages gstreamer) #:use-module (gnu packages gtk) #:use-module (gnu packages haskell-xyz) + #:use-module (gnu packages icu4c) #:use-module (gnu packages image) #:use-module (gnu packages image-processing) #:use-module (gnu packages imagemagick) @@ -2017,10 +2018,6 @@ (define-public skia (build-system gnu-build-system) ;actually GN + Ninja (arguments (list - ;; Running the test suite would require 'dm'; unfortunately the tool - ;; can only be built for debug builds, which require fetching third - ;; party sources. - #:tests? #f #:phases #~(modify-phases %standard-phases (replace 'configure @@ -2085,13 +2082,139 @@ (define-public skia URL: https://skia.org/ Version: ~a Libs: -L${libdir} -lskia -Cflags: -I${includedir}~%" #$output #$version)))))))) - (native-inputs (list gn libjpeg-turbo ninja pkg-config python-wrapper)) - (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. +Cflags: -I${includedir}~%" #$output #$version))))) + (replace 'check + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let ((icu #$(this-package-native-input "icu4c-for-skia"))) + ;; Unbundle SPIRV-Tools dependency. + (substitute* "BUILD.gn" + (("deps \\+= \\[ \"//third_party/externals/spirv-tools:spvtools_val\" \\]") + "libs += [ \"SPIRV-Tools\" ]")) + (substitute* "src/sksl/SkSLCompiler.cpp" + (("\"spirv-tools/libspirv.hpp\"") + "")) + ;; Configure ICU dependency. + (substitute* "third_party/icu/BUILD.gn" + (("data_dir = \"\\.\\./externals/icu/\"") + (string-append "data_dir = \"" icu "/share/data/\"")) + (("script = \"\\.\\./externals/icu/scripts/") + (string-append "script = \"" icu "/share/scripts/")) + (("\\.\\./externals/icu/common/icudtl\\.dat") + (string-append icu "/share/data/icudtl.dat")) + (("sources = icu_sources") + "") + (("sources \\+= \\[ \"\\$data_assembly\" \\]") + "sources = [ \"$data_assembly\" ]")) + ;; Enable system libraries without is_official_build=true. + ;; This is necessary because is_official_build prevents from + ;; building dm. + (for-each + (lambda (libname) + (let ((snake (string-join (string-split libname #\-) "_"))) + (substitute* + (string-append "third_party/" libname "/BUILD.gn") + (((string-append "skia_use_system_" + snake + " = is_official_build.*")) + (string-append "skia_use_system_" snake " = true"))))) + '("zlib" "libjpeg-turbo" "harfbuzz" "libpng" "libwebp")) + ;; Configure with gn. + (invoke "gn" "gen" "out/Debug" + (string-append + "--args=" + "cc=\"gcc\" " ;defaults to 'cc' + "skia_compile_sksl_tests=false " ; disable some tests + "skia_use_system_expat=true " ; use system expat library + ;; Specify where to locate the includes. + "extra_cflags=[" + (string-join + (map + (lambda (lib) + (string-append + "\"-I" + (search-input-directory + inputs + (string-append "include/" lib)) "\"")) + '("harfbuzz" + "freetype2" + "spirv-tools" + "spirv" + "unicode")) + ",") + "] " + ;; Otherwise the validate-runpath phase fails. + "extra_ldflags=[" + "\"-Wl,-rpath=" #$output "/lib\"" + "] " + ;; Disabled, otherwise the build system attempts to + ;; download the SDK at build time. + "skia_use_dng_sdk=false " + "skia_use_runtime_icu=true ")) + ;; Build dm testing tool. + (symlink + (string-append #$(this-package-native-input "gn") "/bin/gn") + "./bin/gn") + (invoke "ninja" "-C" "out/Debug" "dm") + ;; The test suite requires an X server. + (let ((xvfb (search-input-file (or native-inputs inputs) + "bin/Xvfb")) + (display ":1")) + (setenv "DISPLAY" display) + (system (string-append xvfb " " display " &"))) + ;; Run tests. + (invoke "out/Debug/dm" "-v" + "-w" "dm_output" + "--codecWritePath" "dm_output" + "--simpleCodec" + "--skip" + ;; The underscores are part of the dm syntax for + ;; skipping tests. + ;; These tests fail with segmentation fault. + "_" "_" "_" "Codec_trunc" + "_" "_" "_" "AnimCodecPlayer" + "_" "_" "_" "Codec_partialAnim" + "_" "_" "_" "Codec_InvalidImages" + "_" "_" "_" "Codec_GifInterlacedTruncated" + "_" "_" "_" "SkText_UnicodeText_Flags" + "_" "_" "_" "SkParagraph_FontStyle" + "_" "_" "_" "flight_animated_image" + ;; These tests fail because of Codec/Sk failure. + "_" "_" "_" "AndroidCodec_computeSampleSize" + "_" "_" "_" "AnimatedImage_invalidCrop" + "_" "_" "_" "AnimatedImage_scaled" + "_" "_" "_" "AnimatedImage_copyOnWrite" + "_" "_" "_" "AnimatedImage" + "_" "_" "_" "BRD_types" + "_" "_" "_" "Codec_frames" + "_" "_" "_" "Codec_partial" + "_" "_" "_" "Codec_partialWuffs" + "_" "_" "_" "Codec_requiredFrame" + "_" "_" "_" "Codec_rewind" + "_" "_" "_" "Codec_incomplete" + "_" "_" "_" "Codec_InvalidAnimated" + "_" "_" "_" "Codec_ossfuzz6274" + "_" "_" "_" "Codec_gif_out_of_palette" + "_" "_" "_" "Codec_xOffsetTooBig" + "_" "_" "_" "Codec_gif" + "_" "_" "_" "Codec_skipFullParse" + "_" "_" "_" "AndroidCodec_animated_gif" + ;; These fail for unknown reasons. + "_" "_" "_" "Gif" + "_" "_" "_" "Wuffs_seek_and_decode" + "_" "_" "_" "Skottie_Shaper_ExplicitFontMgr" + "8888" "skp" "_" "_" + "8888" "lottie" "_" "_" + "gl" "skp" "_" "_" + "gl" "lottie" "_" "_" + "_" "_" "_" "ES2BlendWithNoTexture"))))))) + (native-inputs (list gn libjpeg-turbo ninja pkg-config python-wrapper + spirv-tools spirv-headers + icu4c-for-skia glu xorg-server-for-tests)) + (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 @@ -2099,7 +2222,7 @@ (define-public skia @item shaders, xfermodes, maskfilters, patheffects @item subpixel text @end itemize") - (license license:bsd-3)))) + (license license:bsd-3)))) (define-public superfamiconv (package -- 2.41.0