From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id oPs2KE0q3GMI/QAAbAwnHQ (envelope-from ) for ; Thu, 02 Feb 2023 22:25:33 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id KOpXJ00q3GP7OgEAG6o9tA (envelope-from ) for ; Thu, 02 Feb 2023 22:25:33 +0100 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 4266E3D389 for ; Thu, 2 Feb 2023 22:25:33 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNh4p-0007qH-E2; Thu, 02 Feb 2023 16:25: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 1pNh4o-0007pt-5W for guix-patches@gnu.org; Thu, 02 Feb 2023 16:25: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 1pNh4n-0006mU-SZ for guix-patches@gnu.org; Thu, 02 Feb 2023 16:25:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pNh4n-0003hc-O0 for guix-patches@gnu.org; Thu, 02 Feb 2023 16:25:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61067] [PATCH v3 3/5] gnu: wine-minimal: Make the parent of wine so phases can be shared. Resent-From: Kaelyn Takata Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 02 Feb 2023 21:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61067 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61067@debbugs.gnu.org Cc: Kaelyn Takata , liliana.prikler@gmail.com Received: via spool by 61067-submit@debbugs.gnu.org id=B61067.167537305914145 (code B ref 61067); Thu, 02 Feb 2023 21:25:01 +0000 Received: (at 61067) by debbugs.gnu.org; 2 Feb 2023 21:24:19 +0000 Received: from localhost ([127.0.0.1]:36008 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNh47-0003g3-3p for submit@debbugs.gnu.org; Thu, 02 Feb 2023 16:24:19 -0500 Received: from mail-4316.protonmail.ch ([185.70.43.16]:20303) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNh44-0003fh-C2 for 61067@debbugs.gnu.org; Thu, 02 Feb 2023 16:24:17 -0500 Date: Thu, 02 Feb 2023 21:23:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1675373050; x=1675632250; bh=cMyu0mRMHFYK7ZJKXImCTRc6DGGUHg9KWLMfCmQw7hA=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=FdrA41hMwzQgohC1cGBO32eYV22iE472naS195cQi0eCl7LS/cUlnIsCcbQG2M3Wk owwLGMGRJo7MxIg77t0T9cpPRLa3PJ4SZnuDfgZNnFKhItcr52KdogCiBKeXHkRAgb gOc98boDlij1a8A1pztVbJsZHiNRukcVh+431E9MzHWIwVhLYan9LacjEJpM7nZwHR tE8D1UVWu4d/VH6T75VObSF/MzUWTd65jqgjHNRD+PNTc57ldJI0gnmyhywtoCvkvL umiargiqGVCroC2nLHPSnZGOtp6YDSlrvkJwnNENJIqfd1OEoVf6gntB0XYTi576NA zPqhTddtQcdog== Message-ID: <7a81358b182ba151977df25900e980c87488ee02.1675372737.git.kaelyn.alexi@protonmail.com> In-Reply-To: References: Feedback-ID: 34709329:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: Kaelyn Takata X-ACL-Warn: , Kaelyn Takata via Guix-patches From: Kaelyn Takata 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-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1675373133; a=rsa-sha256; cv=none; b=C6vAxqfV6dZHSmuy5M0Pv8cnqUOMd0vMrufYYFz65mRvsSJdYVzPHvTZ6vQXH1lUXfUGss xUmSFxjK+l7hXs8DLxZlL7DMXjOB40oUGHjywTKKoQD0kzgr1RaoIV9bzmg4ce8gFqD0Vl lh2kAQ+QJNibeQ6AeTbya9pC4LowF1UYWFOLc3hjhV0olrduwQGnWZrYPOKV8Af27naHxo +/nWE4AjBOWXtxGOhNv4TDfkg8lA6FNmu+6a8QuIYhGyW4EkYUR7EwbQNmTmWHDNEx06Pm q63tW49RWxjTKXrIMdQalXk+cYSwvtZHVold49veVQAck4q42HDWG2kr4DM2Cw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail3 header.b=FdrA41hM; 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=1675373133; 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=cMyu0mRMHFYK7ZJKXImCTRc6DGGUHg9KWLMfCmQw7hA=; b=ORxc3Ye8iaNRnqLzQ1zLS2XhmwTvokO2Xa7wp0pOsoRGFDsZgmE8+tf/mAj4IGy4xwtuMu H1vXS0C21p/g4cRREKM5ODRHSNJDqzdX0SmI79uQzJFCNP97lG9c1BV3rzFQXJa5iOCKhR q6Hf1SVIW/GbE19vgCOVc1+ZQMQhhBF9W/f8ZAlmf1IeASB/77kIRXzqd8ArKpSHs+ktO1 gZpZ8/QHKxt1V9Y4BDAzsGxtzF8OHH7pH6XtCTf5PKNHefelAYhto0zC1guCG5yVU9UFFL TS1lMyWC5ZNtscHz8umL4M2eQri8a0jdU5C3N9L0B+9b9EN6Tb28f8Uz6HCe6Q== X-Migadu-Spam-Score: -2.88 X-Spam-Score: -2.88 X-Migadu-Queue-Id: 4266E3D389 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail3 header.b=FdrA41hM; 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" X-TUID: iPfUErtwa7rp * gnu/packages/wine.scm (wine,wine-minimal): Have wine expand upon the package definition of wine-minimal instead of having wine-minimal trim down the package definition of wine, and share the phases between them. --- gnu/packages/wine.scm | 166 +++++++++++++++++++----------------------- 1 file changed, 75 insertions(+), 91 deletions(-) diff --git a/gnu/packages/wine.scm b/gnu/packages/wine.scm index 6e43494c68..ceef09ea5d 100644 --- a/gnu/packages/wine.scm +++ b/gnu/packages/wine.scm @@ -74,9 +74,11 @@ (define-module (gnu packages wine) #:use-module (ice-9 match) #:use-module (srfi srfi-1)) -(define-public wine +;; This minimal build of Wine is needed to prevent a circular dependency w= ith +;; vkd3d. +(define-public wine-minimal (package - (name "wine") + (name "wine-minimal") (version "8.0") (source (origin @@ -91,8 +93,72 @@ (define-public wine (sha256 (base32 "0bkr3klvjy8h4djddr31fvapsi9pc2rsiyhaa7j1lwpq704w4wh2")))) (build-system gnu-build-system) + (native-inputs (list bison flex)) + (inputs `()) + (arguments + (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 suppose= d to + ;; pass. + #:tests? #f + + #:make-flags + #~(list "SHELL=3Dbash" + (string-append "libdir=3D" #$output "/lib/wine32")) + + #:phases + #~(modify-phases %standard-phases + (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=3D%s \", arch_install_dirs[arch= ] );")))))) + #:configure-flags + #~(list "--without-freetype" + "--without-x"))) + (home-page "https://www.winehq.org/") + (synopsis "Implementation of the Windows API (32-bit only)") + (description + "Wine (originally an acronym for \"Wine Is Not an Emulator\") is a +compatibility layer capable of running Windows applications. Instead of +simulating internal Windows logic like a virtual machine or emulator, Wine +translates Windows API calls into POSIX calls on-the-fly, eliminating the +performance and memory penalties of other methods and allowing you to clea= nly +integrate Windows applications into your desktop.") + ;; Any platform should be able to build wine, but based on '#:system' = these + ;; are the ones we currently support. + (supported-systems '("i686-linux" "x86_64-linux" "armhf-linux")) + (license license:lgpl2.1+))) + +(define-public wine + (package + (inherit wine-minimal) + (name "wine") (native-inputs - (list bison flex gettext-minimal perl pkg-config)) + (modify-inputs (package-native-inputs wine-minimal) + (prepend gettext-minimal perl pkg-config))) (inputs ;; Some libraries like libjpeg are now compiled into native PE object= s. ;; The ELF objects provided by Guix packages are of no use. Whilst t= his @@ -100,6 +166,7 @@ (define-public wine ;; to build some of these from Guix PACKAGE-SOURCE but attempts were = not ;; fruitful so far. See . (list alsa-lib + bash-minimal cups dbus eudev @@ -132,23 +199,9 @@ (define-public wine vkd3d vulkan-loader)) (arguments - (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 suppose= d to - ;; pass. - #:tests? #f - - #:make-flags - #~(list "SHELL=3Dbash" - (string-append "libdir=3D" #$output "/lib/wine32")) - - #:phases - #~(modify-phases %standard-phases + (substitute-keyword-arguments (package-arguments wine-minimal) + ((#:phases phases) + #~(modify-phases #$phases ;; Explicitly set the 32-bit version of vulkan-loader when inst= alling ;; to i686-linux or x86_64-linux. ;; TODO: Add more JSON files as they become available in Mesa. @@ -173,42 +226,8 @@ (define-public wine "/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=3D%s \", arch_ins= tall_dirs[arch] );")))))))) - (home-page "https://www.winehq.org/") - (synopsis "Implementation of the Windows API (32-bit only)") - (description - "Wine (originally an acronym for \"Wine Is Not an Emulator\") is a -compatibility layer capable of running Windows applications. Instead of -simulating internal Windows logic like a virtual machine or emulator, Wine -translates Windows API calls into POSIX calls on-the-fly, eliminating the -performance and memory penalties of other methods and allowing you to clea= nly -integrate Windows applications into your desktop.") - ;; Any platform should be able to build wine, but based on '#:system' = these - ;; are thr ones we currently support. - (supported-systems '("i686-linux" "x86_64-linux" "armhf-linux")) - (license license:lgpl2.1+))) + `())))) + ((#:configure-flags _ '()) #~'()))))) (define-public wine64 (package @@ -298,41 +317,6 @@ (define-public wine64 (synopsis "Implementation of the Windows API (WoW64 version)") (supported-systems '("x86_64-linux" "aarch64-linux")))) -;; This minimal build of Wine is needed to prevent a circular dependency w= ith -;; vkd3d. -(define-public wine-minimal - (package - (inherit wine) - (name "wine-minimal") - (native-inputs (modify-inputs (package-native-inputs wine) - (delete "gettext" "perl" "pkg-config"))) - (inputs `()) - (arguments - `(#:validate-runpath? #f - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-SHELL - (lambda _ - (substitute* "configure" - ;; configure first respects CONFIG_SHELL, clobbers SHELL la= ter. - (("/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)))))))) - #:configure-flags - (list "--without-freetype" - "--without-x") - ,@(strip-keyword-arguments '(#:configure-flags #:phases) - (package-arguments wine)))))) - (define-public wine-staging-patchset-data (package (name "wine-staging-patchset-data") -- 2.39.1