advance virtualbox
more/packages/virtualbox.scm
21 | 21 | #:use-module (guix packages) | |
22 | 22 | #:use-module (guix download) | |
23 | 23 | #:use-module (guix svn-download) | |
24 | + | #:use-module (guix git-download) | |
24 | 25 | #:use-module (guix build-system gnu) | |
25 | 26 | #:use-module (gnu packages) | |
26 | 27 | #:use-module (gnu packages admin) | |
… | |||
30 | 31 | #:use-module (more packages cdrom) | |
31 | 32 | #:use-module (gnu packages curl) | |
32 | 33 | #:use-module (gnu packages flex) | |
34 | + | #:use-module (gnu packages gettext) | |
33 | 35 | #:use-module (gnu packages gl) | |
34 | 36 | #:use-module (gnu packages gnome) | |
35 | 37 | #:use-module (gnu packages image) | |
… | |||
50 | 52 | (package | |
51 | 53 | (name "kbuild") | |
52 | 54 | (version "0.1.9998") | |
55 | + | ;(version "0.1.5-p2") | |
53 | 56 | (source (origin | |
54 | 57 | ;(method url-fetch) | |
55 | 58 | ;(uri (string-append "ftp://ftp.netlabs.org/pub/kbuild/kBuild-" | |
… | |||
57 | 60 | ;(sha256 | |
58 | 61 | ; (base32 | |
59 | 62 | ; "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"))) | |
64 | 75 | (file-name (string-append name "-" version)) | |
65 | 76 | (sha256 | |
66 | 77 | (base32 | |
67 | - | "1k7y2lqqhsfwfzzi7rms7a2kakimm7g46qa2gypkvzdd3drbpanj")))) | |
78 | + | "1xkirw4xdwpgcrvnwdqdr7d3fyg6yg2dzgyi83vxmvib6k4xwvxr")))) | |
68 | 79 | (build-system gnu-build-system) | |
69 | 80 | (native-inputs | |
70 | 81 | `(("autoconf" ,autoconf) | |
71 | 82 | ("automake" ,automake) | |
72 | 83 | ("bison" ,bison) | |
73 | 84 | ("flex" ,flex) | |
85 | + | ("gettext-minimal" ,gettext-minimal) | |
74 | 86 | ("perl" ,perl) | |
87 | + | ("pkg-config" ,pkg-config) | |
75 | 88 | ("texinfo" ,texinfo))) | |
76 | 89 | (arguments | |
77 | 90 | `(#:tests? #f | |
… | |||
81 | 94 | (add-before 'patch-generated-file-shebangs 'reconfigure | |
82 | 95 | (lambda _ | |
83 | 96 | (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")) | |
84 | 103 | (system* "autoreconf" "-fiv") | |
85 | 104 | (chdir "../.."))) | |
86 | 105 | (add-before 'build 'fix-binaries | |
87 | 106 | (lambda _ | |
88 | 107 | (substitute* "Config.kmk" | |
89 | 108 | (("\\+= rt") "+= rt pthread")) | |
90 | - | (substitute* "src/ash/output.h" | |
109 | + | (substitute* "src/kash/output.h" | |
91 | 110 | (("dprintf") "debugprintf")) | |
92 | - | (substitute* "src/ash/output.c" | |
111 | + | (substitute* "src/kash/output.c" | |
93 | 112 | (("dprintf") "debugprintf")) | |
94 | 113 | (substitute* "bootstrap.gmk" | |
95 | 114 | ((" /bin/sh") (string-append " " (which "sh"))) | |
96 | 115 | ((" /bin/echo") (string-append " " (which "echo")))) | |
97 | 116 | (substitute* "kBuild/env.sh" | |
98 | 117 | (("/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)) | |
99 | 144 | (replace 'build | |
100 | 145 | (lambda _ | |
101 | 146 | (zero? (system* "kBuild/env.sh" "--full" "make" "-f" "bootstrap.gmk" | |
… | |||
149 | 194 | (define-public virtualbox | |
150 | 195 | (package | |
151 | 196 | (name "virtualbox") | |
152 | - | (version "5.1.14") | |
197 | + | (version "5.2.8") | |
153 | 198 | (source (origin | |
154 | 199 | (method url-fetch) | |
155 | 200 | (uri (string-append | |
… | |||
158 | 203 | (file-name (string-append name "-" version ".tar.bz2")) | |
159 | 204 | (sha256 | |
160 | 205 | (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")))))) | |
162 | 215 | (build-system gnu-build-system) | |
163 | 216 | (native-inputs | |
164 | 217 | `(;("kbuild" ,kbuild) | |
… | |||
183 | 236 | ("lvm2" ,lvm2) | |
184 | 237 | ("mesa" ,mesa) | |
185 | 238 | ("python" ,python-2) | |
186 | - | ("qt5" ,qt) | |
239 | + | ("qt" ,qt) | |
187 | 240 | ("openssl" ,openssl) | |
188 | 241 | ("sdl" ,sdl))) | |
189 | 242 | (arguments | |
… | |||
192 | 245 | (add-before 'configure 'fix-paths | |
193 | 246 | (lambda* (#:key inputs #:allow-other-keys) | |
194 | 247 | (substitute* "configure" | |
248 | + | (("CXX=.*") "CXX=\"g++ -std=c++11\"\n") | |
195 | 249 | (("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"))))) | |
197 | 253 | ;(add-before 'configure 'remove-binaries | |
198 | 254 | ;(lambda* _ | |
199 | 255 | ;(substitute* "configure" | |
… | |||
202 | 258 | ;(delete-file-recursively "kBuild/bin"))) | |
203 | 259 | (replace 'configure | |
204 | 260 | (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)) | |
210 | 271 | (replace 'build | |
211 | 272 | (lambda* _ | |
212 | - | (zero? (system* "kmk"))))))) | |
273 | + | (invoke "kmk") | |
274 | + | #t))))) | |
213 | 275 | (home-page "https://www.virtualbox.org") | |
214 | 276 | (synopsis "Virtual Machine manager") | |
215 | 277 | (description |