summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2006-06-25 20:49:56 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2006-06-25 20:49:56 +0000
commita494a2222d9a84f217788532305e25e1c32989b3 (patch)
tree6accb9280c0d43a2c4dfe9da45429e65c9df1219 /app-dicts/kasumi
parentAdded ~x86-fbsd keyword. (diff)
downloadgentoo-2-a494a2222d9a84f217788532305e25e1c32989b3.tar.gz
gentoo-2-a494a2222d9a84f217788532305e25e1c32989b3.tar.bz2
gentoo-2-a494a2222d9a84f217788532305e25e1c32989b3.zip
Add a few patches to fix nls handling, warnings and FreeBSD/non-Gnu support; add dependency on virtual/libiconv.
(Portage version: 2.1.1_pre1-r2)
Diffstat (limited to 'app-dicts/kasumi')
-rw-r--r--app-dicts/kasumi/ChangeLog9
-rw-r--r--app-dicts/kasumi/files/kasumi-2.0-fbsd.patch51
-rw-r--r--app-dicts/kasumi/files/kasumi-2.0-format.patch22
-rw-r--r--app-dicts/kasumi/files/kasumi-2.0-nls.patch70
-rw-r--r--app-dicts/kasumi/files/kasumi-2.0-virtual-destructors.patch24
-rw-r--r--app-dicts/kasumi/kasumi-2.0.ebuild11
6 files changed, 184 insertions, 3 deletions
diff --git a/app-dicts/kasumi/ChangeLog b/app-dicts/kasumi/ChangeLog
index 7fd5fe32fe51..a67b1a85be81 100644
--- a/app-dicts/kasumi/ChangeLog
+++ b/app-dicts/kasumi/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-dicts/kasumi
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-dicts/kasumi/ChangeLog,v 1.20 2006/06/23 18:46:45 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-dicts/kasumi/ChangeLog,v 1.21 2006/06/25 20:49:55 flameeyes Exp $
+
+ 25 Jun 2006; Diego Pettenò <flameeyes@gentoo.org>
+ +files/kasumi-2.0-fbsd.patch, +files/kasumi-2.0-format.patch,
+ +files/kasumi-2.0-nls.patch, +files/kasumi-2.0-virtual-destructors.patch,
+ kasumi-2.0.ebuild:
+ Add a few patches to fix nls handling, warnings and FreeBSD/non-Gnu support;
+ add dependency on virtual/libiconv.
23 Jun 2006; Diego Pettenò <flameeyes@gentoo.org> kasumi-2.0.ebuild:
Fix quoting, add die messages, use emake for install, add missing dependency
diff --git a/app-dicts/kasumi/files/kasumi-2.0-fbsd.patch b/app-dicts/kasumi/files/kasumi-2.0-fbsd.patch
new file mode 100644
index 000000000000..762570a93f09
--- /dev/null
+++ b/app-dicts/kasumi/files/kasumi-2.0-fbsd.patch
@@ -0,0 +1,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);
+ }
+
diff --git a/app-dicts/kasumi/files/kasumi-2.0-format.patch b/app-dicts/kasumi/files/kasumi-2.0-format.patch
new file mode 100644
index 000000000000..87c1182b1eb4
--- /dev/null
+++ b/app-dicts/kasumi/files/kasumi-2.0-format.patch
@@ -0,0 +1,22 @@
+Index: kasumi-2.0/KasumiException.cxx
+===================================================================
+--- kasumi-2.0.orig/KasumiException.cxx
++++ kasumi-2.0/KasumiException.cxx
+@@ -47,7 +47,7 @@ void handleException(KasumiException e){
+ (GtkDialogFlags)0,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_CLOSE,
+- e.getMessage().c_str());
++ "%s", e.getMessage().c_str());
+ gtk_dialog_run(GTK_DIALOG (dialog));
+ gtk_widget_destroy(dialog);
+ break;
+@@ -56,7 +56,7 @@ void handleException(KasumiException e){
+ (GtkDialogFlags)0,
+ GTK_MESSAGE_WARNING,
+ GTK_BUTTONS_OK,
+- e.getMessage().c_str());
++ "%s", e.getMessage().c_str());
+ gtk_dialog_run(GTK_DIALOG (dialog));
+ gtk_widget_destroy(dialog);
+ break;
diff --git a/app-dicts/kasumi/files/kasumi-2.0-nls.patch b/app-dicts/kasumi/files/kasumi-2.0-nls.patch
new file mode 100644
index 000000000000..0d28557b4b81
--- /dev/null
+++ b/app-dicts/kasumi/files/kasumi-2.0-nls.patch
@@ -0,0 +1,70 @@
+Index: kasumi-2.0/configure.in
+===================================================================
+--- kasumi-2.0.orig/configure.in
++++ kasumi-2.0/configure.in
+@@ -1,5 +1,5 @@
+ dnl Process this file with autoconf to produce a configure script.
+-AC_INIT(main.cxx)
++AC_INIT(main.cxx, 2.0)
+ AM_INIT_AUTOMAKE(kasumi, 2.0)
+ AM_CONFIG_HEADER(config.h)
+
+@@ -10,14 +10,6 @@ AC_PROG_CXX
+ dnl Checks for gettext
+ ALL_LINGUAS="ja"
+ AM_GNU_GETTEXT
+-LDFLAGS="$LDFLAGS $INTLLIBS"
+-localedir='${prefix}/share/locale'
+-AC_SUBST(localedir)
+-AC_DEFINE(HAVE_CATGETS, 1,Define as 1 if you have catgets and don't want to use GNU gettext.)
+-AC_DEFINE(HAVE_GETTEXT, 1, Define as 1 if you have GNU gettext.)
+-AC_DEFINE(HAVE_LC_MESSAGES, 1, Define as 1 if you have LC_MESSAGES.)
+-AC_DEFINE(HAVE_STPCPY, 1, Define as 1 if you have stpcpy() function.)
+-AC_DEFINE(ENABLE_NLS, 1, Define as 1 if you want to use NLS.)
+
+ 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/main.cxx
+===================================================================
+--- kasumi-2.0.orig/main.cxx
++++ kasumi-2.0/main.cxx
+@@ -185,11 +185,13 @@ int main(int argc, char *argv[])
+ {
+ gtk_init(&argc, &argv);
+
++#ifdef ENABLE_NLS
+ // for gettext
+ setlocale(LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ bind_textdomain_codeset(PACKAGE, "UTF-8");
+ textdomain(PACKAGE);
++#endif
+
+ GtkWidget *server = check_duplicated_process (argc, argv);
+ if (!server)
+Index: kasumi-2.0/Makefile.am
+===================================================================
+--- kasumi-2.0.orig/Makefile.am
++++ kasumi-2.0/Makefile.am
+@@ -13,10 +13,13 @@ kasumi_SOURCES = main.cxx intl.h \
+ KasumiConfiguration.cxx KasumiConfiguration.hxx \
+ cellrendererspin.c cellrendererspin.h \
+ kasumi.png
++kasumi_LDADD = $(INTLLIBS)
+
+ pkgdata_DATA = kasumi.png
+
+-AM_CPPFLAGS=-DLOCALEDIR='"$(localedir)"'
++localedir = $(datadir)/locale
++
++AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\"
+ SUBDIRS = intl m4 po
+
+ ACLOCAL_AMFLAGS = -I m4
+Index: kasumi-2.0/acconfig.h
+===================================================================
+--- kasumi-2.0.orig/acconfig.h
++++ /dev/null
+@@ -1,2 +0,0 @@
+-#undef PACKAGE
+-#undef VERSION
diff --git a/app-dicts/kasumi/files/kasumi-2.0-virtual-destructors.patch b/app-dicts/kasumi/files/kasumi-2.0-virtual-destructors.patch
new file mode 100644
index 000000000000..d307df901ba8
--- /dev/null
+++ b/app-dicts/kasumi/files/kasumi-2.0-virtual-destructors.patch
@@ -0,0 +1,24 @@
+Index: kasumi-2.0/KasumiDicEventListener.hxx
+===================================================================
+--- kasumi-2.0.orig/KasumiDicEventListener.hxx
++++ kasumi-2.0/KasumiDicEventListener.hxx
+@@ -35,6 +35,7 @@
+ class KasumiDicEventListener{
+ private:
+ public:
++ virtual ~KasumiDicEventListener() { };
+ virtual void removedWord(size_t id) = 0;
+ virtual void appendedWord(KasumiWord *word) = 0;
+ virtual void modifiedWord(KasumiWord *word) = 0;
+Index: kasumi-2.0/KasumiWordEventListener.hxx
+===================================================================
+--- kasumi-2.0.orig/KasumiWordEventListener.hxx
++++ kasumi-2.0/KasumiWordEventListener.hxx
+@@ -37,6 +37,7 @@ class KasumiWord;
+ class KasumiWordEventListener{
+ private:
+ public:
++ virtual ~KasumiWordEventListener() { }
+ virtual void changedFrequency(KasumiWord *word) = 0;
+ virtual void changedSpelling(KasumiWord *word) = 0;
+ virtual void changedSound(KasumiWord *word) = 0;
diff --git a/app-dicts/kasumi/kasumi-2.0.ebuild b/app-dicts/kasumi/kasumi-2.0.ebuild
index 7976557324b1..4e111904c242 100644
--- a/app-dicts/kasumi/kasumi-2.0.ebuild
+++ b/app-dicts/kasumi/kasumi-2.0.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-dicts/kasumi/kasumi-2.0.ebuild,v 1.2 2006/06/23 18:46:45 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-dicts/kasumi/kasumi-2.0.ebuild,v 1.3 2006/06/25 20:49:55 flameeyes Exp $
-inherit eutils
+inherit eutils autotools
DESCRIPTION="Anthy dictionary maintenance tool"
HOMEPAGE="http://kasumi.sourceforge.jp/"
@@ -20,6 +20,7 @@ RDEPEND=">=x11-libs/gtk+-2.2
>=dev-libs/expat-1.95
>=x11-libs/pango-1.2
nls? ( virtual/libintl )
+ virtual/libiconv
app-i18n/anthy"
DEPEND="${RDEPEND}
@@ -29,6 +30,12 @@ src_unpack() {
unpack ${A}
cd "${S}"
epatch "${FILESDIR}/${P}-gcc41.patch"
+ epatch "${FILESDIR}/${P}-nls.patch"
+ epatch "${FILESDIR}/${P}-virtual-destructors.patch"
+ epatch "${FILESDIR}/${P}-format.patch"
+ epatch "${FILESDIR}/${P}-fbsd.patch"
+
+ eautoreconf
}
src_compile() {