aboutsummaryrefslogtreecommitdiff
path: root/pkgs/tools/text
diff options
context:
space:
mode:
authorVladimír Čunát <v@cunat.cz>2019-09-02 23:25:24 +0200
committerVladimír Čunát <v@cunat.cz>2019-09-02 23:25:24 +0200
commitf21211ebfe21797c6f0444d42ec7cb835c737388 (patch)
tree816465981f650242d4b22e0f01b912917e7008f8 /pkgs/tools/text
parentb291f2a9953d48d6edc5c73776db9ba289ccf213 (diff)
parent12ae04518b004adf949a43125954b99c05189e6f (diff)
Merge branch 'master' into staging
Diffstat (limited to 'pkgs/tools/text')
-rw-r--r--pkgs/tools/text/ispell/default.nix19
-rw-r--r--pkgs/tools/text/ispell/patches/0005-Do-not-reorder-words.patch52
2 files changed, 15 insertions, 56 deletions
diff --git a/pkgs/tools/text/ispell/default.nix b/pkgs/tools/text/ispell/default.nix
index dbec8d353d9..2f61536ed2c 100644
--- a/pkgs/tools/text/ispell/default.nix
+++ b/pkgs/tools/text/ispell/default.nix
@@ -1,14 +1,17 @@
{ stdenv, fetchurl, bison, ncurses }:
stdenv.mkDerivation rec {
- name = "ispell-3.3.02";
+ pname = "ispell";
+ version = "3.4.00";
+
src = fetchurl {
- url = "http://fmg-www.cs.ucla.edu/geoff/tars/${name}.tar.gz";
+ url = "http://fmg-www.cs.ucla.edu/geoff/tars/${pname}-${version}.tar.gz";
sha256 = "1d7c2fqrdjckp91ajpkn5nnmpci2qrxqn8b6cyl0zn1afb9amxbz";
};
+
buildInputs = [ bison ncurses ];
+
patches = [
- ./patches/0005-Do-not-reorder-words.patch
./patches/0007-Use-termios.patch
./patches/0008-Tex-backslash.patch
./patches/0009-Fix-FTBFS-on-glibc.patch
@@ -21,6 +24,7 @@ stdenv.mkDerivation rec {
./patches/0025-Languages.patch
./patches/0030-Display-whole-multibyte-character.patch
];
+
postPatch = ''
cat >> local.h <<EOF
${stdenv.lib.optionalString (!stdenv.isDarwin) "#define USG"}
@@ -37,11 +41,18 @@ stdenv.mkDerivation rec {
#define MINIMENU
#define HAS_RENAME
EOF
-
'';
+
preBuild = ''
for dir in $out/share/emacs/site-lisp $out/share/info $out/share/man/man1 $out/share/man/man4 $out/bin $out/lib; do
mkdir -p $dir
done
'';
+
+ meta = with stdenv.lib; {
+ description = "An interactive spell-checking program for Unix";
+ homepage = "https://www.cs.hmc.edu/~geoff/ispell.html";
+ license = licenses.free;
+ platforms = platforms.unix;
+ };
}
diff --git a/pkgs/tools/text/ispell/patches/0005-Do-not-reorder-words.patch b/pkgs/tools/text/ispell/patches/0005-Do-not-reorder-words.patch
deleted file mode 100644
index 2d74c078601..00000000000
--- a/pkgs/tools/text/ispell/patches/0005-Do-not-reorder-words.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From: Geoff Kuenning <geoff@cs.hmc.edu>
-Date: Thu, 3 Nov 2005 14:14:15 -0800
-Subject: 0005 Do not reorder words
-
-ispell reorders words in personal dictionary without good reason.
-
-The correct approach is to build the internal data structure with variant
-spellings stored in the same order as they appear in the personal dictionary.
-Fortunately, this is easy, though the patch is to a different file. This one
-has been tested (That's what I get for trying to rush out a fix before a
-meeting!).
----
- makedent.c | 18 +++++++++++-------
- 1 files changed, 11 insertions(+), 7 deletions(-)
-
-diff --git a/makedent.c b/makedent.c
-index 0453d11..d121345 100644
---- a/makedent.c
-+++ b/makedent.c
-@@ -447,9 +447,10 @@ int combinecaps (hdrp, newp)
- if (retval == 0)
- {
- /*
-- ** Couldn't combine the two entries. Add a new variant. For
-- ** ease, we'll stick it right behind the header, rather than
-- ** at the end of the list.
-+ ** Couldn't combine the two entries. Add a new variant. We
-+ ** stick it at the end of the variant list because it's
-+ ** important to maintain order; this causes the personal
-+ ** dictionary to have a stable ordering.
- */
- forcevheader (hdrp, oldp, newp);
- tdent = (struct dent *) mymalloc (sizeof (struct dent));
-@@ -460,10 +461,13 @@ int combinecaps (hdrp, newp)
- return -1;
- }
- *tdent = *newp;
-- tdent->next = hdrp->next;
-- hdrp->next = tdent;
-- tdent->flagfield |= (hdrp->flagfield & MOREVARIANTS);
-- hdrp->flagfield |= MOREVARIANTS;
-+ for (oldp = hdrp;
-+ oldp->next != NULL && oldp->flagfield & MOREVARIANTS;
-+ oldp = oldp->next)
-+ ;
-+ tdent->next = oldp->next;
-+ oldp->next = tdent;
-+ oldp->flagfield |= MOREVARIANTS;
- combineaffixes (hdrp, newp);
- hdrp->flagfield |= (newp->flagfield & KEEP);
- if (captype (newp->flagfield) == FOLLOWCASE)
---