summaryrefslogtreecommitdiff
path: root/app-i18n/canfep
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-i18n/canfep
reinit the tree, so we can have metadata
Diffstat (limited to 'app-i18n/canfep')
-rw-r--r--app-i18n/canfep/Manifest9
-rw-r--r--app-i18n/canfep/canfep-1.0-r1.ebuild44
-rw-r--r--app-i18n/canfep/canfep-1.0.ebuild39
-rw-r--r--app-i18n/canfep/files/canfep-posix-pty.patch67
-rw-r--r--app-i18n/canfep/files/canfep-termcap.patch266
-rw-r--r--app-i18n/canfep/metadata.xml8
6 files changed, 433 insertions, 0 deletions
diff --git a/app-i18n/canfep/Manifest b/app-i18n/canfep/Manifest
new file mode 100644
index 000000000000..7c75f77355f1
--- /dev/null
+++ b/app-i18n/canfep/Manifest
@@ -0,0 +1,9 @@
+AUX canfep-posix-pty.patch 1674 SHA256 c5cbe8b90ca37eac0348585db0c3ee67ca13a801cd2f2720625315046e83cced SHA512 dc02c9fca1e964f04c7fc223fee7935d5e68d25699bb279327904ac2ce042a9cf9fc02e4f1c4e59515c931a6a157861d113e685a8484242b791c367d132d5f7b WHIRLPOOL 883c2f7e5973d7a116e120165933f171770eb661e96dba1c77a42a6045c8917b8055ee6cf5d9e9b1bc0a1712b636088fbd30f4814bc450951fd3e163adf732f0
+AUX canfep-termcap.patch 6533 SHA256 be272bc9823da3eeec109f6efbedc3e81bb02cc7c13243c9a961f705b8831ef8 SHA512 7ebaf5745bdc8b1aa1bd07879fe51c3c6410c1475f9e44535bf863f9ab0b7ee6ac0f3dca852c22036ae2ecfababfd976a0c3027ad9d33e3aae7e289c00bd60bc WHIRLPOOL e235a2770edf344599c8c128b2e2f5749f2313c9523c146bef1de49fbde1346433fbbcc480e0bae69d318fa9a93758d23a3047ab21d321796ab6ffac17d157b8
+DIST canfep-1.0.tar.gz 8067 SHA256 124a204b56a70b0ec1f6c96f32cc499065020910f12e4f9749d29c9c2fdb2d4f SHA512 0fd7c8ca56282fa537b76fe33f46e03d4f0f4727528ccad95cd4726888372da9158fc8bed2cdc67d645defb479040cd4a4d0999f69d38fd8b4080f7ece4e67d6 WHIRLPOOL 49b44552073d90b6079bb9141b885095203a662042eaa24ccc09e14120b2aa3f0a384ac38a94dbdeecb29979d41ff3db63360676567df1832f13f1cbca3e1574
+DIST canfep_utf8.diff 7152 SHA256 d1f0210354bbc2d21caed5fb521d90eea65674c8251c32df8fe070d6b7965da8 SHA512 32d946b8b78efd3b95736738497fe46a7d0e2383f2b665c8af79270d7b0d1404ca051e63fc67375f0b953b8f604475c8d6b2d683089bc97b098fa9524b89208c WHIRLPOOL 97c6cae11c6839460c5d8364c54e5ffaaad486e888b72fa8dd8cf1f98dce3dd62026ab23bfd1262ffab82eda08d46a0efc0fc8fc6d806d7d6504b1df5241cf85
+EBUILD canfep-1.0-r1.ebuild 980 SHA256 2bedab8ae2cba662fe36dfbb667b50b3598e9c404ab46024d2ad5ba8c3662656 SHA512 57c102baccceafdbbf894576a9e0b338c8c0213b1d51cd41e93f8a9414aae37881e1101e9a05cbadac35ce31e6f4d57c49cd60f980987932a7415df408492054 WHIRLPOOL ef1d9fe333fa5a1082e1f7cfb2d62baf626f7b9352063775a581152ef674648aa2fbd58074f92ae59c4846560aa5a5f8d76616fee92525325863eacd19628fe3
+EBUILD canfep-1.0.ebuild 893 SHA256 a72ee99f4dae429acdd2616942e6b947614324ca061afbc7f1b72a4f15bbece7 SHA512 7970b0c9ce1fdd16e933c5f3c5b82216f9ab212433881ff51d0020e13fb05d4d96dd150ba0c305701e9c9029575aa5c52875bb61049962a47c5cb3c45f68b939 WHIRLPOOL 509b925d1c36ad688000596318e67da0573147629c325b524d0fb69cb4ae18e35d6076d4e5a18fd259b0eb0a46529d9db7d6e719cd73e518306078d450139dca
+MISC ChangeLog 2420 SHA256 80496a2054c82b9b617f5ed70a1a49731cf1cfc4a5f5798dbb849ae657b94748 SHA512 fc242e8c79a1f448b34b72ec5d634bccab5e64d388c75b8d7745eadabcafaddb73b4e05564d2bfb851e16dbf030bcf7177cbef8ee7b824826943b67569934c08 WHIRLPOOL 64683a2d97245eca9a9801cf8b09f94e53253f53f8c0d46b9ec1de6d415afc7605dfdb2b681af270f8245e12b96facdd3dd79c4698b390eedc3bf1ec7a47e6fe
+MISC ChangeLog-2015 861 SHA256 17fd952169c330e2a387c51751c1600abea7aa6f36ac4d99e3aba9b5e43b004b SHA512 d40e1f4ffcc2743cccd4d077adfa333ce1239950c8bf5d9ec6e58c93e94c4bef8aae874ab89fe865a3b6ecc7cb5d2d968f96ac77f60c35cb6ac600b63adaea7b WHIRLPOOL 92a7c93131dc8fa077ba27f9336e10aba56e3ac2111b39a81d88e9eb642e473a5654dbb749e18cff3d9106087360e1d2ad727420bf3a1dbeef20858a678787ed
+MISC metadata.xml 240 SHA256 4351b96b5a18595fae67161f1207f22bbf99e9a2235b95b68975cfc9f5baff54 SHA512 12aaa73d9b690de68a5c7b20e214ceb099efa87884b784eafd994f26032b44dcb66e7feac8a5b1df7f349ac05c5a198a7593dff2cc686de158cb21e4c54f38dd WHIRLPOOL d279940dd88c4b1caa478907576d5732c8376e3f99830950c6c18c63dca78c7d0ec1983660e5cbd4da0133b961ef38dc8460650cb48467298542e04005cffc2c
diff --git a/app-i18n/canfep/canfep-1.0-r1.ebuild b/app-i18n/canfep/canfep-1.0-r1.ebuild
new file mode 100644
index 000000000000..d46bf3258374
--- /dev/null
+++ b/app-i18n/canfep/canfep-1.0-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Canna Japanese kana-kanji frontend processor on console"
+HOMEPAGE="http://www.geocities.co.jp/SiliconValley-Bay/7584/canfep/"
+SRC_URI="http://www.geocities.co.jp/SiliconValley-Bay/7584/${PN}/${P}.tar.gz
+ unicode? ( http://hp.vector.co.jp/authors/VA020411/patches/${PN}_utf8.diff )"
+
+LICENSE="canfep"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"
+IUSE="unicode"
+
+RDEPEND="app-i18n/canna
+ sys-libs/ncurses:="
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-posix-pty.patch
+ "${FILESDIR}"/${PN}-termcap.patch
+)
+
+src_prepare() {
+ use unicode && eapply "${DISTDIR}"/${PN}_utf8.diff
+ sed -i 's/$(CFLAGS)/$(CFLAGS) $(LDFLAGS)/' Makefile
+
+ default
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCXX)" \
+ LIBS="-lcanna $(pkg-config --libs ncurses)"
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc 00{changes,readme}
+}
diff --git a/app-i18n/canfep/canfep-1.0.ebuild b/app-i18n/canfep/canfep-1.0.ebuild
new file mode 100644
index 000000000000..a290748825da
--- /dev/null
+++ b/app-i18n/canfep/canfep-1.0.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Canna Japanese kana-kanji frontend processor on console"
+HOMEPAGE="http://www.geocities.co.jp/SiliconValley-Bay/7584/canfep/"
+SRC_URI="http://www.geocities.co.jp/SiliconValley-Bay/7584/${PN}/${P}.tar.gz
+ unicode? ( http://hp.vector.co.jp/authors/VA020411/patches/${PN}_utf8.diff )"
+
+LICENSE="canfep"
+SLOT="0"
+KEYWORDS="-alpha ~amd64 ppc ~sparc x86"
+IUSE="unicode"
+
+RDEPEND="app-i18n/canna
+ sys-libs/ncurses:="
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ use unicode && eapply "${DISTDIR}"/${PN}_utf8.diff
+ sed -i 's/$(CFLAGS)/$(CFLAGS) $(LDFLAGS)/' Makefile
+
+ default
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCXX)" \
+ LIBS="-lcanna $(pkg-config --libs ncurses)"
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc 00{changes,readme}
+}
diff --git a/app-i18n/canfep/files/canfep-posix-pty.patch b/app-i18n/canfep/files/canfep-posix-pty.patch
new file mode 100644
index 000000000000..caa451232ef4
--- /dev/null
+++ b/app-i18n/canfep/files/canfep-posix-pty.patch
@@ -0,0 +1,67 @@
+https://bugs.gentoo.org/show_bug.cgi?id=212709
+
+Author: OKUMURA N. Shin-ya <oku.ns@dream.com>
+
+--- a/pty.C
++++ b/pty.C
+@@ -257,6 +257,23 @@
+ }
+ }
+
++#if defined(_POSIX_C_SOURCE)
++ // BSD pty が開けないので、POSIX の方法を試す
++ if ((master = posix_openpt(O_RDWR)) >= 0) {
++ if (grantpt(master) == 0 && unlockpt(master) == 0) {
++ // マスタデバイス名は固定
++ strcpy(line, "/dev/ptmx");
++ tcgetattr(0, &tt);
++ tt.c_iflag &= ~ISTRIP;
++ ioctl(0, TIOCGWINSZ, (char*) &win);
++ return;
++ }
++ close(master);
++ } else {
++ perror("/dev/ptmx");
++ }
++#endif // _POSIX_C_SOURCE
++
+ printf("Out of pty's\n");
+ fail();
+ }
+@@ -265,12 +282,36 @@
+ void
+ Pty::getslave()
+ {
++#if defined(_POSIX_C_SOURCE)
++ // マスタデバイスが POSIX 方式の場合
++ if (strcmp(line, "/dev/ptmx") == 0) {
++ char *slave_devname = ptsname(master);
++ if (slave_devname == NULL) {
++ perror("ptsname");
++ fail();
++ }
++ slave = open(slave_devname, O_RDWR);
++ if (slave < 0) {
++ perror(slave_devname);
++ fail();
++ }
++ strcpy(line, slave_devname);
++ } else {
++ line[strlen("/dev/")] = 't';
++ slave = open(line, O_RDWR);
++ if (slave < 0) {
++ perror(line);
++ fail();
++ }
++ }
++#else // ! _POSIX_C_SOURCE
+ line[strlen("/dev/")] = 't';
+ slave = open(line, O_RDWR);
+ if (slave < 0) {
+ perror(line);
+ fail();
+ }
++#endif // _POSIX_C_SOURCE
+ tcsetattr(slave, TCSAFLUSH, &tt);
+ if (!hs)
+ win.ws_row--;
diff --git a/app-i18n/canfep/files/canfep-termcap.patch b/app-i18n/canfep/files/canfep-termcap.patch
new file mode 100644
index 000000000000..afd215b07e79
--- /dev/null
+++ b/app-i18n/canfep/files/canfep-termcap.patch
@@ -0,0 +1,266 @@
+--- a/pty.C
++++ b/pty.C
+@@ -4,9 +4,18 @@
+ int Pty::child = 0;
+ struct termios Pty::tt;
+ int Pty::wfd = 0;
++char Pty::buf[] = "";
++char Pty::funcstr[] = "";
+ int Pty::hs = 0;
++char* Pty::so = 0;
++char* Pty::se = 0;
++char* Pty::us = 0;
++char* Pty::ue = 0;
++char* Pty::sc = 0;
++char* Pty::rc = 0;
+ char* Pty::ce = 0;
+ char* Pty::ts = 0;
++char* Pty::fs = 0;
+ char* Pty::ds = 0;
+ char Pty::endstr[] = "";
+ char Pty::endmsg[] = "";
+@@ -14,88 +23,7 @@
+ // コンストラクタだよん
+ Pty::Pty(int ac, char** av, char* amsg, char* emsg)
+ {
+- // 環境変数 TERM のエントリを取得
+- char buff[BUFSIZ];
+- char* term = getenv("TERM");
+- if (!term)
+- term = "vt100";
+- int ret = tgetent(buff, term);
+- if (ret != 1) {
+- tgetent(buff, "vt100");
+- putenv("TERM=vt100");
+- }
+-
+- // termcap から装飾用のエントリを取ってくる
+- char funcstr[BUFSIZ];
+- char* pt = funcstr;
+-
+- // スタンドアウト (反転)
+- so = tgetstr("so", &pt);
+- adjstr(so);
+- se = tgetstr("se", &pt);
+- adjstr(se);
+-
+- // アンダーライン (下線)
+- us = tgetstr("us", &pt);
+- adjstr(us);
+- ue = tgetstr("ue", &pt);
+- adjstr(ue);
+-
+- // カーソル位置の保存,保存した位置への復帰
+- sc = tgetstr("sc", &pt);
+- adjstr(sc);
+- rc = tgetstr("rc", &pt);
+- adjstr(rc);
+-
+- // カーソル位置から行の最後までを削除する
+- ce = tgetstr("ce", &pt);
+- adjstr(ce);
+-
+- // ステータスラインを持っているかどうか
+- hs = tgetflag("hs");
+-
+- // kon と jfbterm ではステータスラインを使わない
+- if (strcmp(term, "kon") == 0)
+- hs = 0;
+- if (strcmp(term, "jfbterm") == 0)
+- hs = 0;
+-
+- // ステータスラインへ移動,戻る
+- if (hs) {
+- ts = tgoto(tgetstr("ts", &pt), 0, 0);
+- adjstr(ts);
+- fs = tgetstr("fs", &pt);
+- adjstr(fs);
+- ds = tgetstr("ds", &pt);
+- adjstr(ds);
+- if (ds) {
+- strcat(endstr, ds);
+- strcat(endstr, ce);
+- }
+- }
+- else {
+- char* cs = tgoto(tgetstr("cs", &pt), tgetnum("li") - 2, 0);
+- adjstr(cs);
+- if (cs) {
+- write(1, ce, strlen(ce));
+- write(1, cs, strlen(cs));
+- }
+- char* cl = tgetstr("cl", &pt);
+- adjstr(cl);
+- if (cl) {
+- write(1, cl, strlen(cl));
+- strcat(endstr, cl);
+- }
+- ds = tgoto(tgetstr("cs", &pt), tgetnum("li") - 1, 0);
+- adjstr(ds);
+- if (ds) {
+- strcat(endstr, ds);
+- strcat(endstr, ce);
+- }
+- ts = tgoto(tgetstr("cm", &pt), 0, tgetnum("li") - 1);
+- adjstr(ts);
+- fs = rc;
+- }
++ gettermcap();
+
+ // 開始と終了のメッセージ
+ if (amsg && ac == 1)
+@@ -209,21 +137,75 @@
+ done();
+ }
+
+-// termcap エントリからパディングを削除する
+ void
+-Pty::adjstr(char* str)
++Pty::gettermcap()
+ {
+- char* sp = strdup(str);
+- char* p = sp;
+- while (*p != '\0') {
+- if (strncmp(p, "$<", 2) == 0) {
+- while (*p != '>')
+- p++;
+- *p = '\0';
++ // 環境変数 TERM のエントリを取得
++ char* term = getenv("TERM");
++ if (!term)
++ term = "vt100";
++ int ret = tgetent(buf, term);
++ if (ret != 1) {
++ tgetent(buf, "vt100");
++ putenv("TERM=vt100");
++ }
++
++ // termcap から装飾用のエントリを取ってくる
++ char* pt = funcstr;
++
++ // スタンドアウト (反転)
++ so = tgetstr("so", &pt);
++ se = tgetstr("se", &pt);
++
++ // アンダーライン (下線)
++ us = tgetstr("us", &pt);
++ ue = tgetstr("ue", &pt);
++
++ // カーソル位置の保存,保存した位置への復帰
++ sc = tgetstr("sc", &pt);
++ rc = tgetstr("rc", &pt);
++
++ // カーソル位置から行の最後までを削除する
++ ce = tgetstr("ce", &pt);
++
++ // ステータスラインを持っているかどうか
++ hs = tgetflag("hs");
++
++ // kon と jfbterm ではステータスラインを使わない
++ if (strcmp(term, "kon") == 0)
++ hs = 0;
++ if (strcmp(term, "jfbterm") == 0)
++ hs = 0;
++
++ // ステータスラインへ移動,戻る
++ if (hs) {
++ ts = tgoto(tgetstr("ts", &pt), 0, 0);
++ fs = tgetstr("fs", &pt);
++ ds = tgetstr("ds", &pt);
++ if (ds) {
++ strcat(endstr, ds);
++ strcat(endstr, ce);
+ }
+- *str++ = *p++;
+ }
+- free(sp);
++ else {
++ char* cs = tgoto(tgetstr("cs", &pt), tgetnum("li") - 2, 0);
++ if (cs) {
++ write(1, ce, strlen(ce));
++ write(1, cs, strlen(cs));
++ }
++ char* cl = tgetstr("cl", &pt);
++ if (cl) {
++ write(1, cl, strlen(cl));
++ strcat(endstr, cl);
++ }
++ ds = tgoto(tgetstr("cs", &pt), tgetnum("li") - 1, 0);
++ if (ds) {
++ strcat(endstr, ds);
++ strcat(endstr, ce);
++ }
++ ts = tgoto(tgetstr("cm", &pt), 0, tgetnum("li") - 1);
++ fs = rc;
++ }
+ }
+
+ // マスタデバイスを取る
+@@ -327,34 +309,7 @@
+ {
+ signal(SIGWINCH, SIG_IGN);
+
+- // ステータスラインが使えない場合は cs/ds/ts を取り直す
+- if (!hs) {
+- char buff[BUFSIZ];
+- char* term = getenv("TERM");
+- tgetent(buff, term);
+- char funcstr[BUFSIZ];
+- char* pt = funcstr;
+- char* cs = tgoto(tgetstr("cs", &pt), tgetnum("li") - 2, 0);
+- adjstr(cs);
+- if (cs) {
+- write(1, ce, strlen(ce));
+- write(1, cs, strlen(cs));
+- }
+- char* cl = tgetstr("cl", &pt);
+- adjstr(cl);
+- if (cl) {
+- write(1, cl, strlen(cl));
+- strcpy(endstr, cl);
+- }
+- ds = tgoto(tgetstr("cs", &pt), tgetnum("li") - 1, 0);
+- adjstr(ds);
+- if (ds) {
+- strcat(endstr, ds);
+- strcat(endstr, ce);
+- }
+- ts = tgoto(tgetstr("cm", &pt), 0, tgetnum("li") - 1);
+- adjstr(ts);
+- }
++ gettermcap();
+
+ // ウィンドウのサイズを設定し直す (stty -a の 行数/桁数 等)
+ struct winsize win;
+--- a/pty.H
++++ b/pty.H
+@@ -50,18 +50,21 @@
+ int rfd;
+ static int wfd;
+ private:
+- static void adjstr(char* str);
++ static char buf[BUFSIZ];
++ static char funcstr[BUFSIZ];
++private:
++ static void gettermcap();
+ protected:
+ static int hs;
+- char* so;
+- char* se;
+- char* us;
+- char* ue;
+- char* sc;
+- char* rc;
++ static char* so;
++ static char* se;
++ static char* us;
++ static char* ue;
++ static char* sc;
++ static char* rc;
+ static char* ce;
+ static char* ts;
+- char* fs;
++ static char* fs;
+ static char* ds;
+ private:
+ static void finish();
diff --git a/app-i18n/canfep/metadata.xml b/app-i18n/canfep/metadata.xml
new file mode 100644
index 000000000000..e1a49f498885
--- /dev/null
+++ b/app-i18n/canfep/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 type="project">
+ <email>cjk@gentoo.org</email>
+ <name>Cjk</name>
+ </maintainer>
+</pkgmetadata>