Improve firefox
more/packages/gnuzilla.scm
255 | 255 | (substitute* "servo/components/style/build_gecko.rs" | |
256 | 256 | (("builder = builder.include") | |
257 | 257 | (string-append | |
258 | - | "builder = builder.clang_arg(\"-I" (assoc-ref inputs "clang") | |
259 | - | "/lib/clang/6.0.1/include\"); | |
258 | + | "builder = builder.clang_arg(\"-cxx-isystem\"); | |
259 | + | builder = builder.clang_arg(\"" | |
260 | + | (assoc-ref inputs "gcc") "/include/c++\"); | |
261 | + | builder = builder.clang_arg(\"-cxx-isystem\"); | |
262 | + | builder = builder.clang_arg(\"" | |
263 | + | (car (find-files (string-append | |
264 | + | (assoc-ref inputs "gcc") | |
265 | + | "/include/c++") | |
266 | + | "-gnu$" #:directories? #t)) "\"); | |
260 | 267 | builder = builder.include"))) | |
261 | 268 | #t)) | |
269 | + | (add-after 'unpack 'fix-isnan | |
270 | + | (lambda _ | |
271 | + | ;; There is a bug preventing SymbolTable_autogen.cpp from finding | |
272 | + | ;; isnan and isinf, although they are defined in that same file. | |
273 | + | ;; The reason seems to be that they are already defined in math.h | |
274 | + | (substitute* "gfx/angle/checkout/src/compiler/translator/SymbolTable_autogen.cpp" | |
275 | + | (("^namespace sh") | |
276 | + | "#undef isnan | |
277 | + | #undef isinf | |
278 | + | ||
279 | + | namespace sh")) | |
280 | + | #t)) | |
262 | 281 | (add-before 'build 'fix-cpath | |
263 | 282 | (lambda _ | |
264 | 283 | (setenv "CPATH" (getenv "CPLUS_INCLUDE_PATH")) | |
… | |||
287 | 306 | (format #t "configure flags: ~s~%" flags) | |
288 | 307 | (apply invoke bash | |
289 | 308 | (string-append srcdir "/configure") | |
290 | - | flags)))))))) | |
309 | + | flags)))) | |
310 | + | ;; This fixes the file chooser crash that happens with GTK 3. | |
311 | + | (replace 'wrap-program | |
312 | + | (lambda* (#:key inputs outputs #:allow-other-keys) | |
313 | + | (let* ((out (assoc-ref outputs "out")) | |
314 | + | (lib (string-append out "/lib")) | |
315 | + | (gtk (assoc-ref inputs "gtk+")) | |
316 | + | (gtk-share (string-append gtk "/share"))) | |
317 | + | (wrap-program (car (find-files lib "^firefox$")) | |
318 | + | `("XDG_DATA_DIRS" ":" prefix (,gtk-share))) | |
319 | + | #t))))))) | |
291 | 320 | (inputs | |
292 | 321 | `(("nspr" ,nspr) | |
293 | 322 | ("nss" ,nss) |