advance virtualbox

Julien LepillerFri May 04 18:58:02+0200 2018

348e0a3

advance virtualbox

more/packages/virtualbox.scm

2121
  #:use-module (guix packages)
2222
  #:use-module (guix download)
2323
  #:use-module (guix svn-download)
24+
  #:use-module (guix git-download)
2425
  #:use-module (guix build-system gnu)
2526
  #:use-module (gnu packages)
2627
  #:use-module (gnu packages admin)

3031
  #:use-module (more packages cdrom)
3132
  #:use-module (gnu packages curl)
3233
  #:use-module (gnu packages flex)
34+
  #:use-module (gnu packages gettext)
3335
  #:use-module (gnu packages gl)
3436
  #:use-module (gnu packages gnome)
3537
  #:use-module (gnu packages image)

5052
  (package
5153
    (name "kbuild")
5254
    (version "0.1.9998")
55+
    ;(version "0.1.5-p2")
5356
    (source (origin
5457
              ;(method url-fetch)
5558
              ;(uri (string-append "ftp://ftp.netlabs.org/pub/kbuild/kBuild-"

5760
              ;(sha256
5861
              ; (base32
5962
              ;  "19j2sswdqqjzjzmg0xam8nmwmxg422iii0fl9cwzcznjfigdn1c2"))))
60-
              (method svn-fetch)
61-
              (uri (svn-reference
62-
                     (url "http://svn.netlabs.org/repos/kbuild/trunk")
63-
                     (revision 3025)))
63+
              ;(method svn-fetch)
64+
              ;(uri (svn-reference
65+
              ;       (url "http://svn.netlabs.org/repos/kbuild/trunk")
66+
              ;       (revision 3224)))
67+
              ;(file-name (string-append name "-" version))
68+
              ;(sha256
69+
              ; (base32
70+
              ;  "0dvp6j61v92afhkz392zbk0myx27mzqpqcfqr7yyaj3kigbnmal8"))))
71+
              (method git-fetch)
72+
              (uri (git-reference
73+
                     (url "https://framagit.org/tyreunom/kbuild-snapshot.git")
74+
                     (commit "f3a865c4671242524860097c819152447a03a7f7")))
6475
              (file-name (string-append name "-" version))
6576
              (sha256
6677
               (base32
67-
                "1k7y2lqqhsfwfzzi7rms7a2kakimm7g46qa2gypkvzdd3drbpanj"))))
78+
                "1xkirw4xdwpgcrvnwdqdr7d3fyg6yg2dzgyi83vxmvib6k4xwvxr"))))
6879
    (build-system gnu-build-system)
6980
    (native-inputs
7081
     `(("autoconf" ,autoconf)
7182
       ("automake" ,automake)
7283
       ("bison" ,bison)
7384
       ("flex" ,flex)
85+
       ("gettext-minimal" ,gettext-minimal)
7486
       ("perl" ,perl)
87+
       ("pkg-config" ,pkg-config)
7588
       ("texinfo" ,texinfo)))
7689
    (arguments
7790
     `(#:tests? #f

8194
         (add-before 'patch-generated-file-shebangs 'reconfigure
8295
           (lambda _
8396
             (chdir "src/kmk")
97+
             (substitute* "Makefile.am"
98+
               (("AM_CPPFLAGS =") "AM_CPPFLAGS = -I$(srcdir)/../lib//kStuff/include")
99+
               (("kmkbuiltin\\.c")
100+
                "kmkbuiltin.c kmkbuiltin/getopt_r.c kmkbuiltin/getopt1_r.c")
101+
               (("kmk_redirect_SOURCES =")
102+
                "kmk_redirect_SOURCES = output.c"))
84103
             (system* "autoreconf" "-fiv")
85104
             (chdir "../..")))
86105
         (add-before 'build 'fix-binaries
87106
           (lambda _
88107
             (substitute* "Config.kmk"
89108
               (("\\+= rt") "+= rt pthread"))
90-
             (substitute* "src/ash/output.h"
109+
             (substitute* "src/kash/output.h"
91110
               (("dprintf") "debugprintf"))
92-
             (substitute* "src/ash/output.c"
111+
             (substitute* "src/kash/output.c"
93112
               (("dprintf") "debugprintf"))
94113
             (substitute* "bootstrap.gmk"
95114
               ((" /bin/sh") (string-append " " (which "sh")))
96115
               ((" /bin/echo") (string-append " " (which "echo"))))
97116
             (substitute* "kBuild/env.sh"
98117
               (("/bin/pwd") (which "pwd")))))
118+
         (add-before 'build 'fix-errors
119+
           (lambda _
120+
             (copy-file "src/sed/po/Makefile.in.in" "src/kmk/po/Makefile.in.in")
121+
             (substitute* "src/kmk/kmkbuiltin.c"
122+
               (("int kmk_builtin_dircache.*")
123+
                "int kmk_builtin_dircache(int argc, char **argv, char **envp, PKMKBUILTINCTX pCtx)"))
124+
             (substitute* "src/kmk/kmkbuiltin.h"
125+
               (("#include <fcntl.h>")
126+
                "#include <fcntl.h>\n#include <stdint.h>"))
127+
             (substitute* "src/kmk/output.h"
128+
               (("#define INCLUDED_MAKE_OUTPUT_H")
129+
                "#define INCLUDED_MAKE_OUTPUT_H\n#include <stdio.h>"))
130+
             (substitute* "src/kmk/kmkbuiltin/install.c"
131+
               (("\tuid") "\tThis.uid")
132+
               (("\tgid") "\tThis.gid"))
133+
             (substitute* "src/kmk/kmkbuiltin/rm.c"
134+
               (("\\(vflag\\)") "(pThis->vflag)"))
135+
             (substitute* "src/kmk/kmkbuiltin/getopt_r.h"
136+
               (("typedef struct") "#include <stddef.h>\ntypedef struct"))
137+
             (substitute* "src/kmk/output.c"
138+
               (("unsigned int stdio_traced = 0;")
139+
                "unsigned int stdio_traced = 0;\nssize_t output_write_text (struct output *out, int is_err, const char *src, size_t len){return len;}"))
140+
             ;  (("/\\* write/fwrite like function, text mode. \\*/") "#endif")
141+
             ;  (("return output_write_bin \\(out, is_err, src, len\\);")
142+
             ;   "return output_write_bin (out, is_err, src, len);\n#if 1"))
143+
             #t))
99144
         (replace 'build
100145
           (lambda _
101146
             (zero? (system* "kBuild/env.sh" "--full" "make" "-f" "bootstrap.gmk"

149194
(define-public virtualbox
150195
  (package
151196
    (name "virtualbox")
152-
    (version "5.1.14")
197+
    (version "5.2.8")
153198
    (source (origin
154199
              (method url-fetch)
155200
              (uri (string-append

158203
              (file-name (string-append name "-" version ".tar.bz2"))
159204
              (sha256
160205
               (base32
161-
                "12i2kyn7svy2kd6j40fzzhy7173xfq884ygb6x9fbihpcw1bnrw2"))))
206+
                "1s44h0d2khclkgkfgcwpq09dpckzr22r8737icdwhjhbgga5j9zf"))
207+
              (modules '((guix build utils)))
208+
              (snippet
209+
                `(begin
210+
                   ;; TODO: frmts contains a lot more bundled code.
211+
                   (for-each delete-file-recursively
212+
                     '("src/libs/libpng-1.2.54"
213+
                       "src/libs/libxml2-2.9.4"
214+
                       "src/libs/zlib-1.2.8"))))))
162215
    (build-system gnu-build-system)
163216
    (native-inputs
164217
     `(;("kbuild" ,kbuild)

183236
       ("lvm2" ,lvm2)
184237
       ("mesa" ,mesa)
185238
       ("python" ,python-2)
186-
       ("qt5" ,qt)
239+
       ("qt" ,qt)
187240
       ("openssl" ,openssl)
188241
       ("sdl" ,sdl)))
189242
    (arguments

192245
         (add-before 'configure 'fix-paths
193246
           (lambda* (#:key inputs #:allow-other-keys)
194247
             (substitute* "configure"
248+
               (("CXX=.*") "CXX=\"g++ -std=c++11\"\n")
195249
               (("PYTHONDIR=.*")
196-
                (string-append "PYTHONDIR=" (assoc-ref inputs "python") "\n")))))
250+
                (string-append "PYTHONDIR=" (assoc-ref inputs "python") "\n"))
251+
               (("QT5DIR=.*")
252+
                (string-append "QT5DIR=" (assoc-ref inputs "qt") "\n")))))
197253
         ;(add-before 'configure 'remove-binaries
198254
           ;(lambda* _
199255
             ;(substitute* "configure"

202258
             ;(delete-file-recursively "kBuild/bin")))
203259
         (replace 'configure
204260
           (lambda* (#:key outputs inputs #:allow-other-keys)
205-
             (zero? (system* "./configure" "--disable-java" "--disable-pulse"
206-
                             "--disable-vmmraw"
207-
                             (string-append "--with-makeself=" (which "echo"))))))
208-
                             ;(string-append "--with-kbuild="
209-
                             ;               (assoc-ref inputs "kbuild"))))))
261+
             (setenv "I_INCXML2" (string-append "-I" (assoc-ref inputs "libxml2")
262+
                                                "/include/libxml2"))
263+
             (setenv "I_INCSDL" (string-append "-I" (assoc-ref inputs "sdl")
264+
                                               "/include/SDL"))
265+
             (invoke "./configure" "--disable-java" "--disable-pulse"
266+
                     "--disable-vmmraw"
267+
                     (string-append "--with-makeself=" (which "echo")))
268+
                     ;(string-append "--with-kbuild="
269+
                     ;               (assoc-ref inputs "kbuild"))))
270+
             #t))
210271
         (replace 'build
211272
           (lambda* _
212-
             (zero? (system* "kmk")))))))
273+
             (invoke "kmk")
274+
             #t)))))
213275
    (home-page "https://www.virtualbox.org")
214276
    (synopsis "Virtual Machine manager")
215277
    (description