summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaohiro Aota <naota@gentoo.org>2012-05-15 04:20:28 +0000
committerNaohiro Aota <naota@gentoo.org>2012-05-15 04:20:28 +0000
commit2d1a63b795a45224a43b1242a39c90066176b65e (patch)
tree9020bf008a1f4a1ee94e5ee3b3727a1f6f1ed303 /www-client/w3m
parentUpdate support to libav-0.8 api (diff)
downloadhistorical-2d1a63b795a45224a43b1242a39c90066176b65e.tar.gz
historical-2d1a63b795a45224a43b1242a39c90066176b65e.tar.bz2
historical-2d1a63b795a45224a43b1242a39c90066176b65e.zip
Add support for the button tags. #413797
Package-Manager: portage-2.2.0_alpha100/cvs/Linux x86_64
Diffstat (limited to 'www-client/w3m')
-rw-r--r--www-client/w3m/ChangeLog8
-rw-r--r--www-client/w3m/Manifest28
-rw-r--r--www-client/w3m/files/w3m-0.5.3-button.patch439
-rw-r--r--www-client/w3m/w3m-0.5.3-r2.ebuild119
4 files changed, 583 insertions, 11 deletions
diff --git a/www-client/w3m/ChangeLog b/www-client/w3m/ChangeLog
index ae8d33f768fe..e7beaf65387e 100644
--- a/www-client/w3m/ChangeLog
+++ b/www-client/w3m/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for www-client/w3m
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-client/w3m/ChangeLog,v 1.69 2012/05/13 11:41:18 ago Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-client/w3m/ChangeLog,v 1.70 2012/05/15 04:20:28 naota Exp $
+
+*w3m-0.5.3-r2 (15 May 2012)
+
+ 15 May 2012; Naohiro Aota <naota@gentoo.org> +files/w3m-0.5.3-button.patch,
+ +w3m-0.5.3-r2.ebuild:
+ Add support for the button tags. #413797
13 May 2012; Agostino Sarubbo <ago@gentoo.org> w3m-0.5.3-r1.ebuild:
Stable for amd64, wrt bug #415281
diff --git a/www-client/w3m/Manifest b/www-client/w3m/Manifest
index 3a130435dce7..815b6417d373 100644
--- a/www-client/w3m/Manifest
+++ b/www-client/w3m/Manifest
@@ -1,9 +1,10 @@
-----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA512
+Hash: SHA256
AUX w3m-0.5.2-ambwidth.patch 13634 RMD160 21d967a5b6816e55aac12a161e575121065a336f SHA1 a9a040d2e9b17ed5ca454a0133e525a0ec542ba2 SHA256 9cad290d4c0122964ecb674e636fb7551b400b4f32a2697ca15d68e2fe8cf4ce
AUX w3m-0.5.2-form.patch 309 RMD160 8f208c562fdce59ef97009e373925a33815a3dcd SHA1 e703286d1a67e67b2b052ef9806e202a5ef434ec SHA256 a0e6084c82db55c746cd00410c8781887fd52b61eca86a8a61269570622c41bf
AUX w3m-0.5.2-gc72.patch 769 RMD160 475b22c156c6be49729e9a563d5d5493ba249c4d SHA1 d0332b8dcdf3fac1f91485d6858ad8c8b25ada69 SHA256 6a6a736db1edc3936a604d7b63512510158b4decfbdadaff85f7bf14d6377a86
+AUX w3m-0.5.3-button.patch 14325 RMD160 06cf86a847065ab0527a015a4eee5151f41470ed SHA1 1ffab809894da7d504afd694d2808a2b0065c561 SHA256 acdc0032e213b610d5f6cf0ca15d7370572f736918c165e962badb5c73ac5982
AUX w3m-0.5.3-glibc214.patch 1673 RMD160 ab4f6e18287a960e15350f0d90c3e564eda1c86b SHA1 c0270149250c180cbfc88eacb917cbe5f0ed5fa9 SHA256 9cad0a1ba6a15d28a705d43d7d82621d18e298d771c750b01809eed935b0370d
AUX w3m-0.5.3-parallel-make.patch 351 RMD160 d253ca9e1e47e67c31ad1320573d034447022d42 SHA1 11fb11ba105cfbbf695eb9fa299a7ea0ea84c01c SHA256 606ecdf4b41a49f71efd76a24e6f69fb9aa2ef69d0d27f2e1a7ad42e3a1e47db
AUX w3m-CVE-2010-2074.patch 1597 RMD160 2a0f198a18ddec42ac070a9433d39177a41860f1 SHA1 e7e9502af2e749fff7e173c5eb6e27158591f5b8 SHA256 3ceb88f635f2b26509acf99c4817d746f4bd50f2cb6ff3152e919fdfb234d0e2
@@ -12,17 +13,24 @@ DIST w3m-0.5.2.tar.gz 1906812 RMD160 09ce72d8ef5e621a2e49496b63e22f2773edbe79 SH
DIST w3m-0.5.3.tar.gz 2202328 RMD160 6a0153bc53f7c107c700404262ce1b4d02e6dd91 SHA1 444b6c8cf7094ee95f8e9de96b37f814b9d83237 SHA256 e994d263f2fd2c22febfbe45103526e00145a7674a0fda79c822b97c2770a9e3
EBUILD w3m-0.5.2-r4.ebuild 3333 RMD160 8953d6e3673bd3407e213c2fc48100a4172d7838 SHA1 44878214cf86bcb665881f4c8ea1e36000ff0671 SHA256 ac6e7acb0a51dc91f394bbdadbcf72bc66328a02911a529487e3bd957d6f0b26
EBUILD w3m-0.5.3-r1.ebuild 3347 RMD160 dffca9fe68126c4244e5f0ead317ec695e787d0a SHA1 7757fab1460581c9c596bc033c96c02475f73c12 SHA256 e9430f95347ec9f732787aa8dfc5b4166713e99829759687e76945e853c1996d
+EBUILD w3m-0.5.3-r2.ebuild 3424 RMD160 5e47a9d6349d9880add81a78f246cadf994949cc SHA1 646c7407a18e736c78744b0da1515fb45da852b6 SHA256 74831d1153fd0bcb0ab4a90ca5925e2b81259f204f33621f272f7caaf022c945
EBUILD w3m-0.5.3.ebuild 3206 RMD160 340e06493c4f73a476bab19d3289da1dfcdd41c8 SHA1 cf3bd6d1d5223ddd80ce13496eb38fa696e343cd SHA256 d480a07179bb6b5c609d203cd6aa5f839ea2e7409965f6bb0026d883b3dd4d6c
-MISC ChangeLog 19708 RMD160 0ed3482a887cc76084ead48f4fa4449cdbc6213f SHA1 a4bd27fa2f5a40d1c63d880c767252e14a5edfdc SHA256 d030e2688a875ecea60d7199940fb33ad5b7e96667fe38079b6a2f73560b93d9
+MISC ChangeLog 19885 RMD160 bf11a3e2fe5a6850884871d3141411a21d2ed6ce SHA1 16b336e60849dac22f8a71ab126a554d7391341e SHA256 155728ad00646a1235f352f1de3a21b99bf5408042fad1900de35459ae2df067
MISC metadata.xml 237 RMD160 795d70d06b61c12bd15a97e596afed87747e7553 SHA1 a1a1f21305275c396fb2784bb261595fbf510a6f SHA256 58936b557c67f7e90052564817055decab28947a9934d0b889fa5d7e2901ba6d
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.17 (GNU/Linux)
+Version: GnuPG v2.0.19 (GNU/Linux)
-iQEcBAEBCgAGBQJPr53iAAoJEOTDgjZ80txdczcH/A1G5XcMPb1SVIuLUl/dDeKY
-M+ciEwUvCda0lcsg7nb81UWfkePPyMxMhmXz/dm3lIYXXJuZBGjG4H2V7KruySXO
-exfBLUSTnkHgT1jyhd9hZ1N10HCnVUKyqpVkqdRnORGBJs+nHw4wmL9E/dIaA09y
-6aFlHrcIV1O3m192QcwyvyypvNHWk0f0ywAHhz8bkkbHsuLdWMmhWmq8qakbxsac
-RnnXSKkYa/6R5dlQxr/rAfrAuEvfGih0NjZP1DyFbJ0i7QRs3njmUd725grEg97U
-mN6InodUc75Wjt/g4n3gddATMFsXenOIU7kA0JIzja2tFfDGoLLO/gn/zITSzio=
-=uXKL
+iQIcBAEBCAAGBQJPsdl9AAoJEDYO1FT4VRUUXnAP/3x/AT4IuliLim4yVp6q1cu5
+4ROvVSDtAuyAA4TzU/RibCotVLU+2XgucBj2Co+pVtJamYPnnzK/FlqbSIQYOCnl
+CP9fA0uJPsvjopJuKpPsx4FGj2O+cUGDN0CrG/gEImTWwPs6S3Ffziz7Q2YrGmAO
+fNW4Vm+ZM6u5bNRyTI/3Y11e8sryfrjX6yIUCTex/n0UDPLaTXPwyQGo3Qg7myQy
+9WkXRURkJooBRAe9gIX7LkDPRRvxkX44XukCYo/P3TxlEFcDV3SKgHQS06zox3bE
+wQVvLzl7EgSmWQL5cWLeOCDufe8IpGgnxH8NTpntW7+b2dChSn/jUDWAe3JcwGJg
+3/x0Bch310j2xEY4RvflwU3UprhRYEL182Yx1b2tdC/AmqoSMFy3HyKe3MH3jTki
+15rP45oFhfMbC3V7p3sOjJGC34s/vucrVZBGKU43ws+dlK9a9+GcXOYCQdazvzbq
+rlOHNwS+jMEnaiAV/+DuOdNoxgLZifaUgbSW7WzyBsJsT8IzGBzzCIUpjgdt7+S5
+x768g8at5NxErYZ/Wr+kXPjmgDLYu+0id7x58v7izx4NskZ4uL+XBWxxVuzf0JTG
+8K9qVPImEzR+C2HW5h84q3rzt1isKCZI0Ig3AekDu5f02w4MoaS4rDrh/22OR1Tg
+mSrjTerW1MdNA35hwRnh
+=EtlU
-----END PGP SIGNATURE-----
diff --git a/www-client/w3m/files/w3m-0.5.3-button.patch b/www-client/w3m/files/w3m-0.5.3-button.patch
new file mode 100644
index 000000000000..a645e2563776
--- /dev/null
+++ b/www-client/w3m/files/w3m-0.5.3-button.patch
@@ -0,0 +1,439 @@
+Description: Support the button element as defined in HTML 4.01
+Origin: upstream, http://www.sic.med.tohoku.ac.jp/~satodai/w3m-dev/201009.month/4411.html
+Bug-Debian: http://bugs.debian.org/136810
+
+Index: file.c
+===================================================================
+RCS file: /cvsroot/w3m/w3m/file.c,v
+retrieving revision 1.264
+diff -u -r1.264 file.c
+--- w3m.orig/file.c 3 Aug 2010 10:02:16 -0000 1.264
++++ w3m/file.c 17 Sep 2010 12:18:55 -0000
+@@ -2467,6 +2467,7 @@
+ bcopy((void *)&obuf->anchor, (void *)&obuf->bp.anchor,
+ sizeof(obuf->anchor));
+ obuf->bp.img_alt = obuf->img_alt;
++ obuf->bp.input_alt = obuf->input_alt;
+ obuf->bp.in_bold = obuf->in_bold;
+ obuf->bp.in_italic = obuf->in_italic;
+ obuf->bp.in_under = obuf->in_under;
+@@ -2484,6 +2485,7 @@
+ bcopy((void *)&obuf->bp.anchor, (void *)&obuf->anchor,
+ sizeof(obuf->anchor));
+ obuf->img_alt = obuf->bp.img_alt;
++ obuf->input_alt = obuf->bp.input_alt;
+ obuf->in_bold = obuf->bp.in_bold;
+ obuf->in_italic = obuf->bp.in_italic;
+ obuf->in_under = obuf->bp.in_under;
+@@ -2727,7 +2729,7 @@
+ Str line = obuf->line, pass = NULL;
+ char *hidden_anchor = NULL, *hidden_img = NULL, *hidden_bold = NULL,
+ *hidden_under = NULL, *hidden_italic = NULL, *hidden_strike = NULL,
+- *hidden_ins = NULL, *hidden = NULL;
++ *hidden_ins = NULL, *hidden_input, *hidden = NULL;
+
+ #ifdef DEBUG
+ if (w3m_debug) {
+@@ -2759,6 +2761,12 @@
+ hidden = hidden_img;
+ }
+ }
++ if (obuf->input_alt.in) {
++ if ((hidden_input = has_hidden_link(obuf, HTML_INPUT_ALT)) != NULL) {
++ if (!hidden || hidden_input < hidden)
++ hidden = hidden_input;
++ }
++ }
+ if (obuf->in_bold) {
+ if ((hidden_bold = has_hidden_link(obuf, HTML_B)) != NULL) {
+ if (!hidden || hidden_bold < hidden)
+@@ -2810,6 +2818,8 @@
+ Strcat_charp(line, "</a>");
+ if (obuf->img_alt && !hidden_img)
+ Strcat_charp(line, "</img_alt>");
++ if (obuf->input_alt.in && !hidden_input)
++ Strcat_charp(line, "</input_alt>");
+ if (obuf->in_bold && !hidden_bold)
+ Strcat_charp(line, "</b>");
+ if (obuf->in_italic && !hidden_italic)
+@@ -3020,6 +3030,18 @@
+ Strcat_charp(tmp, "\">");
+ push_tag(obuf, tmp->ptr, HTML_IMG_ALT);
+ }
++ if (!hidden_input && obuf->input_alt.in) {
++ Str tmp;
++ if (obuf->input_alt.hseq > 0)
++ obuf->input_alt.hseq = - obuf->input_alt.hseq;
++ tmp = Sprintf("<INPUT_ALT hseq=\"%d\" fid=\"%d\" name=\"%s\" type=\"%s\" value=\"%s\">",
++ obuf->input_alt.hseq,
++ obuf->input_alt.fid,
++ obuf->input_alt.name->ptr,
++ obuf->input_alt.type->ptr,
++ obuf->input_alt.value->ptr);
++ push_tag(obuf, tmp->ptr, HTML_INPUT_ALT);
++ }
+ if (!hidden_bold && obuf->in_bold)
+ push_tag(obuf, "<B>", HTML_B);
+ if (!hidden_italic && obuf->in_italic)
+@@ -3730,6 +3752,63 @@
+ }
+
+ Str
++process_button(struct parsed_tag *tag)
++{
++ Str tmp = NULL;
++ char *p, *q, *r, *qq = NULL;
++ int qlen, v;
++
++ if (cur_form_id < 0) {
++ char *s = "<form_int method=internal action=none>";
++ tmp = process_form(parse_tag(&s, TRUE));
++ }
++ if (tmp == NULL)
++ tmp = Strnew();
++
++ p = "submit";
++ parsedtag_get_value(tag, ATTR_TYPE, &p);
++ q = NULL;
++ parsedtag_get_value(tag, ATTR_VALUE, &q);
++ r = "";
++ parsedtag_get_value(tag, ATTR_NAME, &r);
++
++ v = formtype(p);
++ if (v == FORM_UNKNOWN)
++ return NULL;
++
++ if (!q) {
++ switch (v) {
++ case FORM_INPUT_SUBMIT:
++ case FORM_INPUT_BUTTON:
++ q = "SUBMIT";
++ break;
++ case FORM_INPUT_RESET:
++ q = "RESET";
++ break;
++ }
++ }
++ if (q) {
++ qq = html_quote(q);
++ qlen = strlen(q);
++ }
++
++ // Strcat_charp(tmp, "<pre_int>");
++ Strcat(tmp, Sprintf("<input_alt hseq=\"%d\" fid=\"%d\" type=%s "
++ "name=\"%s\" value=\"%s\">",
++ cur_hseq++, cur_form_id, p, html_quote(r), qq));
++ return tmp;
++}
++
++Str
++process_n_button(void)
++{
++ Str tmp = Strnew();
++ Strcat_charp(tmp, "</input_alt>");
++ // Strcat_charp(tmp, "</pre_int>");
++ return tmp;
++}
++
++Str
+ process_select(struct parsed_tag *tag)
+ {
+ Str tmp = NULL;
+@@ -4859,7 +4938,35 @@
+ if (i > obuf->bottom_margin)
+ obuf->bottom_margin = i;
+ }
++ if (parsedtag_get_value(tag, ATTR_HSEQ, &hseq)) {
++ obuf->input_alt.hseq = hseq;
++ }
++ if (parsedtag_get_value(tag, ATTR_FID, &i)) {
++ obuf->input_alt.fid = i;
++ }
++ if (parsedtag_get_value(tag, ATTR_TYPE, &p)) {
++ obuf->input_alt.type = Strnew_charp(p);
++ }
++ if (parsedtag_get_value(tag, ATTR_VALUE, &p)) {
++ obuf->input_alt.value = Strnew_charp(p);
++ }
++ if (parsedtag_get_value(tag, ATTR_NAME, &p)) {
++ obuf->input_alt.name = Strnew_charp(p);
++ }
++ obuf->input_alt.in = 1;
+ return 0;
++ case HTML_N_INPUT_ALT:
++ if (obuf->input_alt.in) {
++ if (!close_effect0(obuf, HTML_INPUT_ALT))
++ push_tag(obuf, "</input_alt>", HTML_N_INPUT_ALT);
++ obuf->input_alt.hseq = 0;
++ obuf->input_alt.fid = -1;
++ obuf->input_alt.in = 0;
++ obuf->input_alt.type = NULL;
++ obuf->input_alt.name = NULL;
++ obuf->input_alt.value = NULL;
++ }
++ return 1;
+ case HTML_TABLE:
+ close_anchor(h_env, obuf);
+ obuf->table_level++;
+@@ -4968,6 +5075,16 @@
+ case HTML_INPUT:
+ close_anchor(h_env, obuf);
+ tmp = process_input(tag);
++ if (tmp)
++ HTMLlineproc1(tmp->ptr, h_env);
++ return 1;
++ case HTML_BUTTON:
++ tmp = process_button(tag);
++ if (tmp)
++ HTMLlineproc1(tmp->ptr, h_env);
++ return 1;
++ case HTML_N_BUTTON:
++ tmp = process_n_button();
+ if (tmp)
+ HTMLlineproc1(tmp->ptr, h_env);
+ return 1;
+@@ -5680,6 +5797,21 @@
+ putHmarker(buf->hmarklist, currentLn(buf),
+ hpos, hseq - 1);
+ }
++ else if (hseq < 0) {
++ int h = -hseq - 1;
++ int hpos = pos;
++ if (*str == '[')
++ hpos++;
++ if (buf->hmarklist &&
++ h < buf->hmarklist->nmark &&
++ buf->hmarklist->marks[h].invalid) {
++ buf->hmarklist->marks[h].pos = hpos;
++ buf->hmarklist->marks[h].line = currentLn(buf);
++ buf->hmarklist->marks[h].invalid = 0;
++ hseq = -hseq;
++ }
++ }
++
+ if (!form->target)
+ form->target = buf->baseTarget;
+ if (a_textarea &&
+@@ -6747,6 +6879,12 @@
+ obuf->nobr_level = 0;
+ bzero((void *)&obuf->anchor, sizeof(obuf->anchor));
+ obuf->img_alt = 0;
++ obuf->input_alt.hseq = 0;
++ obuf->input_alt.fid = -1;
++ obuf->input_alt.in = 0;
++ obuf->input_alt.type = NULL;
++ obuf->input_alt.name = NULL;
++ obuf->input_alt.value = NULL;
+ obuf->in_bold = 0;
+ obuf->in_italic = 0;
+ obuf->in_under = 0;
+@@ -6782,6 +6920,15 @@
+ push_tag(obuf, "</img_alt>", HTML_N_IMG_ALT);
+ obuf->img_alt = NULL;
+ }
++ if (obuf->input_alt.in) {
++ push_tag(obuf, "</input_alt>", HTML_N_INPUT_ALT);
++ obuf->input_alt.hseq = 0;
++ obuf->input_alt.fid = -1;
++ obuf->input_alt.in = 0;
++ obuf->input_alt.type = NULL;
++ obuf->input_alt.name = NULL;
++ obuf->input_alt.value = NULL;
++ }
+ if (obuf->in_bold) {
+ push_tag(obuf, "</b>", HTML_N_B);
+ obuf->in_bold = 0;
+Index: fm.h
+===================================================================
+RCS file: /cvsroot/w3m/w3m/fm.h,v
+retrieving revision 1.149
+diff -u -r1.149 fm.h
+--- w3m.orig/fm.h 20 Aug 2010 09:47:09 -0000 1.149
++++ w3m/fm.h 17 Sep 2010 12:18:55 -0000
+@@ -562,6 +562,13 @@
+ #define INIT_BUFFER_WIDTH ((_INIT_BUFFER_WIDTH > 0) ? _INIT_BUFFER_WIDTH : 0)
+ #define FOLD_BUFFER_WIDTH (FoldLine ? (INIT_BUFFER_WIDTH + 1) : -1)
+
++struct input_alt_attr {
++ int hseq;
++ int fid;
++ int in;
++ Str type, name, value;
++};
++
+ typedef struct {
+ int pos;
+ int len;
+@@ -569,6 +576,7 @@
+ long flag;
+ Anchor anchor;
+ Str img_alt;
++ struct input_alt_attr input_alt;
+ char fontstat[FONTSTAT_SIZE];
+ short nobr_level;
+ Lineprop prev_ctype;
+@@ -591,6 +599,7 @@
+ short nobr_level;
+ Anchor anchor;
+ Str img_alt;
++ struct input_alt_attr input_alt;
+ char fontstat[FONTSTAT_SIZE];
+ char fontstat_stack[FONT_STACK_SIZE][FONTSTAT_SIZE];
+ int fontstat_sp;
+Index: html.c
+===================================================================
+RCS file: /cvsroot/w3m/w3m/html.c,v
+retrieving revision 1.32
+diff -u -r1.32 html.c
+--- w3m.orig/html.c 14 Aug 2010 01:29:40 -0000 1.32
++++ w3m/html.c 17 Sep 2010 12:18:55 -0000
+@@ -56,6 +56,9 @@
+ ATTR_CORE
+ };
+ #define MAXA_INPUT MAXA_CORE + 12
++unsigned char ALST_BUTTON[] =
++ { ATTR_TYPE, ATTR_VALUE, ATTR_NAME, ATTR_CORE };
++#define MAXA_BUTTON MAXA_CORE + 3
+ unsigned char ALST_TEXTAREA[] =
+ { ATTR_COLS, ATTR_ROWS, ATTR_NAME, ATTR_READONLY, ATTR_CORE };
+ #define MAXA_TEXTAREA MAXA_CORE + 4
+@@ -247,24 +250,24 @@
+ {"/bdo", NULL, 0, TFLG_END}, /* 121 HTML_N_BDO */
+ {"big", ALST_NOP, MAXA_NOP, 0}, /* 122 HTML_BIG */
+ {"/big", NULL, 0, TFLG_END}, /* 123 HTML_N_BIG */
+- {"button", ALST_NOP, MAXA_NOP, 0}, /* 124 HTML_BUTTON */
+- {"fieldset", ALST_NOP, MAXA_NOP, 0}, /* 125 HTML_FIELDSET */
+- {"/fieldset", NULL, 0, TFLG_END}, /* 126 HTML_N_FIELDSET */
+- {"iframe", ALST_NOP, MAXA_NOP, 0}, /* 127 HTML_IFRAME */
+- {"label", ALST_NOP, MAXA_NOP, 0}, /* 128 HTML_LABEL */
+- {"/label", NULL, 0, TFLG_END}, /* 129 HTML_N_LABEL */
+- {"legend", ALST_NOP, MAXA_NOP, 0}, /* 130 HTML_LEGEND */
+- {"/legend", NULL, 0, TFLG_END}, /* 131 HTML_N_LEGEND */
+- {"noscript", ALST_NOP, MAXA_NOP, 0}, /* 132 HTML_NOSCRIPT */
+- {"/noscript", NULL, 0, TFLG_END}, /* 133 HTML_N_NOSCRIPT */
+- {"object", ALST_NOP, MAXA_NOP, 0}, /* 134 HTML_OBJECT */
+- {"optgroup", ALST_NOP, MAXA_NOP, 0}, /* 135 HTML_OPTGROUP */
+- {"/optgroup", NULL, 0, TFLG_END}, /* 136 HTML_N_OPTGROUP */
+- {"param", ALST_NOP, MAXA_NOP, 0}, /* 137 HTML_PARAM */
+- {"small", ALST_NOP, MAXA_NOP, 0}, /* 138 HTML_SMALL */
+- {"/small", NULL, 0, TFLG_END}, /* 139 HTML_N_SMALL */
++ {"button", ALST_BUTTON, MAXA_BUTTON, 0}, /* 124 HTML_BUTTON */
++ {"/button", NULL, 0, TFLG_END}, /* 125 HTML_N_BUTTON */
++ {"fieldset", ALST_NOP, MAXA_NOP, 0}, /* 126 HTML_FIELDSET */
++ {"/fieldset", NULL, 0, TFLG_END}, /* 127 HTML_N_FIELDSET */
++ {"iframe", ALST_NOP, MAXA_NOP, 0}, /* 128 HTML_IFRAME */
++ {"label", ALST_NOP, MAXA_NOP, 0}, /* 129 HTML_LABEL */
++ {"/label", NULL, 0, TFLG_END}, /* 130 HTML_N_LABEL */
++ {"legend", ALST_NOP, MAXA_NOP, 0}, /* 131 HTML_LEGEND */
++ {"/legend", NULL, 0, TFLG_END}, /* 132 HTML_N_LEGEND */
++ {"noscript", ALST_NOP, MAXA_NOP, 0}, /* 133 HTML_NOSCRIPT */
++ {"/noscript", NULL, 0, TFLG_END}, /* 134 HTML_N_NOSCRIPT */
++ {"object", ALST_NOP, MAXA_NOP, 0}, /* 135 HTML_OBJECT */
++ {"optgroup", ALST_NOP, MAXA_NOP, 0}, /* 136 HTML_OPTGROUP */
++ {"/optgroup", NULL, 0, TFLG_END}, /* 137 HTML_N_OPTGROUP */
++ {"param", ALST_NOP, MAXA_NOP, 0}, /* 138 HTML_PARAM */
++ {"small", ALST_NOP, MAXA_NOP, 0}, /* 139 HTML_SMALL */
++ {"/small", NULL, 0, TFLG_END}, /* 140 HTML_N_SMALL */
+
+- {NULL, NULL, 0, 0}, /* 140 Undefined */
+ {NULL, NULL, 0, 0}, /* 141 Undefined */
+ {NULL, NULL, 0, 0}, /* 142 Undefined */
+ {NULL, NULL, 0, 0}, /* 143 Undefined */
+Index: html.h
+===================================================================
+RCS file: /cvsroot/w3m/w3m/html.h,v
+retrieving revision 1.31
+diff -u -r1.31 html.h
+--- w3m.orig/html.h 14 Aug 2010 01:29:40 -0000 1.31
++++ w3m/html.h 17 Sep 2010 12:18:55 -0000
+@@ -214,21 +214,22 @@
+ #define HTML_BIG 122
+ #define HTML_N_BIG 123
+ #define HTML_BUTTON 124
+-#define HTML_FIELDSET 125
+-#define HTML_N_FIELDSET 126
+-#define HTML_IFRAME 127
+-#define HTML_LABEL 128
+-#define HTML_N_LABEL 129
+-#define HTML_LEGEND 130
+-#define HTML_N_LEGEND 131
+-#define HTML_NOSCRIPT 132
+-#define HTML_N_NOSCRIPT 133
+-#define HTML_OBJECT 134
+-#define HTML_OPTGROUP 135
+-#define HTML_N_OPTGROUP 136
+-#define HTML_PARAM 137
+-#define HTML_SMALL 138
+-#define HTML_N_SMALL 139
++#define HTML_N_BUTTON 125
++#define HTML_FIELDSET 126
++#define HTML_N_FIELDSET 127
++#define HTML_IFRAME 128
++#define HTML_LABEL 129
++#define HTML_N_LABEL 130
++#define HTML_LEGEND 131
++#define HTML_N_LEGEND 132
++#define HTML_NOSCRIPT 133
++#define HTML_N_NOSCRIPT 134
++#define HTML_OBJECT 135
++#define HTML_OPTGROUP 136
++#define HTML_N_OPTGROUP 137
++#define HTML_PARAM 138
++#define HTML_SMALL 139
++#define HTML_N_SMALL 140
+
+ /* pseudo tag */
+ #define HTML_SELECT_INT 160
+Index: proto.h
+===================================================================
+RCS file: /cvsroot/w3m/w3m/proto.h,v
+retrieving revision 1.104
+diff -u -r1.104 proto.h
+--- w3m.orig/proto.h 25 Jul 2010 09:55:05 -0000 1.104
++++ w3m/proto.h 17 Sep 2010 12:18:55 -0000
+@@ -207,6 +207,8 @@
+ extern Str process_img(struct parsed_tag *tag, int width);
+ extern Str process_anchor(struct parsed_tag *tag, char *tagbuf);
+ extern Str process_input(struct parsed_tag *tag);
++extern Str process_button(struct parsed_tag *tag);
++extern Str process_n_button(void);
+ extern Str process_select(struct parsed_tag *tag);
+ extern Str process_n_select(void);
+ extern void feed_select(char *str);
+Index: table.c
+===================================================================
+RCS file: /cvsroot/w3m/w3m/table.c,v
+retrieving revision 1.58
+diff -u -r1.58 table.c
+--- w3m.orig/table.c 9 Aug 2010 11:59:19 -0000 1.58
++++ w3m/table.c 17 Sep 2010 12:18:55 -0000
+@@ -2878,6 +2878,14 @@
+ tmp = process_input(tag);
+ feed_table1(tbl, tmp, mode, width);
+ break;
++ case HTML_BUTTON:
++ tmp = process_button(tag);
++ feed_table1(tbl, tmp, mode, width);
++ break;
++ case HTML_N_BUTTON:
++ tmp = process_n_button();
++ feed_table1(tbl, tmp, mode, width);
++ break;
+ case HTML_SELECT:
+ tmp = process_select(tag);
+ if (tmp)
+Index: tagtable.tab
+===================================================================
+RCS file: /cvsroot/w3m/w3m/tagtable.tab,v
+retrieving revision 1.14
+diff -u -r1.14 tagtable.tab
+--- w3m.orig/tagtable.tab 14 Aug 2010 01:29:40 -0000 1.14
++++ w3m/tagtable.tab 17 Sep 2010 12:18:55 -0000
+@@ -176,6 +176,7 @@
+ big HTML_BIG
+ /big HTML_N_BIG
+ button HTML_BUTTON
++/button HTML_N_BUTTON
+ fieldset HTML_FIELDSET
+ /fieldset HTML_N_FIELDSET
+ iframe HTML_IFRAME
diff --git a/www-client/w3m/w3m-0.5.3-r2.ebuild b/www-client/w3m/w3m-0.5.3-r2.ebuild
new file mode 100644
index 000000000000..0bcec32fcf4d
--- /dev/null
+++ b/www-client/w3m/w3m-0.5.3-r2.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-client/w3m/w3m-0.5.3-r2.ebuild,v 1.1 2012/05/15 04:20:28 naota Exp $
+
+EAPI="3"
+inherit eutils
+
+DESCRIPTION="Text based WWW browser, supports tables and frames"
+HOMEPAGE="http://w3m.sourceforge.net/"
+SRC_URI="mirror://sourceforge/w3m/${P}.tar.gz"
+
+LICENSE="w3m"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris"
+IUSE="X fbcon gpm gtk imlib lynxkeymap migemo nls nntp ssl unicode vanilla xface linguas_ja"
+
+# We cannot build w3m with gtk+2 w/o X because gtk+2 ebuild doesn't
+# allow us to build w/o X, so we have to give up framebuffer w3mimg....
+DEPEND=">=sys-libs/ncurses-5.2-r3
+ >=sys-libs/zlib-1.1.3-r2
+ >=dev-libs/boehm-gc-6.2
+ X? ( x11-libs/libXext x11-libs/libXdmcp )
+ gtk? ( x11-libs/gtk+:2 )
+ !gtk? ( imlib? ( >=media-libs/imlib2-1.1.0 ) )
+ xface? ( media-libs/compface )
+ gpm? ( >=sys-libs/gpm-1.19.3-r5 )
+ migemo? ( >=app-text/migemo-0.40 )
+ ssl? ( >=dev-libs/openssl-0.9.6b )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${PN}-0.5.2-gc72.patch" \
+ "${FILESDIR}/${PN}-0.5.3-parallel-make.patch" \
+ "${FILESDIR}/${PN}-0.5.3-glibc214.patch"
+ use vanilla || \
+ epatch "${FILESDIR}"/${PN}-0.5.3-button.patch
+ find . -name CVS -type d | xargs rm -r
+}
+
+src_configure() {
+ local myconf migemo_command imagelibval imageval
+
+ if use gtk ; then
+ imagelibval="gtk2"
+ elif use imlib ; then
+ imagelibval="imlib2"
+ fi
+
+ if [ ! -z "${imagelibval}" ] ; then
+ use X && imageval="${imageval}${imageval:+,}x11"
+ use X && use fbcon && imageval="${imageval}${imageval:+,}fb"
+ fi
+
+ if use migemo ; then
+ migemo_command="migemo -t egrep ${EPREFIX}/usr/share/migemo/migemo-dict"
+ else
+ migemo_command="no"
+ fi
+
+ # emacs-w3m doesn't like "--enable-m17n --disable-unicode,"
+ # so we better enable or disable both. Default to enable
+ # m17n and unicode, see bug #47046.
+ if use linguas_ja ; then
+ if use unicode ; then
+ myconf="${myconf} --enable-japanese=U"
+ else
+ myconf="${myconf} --enable-japanese=E"
+ fi
+ elif use unicode ; then
+ myconf="${myconf} --with-charset=UTF-8"
+ else
+ myconf="${myconf} --with-charset=US-ASCII"
+ fi
+
+ # lynxkeymap IUSE flag. bug #49397
+ if use lynxkeymap ; then
+ myconf="${myconf} --enable-keymap=lynx"
+ else
+ myconf="${myconf} --enable-keymap=w3m"
+ fi
+
+ econf \
+ --with-editor="${EPREFIX}/usr/bin/vi" \
+ --with-mailer="${EPREFIX}/bin/mail" \
+ --with-browser="${EPREFIX}/usr/bin/xdg-open" \
+ --with-termlib=ncurses \
+ --enable-image=${imageval:-no} \
+ --with-imagelib="${imagelibval:-no}" \
+ --with-migemo="${migemo_command}" \
+ --enable-m17n \
+ --enable-unicode \
+ $(use_enable gpm mouse) \
+ $(use_enable nls) \
+ $(use_enable nntp) \
+ $(use_enable ssl digest-auth) \
+ $(use_with ssl) \
+ $(use_enable xface) \
+ ${myconf} || die
+}
+
+src_install() {
+
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ # http://www.sic.med.tohoku.ac.jp/~satodai/w3m-dev/200307.month/3944.html
+ insinto /etc/${PN}
+ newins "${FILESDIR}/${PN}.mailcap" mailcap || die
+
+ insinto /usr/share/${PN}/Bonus
+ doins Bonus/* || die
+ dodoc README NEWS TODO ChangeLog || die
+ docinto doc-en ; dodoc doc/* || die
+ if use linguas_ja ; then
+ docinto doc-jp ; dodoc doc-jp/* || die
+ else
+ rm -rf "${ED}"/usr/share/man/ja || die
+ fi
+}