From 209778717a214cb4d506fe9aa673a4d2c2716b6c Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Sun, 20 Dec 2015 16:24:24 -0600 Subject: gnu: Add Asymptote. * gnu/packages/bdw-gc.scm (libgc-for-c++): New variable. * gnu/packages/plotutils.scm (asymptote): New variable. * gnu/packages/patches/asymptote-gsl2.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. --- gnu-system.am | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu-system.am') diff --git a/gnu-system.am b/gnu-system.am index 24f7516fcf..c0f8fac1ab 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -405,6 +405,7 @@ dist_patch_DATA = \ gnu/packages/patches/agg-am_c_prototype.patch \ gnu/packages/patches/alsa-lib-mips-atomic-fix.patch \ gnu/packages/patches/apr-skip-getservbyname-test.patch \ + gnu/packages/patches/asymptote-gsl2.patch \ gnu/packages/patches/ath9k-htc-firmware-binutils.patch \ gnu/packages/patches/ath9k-htc-firmware-gcc.patch \ gnu/packages/patches/ath9k-htc-firmware-objcopy.patch \ -- cgit v1.2.3 From c2e87caaa6b7efb9c18c46fd4f9d4370f68c8db7 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 30 Nov 2015 14:25:53 +0100 Subject: gnu: julia: Update to 0.4.2. * gnu/packages/patches/julia-0.3.10-fix-empty-array.patch: Remove file. * gnu-system.am (dist_patch_DATA): Remove it. * gnu/packages/julia.scm (julia): Update to 0.4.2. [arguments]: Remove phase "fix-building-with-mcjit-llvm"; replace phase "patch-include-path" with "fix-include-and-link-paths"; add phase "hardcode-paths"; add missing make-flags. [inputs]: Replace "pcre" with "pcre2"; replace "git" with "libgit2"; add "coreutils"; add "libuv-julia"; add "wget"; add "which". [native-inputs]: Remove "which". --- gnu-system.am | 1 - gnu/packages/julia.scm | 101 ++++++++++++++------- .../patches/julia-0.3.10-fix-empty-array.patch | 13 --- 3 files changed, 69 insertions(+), 46 deletions(-) delete mode 100644 gnu/packages/patches/julia-0.3.10-fix-empty-array.patch (limited to 'gnu-system.am') diff --git a/gnu-system.am b/gnu-system.am index c0f8fac1ab..6626cd9d4b 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -519,7 +519,6 @@ dist_patch_DATA = \ gnu/packages/patches/irrlicht-mesa-10.patch \ gnu/packages/patches/jasper-CVE-2008-3522.patch \ gnu/packages/patches/jbig2dec-ignore-testtest.patch \ - gnu/packages/patches/julia-0.3.10-fix-empty-array.patch \ gnu/packages/patches/kmod-module-directory.patch \ gnu/packages/patches/lftp-dont-save-unknown-host-fingerprint.patch \ gnu/packages/patches/liba52-enable-pic.patch \ diff --git a/gnu/packages/julia.scm b/gnu/packages/julia.scm index 5885eb0268..7c7b53e6c0 100644 --- a/gnu/packages/julia.scm +++ b/gnu/packages/julia.scm @@ -39,6 +39,7 @@ (define-module (gnu packages julia) #:use-module (gnu packages python) #:use-module (gnu packages textutils) #:use-module (gnu packages version-control) + #:use-module (gnu packages wget) #:use-module (ice-9 match)) (define libuv-julia @@ -67,16 +68,15 @@ (define libuv-julia (define-public julia (package (name "julia") - (version "0.3.10") + (version "0.4.2") (source (origin (method url-fetch) (uri (string-append "https://github.com/JuliaLang/julia/releases/download/v" - version "/julia-" version "_c8ceeefcc1.tar.gz")) + version "/julia-" version "-full.tar.gz")) (sha256 (base32 - "0j6mw6wr35lxid10nh9gz7k6wck3a90ic92w99n1r052325gl9r7")) - (patches (list (search-patch "julia-0.3.10-fix-empty-array.patch"))))) + "0sikirixvryf8z3d0skig22fpip64jk001qsha98iwsrcfiqpyds")))) (build-system gnu-build-system) (arguments `(#:test-target "test" @@ -92,8 +92,7 @@ (define-public julia #:phases (modify-phases %standard-phases (delete 'configure) - (add-after - 'unpack 'hardcode-soname-map + (add-after 'unpack 'hardcode-soname-map ;; ./src/ccall.cpp creates a map from library names to paths using the ;; output of "/sbin/ldconfig -p". Since ldconfig is not used in Guix, ;; we patch ccall.cpp to contain a static map. @@ -108,46 +107,70 @@ (define-public julia "sonameMap[\"" libname "\"] = " "\"" (assoc-ref inputs input) "/lib/" soname "\";"))) '(("libc" "libc" "libc.so.6") - ("pcre" "libpcre" "libpcre.so") + ("pcre2" "libpcre2-8" "libpcre2-8.so") ("mpfr" "libmpfr" "libmpfr.so") ("openblas" "libblas" "libopenblas.so") ("arpack-ng" "libarpack" "libarpack.so") ("lapack" "liblapack" "liblapack.so") + ("libgit2" "libgit2" "libgit2.so") ("gmp" "libgmp" "libgmp.so") ("openlibm" "libopenlibm" "libopenlibm.so") ("openspecfun" "libopenspecfun" "libopenspecfun.so") ("fftw" "libfftw3" "libfftw3.so") ("fftwf" "libfftw3f" "libfftw3f.so")))))) #t)) - ;; This phase will no longer be necessary in 0.3.11; see - ;; https://github.com/JuliaLang/julia/issues/12028 - (add-before - 'build 'fix-building-with-mcjit-llvm - (lambda _ - (substitute* "src/cgutils.cpp" - (("addComdat\\(gv\\);") "")) - #t)) - (add-before - 'build 'patch-include-path - (lambda _ + (add-before 'build 'fix-include-and-link-paths + (lambda* (#:key inputs #:allow-other-keys) + ;; LIBUTF8PROC is a linker flag, not a build target. It is + ;; included in the LIBFILES_* variable which is used as a + ;; collection of build targets and a list of libraries to link + ;; against. + (substitute* "src/flisp/Makefile" + (("\\$\\(BUILDDIR\\)/\\$\\(EXENAME\\): \\$\\(OBJS\\) \\$\\(LIBFILES_release\\)") + "$(BUILDDIR)/$(EXENAME): $(OBJS) $(LLT_release)") + (("\\$\\(BUILDDIR\\)/\\$\\(EXENAME\\)-debug: \\$\\(DOBJS\\) \\$\\(LIBFILES_debug\\)") + "$(BUILDDIR)/$(EXENAME)-debug: $(DOBJS) $(LLT_debug)")) + + ;; The REPL must be linked with libuv. + (substitute* "ui/Makefile" + (("JLDFLAGS \\+= ") + (string-append "JLDFLAGS += " + (assoc-ref %build-inputs "libuv") + "/lib/libuv.so "))) + (substitute* "deps/Makefile" (("/usr/include/double-conversion") (string-append (assoc-ref %build-inputs "double-conversion") "/include/double-conversion"))) + (substitute* "base/Makefile" + (("\\$\\(build_includedir\\)/uv-errno.h") + (string-append (assoc-ref inputs "libuv") + "/include/uv-errno.h"))) #t)) - (add-before - 'build 'replace-default-shell + (add-before 'build 'replace-default-shell (lambda _ (substitute* "base/client.jl" (("/bin/sh") (which "sh"))) #t)) - (add-before - 'check 'disable-broken-test - ;; One test fails because it produces slightly different output. - (lambda _ - (substitute* "test/repl.jl" - (("@test output") "# @test output")) - #t))) + (add-after 'unpack 'hardcode-paths + (lambda _ + (substitute* "base/interactiveutil.jl" + (("`which") (string-append "`" (which "which"))) + (("`wget") (string-append "`" (which "wget")))) + #t)) + (add-before 'check 'disable-broken-tests + (lambda _ + (substitute* "test/choosetests.jl" + ;; These tests time out. See + ;; https://github.com/JuliaLang/julia/issues/14374 for ongoing + ;; discussion. + (("\"replcompletions\",") "") + (("\"repl\",") "")) + (substitute* "test/repl.jl" + ;; This test fails because we cannot escape the build + ;; directory. + (("@test pwd\\(\\) == homedir\\(\\)") "#")) + #t))) #:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out")) @@ -163,7 +186,6 @@ (define-public julia (_ "MARCH=UNSUPPORTED")) "CONFIG_SHELL=bash" ;needed to build bundled libraries - "USE_SYSTEM_LIBUV=0" ;Julia expects a modified libuv "USE_SYSTEM_DSFMT=0" ;not packaged for Guix and upstream has no ;build system for a shared library. "USE_SYSTEM_RMATH=0" ;Julia uses a bundled version of R's math @@ -184,10 +206,22 @@ (define-public julia ;; (assoc-ref %build-inputs "suitesparse") ;; "/include") + "USE_GPL_LIBS=1" ;proudly "USE_SYSTEM_GRISU=1" ;for double-conversion "USE_SYSTEM_UTF8PROC=1" + (string-append "UTF8PROC_INC=" + (assoc-ref %build-inputs "utf8proc") + "/include") "USE_SYSTEM_LLVM=1" "USE_SYSTEM_LIBUNWIND=1" + "USE_SYSTEM_LIBUV=1" + (string-append "LIBUV=" + (assoc-ref %build-inputs "libuv") + "/lib/libuv.so") + (string-append "LIBUV_INC=" + (assoc-ref %build-inputs "libuv") + "/include") + "USE_SYSTEM_PATCHELF=1" "USE_SYSTEM_PCRE=1" "USE_SYSTEM_OPENLIBM=1" "USE_SYSTEM_GMP=1" @@ -198,26 +232,29 @@ (define-public julia (inputs `(("llvm" ,llvm-3.5) ("arpack-ng" ,arpack-ng) + ("coreutils" ,coreutils) ;for bindings to "mkdir" and the like ("lapack" ,lapack) ("openblas" ,openblas) ;Julia does not build with Atlas ("libunwind" ,libunwind) ("openlibm" ,openlibm) ("openspecfun" ,openspecfun) ("double-conversion" ,double-conversion) + ("libgit2" ,libgit2) ("fftw" ,fftw) ("fftwf" ,fftwf) ("fortran" ,gfortran) - ("pcre" ,pcre) + ("libuv" ,libuv-julia) + ("pcre2" ,pcre2) ("utf8proc" ,utf8proc) - ("git" ,git) ("mpfr" ,mpfr) + ("wget" ,wget) + ("which" ,which) ("gmp" ,gmp))) (native-inputs `(("perl" ,perl) ("patchelf" ,patchelf) ("pkg-config" ,pkg-config) - ("python" ,python-2) - ("which" ,which))) + ("python" ,python-2))) ;; Julia is not officially released for ARM and MIPS. ;; See https://github.com/JuliaLang/julia/issues/10639 (supported-systems '("i686-linux" "x86_64-linux")) diff --git a/gnu/packages/patches/julia-0.3.10-fix-empty-array.patch b/gnu/packages/patches/julia-0.3.10-fix-empty-array.patch deleted file mode 100644 index b00f6549e3..0000000000 --- a/gnu/packages/patches/julia-0.3.10-fix-empty-array.patch +++ /dev/null @@ -1,13 +0,0 @@ -See https://github.com/JuliaLang/julia/issues/11817 - ---- a/src/codegen.cpp 2015-06-24 12:44:31.218674066 +0200 -+++ b/src/codegen.cpp 2015-04-23 11:19:50.000000000 +0200 -@@ -4551,7 +4551,7 @@ - #ifdef V128_BUG - "-avx", - #endif -- }; -+ ""}; - SmallVector MAttrs(mattr, mattr+sizeof(mattr)/sizeof(mattr[0])); - EngineBuilder eb = EngineBuilder(engine_module) - .setEngineKind(EngineKind::JIT) -- cgit v1.2.3 From 2a6afac9055bc2cac29678b9e2ed0344cb32c39e Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 3 Dec 2015 08:30:04 +0100 Subject: gnu: gtk+-2: Add patch to support GUIX_GTK2_PATH. * gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH: New file. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/gtk.scm (gtk+-2) [source]: Add patch. [native-search-paths]: Add search path for GUIX_GTK2_PATH. --- gnu-system.am | 1 + gnu/packages/gtk.scm | 9 ++++- .../patches/gtk2-respect-GUIX_GTK2_PATH.patch | 46 ++++++++++++++++++++++ 3 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch (limited to 'gnu-system.am') diff --git a/gnu-system.am b/gnu-system.am index 6626cd9d4b..2c62cc5911 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -506,6 +506,7 @@ dist_patch_DATA = \ gnu/packages/patches/guile-present-coding.patch \ gnu/packages/patches/guile-relocatable.patch \ gnu/packages/patches/guile-rsvg-pkgconfig.patch \ + gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch \ gnu/packages/patches/gtkglext-disable-disable-deprecated.patch \ gnu/packages/patches/hop-bigloo-4.0b.patch \ gnu/packages/patches/hop-linker-flags.patch \ diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index f85ea1970a..d2257825e8 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -522,7 +522,8 @@ (define-public gtk+-2 name "-" version ".tar.xz")) (sha256 (base32 - "0mj6xn40py9r9lvzg633fal81xfwfm89d9mvz7jk4lmwk0g49imj")))) + "0mj6xn40py9r9lvzg633fal81xfwfm89d9mvz7jk4lmwk0g49imj")) + (patches (list (search-patch "gtk2-respect-GUIX_GTK2_PATH.patch"))))) (build-system gnu-build-system) (outputs '("out" "doc")) (propagated-inputs @@ -557,7 +558,11 @@ (define-public gtk+-2 ;; FIXME: re-enable tests requiring an X server (substitute* "gtk/Makefile.in" (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits ."))) - %standard-phases))) + %standard-phases))) + (native-search-paths + (list (search-path-specification + (variable "GUIX_GTK2_PATH") + (files '("lib/gtk-2.0"))))) (synopsis "Cross-platform toolkit for creating graphical user interfaces") (description "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating diff --git a/gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch b/gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch new file mode 100644 index 0000000000..93a8ddc242 --- /dev/null +++ b/gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch @@ -0,0 +1,46 @@ +This patch makes GTK+ look for additional modules in a list of directories +specified by the environment variable "GUIX_GTK2_PATH". This can be used +instead of "GTK_PATH" to make GTK+ find modules that are incompatible with +other major versions of GTK+. + +--- a/gtk/gtkmodules.c 2014-09-29 22:02:17.000000000 +0200 ++++ b/gtk/gtkmodules.c 2015-12-02 18:41:53.306396938 +0100 +@@ -55,6 +55,7 @@ + get_module_path (void) + { + const gchar *module_path_env; ++ const gchar *module_guix_gtk2_path_env; + const gchar *exe_prefix; + const gchar *home_dir; + gchar *home_gtk_dir = NULL; +@@ -70,6 +71,7 @@ + home_gtk_dir = g_build_filename (home_dir, ".gtk-2.0", NULL); + + module_path_env = g_getenv ("GTK_PATH"); ++ module_guix_gtk2_path_env = g_getenv ("GUIX_GTK2_PATH"); + exe_prefix = g_getenv ("GTK_EXE_PREFIX"); + + if (exe_prefix) +@@ -77,9 +79,21 @@ + else + default_dir = g_build_filename (GTK_LIBDIR, "gtk-2.0", NULL); + +- if (module_path_env && home_gtk_dir) ++ if (module_guix_gtk2_path_env && module_path_env && home_gtk_dir) ++ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, ++ module_guix_gtk2_path_env, module_path_env, home_gtk_dir, default_dir, NULL); ++ else if (module_guix_gtk2_path_env && home_gtk_dir) ++ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, ++ module_guix_gtk2_path_env, home_gtk_dir, default_dir, NULL); ++ else if (module_guix_gtk2_path_env && module_path_env) ++ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, ++ module_guix_gtk2_path_env, module_path_env, default_dir, NULL); ++ else if (module_path_env && home_gtk_dir) + module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, + module_path_env, home_gtk_dir, default_dir, NULL); ++ else if (module_guix_gtk2_path_env) ++ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, ++ module_guix_gtk2_path_env, default_dir, NULL); + else if (module_path_env) + module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, + module_path_env, default_dir, NULL); -- cgit v1.2.3 From 4828ff91ffa937fa6cb1618fcab550c137e60f15 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 3 Dec 2015 08:32:06 +0100 Subject: gnu: gtk+: Add patch to support GUIX_GTK3_PATH. * gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH: New file. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/gtk.scm (gtk+) [source]: Add patch. [native-search-paths]: Add search path for GUIX_GTK3_PATH. --- gnu-system.am | 1 + gnu/packages/gtk.scm | 9 +++-- .../patches/gtk3-respect-GUIX_GTK3_PATH.patch | 38 ++++++++++++++++++++++ 3 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch (limited to 'gnu-system.am') diff --git a/gnu-system.am b/gnu-system.am index 2c62cc5911..4788bc7ba9 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -507,6 +507,7 @@ dist_patch_DATA = \ gnu/packages/patches/guile-relocatable.patch \ gnu/packages/patches/guile-rsvg-pkgconfig.patch \ gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch \ + gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch \ gnu/packages/patches/gtkglext-disable-disable-deprecated.patch \ gnu/packages/patches/hop-bigloo-4.0b.patch \ gnu/packages/patches/hop-linker-flags.patch \ diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index d2257825e8..916873b356 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -583,7 +583,8 @@ (define-public gtk+ name "-" version ".tar.xz")) (sha256 (base32 - "0lp1hn0qydxx03bianzzr0a4maqzsvylrkzr7c3p0050qihwbgjx")))) + "0lp1hn0qydxx03bianzzr0a4maqzsvylrkzr7c3p0050qihwbgjx")) + (patches (list (search-patch "gtk3-respect-GUIX_GTK3_PATH.patch"))))) (propagated-inputs `(("at-spi2-atk" ,at-spi2-atk) ("atk" ,atk) @@ -642,7 +643,11 @@ (define-public gtk+ (loaders.cache (find-files librsvg "^loaders\\.cache$"))) (wrap-program prog `("GDK_PIXBUF_MODULE_FILE" = ,loaders.cache)))) - %standard-phases)))))) + %standard-phases)))) + (native-search-paths + (list (search-path-specification + (variable "GUIX_GTK3_PATH") + (files '("lib/gtk-3.0"))))))) ;;; ;;; Guile bindings. diff --git a/gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch b/gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch new file mode 100644 index 0000000000..66fd2fd1c4 --- /dev/null +++ b/gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch @@ -0,0 +1,38 @@ +This patch makes GTK+ look for additional modules in a list of directories +specified by the environment variable "GUIX_GTK3_PATH". This can be used +instead of "GTK_PATH" to make GTK+ find modules that are incompatible with +other major versions of GTK+. + +--- a/gtk/gtkmodules.c 2015-09-20 20:09:05.060590217 +0200 ++++ b/gtk/gtkmodules.c 2015-09-20 20:10:33.423124833 +0200 +@@ -52,6 +52,7 @@ + get_module_path (void) + { + const gchar *module_path_env; ++ const gchar *module_guix_gtk3_path_env; + const gchar *exe_prefix; + gchar *module_path; + gchar *default_dir; +@@ -61,6 +62,7 @@ + return result; + + module_path_env = g_getenv ("GTK_PATH"); ++ module_guix_gtk3_path_env = g_getenv ("GUIX_GTK3_PATH"); + exe_prefix = g_getenv ("GTK_EXE_PREFIX"); + + if (exe_prefix) +@@ -68,7 +70,13 @@ + else + default_dir = g_build_filename (_gtk_get_libdir (), "gtk-3.0", NULL); + +- if (module_path_env) ++ if (module_guix_gtk3_path_env && module_path_env) ++ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, ++ module_guix_gtk3_path_env, module_path_env, default_dir, NULL); ++ else if (module_guix_gtk3_path_env) ++ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, ++ module_guix_gtk3_path_env, default_dir, NULL); ++ else if (module_path_env) + module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, + module_path_env, default_dir, NULL); + else -- cgit v1.2.3 From a7ec569c98af8a1c310a32e19f0c01cdd7334af6 Mon Sep 17 00:00:00 2001 From: Roel Janssen Date: Tue, 5 Jan 2016 15:43:50 +0100 Subject: gnu: Add LDC. * gnu/packages/ldc.scm: New file. * gnu/packages/patches/ldc-disable-tests.patch: New file. * gnu-system.am (GNU_SYSTEM_MODULES): Add ldc.scm. (dist_patch_DATA): Add patch file. --- gnu-system.am | 2 + gnu/packages/ldc.scm | 118 +++++++++++++++++++++++++++ gnu/packages/patches/ldc-disable-tests.patch | 90 ++++++++++++++++++++ 3 files changed, 210 insertions(+) create mode 100644 gnu/packages/ldc.scm create mode 100644 gnu/packages/patches/ldc-disable-tests.patch (limited to 'gnu-system.am') diff --git a/gnu-system.am b/gnu-system.am index 4788bc7ba9..3dd49fe945 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -174,6 +174,7 @@ GNU_SYSTEM_MODULES = \ gnu/packages/key-mon.scm \ gnu/packages/kodi.scm \ gnu/packages/language.scm \ + gnu/packages/ldc.scm \ gnu/packages/less.scm \ gnu/packages/lesstif.scm \ gnu/packages/libcanberra.scm \ @@ -522,6 +523,7 @@ dist_patch_DATA = \ gnu/packages/patches/jasper-CVE-2008-3522.patch \ gnu/packages/patches/jbig2dec-ignore-testtest.patch \ gnu/packages/patches/kmod-module-directory.patch \ + gnu/packages/patches/ldc-disable-tests.patch \ gnu/packages/patches/lftp-dont-save-unknown-host-fingerprint.patch \ gnu/packages/patches/liba52-enable-pic.patch \ gnu/packages/patches/liba52-link-with-libm.patch \ diff --git a/gnu/packages/ldc.scm b/gnu/packages/ldc.scm new file mode 100644 index 0000000000..06040a2b92 --- /dev/null +++ b/gnu/packages/ldc.scm @@ -0,0 +1,118 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 Roel Janssen +;;; Copyright © 2015 Pjotr Prins +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages ldc) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system cmake) + #:use-module (gnu packages) + #:use-module (gnu packages base) + #:use-module (gnu packages libedit) + #:use-module (gnu packages llvm) + #:use-module (gnu packages textutils) + #:use-module (gnu packages zip)) + +(define-public ldc + (package + (name "ldc") + (version "0.16.1") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/ldc-developers/ldc/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1jvilxx0rpqmkbja4m69fhd5g09697xq7vyqp2hz4hvxmmmv4j40")))) + (build-system cmake-build-system) + ;; LDC currently only supports the x86_64 and i686 architectures. + (supported-systems '("x86_64-linux" "i686-linux")) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'unpack-submodule-sources + (lambda* (#:key inputs #:allow-other-keys) + (let ((unpack (lambda (source target) + (with-directory-excursion target + (zero? (system* "tar" "xvf" + (assoc-ref inputs source) + "--strip-components=1")))))) + (and (unpack "phobos-src" "runtime/phobos") + (unpack "druntime-src" "runtime/druntime") + (unpack "dmd-testsuite-src" "tests/d2/dmd-testsuite"))))) + (add-after 'unpack-submodule-sources 'patch-phobos + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "runtime/phobos/std/process.d" + (("/bin/sh") (which "sh")) + (("echo") (which "echo"))) + (substitute* "runtime/phobos/std/datetime.d" + (("/usr/share/zoneinfo/") + (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo"))) + (substitute* "tests/d2/dmd-testsuite/Makefile" + (("/bin/bash") (which "bash"))) + #t))))) + (inputs + `(("libconfig" ,libconfig) + ("libedit" ,libedit) + ("tzdata" ,tzdata))) + (native-inputs + `(("llvm" ,llvm) + ("clang" ,clang) + ("unzip" ,unzip) + ("phobos-src" + ,(origin + (method url-fetch) + (uri (string-append + "https://github.com/ldc-developers/phobos/archive/ldc-v" + version ".tar.gz")) + (sha256 + (base32 + "0sgdj0536c4nb118yiw1f8lqy5d3g3lpg9l99l165lk9xy45l9z4")) + (patches (list (search-patch "ldc-disable-tests.patch"))))) + ("druntime-src" + ,(origin + (method url-fetch) + (uri (string-append + "https://github.com/ldc-developers/druntime/archive/ldc-v" + version ".tar.gz")) + (sha256 + (base32 + "0z4mkyddx6c4sy1vqgqvavz55083dsxws681qkh93jh1rpby9yg6")))) + ("dmd-testsuite-src" + ,(origin + (method url-fetch) + (uri (string-append + "https://github.com/ldc-developers/dmd-testsuite/archive/ldc-v" + version ".tar.gz")) + (sha256 + (base32 + "0yc6miidzgl9k33ygk7xcppmfd6kivqj02cvv4fmkbs3qz4yy3z1")))))) + (home-page "http://wiki.dlang.org/LDC") + (synopsis "LLVM compiler for the D programming language") + (description + "LDC is a compiler for the D programming language. It is based on the +latest DMD frontend and uses LLVM as backend.") + ;; Most of the code is released under BSD-3, except for code originally + ;; written for GDC, which is released under GPLv2+, and the DMD frontend, + ;; which is released under the "Boost Software License version 1.0". + (license (list license:bsd-3 + license:gpl2+ + license:x11-style "http://www.boost.org/LICENSE_1_0.txt")))) diff --git a/gnu/packages/patches/ldc-disable-tests.patch b/gnu/packages/patches/ldc-disable-tests.patch new file mode 100644 index 0000000000..3f5e6c29a1 --- /dev/null +++ b/gnu/packages/patches/ldc-disable-tests.patch @@ -0,0 +1,90 @@ +This patch fixes a failing unit test by feeding buildNormalizedPath to the +tzdata properly. Three other tests are disabled, one assumes /root and the +two others use networking. Not bad out of almost 700 tests! + +by Pjotr Prins + +diff --git a/std/datetime.d b/std/datetime.d +index 8e4ed3b..6c15bc5 100644 +--- a/std/datetime.d ++++ b/std/datetime.d +@@ -28018,6 +28018,7 @@ public: + The default directory where the TZ Database files are. It's empty + for Windows, since Windows doesn't have them. + +/ ++ + enum defaultTZDatabaseDir = "/usr/share/zoneinfo/"; + } + else version(Windows) +@@ -28069,14 +28070,13 @@ assert(tz.dstName == "PDT"); + import std.range : retro; + import std.format : format; + +- name = strip(name); +- + enforce(tzDatabaseDir.exists(), new DateTimeException(format("Directory %s does not exist.", tzDatabaseDir))); + enforce(tzDatabaseDir.isDir, new DateTimeException(format("%s is not a directory.", tzDatabaseDir))); + +- immutable file = buildNormalizedPath(tzDatabaseDir, name); ++ auto filename = "./" ~ strip(name); // make sure the prefix is not stripped ++ immutable file = buildNormalizedPath(tzDatabaseDir, filename); + +- enforce(file.exists(), new DateTimeException(format("File %s does not exist.", file))); ++ enforce(file.exists(), new DateTimeException(format("File %s does not exist in %s.", file, tzDatabaseDir))); + enforce(file.isFile, new DateTimeException(format("%s is not a file.", file))); + + auto tzFile = File(file); +diff --git a/std/path.d b/std/path.d +index 254d8f0..b0fc04d 100644 +--- a/std/path.d ++++ b/std/path.d +@@ -3080,8 +3080,11 @@ unittest + } + else + { ++ pragma(msg, "test disabled on GNU Guix"); ++/* + assert(expandTilde("~root") == "/root", expandTilde("~root")); + assert(expandTilde("~root/") == "/root/", expandTilde("~root/")); ++*/ + } + assert(expandTilde("~Idontexist/hey") == "~Idontexist/hey"); + } +diff --git a/std/socket.d b/std/socket.d +index b85d1c9..7fbf346 100644 +--- a/std/socket.d ++++ b/std/socket.d +@@ -517,6 +517,8 @@ class Protocol + + unittest + { ++ pragma(msg, "test disabled on GNU Guix"); ++/* + // getprotobyname,number are unimplemented on Android + softUnittest({ + Protocol proto = new Protocol; +@@ -530,6 +532,7 @@ unittest + assert(proto.name == "tcp"); + assert(proto.aliases.length == 1 && proto.aliases[0] == "TCP"); + }); ++*/ + } + + +@@ -859,6 +862,8 @@ class InternetHost + + unittest + { ++ pragma(msg, "test disabled on GNU Guix"); ++ /* + InternetHost ih = new InternetHost; + + ih.getHostByAddr(0x7F_00_00_01); +@@ -889,6 +894,7 @@ unittest + // writefln("aliases[%d] = %s", i, s); + // } + }); ++ */ + } + + -- cgit v1.2.3 From e6352001c444a82141ea4457e49e69a1c3f8b2bb Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Wed, 6 Jan 2016 10:43:18 -0500 Subject: gnu: w3m: Update patch to use '-p1'. * gnu/packages/patches/w3m-fix-compile.patch: Rename this file... * gnu/packages/patches/w3m-libgc.patch: ...to this, and adjust patch prefix level to '-p1'. * gnu-system.am (dist_patch_DATA): Update patch name. * gnu/packages/w3m.scm (w3m)[source]: Update patch name. [source]: Drop patch flag -p0. --- gnu-system.am | 2 +- gnu/packages/patches/w3m-fix-compile.patch | 15 --------------- gnu/packages/patches/w3m-libgc.patch | 28 ++++++++++++++++++++++++++++ gnu/packages/w3m.scm | 4 ++-- 4 files changed, 31 insertions(+), 18 deletions(-) delete mode 100644 gnu/packages/patches/w3m-fix-compile.patch create mode 100644 gnu/packages/patches/w3m-libgc.patch (limited to 'gnu-system.am') diff --git a/gnu-system.am b/gnu-system.am index 3dd49fe945..bed041a946 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -698,7 +698,7 @@ dist_patch_DATA = \ gnu/packages/patches/valgrind-enable-arm.patch \ gnu/packages/patches/vpnc-script.patch \ gnu/packages/patches/vtk-mesa-10.patch \ - gnu/packages/patches/w3m-fix-compile.patch \ + gnu/packages/patches/w3m-libgc.patch \ gnu/packages/patches/webkitgtk-2.4-sql-init-string.patch \ gnu/packages/patches/weechat-python.patch \ gnu/packages/patches/weex-vacopy.patch \ diff --git a/gnu/packages/patches/w3m-fix-compile.patch b/gnu/packages/patches/w3m-fix-compile.patch deleted file mode 100644 index 5604052f67..0000000000 --- a/gnu/packages/patches/w3m-fix-compile.patch +++ /dev/null @@ -1,15 +0,0 @@ -https://bugs.archlinux.org/task/33397 - -diff -aur old/main.c new/main.c ---- main.c 2013-01-14 18:16:14.216210053 -0600 -+++ main.c 2013-01-14 18:17:28.816220559 -0600 -@@ -833,7 +833,8 @@ - mySignal(SIGPIPE, SigPipe); - #endif - -- orig_GC_warn_proc = GC_set_warn_proc(wrap_GC_warn_proc); -+ orig_GC_warn_proc = GC_get_warn_proc(); -+ GC_set_warn_proc(wrap_GC_warn_proc); - err_msg = Strnew(); - if (load_argc == 0) { - /* no URL specified */ diff --git a/gnu/packages/patches/w3m-libgc.patch b/gnu/packages/patches/w3m-libgc.patch new file mode 100644 index 0000000000..0dc6a4027c --- /dev/null +++ b/gnu/packages/patches/w3m-libgc.patch @@ -0,0 +1,28 @@ +This patch fixes w3m compilation with libgc > 7.2. + +Reported: +https://bugs.archlinux.org/task/33397 + +Patch with explanation: +http://anonscm.debian.org/cgit/collab-maint/w3m.git/commit/?id=770eec8304bdbe458 +--- + main.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/main.c b/main.c +index b421943..249eb1a 100644 +--- a/main.c ++++ b/main.c +@@ -833,7 +833,8 @@ main(int argc, char **argv, char **envp) + mySignal(SIGPIPE, SigPipe); + #endif + +- orig_GC_warn_proc = GC_set_warn_proc(wrap_GC_warn_proc); ++ orig_GC_warn_proc = GC_get_warn_proc(); ++ GC_set_warn_proc(wrap_GC_warn_proc); + err_msg = Strnew(); + if (load_argc == 0) { + /* no URL specified */ +-- +2.6.4 + diff --git a/gnu/packages/w3m.scm b/gnu/packages/w3m.scm index d114d0a69e..113bfc484c 100644 --- a/gnu/packages/w3m.scm +++ b/gnu/packages/w3m.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013 Nikita Karetnikov +;;; Copyright © 2016 Leo Famulari ;;; ;;; This file is part of GNU Guix. ;;; @@ -43,8 +44,7 @@ (define-public w3m "1qx9f0kprf92r1wxl3sacykla0g04qsi0idypzz24b7xy9ix5579")) ;; cf. https://bugs.archlinux.org/task/33397 - (patches (list (search-patch "w3m-fix-compile.patch"))) - (patch-flags '("-p0")))) + (patches (list (search-patch "w3m-libgc.patch"))))) (build-system gnu-build-system) (arguments `(#:tests? #f ; no check target #:phases (alist-cons-before -- cgit v1.2.3 From 62339e2d493bf87a3aabe12e45458581e9705d83 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Tue, 5 Jan 2016 19:26:25 -0500 Subject: gnu: w3m: Enable SSL, disable broken protocols and ciphers. Fixes . * gnu/packages/patches/w3m-force-ssl_verify_server-on.patch: New file. * gnu/packages/patches/w3m-disable-sslv2-and-sslv3.patch: New file. * gnu/packages/patches/w3m-disable-weak-ciphers.patch: New file. * gnu/packages/w3m.scm (w3m)[source]: Add patches. * gnu-system.am (dist_patch_DATA): Add the new files. --- gnu-system.am | 3 +++ .../patches/w3m-disable-sslv2-and-sslv3.patch | 24 ++++++++++++++++++++++ .../patches/w3m-disable-weak-ciphers.patch | 24 ++++++++++++++++++++++ .../patches/w3m-force-ssl_verify_server-on.patch | 24 ++++++++++++++++++++++ gnu/packages/w3m.scm | 5 ++++- 5 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/w3m-disable-sslv2-and-sslv3.patch create mode 100644 gnu/packages/patches/w3m-disable-weak-ciphers.patch create mode 100644 gnu/packages/patches/w3m-force-ssl_verify_server-on.patch (limited to 'gnu-system.am') diff --git a/gnu-system.am b/gnu-system.am index bed041a946..7c4112a7e6 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -699,6 +699,9 @@ dist_patch_DATA = \ gnu/packages/patches/vpnc-script.patch \ gnu/packages/patches/vtk-mesa-10.patch \ gnu/packages/patches/w3m-libgc.patch \ + gnu/packages/patches/w3m-force-ssl_verify_server-on.patch \ + gnu/packages/patches/w3m-disable-sslv2-and-sslv3.patch \ + gnu/packages/patches/w3m-disable-weak-ciphers.patch \ gnu/packages/patches/webkitgtk-2.4-sql-init-string.patch \ gnu/packages/patches/weechat-python.patch \ gnu/packages/patches/weex-vacopy.patch \ diff --git a/gnu/packages/patches/w3m-disable-sslv2-and-sslv3.patch b/gnu/packages/patches/w3m-disable-sslv2-and-sslv3.patch new file mode 100644 index 0000000000..5b78f2d909 --- /dev/null +++ b/gnu/packages/patches/w3m-disable-sslv2-and-sslv3.patch @@ -0,0 +1,24 @@ +Subject: Disable SSLv2 and SSLv3. + +The only remaining methods are TLSv1.* (the code never distinguishes +between TLSv1.0, TLSv1.1, and TLSv1.2). +--- + fm.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fm.h b/fm.h +index 320906c..ddcd4fc 100644 +--- a/fm.h ++++ b/fm.h +@@ -1144,7 +1144,7 @@ global int ssl_path_modified init(FALSE); + #endif /* defined(USE_SSL) && + * defined(USE_SSL_VERIFY) */ + #ifdef USE_SSL +-global char *ssl_forbid_method init(NULL); ++global char *ssl_forbid_method init("2, 3"); + #endif + + global int is_redisplay init(FALSE); +-- +2.6.4 + diff --git a/gnu/packages/patches/w3m-disable-weak-ciphers.patch b/gnu/packages/patches/w3m-disable-weak-ciphers.patch new file mode 100644 index 0000000000..4780d54cb6 --- /dev/null +++ b/gnu/packages/patches/w3m-disable-weak-ciphers.patch @@ -0,0 +1,24 @@ +Subject: Disable weak ciphers + +Disable RC4, "export ciphers", and all keys < 128 bits. + +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/w3m/+bug/1325674 +--- + url.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/url.c b/url.c +index ed6062e..e86b1f3 100644 +--- a/url.c ++++ b/url.c +@@ -326,6 +326,7 @@ openSSLHandle(int sock, char *hostname, char **p_cert) + SSL_load_error_strings(); + if (!(ssl_ctx = SSL_CTX_new(SSLv23_client_method()))) + goto eend; ++ SSL_CTX_set_cipher_list(ssl_ctx, "DEFAULT:!LOW:!RC4:!EXP"); + option = SSL_OP_ALL; + if (ssl_forbid_method) { + if (strchr(ssl_forbid_method, '2')) +-- +2.6.4 + diff --git a/gnu/packages/patches/w3m-force-ssl_verify_server-on.patch b/gnu/packages/patches/w3m-force-ssl_verify_server-on.patch new file mode 100644 index 0000000000..dc9f117f9d --- /dev/null +++ b/gnu/packages/patches/w3m-force-ssl_verify_server-on.patch @@ -0,0 +1,24 @@ +Subject: Force ssl_verify_server on. + +By default, SSL/TLS certificates are not verified. This enables the +verification. +--- + fm.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fm.h b/fm.h +index 8378939..320906c 100644 +--- a/fm.h ++++ b/fm.h +@@ -1135,7 +1135,7 @@ global int view_unseenobject init(TRUE); + #endif + + #if defined(USE_SSL) && defined(USE_SSL_VERIFY) +-global int ssl_verify_server init(FALSE); ++global int ssl_verify_server init(TRUE); + global char *ssl_cert_file init(NULL); + global char *ssl_key_file init(NULL); + global char *ssl_ca_path init(NULL); +-- +2.6.4 + diff --git a/gnu/packages/w3m.scm b/gnu/packages/w3m.scm index 113bfc484c..45c9375def 100644 --- a/gnu/packages/w3m.scm +++ b/gnu/packages/w3m.scm @@ -44,7 +44,10 @@ (define-public w3m "1qx9f0kprf92r1wxl3sacykla0g04qsi0idypzz24b7xy9ix5579")) ;; cf. https://bugs.archlinux.org/task/33397 - (patches (list (search-patch "w3m-libgc.patch"))))) + (patches (list (search-patch "w3m-libgc.patch") + (search-patch "w3m-force-ssl_verify_server-on.patch") + (search-patch "w3m-disable-sslv2-and-sslv3.patch") + (search-patch "w3m-disable-weak-ciphers.patch"))))) (build-system gnu-build-system) (arguments `(#:tests? #f ; no check target #:phases (alist-cons-before -- cgit v1.2.3 From 9b9b7ffd8e1446574781bd02542bb171b0705248 Mon Sep 17 00:00:00 2001 From: Ben Woodcroft Date: Mon, 11 Jan 2016 00:34:11 +1000 Subject: gnu: bedtools: Update to 2.25.0. * gnu/packages/bioinformatics.scm (bedtools): Update to 0.25.0. [source]: Remove patch merged upstream. [arguments]: Use 'modify-phases'. Remove 'patch-makefile-SHELL-definition' phase. * gnu/packages/patches/bedtools-32bit-compilation.patch: Remove file. * gnu-system.am (dist_patch_DATA): Remove it. --- gnu-system.am | 1 - gnu/packages/bioinformatics.scm | 17 +- .../patches/bedtools-32bit-compilation.patch | 171 --------------------- 3 files changed, 3 insertions(+), 186 deletions(-) delete mode 100644 gnu/packages/patches/bedtools-32bit-compilation.patch (limited to 'gnu-system.am') diff --git a/gnu-system.am b/gnu-system.am index 7c4112a7e6..7105e13219 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -416,7 +416,6 @@ dist_patch_DATA = \ gnu/packages/patches/avidemux-install-to-lib.patch \ gnu/packages/patches/avrdude-fix-libusb.patch \ gnu/packages/patches/bash-completion-directories.patch \ - gnu/packages/patches/bedtools-32bit-compilation.patch \ gnu/packages/patches/bowtie-fix-makefile.patch \ gnu/packages/patches/bigloo-gc-shebangs.patch \ gnu/packages/patches/binutils-ld-new-dtags.patch \ diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index df0e23da89..55b7cb1c86 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014, 2015 Ricardo Wurmus -;;; Copyright © 2015 Ben Woodcroft +;;; Copyright © 2015, 2016 Ben Woodcroft ;;; Copyright © 2015 Pjotr Prins ;;; Copyright © 2015 Andreas Enge ;;; @@ -207,7 +207,7 @@ (define-public bedops (define-public bedtools (package (name "bedtools") - (version "2.24.0") + (version "2.25.0") (source (origin (method url-fetch) (uri (string-append "https://github.com/arq5x/bedtools2/archive/v" @@ -215,8 +215,7 @@ (define-public bedtools (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0lnxrjvs3nnmb4bmskag1wg3h2hd80przz5q3xd0bvs7vyxrvpbl")) - (patches (list (search-patch "bedtools-32bit-compilation.patch"))))) + "1ywcy3yfwzhl905b51l0ffjia55h75vv3mw5xkvib04pp6pj548m")))) (build-system gnu-build-system) (native-inputs `(("python" ,python-2))) (inputs `(("samtools" ,samtools) @@ -225,16 +224,6 @@ (define-public bedtools '(#:test-target "test" #:phases (modify-phases %standard-phases - (add-after 'unpack 'patch-makefile-SHELL-definition - (lambda _ - ;; patch-makefile-SHELL cannot be used here as it does not - ;; yet patch definitions with `:='. Since changes to - ;; patch-makefile-SHELL result in a full rebuild, features - ;; of patch-makefile-SHELL are reimplemented here. - (substitute* "Makefile" - (("^SHELL := .*$") - (string-append "SHELL := " (which "bash") " -e \n"))) - #t)) (delete 'configure) (replace 'install (lambda* (#:key outputs #:allow-other-keys) diff --git a/gnu/packages/patches/bedtools-32bit-compilation.patch b/gnu/packages/patches/bedtools-32bit-compilation.patch deleted file mode 100644 index bc567f3f6b..0000000000 --- a/gnu/packages/patches/bedtools-32bit-compilation.patch +++ /dev/null @@ -1,171 +0,0 @@ -Fixed in upstream, see -https://github.com/arq5x/bedtools2/issues/271 - -From b47dbefcb57f8e6c4fe397f64346338620740b71 Mon Sep 17 00:00:00 2001 -From: arq5x -Date: Wed, 15 Jul 2015 15:15:23 -0600 -Subject: [PATCH] settle on uint32_t signature for QuickString. Resolves #267 - and #271? - ---- - src/coverageFile/coverageFile.cpp | 24 ++++++++++++------------ - src/utils/general/QuickString.cpp | 27 ++++++++++++++------------- - src/utils/general/QuickString.h | 6 +++--- - 3 files changed, 29 insertions(+), 28 deletions(-) - -diff --git a/src/coverageFile/coverageFile.cpp b/src/coverageFile/coverageFile.cpp -index 859cfdc..0fb544b 100644 ---- a/src/coverageFile/coverageFile.cpp -+++ b/src/coverageFile/coverageFile.cpp -@@ -83,11 +83,11 @@ void CoverageFile::giveFinalReport(RecordOutputMgr *outputMgr) { - float depthPct = (float)basesAtDepth / (float)_totalQueryLen; - - _finalOutput = "all\t"; -- _finalOutput.append(depth); -+ _finalOutput.append(static_cast(depth)); - _finalOutput.append("\t"); -- _finalOutput.append(basesAtDepth); -+ _finalOutput.append(static_cast(basesAtDepth)); - _finalOutput.append("\t"); -- _finalOutput.append(_totalQueryLen); -+ _finalOutput.append(static_cast(_totalQueryLen)); - _finalOutput.append("\t"); - format(depthPct); - -@@ -138,7 +138,7 @@ size_t CoverageFile::countBasesAtDepth(size_t depth) { - - void CoverageFile::doCounts(RecordOutputMgr *outputMgr, RecordKeyVector &hits) - { -- _finalOutput = hits.size(); -+ _finalOutput = static_cast(hits.size()); - outputMgr->printRecord(hits.getKey(), _finalOutput); - } - -@@ -147,9 +147,9 @@ void CoverageFile::doPerBase(RecordOutputMgr *outputMgr, RecordKeyVector &hits) - //loop through all bases in query, printing full record and metrics for each - const Record * queryRec = hits.getKey(); - for (size_t i= 0; i < _queryLen; i++) { -- _finalOutput = i +1; -+ _finalOutput = static_cast(i+1); - _finalOutput.append("\t"); -- _finalOutput.append(_depthArray[i]); -+ _finalOutput.append(static_cast(_depthArray[i])); - - outputMgr->printRecord(queryRec, _finalOutput); - } -@@ -181,11 +181,11 @@ void CoverageFile::doHist(RecordOutputMgr *outputMgr, RecordKeyVector &hits) - size_t numBasesAtDepth = iter->second; - float coveredBases = (float)numBasesAtDepth / (float)_queryLen; - -- _finalOutput = depth; -+ _finalOutput = static_cast(depth); - _finalOutput.append("\t"); -- _finalOutput.append(numBasesAtDepth); -+ _finalOutput.append(static_cast(numBasesAtDepth)); - _finalOutput.append("\t"); -- _finalOutput.append(_queryLen); -+ _finalOutput.append(static_cast(_queryLen)); - _finalOutput.append("\t"); - format(coveredBases); - -@@ -199,11 +199,11 @@ void CoverageFile::doDefault(RecordOutputMgr *outputMgr, RecordKeyVector &hits) - size_t nonZeroBases = _queryLen - countBasesAtDepth(0); - float coveredBases = (float)nonZeroBases / (float)_queryLen; - -- _finalOutput = hits.size(); -+ _finalOutput = static_cast(hits.size()); - _finalOutput.append("\t"); -- _finalOutput.append(nonZeroBases); -+ _finalOutput.append(static_cast(nonZeroBases)); - _finalOutput.append("\t"); -- _finalOutput.append(_queryLen); -+ _finalOutput.append(static_cast(_queryLen)); - _finalOutput.append("\t"); - format(coveredBases); - -diff --git a/src/utils/general/QuickString.cpp b/src/utils/general/QuickString.cpp -index 0757009..a83263e 100644 ---- a/src/utils/general/QuickString.cpp -+++ b/src/utils/general/QuickString.cpp -@@ -105,11 +105,11 @@ QuickString &QuickString::operator = (uint32_t val) { - return *this; - } - --QuickString &QuickString::operator = (size_t val) { -- clear(); -- append(val); -- return *this; --} -+// QuickString &QuickString::operator = (size_t val) { -+// clear(); -+// append(val); -+// return *this; -+// } - - QuickString &QuickString::operator = (float val) { - clear(); -@@ -158,10 +158,11 @@ QuickString &QuickString::operator += (uint32_t num) { - return *this; - } - --QuickString &QuickString::operator += (size_t num) { -- append(num); -- return *this; --} -+// QuickString &QuickString::operator += (size_t num) { -+// append(num); -+// return *this; -+// } -+ - QuickString &QuickString::operator += (float num) { - append(num); - return *this; -@@ -273,12 +274,12 @@ void QuickString::append(int num) { - } - - void QuickString::append(uint32_t num) { -- int2str((int)num, *this, true); -+ int2str((int)num, *this, true); - } - --void QuickString::append(size_t num) { -- int2str((int)num, *this, true); --} -+// void QuickString::append(size_t num) { -+// int2str((int)num, *this, true); -+// } - - void QuickString::append(float num) { - append(ToString(num)); -diff --git a/src/utils/general/QuickString.h b/src/utils/general/QuickString.h -index b43fdfc..6e6fa94 100644 ---- a/src/utils/general/QuickString.h -+++ b/src/utils/general/QuickString.h -@@ -38,7 +38,7 @@ class QuickString { - QuickString &operator = (char); - QuickString &operator = (int); - QuickString &operator = (uint32_t); -- QuickString &operator = (size_t); -+ //QuickString &operator = (size_t); - QuickString &operator = (float); - QuickString &operator = (double); - QuickString &operator += (const QuickString &); -@@ -47,7 +47,7 @@ class QuickString { - QuickString &operator += (char); - QuickString &operator += (int); - QuickString &operator += (uint32_t); -- QuickString &operator += (size_t); -+ //QuickString &operator += (size_t); - QuickString &operator += (float); - QuickString &operator += (double); - -@@ -74,7 +74,7 @@ class QuickString { - //for better performance. - void append(int num); - void append(uint32_t num); -- void append(size_t num); -+ //void append(size_t num); - void append(float num); - void append(double num); - - -- cgit v1.2.3 From 16aa6491177c1f88ccc20597a9b649ce5eebea67 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Tue, 12 Jan 2016 11:21:51 -0500 Subject: gnu: sudo: Add fix for CVE-2015-5602. * gnu/packages/patches/sudo-CVE-2015-5602.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/admin.scm (sudo)[source]: Add patch. --- gnu-system.am | 1 + gnu/packages/admin.scm | 3 +- gnu/packages/patches/sudo-CVE-2015-5602.patch | 372 ++++++++++++++++++++++++++ 3 files changed, 375 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/sudo-CVE-2015-5602.patch (limited to 'gnu-system.am') diff --git a/gnu-system.am b/gnu-system.am index 7105e13219..45487a466a 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -663,6 +663,7 @@ dist_patch_DATA = \ gnu/packages/patches/slim-config.patch \ gnu/packages/patches/slim-sigusr1.patch \ gnu/packages/patches/soprano-find-clucene.patch \ + gnu/packages/patches/sudo-CVE-2015-5602.patch \ gnu/packages/patches/superlu-dist-scotchmetis.patch \ gnu/packages/patches/synfig-build-fix.patch \ gnu/packages/patches/tar-d_ino_in_dirent-fix.patch \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index fbdc26d9ee..4d6bc70f82 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -700,7 +700,8 @@ (define-public sudo version ".tar.gz"))) (sha256 (base32 - "0263gi6i19fyzzc488n0qw3m518i39f6a7qmrfvahk9j10bkh5j3")))) + "0263gi6i19fyzzc488n0qw3m518i39f6a7qmrfvahk9j10bkh5j3")) + (patches (list (search-patch "sudo-CVE-2015-5602.patch"))))) (build-system gnu-build-system) (arguments `(#:configure-flags diff --git a/gnu/packages/patches/sudo-CVE-2015-5602.patch b/gnu/packages/patches/sudo-CVE-2015-5602.patch new file mode 100644 index 0000000000..36c90fbee7 --- /dev/null +++ b/gnu/packages/patches/sudo-CVE-2015-5602.patch @@ -0,0 +1,372 @@ +Based on the patch from https://www.sudo.ws/repos/sudo/raw-rev/c2e36a80a279 +Backported to 1.8.15 by Mark H Weaver + +# HG changeset patch +# User Todd C. Miller +# Date 1452475889 25200 +# Node ID c2e36a80a27927c32cba55afae78b8dc830cddc3 +# Parent 94ffd6b18431fa4b9ed0a0c3f0b7b9582a4f6bde +Rewritten sudoedit_checkdir support that checks all the dirs in the +path and refuses to follow symlinks in writable directories. +This is a better fix for CVE-2015-5602. +Adapted from a diff by Ben Hutchings. Bug #707 + +diff -r 94ffd6b18431 -r c2e36a80a279 doc/CONTRIBUTORS +--- a/doc/CONTRIBUTORS Mon Jan 04 10:47:11 2016 -0700 ++++ b/doc/CONTRIBUTORS Sun Jan 10 18:31:29 2016 -0700 +@@ -58,6 +58,7 @@ + Holloway, Nick + Hoover, Adam + Hunter, Michael T. ++ Hutchings, Ben + Irrgang, Eric + Jackson, Brian + Jackson, John R. +diff -r 94ffd6b18431 -r c2e36a80a279 doc/UPGRADE +--- a/doc/UPGRADE Mon Jan 04 10:47:11 2016 -0700 ++++ b/doc/UPGRADE Sun Jan 10 18:31:29 2016 -0700 +@@ -1,6 +1,15 @@ + Notes on upgrading from an older release + ======================================== + ++o Upgrading from a version prior to the post-1.8.15 fix for CVE-2015-5602. ++ ++ The meaning of the sudoedit_checkdir sudoers option has changed. ++ Previously, it would only check the parent directory ++ of the file to be edited. After the CVE fix, all directories ++ in the path to be edited are checked and sudoedit will refuse ++ to follow a symbolic link in a directory that is writable by ++ the invoking user. ++ + o Upgrading from a version prior to 1.8.15: + + Prior to version 1.8.15, when env_reset was enabled (the default) +diff -r 94ffd6b18431 -r c2e36a80a279 doc/sudoers.cat +--- a/doc/sudoers.cat Mon Jan 04 10:47:11 2016 -0700 ++++ b/doc/sudoers.cat Sun Jan 10 18:31:29 2016 -0700 +@@ -1275,12 +1275,15 @@ + system call. This flag is _o_f_f by default. + + sudoedit_checkdir +- If set, ssuuddooeeddiitt will refuse to edit files located in a +- directory that is writable by the invoking user unless +- it is run by root. On many systems, this option +- requires that the parent directory of the file to be +- edited be readable by the target user. This flag is +- _o_f_f by default. ++ If set, ssuuddooeeddiitt will check directories in the path to ++ be edited for writability by the invoking user. ++ Symbolic links will not be followed in writable ++ directories and ssuuddooeeddiitt will also refuse to edit a ++ file located in a writable directory. Theses ++ restrictions are not enforced when ssuuddooeeddiitt is invoked ++ as root. On many systems, this option requires that ++ all directories in the path to be edited be readable by ++ the target user. This flag is _o_f_f by default. + + sudoedit_follow By default, ssuuddooeeddiitt will not follow symbolic links + when opening files. The _s_u_d_o_e_d_i_t___f_o_l_l_o_w option can be +diff -r 94ffd6b18431 -r c2e36a80a279 doc/sudoers.man.in +--- a/doc/sudoers.man.in Mon Jan 04 10:47:11 2016 -0700 ++++ b/doc/sudoers.man.in Sun Jan 10 18:31:29 2016 -0700 +@@ -2715,10 +2715,16 @@ + .br + If set, + \fBsudoedit\fR +-will refuse to edit files located in a directory that is writable +-by the invoking user unless it is run by root. +-On many systems, this option requires that the parent directory +-of the file to be edited be readable by the target user. ++will check directories in the path to be edited for writability ++by the invoking user. ++Symbolic links will not be followed in writable directories and ++\fBsudoedit\fR ++will also refuse to edit a file located in a writable directory. ++Theses restrictions are not enforced when ++\fBsudoedit\fR ++is invoked as root. ++On many systems, this option requires that all directories ++in the path to be edited be readable by the target user. + This flag is + \fIoff\fR + by default. +diff -r 94ffd6b18431 -r c2e36a80a279 doc/sudoers.mdoc.in +--- a/doc/sudoers.mdoc.in Mon Jan 04 10:47:11 2016 -0700 ++++ b/doc/sudoers.mdoc.in Sun Jan 10 18:31:29 2016 -0700 +@@ -2549,10 +2549,16 @@ + .It sudoedit_checkdir + If set, + .Nm sudoedit +-will refuse to edit files located in a directory that is writable +-by the invoking user unless it is run by root. +-On many systems, this option requires that the parent directory +-of the file to be edited be readable by the target user. ++will check directories in the path to be edited for writability ++by the invoking user. ++Symbolic links will not be followed in writable directories and ++.Nm sudoedit ++will also refuse to edit a file located in a writable directory. ++Theses restrictions are not enforced when ++.Nm sudoedit ++is invoked as root. ++On many systems, this option requires that all directories ++in the path to be edited be readable by the target user. + This flag is + .Em off + by default. +diff -r 94ffd6b18431 -r c2e36a80a279 include/sudo_compat.h +--- a/include/sudo_compat.h Mon Jan 04 10:47:11 2016 -0700 ++++ b/include/sudo_compat.h Sun Jan 10 18:31:29 2016 -0700 +@@ -182,6 +182,8 @@ + # ifndef UTIME_NOW + # define UTIME_NOW -2L + # endif ++#endif ++#if !defined(HAVE_OPENAT) || (!defined(HAVE_FUTIMENS) && !defined(HAVE_UTIMENSAT)) + # ifndef AT_FDCWD + # define AT_FDCWD -100 + # endif +diff -r 94ffd6b18431 -r c2e36a80a279 src/sudo_edit.c +--- a/src/sudo_edit.c Mon Jan 04 10:47:11 2016 -0700 ++++ b/src/sudo_edit.c Sun Jan 10 18:31:29 2016 -0700 +@@ -179,13 +179,15 @@ + } + + #ifndef HAVE_OPENAT +-/* This does not support AT_FDCWD... */ + static int + sudo_openat(int dfd, const char *path, int flags, mode_t mode) + { + int fd, odfd; + debug_decl(sudo_openat, SUDO_DEBUG_EDIT) + ++ if (dfd == AT_FDCWD) ++ debug_return_int(open(path, flags, mode)); ++ + /* Save cwd */ + if ((odfd = open(".", O_RDONLY)) == -1) + debug_return_int(-1); +@@ -207,6 +209,64 @@ + #define openat sudo_openat + #endif /* HAVE_OPENAT */ + ++#ifdef O_NOFOLLOW ++static int ++sudo_edit_openat_nofollow(int dfd, char *path, int oflags, mode_t mode) ++{ ++ debug_decl(sudo_edit_open_nofollow, SUDO_DEBUG_EDIT) ++ ++ debug_return_int(openat(dfd, path, oflags|O_NOFOLLOW, mode)); ++} ++#else ++/* ++ * Returns true if fd and path don't match or path is a symlink. ++ * Used on older systems without O_NOFOLLOW. ++ */ ++static bool ++sudo_edit_is_symlink(int fd, char *path) ++{ ++ struct stat sb1, sb2; ++ debug_decl(sudo_edit_is_symlink, SUDO_DEBUG_EDIT) ++ ++ /* ++ * Treat [fl]stat() failure like there was a symlink. ++ */ ++ if (fstat(fd, &sb1) == -1 || lstat(path, &sb2) == -1) ++ debug_return_bool(true); ++ ++ /* ++ * Make sure we did not open a link and that what we opened ++ * matches what is currently on the file system. ++ */ ++ if (S_ISLNK(sb2.st_mode) || ++ sb1.st_dev != sb2.st_dev || sb1.st_ino != sb2.st_ino) { ++ debug_return_bool(true); ++ } ++ ++ debug_return_bool(false); ++} ++ ++static int ++sudo_edit_openat_nofollow(char *path, int oflags, mode_t mode) ++{ ++ struct stat sb1, sb2; ++ int fd; ++ debug_decl(sudo_edit_openat_nofollow, SUDO_DEBUG_EDIT) ++ ++ fd = openat(dfd, path, oflags, mode); ++ if (fd == -1) ++ debug_return_int(-1); ++ ++ if (sudo_edit_is_symlink(fd, path)) { ++ close(fd); ++ fd = -1; ++ errno = ELOOP; ++ } ++ ++ debug_return_int(fd); ++} ++#endif /* O_NOFOLLOW */ ++ + /* + * Returns true if the directory described by sb is writable + * by the user. We treat directories with the sticky bit as +@@ -245,49 +305,94 @@ + debug_return_bool(false); + } + ++/* ++ * Directory open flags for use with openat(2) and fstat(2). ++ * Use O_PATH and O_DIRECTORY where possible. ++ */ ++#if defined(O_PATH) && defined(O_DIRECTORY) ++# define DIR_OPEN_FLAGS (O_PATH|O_DIRECTORY) ++#elif defined(O_PATH) && !defined(O_DIRECTORY) ++# define DIR_OPEN_FLAGS O_PATH ++#elif !defined(O_PATH) && defined(O_DIRECTORY) ++# define DIR_OPEN_FLAGS (O_RDONLY|O_DIRECTORY) ++#else ++# define DIR_OPEN_FLAGS (O_RDONLY|O_NONBLOCK) ++#endif ++ + static int + sudo_edit_open_nonwritable(char *path, int oflags, mode_t mode) + { +- char *base, *dir; ++ int dfd, fd, dflags = DIR_OPEN_FLAGS; ++#if defined(__linux__) && defined(O_PATH) ++ char *opath = path; ++#endif ++ bool is_writable; + struct stat sb; +- int dfd, fd; + debug_decl(sudo_edit_open_nonwritable, SUDO_DEBUG_EDIT) + +- base = strrchr(path, '/'); +- if (base != NULL) { +- *base++ = '\0'; +- dir = path; ++#if defined(__linux__) && defined(O_PATH) ++restart: ++#endif ++ if (path[0] == '/') { ++ dfd = open("/", dflags); ++ path++; + } else { +- base = path; +- dir = "."; ++ dfd = open(".", dflags); ++ if (path[0] == '.' && path[1] == '/') ++ path += 2; + } +-#ifdef O_PATH +- if ((dfd = open(dir, O_PATH)) != -1) { +- /* Linux kernels < 3.6 can't do fstat on O_PATH fds. */ +- if (fstat(dfd, &sb) == -1) { +- close(dfd); +- dfd = open(dir, O_RDONLY); +- if (fstat(dfd, &sb) == -1) { +- close(dfd); +- dfd = -1; +- } +- } +- } +-#else +- if ((dfd = open(dir, O_RDONLY)) != -1) { +- if (fstat(dfd, &sb) == -1) { +- close(dfd); +- dfd = -1; +- } +- } +-#endif +- if (base != path) +- base[-1] = '/'; /* restore path */ + if (dfd == -1) + debug_return_int(-1); + +- if (dir_is_writable(&sb, user_details.uid, user_details.gid, +- user_details.ngroups, user_details.groups)) { ++ for (;;) { ++ char *slash; ++ int subdfd; ++ ++ /* ++ * Look up one component at a time, avoiding symbolic links in ++ * writable directories. ++ */ ++ if (fstat(dfd, &sb) == -1) { ++ close(dfd); ++#if defined(__linux__) && defined(O_PATH) ++ /* Linux prior to 3.6 can't fstat an O_PATH fd */ ++ if (ISSET(dflags, O_PATH)) { ++ CLR(dflags, O_PATH); ++ path = opath; ++ goto restart; ++ } ++#endif ++ debug_return_int(-1); ++ } ++#ifndef O_DIRECTORY ++ if (!S_ISDIR(sb.st_mode)) { ++ close(dfd); ++ errno = ENOTDIR; ++ debug_return_int(-1); ++ } ++#endif ++ is_writable = dir_is_writable(&sb, user_details.uid, user_details.gid, ++ user_details.ngroups, user_details.groups); ++ ++ while (path[0] == '/') ++ path++; ++ slash = strchr(path, '/'); ++ if (slash == NULL) ++ break; ++ *slash = '\0'; ++ if (is_writable) ++ subdfd = sudo_edit_openat_nofollow(dfd, path, dflags, 0); ++ else ++ subdfd = openat(dfd, path, dflags, 0); ++ *slash = '/'; /* restore path */ ++ close(dfd); ++ if (subdfd == -1) ++ debug_return_int(-1); ++ path = slash + 1; ++ dfd = subdfd; ++ } ++ ++ if (is_writable) { + close(dfd); + errno = EISDIR; + debug_return_int(-1); +@@ -332,27 +437,10 @@ + if (!ISSET(oflags, O_NONBLOCK)) + (void) fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) & ~O_NONBLOCK); + +- /* +- * Treat [fl]stat() failure like an open() failure. +- */ +- if (fstat(fd, &sb1) == -1 || lstat(path, &sb2) == -1) { +- const int serrno = errno; ++ if (!ISSET(sflags, CD_SUDOEDIT_FOLLOW) && sudo_edit_is_symlink(fd, path)) { + close(fd); +- errno = serrno; +- debug_return_int(-1); +- } +- +- /* +- * Make sure we did not open a link and that what we opened +- * matches what is currently on the file system. +- */ +- if (!ISSET(sflags, CD_SUDOEDIT_FOLLOW)) { +- if (S_ISLNK(sb2.st_mode) || +- sb1.st_dev != sb2.st_dev || sb1.st_ino != sb2.st_ino) { +- close(fd); +- errno = ELOOP; +- debug_return_int(-1); +- } ++ fd = -1; ++ errno = ELOOP; + } + + debug_return_int(fd); + -- cgit v1.2.3 From c91d3fb7f4f754b56b540d8556d6a3ce6085ef37 Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Tue, 5 Jan 2016 16:09:27 -0600 Subject: gnu: boost: Update to 1.60.0. * gnu/packages/boost.scm (boost): Update to 1.60.0. [source]: Remove patch. * gnu/packages/patches/boost-mips-avoid-m32.patch: Delete patch * gnu-system.am (dist_patch_DATA): Remove patch. Also fix dependent packages: * gnu/packages/patches/csound-header-ordering.patch: New patch. * gnu/packages/audio.scm (csound)[source]: Use it. [arguments]: Add 'set-flags phase. * gnu/packages/patches/libcmis-fix-test-onedrive.patch: New patch. * gnu/packages/libreoffice.scm (libcmis)[source]: Use it. (libreoffice)[arguments]: Add LDFLAGS to #:configure-flags. (librevenge)[inputs]: Move boost from here... [propogated-inputs]: to here. [arguments]: Add LDFLAGS to #:configure-flags. * gnu/packages/patches/openimageio-boost-1.60.patch: New patch. * gnu/packages/graphics.scm (openimageio): Use it. * gnu-system.am (dist_patch_DATA): Add patches. --- gnu-system.am | 4 +- gnu/packages/audio.scm | 14 ++++++- gnu/packages/boost.scm | 9 +++-- gnu/packages/graphics.scm | 3 +- gnu/packages/libreoffice.scm | 15 +++++-- gnu/packages/patches/boost-mips-avoid-m32.patch | 15 ------- gnu/packages/patches/csound-header-ordering.patch | 20 +++++++++ .../patches/libcmis-fix-test-onedrive.patch | 35 ++++++++++++++++ gnu/packages/patches/openimageio-boost-1.60.patch | 47 ++++++++++++++++++++++ 9 files changed, 135 insertions(+), 27 deletions(-) delete mode 100644 gnu/packages/patches/boost-mips-avoid-m32.patch create mode 100644 gnu/packages/patches/csound-header-ordering.patch create mode 100644 gnu/packages/patches/libcmis-fix-test-onedrive.patch create mode 100644 gnu/packages/patches/openimageio-boost-1.60.patch (limited to 'gnu-system.am') diff --git a/gnu-system.am b/gnu-system.am index 45487a466a..fa2f038402 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -421,7 +421,6 @@ dist_patch_DATA = \ gnu/packages/patches/binutils-ld-new-dtags.patch \ gnu/packages/patches/binutils-loongson-workaround.patch \ gnu/packages/patches/bitlbee-configure-doc-fix.patch \ - gnu/packages/patches/boost-mips-avoid-m32.patch \ gnu/packages/patches/byobu-writable-status.patch \ gnu/packages/patches/calibre-drop-unrar.patch \ gnu/packages/patches/calibre-no-updates-dialog.patch \ @@ -434,6 +433,7 @@ dist_patch_DATA = \ gnu/packages/patches/cpufrequtils-fix-aclocal.patch \ gnu/packages/patches/crda-optional-gcrypt.patch \ gnu/packages/patches/crossmap-allow-system-pysam.patch \ + gnu/packages/patches/csound-header-ordering.patch \ gnu/packages/patches/cssc-gets-undeclared.patch \ gnu/packages/patches/cssc-missing-include.patch \ gnu/packages/patches/clucene-contribs-lib.patch \ @@ -533,6 +533,7 @@ dist_patch_DATA = \ gnu/packages/patches/libarchive-mtree-filename-length-fix.patch \ gnu/packages/patches/libbonobo-activation-test-race.patch \ gnu/packages/patches/libcanberra-sound-theme-freedesktop.patch \ + gnu/packages/patches/libcmis-fix-test-onedrive.patch \ gnu/packages/patches/libdrm-symbol-check.patch \ gnu/packages/patches/libevent-dns-tests.patch \ gnu/packages/patches/libmtp-devices.patch \ @@ -604,6 +605,7 @@ dist_patch_DATA = \ gnu/packages/patches/nvi-dbpagesize-binpower.patch \ gnu/packages/patches/nvi-db4.patch \ gnu/packages/patches/openexr-missing-samples.patch \ + gnu/packages/patches/openimageio-boost-1.60.patch \ gnu/packages/patches/openjpeg-CVE-2015-6581.patch \ gnu/packages/patches/openjpeg-use-after-free-fix.patch \ gnu/packages/patches/openssl-runpath.patch \ diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index ebae5d57d9..3cc5cebc2c 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -320,7 +320,8 @@ (define-public csound version "/Csound" version ".tar.gz")) (sha256 (base32 - "0a1sni6lr7qpwywpggbkp0ia3h9bwwgf9i87gsag8ra2h30v82hd")))) + "0a1sni6lr7qpwywpggbkp0ia3h9bwwgf9i87gsag8ra2h30v82hd")) + (patches (list (search-patch "csound-header-ordering.patch"))))) (build-system cmake-build-system) (arguments ;; Work around this error on x86_64 with libc 2.22+: @@ -1081,7 +1082,16 @@ (define-public lvtk #:configure-flags (list (string-append "--boost-includes=" (assoc-ref %build-inputs "boost") - "/include")))) + "/include")) + #:phases (modify-phases %standard-phases + (add-before + 'configure 'set-flags + (lambda* (#:key inputs #:allow-other-keys) + ;; See e.g. https://github.com/lvtk/lvtk/issues/21 + (setenv "LDFLAGS" + (string-append + "-L" (assoc-ref inputs "boost") "/lib " + "-lboost_system"))))))) (inputs `(("boost" ,boost) ("lv2" ,lv2))) diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm index d3d0c0339a..0a644e8940 100644 --- a/gnu/packages/boost.scm +++ b/gnu/packages/boost.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2014 John Darrington ;;; Copyright © 2014, 2015 Mark H Weaver ;;; Copyright © 2015 Andreas Enge +;;; Copyright © 2016 Eric Bavier ;;; Copyright © 2015 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. @@ -33,7 +34,7 @@ (define-module (gnu packages boost) (define-public boost (package (name "boost") - (version "1.58.0") + (version "1.60.0") (source (origin (method url-fetch) (uri (string-append @@ -42,8 +43,7 @@ (define-public boost ".tar.bz2")) (sha256 (base32 - "1rfkqxns60171q62cppiyzj8pmsbwp1l8jd7p6crriryqd7j1z7x")) - (patches (list (search-patch "boost-mips-avoid-m32.patch"))))) + "0fzx6dwqbrkd4bcd8pjv0fpapwmrxxwr8yx9g67lihlsk3zzysk8")))) (build-system gnu-build-system) (inputs `(("zlib" ,zlib))) (native-inputs @@ -63,7 +63,8 @@ (define-public boost ;; so we disable that too. ,@(if (string-prefix? "mips64" (or (%current-target-system) (%current-system))) - '("--without-context" "--without-coroutine") + '("--without-context" + "--without-coroutine" "--without-coroutine2") '())))) `(#:tests? #f #:phases diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index 4e15b814c8..560febe958 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -143,7 +143,8 @@ (define-public openimageio (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0mn7cz19mn8dcrhkq15h25gl20ammr1wz0j2j3c2vxs6ph7zn8jy")))) + "0mn7cz19mn8dcrhkq15h25gl20ammr1wz0j2j3c2vxs6ph7zn8jy")) + (patches (list (search-patch "openimageio-boost-1.60.patch"))))) (build-system cmake-build-system) ;; FIXME: To run all tests successfully, test image sets from multiple ;; third party sources have to be present. For details see diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm index 7496a6c8b9..a82cde7d0a 100644 --- a/gnu/packages/libreoffice.scm +++ b/gnu/packages/libreoffice.scm @@ -25,6 +25,7 @@ (define-module (gnu packages libreoffice) non-copyleft x11-style)) #:use-module (guix packages) #:use-module (guix utils) + #:use-module (gnu packages) #:use-module (gnu packages autotools) #:use-module (gnu packages base) #:use-module (gnu packages bison) @@ -130,15 +131,18 @@ (define-public librevenge "03ygxyb0vfjv8raif5q62sl33b54wkr5rzgadb8slijm6k281wpn")))) (build-system gnu-build-system) (native-inputs - `(("boost" ,boost) - ("cppunit" ,cppunit) + `(("cppunit" ,cppunit) ("doxygen" ,doxygen) ("pkg-config" ,pkg-config))) (inputs `(("zlib" ,zlib))) + (propagated-inputs ; Referenced by .la files + `(("boost" ,boost))) (arguments ;; avoid triggering configure errors by simple inclusion of boost headers - `(#:configure-flags '("--disable-werror"))) + `(#:configure-flags '("--disable-werror" + ;; Avoid undefined library references + "LDFLAGS=-lboost_system"))) (home-page "http://sourceforge.net/p/libwpd/wiki/librevenge/") (synopsis "Document importer for office suites") (description "Librevenge is a base library for writing document import @@ -244,7 +248,8 @@ (define-public libcmis (uri (string-append "mirror://sourceforge/" name "/" name "-" version ".tar.gz")) (sha256 (base32 - "1dprvk4fibylv24l7gr49gfqbkfgmxynvgssvdcycgpf7n8h4zm8")))) + "1dprvk4fibylv24l7gr49gfqbkfgmxynvgssvdcycgpf7n8h4zm8")) + (patches (list (search-patch "libcmis-fix-test-onedrive.patch"))))) (build-system gnu-build-system) (native-inputs `(("cppunit" ,cppunit) @@ -805,6 +810,8 @@ (define-public libreoffice "--with-system-libs" ; enable all --with-system-* flags (string-append "--with-boost-libdir=" (assoc-ref %build-inputs "boost") "/lib") + ;; Avoid undefined symbols required by boost::spirit + "LDFLAGS=-lboost_system" ;; Avoid a dependency on ucpp. "--with-idlc-cpp=cpp" ;; The fonts require an external tarball (crosextrafonts). diff --git a/gnu/packages/patches/boost-mips-avoid-m32.patch b/gnu/packages/patches/boost-mips-avoid-m32.patch deleted file mode 100644 index 811c9fb3aa..0000000000 --- a/gnu/packages/patches/boost-mips-avoid-m32.patch +++ /dev/null @@ -1,15 +0,0 @@ -The following patch prevents the use of the -m32 flag on mips, where it -is not understood by gcc, as well as other non-x86 architectures. - -diff -u -r boost_1_58_0.orig/tools/build/src/tools/gcc.jam boost_1_58_0/tools/build/src/tools/gcc.jam ---- boost_1_58_0.orig/tools/build/src/tools/gcc.jam 2015-04-04 19:25:07.000000000 +0200 -+++ boost_1_58_0/tools/build/src/tools/gcc.jam 2015-07-10 01:08:19.822733823 +0200 -@@ -451,7 +451,7 @@ - else - { - local arch = [ feature.get-values architecture : $(properties) ] ; -- if $(arch) != arm -+ if $(arch) = x86 - { - if $(model) = 32 - { diff --git a/gnu/packages/patches/csound-header-ordering.patch b/gnu/packages/patches/csound-header-ordering.patch new file mode 100644 index 0000000000..3640d123dd --- /dev/null +++ b/gnu/packages/patches/csound-header-ordering.patch @@ -0,0 +1,20 @@ +Prevent compilation issues with boost-1.60.0. + +Reported upstream at https://github.com/csound/csound/issues/570 + +--- Csound6.05/Opcodes/chua/ChuaOscillator.cpp 2015-04-25 14:06:22.995646234 -0500 ++++ Csound6.05/Opcodes/chua/ChuaOscillator.cpp 2015-12-21 10:31:58.182362640 -0600 +@@ -117,11 +117,12 @@ + // d = sys_variables(12); + // gnor = a*(x.^3) + b*(x.^2) + c*x + d; + +-#include + #include + using namespace boost::numeric; + #include + ++#include ++ + #undef CS_KSMPS + #define CS_KSMPS (opds.insdshead->ksmps) + diff --git a/gnu/packages/patches/libcmis-fix-test-onedrive.patch b/gnu/packages/patches/libcmis-fix-test-onedrive.patch new file mode 100644 index 0000000000..adf2e0b8e5 --- /dev/null +++ b/gnu/packages/patches/libcmis-fix-test-onedrive.patch @@ -0,0 +1,35 @@ +Patch from resolution of http://sourceforge.net/p/libcmis/tickets/13/ + +From 814c7845d53688b35a747cf193c2ff99e40a8652 Mon Sep 17 00:00:00 2001 +From: Jonathan Wakely +Date: Wed, 2 Sep 2015 16:35:45 +0100 +Subject: [PATCH 5/5] Remove invalid comments from test JSON file. + +--- + qa/libcmis/data/onedrive/search-result.json | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/qa/libcmis/data/onedrive/search-result.json b/qa/libcmis/data/onedrive/search-result.json +index 61d250a..2482429 100644 +--- a/qa/libcmis/data/onedrive/search-result.json ++++ b/qa/libcmis/data/onedrive/search-result.json +@@ -8,7 +8,7 @@ + }, + "name":"OneDriveFile", + "description":"", +- "parent_id":"folderA", // path: /A/Wrong File ++ "parent_id":"folderA", + "size":18047, + "upload_location":"https://apis.live.net/v5.0/wrongFileId/content/", + "comments_count":0, +@@ -32,7 +32,7 @@ + }, + "name":"OneDriveFile", + "description":"", +- "parent_id":"folderC", // path: /A/B/C/Right File ++ "parent_id":"folderC", + "size":4, + "upload_location":"https://apis.live.net/v5.0/rightFileId/content/", + "comments_count":0, +-- +2.4.3 \ No newline at end of file diff --git a/gnu/packages/patches/openimageio-boost-1.60.patch b/gnu/packages/patches/openimageio-boost-1.60.patch new file mode 100644 index 0000000000..92fc3237bb --- /dev/null +++ b/gnu/packages/patches/openimageio-boost-1.60.patch @@ -0,0 +1,47 @@ +From 875fbbd92695397bfc83d1cd5fdd4094e1d50199 Mon Sep 17 00:00:00 2001 +From: Larry Gritz +Date: Mon, 28 Dec 2015 11:46:07 -0800 +Subject: [PATCH] Python ImageCache binding fixes -- disable broken calls + +Some of these calls (thankfully undocumented and presumably unused) +are horribly broken. They compiled before, but with new Boost 1.60 +they don't even compile properly. So just comment them out on this +obsolete branch. They are fully fixed in RB-1.6 and beyond. + +--- a/src/python/py_imagecache.cpp ++++ b/src/python/py_imagecache.cpp +@@ -199,23 +199,24 @@ void declare_imagecache() + .def("destroy", &ImageCacheWrap::destroy) + .staticmethod("destroy") + .def("clear", &ImageCacheWrap::clear) +- .def("attribute", &ImageCacheWrap::attribute) ++ // .def("attribute", &ImageCacheWrap::attribute) + .def("attribute", &ImageCacheWrap::attribute_int) + .def("attribute", &ImageCacheWrap::attribute_float) +- .def("attribute", &ImageCacheWrap::attribute_double) +- .def("attribute", &ImageCacheWrap::attribute_char) ++ // .def("attribute", &ImageCacheWrap::attribute_double) ++ // .def("attribute", &ImageCacheWrap::attribute_char) + .def("attribute", &ImageCacheWrap::attribute_string) +- .def("getattribute", &ImageCacheWrap::attribute) ++ // .def("getattribute", &ImageCacheWrap::attribute) + .def("getattribute", &ImageCacheWrap::getattribute_int) + .def("getattribute", &ImageCacheWrap::getattribute_float) +- .def("getattribute", &ImageCacheWrap::getattribute_double) +- .def("getattribute", &ImageCacheWrap::getattribute_char) ++ // .def("getattribute", &ImageCacheWrap::getattribute_double) ++ // .def("getattribute", &ImageCacheWrap::getattribute_char) + .def("getattribute", &ImageCacheWrap::getattribute_string) +- .def("resolve_filename", &ImageCacheWrap::resolve_filename) +- .def("get_image_info", &ImageCacheWrap::get_image_info) +- .def("get_image_info", &ImageCacheWrap::get_image_info_old) ++ // .def("get_image_info", &ImageCacheWrap::get_image_info) ++ // .def("get_image_info", &ImageCacheWrap::get_image_info_old) + .def("get_imagespec", &ImageCacheWrap::get_imagespec) +- .def("get_pixels", &ImageCacheWrap::get_pixels) ++ // .def("get_pixels", &ImageCacheWrap::get_pixels) ++ .def("resolve_filename", &ImageCacheWrap::resolve_filename) ++ + // .def("get_tile", &ImageCacheWrap::get_tile) + // .def("release_tile", &ImageCacheWrap::release_tile) + // .def("tile_pixels", &ImageCacheWrap::tile_pixels) -- cgit v1.2.3