diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
commit | 415856bdd4f48ab4f2732996f0bae58595092bbe (patch) | |
tree | ede2018b591f6dfb477fe9341ba17b9bc000fab9 /extra/m17n-lib |
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'extra/m17n-lib')
-rw-r--r-- | extra/m17n-lib/PKGBUILD | 29 | ||||
-rw-r--r-- | extra/m17n-lib/locale.patch | 51 |
2 files changed, 80 insertions, 0 deletions
diff --git a/extra/m17n-lib/PKGBUILD b/extra/m17n-lib/PKGBUILD new file mode 100644 index 000000000..103eae831 --- /dev/null +++ b/extra/m17n-lib/PKGBUILD @@ -0,0 +1,29 @@ +# $Id: PKGBUILD 106797 2011-01-19 09:42:18Z bisson $ +# Contributor: Camille Moncelier <pix@devlife.org> + +pkgname=m17n-lib +pkgver=1.6.2 +pkgrel=2 +pkgdesc='A multilingual text processing library (runtimes)' +arch=('i686' 'x86_64') +url='http://www.m17n.org/m17n-lib/' +license=('GPL') +depends=('libxft' 'm17n-db' 'fribidi' 'libxml2' 'gd' 'libotf>=0.9.11') +optdepends=('anthy: to use the anthy input method') +options=('!libtool' '!makeflags') +source=("http://www.m17n.org/m17n-lib-download/$pkgname-$pkgver.tar.gz" + 'locale.patch') +sha1sums=('9b9ada79357dd56c90c64cd36845c5537c363d79' + '55a09b9d8e6ea590d5c8f06d1397bfa0b00c1697') + +build() { + cd "$srcdir/$pkgname-$pkgver" + patch -p1 -i ../locale.patch # cf. FS#20482 + ./configure --prefix=/usr + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" install +} diff --git a/extra/m17n-lib/locale.patch b/extra/m17n-lib/locale.patch new file mode 100644 index 000000000..79fed402d --- /dev/null +++ b/extra/m17n-lib/locale.patch @@ -0,0 +1,51 @@ +--- old/src/locale.c 2010/03/19 11:59:43 1.12 ++++ new/src/locale.c 2010/11/05 11:20:41 1.13 +@@ -86,34 +86,24 @@ + MLocale *mlocale_monetary, *mlocale_numeric, ; + #endif + +-/** Parse locale name NAME and return a newly created MLocale object. +- If the locale is not supported by the system, return NULL. */ ++/** Parse locale name NAME and return a newly created MLocale object. */ + + static MLocale * + make_locale (const char *name) + { +- char *current, *new, *str; ++ char *str; + int len; + MLocale *locale; + char c; + +- str = setlocale (LC_CTYPE, NULL); +- len = strlen (str) + 1; +- current = alloca (len); +- memcpy (current, str, len); +- +- if (! (new = setlocale (LC_CTYPE, name))) +- return NULL; +- +- + M17N_OBJECT (locale, NULL, MERROR_LOCALE); +- locale->name = msymbol (new); ++ locale->name = msymbol (name); + msymbol_put (locale->name, M_locale, (void *) locale); + M17N_OBJECT_UNREF (locale); + +- len = strlen (new) + 1; ++ len = strlen (name) + 1; + str = alloca (len); +- memcpy (str, new, len); ++ memcpy (str, name, len); + + c = '\0'; + while (1) +@@ -162,8 +152,6 @@ + } + else + locale->coding = Mcoding_us_ascii; +- +- setlocale (LC_CTYPE, current); + return locale; + } + |