From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 2Fl8FSOpQ2fppQAAqHPOHw:P1 (envelope-from ) for ; Sun, 24 Nov 2024 22:30:59 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 2Fl8FSOpQ2fppQAAqHPOHw (envelope-from ) for ; Sun, 24 Nov 2024 23:30:59 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=CNsvWYp5; dkim=fail ("headers rsa verify failed") header.d=ngraves.fr header.s=ovhmo4487190-selector1 header.b=Ql9FZm3e; 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=1732487459; a=rsa-sha256; cv=none; b=L2K8Zw8ez99li2D1nI2bsHXH1czCFM2RdHj2aEHPPT+/+eifBiUMN1LAysLy7b32RWFcG/ VZOvOxIS7mArr0ibiz04jYtX3B4z0D4iS6N/pgS0tN2Mp0AI4fl37KFuWqY2OwfMtd2Qsm 89Hcrj68BoVYgX+JhJAs6U9qcPUjk1qI2zve9gCCEjjqQ15JKDXBJpch8mrX+rB7rBzj8S j0ZC+PAWCAmMfF8eQBtIwaAc4gxf57GLbMRJSd1mhS+a00aLeaz9pOD8yLtBcLGMxUqeRk UIDuJxVQdcbGkdIWJatW6IAtJwQoTDMYh6ILf7NBVvWFL7ABlQzIjSDu6gDSlA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=CNsvWYp5; dkim=fail ("headers rsa verify failed") header.d=ngraves.fr header.s=ovhmo4487190-selector1 header.b=Ql9FZm3e; 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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1732487459; 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-type:content-type: 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:dkim-signature; bh=Qd47XtGuviVWXqdicPrvADkg8DAr1zY9/whVoDm9vJw=; b=jjxArsdUNgtrTbCHIbb5eJ2yvwNqHBbI9WmF2AOHe8XKzg60uvU3mqXnxtDkxmUULnJfln HZogtcLuKJbaHTBwkeO82a8Yw97ernaqrRxVfky9tFroxnxcfl8GnikJ3BhRrLeq9pK1iZ +3LOtGareIXWxkDXxb9XOxuujlefGfyfemgriqfC5j11ALGENStqLUNcOm3dSQWs94Tcpq I8GGVaHunkRuin3RXd3AipttLnUCwum0XlO50Hbp88Xu44MBOI0UBjVnc247wz2WTroom5 hz7i5H7HgBL5h5k9wi3HONbs7gleW4xWQJaIwQ6qq3/MfuruWRpTxFbx0SHbXw== 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 CF03585416 for ; Sun, 24 Nov 2024 23:30:58 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFL7I-0004MN-CW; Sun, 24 Nov 2024 17:30:08 -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 1tFL7E-0004J1-Vk for guix-patches@gnu.org; Sun, 24 Nov 2024 17:30:05 -0500 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 1tFL7E-000752-M7 for guix-patches@gnu.org; Sun, 24 Nov 2024 17:30:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=Qd47XtGuviVWXqdicPrvADkg8DAr1zY9/whVoDm9vJw=; b=CNsvWYp5mqIUcIA9e/MIdn7e9pMdgC0Pv9vljqgru0Gf6rtNKxIJv+Q9zzuWspNEtDUSpMMpZocD9gi8gjP5knNYNCuKI7deFOl88Gy9B+3Dj0drxe1mPz4EBRZ6/wm2woYv6Lw0w0oSb44MbEgaW3pS9Zus/BYfQhCRREwt9wSeNCUlZyo3rZa8Ii3cCIbaJGRl9UbeYJs9PAGrlJHH0ZdzDMJzLW1KFk8fS6nfJWDxck9hn05mwpeFhYtOuSMm8lKOoOJ3nwEqn91Vikw2UIJnfkKLpqSvOlLVqGoFaxUttm+59mgAWmf7D4UqCKbuF9g/H1+4KbzgCXLMHplXuw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tFL7D-0007LQ-NQ for guix-patches@gnu.org; Sun, 24 Nov 2024 17:30:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74517] [PATCH 2/8] gnu: zbar: Split outputs. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 24 Nov 2024 22:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74517 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74517@debbugs.gnu.org Cc: Nicolas Graves Received: via spool by 74517-submit@debbugs.gnu.org id=B74517.173248739128117 (code B ref 74517); Sun, 24 Nov 2024 22:30:03 +0000 Received: (at 74517) by debbugs.gnu.org; 24 Nov 2024 22:29:51 +0000 Received: from localhost ([127.0.0.1]:36399 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFL70-0007JE-2r for submit@debbugs.gnu.org; Sun, 24 Nov 2024 17:29:51 -0500 Received: from 14.mo561.mail-out.ovh.net ([188.165.43.98]:35245) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFL6w-0007Il-GH for 74517@debbugs.gnu.org; Sun, 24 Nov 2024 17:29:48 -0500 Received: from director4.ghost.mail-out.ovh.net (unknown [10.108.9.73]) by mo561.mail-out.ovh.net (Postfix) with ESMTP id 4XxNn51zc5z1Lsw for <74517@debbugs.gnu.org>; Sun, 24 Nov 2024 22:29:45 +0000 (UTC) Received: from ghost-submission-5b5ff79f4f-sxfwn (unknown [10.110.101.166]) by director4.ghost.mail-out.ovh.net (Postfix) with ESMTPS id A5E801FD48; Sun, 24 Nov 2024 22:29:44 +0000 (UTC) Received: from ngraves.fr ([37.59.142.96]) by ghost-submission-5b5ff79f4f-sxfwn with ESMTPSA id gBWQDdioQ2cmbAIA5xp7tw (envelope-from ); Sun, 24 Nov 2024 22:29:44 +0000 X-OVh-ClientIp: 90.92.117.144 Date: Sun, 24 Nov 2024 23:29:09 +0100 Message-ID: <20241124222934.524-2-ngraves@ngraves.fr> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241124222934.524-1-ngraves@ngraves.fr> References: <20241124222934.524-1-ngraves@ngraves.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 12166474397004128994 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefuddrgeefgdduiedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfgggtgfesthekredtredtjeenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpedvleelgeeffeetleekueegvdfhtedvueffiefhkedtleejkeduveelgfdufeduleenucfkphepuddvjedrtddrtddruddpledtrdelvddruddujedrudeggedpfeejrdehledrudegvddrleeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeejgeehudejseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehiedumgdpmhhouggvpehsmhhtphhouhht DKIM-Signature: a=rsa-sha256; bh=Qd47XtGuviVWXqdicPrvADkg8DAr1zY9/whVoDm9vJw=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1732487385; v=1; b=Ql9FZm3e1rH/ALSDiByS/kRmDr7P9DcuRtyuxtYev9oAXcIxnYd8beivhjTs4+BhMJykvk/6 oYFcmsd26w1u4clj8PYmvqUw8NaiKMHlLWCwhcsnLa0OGrl9gre7QA92mn2tXxHo766sxvcJdBj JJ/0RV5/85Dk7vEglhnmkffSQtV4Mq2IyUFSRN+Ef0PWIk/TGDYVdPTBcB1AZqLmCSZyLEcxScu t+Gddx8GuFU4hLtb8bi3PlynXaKwVNSUpdBAWYRafQgPbLjT6Pwq/nrG4k+PwmHY4nQMLfIwS+z kcRjNIX/jYH1IrRaw5d3h20z99ayVxNunVICQtlcN8OEg== 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: 0.37 X-Spam-Score: 0.37 X-Migadu-Queue-Id: CF03585416 X-Migadu-Scanner: mx12.migadu.com X-TUID: nLokZxgdMpdh * gnu/packages/aidc.scm (zbar): Split outputs. [build-system]: Switch to glib-or-gtk-build-system. [arguments]<#:configure-flags>: Add --disable-static. <#:modules>: Use srfi-26 and gremlin's file-runpath. <#:phases>: Add phase 'split-outputs. [native-inputs]: Improve style. [inputs]: Improve style. Replace v4l-utils by v4l-utils-minimal. --- gnu/packages/aidc.scm | 94 +++++++++++++++++++++++++++++++++---------- 1 file changed, 73 insertions(+), 21 deletions(-) diff --git a/gnu/packages/aidc.scm b/gnu/packages/aidc.scm index bc9c47a480..281f87dc78 100644 --- a/gnu/packages/aidc.scm +++ b/gnu/packages/aidc.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2018, 2019, 2022 Tobias Geerinckx-Rice ;;; Copyright © 2019 Guillaume Le Vaillant ;;; Copyright © 2020 Leo Famulari +;;; Copyright © 2024 Nicolas Graves ;;; ;;; This file is part of GNU Guix. ;;; @@ -30,6 +31,7 @@ (define-module (gnu packages aidc) #:use-module (guix git-download) #:use-module (gnu packages autotools) #:use-module (gnu packages check) + #:use-module (gnu packages elf) #:use-module (gnu packages imagemagick) #:use-module (gnu packages gettext) #:use-module (gnu packages glib) @@ -43,7 +45,8 @@ (define-module (gnu packages aidc) #:use-module (gnu packages qt) #:use-module (gnu packages video) #:use-module (guix build-system cmake) - #:use-module (guix build-system gnu)) + #:use-module (guix build-system gnu) + #:use-module (guix build-system glib-or-gtk)) (define-public zxing-cpp ;; Use the master branch as it includes unreleased build system improvements @@ -184,32 +187,81 @@ (define-public zbar (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 - "0rf3i7lx0fqzxsngird6l4d4dnl612nr32rm8sib699qqx67px8n")))) - (build-system gnu-build-system) + (base32 "0rf3i7lx0fqzxsngird6l4d4dnl612nr32rm8sib699qqx67px8n")))) + (build-system glib-or-gtk-build-system) + ;; XXX: qt output is broken: zbarcam-qt fails with segmentation fault, but + ;; this error happened before the output split. + (outputs '("out" "gtk" "qt")) (arguments - '(#:configure-flags (list "--with-gtk=auto" + (list + #:configure-flags '(list "--disable-static" + "--with-gtk=auto" "--with-python=auto" (string-append "--with-dbusconfdir=" (assoc-ref %outputs "out") - "/etc")))) + "/etc")) + #:modules `(((guix build gremlin) #:select (file-runpath)) + (srfi srfi-26) + ,@%glib-or-gtk-build-system-modules) + #:phases + #~(modify-phases %standard-phases + (add-after 'install 'split-outputs + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (gtk (assoc-ref outputs "gtk"))) + + ;; XXX: Using set-file-runpath leads to runpath-too-long-error + (define (prepend-to-runpath path file) + (invoke "patchelf" "--set-rpath" + (string-join (cons* path (file-runpath file)) ":") + file)) + + (define (move-output-file target file) + (let* ((source (string-append out file)) + (destination (string-append target file))) + (mkdir-p (dirname destination)) + (rename-file source destination) + (when (and (eq? (stat:type (lstat destination)) 'regular) + (elf-file? destination)) + (prepend-to-runpath + (string-append out "/lib:" target "/lib") + destination)))) + + (for-each + (lambda (kind) + (for-each + (cut move-output-file (assoc-ref outputs kind) <>) + (cons* + (string-append "/lib/pkgconfig/zbar-" kind ".pc") + (string-append "/bin/zbarcam-" kind) + (map (cut string-drop <> 1) + (with-directory-excursion out + (find-files + "./lib" + (string-append "lib.*" kind "\\.so.*"))))))) + '("gtk" "qt")) + + (for-each + (cut move-output-file gtk <>) + '("/share/gir-1.0" "/lib/girepository-1.0")))))))) (native-inputs - `(("autoconf" ,autoconf) - ("automake" ,automake) - ("gettext" ,gettext-minimal) - ("glib" ,glib "bin") - ("gobject-introspection" ,gobject-introspection) - ("libtool" ,libtool) - ("pkg-config" ,pkg-config) - ("python-wrapper" ,python-wrapper))) + (list autoconf + automake + gettext-minimal + `(,glib "bin") + gobject-introspection + libtool + patchelf + pkg-config + python-wrapper)) (inputs - `(("dbus" ,dbus) - ("imagemagick" ,imagemagick) - ("libjpeg" ,libjpeg-turbo) - ("perl" ,perl) - ("python" ,python) - ("qtx11extras" ,qtx11extras) - ("v4l-utils" ,v4l-utils))) + (list dbus + imagemagick + libjpeg-turbo + perl + python + qtx11extras + v4l-utils-minimal)) (propagated-inputs ;; These are in 'requires' field of .pc files. (list glib gtk+ qtbase-5)) -- 2.46.0