From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id CJ6IA3aadmJ2twAAbAwnHQ (envelope-from ) for ; Sat, 07 May 2022 18:12:38 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id aL2bAnaadmKwfAAAG6o9tA (envelope-from ) for ; Sat, 07 May 2022 18:12:38 +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 B9B412AD54 for ; Sat, 7 May 2022 18:12:37 +0200 (CEST) Received: from localhost ([::1]:46362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nnN2q-00077k-O6 for larch@yhetil.org; Sat, 07 May 2022 12:12:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37690) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nnN2L-0006FB-RA for guix-patches@gnu.org; Sat, 07 May 2022 12:12:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58920) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nnN2L-00039I-I1 for guix-patches@gnu.org; Sat, 07 May 2022 12:12:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nnN2L-0006O7-Dc for guix-patches@gnu.org; Sat, 07 May 2022 12:12:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55302] [PATCH 3/4] gnu: wine64: Use new package style. References: In-Reply-To: Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 07 May 2022 16:12:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55302 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55302@debbugs.gnu.org Received: via spool by 55302-submit@debbugs.gnu.org id=B55302.165193989324337 (code B ref 55302); Sat, 07 May 2022 16:12:05 +0000 Received: (at 55302) by debbugs.gnu.org; 7 May 2022 16:11:33 +0000 Received: from localhost ([127.0.0.1]:52777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnN1p-0006KR-83 for submit@debbugs.gnu.org; Sat, 07 May 2022 12:11:33 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:34524) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnN1k-0006JT-1H for 55302@debbugs.gnu.org; Sat, 07 May 2022 12:11:29 -0400 Received: by mail-ed1-f68.google.com with SMTP id a21so11788202edb.1 for <55302@debbugs.gnu.org>; Sat, 07 May 2022 09:11:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:date:subject:mime-version:to:content-transfer-encoding :message-id; bh=vG5OZWc0JurEGrsCdNiAAx/3Uyrs/GLzaXFoR9yU8y4=; b=WhZloC27WiF13A8p1ztCN3VByJbduyh4qQJ8jNldjkLXat+cjyWBQe993hEHZepmti wAM2WIVuyO9Zqx6QFjCTXH8Fu5ojdtHYS4rRVIzVhUzReduG30QErGtL4EkM1oisgRc/ 0TQaHQWTYTPNrGDysba1LYsxiHOSldX7ouVTOqslhgraLCGODUxm6n6N9OaxKM2W9oBE 6FgHrfMGy1cD08mCZpO20GU2ZXJO39/zbmB7bQjAwC9ybNfQiKKJfMGkJiFXMfGygDKl yOtBVfE2KAWGMfakz7omN2VtHwINAFTb4GptuPZENlyRcO3K0EPz+A6CL+i3u50Ox95b x/7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:subject:mime-version:to :content-transfer-encoding:message-id; bh=vG5OZWc0JurEGrsCdNiAAx/3Uyrs/GLzaXFoR9yU8y4=; b=Ml8ztY7aD+4s9B8VVyYF/B+1ZZKZNykqlfOjRNlkGLd2mfp+2ODrSFj7XC/Yu7buhX tTgt57+XuT5zHcS3TUQuPNO3tCXKLtRfWHxJWPnmUFwJRi+4HKESQInZzrjnJA1T6u1l WO/zJ3mmbFL/nqT9t3My+9zzxzkph1TBTNC/Ne8IarXXP7utD3JBzVNZqPdVnutjDK1n URaSa5cWYEbL1/plSHJoE79G7dr9QyxcvG0FcIGGLuBtkPqHsXaO4usU4+B/zjoA+LCU /6DG1+PdACNN1EcjdkDA2EIFlC0ZrndbWscmZWP03YqoXhcchPvSoFq/M2Pn+NdBBde0 mHNQ== X-Gm-Message-State: AOAM533AjPemsWHX8YfDDHp9U02bCV2Xgr8HSFr14uqiYRR3m2+fLl7V CeidQ/psWwFRcMiQyYdMlQyouFQ4SXY= X-Google-Smtp-Source: ABdhPJwf13b11d26fr8OIHEfgB38HlfwOvxnNYLzKkXiO3WfqTVVTk2cvCWAr4+g3ncAjS+Qzk3q5Q== X-Received: by 2002:a05:6402:289a:b0:425:d682:105d with SMTP id eg26-20020a056402289a00b00425d682105dmr9315853edb.175.1651939882297; Sat, 07 May 2022 09:11:22 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id e15-20020a50e44f000000b0042617ba63c7sm3769813edm.81.2022.05.07.09.11.21 for <55302@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 May 2022 09:11:21 -0700 (PDT) From: Liliana Marie Prikler Date: Sat, 7 May 2022 17:39:25 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-ID: 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1651939957; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=vG5OZWc0JurEGrsCdNiAAx/3Uyrs/GLzaXFoR9yU8y4=; b=Bhw6FEFHa88vTvK1z4HF5xFh9NNX167bujtcTQ9HkD1+lFJYVla3vuJQpR65itbhqilD7c 2HWqN/6y+6J6MP0ZtGHgoLBBygoBdrZFNLHq/Y75kYmYZshzUghiSVf88gAIihH9yR8VU5 DA94m0Y7f8NYSk/TGfnuEdvWoq9bgP0dSUPKQAgBJ4432Mdx2ylBykjcoVSfYOajO7Qser BefG1Cg4TuvL1yE0hNJr7ktvdrfvc6hBa+itziVeOeDhwA78dsz0LkJ8R4jpoJnObCfZ0p GDNIfgC9t2MNEpgUUv/myUTl1EcTLXmM3KzlfEaKLO5y/eay4L2jVQAWIuBEgg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651939957; a=rsa-sha256; cv=none; b=N9uNS+dbMQNLJp7/naMwvIHJPNzsXEsIt4lgJjBZZnq914AJI000p2AQ3C/9E6VCbrLDdD 5xGhmN72GjizAxCxqruO8heRTQhiDUMNQQxwTupOOxxox2KwyTs2PgY/UHNz4nMi2n+LOM G7V7oqd7Y0RvYC1VgvATYryuWo5A1hBo6XXdTbDQx5oiWgxNhWS6kAVsARzANQNakyC0B4 Z1a8R9QBeJ8M8gSMgzOzn5yN+y2b+QIPlKp0s4Hlwjr4510DfkmvAhsWuAA4Ndsgqd9h67 /Kk1uLS6YAfTJCt7ZUEVQXbEGj/BQstI0T/CzJa8FTzlXYeQdHXdoF71YhkSfw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=WhZloC27; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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" X-Migadu-Spam-Score: 6.20 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=WhZloC27; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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" X-Migadu-Queue-Id: B9B412AD54 X-Spam-Score: 6.20 X-Migadu-Scanner: scn0.migadu.com X-TUID: MazfHmKf4hAW * gnu/packages/wine.scm (wine64)[arguments]: Convert to list of G-Expessions. <#:configure-flags,#:make-flags>: Use ‘#$output’ instead of ‘%output’. <#:phases>: Replace labels with search-input-file. --- gnu/packages/wine.scm | 169 ++++++++++++++++++++---------------------- 1 file changed, 79 insertions(+), 90 deletions(-) diff --git a/gnu/packages/wine.scm b/gnu/packages/wine.scm index eb71a8caa8..1ab9153f84 100644 --- a/gnu/packages/wine.scm +++ b/gnu/packages/wine.scm @@ -219,96 +219,85 @@ (define-public wine64 (inputs (modify-inputs (package-inputs wine) (prepend wine))) (arguments - `(#:make-flags - (list "SHELL=bash" - (string-append "libdir=" %output "/lib/wine64")) - #:phases - (modify-phases %standard-phases - ;; Explicitly set both the 64-bit and 32-bit versions of vulkan-loader - ;; when installing to x86_64-linux so both are available. - ;; TODO: Add more JSON files as they become available in Mesa. - ,@(match (%current-system) - ((or "x86_64-linux") - `((add-after 'copy-wine32-binaries 'wrap-executable - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out"))) - (wrap-program (string-append out "/bin/wine-preloader") - `("VK_ICD_FILENAMES" ":" = - (,(string-append - (assoc-ref inputs "mesa") - "/share/vulkan/icd.d/radeon_icd.x86_64.json" ":" - (assoc-ref inputs "mesa") - "/share/vulkan/icd.d/intel_icd.x86_64.json" ":" - (assoc-ref inputs "wine") - "/share/vulkan/icd.d/radeon_icd.i686.json" ":" - (assoc-ref inputs "wine") - "/share/vulkan/icd.d/intel_icd.i686.json")))) - (wrap-program (string-append out "/bin/wine64-preloader") - `("VK_ICD_FILENAMES" ":" = - (,(string-append - (assoc-ref inputs "mesa") - "/share/vulkan/icd.d/radeon_icd.x86_64.json" - ":" (assoc-ref inputs "mesa") - "/share/vulkan/icd.d/intel_icd.x86_64.json" - ":" (assoc-ref inputs "wine") - "/share/vulkan/icd.d/radeon_icd.i686.json" - ":" (assoc-ref inputs "wine") - "/share/vulkan/icd.d/intel_icd.i686.json")))) - #t))))) - (_ - `())) - (add-after 'unpack 'patch-SHELL - (lambda _ - (substitute* "configure" - ;; configure first respects CONFIG_SHELL, clobbers SHELL later. - (("/bin/sh") - (which "bash"))))) - (add-after 'patch-generated-file-shebangs 'patch-makedep - (lambda* (#:key outputs #:allow-other-keys) - (substitute* "tools/makedep.c" - (("output_filenames\\( unix_libs \\);" all) - (string-append all - "output ( \" -Wl,-rpath=%s \", so_dir );"))))) - (add-after 'install 'copy-wine32-binaries - (lambda* (#:key outputs #:allow-other-keys) - (let* ((wine32 (assoc-ref %build-inputs "wine")) - (out (assoc-ref %outputs "out"))) - ;; Copy the 32-bit binaries needed for WoW64. - (copy-file (string-append wine32 "/bin/wine") - (string-append out "/bin/wine")) - ;; Copy the real 32-bit wine-preloader instead of the wrapped - ;; version. - (copy-file (string-append wine32 "/bin/.wine-preloader-real") - (string-append out "/bin/wine-preloader"))))) - (add-after 'install 'copy-wine32-libraries - (lambda* (#:key outputs #:allow-other-keys) - (let* ((wine32 (assoc-ref %build-inputs "wine")) - (out (assoc-ref %outputs "out"))) - (copy-recursively (string-append wine32 "/lib/wine32") - (string-append out "/lib/wine32"))))) - (add-after 'compress-documentation 'copy-wine32-manpage - (lambda* (#:key outputs #:allow-other-keys) - (let* ((wine32 (assoc-ref %build-inputs "wine")) - (out (assoc-ref %outputs "out"))) - ;; Copy the missing man file for the wine binary from wine. - (copy-file (string-append wine32 "/share/man/man1/wine.1.gz") - (string-append out "/share/man/man1/wine.1.gz"))))) - (add-after 'configure 'patch-dlopen-paths - ;; Hardcode dlopened sonames to absolute paths. - (lambda _ - (let* ((library-path (search-path-as-string->list - (getenv "LIBRARY_PATH"))) - (find-so (lambda (soname) - (search-path library-path soname)))) - (substitute* "include/config.h" - (("(#define SONAME_.* )\"(.*)\"" _ defso soname) - (format #f "~a\"~a\"" defso (find-so soname)))))))) - #:configure-flags - (list "--enable-win64" - (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib/wine64")) - ,@(strip-keyword-arguments '(#:configure-flags #:make-flags #:phases - #:system) - (package-arguments wine)))) + (cons* + #:make-flags + #~(list "SHELL=bash" + (string-append "libdir=" #$output "/lib/wine64")) + #:phases + #~(modify-phases %standard-phases + ;; Explicitly set both the 64-bit and 32-bit versions of vulkan-loader + ;; when installing to x86_64-linux so both are available. + ;; TODO: Add more JSON files as they become available in Mesa. + #$@(match (%current-system) + ((or "x86_64-linux") + `((add-after 'copy-wine32-binaries 'wrap-executable + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (icd-files (map + (lambda (basename) + (search-input-file + inputs + (string-append "/share/vulkan/icd.d/" + basename))) + '("radeon_icd.x86_64.json" + "intel_icd.x86_64.json" + "radeon_icd.i686.json" + "intel_icd.i686.json")))) + (wrap-program (string-append out "/bin/wine-preloader") + `("VK_ICD_FILENAMES" ":" = ,icd-files)) + (wrap-program (string-append out "/bin/wine64-preloader") + `("VK_ICD_FILENAMES" ":" = ,icd-files))))))) + (_ + `())) + (add-after 'unpack 'patch-SHELL + (lambda _ + (substitute* "configure" + ;; configure first respects CONFIG_SHELL, clobbers SHELL later. + (("/bin/sh") + (which "bash"))))) + (add-after 'patch-generated-file-shebangs 'patch-makedep + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "tools/makedep.c" + (("output_filenames\\( unix_libs \\);" all) + (string-append all + "output ( \" -Wl,-rpath=%s \", so_dir );"))))) + (add-after 'install 'copy-wine32-binaries + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref %outputs "out"))) + ;; Copy the 32-bit binaries needed for WoW64. + (copy-file (search-input-file inputs "/bin/wine") + (string-append out "/bin/wine")) + ;; Copy the real 32-bit wine-preloader instead of the wrapped + ;; version. + (copy-file (search-input-file inputs "/bin/.wine-preloader-real") + (string-append out "/bin/wine-preloader"))))) + (add-after 'install 'copy-wine32-libraries + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref %outputs "out"))) + (copy-recursively (search-input-directory inputs "/lib/wine32") + (string-append out "/lib/wine32"))))) + (add-after 'compress-documentation 'copy-wine32-manpage + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref %outputs "out"))) + ;; Copy the missing man file for the wine binary from wine. + (copy-file (search-input-file inputs "/share/man/man1/wine.1.gz") + (string-append out "/share/man/man1/wine.1.gz"))))) + (add-after 'configure 'patch-dlopen-paths + ;; Hardcode dlopened sonames to absolute paths. + (lambda _ + (let* ((library-path (search-path-as-string->list + (getenv "LIBRARY_PATH"))) + (find-so (lambda (soname) + (search-path library-path soname)))) + (substitute* "include/config.h" + (("(#define SONAME_.* )\"(.*)\"" _ defso soname) + (format #f "~a\"~a\"" defso (find-so soname)))))))) + #:configure-flags + #~(list "--enable-win64" + (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib/wine64")) + (strip-keyword-arguments '(#:configure-flags #:make-flags #:phases + #:system) + (package-arguments wine)))) (synopsis "Implementation of the Windows API (WoW64 version)") (supported-systems '("x86_64-linux" "aarch64-linux")))) -- 2.36.0