summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2008-02-09 11:52:30 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2008-02-09 11:52:30 +0000
commit922b7338e220ee517ebdd529764c0fd7de0a1722 (patch)
treeb3ca535ae55073f0c15a4446f246d245ea41c479 /app-editors/fte
parentFix mc to work with slang 2.1.3. (diff)
downloadhistorical-922b7338e220ee517ebdd529764c0fd7de0a1722.tar.gz
historical-922b7338e220ee517ebdd529764c0fd7de0a1722.tar.bz2
historical-922b7338e220ee517ebdd529764c0fd7de0a1722.zip
Fix fte to work with slang 2.1.3.
Package-Manager: portage-2.1.4.1
Diffstat (limited to 'app-editors/fte')
-rw-r--r--app-editors/fte/ChangeLog8
-rw-r--r--app-editors/fte/Manifest5
-rw-r--r--app-editors/fte/files/fte-slang.patch131
-rw-r--r--app-editors/fte/fte-20051115.ebuild11
4 files changed, 146 insertions, 9 deletions
diff --git a/app-editors/fte/ChangeLog b/app-editors/fte/ChangeLog
index 2f45caf58444..34579c2cc871 100644
--- a/app-editors/fte/ChangeLog
+++ b/app-editors/fte/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for app-editors/fte
-# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-editors/fte/ChangeLog,v 1.42 2007/07/22 08:45:36 omp Exp $
+# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-editors/fte/ChangeLog,v 1.43 2008/02/09 11:52:30 drac Exp $
+
+ 09 Feb 2008; Samuli Suominen <drac@gentoo.org> +files/fte-slang.patch,
+ fte-20051115.ebuild:
+ Fix fte to work with slang 2.1.3.
22 Jul 2007; David Shakaryan <omp@gentoo.org> fte-20020324-r2.ebuild,
fte-20050108-r3.ebuild, fte-20051115.ebuild:
diff --git a/app-editors/fte/Manifest b/app-editors/fte/Manifest
index 05171db05a1b..ae0a5b1031ce 100644
--- a/app-editors/fte/Manifest
+++ b/app-editors/fte/Manifest
@@ -2,6 +2,7 @@ AUX configpath.patch 572 RMD160 bb7a6c4770c3490f44587f2cf0c9060154941615 SHA1 32
AUX fte 604 RMD160 7d4b76fadc215c8e8f1c410f4212f5ebcb0dbfff SHA1 4a33bfe442b7c14a355b7f195678cf751bcdba21 SHA256 ab2f22eb5fe1d1df82c0f976a457979f66b0c4f605fb69baba46d50204021f0c
AUX fte-gcc34 1092 RMD160 d78b030cde6da6beeef6fe225468e2b388b099cc SHA1 08b03caeea2dfb2e664f5c88a33d54a53bd4ce24 SHA256 c3f452a0b72182c50a2f3057a10d749d8a304890b0844ad9ee572cf4ebf83811
AUX fte-new_keyword.patch 340 RMD160 05ab1d867f830814255834bb35226a0c1712c485 SHA1 936f1080189d90b5191d00c9bf607823acc1beee SHA256 c30c5c216ee481a6e1fe964d12998b5b36e288d30883f9ced88fca60ab7253b8
+AUX fte-slang.patch 3595 RMD160 4a16c00a29e84bfec5ea179d19d044f3f92aef4f SHA1 511df0fe643ec06e7b199be1804115e964430a24 SHA256 9bd83f97782446fb7ed7dbfca735f8302fa0bc6e0130b5cef05ba54106e8f372
DIST fte-20020324-common.zip 184928 RMD160 9e2658b65658462e79b2503004c136eed3b76588 SHA1 673eb4cfbca14a04057876bea9278e570be215e5 SHA256 c20f9abc9c5a8e9efa47b8e0a27f9f666d8aa63cdd20d45b4ecbe64caf888800
DIST fte-20020324-src.zip 625459 RMD160 15b9115ecb188f212d24b3f2c8373138f7652f85 SHA1 f76d750ad1d69a93a228ce0bebcc602d1fa86fae SHA256 d91379505ed99b0adba078c17c00db3ca88ea291db9e581739b2c2d7411bd48e
DIST fte-20050108-common.zip 186252 RMD160 e482e2d224162b0c1a9e16d3821f2256bcd3c176 SHA1 3dcd62148d31507733ed7387858c98364cf94292 SHA256 8350045541a36df625d5615f14f9febb3614624b2e6a4f7e776a93f7e4d55921
@@ -10,6 +11,6 @@ DIST fte-20051115-common.zip 187849 RMD160 07b0406abd9dfafcce83b39d175bac54ad6bc
DIST fte-20051115-src.zip 549216 RMD160 0db9941c1dfeb48a651b004590ef0cac9bfdf4b7 SHA1 2ef22f36b523c7c89ccff93849b7b9009b9065d9 SHA256 bb4135e5c39223fa346d20613052e69090b14ed46855d5134bf2dbc4ba40d962
EBUILD fte-20020324-r2.ebuild 1778 RMD160 40cfe681f15ab022ff705029f4710f80c7690a2e SHA1 b7d6c2d048d9b90da508c73e3e718d67f747be49 SHA256 967c0802044d7f104f507a926101f1e1581e5707e8b9ba2011e9fa8c1e895dd9
EBUILD fte-20050108-r3.ebuild 2112 RMD160 2a1e2fa0bd4d5ebc01609fc6524068136e6a9c57 SHA1 fa8e82b9a273a35af444c1ee832eb93982e1e899 SHA256 108bcf1fb1ed455ac32c19c7786d347036ed03e6b8bba141f8462ab00a3f4f0e
-EBUILD fte-20051115.ebuild 2093 RMD160 6c3e5f9d94f522241c69548deba443bbea42329c SHA1 f89c5963e203e4fdcd8b9259f6a4617e7dd3672a SHA256 a2a659a6074e7a82c1c50d145d52c85b5eb6bfb1b180e91699f52ce3ab4e2c74
-MISC ChangeLog 6578 RMD160 4ae441b671b96f1bb58ee11b0bc68b151e393d38 SHA1 6bbe48d7c045e01466f322905dc2825c5f1a5373 SHA256 d6c9c5260a66da7ecf880cd76d37a19fe28afe9cbb6cd6bb8add9e15fad093c3
+EBUILD fte-20051115.ebuild 2140 RMD160 0be9b0a9a9db284a052aadc3e5f1c1fe93711358 SHA1 cf926ffe718ff447c660b70881df5d300caa48d7 SHA256 46bed8895de114f3b5a3a1e35ae5bae1280344f45508d51342727d209e6040a9
+MISC ChangeLog 6712 RMD160 a3e7201eb4e601a1c6faa9a48b658dfd68f875c9 SHA1 70b551e5dc542ab0055152fb0a146bc02b79495e SHA256 f79c346e9a815976cc437e9a83ce810c49fccaf4472c860eaf34bb969ba3dc98
MISC metadata.xml 339 RMD160 44e3b1b9ab2233175c8e911e5a4cecf48f091256 SHA1 09899b913d87f132809a52f03ed97f46f17694b8 SHA256 3f3e49bb8203f32507cc563ddc9c09368a1f1403e2786e204fbd2b528ede185d
diff --git a/app-editors/fte/files/fte-slang.patch b/app-editors/fte/files/fte-slang.patch
new file mode 100644
index 000000000000..d591dbc3fa22
--- /dev/null
+++ b/app-editors/fte/files/fte-slang.patch
@@ -0,0 +1,131 @@
+diff -Nru /tmp/wgHyQebD7F/fte-0.50.0/src/con_slang.cpp /tmp/PQJo4szkUb/fte-0.50.0/src/con_slang.cpp
+--- /tmp/wgHyQebD7F/fte-0.50.0/src/con_slang.cpp 2005-12-28 16:53:24.000000000 +0100
++++ /tmp/PQJo4szkUb/fte-0.50.0/src/con_slang.cpp 2006-06-05 06:02:37.000000000 +0200
+@@ -99,12 +99,14 @@
+ '+'
+ };
+
+-static char raw_dchs[sizeof(slang_dchs)];
++static SLsmg_Char_Type raw_dchs[sizeof(slang_dchs)];
+
+-static unsigned char ftesl_get_dch(char raw)
++static unsigned char ftesl_get_dch(SLsmg_Char_Type raw)
+ {
+ for (int i = 0; i < (int) sizeof(slang_dchs); i++)
+- if (raw_dchs[i] == raw)
++ if (raw_dchs[i].nchars == raw.nchars
++ && !memcmp(raw_dchs[i].wchars, raw.wchars,
++ raw.nchars * sizeof(*raw.wchars)))
+ return DCH_SLANG_C1 + i;
+ return DCH_SLANG_EOL;
+ }
+@@ -215,7 +217,6 @@
+ int ConInit(int /*XSize */ , int /*YSize */ )
+ {
+ unsigned i;
+- unsigned short linebuf[sizeof(slang_dchs)];
+
+ SLtt_get_terminfo();
+
+@@ -246,9 +247,7 @@
+ SLsmg_write_nchars(slang_dchs, sizeof(slang_dchs));
+
+ SLsmg_gotorc(0, 0);
+- SLsmg_read_raw((SLsmg_Char_Type*)linebuf, sizeof(slang_dchs));
+- for (i = 0; i < sizeof(slang_dchs); i++)
+- raw_dchs[i] = (linebuf[i]) & 0xff;
++ SLsmg_read_raw(raw_dchs, sizeof(slang_dchs));
+
+ SLsmg_set_char_set(0);
+
+@@ -361,14 +360,14 @@
+ return 0;
+ }
+
+-static int ConPutBoxRaw(int X, int Y, int W, int H, unsigned short *box)
++static int ConPutBoxRaw(int X, int Y, int W, int H, SLsmg_Char_Type *box)
+ {
+ int CurX, CurY;
+
+ ConQueryCursorPos(&CurX, &CurY);
+ while (H > 0) {
+ SLsmg_gotorc(Y++, X);
+- SLsmg_write_raw((SLsmg_Char_Type*)box, W);
++ SLsmg_write_raw(box, W);
+ box += W;
+ H--;
+ }
+@@ -381,35 +380,51 @@
+ int ConGetBox(int X, int Y, int W, int H, PCell Cell)
+ {
+ int CurX, CurY, i;
+- char ch;
++ SLsmg_Char_Type *linebuf;
++
++ linebuf = new SLsmg_Char_Type [W];
+
+ ConQueryCursorPos(&CurX, &CurY);
+ while (H > 0) {
+ SLsmg_gotorc(Y++, X);
+- SLsmg_read_raw((SLsmg_Char_Type*)Cell, W);
+- for (i = 0; i < W; i++)
+- if (Cell[i] & 0x8000) {
+- ch = Cell[i] & 0xff;
+- Cell[i] &= 0x7f00;
+- Cell[i] |= ftesl_get_dch(ch);
+- }
++ SLsmg_read_raw(linebuf, W);
++ for (i = 0; i < W; i++) {
++ if (linebuf[i].color & SLSMG_ACS_MASK)
++ Cell[i] = ftesl_get_dch(linebuf[i]);
++ else
++ /*
++ * FIXME: Handle UTF-8 -- way beyond a quick-and-dirty
++ * fix. --MV
++ */
++ Cell[i] = SLSMG_EXTRACT_CHAR(linebuf[i]);
++ /*
++ * FIXME: This preserves only 7 out of 15 bits of color.
++ * Fortunately, we're dealing with color handles rather than
++ * colors themselves -- S-Lang jumps through an extra hoop to
++ * map these to color data. As long as we use less than 127
++ * different colors, things should be OK. I think. --MV
++ */
++ Cell[i] |= (linebuf[i].color & 0x7f) << 8;
++ }
+ Cell += W;
+ H--;
+ }
+ ConSetCursorPos(CurX, CurY);
+
++ delete [] (linebuf);
++
+ return 0;
+
+ }
+
+-static int ConGetBoxRaw(int X, int Y, int W, int H, unsigned short *box)
++static int ConGetBoxRaw(int X, int Y, int W, int H, SLsmg_Char_Type *box)
+ {
+ int CurX, CurY;
+
+ ConQueryCursorPos(&CurX, &CurY);
+ while (H > 0) {
+ SLsmg_gotorc(Y++, X);
+- SLsmg_read_raw((SLsmg_Char_Type*)box, W);
++ SLsmg_read_raw(box, W);
+ box += W;
+ H--;
+ }
+@@ -451,9 +466,9 @@
+
+ int ConScroll(int Way, int X, int Y, int W, int H, TAttr Fill, int Count)
+ {
+- unsigned short *box;
++ SLsmg_Char_Type *box;
+
+- box = new unsigned short [W * H];
++ box = new SLsmg_Char_Type [W * H];
+
+ TCell fill = (((unsigned) Fill) << 8) | ' ';
+
diff --git a/app-editors/fte/fte-20051115.ebuild b/app-editors/fte/fte-20051115.ebuild
index e2ba8ea58a73..c9ded0462b21 100644
--- a/app-editors/fte/fte-20051115.ebuild
+++ b/app-editors/fte/fte-20051115.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-editors/fte/fte-20051115.ebuild,v 1.7 2007/07/22 08:45:36 omp Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-editors/fte/fte-20051115.ebuild,v 1.8 2008/02/09 11:52:30 drac Exp $
inherit eutils
@@ -38,10 +38,11 @@ src_unpack() {
unpack ${P}-src.zip
unpack ${P}-common.zip
- cd ${S}
+ cd "${S}"
- epatch ${FILESDIR}/fte-gcc34
- epatch ${FILESDIR}/${PN}-new_keyword.patch
+ epatch "${FILESDIR}"/fte-gcc34
+ epatch "${FILESDIR}"/${PN}-new_keyword.patch
+ epatch "${FILESDIR}"/${PN}-slang.patch
set_targets
sed \