From 006a7a1749aae71f4e5e6e8d4c7085be1c946338 Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Sat, 8 Feb 2020 13:42:04 +0900 Subject: [PATCH 01/13] add cygwin workflow --- .github/workflows/test-cygwin.yml | 37 +++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/test-cygwin.yml diff --git a/.github/workflows/test-cygwin.yml b/.github/workflows/test-cygwin.yml new file mode 100644 index 00000000..cf340c94 --- /dev/null +++ b/.github/workflows/test-cygwin.yml @@ -0,0 +1,37 @@ +name: mecab on Windows + +on: + pull_request: + paths: + - '.github/workflows/test-cygwin.yml' + - 'mecab/**' + push: + branches: + - master + paths: + - '.github/workflows/test-cygwin.yml' + - 'mecab/**' + +jobs: + test: + name: Test + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - name: Install cygwin base packages with chocolatey + run: | + choco config get cacheLocation + choco install --no-progress cygwin + - name: Install cygwin additional packages + run: | + C:\tools\cygwin\cygwinsetup.exe -qgnNdO -R C:/tools/cygwin -s http://mirrors.kernel.org/sourceware/cygwin/ -P autoconf,bison,gcc-core,make + shell: cmd + - name: Set ENV + run: | + echo '::set-env name=PATH::C:\tools\cygwin\bin;C:\tools\cygwin\usr\bin' + - name: Autoconf + run: | + bash.exe -c ./autogen.sh + bash.exe -c ./configure + shell: cmd + working-directory: mecab From 34623f4ac09484f279c9863987e902d19cd68a28 Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Sat, 8 Feb 2020 13:47:18 +0900 Subject: [PATCH 02/13] disable autoCRLF --- .github/workflows/test-cygwin.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-cygwin.yml b/.github/workflows/test-cygwin.yml index cf340c94..4ff8ca43 100644 --- a/.github/workflows/test-cygwin.yml +++ b/.github/workflows/test-cygwin.yml @@ -17,6 +17,7 @@ jobs: name: Test runs-on: windows-latest steps: + - run: git config --global core.autoCRLF false - uses: actions/checkout@v2 - name: Install cygwin base packages with chocolatey run: | From 462c10c5648c6f8d04a79b1180e8c27bd3eafe50 Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Sat, 8 Feb 2020 13:47:48 +0900 Subject: [PATCH 03/13] fix workflow name --- .github/workflows/test-cygwin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-cygwin.yml b/.github/workflows/test-cygwin.yml index 4ff8ca43..d9736b4a 100644 --- a/.github/workflows/test-cygwin.yml +++ b/.github/workflows/test-cygwin.yml @@ -1,4 +1,4 @@ -name: mecab on Windows +name: mecab on cygwin on: pull_request: From 39d20f04c178ace1be26db6816327257466c46fa Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Sat, 8 Feb 2020 13:51:33 +0900 Subject: [PATCH 04/13] install libtoolize,aclocal,automake --- .github/workflows/test-cygwin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-cygwin.yml b/.github/workflows/test-cygwin.yml index d9736b4a..c5ad35ae 100644 --- a/.github/workflows/test-cygwin.yml +++ b/.github/workflows/test-cygwin.yml @@ -25,7 +25,7 @@ jobs: choco install --no-progress cygwin - name: Install cygwin additional packages run: | - C:\tools\cygwin\cygwinsetup.exe -qgnNdO -R C:/tools/cygwin -s http://mirrors.kernel.org/sourceware/cygwin/ -P autoconf,bison,gcc-core,make + C:\tools\cygwin\cygwinsetup.exe -qgnNdO -R C:/tools/cygwin -s http://mirrors.kernel.org/sourceware/cygwin/ -P autoconf,bison,gcc-core,make,libtoolize,aclocal,automake shell: cmd - name: Set ENV run: | From 86f43e2c4cb539bd7774aa249c308ddcf2dce400 Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Sat, 8 Feb 2020 13:57:05 +0900 Subject: [PATCH 05/13] install m4 --- .github/workflows/test-cygwin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-cygwin.yml b/.github/workflows/test-cygwin.yml index c5ad35ae..7910dd33 100644 --- a/.github/workflows/test-cygwin.yml +++ b/.github/workflows/test-cygwin.yml @@ -25,7 +25,7 @@ jobs: choco install --no-progress cygwin - name: Install cygwin additional packages run: | - C:\tools\cygwin\cygwinsetup.exe -qgnNdO -R C:/tools/cygwin -s http://mirrors.kernel.org/sourceware/cygwin/ -P autoconf,bison,gcc-core,make,libtoolize,aclocal,automake + C:\tools\cygwin\cygwinsetup.exe -qgnNdO -R C:/tools/cygwin -s http://mirrors.kernel.org/sourceware/cygwin/ -P autoconf,bison,gcc-core,make,libtool,m4,aclocal,automake shell: cmd - name: Set ENV run: | From b068f732fc8d84334906b87107d6af55c7ac6d45 Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Sat, 8 Feb 2020 14:06:54 +0900 Subject: [PATCH 06/13] install libiconv --- .github/workflows/test-cygwin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-cygwin.yml b/.github/workflows/test-cygwin.yml index 7910dd33..7a944510 100644 --- a/.github/workflows/test-cygwin.yml +++ b/.github/workflows/test-cygwin.yml @@ -25,7 +25,7 @@ jobs: choco install --no-progress cygwin - name: Install cygwin additional packages run: | - C:\tools\cygwin\cygwinsetup.exe -qgnNdO -R C:/tools/cygwin -s http://mirrors.kernel.org/sourceware/cygwin/ -P autoconf,bison,gcc-core,make,libtool,m4,aclocal,automake + C:\tools\cygwin\cygwinsetup.exe -qgnNdO -R C:/tools/cygwin -s http://mirrors.kernel.org/sourceware/cygwin/ -P autoconf,bison,gcc-core,make,libtool,m4,aclocal,automake,libiconv shell: cmd - name: Set ENV run: | From 0a1349d9c50254138b8d9824f21ee6c21a45335f Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Sat, 8 Feb 2020 14:07:30 +0900 Subject: [PATCH 07/13] install gcc-g++ --- .github/workflows/test-cygwin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-cygwin.yml b/.github/workflows/test-cygwin.yml index 7a944510..049ea44d 100644 --- a/.github/workflows/test-cygwin.yml +++ b/.github/workflows/test-cygwin.yml @@ -25,7 +25,7 @@ jobs: choco install --no-progress cygwin - name: Install cygwin additional packages run: | - C:\tools\cygwin\cygwinsetup.exe -qgnNdO -R C:/tools/cygwin -s http://mirrors.kernel.org/sourceware/cygwin/ -P autoconf,bison,gcc-core,make,libtool,m4,aclocal,automake,libiconv + C:\tools\cygwin\cygwinsetup.exe -qgnNdO -R C:/tools/cygwin -s http://mirrors.kernel.org/sourceware/cygwin/ -P autoconf,bison,gcc-g++,make,libtool,m4,aclocal,automake,libiconv shell: cmd - name: Set ENV run: | From c76c8fcbc308f04a513099ee1ff2b6770a9655ef Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Sat, 8 Feb 2020 14:12:54 +0900 Subject: [PATCH 08/13] install gettext-devel --- .github/workflows/test-cygwin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-cygwin.yml b/.github/workflows/test-cygwin.yml index 049ea44d..443ccd9a 100644 --- a/.github/workflows/test-cygwin.yml +++ b/.github/workflows/test-cygwin.yml @@ -25,7 +25,7 @@ jobs: choco install --no-progress cygwin - name: Install cygwin additional packages run: | - C:\tools\cygwin\cygwinsetup.exe -qgnNdO -R C:/tools/cygwin -s http://mirrors.kernel.org/sourceware/cygwin/ -P autoconf,bison,gcc-g++,make,libtool,m4,aclocal,automake,libiconv + C:\tools\cygwin\cygwinsetup.exe -qgnNdO -R C:/tools/cygwin -s http://mirrors.kernel.org/sourceware/cygwin/ -P autoconf,bison,gcc-g++,make,libtool,m4,aclocal,automake,libiconv,gettext-devel shell: cmd - name: Set ENV run: | From cc49c64ba3f8c11bd4ec203c4ff95580355f4b18 Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Sat, 8 Feb 2020 14:14:11 +0900 Subject: [PATCH 09/13] make check --- .github/workflows/test-cygwin.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-cygwin.yml b/.github/workflows/test-cygwin.yml index 443ccd9a..3786ec0a 100644 --- a/.github/workflows/test-cygwin.yml +++ b/.github/workflows/test-cygwin.yml @@ -30,9 +30,15 @@ jobs: - name: Set ENV run: | echo '::set-env name=PATH::C:\tools\cygwin\bin;C:\tools\cygwin\usr\bin' - - name: Autoconf + - name: configure run: | bash.exe -c ./autogen.sh bash.exe -c ./configure shell: cmd working-directory: mecab + - name: make + run: | + make all + make check + shell: cmd + working-directory: mecab From 3ce5c37316c195e326722f3affafbe29a6db0d7b Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Sat, 8 Feb 2020 15:04:32 +0900 Subject: [PATCH 10/13] move sstream --- mecab/src/common.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mecab/src/common.h b/mecab/src/common.h index 910a4b3e..508a8912 100644 --- a/mecab/src/common.h +++ b/mecab/src/common.h @@ -13,12 +13,13 @@ #include #include #include -#include #ifdef __CYGWIN__ #define _GLIBCXX_EXPORT_TEMPLATE #endif +#include + #ifdef HAVE_CONFIG_H #include "config.h" #endif From bae41d2af48679011112f6df37b67ef3038e1f6d Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Sat, 8 Feb 2020 15:12:54 +0900 Subject: [PATCH 11/13] Revert "move sstream" This reverts commit 3ce5c37316c195e326722f3affafbe29a6db0d7b. --- mecab/src/common.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mecab/src/common.h b/mecab/src/common.h index 508a8912..910a4b3e 100644 --- a/mecab/src/common.h +++ b/mecab/src/common.h @@ -13,13 +13,12 @@ #include #include #include +#include #ifdef __CYGWIN__ #define _GLIBCXX_EXPORT_TEMPLATE #endif -#include - #ifdef HAVE_CONFIG_H #include "config.h" #endif From 04d0779c353d69a986ae123bfcb34f89833af331 Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Sat, 8 Feb 2020 15:41:12 +0900 Subject: [PATCH 12/13] remove _GLIBCXX_EXPORT_TEMPLATE --- mecab/src/common.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mecab/src/common.h b/mecab/src/common.h index 910a4b3e..451ec4de 100644 --- a/mecab/src/common.h +++ b/mecab/src/common.h @@ -15,10 +15,6 @@ #include #include -#ifdef __CYGWIN__ -#define _GLIBCXX_EXPORT_TEMPLATE -#endif - #ifdef HAVE_CONFIG_H #include "config.h" #endif From 2c7fe8473fac070d7c0d5a914960e5676000d32e Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Sat, 8 Feb 2020 15:58:56 +0900 Subject: [PATCH 13/13] remove wmain on cygwin --- mecab/src/winmain.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mecab/src/winmain.h b/mecab/src/winmain.h index 831abf2e..00d090f9 100644 --- a/mecab/src/winmain.h +++ b/mecab/src/winmain.h @@ -2,7 +2,7 @@ // // Copyright(C) 2001-2011 Taku Kudo // Copyright(C) 2004-2006 Nippon Telegraph and Telephone Corporation -#if defined(_WIN32) || defined(__CYGWIN__) +#if defined(_WIN32) #include #include