summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-04-28 14:31:31 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-04-28 14:36:14 +0100
commit3d0cbe3e7bff402f2626deb94274c0fef40e4bde (patch)
treeb7b93ef6a778f9d784ecfdc9d408ae8cf9935ad2 /external
parent96f36a9a4d56bc1f09a6ae0257dbbea1ce315d62 (diff)
try without iconv, we probably don't need it in practice
Change-Id: I14782971dd35f8d96f1e9b08fdf060aa917a1e37
Diffstat (limited to 'external')
-rw-r--r--external/boost/StaticLibrary_boost_locale.mk8
-rw-r--r--external/boost/UnpackedTarball_boost.mk2
-rw-r--r--external/boost/boost.noiconv.patch51
3 files changed, 53 insertions, 8 deletions
diff --git a/external/boost/StaticLibrary_boost_locale.mk b/external/boost/StaticLibrary_boost_locale.mk
index 9f9338c69984..c08d6f8b7b06 100644
--- a/external/boost/StaticLibrary_boost_locale.mk
+++ b/external/boost/StaticLibrary_boost_locale.mk
@@ -18,14 +18,6 @@ $(eval $(call gb_StaticLibrary_add_defs,boost_locale,\
-DBOOST_ALL_NO_LIB -DBOOST_LOCALE_NO_WINAPI_BACKEND -DBOOST_LOCALE_NO_POSIX_BACKEND \
))
-ifneq ($(OS),WNT)
-
-$(eval $(call gb_StaticLibrary_add_defs,boost_locale,\
- -DBOOST_LOCALE_WITH_ICONV \
-))
-
-endif
-
$(eval $(call gb_StaticLibrary_use_external,boost_locale,boost_headers))
$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,boost_locale,cpp))
diff --git a/external/boost/UnpackedTarball_boost.mk b/external/boost/UnpackedTarball_boost.mk
index 813e663c2a34..efd23d317098 100644
--- a/external/boost/UnpackedTarball_boost.mk
+++ b/external/boost/UnpackedTarball_boost.mk
@@ -24,6 +24,8 @@ boost_patches += boost.type_index.Wundef.warnings.patch
boost_patches += boost.auto_link.patch
+boost_patches += boost.noiconv.patch
+
boost_patches += ubsan.patch.0
boost_patches += rtti.patch.0
diff --git a/external/boost/boost.noiconv.patch b/external/boost/boost.noiconv.patch
new file mode 100644
index 000000000000..5ea0aab385a8
--- /dev/null
+++ b/external/boost/boost.noiconv.patch
@@ -0,0 +1,51 @@
+diff -ru boost.orig/boost/libs/locale/src/encoding/codepage.cpp boost/boost/libs/locale/src/encoding/codepage.cpp
+--- foo/misc/boost.orig/libs/locale/src/encoding/codepage.cpp
++++ foo/misc/boost/libs/locale/src/encoding/codepage.cpp
+@@ -39,6 +39,7 @@
+ char const *from_charset,
+ method_type how)
+ {
++ #if defined(BOOST_LOCALE_WITH_ICONV) || defined(BOOST_LOCALE_WITH_ICU) || defined(BOOST_LOCALE_WITH_WCONV)
+ std::auto_ptr<converter_between> cvt;
+ #ifdef BOOST_LOCALE_WITH_ICONV
+ cvt.reset(new iconv_between());
+@@ -55,6 +56,7 @@
+ if(cvt->open(to_charset,from_charset,how))
+ return cvt->convert(begin,end);
+ #endif
++ #endif
+ throw invalid_charset_error(std::string(to_charset) + " or " + from_charset);
+ }
+
+@@ -65,6 +67,7 @@
+ char const *charset,
+ method_type how)
+ {
++ #if defined(BOOST_LOCALE_WITH_ICONV) || defined(BOOST_LOCALE_WITH_ICU) || defined(BOOST_LOCALE_WITH_WCONV)
+ std::auto_ptr<converter_to_utf<CharType> > cvt;
+ #ifdef BOOST_LOCALE_WITH_ICONV
+ cvt.reset(new iconv_to_utf<CharType>());
+@@ -81,6 +84,7 @@
+ if(cvt->open(charset,how))
+ return cvt->convert(begin,end);
+ #endif
++ #endif
+ throw invalid_charset_error(charset);
+ }
+
+@@ -91,6 +95,7 @@
+ char const *charset,
+ method_type how)
+ {
++ #if defined(BOOST_LOCALE_WITH_ICONV) || defined(BOOST_LOCALE_WITH_ICU) || defined(BOOST_LOCALE_WITH_WCONV)
+ std::auto_ptr<converter_from_utf<CharType> > cvt;
+ #ifdef BOOST_LOCALE_WITH_ICONV
+ cvt.reset(new iconv_from_utf<CharType>());
+@@ -107,6 +112,7 @@
+ if(cvt->open(charset,how))
+ return cvt->convert(begin,end);
+ #endif
++ #endif
+ throw invalid_charset_error(charset);
+ }
+