diff options
author | Wulf Krueger <philantrop@gentoo.org> | 2007-09-02 18:47:03 +0000 |
---|---|---|
committer | Wulf Krueger <philantrop@gentoo.org> | 2007-09-02 18:47:03 +0000 |
commit | 650352c0393e263d2b6560b5f26256168b4baadf (patch) | |
tree | 6c0060def894fa8370cfed41bdb6f6b4839e02f1 /dev-libs | |
parent | Version bump #191078 by Lexinton Luthor. (diff) | |
download | gentoo-2-650352c0393e263d2b6560b5f26256168b4baadf.tar.gz gentoo-2-650352c0393e263d2b6560b5f26256168b4baadf.tar.bz2 gentoo-2-650352c0393e263d2b6560b5f26256168b4baadf.zip |
Initial ebuild as per bug 81423. Thanks to all who helped!
(Portage version: 2.1.3.7)
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/libtranslate/ChangeLog | 15 | ||||
-rw-r--r-- | dev-libs/libtranslate/Manifest | 46 | ||||
-rw-r--r-- | dev-libs/libtranslate/files/digest-libtranslate-0.99 | 3 | ||||
-rw-r--r-- | dev-libs/libtranslate/files/libtranslate-0.99-charsetparse.diff | 48 | ||||
-rw-r--r-- | dev-libs/libtranslate/files/libtranslate-0.99-condfix.diff | 39 | ||||
-rw-r--r-- | dev-libs/libtranslate/files/libtranslate-0.99-int64.diff | 12 | ||||
-rw-r--r-- | dev-libs/libtranslate/files/libtranslate-0.99-man-page.diff | 12 | ||||
-rw-r--r-- | dev-libs/libtranslate/files/libtranslate_0.99-0ubuntu3.diff | 284 | ||||
-rw-r--r-- | dev-libs/libtranslate/libtranslate-0.99.ebuild | 39 | ||||
-rw-r--r-- | dev-libs/libtranslate/metadata.xml | 21 |
10 files changed, 519 insertions, 0 deletions
diff --git a/dev-libs/libtranslate/ChangeLog b/dev-libs/libtranslate/ChangeLog new file mode 100644 index 000000000000..ede62bfb217c --- /dev/null +++ b/dev-libs/libtranslate/ChangeLog @@ -0,0 +1,15 @@ +# ChangeLog for dev-libs/libtranslate +# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libtranslate/ChangeLog,v 1.1 2007/09/02 18:47:02 philantrop Exp $ + +*libtranslate-0.99 (02 Sep 2007) + + 02 Sep 2007; Wulf C. Krueger <philantrop@gentoo.org> + +files/libtranslate-0.99-charsetparse.diff, + +files/libtranslate-0.99-condfix.diff, + +files/libtranslate-0.99-int64.diff, + +files/libtranslate_0.99-0ubuntu3.diff, + +files/libtranslate-0.99-man-page.diff, +metadata.xml, + +libtranslate-0.99.ebuild: + Initial ebuild as per bug 81423. Thanks to all who helped! + diff --git a/dev-libs/libtranslate/Manifest b/dev-libs/libtranslate/Manifest new file mode 100644 index 000000000000..1ae409ad8d99 --- /dev/null +++ b/dev-libs/libtranslate/Manifest @@ -0,0 +1,46 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +AUX libtranslate-0.99-charsetparse.diff 1551 RMD160 13ef2724dd6f16b565240fb3ed159bdf5a61afa2 SHA1 e45d8d608241cec6010ae2c62e5be908073c91fc SHA256 e1af8665554f05040894652ffd21854efc1796654de684bd9686c1e0b8d8923b +MD5 c2623d83abbaa8cbc6b5f28eabd531cb files/libtranslate-0.99-charsetparse.diff 1551 +RMD160 13ef2724dd6f16b565240fb3ed159bdf5a61afa2 files/libtranslate-0.99-charsetparse.diff 1551 +SHA256 e1af8665554f05040894652ffd21854efc1796654de684bd9686c1e0b8d8923b files/libtranslate-0.99-charsetparse.diff 1551 +AUX libtranslate-0.99-condfix.diff 1058 RMD160 0e4c115440f9c31abaa6e73da81c06a2e4d08138 SHA1 fe2886d829fc8929d50e145b62e67429fa9bb664 SHA256 8eb95ac1112b6074870564e3bff7a396f375b0dfc87346b7d084dc95801d4946 +MD5 b461c07aa8bf2dc9e1368c6f532c0cd8 files/libtranslate-0.99-condfix.diff 1058 +RMD160 0e4c115440f9c31abaa6e73da81c06a2e4d08138 files/libtranslate-0.99-condfix.diff 1058 +SHA256 8eb95ac1112b6074870564e3bff7a396f375b0dfc87346b7d084dc95801d4946 files/libtranslate-0.99-condfix.diff 1058 +AUX libtranslate-0.99-int64.diff 557 RMD160 4f8e4982ccfe8535ed5404b9895be2f2a31fded8 SHA1 e83276473f9fe0a73ae6a5a76b2dc4e6b329cbad SHA256 6857bbc91d8e346cd342ecb486f0787edcbb613d071be024edaff007bc5e0066 +MD5 338107bf56d311ac13ba613ecb84362a files/libtranslate-0.99-int64.diff 557 +RMD160 4f8e4982ccfe8535ed5404b9895be2f2a31fded8 files/libtranslate-0.99-int64.diff 557 +SHA256 6857bbc91d8e346cd342ecb486f0787edcbb613d071be024edaff007bc5e0066 files/libtranslate-0.99-int64.diff 557 +AUX libtranslate-0.99-man-page.diff 692 RMD160 cfacc90a868281229e5cc701b0ae055a65a2cd8a SHA1 f177dbb4e7254519176e5583e62019cf4e76b455 SHA256 9b42fb784cdfd50a319a83de7c77a487dc481021324c71fba2c51e5787861a3e +MD5 80de31fe7939153024b6db2cd5b12b56 files/libtranslate-0.99-man-page.diff 692 +RMD160 cfacc90a868281229e5cc701b0ae055a65a2cd8a files/libtranslate-0.99-man-page.diff 692 +SHA256 9b42fb784cdfd50a319a83de7c77a487dc481021324c71fba2c51e5787861a3e files/libtranslate-0.99-man-page.diff 692 +AUX libtranslate_0.99-0ubuntu3.diff 10496 RMD160 4536690c673fd45acd2a75bfe4a86477606e012b SHA1 4fa690f14c69a6976dfdff51c721ff731482858e SHA256 4bdcd02dd084892efeea1152c4533dca17b02e1f42cd603a9abade76f2b15a8b +MD5 80bbe80351cef0b482955cd301caf6f5 files/libtranslate_0.99-0ubuntu3.diff 10496 +RMD160 4536690c673fd45acd2a75bfe4a86477606e012b files/libtranslate_0.99-0ubuntu3.diff 10496 +SHA256 4bdcd02dd084892efeea1152c4533dca17b02e1f42cd603a9abade76f2b15a8b files/libtranslate_0.99-0ubuntu3.diff 10496 +DIST libtranslate-0.99.tar.gz 532516 RMD160 a6776a45b6e60b38a308809973676d6b7da44fbf SHA1 d9c681bc2726d2a459ac698b08786c81932e4057 SHA256 4b2becb139e51663022d9531c430ebcc81d8b26edc73f6ddc05707ff9950eb34 +EBUILD libtranslate-0.99.ebuild 990 RMD160 3b61ee5e12cbcc7e9327c4301fec6dc43b0fa416 SHA1 512edd77d1261699777826c43d72e69f3a8040e1 SHA256 c9a764fb37ba1221c72c9f5f14c56352ed016939991373ae037e5f6106056928 +MD5 e452d56a04ab869a0dacd36cd658cd9d libtranslate-0.99.ebuild 990 +RMD160 3b61ee5e12cbcc7e9327c4301fec6dc43b0fa416 libtranslate-0.99.ebuild 990 +SHA256 c9a764fb37ba1221c72c9f5f14c56352ed016939991373ae037e5f6106056928 libtranslate-0.99.ebuild 990 +MISC ChangeLog 527 RMD160 7ef8bb80a664a3b57d68a4871f532e8d63c169c5 SHA1 d8253a85ded660a0f44781f33d794302c9321156 SHA256 5d699b895ccf127546519e902fcd53f3a866f2e7affde8baeb65897cbecf0fe4 +MD5 06ecf1608efd854e62bbd15d4c6bf15e ChangeLog 527 +RMD160 7ef8bb80a664a3b57d68a4871f532e8d63c169c5 ChangeLog 527 +SHA256 5d699b895ccf127546519e902fcd53f3a866f2e7affde8baeb65897cbecf0fe4 ChangeLog 527 +MISC metadata.xml 848 RMD160 287b40f7a03fe3781884f64e45ecbacea566d5a7 SHA1 6144aa43ffb5656fbce45a8974c6a81bb05db741 SHA256 062527b806cef4a70e8542e9b71883b5e6155eea84ffcb9ae6668d4fdf808216 +MD5 1d0ced290f22f04b8151f2b7b717fce4 metadata.xml 848 +RMD160 287b40f7a03fe3781884f64e45ecbacea566d5a7 metadata.xml 848 +SHA256 062527b806cef4a70e8542e9b71883b5e6155eea84ffcb9ae6668d4fdf808216 metadata.xml 848 +MD5 be1a3f7052d3d13a459d3675e8b332e7 files/digest-libtranslate-0.99 253 +RMD160 c145ca260ed379e4122fe684e2232d3a96af36cb files/digest-libtranslate-0.99 253 +SHA256 0d997d01a8189240bdb092935c5d99a0cb92eba439d55ad1a1f4ab03dd875cfc files/digest-libtranslate-0.99 253 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.6 (GNU/Linux) + +iD8DBQFG2wT1CkvF58q80IkRApHNAJ4oILZZcuvca2vfFecwRKPEhVX1IwCfYl3F +8s78KbiJ5RIcHAVuRx27Z6A= +=U2Hh +-----END PGP SIGNATURE----- diff --git a/dev-libs/libtranslate/files/digest-libtranslate-0.99 b/dev-libs/libtranslate/files/digest-libtranslate-0.99 new file mode 100644 index 000000000000..4303d334c991 --- /dev/null +++ b/dev-libs/libtranslate/files/digest-libtranslate-0.99 @@ -0,0 +1,3 @@ +MD5 1fe75a6a6e8a0c6518890b5fa6984d42 libtranslate-0.99.tar.gz 532516 +RMD160 a6776a45b6e60b38a308809973676d6b7da44fbf libtranslate-0.99.tar.gz 532516 +SHA256 4b2becb139e51663022d9531c430ebcc81d8b26edc73f6ddc05707ff9950eb34 libtranslate-0.99.tar.gz 532516 diff --git a/dev-libs/libtranslate/files/libtranslate-0.99-charsetparse.diff b/dev-libs/libtranslate/files/libtranslate-0.99-charsetparse.diff new file mode 100644 index 000000000000..8c39a1e093d9 --- /dev/null +++ b/dev-libs/libtranslate/files/libtranslate-0.99-charsetparse.diff @@ -0,0 +1,48 @@ +diff -Naur libtranslate-0.99.orig/src/modules/translate-generic-service.c libtranslate-0.99/src/modules/translate-generic-service.c +--- libtranslate-0.99.orig/src/modules/translate-generic-service.c 2005-01-17 17:46:38.000000000 +0100 ++++ libtranslate-0.99/src/modules/translate-generic-service.c 2007-09-02 16:36:24.000000000 +0200 +@@ -484,7 +484,7 @@ + + if (SOUP_STATUS_IS_SUCCESSFUL(message->status_code)) + { +- const char *charset = NULL; ++ char *charset = NULL; + + if (flags & TRANSFER_CONVERT) + { +@@ -493,14 +493,31 @@ + content_type = translate_generic_service_get_header(message, &info, "Content-Type"); + if (content_type) + { +- charset = translate_ascii_strcasestr(content_type, "charset="); +- if (charset) +- charset += 8; ++ const char *tmp; ++ ++ tmp = translate_ascii_strcasestr(content_type, "charset="); ++ if (tmp) ++ { ++ int len; ++ ++ tmp += 8; ++ if (*tmp == '\'' || *tmp == '"') ++ tmp++; ++ ++ len = strlen(tmp); ++ if (len > 0 && (tmp[len - 1] == '\'' || tmp[len - 1] == '"')) ++ len--; ++ ++ charset = g_strndup(tmp, len); ++ } + } + } + + if (charset) +- response = g_convert(message->response.body, message->response.length, "UTF-8", charset, NULL, NULL, err); ++ { ++ response = g_convert(message->response.body, message->response.length, "UTF-8", charset, NULL, NULL, err); ++ g_free(charset); ++ } + else + { + if ((flags & TRANSFER_CONVERT) && ! g_utf8_validate(message->response.body, message->response.length, NULL)) diff --git a/dev-libs/libtranslate/files/libtranslate-0.99-condfix.diff b/dev-libs/libtranslate/files/libtranslate-0.99-condfix.diff new file mode 100644 index 000000000000..e047b2b1d5d5 --- /dev/null +++ b/dev-libs/libtranslate/files/libtranslate-0.99-condfix.diff @@ -0,0 +1,39 @@ +diff -Naur libtranslate-0.99.orig/src/translate-session.c libtranslate-0.99/src/translate-session.c +--- libtranslate-0.99.orig/src/translate-session.c 2005-01-17 17:45:35.000000000 +0100 ++++ libtranslate-0.99/src/translate-session.c 2007-09-02 16:43:47.000000000 +0200 +@@ -703,7 +703,14 @@ + GError *tmp_err = NULL; + + g_mutex_lock(info->mutex); +- ret = info->err != NULL; ++ if (info->err) ++ { ++ ret = TRUE; ++ if (info->progress_cond) ++ g_cond_signal(info->progress_cond); ++ } ++ else ++ ret = FALSE; + g_mutex_unlock(info->mutex); + + if (ret) +@@ -728,6 +735,9 @@ + else + g_propagate_error(&info->err, tmp_err); + ++ if (info->progress_cond) ++ g_cond_signal(info->progress_cond); ++ + g_mutex_unlock(info->mutex); + + return; +@@ -759,6 +769,9 @@ + info->err = g_error_new(TRANSLATE_SESSION_ERROR, + TRANSLATE_SESSION_ERROR_NO_SERVICE, + _("no service could translate chunk")); ++ ++ if (info->progress_cond) ++ g_cond_signal(info->progress_cond); + } + + g_mutex_unlock(info->mutex); diff --git a/dev-libs/libtranslate/files/libtranslate-0.99-int64.diff b/dev-libs/libtranslate/files/libtranslate-0.99-int64.diff new file mode 100644 index 000000000000..cf6b37a74eaa --- /dev/null +++ b/dev-libs/libtranslate/files/libtranslate-0.99-int64.diff @@ -0,0 +1,12 @@ +diff -Naur libtranslate-0.99.orig/src/translate-util.c libtranslate-0.99/src/translate-util.c +--- libtranslate-0.99.orig/src/translate-util.c 2005-01-17 17:45:45.000000000 +0100 ++++ libtranslate-0.99/src/translate-util.c 2007-09-02 16:44:47.000000000 +0200 +@@ -136,7 +136,7 @@ + g_return_val_if_fail(big != NULL, NULL); + g_return_val_if_fail(little != NULL, NULL); + +- lower_big = g_ascii_strdown(big, big_len); ++ lower_big = g_ascii_strdown(big, (int) big_len); + lower_little = g_ascii_strdown(little, -1); + + s = strstr(lower_big, lower_little); diff --git a/dev-libs/libtranslate/files/libtranslate-0.99-man-page.diff b/dev-libs/libtranslate/files/libtranslate-0.99-man-page.diff new file mode 100644 index 000000000000..2a904e676c6e --- /dev/null +++ b/dev-libs/libtranslate/files/libtranslate-0.99-man-page.diff @@ -0,0 +1,12 @@ +diff -Naur libtranslate-0.99.orig/docs/man/translate.1 libtranslate-0.99/docs/man/translate.1 +--- libtranslate-0.99.orig/docs/man/translate.1 2005-01-28 13:37:26.000000000 +0100 ++++ libtranslate-0.99/docs/man/translate.1 2005-12-20 17:31:07.000000000 +0100 +@@ -149,7 +149,7 @@ + Translates the contents of the file document1 from German to Spanish and prints the result to standard output\&. + + .TP +-\fBecho\fR "Le problème est résolu\&." | \fBtranslate\fR \fB\-f\fR fr \fB\-t\fR en ++\fBecho\fR "Le probl\(`eme est r\('esolu\&." | \fBtranslate\fR \fB\-f\fR fr \fB\-t\fR en + Translates the text given on standard input from French to English and prints the result to standard output\&. + + .TP diff --git a/dev-libs/libtranslate/files/libtranslate_0.99-0ubuntu3.diff b/dev-libs/libtranslate/files/libtranslate_0.99-0ubuntu3.diff new file mode 100644 index 000000000000..01943927f22a --- /dev/null +++ b/dev-libs/libtranslate/files/libtranslate_0.99-0ubuntu3.diff @@ -0,0 +1,284 @@ +--- libtranslate-0.99.orig/debian/control ++++ libtranslate-0.99/debian/control +@@ -0,0 +1,40 @@ ++Source: libtranslate ++Priority: optional ++Maintainer: Gauvain Pocentek <gauvainpocentek@yahoo.fr> ++Build-Depends: cdbs, debhelper (>= 5.0.0), libxml-parser-perl, libglib2.0-dev, libsoup2.2-dev ++Standards-Version: 3.6.2 ++Section: libs ++ ++Package: libtranslate-dev ++Section: libdevel ++Architecture: any ++Depends: libtranslate0 (= ${Source-Version}) ++Description: Development files for libtranslate ++ This package contains the files necessary for compiling programs ++ that depend on libtranslate. ++ . ++ Web page: http://www.nongnu.org/libtranslate/ ++ ++Package: libtranslate0 ++Section: libs ++Architecture: any ++Depends: ${shlibs:Depends} ++Description: library for translating text and web pages ++ libtranslate is a library for translating text and web pages ++ between natural languages. Its modular infrastructure allows ++ the implementation of new translation services separately ++ from the core library. ++ . ++ Web page: http://www.nongnu.org/libtranslate/ ++ ++Package: libtranslate-bin ++Section: ++Architecture: any ++Depends: ${shlibs:Depends} ++Description: command line translator ++ translate-translator is a command line tool to translate ++ texts to natural languages, based on the libtranslate ++ library. ++ . ++ Web page: http://www.nongnu.org/libtranslate/ ++ +--- libtranslate-0.99.orig/debian/rules ++++ libtranslate-0.99/debian/rules +@@ -0,0 +1,12 @@ ++#!/usr/bin/make -f ++ ++include /usr/share/cdbs/1/rules/simple-patchsys.mk ++include /usr/share/cdbs/1/rules/debhelper.mk ++include /usr/share/cdbs/1/class/autotools.mk ++ ++install/libtranslate-bin:: ++ mv debian/tmp/usr/bin/translate \ ++ debian/tmp/usr/bin/translate-bin ++ mv debian/tmp/usr/share/man/man1/translate.1 \ ++ debian/tmp/usr/share/man/man1/translate-bin.1 ++ +--- libtranslate-0.99.orig/debian/shlibs.local ++++ libtranslate-0.99/debian/shlibs.local +@@ -0,0 +1 @@ ++libtranslate 0 libtranslate0 +--- libtranslate-0.99.orig/debian/changelog ++++ libtranslate-0.99/debian/changelog +@@ -0,0 +1,26 @@ ++libtranslate (0.99-0ubuntu3) feisty; urgency=low ++ ++ * Rebuild to get rid of libgnutls12. ++ ++ -- Daniel Holbach <daniel.holbach@ubuntu.com> Thu, 14 Dec 2006 09:08:26 +0100 ++ ++libtranslate (0.99-0ubuntu2) dapper; urgency=low ++ ++ * Switch to cdbs ++ * Add a new binary package: libtranslate-bin ++ * Change binary name to translate-bin ++ * Add missing files in the 3 packages ++ ++ -- Gauvain Pocentek <gauvainpocentek@ubuntu.com> Wed, 25 Jan 2006 07:45:25 +0100 ++ ++libtranslate (0.99-0ubuntu1) dapper; urgency=low ++ ++ * Initial release ++ * 01_man_translate.dpatch: replaces bad french characters ++ * Apply 3 upstream patches: ++ 02_charsetparse.dpatch, fixes HTTP charset parsing ++ 03_condfix.dpatch, fixes occasional translate_session_translate_text() lockup ++ 04_memory_64.dpatch, fixes memory exhaustion on 64-bit platforms ++ ++ -- Gauvain Pocentek <gauvainpocentek@yahoo.fr> Wed, 14 Dec 2005 18:39:27 +0100 ++ +--- libtranslate-0.99.orig/debian/compat ++++ libtranslate-0.99/debian/compat +@@ -0,0 +1 @@ ++5 +--- libtranslate-0.99.orig/debian/libtranslate-dev.links ++++ libtranslate-0.99/debian/libtranslate-dev.links +@@ -0,0 +1,2 @@ ++/usr/share/gtk-doc/html/libtranslate /usr/share/doc/libtranslate0-dev/html ++/usr/share/gtk-doc/html/libtranslate /usr/share/devhelp/books/libtranslate +--- libtranslate-0.99.orig/debian/libtranslate-bin.install ++++ libtranslate-0.99/debian/libtranslate-bin.install +@@ -0,0 +1,2 @@ ++debian/tmp/usr/bin/* ++debian/tmp/usr/share/man/man1/* +--- libtranslate-0.99.orig/debian/patches/04_memory_64.patch ++++ libtranslate-0.99/debian/patches/04_memory_64.patch +@@ -0,0 +1,12 @@ ++diff -Naur libtranslate-0.99.orig/src/translate-util.c libtranslate-0.99/src//translate-util.c ++--- libtranslate-0.99.orig/src//translate-util.c Mon Apr 11 22:44:53 2005 +++++ libtranslate-0.99/src//translate-util.c Mon Apr 11 22:51:48 2005 ++@@ -136,7 +136,7 @@ ++ g_return_val_if_fail(big != NULL, NULL); ++ g_return_val_if_fail(little != NULL, NULL); ++ ++- lower_big = g_ascii_strdown(big, big_len); +++ lower_big = g_ascii_strdown(big, (int) big_len); ++ lower_little = g_ascii_strdown(little, -1); ++ ++ s = strstr(lower_big, lower_little); +\ No newline at end of file +--- libtranslate-0.99.orig/debian/patches/03_condfix.patch ++++ libtranslate-0.99/debian/patches/03_condfix.patch +@@ -0,0 +1,39 @@ ++diff -Naur libtranslate-0.99.orig/src/translate-session.c libtranslate-0.99/src/translate-session.c ++--- libtranslate-0.99.orig/src/translate-session.c Mon Apr 11 22:44:53 2005 +++++ libtranslate-0.99/src/translate-session.c Mon Apr 11 22:51:48 2005 ++@@ -703,7 +703,14 @@ ++ GError *tmp_err = NULL; ++ ++ g_mutex_lock(info->mutex); ++- ret = info->err != NULL; +++ if (info->err) +++ { +++ ret = TRUE; +++ if (info->progress_cond) +++ g_cond_signal(info->progress_cond); +++ } +++ else +++ ret = FALSE; ++ g_mutex_unlock(info->mutex); ++ ++ if (ret) ++@@ -728,6 +735,9 @@ ++ else ++ g_propagate_error(&info->err, tmp_err); ++ +++ if (info->progress_cond) +++ g_cond_signal(info->progress_cond); +++ ++ g_mutex_unlock(info->mutex); ++ ++ return; ++@@ -759,6 +769,9 @@ ++ info->err = g_error_new(TRANSLATE_SESSION_ERROR, ++ TRANSLATE_SESSION_ERROR_NO_SERVICE, ++ _("no service could translate chunk")); +++ +++ if (info->progress_cond) +++ g_cond_signal(info->progress_cond); ++ } ++ ++ g_mutex_unlock(info->mutex); +--- libtranslate-0.99.orig/debian/patches/02_charsetparse.patch ++++ libtranslate-0.99/debian/patches/02_charsetparse.patch +@@ -0,0 +1,48 @@ ++diff -Naur libtranslate-0.99.orig/src/modules/translate-generic-service.c libtranslate-0.99/src/modules/translate-generic-service.c ++--- libtranslate-0.99.orig/src/modules/translate-generic-service.c Mon Apr 11 23:08:47 2005 +++++ libtranslate-0.99/src/modules/translate-generic-service.c Mon Apr 11 23:15:54 2005 ++@@ -484,7 +484,7 @@ ++ ++ if (SOUP_STATUS_IS_SUCCESSFUL(message->status_code)) ++ { ++- const char *charset = NULL; +++ char *charset = NULL; ++ ++ if (flags & TRANSFER_CONVERT) ++ { ++@@ -493,14 +493,31 @@ ++ content_type = translate_generic_service_get_header(message, &info, "Content-Type"); ++ if (content_type) ++ { ++- charset = translate_ascii_strcasestr(content_type, "charset="); ++- if (charset) ++- charset += 8; +++ const char *tmp; +++ +++ tmp = translate_ascii_strcasestr(content_type, "charset="); +++ if (tmp) +++ { +++ int len; +++ +++ tmp += 8; +++ if (*tmp == '\'' || *tmp == '"') +++ tmp++; +++ +++ len = strlen(tmp); +++ if (len > 0 && (tmp[len - 1] == '\'' || tmp[len - 1] == '"')) +++ len--; +++ +++ charset = g_strndup(tmp, len); +++ } ++ } ++ } ++ ++ if (charset) ++- response = g_convert(message->response.body, message->response.length, "UTF-8", charset, NULL, NULL, err); +++ { +++ response = g_convert(message->response.body, message->response.length, "UTF-8", charset, NULL, NULL, err); +++ g_free(charset); +++ } ++ else ++ { ++ if ((flags & TRANSFER_CONVERT) && ! g_utf8_validate(message->response.body, message->response.length, NULL)) +--- libtranslate-0.99.orig/debian/patches/01_man_translate.patch ++++ libtranslate-0.99/debian/patches/01_man_translate.patch +@@ -0,0 +1,12 @@ ++diff -Naur libtranslate-0.99.orig/docs/man/translate.1 libtranslate-0.99/docs/man/translate.1 ++--- libtranslate-0.99.orig/docs/man/translate.1 2005-01-28 13:37:26.000000000 +0100 +++++ libtranslate-0.99/docs/man/translate.1 2005-12-20 17:31:07.000000000 +0100 ++@@ -149,7 +149,7 @@ ++ Translates the contents of the file document1 from German to Spanish and prints the result to standard output\&. ++ ++ .TP ++-\fBecho\fR "Le problème est résolu\&." | \fBtranslate\fR \fB\-f\fR fr \fB\-t\fR en +++\fBecho\fR "Le probl\(`eme est r\('esolu\&." | \fBtranslate\fR \fB\-f\fR fr \fB\-t\fR en ++ Translates the text given on standard input from French to English and prints the result to standard output\&. ++ ++ .TP +--- libtranslate-0.99.orig/debian/copyright ++++ libtranslate-0.99/debian/copyright +@@ -0,0 +1,34 @@ ++This package was debianized by Gauvain Pocentek <gauvainpocentek@yahoo.fr> on ++Wed, 14 Dec 2005 18:39:27 +0100. ++ ++It was downloaded from http://www.nongnu.org/libtranslate/ ++ ++Copyright (C) 2004, 2005 Jean-Yves Lefort <jylefort@brutele.be> ++ ++License: ++ ++Redistribution and use in source and binary forms, with or without ++modification, are permitted provided that the following conditions ++are met: ++1. Redistributions of source code must retain the above copyright ++ notice, this list of conditions and the following disclaimer. ++2. Redistributions in binary form must reproduce the above copyright ++ notice, this list of conditions and the following disclaimer in the ++ documentation and/or other materials provided with the distribution. ++3. Neither the name of Jean-Yves Lefort nor the names of its contributors ++ may be used to endorse or promote products derived from this software ++ without specific prior written permission. ++ ++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND ++CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, ++INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ++DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS ++BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ++EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED ++TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ++ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ++OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ++OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++POSSIBILITY OF SUCH DAMAGE. +--- libtranslate-0.99.orig/debian/libtranslate-dev.install ++++ libtranslate-0.99/debian/libtranslate-dev.install +@@ -0,0 +1,7 @@ ++debian/tmp/usr/lib/*a ++debian/tmp/usr/lib/lib*.so ++debian/tmp/usr/lib/pkgconfig/* ++debian/tmp/usr/lib/*.la ++debian/tmp/usr/lib/libtranslate/modules/*{a,la} ++debian/tmp/usr/share/gtk-doc/* ++debian/tmp/usr/include/libtranslate/* +--- libtranslate-0.99.orig/debian/libtranslate0.install ++++ libtranslate-0.99/debian/libtranslate0.install +@@ -0,0 +1,5 @@ ++debian/tmp/usr/lib/lib*.so.0.0.0 ++debian/tmp/usr/lib/lib*.so.0 ++debian/tmp/usr/lib/libtranslate/modules/*so ++debian/tmp/usr/share/libtranslate/* ++debian/tmp/usr/share/man/man5/* diff --git a/dev-libs/libtranslate/libtranslate-0.99.ebuild b/dev-libs/libtranslate/libtranslate-0.99.ebuild new file mode 100644 index 000000000000..a56eccc46969 --- /dev/null +++ b/dev-libs/libtranslate/libtranslate-0.99.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libtranslate/libtranslate-0.99.ebuild,v 1.1 2007/09/02 18:47:02 philantrop Exp $ + +inherit eutils + +DESCRIPTION="Library for translating text and web pages between natural languages." +HOMEPAGE="http://www.nongnu.org/libtranslate" +SRC_URI="http://savannah.nongnu.org/download/libtranslate/${P}.tar.gz" + +SLOT="0" +KEYWORDS="~amd64 ~x86" +LICENSE="BSD" +IUSE="" + +# The tests require the package to be installed already. +RESTRICT="test" + +DEPEND=">=dev-libs/glib-2.4.0 + >=net-libs/libsoup-2.2.0 + >=dev-libs/libxml2-2.0 + >=app-text/talkfilters-2.3.4-r1" +RDEPEND="${DEPEND}" + +src_unpack() { + unpack ${A} + + # Upstream patches for several minor issues. + epatch "${FILESDIR}/${P}-charsetparse.diff" + epatch "${FILESDIR}/${P}-condfix.diff" + epatch "${FILESDIR}/${P}-int64.diff" + epatch "${FILESDIR}/${P}-man-page.diff" +} + +src_install() { + emake DESTDIR="${D}" install || die "installation failed" + + dodoc AUTHORS NEWS README TODO || die "installing docs failed" +} diff --git a/dev-libs/libtranslate/metadata.xml b/dev-libs/libtranslate/metadata.xml new file mode 100644 index 000000000000..4fe865bab1d8 --- /dev/null +++ b/dev-libs/libtranslate/metadata.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>no-herd</herd> +<maintainer> + <email>philantrop@gentoo.org</email> +</maintainer> +<longdescription> +libtranslate is a library for translating text and web pages between natural +languages. Its modular infrastructure allows to implement new translation +services separately from the core library. + +libtranslate is shipped with a generic module supporting web-based translation +services such as Babel Fish, Google Language Tools and SYSTRAN. Moreover, the +generic module allows to add new services simply by adding a few lines to a XML +file (see the services.xml(5) manual page). + +The libtranslate distribution includes a powerful command line interface (see +the translate(1) manual page). +</longdescription> +</pkgmetadata> |