gnu: wine: Update to 6.20.

This patch updates the logic by which the “so_dir” is patched onto RPATH.
Unlike the old hack, this one affects all Unix libraries, so it might be a tad
bit overkill, but better be safe than sorry when it comes to stuff that'd
break in validate-runpaths.

* gnu/packages/wine.scm (wine): Update to 6.20.
[#:phases]: Replace ‘patch-makefile’ with ‘patch-makedep’.
(wine64): Likewise.
This commit is contained in:
Liliana Marie Prikler 2021-10-31 19:30:40 +01:00
parent 46772aa0f0
commit ef4c9abeba
No known key found for this signature in database
GPG key ID: 442A84B8C70E2F87

View file

@ -74,7 +74,7 @@ (define-module (gnu packages wine)
(define-public wine (define-public wine
(package (package
(name "wine") (name "wine")
(version "6.16") (version "6.20")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
@ -86,7 +86,7 @@ (define-public wine
(string-append "https://dl.winehq.org/wine/source/" dir (string-append "https://dl.winehq.org/wine/source/" dir
"wine-" version ".tar.xz"))) "wine-" version ".tar.xz")))
(sha256 (sha256
(base32 "1s7sz1rimax4kxij1ngkwnx4hcljwjq3q5gksz22k8cq1l2r4l39")))) (base32 "0wc4a8slb3k859sdw9wwy92zc4pq7xw1kbq4frnxbzbvkiz26a20"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(native-inputs (native-inputs
`(("bison" ,bison) `(("bison" ,bison)
@ -194,15 +194,12 @@ (define-public wine
(("(#define SONAME_.* )\"(.*)\"" _ defso soname) (("(#define SONAME_.* )\"(.*)\"" _ defso soname)
(format #f "~a\"~a\"" defso (find-so soname)))) (format #f "~a\"~a\"" defso (find-so soname))))
#t))) #t)))
(add-after 'patch-generated-file-shebangs 'patch-makefile (add-after 'patch-generated-file-shebangs 'patch-makedep
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(invoke "make" "Makefile") ; Makefile is first regenerated (substitute* "tools/makedep.c"
(substitute* "Makefile" (("output_filenames\\( unix_libs \\);" all)
(("-lntdll" id) (string-append all
(string-append id "output ( \" -Wl,-rpath=%s \", so_dir );"))))))))
" -Wl,-rpath=" (assoc-ref outputs "out")
"/lib/wine32/wine/$(ARCH)-unix")))
#t)))))
(home-page "https://www.winehq.org/") (home-page "https://www.winehq.org/")
(synopsis "Implementation of the Windows API (32-bit only)") (synopsis "Implementation of the Windows API (32-bit only)")
(description (description
@ -262,15 +259,12 @@ (define-public wine64
#t))))) #t)))))
(_ (_
`())) `()))
(add-after 'patch-generated-file-shebangs 'patch-makefile (add-after 'patch-generated-file-shebangs 'patch-makedep
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(invoke "make" "Makefile") ; Makefile is first regenerated (substitute* "tools/makedep.c"
(substitute* "Makefile" (("output_filenames\\( unix_libs \\);" all)
(("-lntdll" id) (string-append all
(string-append id "output ( \" -Wl,-rpath=%s \", so_dir );")))))
" -Wl,-rpath=" (assoc-ref outputs "out")
"/lib/wine64/wine/$(ARCH)-unix")))
#t))
(add-after 'install 'copy-wine32-binaries (add-after 'install 'copy-wine32-binaries
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let* ((wine32 (assoc-ref %build-inputs "wine")) (let* ((wine32 (assoc-ref %build-inputs "wine"))