core.git: external/libnumbertext

2023-12-07 Thread Stephan Bergmann (via logerrit)
 external/libnumbertext/deprecated.patch.0 |8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)

New commits:
commit ad6ba4a3a63a25c5b9043bb5d0b178411b3eb714
Author: Stephan Bergmann 
AuthorDate: Thu Dec 7 17:40:23 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Dec 8 07:31:54 2023 +0100

external/libnumbertext: Silence -Werror,-Wdeprecated-declarations

...when building against LLVM 18 trunk libc++,

> In file included from Numbertext.cxx:6:
> ~/llvm/inst/bin/../include/c++/v1/locale:3772:1: error: 
'wstring_convert>' is deprecated 
[-Werror,-Wdeprecated-declarations]
>  3772 | wstring_convert<_Codecvt, _Elem, _WideAlloc, _ByteAlloc>::
>   | ^
> ~/llvm/inst/bin/../include/c++/v1/locale:3649:17: note: in instantiation 
of member function 'std::wstring_convert>::to_bytes' 
requested here
>  3649 | {return to_bytes(__wstr.data(), __wstr.data() + 
__wstr.size());}
>   | ^
> Numbertext.cxx:164:22: note: in instantiation of member function 
'std::wstring_convert>::to_bytes' requested here
>   164 | return converter.to_bytes( s );
>   |  ^
> ~/llvm/inst/bin/../include/c++/v1/locale:3591:28: note: 
'wstring_convert>' has been explicitly marked 
deprecated here
>  3591 | class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 
wstring_convert
>   |^
> ~/llvm/inst/bin/../include/c++/v1/__config:942:41: note: expanded from 
macro '_LIBCPP_DEPRECATED_IN_CXX17'
>   942 | #define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
>   | ^
> ~/llvm/inst/bin/../include/c++/v1/__config:915:49: note: expanded from 
macro '_LIBCPP_DEPRECATED'
>   915 | #  define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
>   | ^

(The warning is apparently only emitted late during compilation when
instantiating template code, so extending the existing `#pragma GCC 
diagnostic
push/pop` area did not work, and the `#pragma GCC diagnostic ignored` 
rather had
to be enabled all through to the end of the TU.)

Change-Id: Iffc1c468426407e3252724d18f358b9923f7f733
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160437
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/libnumbertext/deprecated.patch.0 
b/external/libnumbertext/deprecated.patch.0
index 1fe5c214f602..8ee86ac135c5 100644
--- a/external/libnumbertext/deprecated.patch.0
+++ b/external/libnumbertext/deprecated.patch.0
@@ -31,19 +31,13 @@
  return converter.from_bytes( s );
  #else
  return ::locale::conv::utf_to_utf(s.c_str(), s.c_str() + 
s.size());
-@@ -138,8 +152,15 @@
+@@ -138,6 +152,9 @@
  WideCharToMultiByte(CP_UTF8, 0, s.c_str(), -1, str.get(), nSize, nullptr, 
nullptr);
  return str.get();
  #elif !defined NUMBERTEXT_BOOST
 +#if defined __GNUC__
-+#pragma GCC diagnostic push
 +#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 +#endif
  typedef std::codecvt_utf8 convert_type;
  std::wstring_convert converter;
-+#if defined __GNUC__
-+#pragma GCC diagnostic pop
-+#endif
  return converter.to_bytes( s );
- #else
- return ::locale::conv::utf_to_utf(s.c_str(), s.c_str() + s.size());


[Libreoffice-commits] core.git: external/libnumbertext

2022-07-01 Thread Stephan Bergmann (via logerrit)
 external/libnumbertext/UnpackedTarball_libnumbertext.mk |1 
 external/libnumbertext/deprecated.patch.0   |   49 
 2 files changed, 50 insertions(+)

New commits:
commit e37e1a7d2007bd6896027b69271774da2568e6f8
Author: Stephan Bergmann 
AuthorDate: Fri Jul 1 19:45:19 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Jul 1 22:18:20 2022 +0200

external/libnumbertext: Silence -Werror,-Wdeprecated-declarations

...as seen now with LLVM 15 trunk libc++, which marks the std::codecvt_utf8 
and
std::wstring_convert functionality, deprecated since C++17, as such

(
"[libc++] Implement P0618R0 (Deprecating )")

Change-Id: Id34e3fea540b76591ead8ba3df4c31a71d7b4aaf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136776
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/libnumbertext/UnpackedTarball_libnumbertext.mk 
b/external/libnumbertext/UnpackedTarball_libnumbertext.mk
index 3a7a7ff6d85a..583b26308675 100644
--- a/external/libnumbertext/UnpackedTarball_libnumbertext.mk
+++ b/external/libnumbertext/UnpackedTarball_libnumbertext.mk
@@ -22,6 +22,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libnumbertext, \
 external/libnumbertext/MSVCNonBMPBug.patch1 \
 external/libnumbertext/WinUnicodePath.patch1 \
 external/libnumbertext/EmptyString.patch1 \
+external/libnumbertext/deprecated.patch.0 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libnumbertext/deprecated.patch.0 
b/external/libnumbertext/deprecated.patch.0
new file mode 100644
index ..1fe5c214f602
--- /dev/null
+++ b/external/libnumbertext/deprecated.patch.0
@@ -0,0 +1,49 @@
+--- src/Numbertext.cxx
 src/Numbertext.cxx
+@@ -41,7 +41,14 @@
+ std::wifstream wif(filename);
+ if (wif.fail())
+ return false;
++#if defined __GNUC__
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
++#endif
+ wif.imbue(std::locale(std::locale(), new std::codecvt_utf8));
++#if defined __GNUC__
++#pragma GCC diagnostic pop
++#endif
+ std::wstringstream wss;
+ wss << wif.rdbuf();
+ result = wss.str();
+@@ -122,8 +129,15 @@
+ MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, wstr.get(), nSize);
+ return wstr.get();
+ #elif !defined NUMBERTEXT_BOOST
++#if defined __GNUC__
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
++#endif
+ typedef std::codecvt_utf8 convert_type;
+ std::wstring_convert converter;
++#if defined __GNUC__
++#pragma GCC diagnostic pop
++#endif
+ return converter.from_bytes( s );
+ #else
+ return ::locale::conv::utf_to_utf(s.c_str(), s.c_str() + 
s.size());
+@@ -138,8 +152,15 @@
+ WideCharToMultiByte(CP_UTF8, 0, s.c_str(), -1, str.get(), nSize, nullptr, 
nullptr);
+ return str.get();
+ #elif !defined NUMBERTEXT_BOOST
++#if defined __GNUC__
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
++#endif
+ typedef std::codecvt_utf8 convert_type;
+ std::wstring_convert converter;
++#if defined __GNUC__
++#pragma GCC diagnostic pop
++#endif
+ return converter.to_bytes( s );
+ #else
+ return ::locale::conv::utf_to_utf(s.c_str(), s.c_str() + s.size());


[Libreoffice-commits] core.git: external/libnumbertext

2022-06-27 Thread Caolán McNamara (via logerrit)
 external/libnumbertext/UnpackedTarball_libnumbertext.mk |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 4195b594b91f948a15de58e9426972f6b8c634c9
Author: Caolán McNamara 
AuthorDate: Mon Jun 27 14:28:58 2022 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jun 27 16:58:09 2022 +0200

Mark external/libnumbertext/EmptyString.patch1 as upstreamed

Change-Id: I8d926046c11f38daf3a8d7fb4d4176b78a995af3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136497
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/external/libnumbertext/UnpackedTarball_libnumbertext.mk 
b/external/libnumbertext/UnpackedTarball_libnumbertext.mk
index fb88366d5aef..3a7a7ff6d85a 100644
--- a/external/libnumbertext/UnpackedTarball_libnumbertext.mk
+++ b/external/libnumbertext/UnpackedTarball_libnumbertext.mk
@@ -15,6 +15,9 @@ $(eval $(call 
gb_UnpackedTarball_update_autoconf_configs,libnumbertext))
 
 $(eval $(call gb_UnpackedTarball_set_patchlevel,libnumbertext,1))
 
+# EmptyString.patch1 submitted as
+# https://github.com/Numbertext/libnumbertext/pull/95
+
 $(eval $(call gb_UnpackedTarball_add_patches,libnumbertext, \
 external/libnumbertext/MSVCNonBMPBug.patch1 \
 external/libnumbertext/WinUnicodePath.patch1 \


[Libreoffice-commits] core.git: external/libnumbertext

2022-06-27 Thread Caolán McNamara (via logerrit)
 external/libnumbertext/EmptyString.patch1   |   13 +
 external/libnumbertext/UnpackedTarball_libnumbertext.mk |1 +
 2 files changed, 14 insertions(+)

New commits:
commit 35ca93f7892e8f19b871f7f687a9f7e4933a65ad
Author: Caolán McNamara 
AuthorDate: Mon Jun 27 09:40:22 2022 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jun 27 13:19:25 2022 +0200

crashtesting: fix assert seen on loading forum-nl-1226.ods

Change-Id: If8c08a51b11a459a03b4a0604c1fb9897351e598
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136480
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/external/libnumbertext/EmptyString.patch1 
b/external/libnumbertext/EmptyString.patch1
new file mode 100644
index ..d6570117da09
--- /dev/null
+++ b/external/libnumbertext/EmptyString.patch1
@@ -0,0 +1,13 @@
+--- a/src/Soros.cxx2022-06-27 09:36:46.486075920 +0100
 b/src/Soros.cxx2022-06-27 09:37:52.594072196 +0100
+@@ -98,8 +98,8 @@
+ s = regex_replace(s, quoteEnd, L"");
+ s = translate(s, c.substr(1), m.substr(1), L"");
+ replace(s, slash, L""); // -> \\, ", ;, #
+-begins.push_back(s[0] == L'^');
+-ends.push_back(s[s.length()-1] == L'$');
++begins.push_back(!s.empty() && s[0] == L'^');
++ends.push_back(!s.empty() && s[s.length()-1] == L'$');
+ s = L"^" + regex_replace(s, wregex(L"^\\^"), L"");
+ s = regex_replace(s, wregex(L"\\$$"), L"") + L"$";
+ try
diff --git a/external/libnumbertext/UnpackedTarball_libnumbertext.mk 
b/external/libnumbertext/UnpackedTarball_libnumbertext.mk
index 48cd2a9a273d..fb88366d5aef 100644
--- a/external/libnumbertext/UnpackedTarball_libnumbertext.mk
+++ b/external/libnumbertext/UnpackedTarball_libnumbertext.mk
@@ -18,6 +18,7 @@ $(eval $(call 
gb_UnpackedTarball_set_patchlevel,libnumbertext,1))
 $(eval $(call gb_UnpackedTarball_add_patches,libnumbertext, \
 external/libnumbertext/MSVCNonBMPBug.patch1 \
 external/libnumbertext/WinUnicodePath.patch1 \
+external/libnumbertext/EmptyString.patch1 \
 ))
 
 # vim: set noet sw=4 ts=4:


[Libreoffice-commits] core.git: external/libnumbertext sax/source

2021-03-03 Thread Stephan Bergmann (via logerrit)
 external/libnumbertext/Afl++ICE.patch1  |   30 
 external/libnumbertext/UnpackedTarball_libnumbertext.mk |1 
 sax/source/tools/converter.cxx  |   10 +
 3 files changed, 3 insertions(+), 38 deletions(-)

New commits:
commit bc820a345058f1cb41a49f8961c0aef26065dc53
Author: Stephan Bergmann 
AuthorDate: Tue Mar 2 10:13:50 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Mar 3 14:32:08 2021 +0100

Remove workaround now its fixed in AFL++ and oss-fuzz updated

remove workaround for problem fixed by:

https://github.com/AFLplusplus/AFLplusplus/commit/333509bb0a56be9bd2e236f0e2f37d4af2dd7d59>
+# "better unicode support" for now:

oss-fuzz updated:
https://github.com/google/oss-fuzz/pull/5273

Change-Id: Id3f1790ef452ed7732032801fc4ec028e57443eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111806
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/libnumbertext/Afl++ICE.patch1 
b/external/libnumbertext/Afl++ICE.patch1
deleted file mode 100644
index 62104200632d..
--- a/external/libnumbertext/Afl++ICE.patch1
+++ /dev/null
@@ -1,30 +0,0 @@
 /src/Soros.cxx 2021-02-24 15:31:59.003956770 +
-+++ /src/Soros.cxx 2021-02-24 15:32:29.156601577 +
-@@ -45,6 +45,9 @@
- begins(0),
- ends(0)
- {
-+const std::wstring_view numbertext = L"__numbertext__";
-+const std::wstring_view semicolon = L";";
-+  
- program = translate(program, m, c, L"\\"); // \\, \", \;, \# -> 
\uE000..\uE003
- // switch off all country-dependent lines, and switch on the requested 
ones
- program = regex_replace(program, 
wregex(L"(^|[\n;])([^\n;#]*#[^\n]*\\[:[^\n:\\]]*:\\][^\n]*)"), L"$1#$2");
-@@ -52,7 +55,7 @@
- program = regex_replace(program, wregex(L"(^|[\n;])#([^\n;#]*#[^\n]*\\[:" 
+ filtered_lang + L":\\][^\n]*)"), L"$1$2");
- program = regex_replace(program, wregex(L"(#[^\n]*)?(\n|$)"), L";"); // 
remove comments
- // __numbertext__ sets the place of left zero deletion rule
--if (program.find(L"__numbertext__") == std::wstring::npos)
-+if (program.find(numbertext) == std::wstring::npos)
- program.insert(0, L"__numbertext__;");
- program = regex_replace(program, wregex(L"__numbertext__"),
- // default left zero deletion
-@@ -69,7 +72,7 @@
- wregex quoteStart(L"^\"");
- wregex quoteEnd(L"\"$");
- std::wstring smacro;
--while ((pos = program.find(L";", pos)) != std::wstring::npos) {
-+while ((pos = program.find(semicolon, pos)) != std::wstring::npos) {
- wsmatch sp;
- std::wstring linOrig = program.substr(old_pos, pos - old_pos);
- // pattern extension after == macro ==:
diff --git a/external/libnumbertext/UnpackedTarball_libnumbertext.mk 
b/external/libnumbertext/UnpackedTarball_libnumbertext.mk
index 1238290049d1..48cd2a9a273d 100644
--- a/external/libnumbertext/UnpackedTarball_libnumbertext.mk
+++ b/external/libnumbertext/UnpackedTarball_libnumbertext.mk
@@ -18,7 +18,6 @@ $(eval $(call 
gb_UnpackedTarball_set_patchlevel,libnumbertext,1))
 $(eval $(call gb_UnpackedTarball_add_patches,libnumbertext, \
 external/libnumbertext/MSVCNonBMPBug.patch1 \
 external/libnumbertext/WinUnicodePath.patch1 \
-external/libnumbertext/Afl++ICE.patch1 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index 4b476be934ee..f4f6dccb8ddc 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -728,10 +728,6 @@ void Converter::convertAngle(OUStringBuffer& rBuffer, 
sal_Int16 const nAngle,
 bool Converter::convertAngle(sal_Int16& rAngle, std::u16string_view rString,
 bool const isWrongOOo10thDegAngle)
 {
-const std::u16string_view deg = u"deg";
-const std::u16string_view grad = u"grad";
-const std::u16string_view rad = u"rad";
-
 // ODF 1.1 leaves it undefined what the number means, but ODF 1.2 says it's
 // degrees, while OOo has historically used 10th of degrees :(
 // So import degrees when we see the "deg" suffix but continue with 10th of
@@ -741,15 +737,15 @@ bool Converter::convertAngle(sal_Int16& rAngle, 
std::u16string_view rString,
 sal_Int32 nValue(0);
 double fValue(0.0);
 bool bRet = ::sax::Converter::convertDouble(fValue, rString);
-if (std::u16string_view::npos != rString.find(deg))
+if (std::u16string_view::npos != rString.find(u"deg"))
 {
 nValue = fValue * 10.0;
 }
-else if (std::u16string_view::npos != rString.find(grad))
+else if (std::u16string_view::npos != rString.find(u"grad"))
 {
 nValue = (fValue * 9.0 / 10.0) * 10.0;
 }
-else if (std::u16string_view::npos != rString.find(rad))
+else if (std::u16string_view::npos != rString.find(u"rad"))
 {
 nValue = basegfx::rad2deg(fValue) * 10.0;
 }
__

[Libreoffice-commits] core.git: external/libnumbertext

2021-02-24 Thread Caolán McNamara (via logerrit)
 external/libnumbertext/Afl++ICE.patch1  |   30 
 external/libnumbertext/UnpackedTarball_libnumbertext.mk |1 
 2 files changed, 31 insertions(+)

New commits:
commit 771a256685ca44481252fac6854e88ff6630298d
Author: Caolán McNamara 
AuthorDate: Wed Feb 24 15:37:08 2021 +
Commit: Caolán McNamara 
CommitDate: Wed Feb 24 21:22:01 2021 +0100

ofz#30767 Build-Failure

similar to commit 63a9b50a7a062069af3e3bcf05657164179baa83

afl++ build crashes for some obscure reason. Tweaking the code like so
gets it to squeak by and continue the build.

Change-Id: I8cf477320eab19913c1bb65d9ccb779d9c37c8aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111491
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/external/libnumbertext/Afl++ICE.patch1 
b/external/libnumbertext/Afl++ICE.patch1
new file mode 100644
index ..62104200632d
--- /dev/null
+++ b/external/libnumbertext/Afl++ICE.patch1
@@ -0,0 +1,30 @@
+--- /src/Soros.cxx 2021-02-24 15:31:59.003956770 +
 /src/Soros.cxx 2021-02-24 15:32:29.156601577 +
+@@ -45,6 +45,9 @@
+ begins(0),
+ ends(0)
+ {
++const std::wstring_view numbertext = L"__numbertext__";
++const std::wstring_view semicolon = L";";
++  
+ program = translate(program, m, c, L"\\"); // \\, \", \;, \# -> 
\uE000..\uE003
+ // switch off all country-dependent lines, and switch on the requested 
ones
+ program = regex_replace(program, 
wregex(L"(^|[\n;])([^\n;#]*#[^\n]*\\[:[^\n:\\]]*:\\][^\n]*)"), L"$1#$2");
+@@ -52,7 +55,7 @@
+ program = regex_replace(program, wregex(L"(^|[\n;])#([^\n;#]*#[^\n]*\\[:" 
+ filtered_lang + L":\\][^\n]*)"), L"$1$2");
+ program = regex_replace(program, wregex(L"(#[^\n]*)?(\n|$)"), L";"); // 
remove comments
+ // __numbertext__ sets the place of left zero deletion rule
+-if (program.find(L"__numbertext__") == std::wstring::npos)
++if (program.find(numbertext) == std::wstring::npos)
+ program.insert(0, L"__numbertext__;");
+ program = regex_replace(program, wregex(L"__numbertext__"),
+ // default left zero deletion
+@@ -69,7 +72,7 @@
+ wregex quoteStart(L"^\"");
+ wregex quoteEnd(L"\"$");
+ std::wstring smacro;
+-while ((pos = program.find(L";", pos)) != std::wstring::npos) {
++while ((pos = program.find(semicolon, pos)) != std::wstring::npos) {
+ wsmatch sp;
+ std::wstring linOrig = program.substr(old_pos, pos - old_pos);
+ // pattern extension after == macro ==:
diff --git a/external/libnumbertext/UnpackedTarball_libnumbertext.mk 
b/external/libnumbertext/UnpackedTarball_libnumbertext.mk
index 48cd2a9a273d..1238290049d1 100644
--- a/external/libnumbertext/UnpackedTarball_libnumbertext.mk
+++ b/external/libnumbertext/UnpackedTarball_libnumbertext.mk
@@ -18,6 +18,7 @@ $(eval $(call 
gb_UnpackedTarball_set_patchlevel,libnumbertext,1))
 $(eval $(call gb_UnpackedTarball_add_patches,libnumbertext, \
 external/libnumbertext/MSVCNonBMPBug.patch1 \
 external/libnumbertext/WinUnicodePath.patch1 \
+external/libnumbertext/Afl++ICE.patch1 \
 ))
 
 # vim: set noet sw=4 ts=4:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/libnumbertext lingucomponent/source

2021-01-01 Thread Mike Kaganski (via logerrit)
 external/libnumbertext/UnpackedTarball_libnumbertext.mk |1 
 external/libnumbertext/WinUnicodePath.patch1|   20 
 lingucomponent/source/numbertext/numbertext.cxx |4 ++-
 3 files changed, 24 insertions(+), 1 deletion(-)

New commits:
commit fd7ec8b8a5e9eec0347356b2126333dd840b5a73
Author: Mike Kaganski 
AuthorDate: Mon Dec 28 19:15:40 2020 +0300
Commit: Mike Kaganski 
CommitDate: Fri Jan 1 17:29:42 2021 +0100

Use Unicode paths on Windows in libnumbertext

Change-Id: I02790afc314c8633a24dbf23001f3d5cffe169b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108478
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/external/libnumbertext/UnpackedTarball_libnumbertext.mk 
b/external/libnumbertext/UnpackedTarball_libnumbertext.mk
index d2efd2f852c3..48cd2a9a273d 100644
--- a/external/libnumbertext/UnpackedTarball_libnumbertext.mk
+++ b/external/libnumbertext/UnpackedTarball_libnumbertext.mk
@@ -17,6 +17,7 @@ $(eval $(call 
gb_UnpackedTarball_set_patchlevel,libnumbertext,1))
 
 $(eval $(call gb_UnpackedTarball_add_patches,libnumbertext, \
 external/libnumbertext/MSVCNonBMPBug.patch1 \
+external/libnumbertext/WinUnicodePath.patch1 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libnumbertext/WinUnicodePath.patch1 
b/external/libnumbertext/WinUnicodePath.patch1
new file mode 100644
index ..24a0bd5800d1
--- /dev/null
+++ b/external/libnumbertext/WinUnicodePath.patch1
@@ -0,0 +1,20 @@
+To allow opening files on Unicode paths on Windpws, expect passed 8-bit
+strings to be UTF-8-encoded, and convert them to wchar_t. Fallback to
+ACP strings for backward compatibility.
+
+diff --git a/src/Numbertext.cxx b/src/Numbertext.cxx
+--- a/src/Numbertext.cxx
 b/src/Numbertext.cxx
+@@ -27,7 +27,11 @@
+ bool readfile(const std::string& filename, std::wstring& result)
+ {
+ #ifdef _WIN32
+-std::ifstream ifs(filename);
++// First try to convert from UTF-8
++std::ifstream ifs(Numbertext::string2wstring(filename));
++// Fallback to ACP string for backward compatibility
++if (ifs.fail())
++ifs.open(filename);
+ if (ifs.fail())
+ return false;
+ std::stringstream ss;
diff --git a/lingucomponent/source/numbertext/numbertext.cxx 
b/lingucomponent/source/numbertext/numbertext.cxx
index dfc11a1fbb85..cb8e913bf571 100644
--- a/lingucomponent/source/numbertext/numbertext.cxx
+++ b/lingucomponent/source/numbertext/numbertext.cxx
@@ -100,10 +100,12 @@ void NumberText_Impl::EnsureInitialized()
 osl::FileBase::getSystemPathFromFileURL(aURL, aPhysPath);
 #ifdef _WIN32
 aPhysPath += "\\";
+const rtl_TextEncoding eEnc = RTL_TEXTENCODING_UTF8;
 #else
 aPhysPath += "/";
+const rtl_TextEncoding eEnc = osl_getThreadTextEncoding();
 #endif
-OString path = OUStringToOString(aPhysPath, osl_getThreadTextEncoding());
+OString path = OUStringToOString(aPhysPath, eEnc);
 m_aNumberText.set_prefix(path.getStr());
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/libnumbertext lingucomponent/source

2020-06-18 Thread Mike Kaganski (via logerrit)
 external/libnumbertext/MSVCNonBMPBug.patch1 |   69 
 external/libnumbertext/UnpackedTarball_libnumbertext.mk |4 
 lingucomponent/source/numbertext/numbertext.cxx |   24 +
 3 files changed, 81 insertions(+), 16 deletions(-)

New commits:
commit 21a59b59d9a40ca32d91b05e62ffcd9aef8fd324
Author: Mike Kaganski 
AuthorDate: Thu Jun 18 16:03:38 2020 +0300
Commit: Mike Kaganski 
CommitDate: Thu Jun 18 17:44:49 2020 +0200

tdf#133589 Numbertext: Use Win32API to avoid std::codecvt_utf8 bug

Change-Id: I45c85db44c3dfd92e0929f66c8c95cb309c91e05
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96609
Reviewed-by: László Németh 
Tested-by: Jenkins

diff --git a/external/libnumbertext/MSVCNonBMPBug.patch1 
b/external/libnumbertext/MSVCNonBMPBug.patch1
new file mode 100644
index ..8ced22165bcc
--- /dev/null
+++ b/external/libnumbertext/MSVCNonBMPBug.patch1
@@ -0,0 +1,69 @@
+MSVC's std::codecvt_utf8 has a bug converting non-BMP codepoints like U+10CFA.
+Use MultiByteToWideChar/WideCharToMultiByte instead on Windows.
+
+diff --git a/src/Numbertext.cxx b/src/Numbertext.cxx
+index 5f05b48579af..eb83e59f366f 100755
+--- a/src/Numbertext.cxx
 b/src/Numbertext.cxx
+@@ -7,6 +7,10 @@
+ #include 
+ #include 
+ 
++#ifdef _WIN32
++#include 
++#endif
++
+ #include "Numbertext.hxx"
+ 
+ #ifdef NUMBERTEXT_BOOST
+@@ -22,6 +26,14 @@
+ 
+ bool readfile(const std::string& filename, std::wstring& result)
+ {
++#ifdef _WIN32
++std::ifstream ifs(filename);
++if (ifs.fail())
++return false;
++std::stringstream ss;
++ss << ifs.rdbuf();
++result = Numbertext::string2wstring(ss.str());
++#else
+ std::wifstream wif(filename);
+ if (wif.fail())
+ return false;
+@@ -29,6 +44,7 @@ bool readfile(const std::string& filename, std::wstring& 
result)
+ std::wstringstream wss;
+ wss << wif.rdbuf();
+ result = wss.str();
++#endif
+ return true;
+ }
+ 
+@@ -99,7 +112,12 @@
+ 
+ std::wstring Numbertext::string2wstring(const std::string& s)
+ {
+-#ifndef NUMBERTEXT_BOOST
++#ifdef _WIN32
++int nSize = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, nullptr, 0);
++std::unique_ptr wstr(new wchar_t[nSize]);
++MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, wstr.get(), nSize);
++return wstr.get();
++#elif !defined NUMBERTEXT_BOOST
+ typedef std::codecvt_utf8 convert_type;
+ std::wstring_convert converter;
+ return converter.from_bytes( s );
+@@ -110,7 +128,12 @@
+ 
+ std::string Numbertext::wstring2string(const std::wstring& s)
+ {
+-#ifndef NUMBERTEXT_BOOST
++#ifdef _WIN32
++int nSize = WideCharToMultiByte(CP_UTF8, 0, s.c_str(), -1, nullptr, 0, 
nullptr, nullptr);
++std::unique_ptr str(new char[nSize]);
++WideCharToMultiByte(CP_UTF8, 0, s.c_str(), -1, str.get(), nSize, nullptr, 
nullptr);
++return str.get();
++#elif !defined NUMBERTEXT_BOOST
+ typedef std::codecvt_utf8 convert_type;
+ std::wstring_convert converter;
+ return converter.to_bytes( s );
diff --git a/external/libnumbertext/UnpackedTarball_libnumbertext.mk 
b/external/libnumbertext/UnpackedTarball_libnumbertext.mk
index 1969dcf7d08d..d2efd2f852c3 100644
--- a/external/libnumbertext/UnpackedTarball_libnumbertext.mk
+++ b/external/libnumbertext/UnpackedTarball_libnumbertext.mk
@@ -15,4 +15,8 @@ $(eval $(call 
gb_UnpackedTarball_update_autoconf_configs,libnumbertext))
 
 $(eval $(call gb_UnpackedTarball_set_patchlevel,libnumbertext,1))
 
+$(eval $(call gb_UnpackedTarball_add_patches,libnumbertext, \
+external/libnumbertext/MSVCNonBMPBug.patch1 \
+))
+
 # vim: set noet sw=4 ts=4:
diff --git a/lingucomponent/source/numbertext/numbertext.cxx 
b/lingucomponent/source/numbertext/numbertext.cxx
index 89f5432624bf..34e7694601a3 100644
--- a/lingucomponent/source/numbertext/numbertext.cxx
+++ b/lingucomponent/source/numbertext/numbertext.cxx
@@ -21,7 +21,7 @@
 
 #include 
 #include 
-#include 
+#include 
 
 #include 
 #include 
@@ -132,26 +132,18 @@ OUString SAL_CALL NumberText_Impl::getNumberText(const 
OUString& rText, const Lo
 if (!aCountry.isEmpty())
 aCode += "-" + aCountry;
 OString aLangCode(OUStringToOString(aCode, RTL_TEXTENCODING_ASCII_US));
+#if defined(_WIN32)
+std::wstring sResult(o3tl::toW(rText.getStr()));
+#else
 OString aInput(OUStringToOString(rText, RTL_TEXTENCODING_UTF8));
 std::wstring sResult = Numbertext::string2wstring(aInput.getStr());
+#endif
 bool result = m_aNumberText.numbertext(sResult, aLangCode.getStr());
 DBG_ASSERT(result, "numbertext: false");
-OUString aResult = 
OUString::fromUtf8(Numbertext::wstring2string(sResult).c_str());
 #if defined(_WIN32)
-// workaround to fix non-BMP Unicode characters resulted by wstring 
limitation
-if (!aScript.isEmpty() && aScript == "Hung")
-{
-OUStringBuffer aFix;
-for (int i = 0; i < aResult.getLength(); ++i)
-{
-sal_Unicode c = aResult[i];
-   

[Libreoffice-commits] core.git: external/libnumbertext

2019-01-31 Thread Libreoffice Gerrit user
 external/libnumbertext/ExternalProject_libnumbertext.mk |5 -
 1 file changed, 5 deletions(-)

New commits:
commit 67411db4517f38b9c0283717b52ece141ff49ed1
Author: Michael Stahl 
AuthorDate: Thu Jan 31 13:30:20 2019 +0100
Commit: Michael Stahl 
CommitDate: Thu Jan 31 15:35:01 2019 +0100

libnumbertext: try to remove some odd stuff from ExternalProject.mk

Why do we need this?

Change-Id: I662402731de9b5c56d05730d31ae59606484ec97
Reviewed-on: https://gerrit.libreoffice.org/67210
Tested-by: Jenkins
Reviewed-by: László Németh 

diff --git a/external/libnumbertext/ExternalProject_libnumbertext.mk 
b/external/libnumbertext/ExternalProject_libnumbertext.mk
index 07af2a0345ed..c2bdaeebfba9 100644
--- a/external/libnumbertext/ExternalProject_libnumbertext.mk
+++ b/external/libnumbertext/ExternalProject_libnumbertext.mk
@@ -24,13 +24,8 @@ libnumbertext_CPPFLAGS+=-D_GLIBCXX_DEBUG
 endif
 endif
 
-libnumbertext_LIBS+=-L$(gb_StaticLibrary_WORKDIR)
-
 $(call gb_ExternalProject_get_state_target,libnumbertext,build):
$(call gb_ExternalProject_run,build,\
-   $(if $(libnumbertext_LIBS),LIBS='$(libnumbertext_LIBS)') \
-   $(if $(filter iOS MACOSX,$(OS)),ACLOCAL="aclocal -I 
$(SRCDIR)/m4/mac") \
-   autoreconf && \
LIBS="$(gb_STDLIBS) $(LIBS)" \
$(SHELL) ./configure --disable-shared --with-pic \
$(if 
$(verbose),--disable-silent-rules,--enable-silent-rules) \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/libnumbertext

2018-12-13 Thread Libreoffice Gerrit user
 external/libnumbertext/ExternalProject_libnumbertext.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 1b843d6ea39e23f4a5e34438b283afc85afc0e9e
Author: Stephan Bergmann 
AuthorDate: Thu Dec 13 08:04:27 2018 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Dec 13 09:40:09 2018 +0100

Pass --en-/disable-werror into external/libnumbertext

(which otherwise always defaults to --enable-werror)

Change-Id: I928277cec62dd36da0b18eb622ee91c176c9ccc6
Reviewed-on: https://gerrit.libreoffice.org/65072
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/libnumbertext/ExternalProject_libnumbertext.mk 
b/external/libnumbertext/ExternalProject_libnumbertext.mk
index b12012e16577..679772700aad 100644
--- a/external/libnumbertext/ExternalProject_libnumbertext.mk
+++ b/external/libnumbertext/ExternalProject_libnumbertext.mk
@@ -34,6 +34,7 @@ $(call 
gb_ExternalProject_get_state_target,libnumbertext,build):
LIBS="$(gb_STDLIBS) $(LIBS)" \
$(SHELL) ./configure --disable-shared --with-pic \
$(if 
$(verbose),--disable-silent-rules,--enable-silent-rules) \
+   $(if $(ENABLE_WERROR),--enable-werror,--disable-werror) 
\
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) 
--host=$(HOST_PLATFORM))\
$(if $(filter 
AIX,$(OS)),CFLAGS="-D_LINUX_SOURCE_COMPAT") \
$(if 
$(libnumbertext_CPPFLAGS),CPPFLAGS='$(libnumbertext_CPPFLAGS)') \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/libnumbertext

2018-12-06 Thread Libreoffice Gerrit user
 external/libnumbertext/ExternalProject_libnumbertext.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 82af7584dcfe78b2242b3611bc00375871093189
Author: Stephan Bergmann 
AuthorDate: Thu Dec 6 15:31:13 2018 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Dec 6 23:17:28 2018 +0100

Typo causing external/libnumbertext to always use $(gb_COMPILERNOOPTFLAGS)

...ever since f1579d3d6c5f5f3a651825e035b93bee7a4f43c6 "tdf#117171 support
localized number name numbering styles"

Change-Id: I93dcfa9f1310b35e3068a7e0efdce258364a7d78
Reviewed-on: https://gerrit.libreoffice.org/64720
Reviewed-by: László Németh 
Tested-by: László Németh 
Tested-by: Jenkins

diff --git a/external/libnumbertext/ExternalProject_libnumbertext.mk 
b/external/libnumbertext/ExternalProject_libnumbertext.mk
index 2b899c63d132..b12012e16577 100644
--- a/external/libnumbertext/ExternalProject_libnumbertext.mk
+++ b/external/libnumbertext/ExternalProject_libnumbertext.mk
@@ -37,7 +37,7 @@ $(call 
gb_ExternalProject_get_state_target,libnumbertext,build):
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) 
--host=$(HOST_PLATFORM))\
$(if $(filter 
AIX,$(OS)),CFLAGS="-D_LINUX_SOURCE_COMPAT") \
$(if 
$(libnumbertext_CPPFLAGS),CPPFLAGS='$(libnumbertext_CPPFLAGS)') \
-   CXXFLAGS="$(libnumbertext_CXXFLAGS) $(if 
$(ENABLE_OPTIMIZED) $(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) $(if 
$(debug),$(gb_DEBUGINFO_FLAGS) $(gb_DEBUG_CXXFLAGS)) $(gb_VISIBILITY_FLAGS) 
$(gb_VISIBILITY_FLAGS_CXX)" \
+   CXXFLAGS="$(libnumbertext_CXXFLAGS) $(if 
$(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) $(if 
$(debug),$(gb_DEBUGINFO_FLAGS) $(gb_DEBUG_CXXFLAGS)) $(gb_VISIBILITY_FLAGS) 
$(gb_VISIBILITY_FLAGS_CXX)" \
&& cd src && $(MAKE) \
)
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/libnumbertext

2018-11-01 Thread Libreoffice Gerrit user
 external/libnumbertext/0001-Don-t-depend-on-en_US.UTF-8-locale.patch |   55 
++
 external/libnumbertext/UnpackedTarball_libnumbertext.mk  |8 +
 2 files changed, 63 insertions(+)

New commits:
commit cfdcb1bb0cf3a9fa2b342109cd581d3211e965bf
Author: Stephan Bergmann 
AuthorDate: Wed Oct 31 21:01:04 2018 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Nov 1 08:19:26 2018 +0100

external/libnumbertext: Don't depend on en_US.UTF-8 locale

Change-Id: I1c8db3d16547d8891835d0e8e849a1f53335dbf1
Reviewed-on: https://gerrit.libreoffice.org/62711
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git 
a/external/libnumbertext/0001-Don-t-depend-on-en_US.UTF-8-locale.patch 
b/external/libnumbertext/0001-Don-t-depend-on-en_US.UTF-8-locale.patch
new file mode 100644
index ..4a454a098007
--- /dev/null
+++ b/external/libnumbertext/0001-Don-t-depend-on-en_US.UTF-8-locale.patch
@@ -0,0 +1,55 @@
+From 59a04cb70b261ad77baf671d5059a836ba339bbd Mon Sep 17 00:00:00 2001
+From: Stephan Bergmann 
+Date: Tue, 30 Oct 2018 13:51:02 +0100
+Subject: [PATCH] Don't depend on en_US.UTF-8 locale
+
+Instead, create locale with codecvt_utf8 facet on all platforms (even if
+codecvt_utf8 is deprecated since C++17).  There is no guarantee that
+"en_US.UTF-8" is a supported locale name, so the locale constructor might throw
+a runtime_error.  (See the discussion in the comments to
+ "Add check for en_US.utf8 locale"
+for a real-live example of issues caused by that.)
+
+(And the  and  headers apparently need to be included always,
+regardless of NUMBERTEXT_BOOST.)
+---
+ src/Numbertext.cxx | 8 ++--
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/src/Numbertext.cxx b/src/Numbertext.cxx
+index 8cf5198..5f05b48 100644
+--- a/src/Numbertext.cxx
 b/src/Numbertext.cxx
+@@ -2,6 +2,8 @@
+  * 2018 (c) László Németh
+  * License: LGPL/BSD dual license */
+ 
++#include 
++#include 
+ #include 
+ #include 
+ 
+@@ -11,8 +13,6 @@
+   #include 
+   using namespace boost;
+ #else
+-  #include 
+-  #include 
+   using namespace std;
+ #endif
+ 
+@@ -25,11 +25,7 @@ bool readfile(const std::string& filename, std::wstring& 
result)
+ std::wifstream wif(filename);
+ if (wif.fail())
+ return false;
+-#ifdef _MSC_VER
+ wif.imbue(std::locale(std::locale(), new std::codecvt_utf8));
+-#else
+-wif.imbue(std::locale("en_US.UTF-8"));
+-#endif
+ std::wstringstream wss;
+ wss << wif.rdbuf();
+ result = wss.str();
+-- 
+2.19.1
+
diff --git a/external/libnumbertext/UnpackedTarball_libnumbertext.mk 
b/external/libnumbertext/UnpackedTarball_libnumbertext.mk
index ac2a14133205..67b147393e31 100644
--- a/external/libnumbertext/UnpackedTarball_libnumbertext.mk
+++ b/external/libnumbertext/UnpackedTarball_libnumbertext.mk
@@ -13,4 +13,12 @@ $(eval $(call 
gb_UnpackedTarball_set_tarball,libnumbertext,$(LIBNUMBERTEXT_TARBA
 
 $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libnumbertext))
 
+$(eval $(call gb_UnpackedTarball_set_patchlevel,libnumbertext,1))
+
+# external/libnumbertext/0001-Don-t-depend-on-en_US.UTF-8-locale.patch is 
upstream at
+#  :
+$(eval $(call gb_UnpackedTarball_add_patches,libnumbertext, \
+external/libnumbertext/0001-Don-t-depend-on-en_US.UTF-8-locale.patch \
+))
+
 # vim: set noet sw=4 ts=4:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/libnumbertext

2018-06-30 Thread Christian Lohmaier
 external/libnumbertext/ExternalProject_libnumbertext.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 044b73b2adcbd739a186ddaea5830db7ff605f09
Author: Christian Lohmaier 
Date:   Sat Jun 30 08:41:01 2018 +0200

libnumbertext: off-by-one in makefile rule (LIB=.. ineffective)

autoreconf line doesn't need it, it is the configure one that should
make use of it..

Change-Id: I1d7b492a8d99f8fbcb8443de7a7def2caaf8df3b
Reviewed-on: https://gerrit.libreoffice.org/56745
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/external/libnumbertext/ExternalProject_libnumbertext.mk 
b/external/libnumbertext/ExternalProject_libnumbertext.mk
index 9320c62dcfee..c36336ae52bf 100644
--- a/external/libnumbertext/ExternalProject_libnumbertext.mk
+++ b/external/libnumbertext/ExternalProject_libnumbertext.mk
@@ -30,8 +30,8 @@ $(call 
gb_ExternalProject_get_state_target,libnumbertext,build):
$(call gb_ExternalProject_run,build,\
$(if $(libnumbertext_LIBS),LIBS='$(libnumbertext_LIBS)') \
$(if $(filter IOS MACOSX,$(OS)),ACLOCAL="aclocal -I 
$(SRCDIR)/m4/mac") \
-   LIBS="$(gb_STDLIBS) $(LIBS)" \
autoreconf && \
+   LIBS="$(gb_STDLIBS) $(LIBS)" \
$(SHELL) ./configure --disable-shared --with-pic \
$(if 
$(verbose),--disable-silent-rules,--enable-silent-rules) \
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) 
--host=$(HOST_PLATFORM))\
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/libnumbertext

2018-05-08 Thread Stephan Bergmann
 external/libnumbertext/ExternalProject_libnumbertext.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 18e2ee154ac3af88cb800a548dc24b87947ff937
Author: Stephan Bergmann 
Date:   Mon May 7 19:29:26 2018 +0200

Pass visibility flags into external/libnumbertext

Change-Id: I55d4b9d29e262138626fc71931088d75f652b8c2
Reviewed-on: https://gerrit.libreoffice.org/53941
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/external/libnumbertext/ExternalProject_libnumbertext.mk 
b/external/libnumbertext/ExternalProject_libnumbertext.mk
index 8d473632bee4..9320c62dcfee 100644
--- a/external/libnumbertext/ExternalProject_libnumbertext.mk
+++ b/external/libnumbertext/ExternalProject_libnumbertext.mk
@@ -37,7 +37,7 @@ $(call 
gb_ExternalProject_get_state_target,libnumbertext,build):
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) 
--host=$(HOST_PLATFORM))\
$(if $(filter 
AIX,$(OS)),CFLAGS="-D_LINUX_SOURCE_COMPAT") \
$(if 
$(libnumbertext_CPPFLAGS),CPPFLAGS='$(libnumbertext_CPPFLAGS)') \
-   CXXFLAGS="$(libnumbertext_CXXFLAGS) $(if 
$(ENABLE_OPTIMIZED) $(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) $(if 
$(debug),$(gb_DEBUGINFO_FLAGS) $(gb_DEBUG_CXXFLAGS))" \
+   CXXFLAGS="$(libnumbertext_CXXFLAGS) $(if 
$(ENABLE_OPTIMIZED) $(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) $(if 
$(debug),$(gb_DEBUGINFO_FLAGS) $(gb_DEBUG_CXXFLAGS)) $(gb_VISIBILITY_FLAGS) 
$(gb_VISIBILITY_FLAGS_CXX)" \
&& cd src && $(MAKE) \
)
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/libnumbertext

2018-05-04 Thread Stephan Bergmann
 external/libnumbertext/UnpackedTarball_libnumbertext.mk |6 ++
 external/libnumbertext/configure.patch  |   10 ++
 2 files changed, 16 insertions(+)

New commits:
commit d59760428669a3e6b90524b9bc52829ece539c80
Author: Stephan Bergmann 
Date:   Thu May 3 16:54:11 2018 +0200

Allow actually passing CXXFLAGS into external/libnumbertext

...as external/libnumbertext/ExternalProject_libnumbertext.mk tried to do

Change-Id: I8c0deeaa1db31fc0ab5042c7f8a1ced0d65e29ee
Reviewed-on: https://gerrit.libreoffice.org/53806
Reviewed-by: László Németh 
Tested-by: Jenkins 

diff --git a/external/libnumbertext/UnpackedTarball_libnumbertext.mk 
b/external/libnumbertext/UnpackedTarball_libnumbertext.mk
index ac2a14133205..f5c1607562e3 100644
--- a/external/libnumbertext/UnpackedTarball_libnumbertext.mk
+++ b/external/libnumbertext/UnpackedTarball_libnumbertext.mk
@@ -13,4 +13,10 @@ $(eval $(call 
gb_UnpackedTarball_set_tarball,libnumbertext,$(LIBNUMBERTEXT_TARBA
 
 $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libnumbertext))
 
+$(eval $(call gb_UnpackedTarball_set_patchlevel,libnumbertext,0))
+
+$(eval $(call gb_UnpackedTarball_add_patches,libnumbertext, \
+external/libnumbertext/configure.patch \
+))
+
 # vim: set noet sw=4 ts=4:
diff --git a/external/libnumbertext/configure.patch 
b/external/libnumbertext/configure.patch
new file mode 100644
index ..f31ab31cdc57
--- /dev/null
+++ b/external/libnumbertext/configure.patch
@@ -0,0 +1,10 @@
+--- configure.ac
 configure.ac
+@@ -22,7 +22,6 @@
+ 
+ dnl Checks for typedefs, structures, and compiler characteristics.
+ AC_LANG([C++])
+-CXXFLAGS='-Wall -std=c++11'
+ 
+ AC_CHECK_HEADERS([codecvt regex])
+ 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/libnumbertext

2018-05-03 Thread Stephan Bergmann
 external/libnumbertext/ExternalProject_libnumbertext.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 55fcb23ea5caa509d8254910c581d234f7ec9199
Author: Stephan Bergmann 
Date:   Thu May 3 15:48:07 2018 +0200

Tunnel verbose=t into external/libnumbertext

Change-Id: Ibbd16c11140308d256cde5e23d7304ca304ac4c1
Reviewed-on: https://gerrit.libreoffice.org/53795
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/external/libnumbertext/ExternalProject_libnumbertext.mk 
b/external/libnumbertext/ExternalProject_libnumbertext.mk
index 04b957667ae6..8d473632bee4 100644
--- a/external/libnumbertext/ExternalProject_libnumbertext.mk
+++ b/external/libnumbertext/ExternalProject_libnumbertext.mk
@@ -33,6 +33,7 @@ $(call 
gb_ExternalProject_get_state_target,libnumbertext,build):
LIBS="$(gb_STDLIBS) $(LIBS)" \
autoreconf && \
$(SHELL) ./configure --disable-shared --with-pic \
+   $(if 
$(verbose),--disable-silent-rules,--enable-silent-rules) \
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) 
--host=$(HOST_PLATFORM))\
$(if $(filter 
AIX,$(OS)),CFLAGS="-D_LINUX_SOURCE_COMPAT") \
$(if 
$(libnumbertext_CPPFLAGS),CPPFLAGS='$(libnumbertext_CPPFLAGS)') \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits