summaryrefslogtreecommitdiff
blob: 762570a93f09d67207585d24cba7c3167757e7c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Index: kasumi-2.0/configure.in
===================================================================
--- kasumi-2.0.orig/configure.in
+++ kasumi-2.0/configure.in
@@ -10,6 +10,11 @@ AC_PROG_CXX
 dnl Checks for gettext
 ALL_LINGUAS="ja"
 AM_GNU_GETTEXT
+AM_ICONV
+
+if test "x$am_cv_func_iconv" != "xyes"; then
+	AC_MSG_ERROR([Unable to find iconv(). iconv() is needed for Kasumi])
+fi
 
 dnl Checks for libraries.
 AM_PATH_GTK_2_0(2.4.0, CFLAGS="$CFLAGS $GTK_CFLAGS" CPPFLAGS="$CPPFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS", AC_MSG_ERROR(GTK+ 2.0 not found.))
Index: kasumi-2.0/Makefile.am
===================================================================
--- kasumi-2.0.orig/Makefile.am
+++ kasumi-2.0/Makefile.am
@@ -13,7 +13,7 @@ kasumi_SOURCES = main.cxx intl.h \
 		 KasumiConfiguration.cxx KasumiConfiguration.hxx \
 		cellrendererspin.c cellrendererspin.h \
                  kasumi.png
-kasumi_LDADD = $(INTLLIBS)
+kasumi_LDADD = $(INTLLIBS) $(LTLIBICONV)
 
 pkgdata_DATA = kasumi.png
 
Index: kasumi-2.0/KasumiWord.cxx
===================================================================
--- kasumi-2.0.orig/KasumiWord.cxx
+++ kasumi-2.0/KasumiWord.cxx
@@ -53,7 +53,7 @@ string KasumiWord::convertUTF8ToEUCJP(co
     char *eucjp_buf = (char*)malloc(len_eucjp);
     char *eucjp = eucjp_buf;
 
-    iconv(IconvUTF8_To_EUCJP, &utf8, &len, &eucjp_buf, &len_eucjp);
+    iconv(IconvUTF8_To_EUCJP, const_cast<const char**>(&utf8), &len, &eucjp_buf, &len_eucjp);
     return string(eucjp);
 }
 
@@ -65,7 +65,7 @@ string KasumiWord::convertEUCJPToUTF8(co
     char *utf8_buf = (char*)malloc(len_utf8);
     char *utf8 = utf8_buf;
 
-    iconv(IconvEUCJP_To_UTF8, &eucjp, &len, &utf8_buf, &len_utf8);
+    iconv(IconvEUCJP_To_UTF8, const_cast<const char**>(&eucjp), &len, &utf8_buf, &len_utf8);
     return string(utf8);
 }