summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Rostovtsev <tetromino@gentoo.org>2012-02-15 16:57:25 +0000
committerAlexandre Rostovtsev <tetromino@gentoo.org>2012-02-15 16:57:25 +0000
commitf0761f7124732eccf9d3540e4e03226f5de35b62 (patch)
tree0e8027fcd437d30ad9aa8adc28d6ae53b5d56639 /app-text
parentStable for HPPA (bug #403849). (diff)
downloadgentoo-2-f0761f7124732eccf9d3540e4e03226f5de35b62.tar.gz
gentoo-2-f0761f7124732eccf9d3540e4e03226f5de35b62.tar.bz2
gentoo-2-f0761f7124732eccf9d3540e4e03226f5de35b62.zip
New ebuild for bug #134732, formerly maintained in Sunrise. Thanks to Vieri for the original ebuild.
(Portage version: 2.2.0_alpha86/cvs/Linux x86_64)
Diffstat (limited to 'app-text')
-rw-r--r--app-text/unac/ChangeLog11
-rw-r--r--app-text/unac/files/unac-1.8.0-debian-gcc-4.4-bug-556379.patch47
-rw-r--r--app-text/unac/metadata.xml8
-rw-r--r--app-text/unac/unac-1.8.0.ebuild49
4 files changed, 115 insertions, 0 deletions
diff --git a/app-text/unac/ChangeLog b/app-text/unac/ChangeLog
new file mode 100644
index 000000000000..3770acce85ba
--- /dev/null
+++ b/app-text/unac/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for app-text/unac
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/unac/ChangeLog,v 1.1 2012/02/15 16:57:25 tetromino Exp $
+
+*unac-1.8.0 (15 Feb 2012)
+
+ 15 Feb 2012; Alexandre Rostovtsev <tetromino@gentoo.org> +unac-1.8.0.ebuild,
+ +files/unac-1.8.0-debian-gcc-4.4-bug-556379.patch, +metadata.xml:
+ New ebuild for bug #134732, formerly maintained in Sunrise. Thanks to Vieri
+ for the original ebuild.
+
diff --git a/app-text/unac/files/unac-1.8.0-debian-gcc-4.4-bug-556379.patch b/app-text/unac/files/unac-1.8.0-debian-gcc-4.4-bug-556379.patch
new file mode 100644
index 000000000000..ca1d50274da6
--- /dev/null
+++ b/app-text/unac/files/unac-1.8.0-debian-gcc-4.4-bug-556379.patch
@@ -0,0 +1,47 @@
+See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=556379
+
+diff -r fd7eb0d70970 unac-1.8.0/unac.c
+--- a/unac-1.8.0/unac.c Fri Sep 17 10:35:14 2010 +0200
++++ b/unac-1.8.0/unac.c Fri Sep 17 10:36:07 2010 +0200
+@@ -13873,9 +13873,9 @@
+ *out_lengthp = 0;
+ } else {
+ char* utf16 = 0;
+- int utf16_length = 0;
++ size_t utf16_length = 0;
+ char* utf16_unaccented = 0;
+- int utf16_unaccented_length = 0;
++ size_t utf16_unaccented_length = 0;
+
+ if(convert(charset, utf16be(), in, in_length, &utf16, &utf16_length) < 0) {
+ return -1;
+diff -r fd7eb0d70970 unac-1.8.0/unaccent.c
+--- a/unac-1.8.0/unaccent.c Fri Sep 17 10:35:14 2010 +0200
++++ b/unac-1.8.0/unaccent.c Fri Sep 17 10:40:34 2010 +0200
+@@ -90,7 +90,7 @@
+ const char* charset = argv[optind++];
+
+ char* unaccented = 0;
+- int unaccented_length = 0;
++ size_t unaccented_length = 0;
+
+ if(optind >= argc) {
+ #define BUFFER_SIZE 10240
+@@ -101,7 +101,7 @@
+ perror("");
+ exit(1);
+ }
+- printf("%.*s", unaccented_length, unaccented);
++ printf("%.*s", (int)unaccented_length, unaccented);
+ }
+ } else {
+ const char* string = argv[optind++];
+@@ -114,7 +114,7 @@
+
+ if(debug_level > UNAC_DEBUG_NONE)
+ fprintf(stderr, "unaccented version is ");
+- printf("%.*s\n", unaccented_length, unaccented);
++ printf("%.*s\n", (int)unaccented_length, unaccented);
+
+ if(optind < argc) {
+ const char* expected = argv[optind++];
diff --git a/app-text/unac/metadata.xml b/app-text/unac/metadata.xml
new file mode 100644
index 000000000000..8072c2f3d376
--- /dev/null
+++ b/app-text/unac/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>tetromino@gentoo.org</email>
+ <name>Alexandre Rostovtsev</name>
+</maintainer>
+</pkgmetadata>
diff --git a/app-text/unac/unac-1.8.0.ebuild b/app-text/unac/unac-1.8.0.ebuild
new file mode 100644
index 000000000000..fc180a7cad13
--- /dev/null
+++ b/app-text/unac/unac-1.8.0.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/unac/unac-1.8.0.ebuild,v 1.1 2012/02/15 16:57:25 tetromino Exp $
+
+EAPI="4"
+
+inherit autotools eutils
+
+DESCRIPTION="Library and command-line tool for removing accents from characters"
+HOMEPAGE="http://www.nongnu.org/unac/"
+SRC_URI="mirror://debian/pool/main/u/unac/${P/-/_}.orig.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs test"
+
+RDEPEND="virtual/libiconv"
+DEPEND="${RDEPEND}
+ test? ( dev-lang/perl )"
+
+S="${WORKDIR}/${P}.orig"
+
+DOCS="AUTHORS ChangeLog NEWS README THANKS"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-debian-gcc-4.4-bug-556379.patch"
+ # otherwise automake will fail
+ touch config.rpath
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -exec rm -f {} +
+}
+
+pkg_postinst() {
+ einfo "Examples of using unaccent from the command line:"
+ einfo "unaccent utf8 été"
+ einfo "echo -e '\\\\0303\\\\0251t\\\\0303\\\\0251' | unaccent utf8"
+ einfo "unaccent ISO-8859-1 < myfile > myfile.unaccent"
+ einfo
+ einfo "See man unaccent and man unac for more information."
+}