guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

05/09: gnu: gettext: Update to 0.20.1.


From: guix-commits
Subject: 05/09: gnu: gettext: Update to 0.20.1.
Date: Tue, 2 Jul 2019 12:17:42 -0400 (EDT)

mbakke pushed a commit to branch core-updates
in repository guix.

commit 3730e3c64e2bc9b444281a17282aa7406e20d093
Author: Marius Bakke <address@hidden>
Date:   Sun Jun 30 16:46:37 2019 +0200

    gnu: gettext: Update to 0.20.1.
    
    * gnu/packages/gettext.scm (gettext-minimal): Update to 0.20.1.
    [source](snippet): Remove.
    [inputs]: Remove EXPAT.  Add LIBUNISTRING, LIBXML2, and NCURSES.
    [arguments]: Add #:configure-flags and a "patch-fixed-paths" phase.  Delete
    "link-expat" phase.
    * gnu/packages/commencement.scm (gettext-boot0): Stay on version 0.19.8.1.
    [arguments]: Adjust accordingly.
    
    Co-authored-by: Miguel <address@hidden>
---
 gnu/packages/commencement.scm | 47 ++++++++++++++++--------------
 gnu/packages/gettext.scm      | 67 ++++++++++++++++++++++---------------------
 2 files changed, 60 insertions(+), 54 deletions(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 10b0bd6..1db2849 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2015,30 +2015,33 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker 
-Wl,~a/~a \"$@\"~%"
   (let ((gettext-minimal
          (package (inherit gettext-minimal)
            (name "gettext-boot0")
+           ;; Newer versions of GNU gettext depends on libxml2 and ncurses.  To
+           ;; simplify the dependency chain, we stick to this version here.
+           (version "0.19.8.1")
+           (source (origin
+                     (method url-fetch)
+                     (uri (string-append "mirror://gnu/gettext/gettext-"
+                                         version ".tar.gz"))
+                     (sha256
+                      (base32
+                       
"0hsw28f9q9xaggjlsdp2qmbp2rbd1mp0njzan2ld9kiqwkq2m57z"))))
            (inputs '())                           ;zero dependencies
            (arguments
-            (substitute-keyword-arguments
-                `(#:tests? #f
-                  ,@(package-arguments gettext-minimal))
-              ((#:phases phases)
-               `(modify-phases ,phases
-                  ;; Build only the tools.
-                  (add-after 'unpack 'chdir
-                             (lambda _
-                               (chdir "gettext-tools")
-                               #t))
-
-                  ;; Some test programs require pthreads, which we don't have.
-                  (add-before 'configure 'no-test-programs
-                              (lambda _
-                                (substitute* "tests/Makefile.in"
-                                  (("^PROGRAMS =.*$")
-                                   "PROGRAMS =\n"))
-                                #t))
-
-                  ;; Don't try to link against libexpat.
-                  (delete 'link-expat)
-                  (delete 'patch-tests))))))))
+            `(#:tests? #f
+              #:phases (modify-phases %standard-phases
+                         ;; Build only the tools.
+                         (add-after 'unpack 'chdir
+                           (lambda _
+                             (chdir "gettext-tools")
+                             #t))
+
+                         ;; Some test programs require pthreads, which we 
don't have.
+                         (add-before 'configure 'no-test-programs
+                           (lambda _
+                             (substitute* "tests/Makefile.in"
+                               (("^PROGRAMS =.*$")
+                                "PROGRAMS =\n"))
+                             #t))))))))
     (package-with-bootstrap-guile
      (package-with-explicit-inputs gettext-minimal
                                    %boot1-inputs
diff --git a/gnu/packages/gettext.scm b/gnu/packages/gettext.scm
index ef80af4..245fdc9 100644
--- a/gnu/packages/gettext.scm
+++ b/gnu/packages/gettext.scm
@@ -4,10 +4,11 @@
 ;;; Copyright © 2015, 2017 Ricardo Wurmus <address@hidden>
 ;;; Copyright © 2016, 2019 Efraim Flashner <address@hidden>
 ;;; Copyright © 2016 Alex Kost <address@hidden>
-;;; Copyright © 2017 Marius Bakke <address@hidden>
+;;; Copyright © 2017, 2019 Marius Bakke <address@hidden>
 ;;; Copyright © 2017 Mathieu Othacehe <address@hidden>
 ;;; Copyright © 2017 Eric Bavier <address@hidden>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <address@hidden>
+;;; Copyright © 2019 Miguel <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -33,6 +34,8 @@
   #:use-module (guix build-system perl)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages emacs)
+  #:use-module (gnu packages libunistring)
+  #:use-module (gnu packages ncurses)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages tex)
   #:use-module (gnu packages xml)
@@ -41,34 +44,42 @@
 (define-public gettext-minimal
   (package
     (name "gettext-minimal")
-    (version "0.19.8.1")
+    (version "0.20.1")
     (source (origin
-             (method url-fetch)
-             (uri (string-append "mirror://gnu/gettext/gettext-"
-                                 version ".tar.gz"))
-             (sha256
-              (base32
-               "0hsw28f9q9xaggjlsdp2qmbp2rbd1mp0njzan2ld9kiqwkq2m57z"))
-             (modules '((guix build utils)))
-             (snippet
-              '(begin
-                ;; The gnulib test-lock test is prone to writer starvation
-                ;; with our glibc@2.25, which prefers readers, so disable it.
-                ;; The gnulib commit b20e8afb0b2 should fix this once
-                ;; incorporated here.
-                 (substitute* "gettext-runtime/tests/Makefile.in"
-                   (("TESTS = test-lock\\$\\(EXEEXT\\)") "TESTS ="))
-                 (substitute* "gettext-tools/gnulib-tests/Makefile.in"
-                  (("test-lock\\$\\(EXEEXT\\) ") ""))
-                 #t))))
+              (method url-fetch)
+              (uri (string-append "mirror://gnu/gettext/gettext-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "0p3zwkk27wm2m2ccfqm57nj7vqkmfpn7ja1nf65zmhz8qqs5chb6"))))
     (build-system gnu-build-system)
     (outputs '("out"
-               "doc"))                            ;8 MiB of HTML
+               "doc"))                            ;9 MiB of HTML
     (inputs
-     `(("expat" ,expat)))
+     `(("libunistring" ,libunistring)
+       ("libxml2" ,libxml2)
+
+       ;; TODO: ncurses is only needed for the 'libtextstyle' library.
+       ;; The next version of gettext can use a separate libtextstyle,
+       ;; but for now we include it here in 'gettext-minimal'.
+       ("ncurses" ,ncurses)))
     (arguments
-     `(#:phases
+     `(#:configure-flags '("--with-included-libunistring=no"
+                           "--with-included-libxml=no")
+       #:phases
        (modify-phases %standard-phases
+         (add-before 'patch-source-shebangs 'patch-fixed-paths
+           (lambda _
+             (substitute* '("gettext-tools/config.h.in"
+                            "gettext-tools/gnulib-tests/init.sh"
+                            "gettext-tools/tests/init.sh"
+                            "gettext-tools/system-tests/run-test")
+               (("/bin/sh") "sh"))
+             (substitute* '("gettext-tools/src/project-id"
+                            "gettext-tools/projects/KDE/trigger"
+                            "gettext-tools/projects/GNOME/trigger")
+               (("/bin/pwd") "pwd"))
+             #t))
         (add-before 'check 'patch-tests
          (lambda* (#:key inputs #:allow-other-keys)
            (let* ((bash (which "sh")))
@@ -92,15 +103,7 @@
                  (("/bin/pwd")
                   "pwd"))
 
-               #t))))
-        (add-before 'configure 'link-expat
-         (lambda _
-           ;; Gettext defaults to opening expat via dlopen on
-           ;; "Linux".  Change to link directly.
-           (substitute* "gettext-tools/configure"
-             (("LIBEXPAT=\"-ldl\"") "LIBEXPAT=\"-ldl -lexpat\"")
-             (("LTLIBEXPAT=\"-ldl\"") "LTLIBEXPAT=\"-ldl -lexpat\""))
-           #t)))
+               #t)))))
 
        ;; When tests fail, we want to know the details.
        #:make-flags '("VERBOSE=yes")))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]