From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:54917) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jEwUm-0006AN-3A for guix-patches@gnu.org; Thu, 19 Mar 2020 10:50:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jEwUk-0001TP-Jv for guix-patches@gnu.org; Thu, 19 Mar 2020 10:50:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37502) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jEwUk-0001TC-Gw for guix-patches@gnu.org; Thu, 19 Mar 2020 10:50:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jEwUk-0000Nj-D3 for guix-patches@gnu.org; Thu, 19 Mar 2020 10:50:02 -0400 Subject: [bug#40084] [PATCH] gnu: Add v86d. Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:54821) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jEwTy-00068x-II for guix-patches@gnu.org; Thu, 19 Mar 2020 10:49:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jEwTx-0001Dw-Cx for guix-patches@gnu.org; Thu, 19 Mar 2020 10:49:14 -0400 Received: from pat.zlotemysli.pl ([37.59.186.212]:38162) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jEwTx-0001Dd-3M for guix-patches@gnu.org; Thu, 19 Mar 2020 10:49:13 -0400 Date: Thu, 19 Mar 2020 15:49:08 +0100 From: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Message-ID: <20200319144908.vfhtepo33lpmunhu@gravity> References: <20200315214851.30981-1-pelzflorian@pelzflorian.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="jpwmx6zrnwlesdsp" Content-Disposition: inline In-Reply-To: <20200315214851.30981-1-pelzflorian@pelzflorian.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Florian Pelz Cc: 40084@debbugs.gnu.org --jpwmx6zrnwlesdsp Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 (=3D (status:exit-val (close-pipe pipe)) = 0) > + (error "xz decompress failed"))))) > + (invoke (string-append (assoc-ref inputs "tar") "/bin/t= ar") > + "xvf" "xorg-server.tar" "--strip-components=3D3" > + "--wildcards" "*/hw/xfree86/x86emu/") > + ;; extract license: > + (with-directory-excursion "x86emu" > + (invoke (string-append (assoc-ref inputs "tar") "/bin= /tar") > + "xvf" "../xorg-server.tar" "--strip-component= s=3D1" > + "--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=3D3" "--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=3D1" "--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=3D2 to check for reproducibility. Regards, Jakub K=C4=85dzio=C5=82ka --jpwmx6zrnwlesdsp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE5Xa/ss9usT31cTO54xWnWEYTFWQFAl5zhl8ACgkQ4xWnWEYT FWQ4RA/+K3dShJX3iHKBOpCMW4ubvBW8gijHPuLiccTRju0wOTEVf837iN8Ofrim JZOXm0U+qNshlUSc1kD8iM0XAKuf5iEp8xPlBVQlloV/aRFgllII3pcWvserxsD1 OaQa2Tc+5MZ0IoeFVhexc00DgLA4Fl8XyTHqI/wrqUItwqzplUPVRxN2sBtpNSZO uN73Tm9VIUAGs9WlTZr4kQVlg8GgAsJ9UpyUPLHM/A8QwjEad/nr/OBM31RLx24+ OQB8iJpfCVRE60J9UoswUj1XfTVz/WFMHAeGhJm9hvPBi8/PnVZlmrbkGVPvRf27 wLkm3pFZ8ugVnBz04knllPERuVZrKyjl/XDPlg4/Vys0MUCXXQdtKaycekaW/nDA 6cAjk4dTkos6KeoJKi78VJLic2WyyvbpA8hVmtaq2a2Hr62IIfYqY0B1wRUBh/3y Hw3fW97yLVicJG9LOuu+YfXwS6Td/49JxxfKOj3LzkCSErPPiRZ7YqKniZgIp3W3 JcLtWn3kERxIA5car/er1gJpPNZS4GmSUK9LSorszmk15iW2VyiCtNRfMsp1pCJF 6ss0Pe21lh/0sCd6IZ0FKAzA291zjSkcO4X1XnDomSoeZahEJ4o9rtN7bxKlXSEt iI3HZD592oXXc/L4WoB1AdCME2C8liLVgQXsGSal+cp7TdrFfVs= =J7+3 -----END PGP SIGNATURE----- --jpwmx6zrnwlesdsp--