From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:47876) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jDb83-0004Ty-PH for guix-patches@gnu.org; Sun, 15 Mar 2020 17:49:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jDb82-0003Pw-3O for guix-patches@gnu.org; Sun, 15 Mar 2020 17:49:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58007) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jDb81-0003Nw-VR for guix-patches@gnu.org; Sun, 15 Mar 2020 17:49:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jDb81-0001IQ-T1 for guix-patches@gnu.org; Sun, 15 Mar 2020 17:49:01 -0400 Subject: [bug#40084] [PATCH] gnu: Add v86d. Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:47621) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jDb7v-0004R9-46 for guix-patches@gnu.org; Sun, 15 Mar 2020 17:48:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jDb7s-0001qG-Ey for guix-patches@gnu.org; Sun, 15 Mar 2020 17:48:54 -0400 Received: from pelzflorian.de ([5.45.111.108]:52048 helo=mail.pelzflorian.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jDb7r-0001Z6-QK for guix-patches@gnu.org; Sun, 15 Mar 2020 17:48:52 -0400 From: Florian Pelz Date: Sun, 15 Mar 2020 22:48:51 +0100 Message-Id: <20200315214851.30981-1-pelzflorian@pelzflorian.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: 40084@debbugs.gnu.org Cc: Florian Pelz * gnu/packages/xorg.scm (v86d): New variable. --- gnu/packages/xorg.scm | 109 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm index f951e565ff..be381adc43 100644 --- a/gnu/packages/xorg.scm +++ b/gnu/packages/xorg.scm @@ -21,6 +21,7 @@ ;;; Copyright =C2=A9 2019 nee ;;; Copyright =C2=A9 2019 Yoshinori Arai ;;; Copyright =C2=A9 2020 Leo Prikler +;;; Copyright =C2=A9 2020 Florian Pelz ;;; ;;; This file is part of GNU Guix. ;;; @@ -3446,6 +3447,114 @@ X server.") X server.") (license license:x11))) =20 +(define-public v86d + (package + (name "v86d") + (version "0.1.10") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/mjanusz/v86d.git") + (commit (string-append name "-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1c4iiggb5r9i2hxhk8c6q1m2vpfva39l1w33fsfkrz6fav6x34pp")) + (modules '((guix build utils))) + (snippet + '(begin + ;; remove bundled x86emu + (for-each delete-file + (filter (lambda (name) ;keep customized Makefile + (not (string-suffix? "Makefile" name))) + (find-files "libs/x86emu"))) + ;; remove non-working vbetest utility program (it is unnecess= ary) + (delete-file "libs/lrmi-0.10/vbe.h") + (delete-file "libs/lrmi-0.10/vbetest.c") + #t)))) + + ;; We keep the bundled copy of the Linux Real Mode Interface lrmi-0.= 10, + ;; because it includes fixes missing from upstream lrmi. We do not = use + ;; libx86, because we already use x86emu with the more current lrmi. + + (inputs `(("xorg-server-sources" ,(package-source xorg-server)) ;for= x86emu + ("xorgproto" ,xorgproto))) ;upstream x86emu uses X11/Xfunc= proto.h + (outputs '("out" ;main v86d helper + "testvbe")) ;test program for listing video modes + (supported-systems '("i686-linux" "x86_64-linux")) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ;there are no tests + #:modules ((guix build utils) + (guix build gnu-build-system) + (ice-9 popen)) + #:phases + (modify-phases %standard-phases + ;; 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)))) + (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)))) + (add-after 'install 'install-docs + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (doc-dir (string-append out "/share/doc/v86d"))) + (mkdir-p doc-dir) + (copy-file "README" + (string-append doc-dir "/README")) + (copy-file "libs/lrmi-0.10/README" + (string-append doc-dir "/README.lrmi")) + (copy-file "libs/x86emu/COPYING" + (string-append doc-dir "/COPYING.xorg-server.x= 86emu")) + #t)))))) + (home-page "https://github.com/mjanusz/v86d") + (synopsis "Userspace helper for uvesafb") + (description + "v86d provides a backend for kernel drivers that need to execute x8= 6 BIOS +code. The code is executed in a controlled environment and the results = are +passed back to the kernel via the netlink interface. v86d is required b= y the +uvesafb Linux kernel module that provides an fbdev framebuffer when Kern= el +Mode Setting is unavailable. It can be a last resort when no other Xorg= X +server driver works.") + (license (list license:gpl2 + license:x11)))) ;for bundled lrmi and x86emu =20 (define-public xf86-video-vmware (package --=20 2.25.1