From 21fda6d35bf5b3050b91fefc09be57ab55c9a085 Mon Sep 17 00:00:00 2001 From: Christian Grasser Date: Sun, 8 Oct 2017 17:00:02 +0200 Subject: [PATCH] - based on msys2 build from https://github.com/hunspell/hunspell/blob/master/appveyor.yml - change circleci for mingw64 --- .circleci/config.yml | 40 +++++++++++++++++++++++++--- appveyor.yml | 17 ++++++++++++ common/config.cpp | 4 +++ common/convert.cpp | 4 +++ common/file_util.cpp | 1 + modules/speller/default/language.cpp | 6 ++++- prog/aspell.cpp | 4 +++ 7 files changed, 71 insertions(+), 5 deletions(-) create mode 100644 appveyor.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index 3513d29..c40fbb0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -124,6 +124,36 @@ jobs: - run: CXX=clang++-8 CC=clang-8 ./sanity-check.sh - run: ./config-opt && make -C build -j2 + build_19_04_mingw64: + working_directory: ~/GNUAspell/aspell + parallelism: 1 + #shell: /bin/bash --login + # To see the list of pre-built images that CircleCI provides for most common languages see + # https://circleci.com/docs/2.0/circleci-images/ + docker: + - image: circleci/buildpack-deps:19.04 + steps: + # Machine Setup + # If you break your build into multiple jobs with workflows, you will probably want to do the parts + # of this that are relevant in each + # The following `checkout` command checks out your code to your working directory. In 1.0 we did this implicitly. + # In 2.0 you can choose where in the course of a job your code should be checked out. + - checkout + # + # note: default gcc version is 8.3 + - run: sudo apt-get -y update + - run: sudo apt-get -y install make autopoint texinfo libtool intltool bzip2 gettext g++-multilib mingw-w64 + #- run: sudo apt-get -y mingw-w64 + #&& (for alt in i686-w64-mingw32-g++ i686-w64-mingw32-gcc x86_64-w64-mingw32-g++ x86_64-w64-mingw32-gcc; do update-alternatives --set \$alt /usr/bin/\$alt-posix; done); + - run: sudo apt-get -y purge aspell + # + - run: ./autogen + - run: ./sanity-check.sh + #- run: CXX="g++ -m32" CC="gcc -m32" ./sanity-check.sh + - run: CXX=x86_64-w64-mingw32-g++ CC=x86_64-w64-mingw32-gcc ./sanity-check.sh + - run: CXX=i686-w64-mingw32-g++ CC=i686-w64-mingw32-gcc ./sanity-check.sh + + tests: working_directory: ~/GNUAspell/aspell parallelism: 1 @@ -146,10 +176,12 @@ workflows: version: 2 sanity_check: jobs: - - build_jessie - - build_16_04 - - build_18_04 - - build_19_04 + #- build_jessie + #- build_16_04 + #- build_18_04 + #- build_19_04 + - build_19_04_mingw64 + tests: jobs: - tests diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..eeb4a1d --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,17 @@ +version: 0.60.8.{build} +image: Visual Studio 2017 + + +environment: + matrix: + - MSYSTEM: MINGW64 + BASH_PATH: C:\msys64\usr\bin\bash + + +build_script: + - cmd: '%BASH_PATH% -lc "cd $APPVEYOR_BUILD_FOLDER; ./autogen && ./configure && make && make install && make dist"' + +after_build: + - cd "%APPVEYOR_BUILD_FOLDER%" + - ps: >- + Push-AppveyorArtifact "aspell-0.60.9-git.tar.gz" -FileName aspell-0.60.9-git.tar.gz diff --git a/common/config.cpp b/common/config.cpp index a9201d0..abecbeb 100644 --- a/common/config.cpp +++ b/common/config.cpp @@ -39,6 +39,10 @@ #include "vararray.hpp" #include "string_list.hpp" +#define printf printf +#include "libintl.h" +#undef printf + #include "gettext.h" #include "iostream.hpp" diff --git a/common/convert.cpp b/common/convert.cpp index 6a12645..a5e64cf 100644 --- a/common/convert.cpp +++ b/common/convert.cpp @@ -22,6 +22,10 @@ #include "iostream.hpp" +#define printf printf +#include "libintl.h" +#undef printf + #include "gettext.h" namespace acommon { diff --git a/common/file_util.cpp b/common/file_util.cpp index 56ea501..a0a0ba2 100644 --- a/common/file_util.cpp +++ b/common/file_util.cpp @@ -13,6 +13,7 @@ #include "fstream.hpp" #include "errors.hpp" #include "string_list.hpp" +#include "asc_ctype.hpp" #ifdef USE_FILE_LOCKS # include diff --git a/modules/speller/default/language.cpp b/modules/speller/default/language.cpp index 08da327..e0a1102 100644 --- a/modules/speller/default/language.cpp +++ b/modules/speller/default/language.cpp @@ -20,10 +20,14 @@ #include "getdata.hpp" #include "file_util.hpp" -#ifdef ENABLE_NLS +#ifdef HAVE_LANGINFO_CODESET # include #endif +#define printf printf +#include "libintl.h" +#undef printf + #include "gettext.h" namespace aspeller { diff --git a/prog/aspell.cpp b/prog/aspell.cpp index cf03dd7..d86a30a 100644 --- a/prog/aspell.cpp +++ b/prog/aspell.cpp @@ -61,6 +61,10 @@ #include "hash-t.hpp" #include "hash_fun.hpp" +#define printf printf +#include "libintl.h" +#undef printf + #include "gettext.h" using namespace acommon;