From fc52b2744edf499d2b07cc49cc35ee27948c9e5b Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Fri, 24 Jul 2020 13:49:24 -0400 Subject: [PATCH 35/36] gnu: gspell: Update package definition. * gnu/packages/gnome.scm (gspell) [version]: Update to 1.8.3. [source][sha256]: Modify base32. [patches]: Remove gspell-dash-test.patch. [outputs]: New output "doc". [arguments]<#:configure-flags>[--enable-vala]: Remove flag. [--enable-gtk-doc]: New flag. [--with-html-dir=]: New flag. <#:phases>['patch-docbook-xml]: New phase. ['disable-failing-tests]: New phase. ['pre-check]: Modify phase. [native-inputs]: Add docbook-xml, gettext-minimal and gtk-doc. [inputs]: Move glib and gtk+ to ... [propagated-inputs]: ... here. [synopsis]: Modify. [description]: Modify. [license]: Change from gpl2+ to lgpl2.1+. * gnu/packages/patches/gspell-dash-test.patch: Remove file. * gnu/local.mk (gspell-dash-test.patch): Remove reference. --- gnu/local.mk | 1 - gnu/packages/gnome.scm | 76 +++++++++++++-------- gnu/packages/patches/gspell-dash-test.patch | 22 ------ 3 files changed, 46 insertions(+), 53 deletions(-) delete mode 100644 gnu/packages/patches/gspell-dash-test.patch diff --git a/gnu/local.mk b/gnu/local.mk index 3925fa024d..456c8310fd 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1059,7 +1059,6 @@ dist_patch_DATA = \ %D%/packages/patches/grub-efi-fat-serial-number.patch \ %D%/packages/patches/grub-setup-root.patch \ %D%/packages/patches/grub-verifiers-Blocklist-fallout-cleanup.patch \ - %D%/packages/patches/gspell-dash-test.patch \ %D%/packages/patches/guile-1.8-cpp-4.5.patch \ %D%/packages/patches/guile-2.2-skip-oom-test.patch \ %D%/packages/patches/guile-default-utf8.patch \ diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 27cb8171ca..0a2db9545a 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -10626,59 +10626,75 @@ that support the Assistive Technology Service Provider Interface (AT-SPI).") (define-public gspell (package (name "gspell") - (version "1.8.2") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnome/sources/" name "/" - (version-major+minor version) "/" - name "-" version ".tar.xz")) - (sha256 - (base32 - "1miybm1z5cl91i25l7mfqlxhv7j8yy8rcgi0s1bgbb2vm71rb4dv")) - (patches (search-patches "gspell-dash-test.patch")))) + (version "1.8.3") + (source + (origin + (method url-fetch) + (uri + (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 "1s1dns070pz8dg04ppshdbx1r86n9406vkxcfs8hdghn0bfi9ras")))) (build-system glib-or-gtk-build-system) + (outputs '("out" "doc")) (arguments - '(#:configure-flags (list "--enable-vala") + `(#:configure-flags + (list + "--enable-gtk-doc" + (string-append "--with-html-dir=" + (assoc-ref %outputs "doc") + "/share/gtk-doc/html")) #:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-docbook-xml + (lambda* (#:key inputs #:allow-other-keys) + (with-directory-excursion "docs/reference" + (substitute* '("gspell-docs.xml.in" "intro.xml.in") + (("http://www.oasis-open.org/docbook/xml/4.3/") + (string-append (assoc-ref inputs "docbook-xml") + "/xml/dtd/docbook/")))) + #t)) + (add-after 'patch-docbook-xml 'disable-failing-tests + (lambda _ + (substitute* "testsuite/test-checker.c" + (("g_test_add_func \\(\"/checker/dashes\", test_dashes\\);") + "")) + #t)) (add-before 'check 'pre-check (lambda* (#:key inputs #:allow-other-keys) ;; Tests require a running X server. - (system "Xvfb :1 &") + (system "Xvfb :1 +extension GLX &") (setenv "DISPLAY" ":1") - ;; For the missing /etc/machine-id. (setenv "DBUS_FATAL_WARNINGS" "0") - ;; Allow Enchant and its Aspell backend to find the en_US ;; dictionary. (setenv "ASPELL_DICT_DIR" (string-append (assoc-ref inputs "aspell-dict-en") "/lib/aspell")) #t))))) - (inputs - `(("gtk+" ,gtk+) - ("glib" ,glib) - ("iso-codes" ,iso-codes))) (native-inputs - `(("glib" ,glib "bin") + `(("aspell-dict-en" ,aspell-dict-en) + ("docbook-xml" ,docbook-xml-4.3) + ("gettext" ,gettext-minimal) ("gobject-introspection" ,gobject-introspection) + ("gtk-doc" ,gtk-doc) ("pkg-config" ,pkg-config) - ("vala" ,vala) ;for VAPI, needed by Geary + ("vala" ,vala) ("xmllint" ,libxml2) - - ;; For tests. - ("aspell-dict-en" ,aspell-dict-en) ("xorg-server" ,xorg-server-for-tests))) + (inputs + `(("iso-codes" ,iso-codes))) (propagated-inputs - `(("enchant" ,enchant))) ;enchant.pc is required by gspell-1.pc + `(("enchant" ,enchant) + ("glib" ,glib) + ("gtk+" ,gtk+))) + (synopsis "Spell-checking library for GTK+ applications") + (description "GSpell provides a flexible API to add spell-checking to a GTK+ +application.") (home-page "https://wiki.gnome.org/Projects/gspell") - (synopsis "GNOME's alternative spell checker") - (description - "gspell provides a flexible API to add spell-checking to a GTK+ -application. It provides a GObject API, spell-checking to text entries and -text views, and buttons to choose the language.") - (license license:gpl2+))) + (license license:lgpl2.1+))) (define-public gnome-planner (package diff --git a/gnu/packages/patches/gspell-dash-test.patch b/gnu/packages/patches/gspell-dash-test.patch deleted file mode 100644 index 1c9d77cfba..0000000000 --- a/gnu/packages/patches/gspell-dash-test.patch +++ /dev/null @@ -1,22 +0,0 @@ -Somehow, Aspell 0.60.6.1 and aspell-dict-en-2016.11.20-0 don't consider -this a valid spelling. Skip it. - -TODO: Migrate to using hunspell. According to upstream, this bug won't be fixed. -See https://bugzilla.gnome.org/show_bug.cgi?id=772406. ---- a/testsuite/test-checker.c 2017-03-24 09:50:50.000000000 -0400 -+++ b/testsuite/test-checker.c 2017-06-15 21:47:07.116173895 -0400 -@@ -105,10 +105,11 @@ - * be considered deprecated, it is better to use hunspell, so WONTFIX. - * For more details, see: - * https://bugzilla.gnome.org/show_bug.cgi?id=772406 -+ * -+ * correctly_spelled = gspell_checker_check_word (checker, "spell-checking", -1, &error); -+ * g_assert_no_error (error); -+ * g_assert (correctly_spelled); - */ -- correctly_spelled = gspell_checker_check_word (checker, "spell-checking", -1, &error); -- g_assert_no_error (error); -- g_assert (correctly_spelled); - - correctly_spelled = gspell_checker_check_word (checker, "nrst-auie", -1, &error); - g_assert_no_error (error); -- 2.27.0