From: "Jakub Kądziołka" <kuba@kadziolka.net>
To: Florian Pelz <pelzflorian@pelzflorian.de>
Cc: 40084@debbugs.gnu.org
Subject: [bug#40084] [PATCH] gnu: Add v86d.
Date: Thu, 19 Mar 2020 15:49:08 +0100 [thread overview]
Message-ID: <20200319144908.vfhtepo33lpmunhu@gravity> (raw)
In-Reply-To: <20200315214851.30981-1-pelzflorian@pelzflorian.de>
[-- Attachment #1: Type: text/plain, Size: 3748 bytes --]
On Sun, Mar 15, 2020 at 10:48:51PM +0100, Florian Pelz wrote:
> + ;; Replace the bundled x86emu with its upstream copy from Xorg-server:
> + (add-after 'unpack 'unpack-x86emu-sources
> + (lambda* (#:key inputs #:allow-other-keys)
> + (begin
> + (format #t "decompressing x86emu source code~%")
> + (with-directory-excursion "libs"
> + (call-with-output-file "xorg-server.tar"
> + (lambda (out)
> + (let* ((xz (assoc-ref inputs "xz"))
> + (srcs (assoc-ref inputs "xorg-server-sources"))
> + (pipe (open-pipe* OPEN_READ
> + (string-append xz "/bin/xz")
> + "-cd" srcs)))
> + (dump-port pipe out)
> + (unless (= (status:exit-val (close-pipe pipe)) 0)
> + (error "xz decompress failed")))))
> + (invoke (string-append (assoc-ref inputs "tar") "/bin/tar")
> + "xvf" "xorg-server.tar" "--strip-components=3"
> + "--wildcards" "*/hw/xfree86/x86emu/")
> + ;; extract license:
> + (with-directory-excursion "x86emu"
> + (invoke (string-append (assoc-ref inputs "tar") "/bin/tar")
> + "xvf" "../xorg-server.tar" "--strip-components=1"
> + "--wildcards" "*/COPYING"))
> + (delete-file "xorg-server.tar")
> + #t))))
I don't see why you're decompressing the tarball manually, this seems to
work just as well:
(add-after 'unpack 'unpack-x86emu-sources
(lambda* (#:key inputs #:allow-other-keys)
(begin
(format #t "decompressing x86emu source code~%")
(with-directory-excursion "libs"
(invoke (string-append (assoc-ref inputs "tar") "/bin/tar")
"xvf" (assoc-ref inputs "xorg-server-sources")
"--strip-components=3"
"--wildcards" "*/hw/xfree86/x86emu/")
;; extract license:
(with-directory-excursion "x86emu"
(invoke (string-append (assoc-ref inputs "tar") "/bin/tar")
"xvf" (assoc-ref inputs "xorg-server-sources")
"--strip-components=1"
"--wildcards" "*/COPYING"))
#t))))
If it's about efficiency or robustness in some way, I'd suggest leaving
a comment detailing the reason. Either way, I'd bind the path to tar in
a `let', as well as the path to "xorg-server-sources" if we decide to
not decompress separately.
> + (replace 'configure
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let ((out (assoc-ref outputs "out")))
> + (setenv "CC" (which "gcc"))
> + (setenv "DESTDIR" out)
> + (invoke "./configure" "--with-x86emu"))))
> + (add-after 'build 'build-testvbe
> + (lambda _
> + (invoke "make" "testvbe")))
> + (add-after 'install 'install-testvbe
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let ((testvbe (assoc-ref outputs "testvbe"))
> + (olddest (getenv "DESTDIR")))
> + (setenv "DESTDIR" testvbe)
> + (invoke "make" "install_testvbe")
> + (setenv "DESTDIR" olddest))))
These phases are missing the trailing #t.
I don't know how to test the package, but it passes lint & build,
including --rounds=2 to check for reproducibility.
Regards,
Jakub Kądziołka
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-03-19 14:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-15 21:48 [bug#40084] [PATCH] gnu: Add v86d Florian Pelz
2020-03-19 14:49 ` Jakub Kądziołka [this message]
2020-03-20 8:40 ` pelzflorian (Florian Pelz)
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=20200319144908.vfhtepo33lpmunhu@gravity \
--to=kuba@kadziolka.net \
--cc=40084@debbugs.gnu.org \
--cc=pelzflorian@pelzflorian.de \
/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).