diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2019-09-01 00:00:32 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2019-09-01 00:00:32 +0200 |
commit | ca9627e70852f6b2e835660df870fe3ab405882d (patch) | |
tree | 0a008b1d5b16fa0679a195ed7b5662c7891f591c /app-i18n/libguess | |
download | darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.gz darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.bz2 darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.xz darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.zip |
Initial import
Diffstat (limited to 'app-i18n/libguess')
-rw-r--r-- | app-i18n/libguess/Manifest | 3 | ||||
-rw-r--r-- | app-i18n/libguess/files/libguess-ds-cn.patch | 62 | ||||
-rw-r--r-- | app-i18n/libguess/libguess-0.2.0-r1.ebuild | 40 |
3 files changed, 105 insertions, 0 deletions
diff --git a/app-i18n/libguess/Manifest b/app-i18n/libguess/Manifest new file mode 100644 index 0000000..e4fd2c6 --- /dev/null +++ b/app-i18n/libguess/Manifest @@ -0,0 +1,3 @@ +AUX libguess-ds-cn.patch 2288 BLAKE2B df545ba1f6cf691296518deda2f499b308ed63bb1a45167fe17891f0a49710ddfd805fb78e63741014ffcb467d07ca1ab7611e1eeb8d153a2aaf1138b7141700 SHA512 a40420cecdcde08f53e87f845d40c4c544d5057748ef6408e85197b898709c0af74090a196aa0678fc370817357a2e26bcb06235f8b6ef5a34ca870179033c9f +DIST libguess-0.2.0-d7.tar.gz 8166 BLAKE2B ee4085b64838d8d1480030ad37fb654312a01e71e7cbe88dac3daacc4cd879e8e6dcee42df45db7f60116a645cf3ddb91d839ca1f3439c807a636cbf378e6b1b SHA512 b9d0aeb97cb58452a8ede76753c08549405154225b15fad0190d920d068272b2106f8d5a93fe6fac08921a9951681f3e4b959827273b8ff0750460381a2644ba +EBUILD libguess-0.2.0-r1.ebuild 1025 BLAKE2B 4e90632c2ccac30c32b4de3e076fb42982f5eeaf70526295eabc2969c5886be188cd947fff3e183f81cf5668b1bc6ca228ffbf5617dcd9043c1bb6eb5b8d277f SHA512 b223e9a1b61ba55401cb5173ce71085c1417bda8f0b3d1d5255a8496f7071a3765ad7507c9ec016c30b17352d5c3fe86cf9aafc695d85cc69491c214d2949ae8 diff --git a/app-i18n/libguess/files/libguess-ds-cn.patch b/app-i18n/libguess/files/libguess-ds-cn.patch new file mode 100644 index 0000000..7c2384b --- /dev/null +++ b/app-i18n/libguess/files/libguess-ds-cn.patch @@ -0,0 +1,62 @@ +diff -dPNur libguess-0.2.0-d7/guess.c libguess-0.2.0-d7-new/guess.c +--- libguess-0.2.0-d7/guess.c 2006-12-05 17:59:32.000000000 +0100 ++++ libguess-0.2.0-d7-new/guess.c 2007-06-26 19:56:59.000000000 +0200 +@@ -44,7 +44,7 @@ + /* ORDER_** &highest, &second, ... &lowest */ + #define ORDER_JP &utf8, &sjis, &eucj + #define ORDER_TW &utf8, &big5 +-#define ORDER_CN &utf8, &gb2312, &gb18030 ++#define ORDER_CN &utf8, &gb2312, &gb18030, &big5 + #define ORDER_KR &utf8, &euck, &johab + + /* workaround for that glib's g_convert can't convert +@@ -252,6 +252,8 @@ + guess_dfa gb2312 = DFA_INIT(guess_gb2312_st, guess_gb2312_ar); + guess_dfa utf8 = DFA_INIT(guess_utf8_st, guess_utf8_ar); + guess_dfa gb18030 = DFA_INIT(guess_gb18030_st, guess_gb18030_ar); ++ guess_dfa big5 = DFA_INIT(guess_big5_st, guess_big5_ar); ++ + guess_dfa *top = NULL; + + guess_dfa *order[] = { ORDER_CN, NULL }; +@@ -287,22 +289,27 @@ + } + + if (DFA_ALIVE(gb2312)) { +- if (!DFA_ALIVE(utf8) && !DFA_ALIVE(gb18030)) ++ if (!DFA_ALIVE(utf8) && !DFA_ALIVE(gb18030) && !DFA_ALIVE(big5)) + return "GB2312"; + DFA_NEXT(gb2312, c); + } + if (DFA_ALIVE(utf8)) { +- if (!DFA_ALIVE(gb2312) && !DFA_ALIVE(gb18030)) ++ if (!DFA_ALIVE(gb2312) && !DFA_ALIVE(gb18030) && !DFA_ALIVE(big5)) + return "UTF-8"; + DFA_NEXT(utf8, c); + } + if (DFA_ALIVE(gb18030)) { +- if (!DFA_ALIVE(utf8) && !DFA_ALIVE(gb2312)) ++ if (!DFA_ALIVE(utf8) && !DFA_ALIVE(gb2312) && !DFA_ALIVE(big5)) + return "GB18030"; + DFA_NEXT(gb18030, c); + } ++ if (DFA_ALIVE(big5)) { ++ if (!DFA_ALIVE(utf8) && !DFA_ALIVE(gb2312) && !DFA_ALIVE(gb18030)) ++ return "big5"; ++ DFA_NEXT(big5, c); ++ } + +- if (!DFA_ALIVE(gb2312) && !DFA_ALIVE(utf8) && !DFA_ALIVE(gb18030)) { ++ if (!DFA_ALIVE(gb2312) && !DFA_ALIVE(utf8) && !DFA_ALIVE(gb18030) && !DFA_ALIVE(big5)) { + /* we ran out the possibilities */ + return NULL; + } +@@ -323,6 +330,8 @@ + return "UTF-8"; + if (top == &gb18030) + return "GB18030"; ++ if (top == &big5) ++ return "BIG5"; + return NULL; + } + diff --git a/app-i18n/libguess/libguess-0.2.0-r1.ebuild b/app-i18n/libguess/libguess-0.2.0-r1.ebuild new file mode 100644 index 0000000..fd7d349 --- /dev/null +++ b/app-i18n/libguess/libguess-0.2.0-r1.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: + +inherit eutils + +EXT_VER="d7" + +DESCRIPTION="LibGuess is Encoding Detection Library for Japanese, Chinese, Korean and Thai Languages" +SRC_URI="http://www.honeyplanet.jp/${P}-${EXT_VER}.tar.gz" +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="x86 amd64" + +S=${WORKDIR}/${P}-${EXT_VER} + +src_unpack() { + unpack ${P}-${EXT_VER}.tar.gz || die + epatch "${FILESDIR}"/libguess-ds-cn.patch || die +} + +src_compile() { + sed -i'' -e "s/\-o libguess.so/\-o libguess.so \$(LDFLAGS)/" Makefile || die + make || die +} + +src_install() { + into /usr + mkdir -p ${D}/usr/lib || die + mkdir -p ${D}/usr/include || die + make install PREFIX=${D}/usr || die + + # Fix links + rm ${D}/usr/lib/libguess.{so,so.0,a} + ln -s libguess.so.${PV} ${D}/usr/lib/libguess.so.0 + ln -s libguess.so.0 ${D}/usr/lib/libguess.so + + # Fix multilib + [ $(get_libdir) == "lib" ] || mv "${D}/usr/lib" "${D}/usr/$(get_libdir)" +} |