From patchwork Sat May 7 15:36:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Liliana Marie Prikler X-Patchwork-Id: 39147 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 D80B127BBEB; Sat, 7 May 2022 17:13:09 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 277F227BBEA for ; Sat, 7 May 2022 17:13:09 +0100 (BST) Received: from localhost ([::1]:47252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nnN3M-0007iq-BP for patchwork@mira.cbaines.net; Sat, 07 May 2022 12:13:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nnN2L-0006E8-FC for guix-patches@gnu.org; Sat, 07 May 2022 12:12:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58919) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nnN2L-00039C-5r 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-0006O0-1V for guix-patches@gnu.org; Sat, 07 May 2022 12:12:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55302] [PATCH 2/4] gnu: wine: 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:04 +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.165193989224327 (code B ref 55302); Sat, 07 May 2022 16:12:04 +0000 Received: (at 55302) by debbugs.gnu.org; 7 May 2022 16:11:32 +0000 Received: from localhost ([127.0.0.1]:52775 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnN1n-0006KJ-N1 for submit@debbugs.gnu.org; Sat, 07 May 2022 12:11:32 -0400 Received: from mail-ej1-f67.google.com ([209.85.218.67]:34519) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnN1j-0006JR-8v for 55302@debbugs.gnu.org; Sat, 07 May 2022 12:11:28 -0400 Received: by mail-ej1-f67.google.com with SMTP id g6so19527053ejw.1 for <55302@debbugs.gnu.org>; Sat, 07 May 2022 09:11:27 -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=Onvo+ag0ZGnArDjAHDJULGVWb8M1glhxuK1QW+KZp+k=; b=lG3qsRb+49fLsySTWi9K0ClO5RlIxBB56znYsT1ex62IVkrdu3jD6sQff6j1vPeLeC WKwT2qV4gADVPmS60XHabeupD6Mj0E35syj+ZTQ9ejNjO1JHqFNhBMTPg8LiEbI3b0qk mFqEuKkAXeX9a/ZFqq9pur/RGfwPbBKprt5ZCxQ8khJFTTxqtzIKhyF1ox4bxPB7BW6G LXts/rPK4ya/Y2mMb72AML9Y/rVC3c50n3fSfg/wFu/T15ShaCBN84G/qP14d9ruVoKd SmGHwSfbXIIW9H2HW/vP86CGnzPVJM520um5nM3nOgwkP+kOU1TmSh63bQA5zAm6rFtO 5rGw== 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=Onvo+ag0ZGnArDjAHDJULGVWb8M1glhxuK1QW+KZp+k=; b=h1JZUoLWIWj/+S+U1bVPmWW5BtFKfksGJWZ6M0AQHg/EvhxoWpJ5Dt9AmzcDq+racD MFDqka8gpFn5yVU3zUnG7pUQ06Vn6COLeSprljr2W0W7vT/re1rCjQIUZnpDGFouiZ3r Jlf6yjCHmecn9NUxzQZi9QVcOLjHtKsnUdZ4PfEETR6vlsHCwRsndYzccwbPKFXO7q68 PfNhe42mW1ZkVa8cEl4Sc2EZqPvTZJzBl9HgNw/pf9F49l4jjwn9RYe9r5gl1OEIt9cx sWlaWyx7+jxlrHHTTwkMxCqOuqn2fSHs4HL4sw35FgzZt+1mEdIv5LIG5r9ui+CPEDJo qAEw== X-Gm-Message-State: AOAM533HGgqre9z0sryHd+1xAMbmYoHg2OU40S+8zfIJGLCymmVarPqF 1q7J7QvicTcJxjvfYBScqimcrhfGqSY= X-Google-Smtp-Source: ABdhPJxj0QUttKkj9y1skXqKQmT00hz5+1mRKSx/5Z9/884KDuRLSE+j1kmp7TOwEq+Dry+CRqY7OQ== X-Received: by 2002:a17:906:1f52:b0:6f4:ebc2:da82 with SMTP id d18-20020a1709061f5200b006f4ebc2da82mr8021853ejk.176.1651939881605; Sat, 07 May 2022 09:11:21 -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.20 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:36:07 +0200 MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/wine.scm (wine)[inputs, native-inputs]: Drop labels. [arguments]: Convert to list of G-Expressions. <#:configure-flags,#:make-flags>: Replace ‘%output’ with ‘#$output’. <#:phases>: Use ‘search-input-file’ instead of input labels. --- gnu/packages/wine.scm | 187 +++++++++++++++++++++--------------------- 1 file changed, 92 insertions(+), 95 deletions(-) diff --git a/gnu/packages/wine.scm b/gnu/packages/wine.scm index 5d8e9f5b90..eb71a8caa8 100644 --- a/gnu/packages/wine.scm +++ b/gnu/packages/wine.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2017, 2020 Nicolas Goaziou ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice ;;; Copyright © 2019 Pierre Neidhardt +;;; Copyright © 2022 Liliana Marie Prikler ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,6 +26,7 @@ (define-module (gnu packages wine) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) + #:use-module (guix gexp) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix utils) @@ -89,118 +91,113 @@ (define-public wine (base32 "1f0r00b6lk59cmpj42b7f2jrd58d7vxfvpp54j7arwjhdg4yjxlg")))) (build-system gnu-build-system) (native-inputs - `(("bison" ,bison) - ("flex" ,flex) - ("gettext" ,gettext-minimal) - ("perl" ,perl) - ("pkg-config" ,pkg-config))) + (list bison flex gettext-minimal perl pkg-config)) (inputs ;; Some libraries like libjpeg are now compiled into native PE objects. ;; The ELF objects provided by Guix packages are of no use. Whilst this ;; is technically bundling, it's quite defensible. It might be possible ;; to build some of these from Guix PACKAGE-SOURCE but attempts were not ;; fruitful so far. See . - `(("alsa-lib" ,alsa-lib) - ("dbus" ,dbus) - ("cups" ,cups) - ("eudev" ,eudev) - ("fontconfig" ,fontconfig) - ("freetype" ,freetype) - ("gnutls" ,gnutls) - ("gst-plugins-base" ,gst-plugins-base) - ("libgphoto2" ,libgphoto2) - ("libldap" ,openldap) - ("libnetapi" ,samba) - ("libsane" ,sane-backends) - ("libpcap" ,libpcap) - ("libusb" ,libusb) - ("libICE" ,libice) - ("libX11" ,libx11) - ("libXi" ,libxi) - ("libXext" ,libxext) - ("libXcursor" ,libxcursor) - ("libXrender" ,libxrender) - ("libXrandr" ,libxrandr) - ("libXinerama" ,libxinerama) - ("libXxf86vm" ,libxxf86vm) - ("libXcomposite" ,libxcomposite) - ("mit-krb5" ,mit-krb5) - ("openal" ,openal) - ("pulseaudio" ,pulseaudio) - ("sdl2" ,sdl2) - ("unixodbc" ,unixodbc) - ("v4l-utils" ,v4l-utils) - ("vkd3d" ,vkd3d) - ("vulkan-loader" ,vulkan-loader))) + (list alsa-lib + cups + dbus + eudev + fontconfig + freetype + gnutls + gst-plugins-base + libgphoto2 + openldap + samba + sane-backends + libpcap + libusb + libice + libx11 + libxi + libxext + libxcursor + libxrender + libxrandr + libxinerama + libxxf86vm + libxcomposite + mit-krb5 + openal + pulseaudio + sdl2 + unixodbc + v4l-utils + vkd3d + vulkan-loader)) (arguments - `(;; Force a 32-bit build targeting a similar architecture, i.e.: - ;; armhf for armhf/aarch64, i686 for i686/x86_64. - #:system ,@(match (%current-system) - ((or "armhf-linux" "aarch64-linux") - `("armhf-linux")) - (_ - `("i686-linux"))) + (list + ;; Force a 32-bit build targeting a similar architecture, i.e.: + ;; armhf for armhf/aarch64, i686 for i686/x86_64. + #:system (match (%current-system) + ((or "armhf-linux" "aarch64-linux") "armhf-linux") + (_ "i686-linux")) ;; XXX: There's a test suite, but it's unclear whether it's supposed to ;; pass. #:tests? #f #:configure-flags - (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib/wine32")) + #~(list (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib/wine32")) #:make-flags - (list "SHELL=bash" - (string-append "libdir=" %output "/lib/wine32")) + #~(list "SHELL=bash" + (string-append "libdir=" #$output "/lib/wine32")) #:phases - (modify-phases %standard-phases - ;; Explicitly set the 32-bit version of vulkan-loader when installing - ;; to i686-linux or x86_64-linux. - ;; TODO: Add more JSON files as they become available in Mesa. - ,@(match (%current-system) - ((or "i686-linux" "x86_64-linux") - `((add-after 'install 'wrap-executable - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (icd (string-append out "/share/vulkan/icd.d"))) - (mkdir-p icd) - (copy-file (string-append - (assoc-ref inputs "mesa") - "/share/vulkan/icd.d/radeon_icd.i686.json") - (string-append icd "/radeon_icd.i686.json")) - (copy-file (string-append - (assoc-ref inputs "mesa") - "/share/vulkan/icd.d/intel_icd.i686.json") - (string-append icd "/intel_icd.i686.json")) - (wrap-program (string-append out "/bin/wine-preloader") - `("VK_ICD_FILENAMES" ":" = - (,(string-append icd - "/radeon_icd.i686.json" ":" - icd "/intel_icd.i686.json"))))))))) - (_ - `())) - (add-after 'unpack 'patch-SHELL - (lambda _ - (substitute* "configure" - ;; configure first respects CONFIG_SHELL, clobbers SHELL later. - (("/bin/sh") - (which "bash"))))) - (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))))))) - (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 );")))))))) + #~(modify-phases %standard-phases + ;; Explicitly set the 32-bit version of vulkan-loader when installing + ;; to i686-linux or x86_64-linux. + ;; TODO: Add more JSON files as they become available in Mesa. + #$@(match (%current-system) + ((or "i686-linux" "x86_64-linux") + `((add-after 'install 'wrap-executable + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (icd (string-append out "/share/vulkan/icd.d"))) + (mkdir-p icd) + (copy-file (search-input-file + inputs + "/share/vulkan/icd.d/radeon_icd.i686.json") + (string-append icd "/radeon_icd.i686.json")) + (copy-file (search-input-file + inputs + "/share/vulkan/icd.d/intel_icd.i686.json") + (string-append icd "/intel_icd.i686.json")) + (wrap-program (string-append out "/bin/wine-preloader") + `("VK_ICD_FILENAMES" ":" = + (,(string-append icd + "/radeon_icd.i686.json" ":" + icd "/intel_icd.i686.json"))))))))) + (_ + `())) + (add-after 'unpack 'patch-SHELL + (lambda _ + (substitute* "configure" + ;; configure first respects CONFIG_SHELL, clobbers SHELL later. + (("/bin/sh") + (which "bash"))))) + (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))))))) + (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 );")))))))) (home-page "https://www.winehq.org/") (synopsis "Implementation of the Windows API (32-bit only)") (description