From 51af2c330b2222f51383ecf11e89b8ec7571455e Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Tue, 29 May 2018 17:09:28 +0000 Subject: kytea: fix build after #28029 It moved our -O2 before their -O3, but -O3 inlines "checkValueVecEqual(&,&)" into "checkValueVecEqual(*,*)". --- pkgs/tools/text/kytea/default.nix | 4 +++- pkgs/tools/text/kytea/gcc-O3.patch | 13 +++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 pkgs/tools/text/kytea/gcc-O3.patch diff --git a/pkgs/tools/text/kytea/default.nix b/pkgs/tools/text/kytea/default.nix index 142bb721277..eb537c67a63 100644 --- a/pkgs/tools/text/kytea/default.nix +++ b/pkgs/tools/text/kytea/default.nix @@ -10,12 +10,14 @@ stdenv.mkDerivation rec { sha256 = "0ilzzwn5vpvm65bnbyb9f5rxyxy3jmbafw9w0lgl5iad1ka36jjk"; }; + patches = [ ./gcc-O3.patch ]; + meta = with stdenv.lib; { homepage = http://www.phontron.com/kytea/; description = "General toolkit developed for analyzing text"; longDescription = '' - A general toolkit developed for analyzing text, with a focus on Japanese, + A general toolkit developed for analyzing text, with a focus on Japanese, Chinese and other languages requiring word or morpheme segmentation. ''; diff --git a/pkgs/tools/text/kytea/gcc-O3.patch b/pkgs/tools/text/kytea/gcc-O3.patch new file mode 100644 index 00000000000..71b1d0c3b16 --- /dev/null +++ b/pkgs/tools/text/kytea/gcc-O3.patch @@ -0,0 +1,13 @@ +diff --git a/src/lib/kytea-util.cpp b/src/lib/kytea-util.cpp +index 7c8c4c6..4492df1 100644 +--- a/src/lib/kytea-util.cpp ++++ b/src/lib/kytea-util.cpp +@@ -49,5 +49,8 @@ void checkValueVecEqual(const std::vector * a, const std::vector * b) { + ++template void checkValueVecEqual(const std::vector & a, const std::vector & b); + template void checkValueVecEqual(const std::vector * a, const std::vector * b); ++template void checkValueVecEqual(const std::vector & a, const std::vector & b); + template void checkValueVecEqual(const std::vector * a, const std::vector * b); + template void checkValueVecEqual(const std::vector > * a, const std::vector > * b); ++template void checkValueVecEqual(const std::vector & a, const std::vector & b); + template void checkValueVecEqual(const std::vector * a, const std::vector * b); -- cgit 1.4.1