From 5465ec7811f5f5b702102bf81d351a38ec843ca0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 6 Dec 2011 22:52:53 +0000 Subject: [PATCH 01/91] Resolves: rhbz#759647 temp file name collision --- hunspell.rhbz759647.patch | 74 +++++++++++++++++++++++++++++++++++++++ hunspell.spec | 7 +++- 2 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 hunspell.rhbz759647.patch diff --git a/hunspell.rhbz759647.patch b/hunspell.rhbz759647.patch new file mode 100644 index 0000000..31f48ce --- /dev/null +++ b/hunspell.rhbz759647.patch @@ -0,0 +1,74 @@ +Index: src/tools/hunspell.cxx +=================================================================== +RCS file: /cvsroot/hunspell/hunspell/src/tools/hunspell.cxx,v +retrieving revision 1.28 +diff -u -r1.28 hunspell.cxx +--- src/tools/hunspell.cxx 21 Jan 2011 17:30:41 -0000 1.28 ++++ src/tools/hunspell.cxx 6 Dec 2011 22:44:15 -0000 +@@ -128,8 +128,6 @@ + #define readline scanline + #endif + +-#define TEMPNAME "hunSPELL.bak" +- + extern char * mystrdup(const char * s); + + // file formats: +@@ -1316,14 +1314,12 @@ + char * extension = basename(filename, '.'); + parser = get_parser(format, extension, pMS[0]); + +- char * tempname = (char *) malloc(strlen(filename) + strlen(TEMPNAME) + 1); +- strcpy(tempname, filename); +- strcpy(basename(tempname, DIRSEPCH), TEMPNAME); +- +- FILE *tempfile; ++ ++ FILE *tempfile = tmpfile(); + +- if (!(tempfile = fopen(tempname, "w"))) { +- fprintf(stderr, gettext("Can't create tempfile %s.\n"), tempname); ++ if (!tempfile) ++ { ++ perror(gettext("Can't create tempfile")); + endwin(); + exit(1); + } +@@ -1337,7 +1333,7 @@ + case -1: { + clear(); + refresh(); +- unlink(tempname); ++ fclose(tempfile); //automatically deleted when closed + endwin(); + exit(0); + } +@@ -1350,15 +1346,22 @@ + } + } + fclose(text); +- fclose(tempfile); + delete parser; + +- if (! modified) { +- unlink(tempname); +- } else { +- rename(tempname, filename); ++ if (modified) { ++ rewind(tempfile); ++ text = fopen(filename, "wb"); ++ ++ size_t n; ++ while ((n = fread(buf, 1, MAXLNLEN, tempfile)) > 0) ++ { ++ if (fwrite(buf, 1, n, text) != n) ++ perror("write failed"); ++ } ++ ++ fclose(text); + } +- free(tempname); ++ fclose(tempfile); //automatically deleted when closed + } + + #endif diff --git a/hunspell.spec b/hunspell.spec index b16a49a..bc1d305 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.3.2 -Release: 1%{?dist} +Release: 2%{?dist} Source: http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz Group: System Environment/Libraries URL: http://hunspell.sourceforge.net/ @@ -16,6 +16,7 @@ BuildRequires: valgrind %if %{double_profiling_build} BuildRequires: words %endif +Patch0: hunspell.rhbz759647.patch %description Hunspell is a spell checker and morphological analyzer library and program @@ -33,6 +34,7 @@ Includes and definitions for developing with hunspell %prep %setup -q +%patch0 -p0 -b .rhbz759647 %build configureflags="--disable-rpath --disable-static --with-ui --with-readline" @@ -121,6 +123,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/hunspell.3.gz %changelog +* Tue Dec 06 2011 Caolán McNamara - 1.3.2-2 +- Resolves: rhbz#759647 temp file name collision + * Tue May 24 2011 Caolán McNamara - 1.3.2-1 - Resolves: rhbz#706686 latest version From cdb7a7e62d34e7cf1258aa59304c3cb6a8a0e051 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 12 Jan 2012 23:03:39 -0600 Subject: [PATCH 02/91] - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index bc1d305..7f69600 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.3.2 -Release: 2%{?dist} +Release: 3%{?dist} Source: http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz Group: System Environment/Libraries URL: http://hunspell.sourceforge.net/ @@ -123,6 +123,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/hunspell.3.gz %changelog +* Fri Jan 13 2012 Fedora Release Engineering - 1.3.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Tue Dec 06 2011 Caolán McNamara - 1.3.2-2 - Resolves: rhbz#759647 temp file name collision From 56862462a6623d9a7b190106d27cf2e5e57b9981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 18 Apr 2012 20:53:57 +0100 Subject: [PATCH 03/91] Resolves: rhbz#813478 x86_64 valgrind spews, see rhbz#813780 --- hunspell.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hunspell.spec b/hunspell.spec index 7f69600..9fc1dcd 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.3.2 -Release: 3%{?dist} +Release: 4%{?dist} Source: http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz Group: System Environment/Libraries URL: http://hunspell.sourceforge.net/ @@ -70,7 +70,8 @@ make %{?_smp_mflags} %endif %check -%ifarch %{ix86} x86_64 +#%ifarch %{ix86} x86_64, see rhbz#813780 +%ifarch %{ix86} VALGRIND=memcheck make check %else make check @@ -123,6 +124,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/hunspell.3.gz %changelog +* Wed Apr 18 2012 Caolán McNamara - 1.3.2-4 +- Resolves: rhbz#813478 x86_64 valgrind spews, see rhbz#813780 + * Fri Jan 13 2012 Fedora Release Engineering - 1.3.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild From c12dd188b8b641c4d2d356293c058a0fd4fc52cb Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 19 Jul 2012 08:21:33 -0500 Subject: [PATCH 04/91] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index 9fc1dcd..498540a 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.3.2 -Release: 4%{?dist} +Release: 5%{?dist} Source: http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz Group: System Environment/Libraries URL: http://hunspell.sourceforge.net/ @@ -124,6 +124,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/hunspell.3.gz %changelog +* Thu Jul 19 2012 Fedora Release Engineering - 1.3.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Wed Apr 18 2012 Caolán McNamara - 1.3.2-4 - Resolves: rhbz#813478 x86_64 valgrind spews, see rhbz#813780 From b728ec862bd6a41e1f06fc8d4ab56c33d3c23cb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 1 Aug 2012 09:15:06 +0100 Subject: [PATCH 05/91] Resolves: rhbz#573516 have hunspell require hunspell-en to ensure a spellcheck dict exist --- hunspell.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index 498540a..846811a 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.3.2 -Release: 5%{?dist} +Release: 6%{?dist} Source: http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz Group: System Environment/Libraries URL: http://hunspell.sourceforge.net/ @@ -16,6 +16,7 @@ BuildRequires: valgrind %if %{double_profiling_build} BuildRequires: words %endif +Requires: hunspell-en Patch0: hunspell.rhbz759647.patch %description @@ -124,6 +125,10 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/hunspell.3.gz %changelog +* Wed Aug 01 2012 Caolán McNamara - 1.3.2-6 +- Resolves: rhbz#573516 have hunspell require hunspell-en to ensure + at least one dictionary exists + * Thu Jul 19 2012 Fedora Release Engineering - 1.3.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From 4064bbfa7e369bbabb31d15305784aa7472f54d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 28 Aug 2012 09:17:14 +0100 Subject: [PATCH 06/91] Related: rhbz#850709 en-US available standalone --- hunspell.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hunspell.spec b/hunspell.spec index 846811a..16586e9 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.3.2 -Release: 6%{?dist} +Release: 8%{?dist} Source: http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz Group: System Environment/Libraries URL: http://hunspell.sourceforge.net/ @@ -16,7 +16,7 @@ BuildRequires: valgrind %if %{double_profiling_build} BuildRequires: words %endif -Requires: hunspell-en +Requires: hunspell-en-US Patch0: hunspell.rhbz759647.patch %description @@ -125,6 +125,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/hunspell.3.gz %changelog +* Tue Aug 28 2012 Caolán McNamara - 1.3.2-8 +- Related: rhbz#850709 en-US available standalone + * Wed Aug 01 2012 Caolán McNamara - 1.3.2-6 - Resolves: rhbz#573516 have hunspell require hunspell-en to ensure at least one dictionary exists From 84a7fb18e26dbd19ff5702bdbb3d9a6548af056a Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 13 Feb 2013 19:18:35 -0600 Subject: [PATCH 07/91] - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index 16586e9..c84ff0c 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.3.2 -Release: 8%{?dist} +Release: 9%{?dist} Source: http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz Group: System Environment/Libraries URL: http://hunspell.sourceforge.net/ @@ -125,6 +125,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/hunspell.3.gz %changelog +* Thu Feb 14 2013 Fedora Release Engineering - 1.3.2-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + * Tue Aug 28 2012 Caolán McNamara - 1.3.2-8 - Related: rhbz#850709 en-US available standalone From dd402f02d3c8c843ff177e3e18134de78efd5cb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 13 Mar 2013 16:55:32 +0000 Subject: [PATCH 08/91] Resolves: rhbz#918938 crash in danish thesaurus/spell interaction --- hunspell.rhbz918938.patch | 72 +++++++++++++++++++++++++++++++++++++++ hunspell.spec | 7 +++- 2 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 hunspell.rhbz918938.patch diff --git a/hunspell.rhbz918938.patch b/hunspell.rhbz918938.patch new file mode 100644 index 0000000..d29a3f8 --- /dev/null +++ b/hunspell.rhbz918938.patch @@ -0,0 +1,72 @@ +--- src/hunspell/hunspell.cxx 2011-02-02 12:04:29.000000000 +0000 ++++ src/hunspell/hunspell.cxx 2013-03-13 16:50:50.667928521 +0000 +@@ -12,6 +12,8 @@ + #endif + #include "csutil.hxx" + ++#include ++ + Hunspell::Hunspell(const char * affpath, const char * dpath, const char * key) + { + encoding = NULL; +@@ -1710,6 +1712,19 @@ + return n; + } + ++namespace ++{ ++ void myrep(std::string& str, const std::string& search, const std::string& replace) ++ { ++ size_t pos = 0; ++ while ((pos = str.find(search, pos)) != std::string::npos) ++ { ++ str.replace(pos, search.length(), replace); ++ pos += replace.length(); ++ } ++ } ++} ++ + int Hunspell::spellml(char*** slst, const char * word) + { + char *q, *q2; +@@ -1721,26 +1736,26 @@ + q2 = strstr(q2, "'), MAXWORDUTF8LEN - 10)) n = analyze(slst, cw); + if (n == 0) return 0; + // convert the result to ana1ana2 format +- for (int i = 0; i < n; i++) s+= strlen((*slst)[i]); +- char * r = (char *) malloc(6 + 5 * s + 7 * n + 7 + 1); // XXX 5*s->&->& +- if (!r) return 0; +- strcpy(r, ""); ++ std::string r; ++ r.append(""); + for (int i = 0; i < n; i++) { +- int l = strlen(r); +- strcpy(r + l, ""); +- strcpy(r + l + 3, (*slst)[i]); +- mystrrep(r + l + 3, "\t", " "); +- mystrrep(r + l + 3, "<", "<"); +- mystrrep(r + l + 3, "&", "&"); +- strcat(r, ""); ++ r.append(""); ++ ++ std::string entry((*slst)[i]); + free((*slst)[i]); ++ myrep(entry, "\t", " "); ++ myrep(entry, "<", "<"); ++ myrep(entry, "&", "&"); ++ r.append(entry); ++ ++ r.append(""); + } +- strcat(r, ""); +- (*slst)[0] = r; ++ r.append(""); ++ (*slst)[0] = mystrdup(r.c_str()); + return 1; + } else if (check_xml_par(q, "type=", "stem")) { + if (get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN - 1)) return stem(slst, cw); diff --git a/hunspell.spec b/hunspell.spec index c84ff0c..4c1a7fc 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.3.2 -Release: 9%{?dist} +Release: 10%{?dist} Source: http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz Group: System Environment/Libraries URL: http://hunspell.sourceforge.net/ @@ -18,6 +18,7 @@ BuildRequires: words %endif Requires: hunspell-en-US Patch0: hunspell.rhbz759647.patch +Patch1: hunspell.rhbz918938.patch %description Hunspell is a spell checker and morphological analyzer library and program @@ -36,6 +37,7 @@ Includes and definitions for developing with hunspell %prep %setup -q %patch0 -p0 -b .rhbz759647 +%patch2 -p0 -b .rhbz918938 %build configureflags="--disable-rpath --disable-static --with-ui --with-readline" @@ -125,6 +127,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/hunspell.3.gz %changelog +* Wed Mar 13 2013 Caolán McNamara - 1.3.2-10 +- Resolves: rhbz#918938 crash in danish thesaurus/spell interaction + * Thu Feb 14 2013 Fedora Release Engineering - 1.3.2-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild From 4cc48f0b0d85a1bc14dcf00d09d758eaba1e15b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 13 Mar 2013 17:02:29 +0000 Subject: [PATCH 09/91] wrong patch num --- hunspell.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index 4c1a7fc..53b4fd5 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -37,7 +37,7 @@ Includes and definitions for developing with hunspell %prep %setup -q %patch0 -p0 -b .rhbz759647 -%patch2 -p0 -b .rhbz918938 +%patch1 -p0 -b .rhbz918938 %build configureflags="--disable-rpath --disable-static --with-ui --with-readline" From 0fe15bf8cf9d450a6ee9131991ed3390563232e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 14 Mar 2013 11:25:29 +0000 Subject: [PATCH 10/91] safer order of replacement --- hunspell.rhbz918938.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hunspell.rhbz918938.patch b/hunspell.rhbz918938.patch index d29a3f8..a5e5020 100644 --- a/hunspell.rhbz918938.patch +++ b/hunspell.rhbz918938.patch @@ -57,8 +57,8 @@ + std::string entry((*slst)[i]); free((*slst)[i]); + myrep(entry, "\t", " "); -+ myrep(entry, "<", "<"); + myrep(entry, "&", "&"); ++ myrep(entry, "<", "<"); + r.append(entry); + + r.append(""); From 48f08b055992b66e8ff0587b3b03a88c9010f0f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 4 Apr 2013 09:23:42 +0100 Subject: [PATCH 11/91] Resolves: rhbz#925562 support aarch64 --- hunspell-aarch64.patch | 2562 ++++++++++++++++++++++++++++++++++++++++ hunspell.spec | 7 +- 2 files changed, 2568 insertions(+), 1 deletion(-) create mode 100644 hunspell-aarch64.patch diff --git a/hunspell-aarch64.patch b/hunspell-aarch64.patch new file mode 100644 index 0000000..48ff407 --- /dev/null +++ b/hunspell-aarch64.patch @@ -0,0 +1,2562 @@ +diff -urN hunspell-1.3.2/config.guess hunspell-1.3.2-aarch64/config.guess +--- hunspell-1.3.2/config.guess 2010-02-23 03:08:49.000000000 -0600 ++++ hunspell-1.3.2-aarch64/config.guess 2013-03-08 00:25:55.370800875 -0600 +@@ -1,9 +1,10 @@ + #! /bin/sh + # Attempt to guess a canonical system name. + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +-# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ++# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, ++# 2011, 2012 Free Software Foundation, Inc. + +-timestamp='2004-08-11' ++timestamp='2012-09-25' + + # This file is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by +@@ -16,24 +17,24 @@ + # General Public License for more details. + # + # You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++# along with this program; if not, see . + # + # As a special exception to the GNU General Public License, if you + # distribute this file as part of a program that contains a + # configuration script generated by Autoconf, you may include it under + # the same distribution terms that you use for the rest of that program. + +-# Originally written by Per Bothner . +-# Please send patches to . Submit a context +-# diff and a properly formatted ChangeLog entry. ++ ++# Originally written by Per Bothner. Please send patches (context ++# diff format) to and include a ChangeLog ++# entry. + # + # This script attempts to guess a canonical system name similar to + # config.sub. If it succeeds, it prints the system name on stdout, and + # exits with 0. Otherwise, it exits with 1. + # +-# The plan is that this can be called by configure scripts if you +-# don't specify an explicit build system type. ++# You can get the latest version of this script from: ++# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD + + me=`echo "$0" | sed -e 's,.*/,,'` + +@@ -53,7 +54,8 @@ + GNU config.guess ($timestamp) + + Originally written by Per Bothner. +-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 ++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, ++2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 + Free Software Foundation, Inc. + + This is free software; see the source for copying conditions. There is NO +@@ -66,11 +68,11 @@ + while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) +- echo "$timestamp" ; exit 0 ;; ++ echo "$timestamp" ; exit ;; + --version | -v ) +- echo "$version" ; exit 0 ;; ++ echo "$version" ; exit ;; + --help | --h* | -h ) +- echo "$usage"; exit 0 ;; ++ echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. +@@ -104,7 +106,7 @@ + trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; + trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; + : ${TMPDIR=/tmp} ; +- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || ++ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +@@ -123,7 +125,7 @@ + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +-esac ;' ++esac ; set_cc_for_build= ;' + + # This is needed to find uname on a Pyramid OSx when run in the BSD universe. + # (ghazi@noc.rutgers.edu 1994-08-24) +@@ -141,7 +143,7 @@ + case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or +- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, ++ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward +@@ -158,6 +160,7 @@ + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; ++ sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched +@@ -166,7 +169,7 @@ + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ +- | grep __ELF__ >/dev/null ++ | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? +@@ -176,7 +179,7 @@ + fi + ;; + *) +- os=netbsd ++ os=netbsd + ;; + esac + # The OS release +@@ -196,71 +199,34 @@ + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" +- exit 0 ;; +- amd64:OpenBSD:*:*) +- echo x86_64-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- amiga:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- arc:OpenBSD:*:*) +- echo mipsel-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- cats:OpenBSD:*:*) +- echo arm-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- hp300:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- luna88k:OpenBSD:*:*) +- echo m88k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mac68k:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- macppc:OpenBSD:*:*) +- echo powerpc-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mvme68k:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mvme88k:OpenBSD:*:*) +- echo m88k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mvmeppc:OpenBSD:*:*) +- echo powerpc-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- pmax:OpenBSD:*:*) +- echo mipsel-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- sgi:OpenBSD:*:*) +- echo mipseb-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- sun3:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- wgrisc:OpenBSD:*:*) +- echo mipsel-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; ++ *:Bitrig:*:*) ++ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` ++ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} ++ exit ;; + *:OpenBSD:*:*) +- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; ++ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` ++ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} ++ exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; ++ *:SolidBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} ++ exit ;; + macppc:MirBSD:*:*) +- echo powerppc-unknown-mirbsd${UNAME_RELEASE} +- exit 0 ;; ++ echo powerpc-unknown-mirbsd${UNAME_RELEASE} ++ exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) +- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ++ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on +@@ -306,37 +272,46 @@ + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` +- exit 0 ;; ++ # Reset EXIT trap before exiting to avoid spurious non-zero exit code. ++ exitcode=$? ++ trap '' 0 ++ exit $exitcode ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix +- exit 0 ;; ++ exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 +- exit 0 ;; ++ exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 +- exit 0;; ++ exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos +- exit 0 ;; ++ exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos +- exit 0 ;; ++ exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition +- exit 0 ;; ++ exit ;; ++ *:z/VM:*:*) ++ echo s390-ibm-zvmoe ++ exit ;; + *:OS400:*:*) +- echo powerpc-ibm-os400 +- exit 0 ;; ++ echo powerpc-ibm-os400 ++ exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} +- exit 0;; ++ exit ;; ++ arm*:riscos:*:*|arm*:RISCOS:*:*) ++ echo arm-unknown-riscos ++ exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp +- exit 0;; ++ exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then +@@ -344,32 +319,51 @@ + else + echo pyramid-pyramid-bsd + fi +- exit 0 ;; ++ exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 +- exit 0 ;; ++ exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 +- exit 0 ;; +- DRS?6000:UNIX_SV:4.2*:7*) ++ exit ;; ++ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in +- sparc) echo sparc-icl-nx7 && exit 0 ;; ++ sparc) echo sparc-icl-nx7; exit ;; + esac ;; ++ s390x:SunOS:*:*) ++ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` ++ exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; +- i86pc:SunOS:5.*:*) +- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; ++ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) ++ echo i386-pc-auroraux${UNAME_RELEASE} ++ exit ;; ++ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) ++ eval $set_cc_for_build ++ SUN_ARCH="i386" ++ # If there is a compiler, see if it is configured for 64-bit objects. ++ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. ++ # This test works for both compilers. ++ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then ++ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ ++ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ ++ grep IS_64BIT_ARCH >/dev/null ++ then ++ SUN_ARCH="x86_64" ++ fi ++ fi ++ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` ++ exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) +@@ -378,10 +372,10 @@ + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` +- exit 0 ;; ++ exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 +@@ -393,10 +387,10 @@ + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac +- exit 0 ;; ++ exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor +@@ -406,41 +400,41 @@ + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) +- echo m68k-atari-mint${UNAME_RELEASE} +- exit 0 ;; ++ echo m68k-atari-mint${UNAME_RELEASE} ++ exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) +- echo m68k-atari-mint${UNAME_RELEASE} +- exit 0 ;; ++ echo m68k-atari-mint${UNAME_RELEASE} ++ exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) +- echo m68k-milan-mint${UNAME_RELEASE} +- exit 0 ;; ++ echo m68k-milan-mint${UNAME_RELEASE} ++ exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) +- echo m68k-hades-mint${UNAME_RELEASE} +- exit 0 ;; ++ echo m68k-hades-mint${UNAME_RELEASE} ++ exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) +- echo m68k-unknown-mint${UNAME_RELEASE} +- exit 0 ;; ++ echo m68k-unknown-mint${UNAME_RELEASE} ++ exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 +- exit 0 ;; ++ exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +@@ -464,35 +458,36 @@ + exit (-1); + } + EOF +- $CC_FOR_BUILD -o $dummy $dummy.c \ +- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ +- && exit 0 ++ $CC_FOR_BUILD -o $dummy $dummy.c && ++ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && ++ SYSTEM_NAME=`$dummy $dummyarg` && ++ { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax +- exit 0 ;; ++ exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax +- exit 0 ;; ++ exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax +- exit 0 ;; ++ exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix +- exit 0 ;; ++ exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 +- exit 0 ;; ++ exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 +- exit 0 ;; ++ exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 +- exit 0 ;; ++ exit ;; + AViiON:dgux:*:*) +- # DG/UX returns AViiON for all architectures +- UNAME_PROCESSOR=`/usr/bin/uname -p` ++ # DG/UX returns AViiON for all architectures ++ UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ +@@ -505,29 +500,29 @@ + else + echo i586-dg-dgux${UNAME_RELEASE} + fi +- exit 0 ;; ++ exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 +- exit 0 ;; ++ exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 +- exit 0 ;; ++ exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 +- exit 0 ;; ++ exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd +- exit 0 ;; ++ exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` +- exit 0 ;; ++ exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. +- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id +- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' ++ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id ++ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix +- exit 0 ;; ++ exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` +@@ -535,7 +530,7 @@ + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} +- exit 0 ;; ++ exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build +@@ -550,15 +545,19 @@ + exit(0); + } + EOF +- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 +- echo rs6000-ibm-aix3.2.5 ++ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` ++ then ++ echo "$SYSTEM_NAME" ++ else ++ echo rs6000-ibm-aix3.2.5 ++ fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi +- exit 0 ;; +- *:AIX:*:[45]) ++ exit ;; ++ *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 +@@ -571,28 +570,28 @@ + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} +- exit 0 ;; ++ exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix +- exit 0 ;; ++ exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 +- exit 0 ;; ++ exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to +- exit 0 ;; # report: romp-ibm BSD 4.3 ++ exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx +- exit 0 ;; ++ exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 +- exit 0 ;; ++ exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd +- exit 0 ;; ++ exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 +- exit 0 ;; ++ exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in +@@ -601,52 +600,52 @@ + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` +- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` +- case "${sc_cpu_version}" in +- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 +- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 +- 532) # CPU_PA_RISC2_0 +- case "${sc_kernel_bits}" in +- 32) HP_ARCH="hppa2.0n" ;; +- 64) HP_ARCH="hppa2.0w" ;; ++ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` ++ case "${sc_cpu_version}" in ++ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 ++ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 ++ 532) # CPU_PA_RISC2_0 ++ case "${sc_kernel_bits}" in ++ 32) HP_ARCH="hppa2.0n" ;; ++ 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 +- esac ;; +- esac ++ esac ;; ++ esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build +- sed 's/^ //' << EOF >$dummy.c ++ sed 's/^ //' << EOF >$dummy.c + +- #define _HPUX_SOURCE +- #include +- #include +- +- int main () +- { +- #if defined(_SC_KERNEL_BITS) +- long bits = sysconf(_SC_KERNEL_BITS); +- #endif +- long cpu = sysconf (_SC_CPU_VERSION); +- +- switch (cpu) +- { +- case CPU_PA_RISC1_0: puts ("hppa1.0"); break; +- case CPU_PA_RISC1_1: puts ("hppa1.1"); break; +- case CPU_PA_RISC2_0: +- #if defined(_SC_KERNEL_BITS) +- switch (bits) +- { +- case 64: puts ("hppa2.0w"); break; +- case 32: puts ("hppa2.0n"); break; +- default: puts ("hppa2.0"); break; +- } break; +- #else /* !defined(_SC_KERNEL_BITS) */ +- puts ("hppa2.0"); break; +- #endif +- default: puts ("hppa1.0"); break; +- } +- exit (0); +- } ++ #define _HPUX_SOURCE ++ #include ++ #include ++ ++ int main () ++ { ++ #if defined(_SC_KERNEL_BITS) ++ long bits = sysconf(_SC_KERNEL_BITS); ++ #endif ++ long cpu = sysconf (_SC_CPU_VERSION); ++ ++ switch (cpu) ++ { ++ case CPU_PA_RISC1_0: puts ("hppa1.0"); break; ++ case CPU_PA_RISC1_1: puts ("hppa1.1"); break; ++ case CPU_PA_RISC2_0: ++ #if defined(_SC_KERNEL_BITS) ++ switch (bits) ++ { ++ case 64: puts ("hppa2.0w"); break; ++ case 32: puts ("hppa2.0n"); break; ++ default: puts ("hppa2.0"); break; ++ } break; ++ #else /* !defined(_SC_KERNEL_BITS) */ ++ puts ("hppa2.0"); break; ++ #endif ++ default: puts ("hppa1.0"); break; ++ } ++ exit (0); ++ } + EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa +@@ -654,9 +653,19 @@ + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then +- # avoid double evaluation of $set_cc_for_build +- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build +- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null ++ eval $set_cc_for_build ++ ++ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating ++ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler ++ # generating 64-bit code. GNU and HP use different nomenclature: ++ # ++ # $ CC_FOR_BUILD=cc ./config.guess ++ # => hppa2.0w-hp-hpux11.23 ++ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess ++ # => hppa64-hp-hpux11.23 ++ ++ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | ++ grep -q __LP64__ + then + HP_ARCH="hppa2.0w" + else +@@ -664,11 +673,11 @@ + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} +- exit 0 ;; ++ exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} +- exit 0 ;; ++ exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +@@ -696,210 +705,269 @@ + exit (0); + } + EOF +- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 ++ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && ++ { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 +- exit 0 ;; ++ exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd +- exit 0 ;; ++ exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd +- exit 0 ;; ++ exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix +- exit 0 ;; ++ exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf +- exit 0 ;; ++ exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf +- exit 0 ;; ++ exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi +- exit 0 ;; ++ exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites +- exit 0 ;; ++ exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd +- exit 0 ;; ++ exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi +- exit 0 ;; ++ exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd +- exit 0 ;; ++ exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd +- exit 0 ;; ++ exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd +- exit 0 ;; ++ exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' +- exit 0 ;; ++ exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' +- exit 0 ;; ++ exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' +- exit 0 ;; ++ exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' +- exit 0 ;; ++ exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' +- exit 0 ;; ++ exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' +- exit 0 ;; ++ exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` +- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` +- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` +- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" +- exit 0 ;; ++ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` ++ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` ++ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" ++ exit ;; + 5000:UNIX_System_V:4.*:*) +- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` +- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` +- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" +- exit 0 ;; ++ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` ++ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` ++ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" ++ exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:FreeBSD:*:*) +- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` +- exit 0 ;; ++ UNAME_PROCESSOR=`/usr/bin/uname -p` ++ case ${UNAME_PROCESSOR} in ++ amd64) ++ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ *) ++ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ esac ++ exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin +- exit 0 ;; +- i*:MINGW*:*) ++ exit ;; ++ *:MINGW64*:*) ++ echo ${UNAME_MACHINE}-pc-mingw64 ++ exit ;; ++ *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 +- exit 0 ;; ++ exit ;; ++ i*:MSYS*:*) ++ echo ${UNAME_MACHINE}-pc-msys ++ exit ;; ++ i*:windows32*:*) ++ # uname -m includes "-pc" on this system. ++ echo ${UNAME_MACHINE}-mingw32 ++ exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 +- exit 0 ;; +- x86:Interix*:[34]*) +- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' +- exit 0 ;; ++ exit ;; ++ *:Interix*:*) ++ case ${UNAME_MACHINE} in ++ x86) ++ echo i586-pc-interix${UNAME_RELEASE} ++ exit ;; ++ authenticamd | genuineintel | EM64T) ++ echo x86_64-unknown-interix${UNAME_RELEASE} ++ exit ;; ++ IA64) ++ echo ia64-unknown-interix${UNAME_RELEASE} ++ exit ;; ++ esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks +- exit 0 ;; ++ exit ;; ++ 8664:Windows_NT:*) ++ echo x86_64-pc-mks ++ exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix +- exit 0 ;; ++ exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin +- exit 0 ;; ++ exit ;; ++ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) ++ echo x86_64-unknown-cygwin ++ exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin +- exit 0 ;; ++ exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` +- exit 0 ;; ++ exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu +- exit 0 ;; ++ exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix +- exit 0 ;; ++ exit ;; ++ aarch64:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ aarch64_be:Linux:*:*) ++ UNAME_MACHINE=aarch64_be ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ alpha:Linux:*:*) ++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in ++ EV5) UNAME_MACHINE=alphaev5 ;; ++ EV56) UNAME_MACHINE=alphaev56 ;; ++ PCA56) UNAME_MACHINE=alphapca56 ;; ++ PCA57) UNAME_MACHINE=alphapca56 ;; ++ EV6) UNAME_MACHINE=alphaev6 ;; ++ EV67) UNAME_MACHINE=alphaev67 ;; ++ EV68*) UNAME_MACHINE=alphaev68 ;; ++ esac ++ objdump --private-headers /bin/sh | grep -q ld.so.1 ++ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi ++ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ++ exit ;; + arm*:Linux:*:*) ++ eval $set_cc_for_build ++ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ ++ | grep -q __ARM_EABI__ ++ then ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ else ++ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ ++ | grep -q __ARM_PCS_VFP ++ then ++ echo ${UNAME_MACHINE}-unknown-linux-gnueabi ++ else ++ echo ${UNAME_MACHINE}-unknown-linux-gnueabihf ++ fi ++ fi ++ exit ;; ++ avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; ++ exit ;; + cris:Linux:*:*) +- echo cris-axis-linux-gnu +- exit 0 ;; +- ia64:Linux:*:*) ++ echo ${UNAME_MACHINE}-axis-linux-gnu ++ exit ;; ++ crisv32:Linux:*:*) ++ echo ${UNAME_MACHINE}-axis-linux-gnu ++ exit ;; ++ frv:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; +- m32r*:Linux:*:*) ++ exit ;; ++ hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; +- m68*:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; +- mips:Linux:*:*) ++ exit ;; ++ i*86:Linux:*:*) ++ LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +- #undef CPU +- #undef mips +- #undef mipsel +- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) +- CPU=mipsel +- #else +- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) +- CPU=mips +- #else +- CPU= +- #endif ++ #ifdef __dietlibc__ ++ LIBC=dietlibc + #endif + EOF +- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` +- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 +- ;; +- mips64:Linux:*:*) ++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` ++ echo "${UNAME_MACHINE}-pc-linux-${LIBC}" ++ exit ;; ++ ia64:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ m32r*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ m68*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU +- #undef mips64 +- #undef mips64el ++ #undef ${UNAME_MACHINE} ++ #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) +- CPU=mips64el ++ CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) +- CPU=mips64 ++ CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif + EOF +- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` +- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` ++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; +- ppc:Linux:*:*) +- echo powerpc-unknown-linux-gnu +- exit 0 ;; +- ppc64:Linux:*:*) +- echo powerpc64-unknown-linux-gnu +- exit 0 ;; +- alpha:Linux:*:*) +- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in +- EV5) UNAME_MACHINE=alphaev5 ;; +- EV56) UNAME_MACHINE=alphaev56 ;; +- PCA56) UNAME_MACHINE=alphapca56 ;; +- PCA57) UNAME_MACHINE=alphapca56 ;; +- EV6) UNAME_MACHINE=alphaev6 ;; +- EV67) UNAME_MACHINE=alphaev67 ;; +- EV68*) UNAME_MACHINE=alphaev68 ;; +- esac +- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null +- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi +- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} +- exit 0 ;; ++ or32:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ padre:Linux:*:*) ++ echo sparc-unknown-linux-gnu ++ exit ;; ++ parisc64:Linux:*:* | hppa64:Linux:*:*) ++ echo hppa64-unknown-linux-gnu ++ exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in +@@ -907,115 +975,71 @@ + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac +- exit 0 ;; +- parisc64:Linux:*:* | hppa64:Linux:*:*) +- echo hppa64-unknown-linux-gnu +- exit 0 ;; ++ exit ;; ++ ppc64:Linux:*:*) ++ echo powerpc64-unknown-linux-gnu ++ exit ;; ++ ppc:Linux:*:*) ++ echo powerpc-unknown-linux-gnu ++ exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux +- exit 0 ;; ++ exit ;; + sh64*:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; ++ exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; ++ exit ;; ++ tile*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ vax:Linux:*:*) ++ echo ${UNAME_MACHINE}-dec-linux-gnu ++ exit ;; + x86_64:Linux:*:*) +- echo x86_64-unknown-linux-gnu +- exit 0 ;; +- i*86:Linux:*:*) +- # The BFD linker knows what the default object file format is, so +- # first see if it will tell us. cd to the root directory to prevent +- # problems with other programs or directories called `ld' in the path. +- # Set LC_ALL=C to ensure ld outputs messages in English. +- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ +- | sed -ne '/supported targets:/!d +- s/[ ][ ]*/ /g +- s/.*supported targets: *// +- s/ .*// +- p'` +- case "$ld_supported_targets" in +- elf32-i386) +- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" +- ;; +- a.out-i386-linux) +- echo "${UNAME_MACHINE}-pc-linux-gnuaout" +- exit 0 ;; +- coff-i386) +- echo "${UNAME_MACHINE}-pc-linux-gnucoff" +- exit 0 ;; +- "") +- # Either a pre-BFD a.out linker (linux-gnuoldld) or +- # one that does not give us useful --help. +- echo "${UNAME_MACHINE}-pc-linux-gnuoldld" +- exit 0 ;; +- esac +- # Determine whether the default compiler is a.out or elf +- eval $set_cc_for_build +- sed 's/^ //' << EOF >$dummy.c +- #include +- #ifdef __ELF__ +- # ifdef __GLIBC__ +- # if __GLIBC__ >= 2 +- LIBC=gnu +- # else +- LIBC=gnulibc1 +- # endif +- # else +- LIBC=gnulibc1 +- # endif +- #else +- #ifdef __INTEL_COMPILER +- LIBC=gnu +- #else +- LIBC=gnuaout +- #endif +- #endif +- #ifdef __dietlibc__ +- LIBC=dietlibc +- #endif +-EOF +- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` +- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 +- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 +- ;; ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ xtensa*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 +- exit 0 ;; ++ exit ;; + i*86:UNIX_SV:4.2MP:2.*) +- # Unixware is an offshoot of SVR4, but it has its own version +- # number series starting with 2... +- # I am not positive that other SVR4 systems won't match this, ++ # Unixware is an offshoot of SVR4, but it has its own version ++ # number series starting with 2... ++ # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. +- # Use sysv4.2uw... so that sysv4* matches it. ++ # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} +- exit 0 ;; ++ exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx +- exit 0 ;; ++ exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop +- exit 0 ;; ++ exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos +- exit 0 ;; +- i*86:syllable:*:*) ++ exit ;; ++ i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable +- exit 0 ;; +- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) ++ exit ;; ++ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp +- exit 0 ;; ++ exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then +@@ -1023,15 +1047,16 @@ + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi +- exit 0 ;; +- i*86:*:5:[78]*) ++ exit ;; ++ i*86:*:5:[678]*) ++ # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} +- exit 0 ;; ++ exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi +- exit 0 ;; ++ exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv +- exit 0 ;; ++ exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv +- exit 0 ;; ++ exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix +- exit 0 ;; ++ exit ;; + M68*:*:R3V[5678]*:*) +- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; ++ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ +- && echo i486-ncr-sysv4.3${OS_REL} && exit 0 ++ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ +- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; ++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) +- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ +- && echo i486-ncr-sysv4 && exit 0 ;; ++ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ ++ && { echo i486-ncr-sysv4; exit; } ;; ++ NCR*:*:4.2:* | MPRAS*:*:4.2:*) ++ OS_REL='.3' ++ test -r /etc/.relid \ ++ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` ++ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ ++ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } ++ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ ++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ++ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ ++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 +- exit 0 ;; ++ exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} +- exit 0 ;; +- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) ++ exit ;; ++ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 +- exit 0 ;; ++ exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 +- exit 0 ;; ++ exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` +@@ -1123,69 +1161,97 @@ + else + echo ns32k-sni-sysv + fi +- exit 0 ;; +- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort +- # says +- echo i586-unisys-sysv4 +- exit 0 ;; ++ exit ;; ++ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort ++ # says ++ echo i586-unisys-sysv4 ++ exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 +- exit 0 ;; ++ exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 +- exit 0 ;; ++ exit ;; ++ i*86:VOS:*:*) ++ # From Paul.Green@stratus.com. ++ echo ${UNAME_MACHINE}-stratus-vos ++ exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos +- exit 0 ;; ++ exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 +- exit 0 ;; ++ exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then +- echo mips-nec-sysv${UNAME_RELEASE} ++ echo mips-nec-sysv${UNAME_RELEASE} + else +- echo mips-unknown-sysv${UNAME_RELEASE} ++ echo mips-unknown-sysv${UNAME_RELEASE} + fi +- exit 0 ;; ++ exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos +- exit 0 ;; ++ exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos +- exit 0 ;; ++ exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos +- exit 0 ;; ++ exit ;; ++ BePC:Haiku:*:*) # Haiku running on Intel PC compatible. ++ echo i586-pc-haiku ++ exit ;; ++ x86_64:Haiku:*:*) ++ echo x86_64-unknown-haiku ++ exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; ++ SX-7:SUPER-UX:*:*) ++ echo sx7-nec-superux${UNAME_RELEASE} ++ exit ;; ++ SX-8:SUPER-UX:*:*) ++ echo sx8-nec-superux${UNAME_RELEASE} ++ exit ;; ++ SX-8R:SUPER-UX:*:*) ++ echo sx8r-nec-superux${UNAME_RELEASE} ++ exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in +- *86) UNAME_PROCESSOR=i686 ;; ++ i386) ++ eval $set_cc_for_build ++ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then ++ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ ++ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ ++ grep IS_64BIT_ARCH >/dev/null ++ then ++ UNAME_PROCESSOR="x86_64" ++ fi ++ fi ;; + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then +@@ -1193,22 +1259,28 @@ + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:QNX:*:4*) + echo i386-pc-qnx +- exit 0 ;; ++ exit ;; ++ NEO-?:NONSTOP_KERNEL:*:*) ++ echo neo-tandem-nsk${UNAME_RELEASE} ++ exit ;; ++ NSE-*:NONSTOP_KERNEL:*:*) ++ echo nse-tandem-nsk${UNAME_RELEASE} ++ exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux +- exit 0 ;; ++ exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv +- exit 0 ;; ++ exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 +@@ -1219,43 +1291,55 @@ + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 +- exit 0 ;; ++ exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 +- exit 0 ;; ++ exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex +- exit 0 ;; ++ exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 +- exit 0 ;; ++ exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 +- exit 0 ;; ++ exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 +- exit 0 ;; ++ exit ;; + *:ITS:*:*) + echo pdp10-unknown-its +- exit 0 ;; ++ exit ;; + SEI:*:*:SEIUX) +- echo mips-sei-seiux${UNAME_RELEASE} +- exit 0 ;; ++ echo mips-sei-seiux${UNAME_RELEASE} ++ exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` +- exit 0 ;; ++ exit ;; + *:*VMS:*:*) +- UNAME_MACHINE=`(uname -p) 2>/dev/null` ++ UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in +- A*) echo alpha-dec-vms && exit 0 ;; +- I*) echo ia64-dec-vms && exit 0 ;; +- V*) echo vax-dec-vms && exit 0 ;; +- esac ++ A*) echo alpha-dec-vms ; exit ;; ++ I*) echo ia64-dec-vms ; exit ;; ++ V*) echo vax-dec-vms ; exit ;; ++ esac ;; ++ *:XENIX:*:SysV) ++ echo i386-pc-xenix ++ exit ;; ++ i*86:skyos:*:*) ++ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' ++ exit ;; ++ i*86:rdos:*:*) ++ echo ${UNAME_MACHINE}-pc-rdos ++ exit ;; ++ i*86:AROS:*:*) ++ echo ${UNAME_MACHINE}-pc-aros ++ exit ;; ++ x86_64:VMkernel:*:*) ++ echo ${UNAME_MACHINE}-unknown-esx ++ exit ;; + esac + +-#echo '(No uname command or uname output not recognized.)' 1>&2 +-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 +- + eval $set_cc_for_build + cat >$dummy.c < + printf ("m68k-sony-newsos%s\n", + #ifdef NEWSOS4 +- "4" ++ "4" + #else +- "" ++ "" + #endif +- ); exit (0); ++ ); exit (0); + #endif + #endif + + #if defined (__arm) && defined (__acorn) && defined (__unix) +- printf ("arm-acorn-riscix"); exit (0); ++ printf ("arm-acorn-riscix\n"); exit (0); + #endif + + #if defined (hp300) && !defined (hpux) +@@ -1371,11 +1455,12 @@ + } + EOF + +-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 ++$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && ++ { echo "$SYSTEM_NAME"; exit; } + + # Apollos put the system type in the environment. + +-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } ++test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + + # Convex versions that predate uname can use getsysinfo(1) + +@@ -1384,22 +1469,22 @@ + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd +- exit 0 ;; ++ exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi +- exit 0 ;; ++ exit ;; + c34*) + echo c34-convex-bsd +- exit 0 ;; ++ exit ;; + c38*) + echo c38-convex-bsd +- exit 0 ;; ++ exit ;; + c4*) + echo c4-convex-bsd +- exit 0 ;; ++ exit ;; + esac + fi + +@@ -1410,7 +1495,9 @@ + the operating system you are using. It is advised that you + download the most up to date version of the config scripts from + +- ftp://ftp.gnu.org/pub/gnu/config/ ++ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD ++and ++ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + + If the version you run ($0) is already up to date, please + send the following data and any information you think might be +diff -urN hunspell-1.3.2/config.sub hunspell-1.3.2-aarch64/config.sub +--- hunspell-1.3.2/config.sub 2010-02-23 03:08:48.000000000 -0600 ++++ hunspell-1.3.2-aarch64/config.sub 2013-03-08 00:25:55.399797555 -0600 +@@ -1,9 +1,10 @@ + #! /bin/sh + # Configuration validation subroutine script. + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +-# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ++# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, ++# 2011, 2012 Free Software Foundation, Inc. + +-timestamp='2004-06-24' ++timestamp='2012-10-10' + + # This file is (in principle) common to ALL GNU software. + # The presence of a machine in this file suggests that SOME GNU software +@@ -20,23 +21,25 @@ + # GNU General Public License for more details. + # + # You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place - Suite 330, +-# Boston, MA 02111-1307, USA. +- ++# along with this program; if not, see . ++# + # As a special exception to the GNU General Public License, if you + # distribute this file as part of a program that contains a + # configuration script generated by Autoconf, you may include it under + # the same distribution terms that you use for the rest of that program. + ++ + # Please send patches to . Submit a context +-# diff and a properly formatted ChangeLog entry. ++# diff and a properly formatted GNU ChangeLog entry. + # + # Configuration subroutine to validate and canonicalize a configuration type. + # Supply the specified configuration type as an argument. + # If it is invalid, we print an error message on stderr and exit with code 1. + # Otherwise, we print the canonical config type on stdout and succeed. + ++# You can get the latest version of this script from: ++# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD ++ + # This file is supposed to be the same for all GNU packages + # and recognize all the CPU types, system types and aliases + # that are meaningful with *any* GNU software. +@@ -70,7 +73,8 @@ + version="\ + GNU config.sub ($timestamp) + +-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 ++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, ++2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 + Free Software Foundation, Inc. + + This is free software; see the source for copying conditions. There is NO +@@ -83,11 +87,11 @@ + while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) +- echo "$timestamp" ; exit 0 ;; ++ echo "$timestamp" ; exit ;; + --version | -v ) +- echo "$version" ; exit 0 ;; ++ echo "$version" ; exit ;; + --help | --h* | -h ) +- echo "$usage"; exit 0 ;; ++ echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. +@@ -99,7 +103,7 @@ + *local*) + # First pass through any local machine types. + echo $1 +- exit 0;; ++ exit ;; + + * ) + break ;; +@@ -118,11 +122,18 @@ + # Here we must recognize all the valid KERNEL-OS combinations. + maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` + case $maybe_os in +- nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ +- kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) ++ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ ++ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ ++ knetbsd*-gnu* | netbsd*-gnu* | \ ++ kopensolaris*-gnu* | \ ++ storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; ++ android-linux) ++ os=-linux-android ++ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ++ ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] +@@ -145,10 +156,13 @@ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ +- -apple | -axis | -knuth | -cray) ++ -apple | -axis | -knuth | -cray | -microblaze*) + os= + basic_machine=$1 + ;; ++ -bluegene*) ++ os=-cnk ++ ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 +@@ -163,13 +177,17 @@ + os=-chorusos + basic_machine=$1 + ;; +- -chorusrdb) +- os=-chorusrdb ++ -chorusrdb) ++ os=-chorusrdb + basic_machine=$1 +- ;; ++ ;; + -hiux*) + os=-hiuxwe2 + ;; ++ -sco6) ++ os=-sco5v6 ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` +@@ -186,6 +204,10 @@ + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; ++ -sco5v6*) ++ # Don't forget version if it is 3.2v4 or newer. ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` +@@ -203,6 +225,12 @@ + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; ++ -lynx*178) ++ os=-lynxos178 ++ ;; ++ -lynx*5) ++ os=-lynxos5 ++ ;; + -lynx*) + os=-lynxos + ;; +@@ -227,25 +255,36 @@ + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ ++ | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ +- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ ++ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ ++ | be32 | be64 \ ++ | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ +- | fr30 | frv \ ++ | epiphany \ ++ | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ ++ | hexagon \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ +- | m32r | m32rle | m68000 | m68k | m88k | mcore \ ++ | le32 | le64 \ ++ | lm32 \ ++ | m32c | m32r | m32rle | m68000 | m68k | m88k \ ++ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ +- | mips64vr | mips64vrel \ ++ | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ ++ | mips64r5900 | mips64r5900el \ ++ | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ ++ | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ +@@ -254,30 +293,65 @@ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ ++ | moxie \ ++ | mt \ + | msp430 \ ++ | nds32 | nds32le | nds32be \ ++ | nios | nios2 \ + | ns16k | ns32k \ +- | openrisc | or32 \ ++ | open8 \ ++ | or32 \ + | pdp10 | pdp11 | pj | pjl \ +- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ ++ | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pyramid \ +- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ ++ | rl78 | rx \ ++ | score \ ++ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ +- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ +- | strongarm \ +- | tahoe | thumb | tic4x | tic80 | tron \ +- | v850 | v850e \ ++ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ ++ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ ++ | spu \ ++ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ ++ | ubicom32 \ ++ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | we32k \ +- | x86 | xscale | xstormy16 | xtensa \ +- | z8k) ++ | x86 | xc16x | xstormy16 | xtensa \ ++ | z8k | z80) + basic_machine=$basic_machine-unknown + ;; +- m6811 | m68hc11 | m6812 | m68hc12) +- # Motorola 68HC11/12. ++ c54x) ++ basic_machine=tic54x-unknown ++ ;; ++ c55x) ++ basic_machine=tic55x-unknown ++ ;; ++ c6x) ++ basic_machine=tic6x-unknown ++ ;; ++ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; ++ ms1) ++ basic_machine=mt-unknown ++ ;; ++ ++ strongarm | thumb | xscale) ++ basic_machine=arm-unknown ++ ;; ++ xgate) ++ basic_machine=$basic_machine-unknown ++ os=-none ++ ;; ++ xscaleeb) ++ basic_machine=armeb-unknown ++ ;; ++ ++ xscaleel) ++ basic_machine=armel-unknown ++ ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and +@@ -293,32 +367,41 @@ + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ ++ | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ +- | avr-* \ +- | bs2000-* \ +- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ ++ | avr-* | avr32-* \ ++ | be32-* | be64-* \ ++ | bfin-* | bs2000-* \ ++ | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ +- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ ++ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ ++ | hexagon-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ +- | m32r-* | m32rle-* \ ++ | le32-* | le64-* \ ++ | lm32-* \ ++ | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ +- | m88110-* | m88k-* | mcore-* \ ++ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ ++ | microblaze-* | microblazeel-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ +- | mips64vr-* | mips64vrel-* \ ++ | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ ++ | mips64r5900-* | mips64r5900el-* \ ++ | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ ++ | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ +@@ -327,26 +410,38 @@ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ ++ | mt-* \ + | msp430-* \ ++ | nds32-* | nds32le-* | nds32be-* \ ++ | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ ++ | open8-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ +- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ ++ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pyramid-* \ +- | romp-* | rs6000-* \ +- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ ++ | rl78-* | romp-* | rs6000-* | rx-* \ ++ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ +- | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ +- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ +- | tahoe-* | thumb-* \ ++ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ ++ | sparclite-* \ ++ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ ++ | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ ++ | tile*-* \ + | tron-* \ +- | v850-* | v850e-* | vax-* \ ++ | ubicom32-* \ ++ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ ++ | vax-* \ + | we32k-* \ +- | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ +- | xtensa-* \ ++ | x86-* | x86_64-* | xc16x-* | xps100-* \ ++ | xstormy16-* | xtensa*-* \ + | ymp-* \ +- | z8k-*) ++ | z8k-* | z80-*) ++ ;; ++ # Recognize the basic CPU types without company name, with glob match. ++ xtensa*) ++ basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. +@@ -364,7 +459,7 @@ + basic_machine=a29k-amd + os=-udi + ;; +- abacus) ++ abacus) + basic_machine=abacus-unknown + ;; + adobe68k) +@@ -410,6 +505,10 @@ + basic_machine=m68k-apollo + os=-bsd + ;; ++ aros) ++ basic_machine=i386-pc ++ os=-aros ++ ;; + aux) + basic_machine=m68k-apple + os=-aux +@@ -418,10 +517,35 @@ + basic_machine=ns32k-sequent + os=-dynix + ;; ++ blackfin) ++ basic_machine=bfin-unknown ++ os=-linux ++ ;; ++ blackfin-*) ++ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` ++ os=-linux ++ ;; ++ bluegene*) ++ basic_machine=powerpc-ibm ++ os=-cnk ++ ;; ++ c54x-*) ++ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ c55x-*) ++ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ c6x-*) ++ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; ++ cegcc) ++ basic_machine=arm-unknown ++ os=-cegcc ++ ;; + convex-c1) + basic_machine=c1-convex + os=-bsd +@@ -450,13 +574,16 @@ + basic_machine=craynv-cray + os=-unicosmp + ;; +- cr16c) +- basic_machine=cr16c-unknown ++ cr16 | cr16-*) ++ basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; ++ crisv32 | crisv32-* | etraxfs*) ++ basic_machine=crisv32-axis ++ ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; +@@ -486,6 +613,14 @@ + basic_machine=m88k-motorola + os=-sysv3 + ;; ++ dicos) ++ basic_machine=i686-pc ++ os=-dicos ++ ;; ++ djgpp) ++ basic_machine=i586-pc ++ os=-msdosdjgpp ++ ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx +@@ -597,7 +732,6 @@ + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +-# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 +@@ -636,6 +770,14 @@ + basic_machine=m68k-isi + os=-sysv + ;; ++ m68knommu) ++ basic_machine=m68k-unknown ++ os=-linux ++ ;; ++ m68knommu-*) ++ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` ++ os=-linux ++ ;; + m88k-omron*) + basic_machine=m88k-omron + ;; +@@ -647,10 +789,21 @@ + basic_machine=ns32k-utek + os=-sysv + ;; ++ microblaze*) ++ basic_machine=microblaze-xilinx ++ ;; ++ mingw64) ++ basic_machine=x86_64-pc ++ os=-mingw64 ++ ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; ++ mingw32ce) ++ basic_machine=arm-unknown ++ os=-mingw32ce ++ ;; + miniframe) + basic_machine=m68000-convergent + ;; +@@ -676,10 +829,21 @@ + basic_machine=i386-pc + os=-msdos + ;; ++ ms1-*) ++ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ++ ;; ++ msys) ++ basic_machine=i386-pc ++ os=-msys ++ ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; ++ nacl) ++ basic_machine=le32-unknown ++ os=-nacl ++ ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 +@@ -744,6 +908,12 @@ + np1) + basic_machine=np1-gould + ;; ++ neo-tandem) ++ basic_machine=neo-tandem ++ ;; ++ nse-tandem) ++ basic_machine=nse-tandem ++ ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; +@@ -751,9 +921,8 @@ + basic_machine=hppa1.1-oki + os=-proelf + ;; +- or32 | or32-*) ++ openrisc | openrisc-*) + basic_machine=or32-unknown +- os=-coff + ;; + os400) + basic_machine=powerpc-ibm +@@ -775,6 +944,14 @@ + basic_machine=i860-intel + os=-osf + ;; ++ parisc) ++ basic_machine=hppa-unknown ++ os=-linux ++ ;; ++ parisc-*) ++ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` ++ os=-linux ++ ;; + pbd) + basic_machine=sparc-tti + ;; +@@ -784,6 +961,12 @@ + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; ++ pc98) ++ basic_machine=i386-pc ++ ;; ++ pc98-*) ++ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; +@@ -813,9 +996,10 @@ + ;; + power) basic_machine=power-ibm + ;; +- ppc) basic_machine=powerpc-unknown ++ ppc | ppcbe) basic_machine=powerpc-unknown + ;; +- ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ppc-* | ppcbe-*) ++ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown +@@ -840,6 +1024,10 @@ + basic_machine=i586-unknown + os=-pw32 + ;; ++ rdos) ++ basic_machine=i386-pc ++ os=-rdos ++ ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff +@@ -866,6 +1054,10 @@ + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; ++ sde) ++ basic_machine=mipsisa32-sde ++ os=-elf ++ ;; + sei) + basic_machine=mips-sei + os=-seiux +@@ -877,6 +1069,9 @@ + basic_machine=sh-hitachi + os=-hms + ;; ++ sh5el) ++ basic_machine=sh5le-unknown ++ ;; + sh64) + basic_machine=sh64-unknown + ;; +@@ -898,6 +1093,9 @@ + basic_machine=i860-stratus + os=-sysv4 + ;; ++ strongarm-* | thumb-*) ++ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; + sun2) + basic_machine=m68000-sun + ;; +@@ -954,17 +1152,9 @@ + basic_machine=t90-cray + os=-unicos + ;; +- tic54x | c54x*) +- basic_machine=tic54x-unknown +- os=-coff +- ;; +- tic55x | c55x*) +- basic_machine=tic55x-unknown +- os=-coff +- ;; +- tic6x | c6x*) +- basic_machine=tic6x-unknown +- os=-coff ++ tile*) ++ basic_machine=$basic_machine-unknown ++ os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown +@@ -1026,9 +1216,16 @@ + basic_machine=hppa1.1-winbond + os=-proelf + ;; ++ xbox) ++ basic_machine=i686-pc ++ os=-mingw32 ++ ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; ++ xscale-* | xscalee[bl]-*) ++ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ++ ;; + ymp) + basic_machine=ymp-cray + os=-unicos +@@ -1037,6 +1234,10 @@ + basic_machine=z8k-unknown + os=-sim + ;; ++ z80-*-coff) ++ basic_machine=z80-unknown ++ os=-sim ++ ;; + none) + basic_machine=none-none + os=-none +@@ -1075,13 +1276,10 @@ + we32k) + basic_machine=we32k-att + ;; +- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) ++ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; +- sh64) +- basic_machine=sh64-unknown +- ;; +- sparc | sparcv8 | sparcv9 | sparcv9b) ++ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) +@@ -1125,9 +1323,12 @@ + if [ x"$os" != x"" ] + then + case $os in +- # First match some system type aliases +- # that might get confused with valid system types. ++ # First match some system type aliases ++ # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. ++ -auroraux) ++ os=-auroraux ++ ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; +@@ -1148,26 +1349,31 @@ + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ +- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ +- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ ++ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ ++ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ ++ | -sym* | -kopensolaris* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ +- | -aos* \ ++ | -aos* | -aros* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ +- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ ++ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ ++ | -bitrig* | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ +- | -chorusos* | -chorusrdb* \ +- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ +- | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ ++ | -chorusos* | -chorusrdb* | -cegcc* \ ++ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ ++ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ ++ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ ++ | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ +- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) ++ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ ++ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) +@@ -1185,7 +1391,7 @@ + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ +- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ ++ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) +@@ -1206,7 +1412,7 @@ + -opened*) + os=-openedition + ;; +- -os400*) ++ -os400*) + os=-os400 + ;; + -wince*) +@@ -1255,7 +1461,7 @@ + -sinix*) + os=-sysv4 + ;; +- -tpf*) ++ -tpf*) + os=-tpf + ;; + -triton*) +@@ -1294,6 +1500,14 @@ + -kaos*) + os=-kaos + ;; ++ -zvmoe) ++ os=-zvmoe ++ ;; ++ -dicos*) ++ os=-dicos ++ ;; ++ -nacl*) ++ ;; + -none) + ;; + *) +@@ -1316,6 +1530,12 @@ + # system, and we'll never get to this point. + + case $basic_machine in ++ score-*) ++ os=-elf ++ ;; ++ spu-*) ++ os=-elf ++ ;; + *-acorn) + os=-riscix1.2 + ;; +@@ -1325,9 +1545,21 @@ + arm*-semi) + os=-aout + ;; +- c4x-* | tic4x-*) +- os=-coff +- ;; ++ c4x-* | tic4x-*) ++ os=-coff ++ ;; ++ hexagon-*) ++ os=-elf ++ ;; ++ tic54x-*) ++ os=-coff ++ ;; ++ tic55x-*) ++ os=-coff ++ ;; ++ tic6x-*) ++ os=-coff ++ ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 +@@ -1346,13 +1578,13 @@ + ;; + m68000-sun) + os=-sunos3 +- # This also exists in the configure program, but was not the +- # default. +- # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; ++ mep-*) ++ os=-elf ++ ;; + mips*-cisco) + os=-elf + ;; +@@ -1371,10 +1603,13 @@ + *-be) + os=-beos + ;; ++ *-haiku) ++ os=-haiku ++ ;; + *-ibm) + os=-aix + ;; +- *-knuth) ++ *-knuth) + os=-mmixware + ;; + *-wec) +@@ -1479,7 +1714,7 @@ + -sunos*) + vendor=sun + ;; +- -aix*) ++ -cnk*|-aix*) + vendor=ibm + ;; + -beos*) +@@ -1542,7 +1777,7 @@ + esac + + echo $basic_machine$os +-exit 0 ++exit + + # Local variables: + # eval: (add-hook 'write-file-hooks 'time-stamp) diff --git a/hunspell.spec b/hunspell.spec index 53b4fd5..fd012f2 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.3.2 -Release: 10%{?dist} +Release: 11%{?dist} Source: http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz Group: System Environment/Libraries URL: http://hunspell.sourceforge.net/ @@ -19,6 +19,7 @@ BuildRequires: words Requires: hunspell-en-US Patch0: hunspell.rhbz759647.patch Patch1: hunspell.rhbz918938.patch +Patch2: hunspell-aarch64.patch %description Hunspell is a spell checker and morphological analyzer library and program @@ -38,6 +39,7 @@ Includes and definitions for developing with hunspell %setup -q %patch0 -p0 -b .rhbz759647 %patch1 -p0 -b .rhbz918938 +%patch2 -p1 -b .aarch64 %build configureflags="--disable-rpath --disable-static --with-ui --with-readline" @@ -127,6 +129,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/hunspell.3.gz %changelog +* Thu Apr 04 2013 Caolán McNamara - 1.3.2-11 +- Resolves: rhbz#925562 support aarch64 + * Wed Mar 13 2013 Caolán McNamara - 1.3.2-10 - Resolves: rhbz#918938 crash in danish thesaurus/spell interaction From d7ebd2551d18e1d7c4e644b1a0384d0d7fafe84e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Thu, 18 Jul 2013 01:40:15 +0200 Subject: [PATCH 12/91] Perl 5.18 rebuild --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index fd012f2..1a638b9 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.3.2 -Release: 11%{?dist} +Release: 12%{?dist} Source: http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz Group: System Environment/Libraries URL: http://hunspell.sourceforge.net/ @@ -129,6 +129,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/hunspell.3.gz %changelog +* Wed Jul 17 2013 Petr Pisar - 1.3.2-12 +- Perl 5.18 rebuild + * Thu Apr 04 2013 Caolán McNamara - 1.3.2-11 - Resolves: rhbz#925562 support aarch64 From f83437d3bc8d1484f83cc202318c1ae1c9d577d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 25 Jul 2013 09:34:02 +0100 Subject: [PATCH 13/91] Resolves: rhbz#985052 layout problems with very long lines --- hunspell.rhbz985052.patch | 84 +++++++++++++++++++++++++++++++++++++++ hunspell.spec | 11 +++-- 2 files changed, 92 insertions(+), 3 deletions(-) create mode 100644 hunspell.rhbz985052.patch diff --git a/hunspell.rhbz985052.patch b/hunspell.rhbz985052.patch new file mode 100644 index 0000000..f2791a0 --- /dev/null +++ b/hunspell.rhbz985052.patch @@ -0,0 +1,84 @@ +Index: man/hunspell.1 +=================================================================== +RCS file: /cvsroot/hunspell/hunspell/man/hunspell.1,v +retrieving revision 1.4 +diff -u -r1.4 hunspell.1 +--- man/hunspell.1 13 Jun 2013 19:13:50 -0000 1.4 ++++ man/hunspell.1 25 Jul 2013 08:26:50 -0000 +@@ -385,5 +385,3 @@ + see hunspell(3). + .PP + This manual based on Ispell's manual. See ispell(1). +-.SH BUGS +-There are some layout problems with long lines. +Index: src/tools/hunspell.cxx +=================================================================== +RCS file: /cvsroot/hunspell/hunspell/src/tools/hunspell.cxx,v +retrieving revision 1.34 +diff -u -r1.34 hunspell.cxx +--- src/tools/hunspell.cxx 13 Jun 2013 19:37:30 -0000 1.34 ++++ src/tools/hunspell.cxx 25 Jul 2013 08:26:50 -0000 +@@ -854,18 +854,19 @@ + // like mbstowcs which isn't quite correct, but close enough for western + // text in UTF-8 + void strncpyu8(char * dest, const char * src, int begin, int n) { +- int u8 = ((ui_enc != NULL) && (strcmp(ui_enc, "UTF-8") == 0)) ? 1 : 0; +- int i = 0; +- while (i < begin + n) { +- if (i >= begin) +- { +- if (!*src) +- break; +- *dest++ = *src; ++ if (n) { ++ int u8 = ((ui_enc != NULL) && (strcmp(ui_enc, "UTF-8") == 0)) ? 1 : 0; ++ for (int i = 0; i < begin + n;) { ++ if (!*src) break; // source is at it's end ++ if (!u8 || (*src & 0xc0) != 0x80) i++; // new character ++ if(i > begin){ // copy char (w/ utf-8 bytes) ++ *dest++ = *src++; ++ while(u8 && (*src & 0xc0) == 0x80) *dest++ = *src++; ++ }else{ // skip char (w/ utf-8 bytes) ++ ++src; ++ while(u8 && (*src & 0xc0) == 0x80) ++src; ++ } + } +- if (!u8 || (*src & 0xc0) != 0x80) +- i++; +- ++src; + } + *dest = '\0'; + } +@@ -902,8 +903,6 @@ + expand_tab(lines[i], chenc(parser->get_prevline(i), io_enc, ui_enc), MAXLNLEN); + } + +- int prevline = 0; +- + strncpy(line, parser->get_prevline(0), parser->get_tokenpos()); + line[parser->get_tokenpos()] = '\0'; + int tokenbeg = expand_tab(line2, chenc(line, io_enc, ui_enc), MAXLNLEN); +@@ -912,10 +911,13 @@ + line[parser->get_tokenpos() + strlen(token)] = '\0'; + int tokenend = expand_tab(line2, chenc(line, io_enc, ui_enc), MAXLNLEN); + +- int rowindex = tokenend / x; ++ int rowindex = (tokenend - 1) / x; + int beginrow = rowindex - tokenbeg / x; + if (beginrow >= MAXPREVLINE) beginrow = MAXPREVLINE - 1; + ++ int ri = rowindex; ++ int prevline = 0; ++ + for (int i = 0; i < MAXPREVLINE; i++) { + strncpyu8(line, lines[prevline], x * rowindex, x); + mvprintw(MAXPREVLINE + 1 - i, 0, "%s", line); +@@ -927,7 +929,7 @@ + } + + int linestartpos = tokenbeg - (tokenbeg % x); +- strncpyu8(line, lines[0], x * rowindex + linestartpos, tokenbeg % x); ++ strncpyu8(line, lines[0], x * (ri - beginrow), tokenbeg % x) ; + mvprintw(MAXPREVLINE + 1 - beginrow, 0, "%s", line); + attron(A_REVERSE); + printw("%s", chenc(token, io_enc, ui_enc)); diff --git a/hunspell.spec b/hunspell.spec index 1a638b9..2ce91af 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.3.2 -Release: 12%{?dist} +Release: 13%{?dist} Source: http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz Group: System Environment/Libraries URL: http://hunspell.sourceforge.net/ @@ -20,6 +20,7 @@ Requires: hunspell-en-US Patch0: hunspell.rhbz759647.patch Patch1: hunspell.rhbz918938.patch Patch2: hunspell-aarch64.patch +Patch3: hunspell.rhbz985052.patch %description Hunspell is a spell checker and morphological analyzer library and program @@ -40,6 +41,7 @@ Includes and definitions for developing with hunspell %patch0 -p0 -b .rhbz759647 %patch1 -p0 -b .rhbz918938 %patch2 -p1 -b .aarch64 +%patch3 -p0 -b .rhbz985052 %build configureflags="--disable-rpath --disable-static --with-ui --with-readline" @@ -129,6 +131,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/hunspell.3.gz %changelog +* Thu Jul 25 2013 Caolán McNamara - 1.3.2-13 +- Resolves: rhbz#985052 layout problems with very long lines + * Wed Jul 17 2013 Petr Pisar - 1.3.2-12 - Perl 5.18 rebuild @@ -288,10 +293,10 @@ rm -rf $RPM_BUILD_ROOT - Drop ABI breaking hunspell-1.2.2-xulrunner.pita.patch and fix the hunspell include in xulrunner. -* Fri Jun 18 2008 Caolán McNamara - 1.2.4.2-1 +* Wed Jun 18 2008 Caolán McNamara - 1.2.4.2-1 - latest version -* Thu Jun 17 2008 Caolán McNamara - 1.2.4-1 +* Tue Jun 17 2008 Caolán McNamara - 1.2.4-1 - latest version * Fri May 16 2008 Caolán McNamara - 1.2.2-3 From 8852eff0e170c87447686cfd029d895cdeb8b290 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Sat, 3 Aug 2013 14:08:10 +0200 Subject: [PATCH 14/91] Perl 5.18 rebuild --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index 2ce91af..402f89b 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.3.2 -Release: 13%{?dist} +Release: 14%{?dist} Source: http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz Group: System Environment/Libraries URL: http://hunspell.sourceforge.net/ @@ -131,6 +131,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/hunspell.3.gz %changelog +* Sat Aug 03 2013 Petr Pisar - 1.3.2-14 +- Perl 5.18 rebuild + * Thu Jul 25 2013 Caolán McNamara - 1.3.2-13 - Resolves: rhbz#985052 layout problems with very long lines From a3e3346dd9c6b8d508a6b5ebf055eec4ccbe4662 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 15 Oct 2013 11:37:22 +0100 Subject: [PATCH 15/91] Resolves: rhbz#1019158 esc space in man page --- hunspell.spec | 7 ++++++- manpage.esc.space.patch | 12 ++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 manpage.esc.space.patch diff --git a/hunspell.spec b/hunspell.spec index 402f89b..c5b02d3 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.3.2 -Release: 14%{?dist} +Release: 15%{?dist} Source: http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz Group: System Environment/Libraries URL: http://hunspell.sourceforge.net/ @@ -21,6 +21,7 @@ Patch0: hunspell.rhbz759647.patch Patch1: hunspell.rhbz918938.patch Patch2: hunspell-aarch64.patch Patch3: hunspell.rhbz985052.patch +Patch4: manpage.esc.space.patch %description Hunspell is a spell checker and morphological analyzer library and program @@ -42,6 +43,7 @@ Includes and definitions for developing with hunspell %patch1 -p0 -b .rhbz918938 %patch2 -p1 -b .aarch64 %patch3 -p0 -b .rhbz985052 +%patch4 -p0 -b .manpage.esc.space %build configureflags="--disable-rpath --disable-static --with-ui --with-readline" @@ -131,6 +133,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/hunspell.3.gz %changelog +* Tue Oct 15 2013 Caolán McNamara - 1.3.2-15 +- Resolves: rhbz#1019158 esc space in man page + * Sat Aug 03 2013 Petr Pisar - 1.3.2-14 - Perl 5.18 rebuild diff --git a/manpage.esc.space.patch b/manpage.esc.space.patch new file mode 100644 index 0000000..25ed8aa --- /dev/null +++ b/manpage.esc.space.patch @@ -0,0 +1,12 @@ +diff -ru hunspell-1.3.2/man/hzip.1 hunspell-1.3.2/man/hzip.1 +--- hunspell-1.3.2/man/hzip.1 2013-10-15 11:35:17.788291795 +0100 ++++ hunspell-1.3.2/man/hzip.1 2013-10-15 11:35:22.955351493 +0100 +@@ -16,7 +16,7 @@ + .SH OPTIONS + .IP \fB\-h\fR + Display short help description. +-.IP \fB\-P password\fR ++.IP \fB\-P\ password\fR + Encrypted compression by an arbitrary length password. + .SH SEE ALSO + .B hzip (1), hunspell(1) From b601bcd85bf0bf8842d300a30e6b4d619012b381 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 15 Oct 2013 12:01:39 +0100 Subject: [PATCH 16/91] wrong offset --- hunspell.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index c5b02d3..d7448f7 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -43,7 +43,7 @@ Includes and definitions for developing with hunspell %patch1 -p0 -b .rhbz918938 %patch2 -p1 -b .aarch64 %patch3 -p0 -b .rhbz985052 -%patch4 -p0 -b .manpage.esc.space +%patch4 -p1 -b .manpage.esc.space %build configureflags="--disable-rpath --disable-static --with-ui --with-readline" From 0f0d060cea857b16c5ffb5ac8a67f1893872fab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 4 Jun 2014 13:48:41 +0100 Subject: [PATCH 17/91] update to latest stable version --- .gitignore | 2 +- hunspell-aarch64.patch | 2562 ------------------------------------- hunspell.rhbz759647.patch | 74 -- hunspell.rhbz918938.patch | 72 -- hunspell.rhbz985052.patch | 84 -- hunspell.spec | 20 +- manpage.esc.space.patch | 12 - sources | 2 +- 8 files changed, 8 insertions(+), 2820 deletions(-) delete mode 100644 hunspell-aarch64.patch delete mode 100644 hunspell.rhbz759647.patch delete mode 100644 hunspell.rhbz918938.patch delete mode 100644 hunspell.rhbz985052.patch delete mode 100644 manpage.esc.space.patch diff --git a/.gitignore b/.gitignore index 612d482..4ea2301 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/hunspell-1.3.2.tar.gz +/hunspell-1.3.3.tar.gz diff --git a/hunspell-aarch64.patch b/hunspell-aarch64.patch deleted file mode 100644 index 48ff407..0000000 --- a/hunspell-aarch64.patch +++ /dev/null @@ -1,2562 +0,0 @@ -diff -urN hunspell-1.3.2/config.guess hunspell-1.3.2-aarch64/config.guess ---- hunspell-1.3.2/config.guess 2010-02-23 03:08:49.000000000 -0600 -+++ hunspell-1.3.2-aarch64/config.guess 2013-03-08 00:25:55.370800875 -0600 -@@ -1,9 +1,10 @@ - #! /bin/sh - # Attempt to guess a canonical system name. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -+# 2011, 2012 Free Software Foundation, Inc. - --timestamp='2004-08-11' -+timestamp='2012-09-25' - - # This file is free software; you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by -@@ -16,24 +17,24 @@ - # General Public License for more details. - # - # You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+# along with this program; if not, see . - # - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - --# Originally written by Per Bothner . --# Please send patches to . Submit a context --# diff and a properly formatted ChangeLog entry. -+ -+# Originally written by Per Bothner. Please send patches (context -+# diff format) to and include a ChangeLog -+# entry. - # - # This script attempts to guess a canonical system name similar to - # config.sub. If it succeeds, it prints the system name on stdout, and - # exits with 0. Otherwise, it exits with 1. - # --# The plan is that this can be called by configure scripts if you --# don't specify an explicit build system type. -+# You can get the latest version of this script from: -+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - - me=`echo "$0" | sed -e 's,.*/,,'` - -@@ -53,7 +54,8 @@ - GNU config.guess ($timestamp) - - Originally written by Per Bothner. --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 - Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO -@@ -66,11 +68,11 @@ - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. -@@ -104,7 +106,7 @@ - trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; - trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; - : ${TMPDIR=/tmp} ; -- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || -+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -@@ -123,7 +125,7 @@ - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; --esac ;' -+esac ; set_cc_for_build= ;' - - # This is needed to find uname on a Pyramid OSx when run in the BSD universe. - # (ghazi@noc.rutgers.edu 1994-08-24) -@@ -141,7 +143,7 @@ - case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or -- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, -+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward -@@ -158,6 +160,7 @@ - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; -+ sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched -@@ -166,7 +169,7 @@ - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ -- | grep __ELF__ >/dev/null -+ | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? -@@ -176,7 +179,7 @@ - fi - ;; - *) -- os=netbsd -+ os=netbsd - ;; - esac - # The OS release -@@ -196,71 +199,34 @@ - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" -- exit 0 ;; -- amd64:OpenBSD:*:*) -- echo x86_64-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- amiga:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- arc:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- cats:OpenBSD:*:*) -- echo arm-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- hp300:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- luna88k:OpenBSD:*:*) -- echo m88k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mac68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- macppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme88k:OpenBSD:*:*) -- echo m88k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvmeppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- pmax:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sgi:OpenBSD:*:*) -- echo mipseb-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sun3:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- wgrisc:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ *:Bitrig:*:*) -+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` -+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} -+ exit ;; - *:OpenBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` -+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} -+ exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ *:SolidBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} -+ exit ;; - macppc:MirBSD:*:*) -- echo powerppc-unknown-mirbsd${UNAME_RELEASE} -- exit 0 ;; -+ echo powerpc-unknown-mirbsd${UNAME_RELEASE} -+ exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) -- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` -+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on -@@ -306,37 +272,46 @@ - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -- exit 0 ;; -+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code. -+ exitcode=$? -+ trap '' 0 -+ exit $exitcode ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix -- exit 0 ;; -+ exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 -- exit 0 ;; -+ exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 -- exit 0;; -+ exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos -- exit 0 ;; -+ exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos -- exit 0 ;; -+ exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition -- exit 0 ;; -+ exit ;; -+ *:z/VM:*:*) -+ echo s390-ibm-zvmoe -+ exit ;; - *:OS400:*:*) -- echo powerpc-ibm-os400 -- exit 0 ;; -+ echo powerpc-ibm-os400 -+ exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} -- exit 0;; -+ exit ;; -+ arm*:riscos:*:*|arm*:RISCOS:*:*) -+ echo arm-unknown-riscos -+ exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp -- exit 0;; -+ exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then -@@ -344,32 +319,51 @@ - else - echo pyramid-pyramid-bsd - fi -- exit 0 ;; -+ exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 -- exit 0 ;; -+ exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 -- exit 0 ;; -- DRS?6000:UNIX_SV:4.2*:7*) -+ exit ;; -+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in -- sparc) echo sparc-icl-nx7 && exit 0 ;; -+ sparc) echo sparc-icl-nx7; exit ;; - esac ;; -+ s390x:SunOS:*:*) -+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -+ exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -- i86pc:SunOS:5.*:*) -- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; -+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) -+ echo i386-pc-auroraux${UNAME_RELEASE} -+ exit ;; -+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) -+ eval $set_cc_for_build -+ SUN_ARCH="i386" -+ # If there is a compiler, see if it is configured for 64-bit objects. -+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. -+ # This test works for both compilers. -+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then -+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ -+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ -+ grep IS_64BIT_ARCH >/dev/null -+ then -+ SUN_ARCH="x86_64" -+ fi -+ fi -+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -+ exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) -@@ -378,10 +372,10 @@ - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` -- exit 0 ;; -+ exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 -@@ -393,10 +387,10 @@ - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac -- exit 0 ;; -+ exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor -@@ -406,41 +400,41 @@ - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) -- echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ echo m68k-atari-mint${UNAME_RELEASE} -+ exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) -- echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ echo m68k-atari-mint${UNAME_RELEASE} -+ exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) -- echo m68k-milan-mint${UNAME_RELEASE} -- exit 0 ;; -+ echo m68k-milan-mint${UNAME_RELEASE} -+ exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) -- echo m68k-hades-mint${UNAME_RELEASE} -- exit 0 ;; -+ echo m68k-hades-mint${UNAME_RELEASE} -+ exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) -- echo m68k-unknown-mint${UNAME_RELEASE} -- exit 0 ;; -+ echo m68k-unknown-mint${UNAME_RELEASE} -+ exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 -- exit 0 ;; -+ exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -@@ -464,35 +458,36 @@ - exit (-1); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c \ -- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ -- && exit 0 -+ $CC_FOR_BUILD -o $dummy $dummy.c && -+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && -+ SYSTEM_NAME=`$dummy $dummyarg` && -+ { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax -- exit 0 ;; -+ exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax -- exit 0 ;; -+ exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax -- exit 0 ;; -+ exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix -- exit 0 ;; -+ exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 -- exit 0 ;; -+ exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 -- exit 0 ;; -+ exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - AViiON:dgux:*:*) -- # DG/UX returns AViiON for all architectures -- UNAME_PROCESSOR=`/usr/bin/uname -p` -+ # DG/UX returns AViiON for all architectures -+ UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ -@@ -505,29 +500,29 @@ - else - echo i586-dg-dgux${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 -- exit 0 ;; -+ exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 -- exit 0 ;; -+ exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd -- exit 0 ;; -+ exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` -- exit 0 ;; -+ exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. -- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id -- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' -+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id -+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix -- exit 0 ;; -+ exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` -@@ -535,7 +530,7 @@ - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build -@@ -550,15 +545,19 @@ - exit(0); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 -- echo rs6000-ibm-aix3.2.5 -+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` -+ then -+ echo "$SYSTEM_NAME" -+ else -+ echo rs6000-ibm-aix3.2.5 -+ fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi -- exit 0 ;; -- *:AIX:*:[45]) -+ exit ;; -+ *:AIX:*:[4567]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 -@@ -571,28 +570,28 @@ - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix -- exit 0 ;; -+ exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 -- exit 0 ;; -+ exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to -- exit 0 ;; # report: romp-ibm BSD 4.3 -+ exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx -- exit 0 ;; -+ exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 -- exit 0 ;; -+ exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd -- exit 0 ;; -+ exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 -- exit 0 ;; -+ exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in -@@ -601,52 +600,52 @@ - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` -- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` -- case "${sc_cpu_version}" in -- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 -- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 -- 532) # CPU_PA_RISC2_0 -- case "${sc_kernel_bits}" in -- 32) HP_ARCH="hppa2.0n" ;; -- 64) HP_ARCH="hppa2.0w" ;; -+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` -+ case "${sc_cpu_version}" in -+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 -+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 -+ 532) # CPU_PA_RISC2_0 -+ case "${sc_kernel_bits}" in -+ 32) HP_ARCH="hppa2.0n" ;; -+ 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 -- esac ;; -- esac -+ esac ;; -+ esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -+ sed 's/^ //' << EOF >$dummy.c - -- #define _HPUX_SOURCE -- #include -- #include -- -- int main () -- { -- #if defined(_SC_KERNEL_BITS) -- long bits = sysconf(_SC_KERNEL_BITS); -- #endif -- long cpu = sysconf (_SC_CPU_VERSION); -- -- switch (cpu) -- { -- case CPU_PA_RISC1_0: puts ("hppa1.0"); break; -- case CPU_PA_RISC1_1: puts ("hppa1.1"); break; -- case CPU_PA_RISC2_0: -- #if defined(_SC_KERNEL_BITS) -- switch (bits) -- { -- case 64: puts ("hppa2.0w"); break; -- case 32: puts ("hppa2.0n"); break; -- default: puts ("hppa2.0"); break; -- } break; -- #else /* !defined(_SC_KERNEL_BITS) */ -- puts ("hppa2.0"); break; -- #endif -- default: puts ("hppa1.0"); break; -- } -- exit (0); -- } -+ #define _HPUX_SOURCE -+ #include -+ #include -+ -+ int main () -+ { -+ #if defined(_SC_KERNEL_BITS) -+ long bits = sysconf(_SC_KERNEL_BITS); -+ #endif -+ long cpu = sysconf (_SC_CPU_VERSION); -+ -+ switch (cpu) -+ { -+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break; -+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break; -+ case CPU_PA_RISC2_0: -+ #if defined(_SC_KERNEL_BITS) -+ switch (bits) -+ { -+ case 64: puts ("hppa2.0w"); break; -+ case 32: puts ("hppa2.0n"); break; -+ default: puts ("hppa2.0"); break; -+ } break; -+ #else /* !defined(_SC_KERNEL_BITS) */ -+ puts ("hppa2.0"); break; -+ #endif -+ default: puts ("hppa1.0"); break; -+ } -+ exit (0); -+ } - EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa -@@ -654,9 +653,19 @@ - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then -- # avoid double evaluation of $set_cc_for_build -- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build -- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null -+ eval $set_cc_for_build -+ -+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating -+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler -+ # generating 64-bit code. GNU and HP use different nomenclature: -+ # -+ # $ CC_FOR_BUILD=cc ./config.guess -+ # => hppa2.0w-hp-hpux11.23 -+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess -+ # => hppa64-hp-hpux11.23 -+ -+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | -+ grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else -@@ -664,11 +673,11 @@ - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -@@ -696,210 +705,269 @@ - exit (0); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 -+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 -- exit 0 ;; -+ exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd -- exit 0 ;; -+ exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd -- exit 0 ;; -+ exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix -- exit 0 ;; -+ exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf -- exit 0 ;; -+ exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf -- exit 0 ;; -+ exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi -- exit 0 ;; -+ exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites -- exit 0 ;; -+ exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` -- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -- exit 0 ;; -+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` -+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -+ exit ;; - 5000:UNIX_System_V:4.*:*) -- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` -- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -- exit 0 ;; -+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` -+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -+ exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:FreeBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` -- exit 0 ;; -+ UNAME_PROCESSOR=`/usr/bin/uname -p` -+ case ${UNAME_PROCESSOR} in -+ amd64) -+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ *) -+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ esac -+ exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin -- exit 0 ;; -- i*:MINGW*:*) -+ exit ;; -+ *:MINGW64*:*) -+ echo ${UNAME_MACHINE}-pc-mingw64 -+ exit ;; -+ *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 -- exit 0 ;; -+ exit ;; -+ i*:MSYS*:*) -+ echo ${UNAME_MACHINE}-pc-msys -+ exit ;; -+ i*:windows32*:*) -+ # uname -m includes "-pc" on this system. -+ echo ${UNAME_MACHINE}-mingw32 -+ exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 -- exit 0 ;; -- x86:Interix*:[34]*) -- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' -- exit 0 ;; -+ exit ;; -+ *:Interix*:*) -+ case ${UNAME_MACHINE} in -+ x86) -+ echo i586-pc-interix${UNAME_RELEASE} -+ exit ;; -+ authenticamd | genuineintel | EM64T) -+ echo x86_64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ IA64) -+ echo ia64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks -- exit 0 ;; -+ exit ;; -+ 8664:Windows_NT:*) -+ echo x86_64-pc-mks -+ exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix -- exit 0 ;; -+ exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin -- exit 0 ;; -+ exit ;; -+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) -+ echo x86_64-unknown-cygwin -+ exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin -- exit 0 ;; -+ exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` -- exit 0 ;; -+ exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu -- exit 0 ;; -+ exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix -- exit 0 ;; -+ exit ;; -+ aarch64:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; -+ aarch64_be:Linux:*:*) -+ UNAME_MACHINE=aarch64_be -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; -+ alpha:Linux:*:*) -+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in -+ EV5) UNAME_MACHINE=alphaev5 ;; -+ EV56) UNAME_MACHINE=alphaev56 ;; -+ PCA56) UNAME_MACHINE=alphapca56 ;; -+ PCA57) UNAME_MACHINE=alphapca56 ;; -+ EV6) UNAME_MACHINE=alphaev6 ;; -+ EV67) UNAME_MACHINE=alphaev67 ;; -+ EV68*) UNAME_MACHINE=alphaev68 ;; -+ esac -+ objdump --private-headers /bin/sh | grep -q ld.so.1 -+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi -+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -+ exit ;; - arm*:Linux:*:*) -+ eval $set_cc_for_build -+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ -+ | grep -q __ARM_EABI__ -+ then -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ else -+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ -+ | grep -q __ARM_PCS_VFP -+ then -+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi -+ else -+ echo ${UNAME_MACHINE}-unknown-linux-gnueabihf -+ fi -+ fi -+ exit ;; -+ avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - cris:Linux:*:*) -- echo cris-axis-linux-gnu -- exit 0 ;; -- ia64:Linux:*:*) -+ echo ${UNAME_MACHINE}-axis-linux-gnu -+ exit ;; -+ crisv32:Linux:*:*) -+ echo ${UNAME_MACHINE}-axis-linux-gnu -+ exit ;; -+ frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -- m32r*:Linux:*:*) -+ exit ;; -+ hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -- m68*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -- mips:Linux:*:*) -+ exit ;; -+ i*86:Linux:*:*) -+ LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -- #undef CPU -- #undef mips -- #undef mipsel -- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) -- CPU=mipsel -- #else -- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) -- CPU=mips -- #else -- CPU= -- #endif -+ #ifdef __dietlibc__ -+ LIBC=dietlibc - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -- ;; -- mips64:Linux:*:*) -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` -+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}" -+ exit ;; -+ ia64:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; -+ m32r*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; -+ m68*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; -+ mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU -- #undef mips64 -- #undef mips64el -+ #undef ${UNAME_MACHINE} -+ #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) -- CPU=mips64el -+ CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) -- CPU=mips64 -+ CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; -- ppc:Linux:*:*) -- echo powerpc-unknown-linux-gnu -- exit 0 ;; -- ppc64:Linux:*:*) -- echo powerpc64-unknown-linux-gnu -- exit 0 ;; -- alpha:Linux:*:*) -- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in -- EV5) UNAME_MACHINE=alphaev5 ;; -- EV56) UNAME_MACHINE=alphaev56 ;; -- PCA56) UNAME_MACHINE=alphapca56 ;; -- PCA57) UNAME_MACHINE=alphapca56 ;; -- EV6) UNAME_MACHINE=alphaev6 ;; -- EV67) UNAME_MACHINE=alphaev67 ;; -- EV68*) UNAME_MACHINE=alphaev68 ;; -- esac -- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null -- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi -- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -- exit 0 ;; -+ or32:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; -+ padre:Linux:*:*) -+ echo sparc-unknown-linux-gnu -+ exit ;; -+ parisc64:Linux:*:* | hppa64:Linux:*:*) -+ echo hppa64-unknown-linux-gnu -+ exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in -@@ -907,115 +975,71 @@ - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac -- exit 0 ;; -- parisc64:Linux:*:* | hppa64:Linux:*:*) -- echo hppa64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ ppc64:Linux:*:*) -+ echo powerpc64-unknown-linux-gnu -+ exit ;; -+ ppc:Linux:*:*) -+ echo powerpc-unknown-linux-gnu -+ exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux -- exit 0 ;; -+ exit ;; - sh64*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ tile*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; -+ vax:Linux:*:*) -+ echo ${UNAME_MACHINE}-dec-linux-gnu -+ exit ;; - x86_64:Linux:*:*) -- echo x86_64-unknown-linux-gnu -- exit 0 ;; -- i*86:Linux:*:*) -- # The BFD linker knows what the default object file format is, so -- # first see if it will tell us. cd to the root directory to prevent -- # problems with other programs or directories called `ld' in the path. -- # Set LC_ALL=C to ensure ld outputs messages in English. -- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ -- | sed -ne '/supported targets:/!d -- s/[ ][ ]*/ /g -- s/.*supported targets: *// -- s/ .*// -- p'` -- case "$ld_supported_targets" in -- elf32-i386) -- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" -- ;; -- a.out-i386-linux) -- echo "${UNAME_MACHINE}-pc-linux-gnuaout" -- exit 0 ;; -- coff-i386) -- echo "${UNAME_MACHINE}-pc-linux-gnucoff" -- exit 0 ;; -- "") -- # Either a pre-BFD a.out linker (linux-gnuoldld) or -- # one that does not give us useful --help. -- echo "${UNAME_MACHINE}-pc-linux-gnuoldld" -- exit 0 ;; -- esac -- # Determine whether the default compiler is a.out or elf -- eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -- #include -- #ifdef __ELF__ -- # ifdef __GLIBC__ -- # if __GLIBC__ >= 2 -- LIBC=gnu -- # else -- LIBC=gnulibc1 -- # endif -- # else -- LIBC=gnulibc1 -- # endif -- #else -- #ifdef __INTEL_COMPILER -- LIBC=gnu -- #else -- LIBC=gnuaout -- #endif -- #endif -- #ifdef __dietlibc__ -- LIBC=dietlibc -- #endif --EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 -- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 -- ;; -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; -+ xtensa*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 -- exit 0 ;; -+ exit ;; - i*86:UNIX_SV:4.2MP:2.*) -- # Unixware is an offshoot of SVR4, but it has its own version -- # number series starting with 2... -- # I am not positive that other SVR4 systems won't match this, -+ # Unixware is an offshoot of SVR4, but it has its own version -+ # number series starting with 2... -+ # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. -- # Use sysv4.2uw... so that sysv4* matches it. -+ # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} -- exit 0 ;; -+ exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx -- exit 0 ;; -+ exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop -- exit 0 ;; -+ exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos -- exit 0 ;; -- i*86:syllable:*:*) -+ exit ;; -+ i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable -- exit 0 ;; -- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) -+ exit ;; -+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp -- exit 0 ;; -+ exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then -@@ -1023,15 +1047,16 @@ - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi -- exit 0 ;; -- i*86:*:5:[78]*) -+ exit ;; -+ i*86:*:5:[678]*) -+ # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} -- exit 0 ;; -+ exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi -- exit 0 ;; -+ exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv -- exit 0 ;; -+ exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv -- exit 0 ;; -+ exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix -- exit 0 ;; -+ exit ;; - M68*:*:R3V[5678]*:*) -- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; -+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4.3${OS_REL} && exit 0 -+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ -- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) -- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4 && exit 0 ;; -+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -+ && { echo i486-ncr-sysv4; exit; } ;; -+ NCR*:*:4.2:* | MPRAS*:*:4.2:*) -+ OS_REL='.3' -+ test -r /etc/.relid \ -+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` -+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } -+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } -+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 -- exit 0 ;; -+ exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) -+ exit ;; -+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` -@@ -1123,69 +1161,97 @@ - else - echo ns32k-sni-sysv - fi -- exit 0 ;; -- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort -- # says -- echo i586-unisys-sysv4 -- exit 0 ;; -+ exit ;; -+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort -+ # says -+ echo i586-unisys-sysv4 -+ exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 -- exit 0 ;; -+ exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 -- exit 0 ;; -+ exit ;; -+ i*86:VOS:*:*) -+ # From Paul.Green@stratus.com. -+ echo ${UNAME_MACHINE}-stratus-vos -+ exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos -- exit 0 ;; -+ exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 -- exit 0 ;; -+ exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then -- echo mips-nec-sysv${UNAME_RELEASE} -+ echo mips-nec-sysv${UNAME_RELEASE} - else -- echo mips-unknown-sysv${UNAME_RELEASE} -+ echo mips-unknown-sysv${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos -- exit 0 ;; -+ exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos -- exit 0 ;; -+ exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos -- exit 0 ;; -+ exit ;; -+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible. -+ echo i586-pc-haiku -+ exit ;; -+ x86_64:Haiku:*:*) -+ echo x86_64-unknown-haiku -+ exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ SX-7:SUPER-UX:*:*) -+ echo sx7-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8:SUPER-UX:*:*) -+ echo sx8-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8R:SUPER-UX:*:*) -+ echo sx8r-nec-superux${UNAME_RELEASE} -+ exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in -- *86) UNAME_PROCESSOR=i686 ;; -+ i386) -+ eval $set_cc_for_build -+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then -+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ -+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ -+ grep IS_64BIT_ARCH >/dev/null -+ then -+ UNAME_PROCESSOR="x86_64" -+ fi -+ fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then -@@ -1193,22 +1259,28 @@ - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:QNX:*:4*) - echo i386-pc-qnx -- exit 0 ;; -+ exit ;; -+ NEO-?:NONSTOP_KERNEL:*:*) -+ echo neo-tandem-nsk${UNAME_RELEASE} -+ exit ;; -+ NSE-*:NONSTOP_KERNEL:*:*) -+ echo nse-tandem-nsk${UNAME_RELEASE} -+ exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux -- exit 0 ;; -+ exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv -- exit 0 ;; -+ exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 -@@ -1219,43 +1291,55 @@ - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 -- exit 0 ;; -+ exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 -- exit 0 ;; -+ exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex -- exit 0 ;; -+ exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 -- exit 0 ;; -+ exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 -- exit 0 ;; -+ exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 -- exit 0 ;; -+ exit ;; - *:ITS:*:*) - echo pdp10-unknown-its -- exit 0 ;; -+ exit ;; - SEI:*:*:SEIUX) -- echo mips-sei-seiux${UNAME_RELEASE} -- exit 0 ;; -+ echo mips-sei-seiux${UNAME_RELEASE} -+ exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` -- exit 0 ;; -+ exit ;; - *:*VMS:*:*) -- UNAME_MACHINE=`(uname -p) 2>/dev/null` -+ UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in -- A*) echo alpha-dec-vms && exit 0 ;; -- I*) echo ia64-dec-vms && exit 0 ;; -- V*) echo vax-dec-vms && exit 0 ;; -- esac -+ A*) echo alpha-dec-vms ; exit ;; -+ I*) echo ia64-dec-vms ; exit ;; -+ V*) echo vax-dec-vms ; exit ;; -+ esac ;; -+ *:XENIX:*:SysV) -+ echo i386-pc-xenix -+ exit ;; -+ i*86:skyos:*:*) -+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' -+ exit ;; -+ i*86:rdos:*:*) -+ echo ${UNAME_MACHINE}-pc-rdos -+ exit ;; -+ i*86:AROS:*:*) -+ echo ${UNAME_MACHINE}-pc-aros -+ exit ;; -+ x86_64:VMkernel:*:*) -+ echo ${UNAME_MACHINE}-unknown-esx -+ exit ;; - esac - --#echo '(No uname command or uname output not recognized.)' 1>&2 --#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 -- - eval $set_cc_for_build - cat >$dummy.c < - printf ("m68k-sony-newsos%s\n", - #ifdef NEWSOS4 -- "4" -+ "4" - #else -- "" -+ "" - #endif -- ); exit (0); -+ ); exit (0); - #endif - #endif - - #if defined (__arm) && defined (__acorn) && defined (__unix) -- printf ("arm-acorn-riscix"); exit (0); -+ printf ("arm-acorn-riscix\n"); exit (0); - #endif - - #if defined (hp300) && !defined (hpux) -@@ -1371,11 +1455,12 @@ - } - EOF - --$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 -+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } - - # Apollos put the system type in the environment. - --test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } -+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - - # Convex versions that predate uname can use getsysinfo(1) - -@@ -1384,22 +1469,22 @@ - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - c34*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - c38*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - c4*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - esac - fi - -@@ -1410,7 +1495,9 @@ - the operating system you are using. It is advised that you - download the most up to date version of the config scripts from - -- ftp://ftp.gnu.org/pub/gnu/config/ -+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD -+and -+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - - If the version you run ($0) is already up to date, please - send the following data and any information you think might be -diff -urN hunspell-1.3.2/config.sub hunspell-1.3.2-aarch64/config.sub ---- hunspell-1.3.2/config.sub 2010-02-23 03:08:48.000000000 -0600 -+++ hunspell-1.3.2-aarch64/config.sub 2013-03-08 00:25:55.399797555 -0600 -@@ -1,9 +1,10 @@ - #! /bin/sh - # Configuration validation subroutine script. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -+# 2011, 2012 Free Software Foundation, Inc. - --timestamp='2004-06-24' -+timestamp='2012-10-10' - - # This file is (in principle) common to ALL GNU software. - # The presence of a machine in this file suggests that SOME GNU software -@@ -20,23 +21,25 @@ - # GNU General Public License for more details. - # - # You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, --# Boston, MA 02111-1307, USA. -- -+# along with this program; if not, see . -+# - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - -+ - # Please send patches to . Submit a context --# diff and a properly formatted ChangeLog entry. -+# diff and a properly formatted GNU ChangeLog entry. - # - # Configuration subroutine to validate and canonicalize a configuration type. - # Supply the specified configuration type as an argument. - # If it is invalid, we print an error message on stderr and exit with code 1. - # Otherwise, we print the canonical config type on stdout and succeed. - -+# You can get the latest version of this script from: -+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD -+ - # This file is supposed to be the same for all GNU packages - # and recognize all the CPU types, system types and aliases - # that are meaningful with *any* GNU software. -@@ -70,7 +73,8 @@ - version="\ - GNU config.sub ($timestamp) - --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 - Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO -@@ -83,11 +87,11 @@ - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. -@@ -99,7 +103,7 @@ - *local*) - # First pass through any local machine types. - echo $1 -- exit 0;; -+ exit ;; - - * ) - break ;; -@@ -118,11 +122,18 @@ - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in -- nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ -- kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) -+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ -+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ -+ knetbsd*-gnu* | netbsd*-gnu* | \ -+ kopensolaris*-gnu* | \ -+ storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; -+ android-linux) -+ os=-linux-android -+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown -+ ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] -@@ -145,10 +156,13 @@ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -- -apple | -axis | -knuth | -cray) -+ -apple | -axis | -knuth | -cray | -microblaze*) - os= - basic_machine=$1 - ;; -+ -bluegene*) -+ os=-cnk -+ ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 -@@ -163,13 +177,17 @@ - os=-chorusos - basic_machine=$1 - ;; -- -chorusrdb) -- os=-chorusrdb -+ -chorusrdb) -+ os=-chorusrdb - basic_machine=$1 -- ;; -+ ;; - -hiux*) - os=-hiuxwe2 - ;; -+ -sco6) -+ os=-sco5v6 -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -@@ -186,6 +204,10 @@ - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -+ -sco5v6*) -+ # Don't forget version if it is 3.2v4 or newer. -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -@@ -203,6 +225,12 @@ - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -+ -lynx*178) -+ os=-lynxos178 -+ ;; -+ -lynx*5) -+ os=-lynxos5 -+ ;; - -lynx*) - os=-lynxos - ;; -@@ -227,25 +255,36 @@ - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ -+ | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ -- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ -+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ -+ | be32 | be64 \ -+ | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ -- | fr30 | frv \ -+ | epiphany \ -+ | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ -+ | hexagon \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ -- | m32r | m32rle | m68000 | m68k | m88k | mcore \ -+ | le32 | le64 \ -+ | lm32 \ -+ | m32c | m32r | m32rle | m68000 | m68k | m88k \ -+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ -- | mips64vr | mips64vrel \ -+ | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ -+ | mips64r5900 | mips64r5900el \ -+ | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ -+ | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ -@@ -254,30 +293,65 @@ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ -+ | moxie \ -+ | mt \ - | msp430 \ -+ | nds32 | nds32le | nds32be \ -+ | nios | nios2 \ - | ns16k | ns32k \ -- | openrisc | or32 \ -+ | open8 \ -+ | or32 \ - | pdp10 | pdp11 | pj | pjl \ -- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ -+ | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pyramid \ -- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ -+ | rl78 | rx \ -+ | score \ -+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ -- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ -- | strongarm \ -- | tahoe | thumb | tic4x | tic80 | tron \ -- | v850 | v850e \ -+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ -+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ -+ | spu \ -+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ -+ | ubicom32 \ -+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | we32k \ -- | x86 | xscale | xstormy16 | xtensa \ -- | z8k) -+ | x86 | xc16x | xstormy16 | xtensa \ -+ | z8k | z80) - basic_machine=$basic_machine-unknown - ;; -- m6811 | m68hc11 | m6812 | m68hc12) -- # Motorola 68HC11/12. -+ c54x) -+ basic_machine=tic54x-unknown -+ ;; -+ c55x) -+ basic_machine=tic55x-unknown -+ ;; -+ c6x) -+ basic_machine=tic6x-unknown -+ ;; -+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; -+ ms1) -+ basic_machine=mt-unknown -+ ;; -+ -+ strongarm | thumb | xscale) -+ basic_machine=arm-unknown -+ ;; -+ xgate) -+ basic_machine=$basic_machine-unknown -+ os=-none -+ ;; -+ xscaleeb) -+ basic_machine=armeb-unknown -+ ;; -+ -+ xscaleel) -+ basic_machine=armel-unknown -+ ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and -@@ -293,32 +367,41 @@ - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ -+ | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ -- | avr-* \ -- | bs2000-* \ -- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ -+ | avr-* | avr32-* \ -+ | be32-* | be64-* \ -+ | bfin-* | bs2000-* \ -+ | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ -- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ -+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ -+ | hexagon-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ -- | m32r-* | m32rle-* \ -+ | le32-* | le64-* \ -+ | lm32-* \ -+ | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ -- | m88110-* | m88k-* | mcore-* \ -+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ -+ | microblaze-* | microblazeel-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ -- | mips64vr-* | mips64vrel-* \ -+ | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ -+ | mips64r5900-* | mips64r5900el-* \ -+ | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ -+ | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ -@@ -327,26 +410,38 @@ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ -+ | mt-* \ - | msp430-* \ -+ | nds32-* | nds32le-* | nds32be-* \ -+ | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ -+ | open8-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ -- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ -+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pyramid-* \ -- | romp-* | rs6000-* \ -- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ -+ | rl78-* | romp-* | rs6000-* | rx-* \ -+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ -- | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ -- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ -- | tahoe-* | thumb-* \ -+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ -+ | sparclite-* \ -+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ -+ | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ -+ | tile*-* \ - | tron-* \ -- | v850-* | v850e-* | vax-* \ -+ | ubicom32-* \ -+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ -+ | vax-* \ - | we32k-* \ -- | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ -- | xtensa-* \ -+ | x86-* | x86_64-* | xc16x-* | xps100-* \ -+ | xstormy16-* | xtensa*-* \ - | ymp-* \ -- | z8k-*) -+ | z8k-* | z80-*) -+ ;; -+ # Recognize the basic CPU types without company name, with glob match. -+ xtensa*) -+ basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. -@@ -364,7 +459,7 @@ - basic_machine=a29k-amd - os=-udi - ;; -- abacus) -+ abacus) - basic_machine=abacus-unknown - ;; - adobe68k) -@@ -410,6 +505,10 @@ - basic_machine=m68k-apollo - os=-bsd - ;; -+ aros) -+ basic_machine=i386-pc -+ os=-aros -+ ;; - aux) - basic_machine=m68k-apple - os=-aux -@@ -418,10 +517,35 @@ - basic_machine=ns32k-sequent - os=-dynix - ;; -+ blackfin) -+ basic_machine=bfin-unknown -+ os=-linux -+ ;; -+ blackfin-*) -+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; -+ bluegene*) -+ basic_machine=powerpc-ibm -+ os=-cnk -+ ;; -+ c54x-*) -+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; -+ c55x-*) -+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; -+ c6x-*) -+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; -+ cegcc) -+ basic_machine=arm-unknown -+ os=-cegcc -+ ;; - convex-c1) - basic_machine=c1-convex - os=-bsd -@@ -450,13 +574,16 @@ - basic_machine=craynv-cray - os=-unicosmp - ;; -- cr16c) -- basic_machine=cr16c-unknown -+ cr16 | cr16-*) -+ basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; -+ crisv32 | crisv32-* | etraxfs*) -+ basic_machine=crisv32-axis -+ ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; -@@ -486,6 +613,14 @@ - basic_machine=m88k-motorola - os=-sysv3 - ;; -+ dicos) -+ basic_machine=i686-pc -+ os=-dicos -+ ;; -+ djgpp) -+ basic_machine=i586-pc -+ os=-msdosdjgpp -+ ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx -@@ -597,7 +732,6 @@ - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; --# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 -@@ -636,6 +770,14 @@ - basic_machine=m68k-isi - os=-sysv - ;; -+ m68knommu) -+ basic_machine=m68k-unknown -+ os=-linux -+ ;; -+ m68knommu-*) -+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - m88k-omron*) - basic_machine=m88k-omron - ;; -@@ -647,10 +789,21 @@ - basic_machine=ns32k-utek - os=-sysv - ;; -+ microblaze*) -+ basic_machine=microblaze-xilinx -+ ;; -+ mingw64) -+ basic_machine=x86_64-pc -+ os=-mingw64 -+ ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; -+ mingw32ce) -+ basic_machine=arm-unknown -+ os=-mingw32ce -+ ;; - miniframe) - basic_machine=m68000-convergent - ;; -@@ -676,10 +829,21 @@ - basic_machine=i386-pc - os=-msdos - ;; -+ ms1-*) -+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` -+ ;; -+ msys) -+ basic_machine=i386-pc -+ os=-msys -+ ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; -+ nacl) -+ basic_machine=le32-unknown -+ os=-nacl -+ ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 -@@ -744,6 +908,12 @@ - np1) - basic_machine=np1-gould - ;; -+ neo-tandem) -+ basic_machine=neo-tandem -+ ;; -+ nse-tandem) -+ basic_machine=nse-tandem -+ ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; -@@ -751,9 +921,8 @@ - basic_machine=hppa1.1-oki - os=-proelf - ;; -- or32 | or32-*) -+ openrisc | openrisc-*) - basic_machine=or32-unknown -- os=-coff - ;; - os400) - basic_machine=powerpc-ibm -@@ -775,6 +944,14 @@ - basic_machine=i860-intel - os=-osf - ;; -+ parisc) -+ basic_machine=hppa-unknown -+ os=-linux -+ ;; -+ parisc-*) -+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - pbd) - basic_machine=sparc-tti - ;; -@@ -784,6 +961,12 @@ - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; -+ pc98) -+ basic_machine=i386-pc -+ ;; -+ pc98-*) -+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; -@@ -813,9 +996,10 @@ - ;; - power) basic_machine=power-ibm - ;; -- ppc) basic_machine=powerpc-unknown -+ ppc | ppcbe) basic_machine=powerpc-unknown - ;; -- ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ppc-* | ppcbe-*) -+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown -@@ -840,6 +1024,10 @@ - basic_machine=i586-unknown - os=-pw32 - ;; -+ rdos) -+ basic_machine=i386-pc -+ os=-rdos -+ ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff -@@ -866,6 +1054,10 @@ - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; -+ sde) -+ basic_machine=mipsisa32-sde -+ os=-elf -+ ;; - sei) - basic_machine=mips-sei - os=-seiux -@@ -877,6 +1069,9 @@ - basic_machine=sh-hitachi - os=-hms - ;; -+ sh5el) -+ basic_machine=sh5le-unknown -+ ;; - sh64) - basic_machine=sh64-unknown - ;; -@@ -898,6 +1093,9 @@ - basic_machine=i860-stratus - os=-sysv4 - ;; -+ strongarm-* | thumb-*) -+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - sun2) - basic_machine=m68000-sun - ;; -@@ -954,17 +1152,9 @@ - basic_machine=t90-cray - os=-unicos - ;; -- tic54x | c54x*) -- basic_machine=tic54x-unknown -- os=-coff -- ;; -- tic55x | c55x*) -- basic_machine=tic55x-unknown -- os=-coff -- ;; -- tic6x | c6x*) -- basic_machine=tic6x-unknown -- os=-coff -+ tile*) -+ basic_machine=$basic_machine-unknown -+ os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown -@@ -1026,9 +1216,16 @@ - basic_machine=hppa1.1-winbond - os=-proelf - ;; -+ xbox) -+ basic_machine=i686-pc -+ os=-mingw32 -+ ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; -+ xscale-* | xscalee[bl]-*) -+ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` -+ ;; - ymp) - basic_machine=ymp-cray - os=-unicos -@@ -1037,6 +1234,10 @@ - basic_machine=z8k-unknown - os=-sim - ;; -+ z80-*-coff) -+ basic_machine=z80-unknown -+ os=-sim -+ ;; - none) - basic_machine=none-none - os=-none -@@ -1075,13 +1276,10 @@ - we32k) - basic_machine=we32k-att - ;; -- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) -+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; -- sh64) -- basic_machine=sh64-unknown -- ;; -- sparc | sparcv8 | sparcv9 | sparcv9b) -+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) -@@ -1125,9 +1323,12 @@ - if [ x"$os" != x"" ] - then - case $os in -- # First match some system type aliases -- # that might get confused with valid system types. -+ # First match some system type aliases -+ # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. -+ -auroraux) -+ os=-auroraux -+ ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; -@@ -1148,26 +1349,31 @@ - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ -- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ -- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ -+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ -+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ -+ | -sym* | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ -- | -aos* \ -+ | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ -- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ -+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ -+ | -bitrig* | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ -- | -chorusos* | -chorusrdb* \ -- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -- | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ -+ | -chorusos* | -chorusrdb* | -cegcc* \ -+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ -+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ -+ | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ -- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) -+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ -+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) -@@ -1185,7 +1391,7 @@ - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ -- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ -+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) -@@ -1206,7 +1412,7 @@ - -opened*) - os=-openedition - ;; -- -os400*) -+ -os400*) - os=-os400 - ;; - -wince*) -@@ -1255,7 +1461,7 @@ - -sinix*) - os=-sysv4 - ;; -- -tpf*) -+ -tpf*) - os=-tpf - ;; - -triton*) -@@ -1294,6 +1500,14 @@ - -kaos*) - os=-kaos - ;; -+ -zvmoe) -+ os=-zvmoe -+ ;; -+ -dicos*) -+ os=-dicos -+ ;; -+ -nacl*) -+ ;; - -none) - ;; - *) -@@ -1316,6 +1530,12 @@ - # system, and we'll never get to this point. - - case $basic_machine in -+ score-*) -+ os=-elf -+ ;; -+ spu-*) -+ os=-elf -+ ;; - *-acorn) - os=-riscix1.2 - ;; -@@ -1325,9 +1545,21 @@ - arm*-semi) - os=-aout - ;; -- c4x-* | tic4x-*) -- os=-coff -- ;; -+ c4x-* | tic4x-*) -+ os=-coff -+ ;; -+ hexagon-*) -+ os=-elf -+ ;; -+ tic54x-*) -+ os=-coff -+ ;; -+ tic55x-*) -+ os=-coff -+ ;; -+ tic6x-*) -+ os=-coff -+ ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 -@@ -1346,13 +1578,13 @@ - ;; - m68000-sun) - os=-sunos3 -- # This also exists in the configure program, but was not the -- # default. -- # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; -+ mep-*) -+ os=-elf -+ ;; - mips*-cisco) - os=-elf - ;; -@@ -1371,10 +1603,13 @@ - *-be) - os=-beos - ;; -+ *-haiku) -+ os=-haiku -+ ;; - *-ibm) - os=-aix - ;; -- *-knuth) -+ *-knuth) - os=-mmixware - ;; - *-wec) -@@ -1479,7 +1714,7 @@ - -sunos*) - vendor=sun - ;; -- -aix*) -+ -cnk*|-aix*) - vendor=ibm - ;; - -beos*) -@@ -1542,7 +1777,7 @@ - esac - - echo $basic_machine$os --exit 0 -+exit - - # Local variables: - # eval: (add-hook 'write-file-hooks 'time-stamp) diff --git a/hunspell.rhbz759647.patch b/hunspell.rhbz759647.patch deleted file mode 100644 index 31f48ce..0000000 --- a/hunspell.rhbz759647.patch +++ /dev/null @@ -1,74 +0,0 @@ -Index: src/tools/hunspell.cxx -=================================================================== -RCS file: /cvsroot/hunspell/hunspell/src/tools/hunspell.cxx,v -retrieving revision 1.28 -diff -u -r1.28 hunspell.cxx ---- src/tools/hunspell.cxx 21 Jan 2011 17:30:41 -0000 1.28 -+++ src/tools/hunspell.cxx 6 Dec 2011 22:44:15 -0000 -@@ -128,8 +128,6 @@ - #define readline scanline - #endif - --#define TEMPNAME "hunSPELL.bak" -- - extern char * mystrdup(const char * s); - - // file formats: -@@ -1316,14 +1314,12 @@ - char * extension = basename(filename, '.'); - parser = get_parser(format, extension, pMS[0]); - -- char * tempname = (char *) malloc(strlen(filename) + strlen(TEMPNAME) + 1); -- strcpy(tempname, filename); -- strcpy(basename(tempname, DIRSEPCH), TEMPNAME); -- -- FILE *tempfile; -+ -+ FILE *tempfile = tmpfile(); - -- if (!(tempfile = fopen(tempname, "w"))) { -- fprintf(stderr, gettext("Can't create tempfile %s.\n"), tempname); -+ if (!tempfile) -+ { -+ perror(gettext("Can't create tempfile")); - endwin(); - exit(1); - } -@@ -1337,7 +1333,7 @@ - case -1: { - clear(); - refresh(); -- unlink(tempname); -+ fclose(tempfile); //automatically deleted when closed - endwin(); - exit(0); - } -@@ -1350,15 +1346,22 @@ - } - } - fclose(text); -- fclose(tempfile); - delete parser; - -- if (! modified) { -- unlink(tempname); -- } else { -- rename(tempname, filename); -+ if (modified) { -+ rewind(tempfile); -+ text = fopen(filename, "wb"); -+ -+ size_t n; -+ while ((n = fread(buf, 1, MAXLNLEN, tempfile)) > 0) -+ { -+ if (fwrite(buf, 1, n, text) != n) -+ perror("write failed"); -+ } -+ -+ fclose(text); - } -- free(tempname); -+ fclose(tempfile); //automatically deleted when closed - } - - #endif diff --git a/hunspell.rhbz918938.patch b/hunspell.rhbz918938.patch deleted file mode 100644 index a5e5020..0000000 --- a/hunspell.rhbz918938.patch +++ /dev/null @@ -1,72 +0,0 @@ ---- src/hunspell/hunspell.cxx 2011-02-02 12:04:29.000000000 +0000 -+++ src/hunspell/hunspell.cxx 2013-03-13 16:50:50.667928521 +0000 -@@ -12,6 +12,8 @@ - #endif - #include "csutil.hxx" - -+#include -+ - Hunspell::Hunspell(const char * affpath, const char * dpath, const char * key) - { - encoding = NULL; -@@ -1710,6 +1712,19 @@ - return n; - } - -+namespace -+{ -+ void myrep(std::string& str, const std::string& search, const std::string& replace) -+ { -+ size_t pos = 0; -+ while ((pos = str.find(search, pos)) != std::string::npos) -+ { -+ str.replace(pos, search.length(), replace); -+ pos += replace.length(); -+ } -+ } -+} -+ - int Hunspell::spellml(char*** slst, const char * word) - { - char *q, *q2; -@@ -1721,26 +1736,26 @@ - q2 = strstr(q2, "'), MAXWORDUTF8LEN - 10)) n = analyze(slst, cw); - if (n == 0) return 0; - // convert the result to ana1ana2 format -- for (int i = 0; i < n; i++) s+= strlen((*slst)[i]); -- char * r = (char *) malloc(6 + 5 * s + 7 * n + 7 + 1); // XXX 5*s->&->& -- if (!r) return 0; -- strcpy(r, ""); -+ std::string r; -+ r.append(""); - for (int i = 0; i < n; i++) { -- int l = strlen(r); -- strcpy(r + l, ""); -- strcpy(r + l + 3, (*slst)[i]); -- mystrrep(r + l + 3, "\t", " "); -- mystrrep(r + l + 3, "<", "<"); -- mystrrep(r + l + 3, "&", "&"); -- strcat(r, ""); -+ r.append(""); -+ -+ std::string entry((*slst)[i]); - free((*slst)[i]); -+ myrep(entry, "\t", " "); -+ myrep(entry, "&", "&"); -+ myrep(entry, "<", "<"); -+ r.append(entry); -+ -+ r.append(""); - } -- strcat(r, ""); -- (*slst)[0] = r; -+ r.append(""); -+ (*slst)[0] = mystrdup(r.c_str()); - return 1; - } else if (check_xml_par(q, "type=", "stem")) { - if (get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN - 1)) return stem(slst, cw); diff --git a/hunspell.rhbz985052.patch b/hunspell.rhbz985052.patch deleted file mode 100644 index f2791a0..0000000 --- a/hunspell.rhbz985052.patch +++ /dev/null @@ -1,84 +0,0 @@ -Index: man/hunspell.1 -=================================================================== -RCS file: /cvsroot/hunspell/hunspell/man/hunspell.1,v -retrieving revision 1.4 -diff -u -r1.4 hunspell.1 ---- man/hunspell.1 13 Jun 2013 19:13:50 -0000 1.4 -+++ man/hunspell.1 25 Jul 2013 08:26:50 -0000 -@@ -385,5 +385,3 @@ - see hunspell(3). - .PP - This manual based on Ispell's manual. See ispell(1). --.SH BUGS --There are some layout problems with long lines. -Index: src/tools/hunspell.cxx -=================================================================== -RCS file: /cvsroot/hunspell/hunspell/src/tools/hunspell.cxx,v -retrieving revision 1.34 -diff -u -r1.34 hunspell.cxx ---- src/tools/hunspell.cxx 13 Jun 2013 19:37:30 -0000 1.34 -+++ src/tools/hunspell.cxx 25 Jul 2013 08:26:50 -0000 -@@ -854,18 +854,19 @@ - // like mbstowcs which isn't quite correct, but close enough for western - // text in UTF-8 - void strncpyu8(char * dest, const char * src, int begin, int n) { -- int u8 = ((ui_enc != NULL) && (strcmp(ui_enc, "UTF-8") == 0)) ? 1 : 0; -- int i = 0; -- while (i < begin + n) { -- if (i >= begin) -- { -- if (!*src) -- break; -- *dest++ = *src; -+ if (n) { -+ int u8 = ((ui_enc != NULL) && (strcmp(ui_enc, "UTF-8") == 0)) ? 1 : 0; -+ for (int i = 0; i < begin + n;) { -+ if (!*src) break; // source is at it's end -+ if (!u8 || (*src & 0xc0) != 0x80) i++; // new character -+ if(i > begin){ // copy char (w/ utf-8 bytes) -+ *dest++ = *src++; -+ while(u8 && (*src & 0xc0) == 0x80) *dest++ = *src++; -+ }else{ // skip char (w/ utf-8 bytes) -+ ++src; -+ while(u8 && (*src & 0xc0) == 0x80) ++src; -+ } - } -- if (!u8 || (*src & 0xc0) != 0x80) -- i++; -- ++src; - } - *dest = '\0'; - } -@@ -902,8 +903,6 @@ - expand_tab(lines[i], chenc(parser->get_prevline(i), io_enc, ui_enc), MAXLNLEN); - } - -- int prevline = 0; -- - strncpy(line, parser->get_prevline(0), parser->get_tokenpos()); - line[parser->get_tokenpos()] = '\0'; - int tokenbeg = expand_tab(line2, chenc(line, io_enc, ui_enc), MAXLNLEN); -@@ -912,10 +911,13 @@ - line[parser->get_tokenpos() + strlen(token)] = '\0'; - int tokenend = expand_tab(line2, chenc(line, io_enc, ui_enc), MAXLNLEN); - -- int rowindex = tokenend / x; -+ int rowindex = (tokenend - 1) / x; - int beginrow = rowindex - tokenbeg / x; - if (beginrow >= MAXPREVLINE) beginrow = MAXPREVLINE - 1; - -+ int ri = rowindex; -+ int prevline = 0; -+ - for (int i = 0; i < MAXPREVLINE; i++) { - strncpyu8(line, lines[prevline], x * rowindex, x); - mvprintw(MAXPREVLINE + 1 - i, 0, "%s", line); -@@ -927,7 +929,7 @@ - } - - int linestartpos = tokenbeg - (tokenbeg % x); -- strncpyu8(line, lines[0], x * rowindex + linestartpos, tokenbeg % x); -+ strncpyu8(line, lines[0], x * (ri - beginrow), tokenbeg % x) ; - mvprintw(MAXPREVLINE + 1 - beginrow, 0, "%s", line); - attron(A_REVERSE); - printw("%s", chenc(token, io_enc, ui_enc)); diff --git a/hunspell.spec b/hunspell.spec index d7448f7..d2401ea 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -2,8 +2,8 @@ Name: hunspell Summary: A spell checker and morphological analyzer library -Version: 1.3.2 -Release: 15%{?dist} +Version: 1.3.3 +Release: 1%{?dist} Source: http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz Group: System Environment/Libraries URL: http://hunspell.sourceforge.net/ @@ -17,11 +17,6 @@ BuildRequires: valgrind BuildRequires: words %endif Requires: hunspell-en-US -Patch0: hunspell.rhbz759647.patch -Patch1: hunspell.rhbz918938.patch -Patch2: hunspell-aarch64.patch -Patch3: hunspell.rhbz985052.patch -Patch4: manpage.esc.space.patch %description Hunspell is a spell checker and morphological analyzer library and program @@ -39,11 +34,6 @@ Includes and definitions for developing with hunspell %prep %setup -q -%patch0 -p0 -b .rhbz759647 -%patch1 -p0 -b .rhbz918938 -%patch2 -p1 -b .aarch64 -%patch3 -p0 -b .rhbz985052 -%patch4 -p1 -b .manpage.esc.space %build configureflags="--disable-rpath --disable-static --with-ui --with-readline" @@ -108,9 +98,7 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/myspell %{_bindir}/hunspell %{_mandir}/man1/hunspell.1.gz -%{_mandir}/man4/hunspell.4.gz %lang(hu) %{_mandir}/hu/man1/hunspell.1.gz -%lang(hu) %{_mandir}/hu/man4/hunspell.4.gz %files devel %defattr(-,root,root,-) @@ -131,8 +119,12 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/hunzip.1.gz %{_mandir}/man1/hzip.1.gz %{_mandir}/man3/hunspell.3.gz +%{_mandir}/man5/hunspell.5.gz %changelog +* Wed Jun 04 2014 Caolán McNamara - 1.3.3-1 +- Resolves: rhbz#1104042 update to latest version + * Tue Oct 15 2013 Caolán McNamara - 1.3.2-15 - Resolves: rhbz#1019158 esc space in man page diff --git a/manpage.esc.space.patch b/manpage.esc.space.patch deleted file mode 100644 index 25ed8aa..0000000 --- a/manpage.esc.space.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ru hunspell-1.3.2/man/hzip.1 hunspell-1.3.2/man/hzip.1 ---- hunspell-1.3.2/man/hzip.1 2013-10-15 11:35:17.788291795 +0100 -+++ hunspell-1.3.2/man/hzip.1 2013-10-15 11:35:22.955351493 +0100 -@@ -16,7 +16,7 @@ - .SH OPTIONS - .IP \fB\-h\fR - Display short help description. --.IP \fB\-P password\fR -+.IP \fB\-P\ password\fR - Encrypted compression by an arbitrary length password. - .SH SEE ALSO - .B hzip (1), hunspell(1) diff --git a/sources b/sources index d33cfc9..2a2bfef 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3121aaf3e13e5d88dfff13fb4a5f1ab8 hunspell-1.3.2.tar.gz +4967da60b23413604c9e563beacc63b4 hunspell-1.3.3.tar.gz From aba252cbd04c54b67fe4caeec37ebd2202c60a76 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 15:36:44 -0500 Subject: [PATCH 18/91] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index d2401ea..dd101f4 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.3.3 -Release: 1%{?dist} +Release: 2%{?dist} Source: http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz Group: System Environment/Libraries URL: http://hunspell.sourceforge.net/ @@ -122,6 +122,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man5/hunspell.5.gz %changelog +* Sat Jun 07 2014 Fedora Release Engineering - 1.3.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Wed Jun 04 2014 Caolán McNamara - 1.3.3-1 - Resolves: rhbz#1104042 update to latest version From 263ec973f14e8f70609ce000949f4154cd56a32a Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sat, 16 Aug 2014 20:50:11 +0000 Subject: [PATCH 19/91] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index dd101f4..649d145 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.3.3 -Release: 2%{?dist} +Release: 3%{?dist} Source: http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz Group: System Environment/Libraries URL: http://hunspell.sourceforge.net/ @@ -122,6 +122,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man5/hunspell.5.gz %changelog +* Sat Aug 16 2014 Fedora Release Engineering - 1.3.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Sat Jun 07 2014 Fedora Release Engineering - 1.3.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From 26dd6f9c3db9cba8a339ee684e6988f41d6de1bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 16 Oct 2014 15:37:58 +0100 Subject: [PATCH 20/91] Resolves: rhbz#915448 UTF-8 handling patch for emacs+ispell-mode --- hunspell.rhbz915448.patch | 55 +++++++++++++++++++++++++++++++++++++++ hunspell.spec | 8 +++++- 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 hunspell.rhbz915448.patch diff --git a/hunspell.rhbz915448.patch b/hunspell.rhbz915448.patch new file mode 100644 index 0000000..7b9c9fc --- /dev/null +++ b/hunspell.rhbz915448.patch @@ -0,0 +1,55 @@ +--- src/tools/hunspell.cxx~0 2011-01-21 19:01:29.000000000 +0200 ++++ src/tools/hunspell.cxx 2013-02-07 10:11:54.443610900 +0200 +@@ -710,13 +748,22 @@ if (pos >= 0) { + fflush(stdout); + } else { + char ** wlst = NULL; +- int ns = pMS[d]->suggest(&wlst, token); ++ int byte_offset = parser->get_tokenpos() + pos; ++ int char_offset = 0; ++ if (strcmp(io_enc, "UTF-8") == 0) { ++ for (int i = 0; i < byte_offset; i++) { ++ if ((buf[i] & 0xc0) != 0x80) ++ char_offset++; ++ } ++ } else { ++ char_offset = byte_offset; ++ } ++ int ns = pMS[d]->suggest(&wlst, chenc(token, io_enc, dic_enc[d])); + if (ns == 0) { +- fprintf(stdout,"# %s %d", token, +- parser->get_tokenpos() + pos); ++ fprintf(stdout,"# %s %d", token, char_offset); + } else { + fprintf(stdout,"& %s %d %d: ", token, ns, +- parser->get_tokenpos() + pos); ++ char_offset); + fprintf(stdout,"%s", chenc(wlst[0], dic_enc[d], io_enc)); + } + for (int j = 1; j < ns; j++) { +@@ -745,13 +792,23 @@ if (pos >= 0) { + if (root) free(root); + } else { + char ** wlst = NULL; ++ int byte_offset = parser->get_tokenpos() + pos; ++ int char_offset = 0; ++ if (strcmp(io_enc, "UTF-8") == 0) { ++ for (int i = 0; i < byte_offset; i++) { ++ if ((buf[i] & 0xc0) != 0x80) ++ char_offset++; ++ } ++ } else { ++ char_offset = byte_offset; ++ } + int ns = pMS[d]->suggest(&wlst, chenc(token, io_enc, dic_enc[d])); + if (ns == 0) { + fprintf(stdout,"# %s %d", chenc(token, io_enc, ui_enc), +- parser->get_tokenpos() + pos); ++ char_offset); + } else { + fprintf(stdout,"& %s %d %d: ", chenc(token, io_enc, ui_enc), ns, +- parser->get_tokenpos() + pos); ++ char_offset); + fprintf(stdout,"%s", chenc(wlst[0], dic_enc[d], ui_enc)); + } + for (int j = 1; j < ns; j++) { diff --git a/hunspell.spec b/hunspell.spec index 649d145..63a053e 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.3.3 -Release: 3%{?dist} +Release: 4%{?dist} Source: http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz Group: System Environment/Libraries URL: http://hunspell.sourceforge.net/ @@ -17,6 +17,7 @@ BuildRequires: valgrind BuildRequires: words %endif Requires: hunspell-en-US +Patch1: hunspell.rhbz915448.patch %description Hunspell is a spell checker and morphological analyzer library and program @@ -34,6 +35,7 @@ Includes and definitions for developing with hunspell %prep %setup -q +%patch1 -p0 -b .rhbz915448 %build configureflags="--disable-rpath --disable-static --with-ui --with-readline" @@ -122,6 +124,10 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man5/hunspell.5.gz %changelog +* Thu Oct 16 2014 maciek - 1.3.3-4 +- Resolves: rhbz#915448, UTF-8 handling patch from + http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7781#31 + * Sat Aug 16 2014 Fedora Release Engineering - 1.3.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From fa37bc3d7ae300fea8cc103ac468fd9aebcf9016 Mon Sep 17 00:00:00 2001 From: Till Maas Date: Sat, 21 Feb 2015 22:12:53 +0100 Subject: [PATCH 21/91] Rebuilt for Fedora 23 Change https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code --- hunspell.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index 63a053e..588f931 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.3.3 -Release: 4%{?dist} +Release: 5%{?dist} Source: http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz Group: System Environment/Libraries URL: http://hunspell.sourceforge.net/ @@ -124,6 +124,10 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man5/hunspell.5.gz %changelog +* Sat Feb 21 2015 Till Maas - 1.3.3-5 +- Rebuilt for Fedora 23 Change + https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code + * Thu Oct 16 2014 maciek - 1.3.3-4 - Resolves: rhbz#915448, UTF-8 handling patch from http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7781#31 From d898d1b5c190181d9feae52f4ca98cd848fdbfee Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 17 Jun 2015 10:38:49 +0000 Subject: [PATCH 22/91] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index 588f931..d9a1449 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.3.3 -Release: 5%{?dist} +Release: 6%{?dist} Source: http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz Group: System Environment/Libraries URL: http://hunspell.sourceforge.net/ @@ -124,6 +124,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man5/hunspell.5.gz %changelog +* Wed Jun 17 2015 Fedora Release Engineering - 1.3.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Sat Feb 21 2015 Till Maas - 1.3.3-5 - Rebuilt for Fedora 23 Change https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code From 0a76633cf581950fe6098a166828db4d5dc2cc44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 7 Jul 2015 08:46:51 +0100 Subject: [PATCH 23/91] Resolves: rhbz#1239570 FTBFS in rawhide with valgrind warnings --- hunspell.spec | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/hunspell.spec b/hunspell.spec index d9a1449..614720f 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.3.3 -Release: 6%{?dist} +Release: 7%{?dist} Source: http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz Group: System Environment/Libraries URL: http://hunspell.sourceforge.net/ @@ -71,12 +71,10 @@ make %{?_smp_mflags} %endif %check -#%ifarch %{ix86} x86_64, see rhbz#813780 -%ifarch %{ix86} -VALGRIND=memcheck make check -%else +#%ifarch %{ix86} x86_64, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65434 +#VALGRIND=memcheck make check make check -%endif +#%endif %install rm -rf $RPM_BUILD_ROOT @@ -124,6 +122,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man5/hunspell.5.gz %changelog +* Tue Jul 07 2017 Caolán McNamara - 1.3.3-7 +- Resolves: rhbz#1239570 FTBFS in rawhide with valgrind warnings + * Wed Jun 17 2015 Fedora Release Engineering - 1.3.3-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From e7a4cb5499d124a4a7bc44cc3ebd30a0492a49bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 7 Jul 2015 08:47:37 +0100 Subject: [PATCH 24/91] wrong date --- hunspell.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index 614720f..0dfd290 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -122,7 +122,7 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man5/hunspell.5.gz %changelog -* Tue Jul 07 2017 Caolán McNamara - 1.3.3-7 +* Tue Jul 07 2015 Caolán McNamara - 1.3.3-7 - Resolves: rhbz#1239570 FTBFS in rawhide with valgrind warnings * Wed Jun 17 2015 Fedora Release Engineering - 1.3.3-6 From fa17adea9e46b69c77afe3a054422a7b975ab64a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Fri, 11 Sep 2015 13:43:32 +0100 Subject: [PATCH 25/91] Resolves: rhbz#1261421 crash on mashing hangul korean keyboard --- ...61421-crash-on-mashing-hangul-korean.patch | 191 ++++++++++++++++++ hunspell.spec | 7 +- 2 files changed, 197 insertions(+), 1 deletion(-) create mode 100644 0001-Resolves-rhbz-1261421-crash-on-mashing-hangul-korean.patch diff --git a/0001-Resolves-rhbz-1261421-crash-on-mashing-hangul-korean.patch b/0001-Resolves-rhbz-1261421-crash-on-mashing-hangul-korean.patch new file mode 100644 index 0000000..e695fe9 --- /dev/null +++ b/0001-Resolves-rhbz-1261421-crash-on-mashing-hangul-korean.patch @@ -0,0 +1,191 @@ +From 97e079a23d459aeb6e64435350d7710c90dbca85 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Fri, 11 Sep 2015 13:28:52 +0100 +Subject: [PATCH] Resolves: rhbz#1261421 crash on mashing hangul korean + keyboard + +--- + src/hunspell/hunspell.cxx | 69 +++++++++++++++++++++++++++++++++++------------ + src/hunspell/hunspell.hxx | 4 ++- + src/hunspell/replist.cxx | 18 ++++++++++--- + src/hunspell/replist.hxx | 2 ++ + src/tools/hunspell.cxx | 2 +- + 6 files changed, 78 insertions(+), 24 deletions(-) + +diff --git a/src/hunspell/hunspell.cxx b/src/hunspell/hunspell.cxx +index 7fae54b..d8ef357 100644 +--- a/src/hunspell/hunspell.cxx ++++ b/src/hunspell/hunspell.cxx +@@ -12,6 +12,7 @@ + #endif + #include "csutil.hxx" + ++#include + #include + + Hunspell::Hunspell(const char * affpath, const char * dpath, const char * key) +@@ -349,8 +350,13 @@ int Hunspell::spell(const char * word, int * info, char ** root) + + // input conversion + RepList * rl = (pAMgr) ? pAMgr->get_iconvtable() : NULL; +- if (rl && rl->conv(word, wspace)) wl = cleanword2(cw, wspace, unicw, &nc, &captype, &abbv); +- else wl = cleanword2(cw, word, unicw, &nc, &captype, &abbv); ++ int convstatus = rl ? rl->conv(word, wspace, MAXWORDUTF8LEN) : 0; ++ if (convstatus < 0) ++ return 0; ++ else if (convstatus > 0) ++ wl = cleanword2(cw, wspace, unicw, &nc, &captype, &abbv); ++ else ++ wl = cleanword2(cw, word, unicw, &nc, &captype, &abbv); + + if (wl == 0 || maxdic == 0) return 1; + if (root) *root = NULL; +@@ -702,8 +708,13 @@ int Hunspell::suggest(char*** slst, const char * word) + + // input conversion + RepList * rl = (pAMgr) ? pAMgr->get_iconvtable() : NULL; +- if (rl && rl->conv(word, wspace)) wl = cleanword2(cw, wspace, unicw, &nc, &captype, &abbv); +- else wl = cleanword2(cw, word, unicw, &nc, &captype, &abbv); ++ int convstatus = rl ? rl->conv(word, wspace, MAXWORDUTF8LEN) : 0; ++ if (convstatus < 0) ++ return 0; ++ else if (convstatus > 0) ++ wl = cleanword2(cw, wspace, unicw, &nc, &captype, &abbv); ++ else ++ wl = cleanword2(cw, word, unicw, &nc, &captype, &abbv); + + if (wl == 0) return 0; + int ns = 0; +@@ -1020,7 +1031,7 @@ int Hunspell::suggest(char*** slst, const char * word) + // output conversion + rl = (pAMgr) ? pAMgr->get_oconvtable() : NULL; + for (int j = 0; rl && j < ns; j++) { +- if (rl->conv((*slst)[j], wspace)) { ++ if (rl->conv((*slst)[j], wspace, MAXWORDUTF8LEN) > 0) { + free((*slst)[j]); + (*slst)[j] = mystrdup(wspace); + } +@@ -1395,8 +1406,13 @@ int Hunspell::analyze(char*** slst, const char * word) + + // input conversion + RepList * rl = (pAMgr) ? pAMgr->get_iconvtable() : NULL; +- if (rl && rl->conv(word, wspace)) wl = cleanword2(cw, wspace, unicw, &nc, &captype, &abbv); +- else wl = cleanword2(cw, word, unicw, &nc, &captype, &abbv); ++ int convstatus = rl ? rl->conv(word, wspace, MAXWORDUTF8LEN) : 0; ++ if (convstatus < 0) ++ return 0; ++ else if (convstatus > 0) ++ wl = cleanword2(cw, wspace, unicw, &nc, &captype, &abbv); ++ else ++ wl = cleanword2(cw, word, unicw, &nc, &captype, &abbv); + + if (wl == 0) { + if (abbv) { +@@ -1684,12 +1700,16 @@ int Hunspell::get_langnum() const + return langnum; + } + +-int Hunspell::input_conv(const char * word, char * dest) ++int Hunspell::input_conv(const char * word, char * dest, size_t destsize) + { + RepList * rl = (pAMgr) ? pAMgr->get_iconvtable() : NULL; +- return (rl && rl->conv(word, dest)); ++ return (rl && rl->conv(word, dest, destsize) > 0); + } + ++int Hunspell::input_conv(const char * word, char * dest) ++{ ++ return input_conv(word, dest, std::numeric_limits::max()); ++} + + // return the beginning of the element (attr == NULL) or the attribute + const char * Hunspell::get_xml_pos(const char * s, const char * attr) +diff --git a/src/hunspell/hunspell.hxx b/src/hunspell/hunspell.hxx +index e62f0dd..0b5ad2e 100644 +--- a/src/hunspell/hunspell.hxx ++++ b/src/hunspell/hunspell.hxx +@@ -226,7 +226,9 @@ public: + + /* need for putdic */ + int input_conv(const char * word, char * dest); +- ++ // ^^-deprecated, use this-vv" ++ int input_conv(const char * word, char * dest, size_t destsize); ++ + /* experimental and deprecated functions */ + + #ifdef HUNSPELL_EXPERIMENTAL +diff --git a/src/hunspell/replist.cxx b/src/hunspell/replist.cxx +index b9b1255..bac3e06 100644 +--- a/src/hunspell/replist.cxx ++++ b/src/hunspell/replist.cxx +@@ -74,6 +74,7 @@ + #include + #include + #include ++#include + + #include "replist.hxx" + #include "csutil.hxx" +@@ -139,19 +140,30 @@ int RepList::add(char * pat1, char * pat2) { + return 0; + } + +-int RepList::conv(const char * word, char * dest) { ++int RepList::conv(const char * word, char * dest, size_t destsize) { + int stl = 0; + int change = 0; + for (size_t i = 0; i < strlen(word); i++) { + int n = near(word + i); + int l = match(word + i, n); + if (l) { ++ size_t replen = strlen(dat[n]->pattern2); ++ if (stl+replen >= destsize) ++ return -1; + strcpy(dest + stl, dat[n]->pattern2); +- stl += strlen(dat[n]->pattern2); ++ stl += replen; + i += l - 1; + change = 1; +- } else dest[stl++] = word[i]; ++ } else { ++ if (stl+1 >= destsize) ++ return -1; ++ dest[stl++] = word[i]; ++ } + } + dest[stl] = '\0'; + return change; + } ++ ++int RepList::conv(const char * word, char * dest) { ++ return conv(word, dest, std::numeric_limits::max()); ++} +diff --git a/src/hunspell/replist.hxx b/src/hunspell/replist.hxx +index 1e3d6e4..e418298 100644 +--- a/src/hunspell/replist.hxx ++++ b/src/hunspell/replist.hxx +@@ -99,5 +99,7 @@ public: + int near(const char * word); + int match(const char * word, int n); + int conv(const char * word, char * dest); ++ // ^^-deprecated, use this-vv" ++ int conv(const char * word, char * dest, size_t destsize); + }; + #endif +diff --git a/src/tools/hunspell.cxx b/src/tools/hunspell.cxx +index 6124ac4..1b50fe1 100644 +--- a/src/tools/hunspell.cxx ++++ b/src/tools/hunspell.cxx +@@ -524,7 +524,7 @@ int putdic(char * word, Hunspell * pMS) + + word = chenc(word, ui_enc, dic_enc[0]); + +- if(pMS->input_conv(word, buf)) word = buf; ++ if(pMS->input_conv(word, buf, MAXLNLEN)) word = buf; + + int ret; + +-- +2.4.0 + diff --git a/hunspell.spec b/hunspell.spec index 0dfd290..ff1d0a1 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.3.3 -Release: 7%{?dist} +Release: 8%{?dist} Source: http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz Group: System Environment/Libraries URL: http://hunspell.sourceforge.net/ @@ -18,6 +18,7 @@ BuildRequires: words %endif Requires: hunspell-en-US Patch1: hunspell.rhbz915448.patch +Patch2: 0001-Resolves-rhbz-1261421-crash-on-mashing-hangul-korean.patch %description Hunspell is a spell checker and morphological analyzer library and program @@ -36,6 +37,7 @@ Includes and definitions for developing with hunspell %prep %setup -q %patch1 -p0 -b .rhbz915448 +%patch2 -p1 -b .rhbz1261421 %build configureflags="--disable-rpath --disable-static --with-ui --with-readline" @@ -122,6 +124,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man5/hunspell.5.gz %changelog +* Fri Sep 11 2015 Caolán McNamara - 1.3.3-8 +- Resolves: rhbz#1261421 crash on mashing hangul korean keyboard + * Tue Jul 07 2015 Caolán McNamara - 1.3.3-7 - Resolves: rhbz#1239570 FTBFS in rawhide with valgrind warnings From 6b2ac61fd4084b85188a97788f039cc6de06441e Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 3 Feb 2016 23:58:35 +0000 Subject: [PATCH 26/91] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index ff1d0a1..e2aee93 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.3.3 -Release: 8%{?dist} +Release: 9%{?dist} Source: http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz Group: System Environment/Libraries URL: http://hunspell.sourceforge.net/ @@ -124,6 +124,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man5/hunspell.5.gz %changelog +* Wed Feb 03 2016 Fedora Release Engineering - 1.3.3-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Fri Sep 11 2015 Caolán McNamara - 1.3.3-8 - Resolves: rhbz#1261421 crash on mashing hangul korean keyboard From 85ada8ba81775356830259617f11e44362697b1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Mon, 18 Apr 2016 10:51:07 +0100 Subject: [PATCH 27/91] latest version --- .gitignore | 2 +- hunspell.spec | 22 +++++++++++----------- sources | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 4ea2301..d1a89e8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/hunspell-1.3.3.tar.gz +/v1.4.0.tar.gz diff --git a/hunspell.spec b/hunspell.spec index e2aee93..1df2ff8 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -2,11 +2,11 @@ Name: hunspell Summary: A spell checker and morphological analyzer library -Version: 1.3.3 -Release: 9%{?dist} -Source: http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz +Version: 1.4.0 +Release: 1%{?dist} +Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz Group: System Environment/Libraries -URL: http://hunspell.sourceforge.net/ +URL: https://github.com/hunspell/hunspell BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) License: LGPLv2+ or GPLv2+ or MPLv1.1 BuildRequires: ncurses-devel @@ -17,8 +17,6 @@ BuildRequires: valgrind BuildRequires: words %endif Requires: hunspell-en-US -Patch1: hunspell.rhbz915448.patch -Patch2: 0001-Resolves-rhbz-1261421-crash-on-mashing-hangul-korean.patch %description Hunspell is a spell checker and morphological analyzer library and program @@ -36,8 +34,6 @@ Includes and definitions for developing with hunspell %prep %setup -q -%patch1 -p0 -b .rhbz915448 -%patch2 -p1 -b .rhbz1261421 %build configureflags="--disable-rpath --disable-static --with-ui --with-readline" @@ -71,12 +67,13 @@ make distclean %{profileuse} %configure $configureflags make %{?_smp_mflags} %endif +cd po && make %{?_smp_mflags} update-gmo && cd .. %check -#%ifarch %{ix86} x86_64, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65434 -#VALGRIND=memcheck make check +%ifarch %{ix86} x86_64 +VALGRIND=memcheck make check make check -#%endif +%endif %install rm -rf $RPM_BUILD_ROOT @@ -124,6 +121,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man5/hunspell.5.gz %changelog +* Mon Apr 18 2016 Caolán McNamara - 1.4.0-1 +- latest version + * Wed Feb 03 2016 Fedora Release Engineering - 1.3.3-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/sources b/sources index 2a2bfef..b837586 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4967da60b23413604c9e563beacc63b4 hunspell-1.3.3.tar.gz +f5ab9c776b4c26914624f9789de5a70f v1.4.0.tar.gz From a72dc10fcc219cbb5c0dad199fdcffa912058e5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Mon, 18 Apr 2016 11:26:48 +0100 Subject: [PATCH 28/91] add gettext build depend --- hunspell.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index 1df2ff8..a2c8bd0 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -9,7 +9,7 @@ Group: System Environment/Libraries URL: https://github.com/hunspell/hunspell BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) License: LGPLv2+ or GPLv2+ or MPLv1.1 -BuildRequires: ncurses-devel +BuildRequires: ncurses-devel, gettext %ifarch %{ix86} x86_64 BuildRequires: valgrind %endif From dd1650c976be3c8f2f268799840cb2680ee6e064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 3 May 2016 09:01:21 +0100 Subject: [PATCH 29/91] latest version --- .gitignore | 2 +- hunspell.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index d1a89e8..3b30494 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/v1.4.0.tar.gz +/v1.4.1.tar.gz diff --git a/hunspell.spec b/hunspell.spec index a2c8bd0..09186e1 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -2,7 +2,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library -Version: 1.4.0 +Version: 1.4.1 Release: 1%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz Group: System Environment/Libraries @@ -121,6 +121,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man5/hunspell.5.gz %changelog +* Tue May 03 2016 Caolán McNamara - 1.4.1-1 +- latest version + * Mon Apr 18 2016 Caolán McNamara - 1.4.0-1 - latest version diff --git a/sources b/sources index b837586..0cd283d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f5ab9c776b4c26914624f9789de5a70f v1.4.0.tar.gz +33d370f7fe5a030985e445a5672b2067 v1.4.1.tar.gz From 0240ac6e07879b92f04cb9b93aecc3200fe122ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 24 Jun 2016 10:38:31 +0200 Subject: [PATCH 30/91] Mandatory Perl build-requires added --- hunspell.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/hunspell.spec b/hunspell.spec index 09186e1..c375859 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -10,6 +10,7 @@ URL: https://github.com/hunspell/hunspell BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) License: LGPLv2+ or GPLv2+ or MPLv1.1 BuildRequires: ncurses-devel, gettext +BuildRequires: perl-generators %ifarch %{ix86} x86_64 BuildRequires: valgrind %endif From dd0d1fd95b52edba2433e32e9782009ff659aaf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 7 Dec 2016 16:12:08 +0000 Subject: [PATCH 31/91] drop unapplied patches --- ...61421-crash-on-mashing-hangul-korean.patch | 191 ------------------ hunspell.rhbz915448.patch | 55 ----- 2 files changed, 246 deletions(-) delete mode 100644 0001-Resolves-rhbz-1261421-crash-on-mashing-hangul-korean.patch delete mode 100644 hunspell.rhbz915448.patch diff --git a/0001-Resolves-rhbz-1261421-crash-on-mashing-hangul-korean.patch b/0001-Resolves-rhbz-1261421-crash-on-mashing-hangul-korean.patch deleted file mode 100644 index e695fe9..0000000 --- a/0001-Resolves-rhbz-1261421-crash-on-mashing-hangul-korean.patch +++ /dev/null @@ -1,191 +0,0 @@ -From 97e079a23d459aeb6e64435350d7710c90dbca85 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Fri, 11 Sep 2015 13:28:52 +0100 -Subject: [PATCH] Resolves: rhbz#1261421 crash on mashing hangul korean - keyboard - ---- - src/hunspell/hunspell.cxx | 69 +++++++++++++++++++++++++++++++++++------------ - src/hunspell/hunspell.hxx | 4 ++- - src/hunspell/replist.cxx | 18 ++++++++++--- - src/hunspell/replist.hxx | 2 ++ - src/tools/hunspell.cxx | 2 +- - 6 files changed, 78 insertions(+), 24 deletions(-) - -diff --git a/src/hunspell/hunspell.cxx b/src/hunspell/hunspell.cxx -index 7fae54b..d8ef357 100644 ---- a/src/hunspell/hunspell.cxx -+++ b/src/hunspell/hunspell.cxx -@@ -12,6 +12,7 @@ - #endif - #include "csutil.hxx" - -+#include - #include - - Hunspell::Hunspell(const char * affpath, const char * dpath, const char * key) -@@ -349,8 +350,13 @@ int Hunspell::spell(const char * word, int * info, char ** root) - - // input conversion - RepList * rl = (pAMgr) ? pAMgr->get_iconvtable() : NULL; -- if (rl && rl->conv(word, wspace)) wl = cleanword2(cw, wspace, unicw, &nc, &captype, &abbv); -- else wl = cleanword2(cw, word, unicw, &nc, &captype, &abbv); -+ int convstatus = rl ? rl->conv(word, wspace, MAXWORDUTF8LEN) : 0; -+ if (convstatus < 0) -+ return 0; -+ else if (convstatus > 0) -+ wl = cleanword2(cw, wspace, unicw, &nc, &captype, &abbv); -+ else -+ wl = cleanword2(cw, word, unicw, &nc, &captype, &abbv); - - if (wl == 0 || maxdic == 0) return 1; - if (root) *root = NULL; -@@ -702,8 +708,13 @@ int Hunspell::suggest(char*** slst, const char * word) - - // input conversion - RepList * rl = (pAMgr) ? pAMgr->get_iconvtable() : NULL; -- if (rl && rl->conv(word, wspace)) wl = cleanword2(cw, wspace, unicw, &nc, &captype, &abbv); -- else wl = cleanword2(cw, word, unicw, &nc, &captype, &abbv); -+ int convstatus = rl ? rl->conv(word, wspace, MAXWORDUTF8LEN) : 0; -+ if (convstatus < 0) -+ return 0; -+ else if (convstatus > 0) -+ wl = cleanword2(cw, wspace, unicw, &nc, &captype, &abbv); -+ else -+ wl = cleanword2(cw, word, unicw, &nc, &captype, &abbv); - - if (wl == 0) return 0; - int ns = 0; -@@ -1020,7 +1031,7 @@ int Hunspell::suggest(char*** slst, const char * word) - // output conversion - rl = (pAMgr) ? pAMgr->get_oconvtable() : NULL; - for (int j = 0; rl && j < ns; j++) { -- if (rl->conv((*slst)[j], wspace)) { -+ if (rl->conv((*slst)[j], wspace, MAXWORDUTF8LEN) > 0) { - free((*slst)[j]); - (*slst)[j] = mystrdup(wspace); - } -@@ -1395,8 +1406,13 @@ int Hunspell::analyze(char*** slst, const char * word) - - // input conversion - RepList * rl = (pAMgr) ? pAMgr->get_iconvtable() : NULL; -- if (rl && rl->conv(word, wspace)) wl = cleanword2(cw, wspace, unicw, &nc, &captype, &abbv); -- else wl = cleanword2(cw, word, unicw, &nc, &captype, &abbv); -+ int convstatus = rl ? rl->conv(word, wspace, MAXWORDUTF8LEN) : 0; -+ if (convstatus < 0) -+ return 0; -+ else if (convstatus > 0) -+ wl = cleanword2(cw, wspace, unicw, &nc, &captype, &abbv); -+ else -+ wl = cleanword2(cw, word, unicw, &nc, &captype, &abbv); - - if (wl == 0) { - if (abbv) { -@@ -1684,12 +1700,16 @@ int Hunspell::get_langnum() const - return langnum; - } - --int Hunspell::input_conv(const char * word, char * dest) -+int Hunspell::input_conv(const char * word, char * dest, size_t destsize) - { - RepList * rl = (pAMgr) ? pAMgr->get_iconvtable() : NULL; -- return (rl && rl->conv(word, dest)); -+ return (rl && rl->conv(word, dest, destsize) > 0); - } - -+int Hunspell::input_conv(const char * word, char * dest) -+{ -+ return input_conv(word, dest, std::numeric_limits::max()); -+} - - // return the beginning of the element (attr == NULL) or the attribute - const char * Hunspell::get_xml_pos(const char * s, const char * attr) -diff --git a/src/hunspell/hunspell.hxx b/src/hunspell/hunspell.hxx -index e62f0dd..0b5ad2e 100644 ---- a/src/hunspell/hunspell.hxx -+++ b/src/hunspell/hunspell.hxx -@@ -226,7 +226,9 @@ public: - - /* need for putdic */ - int input_conv(const char * word, char * dest); -- -+ // ^^-deprecated, use this-vv" -+ int input_conv(const char * word, char * dest, size_t destsize); -+ - /* experimental and deprecated functions */ - - #ifdef HUNSPELL_EXPERIMENTAL -diff --git a/src/hunspell/replist.cxx b/src/hunspell/replist.cxx -index b9b1255..bac3e06 100644 ---- a/src/hunspell/replist.cxx -+++ b/src/hunspell/replist.cxx -@@ -74,6 +74,7 @@ - #include - #include - #include -+#include - - #include "replist.hxx" - #include "csutil.hxx" -@@ -139,19 +140,30 @@ int RepList::add(char * pat1, char * pat2) { - return 0; - } - --int RepList::conv(const char * word, char * dest) { -+int RepList::conv(const char * word, char * dest, size_t destsize) { - int stl = 0; - int change = 0; - for (size_t i = 0; i < strlen(word); i++) { - int n = near(word + i); - int l = match(word + i, n); - if (l) { -+ size_t replen = strlen(dat[n]->pattern2); -+ if (stl+replen >= destsize) -+ return -1; - strcpy(dest + stl, dat[n]->pattern2); -- stl += strlen(dat[n]->pattern2); -+ stl += replen; - i += l - 1; - change = 1; -- } else dest[stl++] = word[i]; -+ } else { -+ if (stl+1 >= destsize) -+ return -1; -+ dest[stl++] = word[i]; -+ } - } - dest[stl] = '\0'; - return change; - } -+ -+int RepList::conv(const char * word, char * dest) { -+ return conv(word, dest, std::numeric_limits::max()); -+} -diff --git a/src/hunspell/replist.hxx b/src/hunspell/replist.hxx -index 1e3d6e4..e418298 100644 ---- a/src/hunspell/replist.hxx -+++ b/src/hunspell/replist.hxx -@@ -99,5 +99,7 @@ public: - int near(const char * word); - int match(const char * word, int n); - int conv(const char * word, char * dest); -+ // ^^-deprecated, use this-vv" -+ int conv(const char * word, char * dest, size_t destsize); - }; - #endif -diff --git a/src/tools/hunspell.cxx b/src/tools/hunspell.cxx -index 6124ac4..1b50fe1 100644 ---- a/src/tools/hunspell.cxx -+++ b/src/tools/hunspell.cxx -@@ -524,7 +524,7 @@ int putdic(char * word, Hunspell * pMS) - - word = chenc(word, ui_enc, dic_enc[0]); - -- if(pMS->input_conv(word, buf)) word = buf; -+ if(pMS->input_conv(word, buf, MAXLNLEN)) word = buf; - - int ret; - --- -2.4.0 - diff --git a/hunspell.rhbz915448.patch b/hunspell.rhbz915448.patch deleted file mode 100644 index 7b9c9fc..0000000 --- a/hunspell.rhbz915448.patch +++ /dev/null @@ -1,55 +0,0 @@ ---- src/tools/hunspell.cxx~0 2011-01-21 19:01:29.000000000 +0200 -+++ src/tools/hunspell.cxx 2013-02-07 10:11:54.443610900 +0200 -@@ -710,13 +748,22 @@ if (pos >= 0) { - fflush(stdout); - } else { - char ** wlst = NULL; -- int ns = pMS[d]->suggest(&wlst, token); -+ int byte_offset = parser->get_tokenpos() + pos; -+ int char_offset = 0; -+ if (strcmp(io_enc, "UTF-8") == 0) { -+ for (int i = 0; i < byte_offset; i++) { -+ if ((buf[i] & 0xc0) != 0x80) -+ char_offset++; -+ } -+ } else { -+ char_offset = byte_offset; -+ } -+ int ns = pMS[d]->suggest(&wlst, chenc(token, io_enc, dic_enc[d])); - if (ns == 0) { -- fprintf(stdout,"# %s %d", token, -- parser->get_tokenpos() + pos); -+ fprintf(stdout,"# %s %d", token, char_offset); - } else { - fprintf(stdout,"& %s %d %d: ", token, ns, -- parser->get_tokenpos() + pos); -+ char_offset); - fprintf(stdout,"%s", chenc(wlst[0], dic_enc[d], io_enc)); - } - for (int j = 1; j < ns; j++) { -@@ -745,13 +792,23 @@ if (pos >= 0) { - if (root) free(root); - } else { - char ** wlst = NULL; -+ int byte_offset = parser->get_tokenpos() + pos; -+ int char_offset = 0; -+ if (strcmp(io_enc, "UTF-8") == 0) { -+ for (int i = 0; i < byte_offset; i++) { -+ if ((buf[i] & 0xc0) != 0x80) -+ char_offset++; -+ } -+ } else { -+ char_offset = byte_offset; -+ } - int ns = pMS[d]->suggest(&wlst, chenc(token, io_enc, dic_enc[d])); - if (ns == 0) { - fprintf(stdout,"# %s %d", chenc(token, io_enc, ui_enc), -- parser->get_tokenpos() + pos); -+ char_offset); - } else { - fprintf(stdout,"& %s %d %d: ", chenc(token, io_enc, ui_enc), ns, -- parser->get_tokenpos() + pos); -+ char_offset); - fprintf(stdout,"%s", chenc(wlst[0], dic_enc[d], ui_enc)); - } - for (int j = 1; j < ns; j++) { From 151cd77b2309615caf309d181b27efc8ac941066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 7 Dec 2016 16:13:22 +0000 Subject: [PATCH 32/91] latest release --- .gitignore | 2 +- hunspell.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 3b30494..47157fc 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/v1.4.1.tar.gz +/v1.5.4.tar.gz diff --git a/hunspell.spec b/hunspell.spec index c375859..2d25026 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -2,7 +2,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library -Version: 1.4.1 +Version: 1.5.4 Release: 1%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz Group: System Environment/Libraries @@ -122,6 +122,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man5/hunspell.5.gz %changelog +* Wed Dec 07 2016 Caolán McNamara - 1.5.4-1 +- latest release + * Tue May 03 2016 Caolán McNamara - 1.4.1-1 - latest version diff --git a/sources b/sources index 0cd283d..ff719a9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -33d370f7fe5a030985e445a5672b2067 v1.4.1.tar.gz +9849a2381bacbeb2714034ad825bede8 v1.5.4.tar.gz From c9cf84fccb19b8601bebcde64dfcfac8c0373d20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 13 Dec 2016 12:03:37 +0000 Subject: [PATCH 33/91] fix mem leak --- 0001-coverity-173065-Resource-leak.patch | 43 ++++++++++++++++++++++++ hunspell.spec | 5 ++- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 0001-coverity-173065-Resource-leak.patch diff --git a/0001-coverity-173065-Resource-leak.patch b/0001-coverity-173065-Resource-leak.patch new file mode 100644 index 0000000..aedec7a --- /dev/null +++ b/0001-coverity-173065-Resource-leak.patch @@ -0,0 +1,43 @@ +From 47ed203d1f58157a8e8c5cce51bfa2094018f847 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Wed, 7 Dec 2016 16:24:58 +0000 +Subject: [PATCH] coverity#173065 Resource leak + +--- + src/tools/hunspell.cxx | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/src/tools/hunspell.cxx b/src/tools/hunspell.cxx +index 6345cad..3a037b3 100644 +--- a/src/tools/hunspell.cxx ++++ b/src/tools/hunspell.cxx +@@ -1131,19 +1131,19 @@ void dialogscreen(TextParser* parser, + + // handle long lines and tabulators + std::string lines[MAXPREVLINE]; +- std::string pPrevLine; ++ std::string prevLine; + for (int i = 0; i < MAXPREVLINE; i++) { +- pPrevLine = parser->get_prevline(i); +- expand_tab(lines[i], chenc(pPrevLine, io_enc, ui_enc)); ++ prevLine = parser->get_prevline(i); ++ expand_tab(lines[i], chenc(prevLine, io_enc, ui_enc)); + } + +- pPrevLine = parser->get_prevline(0); +- std::string line = pPrevLine.substr(0, parser->get_tokenpos()); ++ prevLine = parser->get_prevline(0); ++ std::string line = prevLine.substr(0, parser->get_tokenpos()); + std::string line2; + int tokenbeg = expand_tab(line2, chenc(line, io_enc, ui_enc)); + +- pPrevLine = mystrdup(parser->get_prevline(0).c_str()); +- line = pPrevLine.substr(0, parser->get_tokenpos() + token.size()); ++ prevLine = parser->get_prevline(0); ++ line = prevLine.substr(0, parser->get_tokenpos() + token.size()); + int tokenend = expand_tab(line2, chenc(line, io_enc, ui_enc)); + + int rowindex = (tokenend - 1) / x; +-- +2.9.3 + diff --git a/hunspell.spec b/hunspell.spec index 2d25026..9b00e23 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -19,6 +19,8 @@ BuildRequires: words %endif Requires: hunspell-en-US +Patch0: 0001-coverity-173065-Resource-leak.patch + %description Hunspell is a spell checker and morphological analyzer library and program designed for languages with rich morphology and complex word compounding or @@ -35,6 +37,7 @@ Includes and definitions for developing with hunspell %prep %setup -q +%patch0 -p1 -b .cid173065 %build configureflags="--disable-rpath --disable-static --with-ui --with-readline" @@ -122,7 +125,7 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man5/hunspell.5.gz %changelog -* Wed Dec 07 2016 Caolán McNamara - 1.5.4-1 +* Tue Dec 13 2016 Caolán McNamara - 1.5.4-1 - latest release * Tue May 03 2016 Caolán McNamara - 1.4.1-1 From 21c47481b5b31ba2c6b7898a04c2f2d6d07f0c96 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 10 Feb 2017 12:47:16 +0000 Subject: [PATCH 34/91] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index 9b00e23..0f5158f 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.5.4 -Release: 1%{?dist} +Release: 2%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz Group: System Environment/Libraries URL: https://github.com/hunspell/hunspell @@ -125,6 +125,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man5/hunspell.5.gz %changelog +* Fri Feb 10 2017 Fedora Release Engineering - 1.5.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Tue Dec 13 2016 Caolán McNamara - 1.5.4-1 - latest release From c9e28af690d7a868e29cc34d7165e54c9c1a3ddc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 26 Jul 2017 12:55:52 +0000 Subject: [PATCH 35/91] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index 0f5158f..d984d61 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.5.4 -Release: 2%{?dist} +Release: 3%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz Group: System Environment/Libraries URL: https://github.com/hunspell/hunspell @@ -125,6 +125,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man5/hunspell.5.gz %changelog +* Wed Jul 26 2017 Fedora Release Engineering - 1.5.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Fri Feb 10 2017 Fedora Release Engineering - 1.5.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 213d40ed7d71d95f073d5d79a5079c411260ce79 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 2 Aug 2017 23:34:29 +0000 Subject: [PATCH 36/91] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index d984d61..b9b62f8 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.5.4 -Release: 3%{?dist} +Release: 4%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz Group: System Environment/Libraries URL: https://github.com/hunspell/hunspell @@ -125,6 +125,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man5/hunspell.5.gz %changelog +* Wed Aug 02 2017 Fedora Release Engineering - 1.5.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Wed Jul 26 2017 Fedora Release Engineering - 1.5.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From 185800b73dead9ba07369f522256c9012a44a253 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Fri, 24 Nov 2017 09:30:23 +0000 Subject: [PATCH 37/91] latest version --- .gitignore | 2 +- 0001-coverity-173065-Resource-leak.patch | 43 ------------------------ hunspell.spec | 13 +++---- sources | 2 +- 4 files changed, 9 insertions(+), 51 deletions(-) delete mode 100644 0001-coverity-173065-Resource-leak.patch diff --git a/.gitignore b/.gitignore index 47157fc..0ca46b9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/v1.5.4.tar.gz +/v1.6.2.tar.gz diff --git a/0001-coverity-173065-Resource-leak.patch b/0001-coverity-173065-Resource-leak.patch deleted file mode 100644 index aedec7a..0000000 --- a/0001-coverity-173065-Resource-leak.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 47ed203d1f58157a8e8c5cce51bfa2094018f847 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Wed, 7 Dec 2016 16:24:58 +0000 -Subject: [PATCH] coverity#173065 Resource leak - ---- - src/tools/hunspell.cxx | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -diff --git a/src/tools/hunspell.cxx b/src/tools/hunspell.cxx -index 6345cad..3a037b3 100644 ---- a/src/tools/hunspell.cxx -+++ b/src/tools/hunspell.cxx -@@ -1131,19 +1131,19 @@ void dialogscreen(TextParser* parser, - - // handle long lines and tabulators - std::string lines[MAXPREVLINE]; -- std::string pPrevLine; -+ std::string prevLine; - for (int i = 0; i < MAXPREVLINE; i++) { -- pPrevLine = parser->get_prevline(i); -- expand_tab(lines[i], chenc(pPrevLine, io_enc, ui_enc)); -+ prevLine = parser->get_prevline(i); -+ expand_tab(lines[i], chenc(prevLine, io_enc, ui_enc)); - } - -- pPrevLine = parser->get_prevline(0); -- std::string line = pPrevLine.substr(0, parser->get_tokenpos()); -+ prevLine = parser->get_prevline(0); -+ std::string line = prevLine.substr(0, parser->get_tokenpos()); - std::string line2; - int tokenbeg = expand_tab(line2, chenc(line, io_enc, ui_enc)); - -- pPrevLine = mystrdup(parser->get_prevline(0).c_str()); -- line = pPrevLine.substr(0, parser->get_tokenpos() + token.size()); -+ prevLine = parser->get_prevline(0); -+ line = prevLine.substr(0, parser->get_tokenpos() + token.size()); - int tokenend = expand_tab(line2, chenc(line, io_enc, ui_enc)); - - int rowindex = (tokenend - 1) / x; --- -2.9.3 - diff --git a/hunspell.spec b/hunspell.spec index b9b62f8..2a1e235 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -2,8 +2,8 @@ Name: hunspell Summary: A spell checker and morphological analyzer library -Version: 1.5.4 -Release: 4%{?dist} +Version: 1.6.2 +Release: 1%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz Group: System Environment/Libraries URL: https://github.com/hunspell/hunspell @@ -19,8 +19,6 @@ BuildRequires: words %endif Requires: hunspell-en-US -Patch0: 0001-coverity-173065-Resource-leak.patch - %description Hunspell is a spell checker and morphological analyzer library and program designed for languages with rich morphology and complex word compounding or @@ -37,9 +35,9 @@ Includes and definitions for developing with hunspell %prep %setup -q -%patch0 -p1 -b .cid173065 %build +autoreconf -vfi configureflags="--disable-rpath --disable-static --with-ui --with-readline" %define profilegenerate \ @@ -96,7 +94,7 @@ rm -rf $RPM_BUILD_ROOT %files -f %{name}.lang %defattr(-,root,root,-) -%doc README README.myspell COPYING COPYING.LGPL COPYING.MPL AUTHORS AUTHORS.myspell license.hunspell license.myspell THANKS +%doc README README.myspell COPYING COPYING.LESSER COPYING.MPL AUTHORS AUTHORS.myspell license.hunspell license.myspell THANKS %{_libdir}/*.so.* %{_datadir}/myspell %{_bindir}/hunspell @@ -125,6 +123,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man5/hunspell.5.gz %changelog +* Fri Nov 24 2017 Caolán McNamara - 1.6.2-1 +- latest release + * Wed Aug 02 2017 Fedora Release Engineering - 1.5.4-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild diff --git a/sources b/sources index ff719a9..3b7eb92 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9849a2381bacbeb2714034ad825bede8 v1.5.4.tar.gz +SHA512 (v1.6.2.tar.gz) = a23127f1271da95ac06a1fb2f57b659485e959567b61da05b2bb350684003a0fb7e882b5e524c465fd890f79f513ed03174f38611989a1c09081147c47d6da11 From 36e80daba49d66cee66a828ea0c5bf0db5f55726 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Fri, 24 Nov 2017 10:21:15 +0000 Subject: [PATCH 38/91] need autoconf for autoreconf --- hunspell.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index 2a1e235..c15595f 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -9,7 +9,7 @@ Group: System Environment/Libraries URL: https://github.com/hunspell/hunspell BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) License: LGPLv2+ or GPLv2+ or MPLv1.1 -BuildRequires: ncurses-devel, gettext +BuildRequires: autoconf, ncurses-devel, gettext BuildRequires: perl-generators %ifarch %{ix86} x86_64 BuildRequires: valgrind From 67d0dbc4f83939ddb12f863674c12f4c99ba344c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Fri, 24 Nov 2017 10:26:16 +0000 Subject: [PATCH 39/91] and need automake too --- hunspell.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index c15595f..4529545 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -9,7 +9,7 @@ Group: System Environment/Libraries URL: https://github.com/hunspell/hunspell BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) License: LGPLv2+ or GPLv2+ or MPLv1.1 -BuildRequires: autoconf, ncurses-devel, gettext +BuildRequires: autoconf, automake, ncurses-devel, gettext BuildRequires: perl-generators %ifarch %{ix86} x86_64 BuildRequires: valgrind From 2a9d287122069c6b023cabf4b824be816a792e63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Fri, 24 Nov 2017 10:32:14 +0000 Subject: [PATCH 40/91] probably need libtool too --- hunspell.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index 4529545..9f7923d 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -9,7 +9,7 @@ Group: System Environment/Libraries URL: https://github.com/hunspell/hunspell BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) License: LGPLv2+ or GPLv2+ or MPLv1.1 -BuildRequires: autoconf, automake, ncurses-devel, gettext +BuildRequires: autoconf, automake, libtool, ncurses-devel, gettext BuildRequires: perl-generators %ifarch %{ix86} x86_64 BuildRequires: valgrind From 421a2c2d3a39c1a0893aa6f8d7122c2df9aec208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Fri, 24 Nov 2017 10:32:33 +0000 Subject: [PATCH 41/91] OpenOffice.org->LibreOffice --- hunspell.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index 9f7923d..65e9796 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -23,7 +23,7 @@ Requires: hunspell-en-US Hunspell is a spell checker and morphological analyzer library and program designed for languages with rich morphology and complex word compounding or character encoding. Hunspell interfaces: Ispell-like terminal interface using -Curses library, Ispell pipe interface, OpenOffice.org UNO module. +Curses library, Ispell pipe interface, LibreOffice UNO module. %package devel Requires: hunspell = %{version}-%{release}, pkgconfig From 617a42dd16d0af10124ea63d2763e9997d5e5d98 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 7 Feb 2018 16:34:33 +0000 Subject: [PATCH 42/91] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index 65e9796..ebc7575 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.6.2 -Release: 1%{?dist} +Release: 2%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz Group: System Environment/Libraries URL: https://github.com/hunspell/hunspell @@ -123,6 +123,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man5/hunspell.5.gz %changelog +* Wed Feb 07 2018 Fedora Release Engineering - 1.6.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Fri Nov 24 2017 Caolán McNamara - 1.6.2-1 - latest release From c86cc0231b6e329ef9d1a9207781eaea6c06103c Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Tue, 13 Feb 2018 23:30:53 +0100 Subject: [PATCH 43/91] Remove BuildRoot definition None of currently supported distributions need that. It was needed last for EL5 which is EOL now Signed-off-by: Igor Gnatenko --- hunspell.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index ebc7575..3fecdc9 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -7,7 +7,6 @@ Release: 2%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz Group: System Environment/Libraries URL: https://github.com/hunspell/hunspell -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) License: LGPLv2+ or GPLv2+ or MPLv1.1 BuildRequires: autoconf, automake, libtool, ncurses-devel, gettext BuildRequires: perl-generators From 3b5b6310ba07815a871dd0bbad1f102edc725b1e Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Wed, 14 Feb 2018 08:07:12 +0100 Subject: [PATCH 44/91] Remove %clean section None of currently supported distributions need that. Last one was EL5 which is EOL for a while. Signed-off-by: Igor Gnatenko --- hunspell.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/hunspell.spec b/hunspell.spec index 3fecdc9..3dd8b56 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -84,9 +84,6 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %find_lang %{name} -%clean -rm -rf $RPM_BUILD_ROOT - %post -p /sbin/ldconfig %postun -p /sbin/ldconfig From 9b72b3bd6ec13c5443324d9863dcafccb82e8551 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 5 Jul 2018 14:22:18 -0400 Subject: [PATCH 45/91] Drop useless %%defattr --- hunspell.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/hunspell.spec b/hunspell.spec index 3dd8b56..d4c53ee 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -89,7 +89,6 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %postun -p /sbin/ldconfig %files -f %{name}.lang -%defattr(-,root,root,-) %doc README README.myspell COPYING COPYING.LESSER COPYING.MPL AUTHORS AUTHORS.myspell license.hunspell license.myspell THANKS %{_libdir}/*.so.* %{_datadir}/myspell @@ -98,7 +97,6 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %lang(hu) %{_mandir}/hu/man1/hunspell.1.gz %files devel -%defattr(-,root,root,-) %{_includedir}/%{name} %{_libdir}/*.so %{_bindir}/affixcompress From 064ce64e86a9a133ba38b4036d560446e1a74557 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 13 Jul 2018 05:09:24 +0000 Subject: [PATCH 46/91] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index d4c53ee..c4379b6 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.6.2 -Release: 2%{?dist} +Release: 3%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz Group: System Environment/Libraries URL: https://github.com/hunspell/hunspell @@ -117,6 +117,9 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %{_mandir}/man5/hunspell.5.gz %changelog +* Fri Jul 13 2018 Fedora Release Engineering - 1.6.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Wed Feb 07 2018 Fedora Release Engineering - 1.6.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 06de43a2eab015e5944047ccac06152041c80ed6 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Thu, 19 Jul 2018 20:56:42 +0200 Subject: [PATCH 47/91] add BuildRequires: gcc-c++ Reference: https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot --- hunspell.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/hunspell.spec b/hunspell.spec index c4379b6..f12997d 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -8,6 +8,7 @@ Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz Group: System Environment/Libraries URL: https://github.com/hunspell/hunspell License: LGPLv2+ or GPLv2+ or MPLv1.1 +BuildRequires: gcc-c++ BuildRequires: autoconf, automake, libtool, ncurses-devel, gettext BuildRequires: perl-generators %ifarch %{ix86} x86_64 From 73ecf2a5767a9eaa4016835a04d94b45d597b278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 13 Nov 2018 11:59:45 +0000 Subject: [PATCH 48/91] latest release --- hunspell.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hunspell.spec b/hunspell.spec index f12997d..dfb1b7f 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -2,8 +2,8 @@ Name: hunspell Summary: A spell checker and morphological analyzer library -Version: 1.6.2 -Release: 3%{?dist} +Version: 1.7.0 +Release: 1%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz Group: System Environment/Libraries URL: https://github.com/hunspell/hunspell @@ -90,7 +90,7 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %postun -p /sbin/ldconfig %files -f %{name}.lang -%doc README README.myspell COPYING COPYING.LESSER COPYING.MPL AUTHORS AUTHORS.myspell license.hunspell license.myspell THANKS +%doc README COPYING COPYING.LESSER COPYING.MPL AUTHORS license.hunspell license.myspell THANKS %{_libdir}/*.so.* %{_datadir}/myspell %{_bindir}/hunspell @@ -118,6 +118,9 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %{_mandir}/man5/hunspell.5.gz %changelog +* Tue Nov 13 2018 Caolán McNamara - 1.7.0-1 +- latest release + * Fri Jul 13 2018 Fedora Release Engineering - 1.6.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From 3ad3f366eb40ff7253afbb89341204b123877aaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 13 Nov 2018 12:05:46 +0000 Subject: [PATCH 49/91] latest release --- .gitignore | 2 +- sources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 0ca46b9..eb11a9d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/v1.6.2.tar.gz +/v1.7.0.tar.gz diff --git a/sources b/sources index 3b7eb92..07935b9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (v1.6.2.tar.gz) = a23127f1271da95ac06a1fb2f57b659485e959567b61da05b2bb350684003a0fb7e882b5e524c465fd890f79f513ed03174f38611989a1c09081147c47d6da11 +SHA512 (v1.7.0.tar.gz) = 8149b2e8b703a0610c9ca5160c2dfad3cf3b85b16b3f0f5cfcb7ebb802473b2d499e8e2d0a637a97a37a24d62424e82d3880809210d3f043fa17a4970d47c903 From cc3ba500f12964a16358b2a0614c185bc73e76ec Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Tue, 22 Jan 2019 18:39:17 +0100 Subject: [PATCH 50/91] Remove obsolete ldconfig scriptlets References: https://fedoraproject.org/wiki/Changes/RemoveObsoleteScriptlets Signed-off-by: Igor Gnatenko --- hunspell.spec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hunspell.spec b/hunspell.spec index dfb1b7f..fa2ff4f 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -85,9 +85,7 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %find_lang %{name} -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig +%ldconfig_scriptlets %files -f %{name}.lang %doc README COPYING COPYING.LESSER COPYING.MPL AUTHORS license.hunspell license.myspell THANKS From 5ed3140b190ce838c6a2669d46e2a8b4d8cb82ed Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 28 Jan 2019 20:17:48 +0100 Subject: [PATCH 51/91] Remove obsolete Group tag References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag --- hunspell.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/hunspell.spec b/hunspell.spec index fa2ff4f..f251a69 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -5,7 +5,6 @@ Summary: A spell checker and morphological analyzer library Version: 1.7.0 Release: 1%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz -Group: System Environment/Libraries URL: https://github.com/hunspell/hunspell License: LGPLv2+ or GPLv2+ or MPLv1.1 BuildRequires: gcc-c++ @@ -28,7 +27,6 @@ Curses library, Ispell pipe interface, LibreOffice UNO module. %package devel Requires: hunspell = %{version}-%{release}, pkgconfig Summary: Files for developing with hunspell -Group: Development/Libraries %description devel Includes and definitions for developing with hunspell From 44e4fe5f7853faf5c2184e382147c9c902945d5a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 1 Feb 2019 02:31:12 +0000 Subject: [PATCH 52/91] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index f251a69..76cbd69 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.7.0 -Release: 1%{?dist} +Release: 2%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz URL: https://github.com/hunspell/hunspell License: LGPLv2+ or GPLv2+ or MPLv1.1 @@ -114,6 +114,9 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %{_mandir}/man5/hunspell.5.gz %changelog +* Fri Feb 01 2019 Fedora Release Engineering - 1.7.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Tue Nov 13 2018 Caolán McNamara - 1.7.0-1 - latest release From b72077dc0fb06f88c2b3839a534bb0aab4e25d54 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jul 2019 08:41:08 +0000 Subject: [PATCH 53/91] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index 76cbd69..c4ce61c 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.7.0 -Release: 2%{?dist} +Release: 3%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz URL: https://github.com/hunspell/hunspell License: LGPLv2+ or GPLv2+ or MPLv1.1 @@ -114,6 +114,9 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %{_mandir}/man5/hunspell.5.gz %changelog +* Thu Jul 25 2019 Fedora Release Engineering - 1.7.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Fri Feb 01 2019 Fedora Release Engineering - 1.7.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 01fa8fbcad80edfa103a2981e7aec50d29e9cc73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 12 Nov 2019 20:16:29 +0000 Subject: [PATCH 54/91] Resolves: rhbz#1771027 CVE-2019-16707 --- 0001-invalid-read-memory-access-624.patch | 25 +++++++++++++++++++++++ hunspell.spec | 8 +++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 0001-invalid-read-memory-access-624.patch diff --git a/0001-invalid-read-memory-access-624.patch b/0001-invalid-read-memory-access-624.patch new file mode 100644 index 0000000..66b55e7 --- /dev/null +++ b/0001-invalid-read-memory-access-624.patch @@ -0,0 +1,25 @@ +From ac938e2ecb48ab4dd21298126c7921689d60571b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Tue, 12 Nov 2019 20:03:15 +0000 +Subject: [PATCH] invalid read memory access #624 + +--- + src/hunspell/suggestmgr.cxx | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/hunspell/suggestmgr.cxx b/src/hunspell/suggestmgr.cxx +index dba084e..c23f165 100644 +--- a/src/hunspell/suggestmgr.cxx ++++ b/src/hunspell/suggestmgr.cxx +@@ -2040,7 +2040,7 @@ int SuggestMgr::leftcommonsubstring( + int l2 = su2.size(); + // decapitalize dictionary word + if (complexprefixes) { +- if (su1[l1 - 1] == su2[l2 - 1]) ++ if (l1 && l2 && su1[l1 - 1] == su2[l2 - 1]) + return 1; + } else { + unsigned short idx = su2.empty() ? 0 : (su2[0].h << 8) + su2[0].l; +-- +2.23.0 + diff --git a/hunspell.spec b/hunspell.spec index c4ce61c..57f95fc 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.7.0 -Release: 3%{?dist} +Release: 4%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz URL: https://github.com/hunspell/hunspell License: LGPLv2+ or GPLv2+ or MPLv1.1 @@ -18,6 +18,8 @@ BuildRequires: words %endif Requires: hunspell-en-US +Patch0: 0001-invalid-read-memory-access-624.patch + %description Hunspell is a spell checker and morphological analyzer library and program designed for languages with rich morphology and complex word compounding or @@ -33,6 +35,7 @@ Includes and definitions for developing with hunspell %prep %setup -q +%patch0 -p1 -b .CVE-2019-16707 %build autoreconf -vfi @@ -114,6 +117,9 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %{_mandir}/man5/hunspell.5.gz %changelog +* Tue Nov 12 2019 Caolán McNamara - 1.7.0-4 +- Resolves: rhbz#1771027 CVE-2019-16707 + * Thu Jul 25 2019 Fedora Release Engineering - 1.7.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From 593ae09a892f34080df6ae98d917e6efe4ce199b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jan 2020 04:31:04 +0000 Subject: [PATCH 55/91] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index 57f95fc..cf5ed6e 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.7.0 -Release: 4%{?dist} +Release: 5%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz URL: https://github.com/hunspell/hunspell License: LGPLv2+ or GPLv2+ or MPLv1.1 @@ -117,6 +117,9 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %{_mandir}/man5/hunspell.5.gz %changelog +* Wed Jan 29 2020 Fedora Release Engineering - 1.7.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Tue Nov 12 2019 Caolán McNamara - 1.7.0-4 - Resolves: rhbz#1771027 CVE-2019-16707 From 113b75deb7918fda40fd5fb1db7a7743c4cb7bd8 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 14 Jul 2020 16:08:49 +0000 Subject: [PATCH 56/91] Use make macros https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro --- hunspell.spec | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/hunspell.spec b/hunspell.spec index cf5ed6e..8b73153 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.7.0 -Release: 5%{?dist} +Release: 6%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz URL: https://github.com/hunspell/hunspell License: LGPLv2+ or GPLv2+ or MPLv1.1 @@ -50,7 +50,7 @@ configureflags="--disable-rpath --disable-static --with-ui --with-readline" %if !%{double_profiling_build} %configure $configureflags -make %{?_smp_mflags} +%make_build %else #Generate a word list to use for profiling, take half of it to ensure #that the original word list is then considered to contain correctly @@ -60,7 +60,7 @@ head -n $((`cat /usr/share/dict/words | wc -l`/2)) /usr/share/dict/words |\ #generate profiling %{profilegenerate} %configure $configureflags -make %{?_smp_mflags} +%make_build ./src/tools/affixcompress words > /dev/null 2>&1 ./src/tools/hunspell -d words -l /usr/share/dict/words > /dev/null make check @@ -68,9 +68,9 @@ make distclean #use profiling %{profileuse} %configure $configureflags -make %{?_smp_mflags} +%make_build %endif -cd po && make %{?_smp_mflags} update-gmo && cd .. +cd po && %make_build update-gmo && cd .. %check %ifarch %{ix86} x86_64 @@ -80,7 +80,7 @@ make check %install rm -rf $RPM_BUILD_ROOT -make DESTDIR=$RPM_BUILD_ROOT install +%make_install rm -f $RPM_BUILD_ROOT/%{_libdir}/*.a rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell @@ -117,6 +117,10 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %{_mandir}/man5/hunspell.5.gz %changelog +* Tue Jul 14 2020 Tom Stellard - 1.7.0-6 +- Use make macros +- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro + * Wed Jan 29 2020 Fedora Release Engineering - 1.7.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From 68215164a007287f3d979cc8893a39df0a98b449 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jul 2020 01:03:49 +0000 Subject: [PATCH 57/91] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index 8b73153..beb21cc 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.7.0 -Release: 6%{?dist} +Release: 7%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz URL: https://github.com/hunspell/hunspell License: LGPLv2+ or GPLv2+ or MPLv1.1 @@ -117,6 +117,9 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %{_mandir}/man5/hunspell.5.gz %changelog +* Tue Jul 28 2020 Fedora Release Engineering - 1.7.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Tue Jul 14 2020 Tom Stellard - 1.7.0-6 - Use make macros - https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro From 31b3c6087f7eb6ddc2fafbbfb64292f51679dbd7 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 5 Jan 2021 05:38:30 +0000 Subject: [PATCH 58/91] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- hunspell.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/hunspell.spec b/hunspell.spec index beb21cc..d020dd2 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -16,6 +16,7 @@ BuildRequires: valgrind %if %{double_profiling_build} BuildRequires: words %endif +BuildRequires: make Requires: hunspell-en-US Patch0: 0001-invalid-read-memory-access-624.patch From 2924da3ae4947acdb8658eaa73b610df51ea125c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 26 Jan 2021 13:39:02 +0000 Subject: [PATCH 59/91] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index d020dd2..fe64b86 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.7.0 -Release: 7%{?dist} +Release: 8%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz URL: https://github.com/hunspell/hunspell License: LGPLv2+ or GPLv2+ or MPLv1.1 @@ -118,6 +118,9 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %{_mandir}/man5/hunspell.5.gz %changelog +* Tue Jan 26 2021 Fedora Release Engineering - 1.7.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Tue Jul 28 2020 Fedora Release Engineering - 1.7.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 3e59a6e239b92aa3f512e8ce5acbff4092cf89b9 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Wed, 3 Feb 2021 13:17:43 +0000 Subject: [PATCH 60/91] Accomodate Nuspell by putting the dictionary dir in its own subpackage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Given that itʼs compatible with Hunspell dictionaries, package `nuspell` requires `hunspell-en-US`, which in turn requires `hunspell`. It doesnʼt seem right that installing one spellchecking backend should cause a different one to be pulled in, so this commit seeks to break that chain by giving the `/usr/share/myspell` directory a package of its own. --- hunspell.spec | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/hunspell.spec b/hunspell.spec index fe64b86..c679b9a 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.7.0 -Release: 8%{?dist} +Release: 9%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz URL: https://github.com/hunspell/hunspell License: LGPLv2+ or GPLv2+ or MPLv1.1 @@ -18,6 +18,7 @@ BuildRequires: words %endif BuildRequires: make Requires: hunspell-en-US +Requires: hunspell-filesystem Patch0: 0001-invalid-read-memory-access-624.patch @@ -34,6 +35,13 @@ Summary: Files for developing with hunspell %description devel Includes and definitions for developing with hunspell +%package filesystem +Summary: Hunspell filesystem layout + +%description filesystem +Provides a directory in which to store dictionaries provided by other +packages. + %prep %setup -q %patch0 -p1 -b .CVE-2019-16707 @@ -92,7 +100,6 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %files -f %{name}.lang %doc README COPYING COPYING.LESSER COPYING.MPL AUTHORS license.hunspell license.myspell THANKS %{_libdir}/*.so.* -%{_datadir}/myspell %{_bindir}/hunspell %{_mandir}/man1/hunspell.1.gz %lang(hu) %{_mandir}/hu/man1/hunspell.1.gz @@ -117,7 +124,13 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %{_mandir}/man3/hunspell.3.gz %{_mandir}/man5/hunspell.5.gz +%files filesystem +%{_datadir}/myspell + %changelog +* Wed Feb 03 2021 Peter Oliver - 1.7.0-9 +- Accomodate Nuspell by putting the dictionary dir in its own subpackage. + * Tue Jan 26 2021 Fedora Release Engineering - 1.7.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 246b0167354083aea7a5b584e82212605b7c1c62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 25 Mar 2021 14:49:16 +0000 Subject: [PATCH 61/91] Resolves: rhbz#1943087 require gettext-devel for autopoint --- hunspell.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hunspell.spec b/hunspell.spec index c679b9a..3c881f4 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,12 +3,12 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.7.0 -Release: 9%{?dist} +Release: 10%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz URL: https://github.com/hunspell/hunspell License: LGPLv2+ or GPLv2+ or MPLv1.1 BuildRequires: gcc-c++ -BuildRequires: autoconf, automake, libtool, ncurses-devel, gettext +BuildRequires: autoconf, automake, libtool, ncurses-devel, gettext-devel BuildRequires: perl-generators %ifarch %{ix86} x86_64 BuildRequires: valgrind @@ -128,6 +128,9 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %{_datadir}/myspell %changelog +* Thu Mar 25 2021 Caolán McNamara - 1.7.0-10 +- Resolves: rhbz#1943087 require gettext-devel for autopoint + * Wed Feb 03 2021 Peter Oliver - 1.7.0-9 - Accomodate Nuspell by putting the dictionary dir in its own subpackage. From d6ddef06e5753b283e738fa9fe171b50f0a327d0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 22 Jul 2021 07:48:31 +0000 Subject: [PATCH 62/91] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index 3c881f4..dfdf690 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.7.0 -Release: 10%{?dist} +Release: 11%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz URL: https://github.com/hunspell/hunspell License: LGPLv2+ or GPLv2+ or MPLv1.1 @@ -128,6 +128,9 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %{_datadir}/myspell %changelog +* Thu Jul 22 2021 Fedora Release Engineering - 1.7.0-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Thu Mar 25 2021 Caolán McNamara - 1.7.0-10 - Resolves: rhbz#1943087 require gettext-devel for autopoint From 6ffc0420776b66ded380d5792eaca8bc4ef5738d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jan 2022 12:31:52 +0000 Subject: [PATCH 63/91] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index dfdf690..0e7a1e6 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.7.0 -Release: 11%{?dist} +Release: 12%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz URL: https://github.com/hunspell/hunspell License: LGPLv2+ or GPLv2+ or MPLv1.1 @@ -128,6 +128,9 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %{_datadir}/myspell %changelog +* Thu Jan 20 2022 Fedora Release Engineering - 1.7.0-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Thu Jul 22 2021 Fedora Release Engineering - 1.7.0-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 09babb9078789004d270e8b7369279cdad64fd73 Mon Sep 17 00:00:00 2001 From: vishalvvr Date: Fri, 21 Jan 2022 17:21:19 +0530 Subject: [PATCH 64/91] update default dictionary install path - rename install dir name from myspell to hunspell - create symlink myspell for better backward compatibility - https://fedoraproject.org/wiki/Changes/Hunspell_dictionary_dir_change --- hunspell.spec | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/hunspell.spec b/hunspell.spec index 0e7a1e6..b40cf2b 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.7.0 -Release: 12%{?dist} +Release: 13%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz URL: https://github.com/hunspell/hunspell License: LGPLv2+ or GPLv2+ or MPLv1.1 @@ -18,7 +18,7 @@ BuildRequires: words %endif BuildRequires: make Requires: hunspell-en-US -Requires: hunspell-filesystem +Requires: hunspell-filesystem = %{version}-%{release} Patch0: 0001-invalid-read-memory-access-624.patch @@ -92,11 +92,30 @@ rm -rf $RPM_BUILD_ROOT %make_install rm -f $RPM_BUILD_ROOT/%{_libdir}/*.a rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la +%if 0%{?fedora} > 35 +mkdir $RPM_BUILD_ROOT/%{_datadir}/hunspell +%else mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell +%endif %find_lang %{name} %ldconfig_scriptlets +%if 0%{?fedora} > 35 +%pretrans -p +-- Rename dir from myspell to hunspell +-- DO NOT add a trailing slash at the end. +old_path = "/usr/share/myspell" +new_path = "/usr/share/hunspell" +st = posix.stat(old_path) +if st and st.type == "directory" then + status = os.rename(old_path, new_path) +end + +%post +%__ln_s %{_datadir}/hunspell %{_datadir}/myspell +%endif + %files -f %{name}.lang %doc README COPYING COPYING.LESSER COPYING.MPL AUTHORS license.hunspell license.myspell THANKS %{_libdir}/*.so.* @@ -125,9 +144,18 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %{_mandir}/man5/hunspell.5.gz %files filesystem +%if 0%{?fedora} > 35 +%ghost %{_datadir}/myspell +%{_datadir}/hunspell +%else %{_datadir}/myspell +%endif %changelog +* Fri Jan 21 2022 Vishal Vijayraghavan - 1.7.0-13 +- Rename install dir from myspell to hunspell & create symlink myspell +- https://fedoraproject.org/wiki/Changes/Hunspell_dictionary_dir_change + * Thu Jan 20 2022 Fedora Release Engineering - 1.7.0-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 4f0c047284743b8afe5a728e00d396651e0db5db Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 26 Jan 2022 11:16:34 +0800 Subject: [PATCH 65/91] add "Requires(post): coreutils" to unbreak compose (#2045568) --- hunspell.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index b40cf2b..6323d44 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.7.0 -Release: 13%{?dist} +Release: 14%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz URL: https://github.com/hunspell/hunspell License: LGPLv2+ or GPLv2+ or MPLv1.1 @@ -19,6 +19,7 @@ BuildRequires: words BuildRequires: make Requires: hunspell-en-US Requires: hunspell-filesystem = %{version}-%{release} +Requires(post): coreutils Patch0: 0001-invalid-read-memory-access-624.patch @@ -152,6 +153,9 @@ end %endif %changelog +* Wed Jan 26 2022 Jens Petersen - 1.7.0-14 +- requires coreutils for post script (#2045568) + * Fri Jan 21 2022 Vishal Vijayraghavan - 1.7.0-13 - Rename install dir from myspell to hunspell & create symlink myspell - https://fedoraproject.org/wiki/Changes/Hunspell_dictionary_dir_change From f02139cd19ddd270a8bed13c83f06b0d2f8abc0e Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 26 Jan 2022 23:11:13 +0800 Subject: [PATCH 66/91] add checks to post and pretrans --- hunspell.spec | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/hunspell.spec b/hunspell.spec index 6323d44..d04b6a6 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.7.0 -Release: 14%{?dist} +Release: 15%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz URL: https://github.com/hunspell/hunspell License: LGPLv2+ or GPLv2+ or MPLv1.1 @@ -106,15 +106,18 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %pretrans -p -- Rename dir from myspell to hunspell -- DO NOT add a trailing slash at the end. -old_path = "/usr/share/myspell" -new_path = "/usr/share/hunspell" -st = posix.stat(old_path) -if st and st.type == "directory" then - status = os.rename(old_path, new_path) +old_path = "%{_datadir}/myspell" +new_path = "%{_datadir}/hunspell" +old_st = posix.stat(old_path) +new_st = posix.stat(new_path) +if old_st and old_st.type == "directory" and not new_st then + os.rename(old_path, new_path) end -%post -%__ln_s %{_datadir}/hunspell %{_datadir}/myspell +%post -p +if not posix.stat("%{_datadir}/myspell") then + posix.symlink("%{_datadir}/hunspell", "%{_datadir}/myspell") +end %endif %files -f %{name}.lang @@ -153,6 +156,11 @@ end %endif %changelog +* Wed Jan 26 2022 Jens Petersen - 1.7.0-15 +- improve the filesystem pretrans and post scripts: +- pretrans now checks if /usr/share/hunspell exists first +- post checks that /usr/share/myspell does not exist + * Wed Jan 26 2022 Jens Petersen - 1.7.0-14 - requires coreutils for post script (#2045568) From b3b504b133d8f62ee04148a02576b2b8f05598b2 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 27 Jan 2022 11:28:53 +0800 Subject: [PATCH 67/91] drop "Requires(post): coreutils" since post now uses lua script --- hunspell.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index d04b6a6..263dbf7 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -19,7 +19,6 @@ BuildRequires: words BuildRequires: make Requires: hunspell-en-US Requires: hunspell-filesystem = %{version}-%{release} -Requires(post): coreutils Patch0: 0001-invalid-read-memory-access-624.patch From 80770886a515d9dd9c704ab992e6f440f793e1af Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 7 Feb 2022 16:03:57 +0800 Subject: [PATCH 68/91] pretrans and post scriptlets should be for filesystem! (#2051360) --- hunspell.spec | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/hunspell.spec b/hunspell.spec index 263dbf7..a88b471 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.7.0 -Release: 15%{?dist} +Release: 16%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz URL: https://github.com/hunspell/hunspell License: LGPLv2+ or GPLv2+ or MPLv1.1 @@ -23,9 +23,9 @@ Requires: hunspell-filesystem = %{version}-%{release} Patch0: 0001-invalid-read-memory-access-624.patch %description -Hunspell is a spell checker and morphological analyzer library and program -designed for languages with rich morphology and complex word compounding or -character encoding. Hunspell interfaces: Ispell-like terminal interface using +Hunspell is a spell checker and morphological analyzer library and program +designed for languages with rich morphology and complex word compounding or +character encoding. Hunspell interfaces: Ispell-like terminal interface using Curses library, Ispell pipe interface, LibreOffice UNO module. %package devel @@ -102,7 +102,7 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %ldconfig_scriptlets %if 0%{?fedora} > 35 -%pretrans -p +%pretrans filesystem -p -- Rename dir from myspell to hunspell -- DO NOT add a trailing slash at the end. old_path = "%{_datadir}/myspell" @@ -113,7 +113,7 @@ if old_st and old_st.type == "directory" and not new_st then os.rename(old_path, new_path) end -%post -p +%post filesystem -p if not posix.stat("%{_datadir}/myspell") then posix.symlink("%{_datadir}/hunspell", "%{_datadir}/myspell") end @@ -155,6 +155,10 @@ end %endif %changelog +* Mon Feb 7 2022 Jens Petersen - 1.7.0-16 +- pretrans and post scriptlets should be for filesystem! + (fixes #2051360 regression reported by Mike Fabian) + * Wed Jan 26 2022 Jens Petersen - 1.7.0-15 - improve the filesystem pretrans and post scripts: - pretrans now checks if /usr/share/hunspell exists first From 07fa42d0d1075445d1330b9070298e273e40da0d Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 10 Feb 2022 16:09:23 +0800 Subject: [PATCH 69/91] use fedora ">= 36" for the hunspell/ dir conditionals --- hunspell.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hunspell.spec b/hunspell.spec index a88b471..3b0b5ba 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -92,7 +92,7 @@ rm -rf $RPM_BUILD_ROOT %make_install rm -f $RPM_BUILD_ROOT/%{_libdir}/*.a rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la -%if 0%{?fedora} > 35 +%if 0%{?fedora} >= 36 mkdir $RPM_BUILD_ROOT/%{_datadir}/hunspell %else mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell @@ -101,7 +101,7 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %ldconfig_scriptlets -%if 0%{?fedora} > 35 +%if 0%{?fedora} >= 36 %pretrans filesystem -p -- Rename dir from myspell to hunspell -- DO NOT add a trailing slash at the end. @@ -147,7 +147,7 @@ end %{_mandir}/man5/hunspell.5.gz %files filesystem -%if 0%{?fedora} > 35 +%if 0%{?fedora} >= 36 %ghost %{_datadir}/myspell %{_datadir}/hunspell %else From 54c1c04c683c48762dd0436f88ae6d6c5bf91ae1 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 10 Feb 2022 16:12:15 +0800 Subject: [PATCH 70/91] revert the filesystem %post scriptlet to use bash (#2041930) It broken rpm-ostree composes: https://github.com/coreos/rpm-ostree/issues/3418 --- hunspell.spec | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hunspell.spec b/hunspell.spec index 3b0b5ba..9a05aa2 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -37,6 +37,7 @@ Includes and definitions for developing with hunspell %package filesystem Summary: Hunspell filesystem layout +Requires(post): coreutils %description filesystem Provides a directory in which to store dictionaries provided by other @@ -113,10 +114,10 @@ if old_st and old_st.type == "directory" and not new_st then os.rename(old_path, new_path) end -%post filesystem -p -if not posix.stat("%{_datadir}/myspell") then - posix.symlink("%{_datadir}/hunspell", "%{_datadir}/myspell") -end +%post filesystem +if [ ! -e "%{_datadir}/myspell" ]; then + %__ln_s %{_datadir}/hunspell %{_datadir}/myspell +fi %endif %files -f %{name}.lang From b427c7127245e397d33534516b1fc994cbf2c2f0 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 10 Feb 2022 16:30:26 +0800 Subject: [PATCH 71/91] bump release for the shell %post fix --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index 9a05aa2..c29037f 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.7.0 -Release: 16%{?dist} +Release: 17%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz URL: https://github.com/hunspell/hunspell License: LGPLv2+ or GPLv2+ or MPLv1.1 @@ -156,6 +156,9 @@ fi %endif %changelog +* Thu Feb 10 2022 Jens Petersen - 1.7.0-17 +- revert post script from lua back to shell to unbreak rpm-ostree compose + * Mon Feb 7 2022 Jens Petersen - 1.7.0-16 - pretrans and post scriptlets should be for filesystem! (fixes #2051360 regression reported by Mike Fabian) From 0954b46d01fed32a768e96d21f2be3e57453d5be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Mon, 7 Mar 2022 11:00:13 +0000 Subject: [PATCH 72/91] =?UTF-8?q?Resolves:=20rhbz#2060751=20-=20=E2=80=9Ch?= =?UTF-8?q?unspell=20-D=E2=80=9D=20lists=20dictionaries=20twice?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...-t-list-duplicate-dics-from-usr-shar.patch | 26 +++++++++++++++++++ hunspell.spec | 11 +++++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 0001-rhbz-2060751-don-t-list-duplicate-dics-from-usr-shar.patch diff --git a/0001-rhbz-2060751-don-t-list-duplicate-dics-from-usr-shar.patch b/0001-rhbz-2060751-don-t-list-duplicate-dics-from-usr-shar.patch new file mode 100644 index 0000000..5e8173f --- /dev/null +++ b/0001-rhbz-2060751-don-t-list-duplicate-dics-from-usr-shar.patch @@ -0,0 +1,26 @@ +From 1d54eddedf6178ca0de6c53514678879541c646a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Mon, 7 Mar 2022 10:57:21 +0000 +Subject: [PATCH] rhbz#2060751 don't list duplicate dics from + /usr/share/myspell symlink + +--- + src/tools/hunspell.cxx | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/src/tools/hunspell.cxx b/src/tools/hunspell.cxx +index 46dd2b6..08eb5b2 100644 +--- a/src/tools/hunspell.cxx ++++ b/src/tools/hunspell.cxx +@@ -117,8 +117,6 @@ + + #define LIBDIR \ + "/usr/share/hunspell:" \ +- "/usr/share/myspell:" \ +- "/usr/share/myspell/dicts:" \ + "/Library/Spelling" + #define USEROOODIR { \ + ".openoffice.org/3/user/wordbook", \ +-- +2.35.1 + diff --git a/hunspell.spec b/hunspell.spec index c29037f..58053b5 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.7.0 -Release: 17%{?dist} +Release: 18%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz URL: https://github.com/hunspell/hunspell License: LGPLv2+ or GPLv2+ or MPLv1.1 @@ -21,6 +21,9 @@ Requires: hunspell-en-US Requires: hunspell-filesystem = %{version}-%{release} Patch0: 0001-invalid-read-memory-access-624.patch +%if 0%{?fedora} >= 36 +Patch1: 0001-rhbz-2060751-don-t-list-duplicate-dics-from-usr-shar.patch +%endif %description Hunspell is a spell checker and morphological analyzer library and program @@ -46,6 +49,9 @@ packages. %prep %setup -q %patch0 -p1 -b .CVE-2019-16707 +%if 0%{?fedora} >= 36 +%patch1 -p1 -b .rhbz-2060751 +%endif %build autoreconf -vfi @@ -156,6 +162,9 @@ fi %endif %changelog +* Mon Mar 07 2022 Caolán McNamara - 1.7.0-18 +- Resolves: rhbz#2060751 - “hunspell -D” lists dictionaries twice + * Thu Feb 10 2022 Jens Petersen - 1.7.0-17 - revert post script from lua back to shell to unbreak rpm-ostree compose From 5e321c5e7bd91babbb443dd2a28f4fee05efcd12 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 16 Mar 2022 11:50:57 +0800 Subject: [PATCH 73/91] revert the myspell compat symlink changes (rhbz#2064189) relative to 6ffc042, the only change now is really to add /usr/share/hunspell to filesystem This should also help with rpm-ostree, eg Silverblue 36: currently dictionaries still in myspell/ can't be installed (upgraded). So this simplifies things a lot and seems much cleaner both pretrans and post for filesystem are gone. The only downside is that any legacy apps with hardcoded /usr/share/myspell might stop working for spellchecking. Perhaps a hunspell-filesystem-compat package could be added later to carry the symlink once all the Fedora dicts have been moved. --- ...-t-list-duplicate-dics-from-usr-shar.patch | 26 ----------- hunspell.spec | 43 ++++--------------- 2 files changed, 9 insertions(+), 60 deletions(-) delete mode 100644 0001-rhbz-2060751-don-t-list-duplicate-dics-from-usr-shar.patch diff --git a/0001-rhbz-2060751-don-t-list-duplicate-dics-from-usr-shar.patch b/0001-rhbz-2060751-don-t-list-duplicate-dics-from-usr-shar.patch deleted file mode 100644 index 5e8173f..0000000 --- a/0001-rhbz-2060751-don-t-list-duplicate-dics-from-usr-shar.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 1d54eddedf6178ca0de6c53514678879541c646a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Mon, 7 Mar 2022 10:57:21 +0000 -Subject: [PATCH] rhbz#2060751 don't list duplicate dics from - /usr/share/myspell symlink - ---- - src/tools/hunspell.cxx | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/src/tools/hunspell.cxx b/src/tools/hunspell.cxx -index 46dd2b6..08eb5b2 100644 ---- a/src/tools/hunspell.cxx -+++ b/src/tools/hunspell.cxx -@@ -117,8 +117,6 @@ - - #define LIBDIR \ - "/usr/share/hunspell:" \ -- "/usr/share/myspell:" \ -- "/usr/share/myspell/dicts:" \ - "/Library/Spelling" - #define USEROOODIR { \ - ".openoffice.org/3/user/wordbook", \ --- -2.35.1 - diff --git a/hunspell.spec b/hunspell.spec index 58053b5..1613e7a 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.7.0 -Release: 18%{?dist} +Release: 19%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz URL: https://github.com/hunspell/hunspell License: LGPLv2+ or GPLv2+ or MPLv1.1 @@ -21,9 +21,6 @@ Requires: hunspell-en-US Requires: hunspell-filesystem = %{version}-%{release} Patch0: 0001-invalid-read-memory-access-624.patch -%if 0%{?fedora} >= 36 -Patch1: 0001-rhbz-2060751-don-t-list-duplicate-dics-from-usr-shar.patch -%endif %description Hunspell is a spell checker and morphological analyzer library and program @@ -40,7 +37,6 @@ Includes and definitions for developing with hunspell %package filesystem Summary: Hunspell filesystem layout -Requires(post): coreutils %description filesystem Provides a directory in which to store dictionaries provided by other @@ -49,9 +45,6 @@ packages. %prep %setup -q %patch0 -p1 -b .CVE-2019-16707 -%if 0%{?fedora} >= 36 -%patch1 -p1 -b .rhbz-2060751 -%endif %build autoreconf -vfi @@ -99,33 +92,12 @@ rm -rf $RPM_BUILD_ROOT %make_install rm -f $RPM_BUILD_ROOT/%{_libdir}/*.a rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la -%if 0%{?fedora} >= 36 mkdir $RPM_BUILD_ROOT/%{_datadir}/hunspell -%else mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell -%endif %find_lang %{name} %ldconfig_scriptlets -%if 0%{?fedora} >= 36 -%pretrans filesystem -p --- Rename dir from myspell to hunspell --- DO NOT add a trailing slash at the end. -old_path = "%{_datadir}/myspell" -new_path = "%{_datadir}/hunspell" -old_st = posix.stat(old_path) -new_st = posix.stat(new_path) -if old_st and old_st.type == "directory" and not new_st then - os.rename(old_path, new_path) -end - -%post filesystem -if [ ! -e "%{_datadir}/myspell" ]; then - %__ln_s %{_datadir}/hunspell %{_datadir}/myspell -fi -%endif - %files -f %{name}.lang %doc README COPYING COPYING.LESSER COPYING.MPL AUTHORS license.hunspell license.myspell THANKS %{_libdir}/*.so.* @@ -154,14 +126,17 @@ fi %{_mandir}/man5/hunspell.5.gz %files filesystem -%if 0%{?fedora} >= 36 -%ghost %{_datadir}/myspell %{_datadir}/hunspell -%else %{_datadir}/myspell -%endif %changelog +* Wed Mar 16 2022 Jens Petersen - 1.7.0-19 +- rework the new hunspell dictionary directory (#2064189) +- drop the myspell/ compatibility symlink +- keep myspell/ as directory and also the new hunspell/ dir +- because of this drop the duplicate directory patch for #2060751 +- filesystem scriptlets are no more + * Mon Mar 07 2022 Caolán McNamara - 1.7.0-18 - Resolves: rhbz#2060751 - “hunspell -D” lists dictionaries twice @@ -424,7 +399,7 @@ fi - sort as per "C" locale * Fri Oct 17 2008 Caolán McNamara - 1.2.7-4 -- make wordlist2hunspell remove blank lines +- make wordlist2hunspell remove blank lines * Mon Sep 15 2008 Caolán McNamara - 1.2.7-3 - Workaround rhbz#462184 uniq/sort problems with viramas From dad93af3179c3399dc46e7f7eecd1090362ec27b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 21 Jul 2022 13:50:40 +0000 Subject: [PATCH 74/91] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index 1613e7a..d878f53 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.7.0 -Release: 19%{?dist} +Release: 20%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz URL: https://github.com/hunspell/hunspell License: LGPLv2+ or GPLv2+ or MPLv1.1 @@ -130,6 +130,9 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %{_datadir}/myspell %changelog +* Thu Jul 21 2022 Fedora Release Engineering - 1.7.0-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Wed Mar 16 2022 Jens Petersen - 1.7.0-19 - rework the new hunspell dictionary directory (#2064189) - drop the myspell/ compatibility symlink From deb7fb454439df3af05620f6615b408acecda23d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 2 Aug 2022 09:20:35 +0100 Subject: [PATCH 75/91] Resolves: rhbz#2113444 FTBFS --- Werror-format-security.patch | 11 +++++++++++ hunspell.spec | 7 ++++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 Werror-format-security.patch diff --git a/Werror-format-security.patch b/Werror-format-security.patch new file mode 100644 index 0000000..56b06a5 --- /dev/null +++ b/Werror-format-security.patch @@ -0,0 +1,11 @@ +--- a/src/tools/hunspell.cxx 2022-08-02 09:18:13.525748669 +0100 ++++ b/src/tools/hunspell.cxx 2022-08-02 09:18:38.598006933 +0100 +@@ -581,7 +581,7 @@ + #ifdef HAVE_CURSES_H + char* scanline(char* message) { + char input[INPUTLEN]; +- printw(message); ++ printw("%s", message); + echo(); + getnstr(input, INPUTLEN); + noecho(); diff --git a/hunspell.spec b/hunspell.spec index d878f53..234f2dd 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.7.0 -Release: 20%{?dist} +Release: 21%{?dist} Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz URL: https://github.com/hunspell/hunspell License: LGPLv2+ or GPLv2+ or MPLv1.1 @@ -21,6 +21,7 @@ Requires: hunspell-en-US Requires: hunspell-filesystem = %{version}-%{release} Patch0: 0001-invalid-read-memory-access-624.patch +Patch1: Werror-format-security.patch %description Hunspell is a spell checker and morphological analyzer library and program @@ -45,6 +46,7 @@ packages. %prep %setup -q %patch0 -p1 -b .CVE-2019-16707 +%patch1 -p1 -b .Werror-format-security %build autoreconf -vfi @@ -130,6 +132,9 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %{_datadir}/myspell %changelog +* Tue Aug 02 2022 Caolán McNamara - 1.7.0-21 +- Resolves: rhbz#2113444 FTBFS + * Thu Jul 21 2022 Fedora Release Engineering - 1.7.0-20 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 34f2c9f0536357216a70f7be22776d6abcc94c3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 2 Aug 2022 09:50:08 +0100 Subject: [PATCH 76/91] double_profiling_build fails for i686 --- hunspell.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index 234f2dd..0d71653 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -1,4 +1,4 @@ -%define double_profiling_build 1 +%define double_profiling_build 0 Name: hunspell Summary: A spell checker and morphological analyzer library From 5030cda6b33520116dad13245936f8a4783fdf65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 2 Aug 2022 10:15:43 +0100 Subject: [PATCH 77/91] restore for next attempt --- hunspell.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index 0d71653..234f2dd 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -1,4 +1,4 @@ -%define double_profiling_build 0 +%define double_profiling_build 1 Name: hunspell Summary: A spell checker and morphological analyzer library From c1da243e3a8d53b180218d891bd13fc8d1e94ef9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Mon, 22 Aug 2022 15:02:38 +0100 Subject: [PATCH 78/91] latest release --- .gitignore | 2 +- 0001-invalid-read-memory-access-624.patch | 25 ----------------------- Werror-format-security.patch | 11 ---------- hunspell.spec | 14 ++++++------- sources | 2 +- 5 files changed, 8 insertions(+), 46 deletions(-) delete mode 100644 0001-invalid-read-memory-access-624.patch delete mode 100644 Werror-format-security.patch diff --git a/.gitignore b/.gitignore index eb11a9d..fa61aab 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/v1.7.0.tar.gz +/hunspell-1.7.1.tar.gz diff --git a/0001-invalid-read-memory-access-624.patch b/0001-invalid-read-memory-access-624.patch deleted file mode 100644 index 66b55e7..0000000 --- a/0001-invalid-read-memory-access-624.patch +++ /dev/null @@ -1,25 +0,0 @@ -From ac938e2ecb48ab4dd21298126c7921689d60571b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Tue, 12 Nov 2019 20:03:15 +0000 -Subject: [PATCH] invalid read memory access #624 - ---- - src/hunspell/suggestmgr.cxx | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/hunspell/suggestmgr.cxx b/src/hunspell/suggestmgr.cxx -index dba084e..c23f165 100644 ---- a/src/hunspell/suggestmgr.cxx -+++ b/src/hunspell/suggestmgr.cxx -@@ -2040,7 +2040,7 @@ int SuggestMgr::leftcommonsubstring( - int l2 = su2.size(); - // decapitalize dictionary word - if (complexprefixes) { -- if (su1[l1 - 1] == su2[l2 - 1]) -+ if (l1 && l2 && su1[l1 - 1] == su2[l2 - 1]) - return 1; - } else { - unsigned short idx = su2.empty() ? 0 : (su2[0].h << 8) + su2[0].l; --- -2.23.0 - diff --git a/Werror-format-security.patch b/Werror-format-security.patch deleted file mode 100644 index 56b06a5..0000000 --- a/Werror-format-security.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/tools/hunspell.cxx 2022-08-02 09:18:13.525748669 +0100 -+++ b/src/tools/hunspell.cxx 2022-08-02 09:18:38.598006933 +0100 -@@ -581,7 +581,7 @@ - #ifdef HAVE_CURSES_H - char* scanline(char* message) { - char input[INPUTLEN]; -- printw(message); -+ printw("%s", message); - echo(); - getnstr(input, INPUTLEN); - noecho(); diff --git a/hunspell.spec b/hunspell.spec index 234f2dd..57ea1c0 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -2,9 +2,9 @@ Name: hunspell Summary: A spell checker and morphological analyzer library -Version: 1.7.0 -Release: 21%{?dist} -Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz +Version: 1.7.1 +Release: 1%{?dist} +Source: https://github.com/hunspell/hunspell/releases/download/v%{version}/hunspell-%{version}.tar.gz URL: https://github.com/hunspell/hunspell License: LGPLv2+ or GPLv2+ or MPLv1.1 BuildRequires: gcc-c++ @@ -20,9 +20,6 @@ BuildRequires: make Requires: hunspell-en-US Requires: hunspell-filesystem = %{version}-%{release} -Patch0: 0001-invalid-read-memory-access-624.patch -Patch1: Werror-format-security.patch - %description Hunspell is a spell checker and morphological analyzer library and program designed for languages with rich morphology and complex word compounding or @@ -45,8 +42,6 @@ packages. %prep %setup -q -%patch0 -p1 -b .CVE-2019-16707 -%patch1 -p1 -b .Werror-format-security %build autoreconf -vfi @@ -132,6 +127,9 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %{_datadir}/myspell %changelog +* Mon Aug 22 2022 Caolán McNamara - 1.7.1-1 +- latest release + * Tue Aug 02 2022 Caolán McNamara - 1.7.0-21 - Resolves: rhbz#2113444 FTBFS diff --git a/sources b/sources index 07935b9..4990421 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (v1.7.0.tar.gz) = 8149b2e8b703a0610c9ca5160c2dfad3cf3b85b16b3f0f5cfcb7ebb802473b2d499e8e2d0a637a97a37a24d62424e82d3880809210d3f043fa17a4970d47c903 +SHA512 (hunspell-1.7.1.tar.gz) = e177fadd39e89abf47c6cec7d12d1976d21af5c924fb62402433af202c07db50156cd9f60ceae44952b05740e76a98548afb7ac12b666a9fa170ef52e6f8e808 From 54639a08a5957dff23e5ec9bdc972441ae62a560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 14 Sep 2022 10:21:09 +0100 Subject: [PATCH 79/91] don't need update-gmo target when using tarballs from 'make dist' again --- hunspell.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index 57ea1c0..e0b16d6 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -76,7 +76,6 @@ make distclean %{profileuse} %configure $configureflags %make_build %endif -cd po && %make_build update-gmo && cd .. %check %ifarch %{ix86} x86_64 From 8ac6886a8ade8e2a840aca56b88f232a4e9ffe44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Fri, 30 Dec 2022 14:20:15 +0000 Subject: [PATCH 80/91] Resolves: rhbz#2157049 latest release --- .gitignore | 2 +- hunspell.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index fa61aab..088efb4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/hunspell-1.7.1.tar.gz +/hunspell-1.7.2.tar.gz diff --git a/hunspell.spec b/hunspell.spec index e0b16d6..13924d8 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -2,7 +2,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library -Version: 1.7.1 +Version: 1.7.2 Release: 1%{?dist} Source: https://github.com/hunspell/hunspell/releases/download/v%{version}/hunspell-%{version}.tar.gz URL: https://github.com/hunspell/hunspell @@ -126,6 +126,9 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %{_datadir}/myspell %changelog +* Fri Dec 30 2022 Caolán McNamara - 1.7.2-1 +- Resolves: rhbz#2157049 latest release + * Mon Aug 22 2022 Caolán McNamara - 1.7.1-1 - latest release diff --git a/sources b/sources index 4990421..0338530 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hunspell-1.7.1.tar.gz) = e177fadd39e89abf47c6cec7d12d1976d21af5c924fb62402433af202c07db50156cd9f60ceae44952b05740e76a98548afb7ac12b666a9fa170ef52e6f8e808 +SHA512 (hunspell-1.7.2.tar.gz) = 49b3619bff12e111b6cc3f3d9463612b116f9b2a976896718e65f5bc4a83ece11100aaf56a4d18127ea39107446c495e12affe5ff3c9159ae8aba70e512f44ac From 40b55e12ac0671122946c4230c37c3bec9df642a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Fri, 6 Jan 2023 16:26:51 +0000 Subject: [PATCH 81/91] Resolves: rhbz#2158548 get hunspell-ko working again --- ...58548-allow-longer-words-for-hunspel.patch | 77 +++++++++++++++++++ hunspell.spec | 8 +- 2 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 0001-Resolves-rhbz-2158548-allow-longer-words-for-hunspel.patch diff --git a/0001-Resolves-rhbz-2158548-allow-longer-words-for-hunspel.patch b/0001-Resolves-rhbz-2158548-allow-longer-words-for-hunspel.patch new file mode 100644 index 0000000..c0225fb --- /dev/null +++ b/0001-Resolves-rhbz-2158548-allow-longer-words-for-hunspel.patch @@ -0,0 +1,77 @@ +From e2fe9f86e1769b440972971240e9b8fb1cd53b97 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Fri, 6 Jan 2023 16:20:45 +0000 +Subject: [PATCH] Resolves: rhbz#2158548 allow longer words for hunspell-ko +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +https://github.com/hunspell/hunspell/issues/903 + +A problem since the sanity check added in: + +commit 05e44e069e4cfaa9ce1264bf13f23fc9abd7ed05 +Author: Caolán McNamara +Date: Thu Sep 1 13:46:40 2022 +0100 + + Check word limit (#813) + + * check against hentry blen max +--- + src/hunspell/hashmgr.cxx | 6 +++--- + src/hunspell/htypes.hxx | 4 ++-- + tests/korean.dic | 3 ++- + 3 files changed, 7 insertions(+), 6 deletions(-) + +diff --git a/src/hunspell/hashmgr.cxx b/src/hunspell/hashmgr.cxx +index 100916d..14201e9 100644 +--- a/src/hunspell/hashmgr.cxx ++++ b/src/hunspell/hashmgr.cxx +@@ -209,7 +209,7 @@ int HashMgr::add_word(const std::string& in_word, + } + + // limit of hp->blen +- if (word->size() > std::numeric_limits::max()) { ++ if (word->size() > std::numeric_limits::max()) { + HUNSPELL_WARNING(stderr, "error: word len %ld is over max limit\n", word->size()); + delete desc_copy; + delete word_copy; +@@ -235,8 +235,8 @@ int HashMgr::add_word(const std::string& in_word, + + int i = hash(hpw, word->size()); + +- hp->blen = (unsigned char)word->size(); +- hp->clen = (unsigned char)wcl; ++ hp->blen = (unsigned short)word->size(); ++ hp->clen = (unsigned short)wcl; + hp->alen = (short)al; + hp->astr = aff; + hp->next = NULL; +diff --git a/src/hunspell/htypes.hxx b/src/hunspell/htypes.hxx +index 44366b1..2b896fb 100644 +--- a/src/hunspell/htypes.hxx ++++ b/src/hunspell/htypes.hxx +@@ -62,8 +62,8 @@ + #endif + + struct hentry { +- unsigned char blen; // word length in bytes +- unsigned char clen; // word length in characters (different for UTF-8 enc.) ++ unsigned short blen; // word length in bytes ++ unsigned short clen; // word length in characters (different for UTF-8 enc.) + short alen; // length of affix flag vector + unsigned short* astr; // affix flag vector + struct hentry* next; // next word with same hash code +diff --git a/tests/korean.dic b/tests/korean.dic +index 95cb450..d76ea05 100644 +--- a/tests/korean.dic ++++ b/tests/korean.dic +@@ -1,3 +1,4 @@ +-2 ++3 + 들어오세요 + 안녕하세요 ++김수한무거북이와두루미삼천갑자동방삭치치카포사리사리세ᅡ워리워리세브리캉무드셀ᅡ구름위허ᅵ케ᅵᆫᅦ담벼락서생원에ᄀ양 +-- +2.38.1 + diff --git a/hunspell.spec b/hunspell.spec index 13924d8..55fa90d 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.7.2 -Release: 1%{?dist} +Release: 2%{?dist} Source: https://github.com/hunspell/hunspell/releases/download/v%{version}/hunspell-%{version}.tar.gz URL: https://github.com/hunspell/hunspell License: LGPLv2+ or GPLv2+ or MPLv1.1 @@ -20,6 +20,8 @@ BuildRequires: make Requires: hunspell-en-US Requires: hunspell-filesystem = %{version}-%{release} +Patch0: 0001-Resolves-rhbz-2158548-allow-longer-words-for-hunspel.patch + %description Hunspell is a spell checker and morphological analyzer library and program designed for languages with rich morphology and complex word compounding or @@ -42,6 +44,7 @@ packages. %prep %setup -q +%patch0 -p1 -b .rhbz2158548 %build autoreconf -vfi @@ -126,6 +129,9 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %{_datadir}/myspell %changelog +* Fri Jan 06 2023 Caolán McNamara - 1.7.2-2 +- Resolves: rhbz#2158548 get hunspell-ko working again + * Fri Dec 30 2022 Caolán McNamara - 1.7.2-1 - Resolves: rhbz#2157049 latest release From 937564ad745110bd982e18551a7a6c62c49d93f6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 12:19:37 +0000 Subject: [PATCH 82/91] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index 55fa90d..38785ec 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.7.2 -Release: 2%{?dist} +Release: 3%{?dist} Source: https://github.com/hunspell/hunspell/releases/download/v%{version}/hunspell-%{version}.tar.gz URL: https://github.com/hunspell/hunspell License: LGPLv2+ or GPLv2+ or MPLv1.1 @@ -129,6 +129,9 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %{_datadir}/myspell %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 1.7.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Fri Jan 06 2023 Caolán McNamara - 1.7.2-2 - Resolves: rhbz#2158548 get hunspell-ko working again From 868e83e3e859c2b031256a9b1c315c7bda3648ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 22 Feb 2023 10:18:50 +0000 Subject: [PATCH 83/91] migrated to SPDX license --- hunspell.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hunspell.spec b/hunspell.spec index 38785ec..9e3f304 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,10 +3,10 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.7.2 -Release: 3%{?dist} +Release: 4%{?dist} Source: https://github.com/hunspell/hunspell/releases/download/v%{version}/hunspell-%{version}.tar.gz URL: https://github.com/hunspell/hunspell -License: LGPLv2+ or GPLv2+ or MPLv1.1 +License: LGPL-2.1-or-later OR GPL-2.0-or-later OR MPL-1.1 BuildRequires: gcc-c++ BuildRequires: autoconf, automake, libtool, ncurses-devel, gettext-devel BuildRequires: perl-generators @@ -129,6 +129,9 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %{_datadir}/myspell %changelog +* Wed Feb 22 2023 Caolán McNamara - 1.7.2-4 +- migrated to SPDX license + * Thu Jan 19 2023 Fedora Release Engineering - 1.7.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 5675a2c4008be67ad442801eb5d436e16d382b58 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jul 2023 06:31:47 +0000 Subject: [PATCH 84/91] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index 9e3f304..b81d6c1 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.7.2 -Release: 4%{?dist} +Release: 5%{?dist} Source: https://github.com/hunspell/hunspell/releases/download/v%{version}/hunspell-%{version}.tar.gz URL: https://github.com/hunspell/hunspell License: LGPL-2.1-or-later OR GPL-2.0-or-later OR MPL-1.1 @@ -129,6 +129,9 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %{_datadir}/myspell %changelog +* Thu Jul 20 2023 Fedora Release Engineering - 1.7.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Wed Feb 22 2023 Caolán McNamara - 1.7.2-4 - migrated to SPDX license From 6f346206b8d9755f2fa0ad5de915d0554cbd9b4b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jan 2024 22:17:15 +0000 Subject: [PATCH 85/91] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index b81d6c1..dd9e194 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.7.2 -Release: 5%{?dist} +Release: 6%{?dist} Source: https://github.com/hunspell/hunspell/releases/download/v%{version}/hunspell-%{version}.tar.gz URL: https://github.com/hunspell/hunspell License: LGPL-2.1-or-later OR GPL-2.0-or-later OR MPL-1.1 @@ -129,6 +129,9 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %{_datadir}/myspell %changelog +* Sat Jan 20 2024 Fedora Release Engineering - 1.7.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Thu Jul 20 2023 Fedora Release Engineering - 1.7.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From ad33f2f898299645b237f976f4cc160ce991c07c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jan 2024 21:51:55 +0000 Subject: [PATCH 86/91] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index dd9e194..689c53d 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.7.2 -Release: 6%{?dist} +Release: 7%{?dist} Source: https://github.com/hunspell/hunspell/releases/download/v%{version}/hunspell-%{version}.tar.gz URL: https://github.com/hunspell/hunspell License: LGPL-2.1-or-later OR GPL-2.0-or-later OR MPL-1.1 @@ -129,6 +129,9 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %{_datadir}/myspell %changelog +* Wed Jan 24 2024 Fedora Release Engineering - 1.7.2-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sat Jan 20 2024 Fedora Release Engineering - 1.7.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From f4c35362a1bbd294636706661bfaa97d4ff55daa Mon Sep 17 00:00:00 2001 From: Software Management Team Date: Thu, 30 May 2024 12:46:47 +0200 Subject: [PATCH 87/91] Eliminate use of obsolete %patchN syntax (#2283636) --- hunspell.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index 689c53d..f33649f 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -44,7 +44,7 @@ packages. %prep %setup -q -%patch0 -p1 -b .rhbz2158548 +%patch -P0 -p1 -b .rhbz2158548 %build autoreconf -vfi From 84708febe12f690367620db784767f09f703f738 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 09:27:28 +0000 Subject: [PATCH 88/91] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index f33649f..d012f3c 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.7.2 -Release: 7%{?dist} +Release: 8%{?dist} Source: https://github.com/hunspell/hunspell/releases/download/v%{version}/hunspell-%{version}.tar.gz URL: https://github.com/hunspell/hunspell License: LGPL-2.1-or-later OR GPL-2.0-or-later OR MPL-1.1 @@ -129,6 +129,9 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %{_datadir}/myspell %changelog +* Thu Jul 18 2024 Fedora Release Engineering - 1.7.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Wed Jan 24 2024 Fedora Release Engineering - 1.7.2-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From e8c3928ddbdbfcec1ddf54876d73e8596a4f4935 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jan 2025 06:08:55 +0000 Subject: [PATCH 89/91] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index d012f3c..d303a36 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.7.2 -Release: 8%{?dist} +Release: 9%{?dist} Source: https://github.com/hunspell/hunspell/releases/download/v%{version}/hunspell-%{version}.tar.gz URL: https://github.com/hunspell/hunspell License: LGPL-2.1-or-later OR GPL-2.0-or-later OR MPL-1.1 @@ -129,6 +129,9 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %{_datadir}/myspell %changelog +* Fri Jan 17 2025 Fedora Release Engineering - 1.7.2-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Thu Jul 18 2024 Fedora Release Engineering - 1.7.2-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 34553d821a255bd7d80b38b1ac075a7eaab09a42 Mon Sep 17 00:00:00 2001 From: Parag Nemade Date: Fri, 30 May 2025 11:59:30 +0530 Subject: [PATCH 90/91] Add tmt testcase for CI --- .fmf/version | 1 + plans/hunspell.fmf | 5 ++++ tests/data.txt | 4 ++++ tests/main.fmf | 5 ++++ tests/run_tests.sh | 58 ++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 73 insertions(+) create mode 100644 .fmf/version create mode 100644 plans/hunspell.fmf create mode 100644 tests/data.txt create mode 100644 tests/main.fmf create mode 100644 tests/run_tests.sh diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/plans/hunspell.fmf b/plans/hunspell.fmf new file mode 100644 index 0000000..c1627f9 --- /dev/null +++ b/plans/hunspell.fmf @@ -0,0 +1,5 @@ +summary: Basic smoke test +discover: + how: fmf +execute: + how: tmt diff --git a/tests/data.txt b/tests/data.txt new file mode 100644 index 0000000..29c358c --- /dev/null +++ b/tests/data.txt @@ -0,0 +1,4 @@ +Cloud +Linux +Fedora +Fedoraaa diff --git a/tests/main.fmf b/tests/main.fmf new file mode 100644 index 0000000..ebec85f --- /dev/null +++ b/tests/main.fmf @@ -0,0 +1,5 @@ +require: +- hunspell +- hunspell-de +test: bash ./run_tests.sh +framework: shell diff --git a/tests/run_tests.sh b/tests/run_tests.sh new file mode 100644 index 0000000..7d75074 --- /dev/null +++ b/tests/run_tests.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +check_pkg() { + local pkg=$1 + if rpm -q $pkg + then + echo "PASS" + else + echo "FAIL" + fi +} + +check_dict() { + if [ -f "/usr/share/hunspell/de_DE.dic" ] + then + echo "PASS" + else + echo "FAIL" + fi +} + +check_misspelled_word() { + VAR1="Fedoraaa" + VAR2=$(hunspell -l data.txt) + if [ "$VAR1" = "$VAR2" ]; then + echo "PASS" + else + echo "FAIL" + fi +} + +check_misspelled_line() { + VAR1="Fedoraaa" + VAR2=$(hunspell -L data.txt) + if [ "$VAR1" = "$VAR2" ]; then + echo "PASS" + else + echo "FAIL" + fi +} + +check_correct_word() { + VAR1="Cloud\nLinux\nFedora" + VAR1=$(echo -e "$VAR1") + VAR2=$(hunspell -G data.txt) + if [ "$VAR1" = "$VAR2" ]; then + echo "PASS" + else + echo "FAIL" + fi +} + +check_pkg "hunspell" +check_pkg "hunspell-de" +check_dict +check_misspelled_word +check_misspelled_line +check_correct_word From ec71712f5c4b07db1cdcc185e91ce15234a8fcc8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 17:08:34 +0000 Subject: [PATCH 91/91] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- hunspell.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hunspell.spec b/hunspell.spec index d303a36..2e62287 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.7.2 -Release: 9%{?dist} +Release: 10%{?dist} Source: https://github.com/hunspell/hunspell/releases/download/v%{version}/hunspell-%{version}.tar.gz URL: https://github.com/hunspell/hunspell License: LGPL-2.1-or-later OR GPL-2.0-or-later OR MPL-1.1 @@ -129,6 +129,9 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell %{_datadir}/myspell %changelog +* Thu Jul 24 2025 Fedora Release Engineering - 1.7.2-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Fri Jan 17 2025 Fedora Release Engineering - 1.7.2-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild