summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059>2010-06-19 16:39:24 +0800
committerkwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059>2010-06-19 16:39:24 +0800
commitbe4fb4ebe8e7f94f87a7f6b6f225675d0e5b65a4 (patch)
tree9377f2e77c6ab91412c76c1459720a1373949f93
parentdda63ab17f152501e1dc193bb336ea7992c0267c (diff)
downloadmarcuscom-ports-be4fb4ebe8e7f94f87a7f6b6f225675d0e5b65a4.tar
marcuscom-ports-be4fb4ebe8e7f94f87a7f6b6f225675d0e5b65a4.tar.gz
marcuscom-ports-be4fb4ebe8e7f94f87a7f6b6f225675d0e5b65a4.tar.bz2
marcuscom-ports-be4fb4ebe8e7f94f87a7f6b6f225675d0e5b65a4.tar.lz
marcuscom-ports-be4fb4ebe8e7f94f87a7f6b6f225675d0e5b65a4.tar.xz
marcuscom-ports-be4fb4ebe8e7f94f87a7f6b6f225675d0e5b65a4.tar.zst
marcuscom-ports-be4fb4ebe8e7f94f87a7f6b6f225675d0e5b65a4.zip
Use propper patch, from upstream.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@14257 df743ca5-7f9a-e211-a948-0013205c9059
-rw-r--r--devel/glibmm/Makefile4
-rw-r--r--devel/glibmm/files/patch-glib_glibmm_ustring.cc47
2 files changed, 31 insertions, 20 deletions
diff --git a/devel/glibmm/Makefile b/devel/glibmm/Makefile
index 776dac846..bdf813467 100644
--- a/devel/glibmm/Makefile
+++ b/devel/glibmm/Makefile
@@ -3,12 +3,12 @@
# Whom: Adam Weinberger <adamw@FreeBSD.org>
#
# $FreeBSD$
-# $MCom$
+# $MCom: ports/devel/glibmm/Makefile,v 1.92 2010/06/18 20:09:31 kwm Exp $
#
PORTNAME= glibmm
PORTVERSION= 2.25.2
-PORTREVISION?= 0
+PORTREVISION?= 1
PORTEPOCH= 1
CATEGORIES= devel
MASTER_SITES= GNOME
diff --git a/devel/glibmm/files/patch-glib_glibmm_ustring.cc b/devel/glibmm/files/patch-glib_glibmm_ustring.cc
index dbcfc7dde..7d63f5029 100644
--- a/devel/glibmm/files/patch-glib_glibmm_ustring.cc
+++ b/devel/glibmm/files/patch-glib_glibmm_ustring.cc
@@ -1,20 +1,31 @@
---- glib/glibmm/ustring.cc.orig 2010-06-18 21:49:11.000000000 +0200
-+++ glib/glibmm/ustring.cc 2010-06-18 22:03:33.000000000 +0200
-@@ -1361,7 +1361,7 @@
- Glib::Error::throw_exception(error);
- }
+--- glib/glibmm/ustring.cc.orig 2010-06-01 15:36:11.000000000 +0200
++++ glib/glibmm/ustring.cc 2010-06-19 09:44:25.000000000 +0200
+@@ -1354,7 +1354,12 @@ std::wistream& operator>>(std::wistream&
+ glong n_bytes = 0;
+ const ScopedPtr<char> buf (g_utf16_to_utf8(reinterpret_cast<const gunichar2*>(wstr.data()),
+ wstr.size(), 0, &n_bytes, &error));
+-#endif //GLIBMM_EXCEPTIONS_ENABLED
++#else
++ gsize n_bytes = 0;
++ const ScopedPtr<char> buf (g_convert(reinterpret_cast<const char*>(wstr.data()),
++ wstr.size() * sizeof(std::wstring::value_type),
++ "UTF-8", "WCHAR_T", 0, &n_bytes, &error));
++#endif // !(__STDC_ISO_10646__ || G_OS_WIN32)
-- utf8_string.assign(buf.get(), buf.get() + n_bytes);
-+// utf8_string.assign(buf.get(), buf.get() + n_bytes);
+ if (error)
+ {
+@@ -1378,7 +1383,13 @@ std::wostream& operator<<(std::wostream&
+ // Avoid going through iconv if wchar_t always contains UTF-16.
+ const ScopedPtr<gunichar2> buf (g_utf8_to_utf16(utf8_string.raw().data(),
+ utf8_string.raw().size(), 0, 0, &error));
+-#endif //GLIBMM_EXCEPTIONS_ENABLED
++#else
++ // TODO: For some reason the conversion from UTF-8 to WCHAR_T doesn't work
++ // with g_convert(), while iconv on the command line handles it just fine.
++ // Maybe a bug in GLib?
++ const ScopedPtr<char> buf (g_convert(utf8_string.raw().data(), utf8_string.raw().size(),
++ "WCHAR_T", "UTF-8", 0, 0, &error));
++#endif // !(__STDC_ISO_10646__ || G_OS_WIN32)
- return is;
- }
-@@ -1392,7 +1392,7 @@
- // NUL. Given this, there doesn't seem much of a point in allowing NUL in
- // formatted output. The semantics would be unclear anyway: what's the
- // screen width of a NUL?
-- os << reinterpret_cast<wchar_t*>(buf.get());
-+// os << reinterpret_cast<wchar_t*>(buf.get());
-
- return os;
- }
+ if (error)
+ {