From 7cf2107af9e55eecce982d41ecc359d71d661c97 Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Wed, 25 Nov 2020 08:44:31 +0000 Subject: tests/dictionary_suggest.cpp: mask out test that fails with AppleSpell --- tests/enchant_providers/Dictionary/dictionary_suggest.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/enchant_providers/Dictionary/dictionary_suggest.cpp b/tests/enchant_providers/Dictionary/dictionary_suggest.cpp index 1c6fed9..243f5b4 100644 --- a/tests/enchant_providers/Dictionary/dictionary_suggest.cpp +++ b/tests/enchant_providers/Dictionary/dictionary_suggest.cpp @@ -28,11 +28,13 @@ struct DictionarySuggest_TestFixture : Provider_TestFixture { EnchantDict* _dict; + const char *_provider_name; std::vector _addedWords; //Setup DictionarySuggest_TestFixture():_dict(NULL) { _dict = GetDefaultDictionary(); + _provider_name = _provider->identify(_provider); } //Teardown @@ -160,7 +162,7 @@ TEST_FIXTURE(DictionarySuggest_TestFixture, TEST_FIXTURE(DictionarySuggest_TestFixture, GetSuggestions_FromTitle_ResultsTitleOrAllCaps) { - if(_dict && _dict->suggest) + if(_dict && _dict->suggest && strcmp(_provider_name, "AppleSpell") != 0) /* FIXME: This fails on AppleSpell */ { std::vector suggestions = GetSuggestionsFromWord("Aaa"); for(std::vector::const_iterator i = suggestions.begin(); -- cgit v1.2.1 From 07c4f3fb2056536853fcc237c6d05d481d38fbea Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Tue, 24 Nov 2020 12:45:34 +0000 Subject: Switch from Travis to AppVeyor --- .appveyor.yml | 58 +++++++++++++++++++++++++++++++++++++++++++ .travis.yml | 44 -------------------------------- appveyor.yml | 22 ---------------- build-aux/appveyor-build.sh | 17 +++++++++++++ build-aux/appveyor-install.sh | 26 +++---------------- build-aux/travis-build.sh | 17 ------------- 6 files changed, 79 insertions(+), 105 deletions(-) create mode 100644 .appveyor.yml delete mode 100644 .travis.yml delete mode 100644 appveyor.yml create mode 100755 build-aux/appveyor-build.sh delete mode 100755 build-aux/travis-build.sh diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 0000000..e09fe5c --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,58 @@ +version: "{build}" + +environment: + global: + # Only need one flavour of dictionary + CONFIGURE_FLAGS: --with-hunspell-dir=/mingw64/share/hunspell + VERBOSE: 1 # Get test logs in output + matrix: + - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu + - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu + ASAN: 'yes' + - APPVEYOR_BUILD_WORKER_IMAGE: macos + # MSYS does not have hunspell packages + # - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + # MSYSTEM: MSYS + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + MSYSTEM: MINGW64 + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + MSYSTEM: MINGW32 + +for: +- + matrix: + only: + - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu + init: + - sudo add-apt-repository -y ppa:nuspell/ppa + - sudo apt-get -y install libglib2.0-dev libaspell-dev hspell libhunspell-dev libvoikko-dev voikko-fi aspell-en libunittest++-dev hunspell-fr libnuspell-dev + build_script: + - ./build-aux/appveyor-build.sh +- + matrix: + only: + - APPVEYOR_BUILD_WORKER_IMAGE: macos + init: + # Note: aspell should work on macOS, but has been removed because one of + # the tests fails; see https://github.com/GNUAspell/aspell/issues/555 + - brew install glib dbus-glib hspell hunspell libvoikko unittest-cpp + environment: + LDFLAGS: "-L/usr/local/opt/flex/lib -L/usr/local/opt/texinfo/lib" + CPPFLAGS: "-I/usr/local/opt/flex/include" + PYTHON: /usr/local/bin/python3 + build_script: + # Prepend optional brew binary directories to PATH + # Also prepend /usr/local/bin to work around https://github.com/appveyor/ci/issues/3326 + - export PATH="/usr/local/opt/flex/bin:/usr/local/opt/texinfo/bin:/usr/local/opt/gettext/bin:/usr/local/opt/cython/bin:/usr/local/bin:$PATH" + - ./build-aux/appveyor-build.sh +- + matrix: + only: + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + init: + - git config --global core.autocrlf input + install: + - C:\msys64\usr\bin\bash.exe -l c:/projects/enchant/build-aux/appveyor-install.sh + # FIXME: add all available providers (just aspell?) + build_script: + - C:\msys64\usr\bin\bash.exe -lc "cd c:/projects/enchant && ./bootstrap && ./configure --enable-relocatable %CONFIGURE_FLAGS% && make && make DISTCHECK_CONFIGURE_FLAGS=\"--enable-relocatable %CONFIGURE_FLAGS%\" distcheck" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 47ce66d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,44 +0,0 @@ -os: linux -language: cpp -dist: bionic - -addons: - apt: - sources: - - sourceline: 'ppa:nuspell/ppa' - packages: - - libglib2.0-dev - - libaspell-dev - - hspell - - libhunspell-dev - - libvoikko-dev - - voikko-fi - - aspell-en - - libunittest++-dev - - hunspell-fr - - libnuspell-dev - homebrew: - # Note: aspell should work on macOS, but has been removed because one of - # the tests fails; see https://github.com/Homebrew/homebrew-core/issues/4097 - packages: - - glib - - dbus-glib - - hspell - - hunspell - - libvoikko - - unittest-cpp - update: true - -env: - global: - - VERBOSE=1 # Get test logs in Travis logs - -jobs: - include: - - os: linux - env: - - ASAN=yes - - os: osx - -script: - - ./build-aux/travis-build.sh diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 922a0f6..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,22 +0,0 @@ -version: "{build}" -clone_folder: c:\projects\enchant - -environment: - global: - # Only need one flavour of dictionary - CONFIGURE_FLAGS: --with-hunspell-dir=/mingw64/share/hunspell - VERBOSE: 1 # Get test logs in output - matrix: - - MSYSTEM: MSYS - - MSYSTEM: MINGW64 - - MSYSTEM: MINGW32 - -init: - - git config --global core.autocrlf input - -install: - - C:\msys64\usr\bin\bash.exe -l c:/projects/enchant/build-aux/appveyor-install.sh - -# FIXME: add all available providers (just aspell?) -build_script: - - C:\msys64\usr\bin\bash.exe -lc "cd c:/projects/enchant && ./bootstrap && ./configure --enable-relocatable %CONFIGURE_FLAGS% && make && make DISTCHECK_CONFIGURE_FLAGS=\"--enable-relocatable %CONFIGURE_FLAGS%\" distcheck" diff --git a/build-aux/appveyor-build.sh b/build-aux/appveyor-build.sh new file mode 100755 index 0000000..6472d91 --- /dev/null +++ b/build-aux/appveyor-build.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Build on AppVeyor +# Written by Reuben Thomas 2020. +# This file is in the public domain. + +set -e + +./bootstrap +CONFIGURE_ARGS=(--enable-relocatable --with-zemberek=check) +if [[ "$ASAN" == "yes" ]]; then + CONFIGURE_ARGS+=(CFLAGS="-g3 -fsanitize=address -fsanitize=undefined" LDFLAGS="-fsanitize=address -fsanitize=undefined") +fi +./configure --enable-silent-rules "${CONFIGURE_ARGS[@]}" +make +make distcheck + +if [[ "$APPVEYOR_BUILD_WORKER_IMAGE" == "Ubuntu" ]]; then sudo locale-gen fr_FR.UTF-8; env LANG=fr_FR.UTF-8 make check ; fi diff --git a/build-aux/appveyor-install.sh b/build-aux/appveyor-install.sh index 2d96d6b..459c955 100755 --- a/build-aux/appveyor-install.sh +++ b/build-aux/appveyor-install.sh @@ -4,37 +4,19 @@ # Get mingw type, if any, from MSYSTEM case $MSYSTEM in MINGW32) - MINGW_BITS=i686 + MINGW_ARCH=i686 PREFIX=/mingw32 ;; MINGW64) - MINGW_BITS=x86_64 + MINGW_ARCH=x86_64 PREFIX=/mingw64 ;; - MSYS) - PREFIX=/usr - ;; esac # GLib -if test -n "$MINGW_BITS"; then - pacman --noconfirm -S mingw-w64-$MINGW_BITS-glib2 -fi -pacman --noconfirm -S glib2-devel - -# Hunspell dictionary (only need one flavour) -wget http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-hunspell-en-2016.11.20-2-any.pkg.tar.xz -pacman --noconfirm -U mingw-w64-x86_64-hunspell-en-2016.11.20-2-any.pkg.tar.xz - -# Hunspell -wget https://github.com/hunspell/hunspell/archive/v1.6.0.tar.gz -tar zxvf v1.6.0.tar.gz || true # Error in unpacking (symlink README before file README.md) -cd hunspell-1.6.0 -ln -s README.md README && autoreconf -vfi -./configure --prefix=$PREFIX && make && make install -cd .. +pacman --noconfirm -S mingw-w64-$MINGW_ARCH-glib2 glib2-devel mingw-w64-$MINGW_ARCH-hunspell mingw-w64-$MINGW_ARCH-hunspell-en -# UnitTest++ +# UnitTest++ is not packaged in mingw wget https://github.com/unittest-cpp/unittest-cpp/releases/download/v1.6.1/unittest-cpp-1.6.1.tar.gz tar zxvf unittest-cpp-1.6.1.tar.gz cd unittest-cpp-1.6.1 diff --git a/build-aux/travis-build.sh b/build-aux/travis-build.sh deleted file mode 100755 index 371326b..0000000 --- a/build-aux/travis-build.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# Build on Travis -# Written by Reuben Thomas 2020. -# This file is in the public domain. - -set -e - -./bootstrap -CONFIGURE_ARGS=(--enable-relocatable --with-zemberek=check) -if [[ "$ASAN" == "yes" ]]; then - CONFIGURE_ARGS+=(CFLAGS="-g3 -fsanitize=address -fsanitize=undefined" LDFLAGS="-fsanitize=address -fsanitize=undefined") -fi -./configure --enable-silent-rules "${CONFIGURE_ARGS[@]}" -make -make distcheck - -if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo locale-gen fr_FR.UTF-8; env LANG=fr_FR.UTF-8 make check ; fi -- cgit v1.2.1 From 12a5b40046f9e1a99be2365c86a64e844d1509e7 Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Thu, 10 Dec 2020 20:28:46 +0000 Subject: README: add a paragraph about installation Thanks to Albert Reuther for the request. --- README | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README b/README index a970973..ba474a2 100644 --- a/README +++ b/README @@ -31,6 +31,15 @@ Enchant bindings are supplied for C and C++; there are third-party bindings for various languages (see the home page). +Installation +------------ + +Users should install from a release tarball. See the file INSTALL for +instructions. + +Developers or others wishing to install from a git repository, see HACKING. + + Sharing personal word lists between spell-checkers -------------------------------------------------- -- cgit v1.2.1 From 0508df407e08da1f37a54c808f908d52f6aab626 Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Thu, 10 Dec 2020 20:33:56 +0000 Subject: Bump version to 2.2.14 and add NEWS --- NEWS | 9 +++++++++ configure.ac | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index cba66f8..084021b 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,12 @@ +2.2.14 (December 10, 2020) +-------------------------- + +Improve installation instructions: in particular, add a note about where to +find them to README. + +The nuspell backend is updated for newer versions. + + 2.2.13 (November 2, 2020) ------------------------- diff --git a/configure.ac b/configure.ac index be1f1f2..3b1962e 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([enchant],[2.2.13]) +AC_INIT([enchant],[2.2.14]) AC_CONFIG_SRCDIR(src/enchant.h) AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([subdir-objects]) -- cgit v1.2.1