unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Kaelyn Takata via Guix-patches via <guix-patches@gnu.org>
To: 61067@debbugs.gnu.org
Cc: Kaelyn Takata <kaelyn.alexi@protonmail.com>
Subject: [bug#61067] [PATCH] gnu: wine: Invert the relationship between wine and wine-minimal.
Date: Mon, 30 Jan 2023 20:35:41 +0000	[thread overview]
Message-ID: <ee1d0a87feb054f6ddb094553315af411db528a2.1675110929.git.kaelyn.alexi@protonmail.com> (raw)
In-Reply-To: <cover.1674691809.git.kaelyn.alexi@protonmail.com>

* 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.
---
 gnu/packages/wine.scm | 162 +++++++++++++++++++++---------------------
 1 file changed, 81 insertions(+), 81 deletions(-)

diff --git a/gnu/packages/wine.scm b/gnu/packages/wine.scm
index 10cae76ed8..3299059968 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 with
+;; vkd3d.
+(define-public wine-minimal
   (package
-    (name "wine")
+    (name "wine-minimal")
     (version "8.0")
     (source
      (origin
@@ -91,8 +93,77 @@ (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 supposed to
+       ;; pass.
+       #:tests? #f
+
+       #:make-flags
+       #~(list "SHELL=bash"
+               (string-append "libdir=" #$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=%s \", arch_install_dirs[arch] );")))))
+           (add-before 'build 'set-widl-time-override
+             ;; Set WIDL_TIME_OVERRIDE to avoid embedding the current date in
+             ;; files generated by WIDL.
+             (lambda _
+               (setenv "WIDL_TIME_OVERRIDE" "315532800"))))
+       #: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 cleanly
+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 objects.
      ;; The ELF objects provided by Guix packages are of no use.  Whilst this
@@ -100,6 +171,7 @@ (define-public wine
      ;; to build some of these from Guix PACKAGE-SOURCE but attempts were not
      ;; fruitful so far.  See <https://www.winehq.org/announce/7.0>.
      (list alsa-lib
+           bash-minimal
            cups
            dbus
            eudev
@@ -132,23 +204,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 supposed to
-       ;; pass.
-       #:tests? #f
-
-       #:make-flags
-       #~(list "SHELL=bash"
-               (string-append "libdir=" #$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 installing
            ;; to i686-linux or x86_64-linux.
            ;; TODO: Add more JSON files as they become available in Mesa.
@@ -173,47 +231,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=%s \", arch_install_dirs[arch] );")))))
-           (add-before 'build 'set-widl-time-override
-             ;; Set WIDL_TIME_OVERRIDE to avoid embedding the current date in
-             ;; files generated by WIDL.
-             (lambda _
-               (setenv "WIDL_TIME_OVERRIDE" "315532800"))))))
-    (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 cleanly
-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
@@ -226,8 +245,7 @@ (define-public wine64
          (strip-keyword-arguments '(#:system) (package-arguments wine))
        ((#:make-flags _)
         #~(list "SHELL=bash"
-                (string-append "libdir=" #$output "/lib/wine64"))
-        )
+                (string-append "libdir=" #$output "/lib/wine64")))
        ((#:phases phases)
         #~(modify-phases #$phases
             ;; Explicitly set both the 64-bit and 32-bit versions of vulkan-loader
@@ -281,24 +299,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 with
-;; 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
-     (substitute-keyword-arguments (package-arguments wine)
-       ((#:phases phases)
-        #~(modify-phases #$phases
-            (delete 'wrap-executable))) ;; Don't reference Vulkan ICD files.
-       ((#:configure-flags _ '())
-        #~(list "--without-freetype"
-                "--without-x"))))))
-
 (define-public wine-staging-patchset-data
   (package
     (name "wine-staging-patchset-data")

base-commit: c2b40b4b4c9e0227e47730ebe73a653b89d1e568
prerequisite-patch-id: a4f31b7648d1a378604724327efd615cfaf30deb
prerequisite-patch-id: 61c258aa83aa60b83e2b9e44ff0f88ecc4277ff0
prerequisite-patch-id: 151abf5b65589e5721ffc2607e884f5375150108
prerequisite-patch-id: c3046a4e9ad075f3013aafda88cec6a22341ac7c
prerequisite-patch-id: 19a15bb5b766f40a985df7677db0866ad8c28069
--
2.39.1






  parent reply	other threads:[~2023-01-30 20:36 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-26  0:17 [bug#61067] [PATCH 0/3] Update wine and wine-staging packages to 8.0 Kaelyn Takata via Guix-patches via
2023-01-26  0:23 ` [bug#61067] [PATCH 1/3] gnu: wine: Update " Kaelyn Takata via Guix-patches via
2023-01-26  0:24 ` [bug#61067] [PATCH 2/3] gnu: wine: Build more reproducibly Kaelyn Takata via Guix-patches via
2023-01-26 19:28   ` Liliana Marie Prikler
2023-01-26 20:46     ` Kaelyn via Guix-patches via
2023-01-26 21:09       ` Liliana Marie Prikler
2023-01-27  1:07         ` Kaelyn via Guix-patches via
2023-01-26  0:24 ` [bug#61067] [PATCH 3/3] gnu: wine-staging: Update to 8.0 Kaelyn Takata via Guix-patches via
2023-01-27  1:07 ` [bug#61067] [PATCH v2 0/5] Update wine and wine-staging packages " Kaelyn Takata via Guix-patches via
2023-01-27  1:08   ` [bug#61067] [PATCH v2 1/5] gnu: wine: Update " Kaelyn Takata via Guix-patches via
2023-01-27  1:08   ` [bug#61067] [PATCH v2 2/5] gnu: wine-staging: " Kaelyn Takata via Guix-patches via
2023-01-27  1:08   ` [bug#61067] [PATCH v2 3/5] gnu: wine-minimal: Share phases with parent wine package Kaelyn Takata via Guix-patches via
2023-01-27 18:03     ` Liliana Marie Prikler
2023-01-27 18:15       ` Kaelyn via Guix-patches via
2023-01-30 20:39       ` Kaelyn via Guix-patches via
2023-01-31 19:19         ` Liliana Marie Prikler
2023-01-27  1:08   ` [bug#61067] [PATCH v2 4/5] gnu: wine64: " Kaelyn Takata via Guix-patches via
2023-01-27  1:08   ` [bug#61067] [PATCH v2 5/5] gnu: wine: Build more reproducibly Kaelyn Takata via Guix-patches via
2023-01-30 20:35 ` Kaelyn Takata via Guix-patches via [this message]
2023-02-02 21:23 ` [bug#61067] [PATCH v3 0/5] Update wine and wine-staging packages to 8.0 Kaelyn Takata via Guix-patches via
2023-02-02 21:23   ` [bug#61067] [PATCH v3 1/5] gnu: wine: Update " Kaelyn Takata via Guix-patches via
2023-02-02 21:23   ` [bug#61067] [PATCH v3 2/5] gnu: wine-staging: " Kaelyn Takata via Guix-patches via
2023-02-02 21:23   ` [bug#61067] [PATCH v3 3/5] gnu: wine-minimal: Make the parent of wine so phases can be shared Kaelyn Takata via Guix-patches via
2023-02-02 21:24   ` [bug#61067] [PATCH v3 4/5] gnu: wine64: Share phases with parent wine package Kaelyn Takata via Guix-patches via
2023-02-02 21:24   ` [bug#61067] [PATCH v3 5/5] gnu: wine-minimal: Build more reproducibly Kaelyn Takata via Guix-patches via
2023-02-05  6:13   ` bug#61067: [PATCH v3 0/5] Update wine and wine-staging packages to 8.0 Liliana Marie Prikler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ee1d0a87feb054f6ddb094553315af411db528a2.1675110929.git.kaelyn.alexi@protonmail.com \
    --to=guix-patches@gnu.org \
    --cc=61067@debbugs.gnu.org \
    --cc=kaelyn.alexi@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).