summaryrefslogtreecommitdiff
path: root/app-i18n/canfep
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-i18n/canfep
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-i18n/canfep')
-rw-r--r--app-i18n/canfep/Manifest7
-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, 431 insertions, 0 deletions
diff --git a/app-i18n/canfep/Manifest b/app-i18n/canfep/Manifest
new file mode 100644
index 000000000000..53e07f570b29
--- /dev/null
+++ b/app-i18n/canfep/Manifest
@@ -0,0 +1,7 @@
+AUX canfep-posix-pty.patch 1674 BLAKE2B dfeda6e249501ed6b5a8bd185dbd9df735bd9f0825cf29ff83abdec9b7514f91f0a9eca61a4291a9dd9982262eb92f40db185630b6a89573de364b855ac1097f SHA512 dc02c9fca1e964f04c7fc223fee7935d5e68d25699bb279327904ac2ce042a9cf9fc02e4f1c4e59515c931a6a157861d113e685a8484242b791c367d132d5f7b
+AUX canfep-termcap.patch 6533 BLAKE2B c8e9ffa84390bac88e6ad1fc30e47d237a6fc10d3f8b727a730358faa69d76a24ddb9b1467d695eed691ceb9e1b5558baf12d45178e44b642fb3fc7ff0f9d36d SHA512 7ebaf5745bdc8b1aa1bd07879fe51c3c6410c1475f9e44535bf863f9ab0b7ee6ac0f3dca852c22036ae2ecfababfd976a0c3027ad9d33e3aae7e289c00bd60bc
+DIST canfep-1.0.tar.gz 8067 BLAKE2B 1a6e8af357d2b7aaccf442b0f8bab577ed05a5a0fdf2fb4c189105c2c41f739c2e559e740584bf393fcc52d3f3bd0bb6216e06e2b685f62f7dded9d576e95bed SHA512 0fd7c8ca56282fa537b76fe33f46e03d4f0f4727528ccad95cd4726888372da9158fc8bed2cdc67d645defb479040cd4a4d0999f69d38fd8b4080f7ece4e67d6
+DIST canfep_utf8.diff 7152 BLAKE2B e3848d5119b01d3296c93b5ed8495c6f93ecb1ef39f168d6e1685636055295b8f7277c6b680cadb648fe6847c92e3b038a9b5a9a58f23fe3490dcbe675bcc96f SHA512 32d946b8b78efd3b95736738497fe46a7d0e2383f2b665c8af79270d7b0d1404ca051e63fc67375f0b953b8f604475c8d6b2d683089bc97b098fa9524b89208c
+EBUILD canfep-1.0-r1.ebuild 980 BLAKE2B f3681c10cd62315c8f3f31f5a216b6a2ab6d36ffb9fb09d3a5ad6d1db85c0c8414d351342ad7b4b17035fd78ccca11ce42ada2dacb81f5efdea24048dd2c14a0 SHA512 57c102baccceafdbbf894576a9e0b338c8c0213b1d51cd41e93f8a9414aae37881e1101e9a05cbadac35ce31e6f4d57c49cd60f980987932a7415df408492054
+EBUILD canfep-1.0.ebuild 893 BLAKE2B ad7563343f58d9e831d31ad9f3cec03f833aaa0d09a15cbb5a3ab2a57b809435ad153858f003a0d2947d3e06d2248af93b79b5575d0483501700de4adc3504b6 SHA512 7970b0c9ce1fdd16e933c5f3c5b82216f9ab212433881ff51d0020e13fb05d4d96dd150ba0c305701e9c9029575aa5c52875bb61049962a47c5cb3c45f68b939
+MISC metadata.xml 240 BLAKE2B 3e01f599fdbafa5c02b594007c673bcfcccb41559bd2f42d7ea60a1f13932335cecf353c1216e8feba4bb091385b57f05c4c8b3c62eed6c7bea41e308fc6115c SHA512 12aaa73d9b690de68a5c7b20e214ceb099efa87884b784eafd994f26032b44dcb66e7feac8a5b1df7f349ac05c5a198a7593dff2cc686de158cb21e4c54f38dd
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>