From patchwork Sat Dec 17 00:51:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 45382 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 75E7C27BBEB; Sat, 17 Dec 2022 00:53:15 +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=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 CCB8C27BBE9 for ; Sat, 17 Dec 2022 00:53:13 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6LRn-0005lz-Q6; Fri, 16 Dec 2022 19:53: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 1p6LRm-0005lX-6s for guix-patches@gnu.org; Fri, 16 Dec 2022 19:53: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 1p6LRl-0008WH-S1 for guix-patches@gnu.org; Fri, 16 Dec 2022 19:53:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p6LRl-0003BU-ND for guix-patches@gnu.org; Fri, 16 Dec 2022 19:53:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60131] [PATCH 2/2] gnu: libavif: Add tools output. Resent-From: mirai@makinata.eu Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 17 Dec 2022 00:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60131 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60131@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 60131-submit@debbugs.gnu.org id=B60131.167123832412220 (code B ref 60131); Sat, 17 Dec 2022 00:53:01 +0000 Received: (at 60131) by debbugs.gnu.org; 17 Dec 2022 00:52:04 +0000 Received: from localhost ([127.0.0.1]:52639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6LQp-0003B2-MN for submit@debbugs.gnu.org; Fri, 16 Dec 2022 19:52:04 -0500 Received: from smtpm1.myservices.hosting ([185.26.105.232]:50798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6LQo-0003Ab-B9 for 60131@debbugs.gnu.org; Fri, 16 Dec 2022 19:52:02 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.172]) by smtpm1.myservices.hosting (Postfix) with ESMTP id 9C54C209A6 for <60131@debbugs.gnu.org>; Sat, 17 Dec 2022 01:52:01 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 478C180096; Sat, 17 Dec 2022 01:52:01 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-1.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 3ndLV7uVpRVs; Sat, 17 Dec 2022 01:52:00 +0100 (CET) Received: from guix-nuc.home.arpa (bl12-93-156.dsl.telepac.pt [85.245.93.156]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 8A64680093; Sat, 17 Dec 2022 01:52:00 +0100 (CET) From: mirai@makinata.eu Date: Sat, 17 Dec 2022 00:51:29 +0000 Message-Id: X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: Bruno Victal * gnu/packages/image.scm (libavif)[arguments]: Build avifenc & avifdec. [outputs]: Add 'tools' output. [inputs]: Add zlib, libpng, libjpeg-turbo. --- gnu/packages/image.scm | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 80872b1466..98fe572ac2 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -2176,7 +2176,7 @@ (define-public libavif (%current-system))) '("-DAVIF_CODEC_RAV1E=ON") '()) - "-DAVIF_BUILD_TESTS=ON") + "-DAVIF_BUILD_TESTS=ON" "-DAVIF_BUILD_APPS=ON") #:phases #~(modify-phases %standard-phases (replace 'check @@ -2185,7 +2185,21 @@ (define-public libavif (add-after 'install 'install-readme (lambda _ (let ((doc (string-append #$output "/share/doc/libavif-" #$version))) - (install-file "../source/README.md" doc))))))) + (install-file "../source/README.md" doc)))) + (add-after 'install 'split + (lambda _ + (let* ((avifenc (string-append #$output "/bin/avifenc")) + (avifenc* (string-append #$output:tools "/bin/avifenc")) + (avifdec (string-append #$output "/bin/avifdec")) + (avifdec* (string-append #$output:tools "/bin/avifdec"))) + (mkdir-p (string-append #$output:tools "/bin")) + + (for-each (lambda (old new) + (copy-file old new) + (delete-file old) + (chmod new #o555)) + (list avifenc avifdec) + (list avifenc* avifdec*)))))))) (inputs (append ;; XXX: rav1e depends on rust, which currently only works on x86_64. @@ -2193,7 +2207,9 @@ (define-public libavif (if (string-prefix? "x86_64" (or (%current-target-system) (%current-system))) (list rav1e) '()) - (list dav1d libaom))) + (list dav1d libaom zlib libpng libjpeg-turbo))) + (outputs (list "out" + "tools")) ; avifenc & avifdec (synopsis "Encode and decode AVIF files") (description "Libavif is a C implementation of @acronym{AVIF, the AV1 Image File Format}. It can encode and decode all YUV formats and bit depths supported