summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonnie Berkholz <dberkholz@gentoo.org>2006-09-09 20:20:41 +0000
committerDonnie Berkholz <dberkholz@gentoo.org>2006-09-09 20:20:41 +0000
commit4cc0d29c148599700efee594343a3faacbbf7205 (patch)
tree6ce101946ed5f479a3bee3e1f1e29ed910af4045 /dev-libs/newt
parentPass kernel ARCH-var also at configure-time (necessary for rlim checks) (diff)
downloadgentoo-2-4cc0d29c148599700efee594343a3faacbbf7205.tar.gz
gentoo-2-4cc0d29c148599700efee594343a3faacbbf7205.tar.bz2
gentoo-2-4cc0d29c148599700efee594343a3faacbbf7205.zip
Bump. A cleaner build system allows some cleaning of the ebuild. Also add patches from Red Hat to fix various bugs that didn't merit a version bump. New USE=tcl.
(Portage version: 2.1.1_rc1-r7)
Diffstat (limited to 'dev-libs/newt')
-rw-r--r--dev-libs/newt/ChangeLog15
-rw-r--r--dev-libs/newt/files/digest-newt-0.52.23
-rw-r--r--dev-libs/newt/files/newt-0.52.2-cbtpos.patch11
-rw-r--r--dev-libs/newt/files/newt-0.52.2-colors.patch31
-rw-r--r--dev-libs/newt/files/newt-0.52.2-cursor.patch10
-rw-r--r--dev-libs/newt/files/newt-0.52.2-dwchar.patch128
-rw-r--r--dev-libs/newt/files/newt-0.52.2-focus.patch236
-rw-r--r--dev-libs/newt/files/newt-0.52.2-notcl.patch45
-rw-r--r--dev-libs/newt/files/newt-0.52.2-pgupdown-crash.patch37
-rw-r--r--dev-libs/newt/files/newt-0.52.2-pyexample.patch10
-rw-r--r--dev-libs/newt/files/newt-0.52.2-screensize.patch49
-rw-r--r--dev-libs/newt/files/newt-0.52.2-scrollbars.patch21
-rw-r--r--dev-libs/newt/newt-0.52.2.ebuild80
13 files changed, 675 insertions, 1 deletions
diff --git a/dev-libs/newt/ChangeLog b/dev-libs/newt/ChangeLog
index 9d110841f60b..c0bad8aefed6 100644
--- a/dev-libs/newt/ChangeLog
+++ b/dev-libs/newt/ChangeLog
@@ -1,6 +1,19 @@
# ChangeLog for dev-libs/newt
# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/newt/ChangeLog,v 1.27 2006/07/27 23:26:31 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/newt/ChangeLog,v 1.28 2006/09/09 20:20:41 dberkholz Exp $
+
+*newt-0.52.2 (09 Sep 2006)
+
+ 09 Sep 2006; Donnie Berkholz <dberkholz@gentoo.org>;
+ +files/newt-0.52.2-cbtpos.patch, +files/newt-0.52.2-colors.patch,
+ +files/newt-0.52.2-cursor.patch, +files/newt-0.52.2-dwchar.patch,
+ +files/newt-0.52.2-focus.patch, +files/newt-0.52.2-notcl.patch,
+ +files/newt-0.52.2-pgupdown-crash.patch,
+ +files/newt-0.52.2-pyexample.patch, +files/newt-0.52.2-screensize.patch,
+ +files/newt-0.52.2-scrollbars.patch, +newt-0.52.2.ebuild:
+ Bump. A cleaner build system allows some cleaning of the ebuild. Also add
+ patches from Red Hat to fix various bugs that didn't merit a version bump.
+ New USE=tcl.
28 Jul 2006; Christian Zoffoli <xmerlin@gentoo.org>
newt-0.50.35-r2.ebuild, newt-0.50.35-r3.ebuild, newt-0.50.35-r4.ebuild,
diff --git a/dev-libs/newt/files/digest-newt-0.52.2 b/dev-libs/newt/files/digest-newt-0.52.2
new file mode 100644
index 000000000000..73388b15f2f9
--- /dev/null
+++ b/dev-libs/newt/files/digest-newt-0.52.2
@@ -0,0 +1,3 @@
+MD5 0021f19bc7c3279012b4b5755ba1cd0c newt-0.52.2-9.src.rpm 283433
+RMD160 5e33ff2ea5da7e602d0b91287c578bf77c1f6e5b newt-0.52.2-9.src.rpm 283433
+SHA256 c28b81fd0464e9e8888c3e79a0fd5485cdfb4f2bb8327af373321735a7e9035b newt-0.52.2-9.src.rpm 283433
diff --git a/dev-libs/newt/files/newt-0.52.2-cbtpos.patch b/dev-libs/newt/files/newt-0.52.2-cbtpos.patch
new file mode 100644
index 000000000000..e35b597dc9b4
--- /dev/null
+++ b/dev-libs/newt/files/newt-0.52.2-cbtpos.patch
@@ -0,0 +1,11 @@
+--- newt-0.52.2/checkboxtree.c.cbtpos 2006-06-07 16:04:35.000000000 +0200
++++ newt-0.52.2/checkboxtree.c 2006-06-08 13:28:31.000000000 +0200
+@@ -334,6 +334,8 @@
+ ct = malloc(sizeof(struct CheckboxTree));
+ co->callback = NULL;
+ co->data = ct;
++ co->left = left;
++ co->top = top;
+ co->ops = &ctOps;
+ co->takesFocus = 1;
+ co->height = height;
diff --git a/dev-libs/newt/files/newt-0.52.2-colors.patch b/dev-libs/newt/files/newt-0.52.2-colors.patch
new file mode 100644
index 000000000000..052b4ed178ff
--- /dev/null
+++ b/dev-libs/newt/files/newt-0.52.2-colors.patch
@@ -0,0 +1,31 @@
+--- newt-0.52.2/newt.c.colors 2006-06-08 17:05:42.000000000 +0200
++++ newt-0.52.2/newt.c 2006-06-08 17:27:51.000000000 +0200
+@@ -53,21 +53,21 @@
+ "red", "lightgray", /* title fg, bg */
+ "lightgray", "red", /* button fg, bg */
+ "red", "lightgray", /* active button fg, bg */
+- "yellow", "blue", /* checkbox fg, bg */
+- "blue", "brown", /* active checkbox fg, bg */
+- "yellow", "blue", /* entry box fg, bg */
++ "lightgray", "blue", /* checkbox fg, bg */
++ "lightgray", "red", /* active checkbox fg, bg */
++ "lightgray", "blue", /* entry box fg, bg */
+ "blue", "lightgray", /* label fg, bg */
+ "black", "lightgray", /* listbox fg, bg */
+- "yellow", "blue", /* active listbox fg, bg */
++ "lightgray", "blue", /* active listbox fg, bg */
+ "black", "lightgray", /* textbox fg, bg */
+- "lightgray", "black", /* active textbox fg, bg */
++ "lightgray", "red", /* active textbox fg, bg */
+ "white", "blue", /* help line */
+- "yellow", "blue", /* root text */
++ "lightgray", "blue", /* root text */
+ "blue", /* scale full */
+ "red", /* scale empty */
+ "blue", "lightgray", /* disabled entry fg, bg */
+ "black", "lightgray", /* compact button fg, bg */
+- "yellow", "red", /* active & sel listbox */
++ "lightgray", "red", /* active & sel listbox */
+ "black", "brown" /* selected listbox */
+ };
+
diff --git a/dev-libs/newt/files/newt-0.52.2-cursor.patch b/dev-libs/newt/files/newt-0.52.2-cursor.patch
new file mode 100644
index 000000000000..ec6641df20f0
--- /dev/null
+++ b/dev-libs/newt/files/newt-0.52.2-cursor.patch
@@ -0,0 +1,10 @@
+--- newt-0.52.2/entry.c.cursor 2005-09-30 16:05:55.000000000 +0200
++++ newt-0.52.2/entry.c 2006-06-07 13:39:47.000000000 +0200
+@@ -322,6 +322,7 @@
+ switch (key) {
+ case '\r': /* Return */
+ if (en->flags & NEWT_FLAG_RETURNEXIT) {
++ newtCursorOff();
+ er.result = ER_EXITFORM;
+ } else {
+ er.result = ER_NEXTCOMP;
diff --git a/dev-libs/newt/files/newt-0.52.2-dwchar.patch b/dev-libs/newt/files/newt-0.52.2-dwchar.patch
new file mode 100644
index 000000000000..48c4625f5461
--- /dev/null
+++ b/dev-libs/newt/files/newt-0.52.2-dwchar.patch
@@ -0,0 +1,128 @@
+--- newt-0.52.2/checkboxtree.c.dwchar 2006-08-04 13:41:28.000000000 +0200
++++ newt-0.52.2/checkboxtree.c 2006-08-04 13:41:28.000000000 +0200
+@@ -490,8 +490,17 @@
+ currRow = co->top + i;
+ }
+
+- SLsmg_write_nstring((*item)->text, co->width - 4 -
+- (3 * (*item)->depth));
++ j = 4 + (3 * (*item)->depth);
++ SLsmg_write_nstring(NULL, co->width - j);
++ newtGotorc(co->top + i, co->left + j);
++ if (wstrlen((*item)->text, -1) > co->width - j) {
++ char *tmp;
++ tmp = strdup((*item)->text);
++ trim_string(tmp, co->width - j);
++ SLsmg_write_string(tmp);
++ free(tmp);
++ } else
++ SLsmg_write_string((*item)->text);
+
+ item++;
+ i++;
+--- newt-0.52.2/newt_pr.h.dwchar 2005-09-30 16:05:55.000000000 +0200
++++ newt-0.52.2/newt_pr.h 2006-08-04 13:41:28.000000000 +0200
+@@ -82,5 +82,6 @@
+
+ int _newt_wstrlen(const char *str, int len);
+ #define wstrlen(str,len) _newt_wstrlen((str),(len))
++void trim_string(char *title, int chrs);
+
+ #endif /* H_NEWT_PR */
+--- newt-0.52.2/listbox.c.dwchar 2006-08-04 13:41:28.000000000 +0200
++++ newt-0.52.2/listbox.c 2006-08-04 13:41:28.000000000 +0200
+@@ -527,7 +527,16 @@
+ else
+ SLsmg_set_color(NEWT_COLORSET_LISTBOX);
+
+- SLsmg_write_nstring(item->text, li->curWidth);
++ SLsmg_write_nstring(NULL, li->curWidth);
++ newtGotorc(co->top + i + li->bdyAdjust, co->left + li->bdxAdjust);
++ if (wstrlen(item->text, -1) > li->curWidth) {
++ char *tmp;
++ tmp = strdup(item->text);
++ trim_string(tmp, li->curWidth);
++ SLsmg_write_string(tmp);
++ free(tmp);
++ } else
++ SLsmg_write_string(item->text);
+
+ if (li->flags & NEWT_FLAG_MULTIPLE) {
+ newtGotorc(co->top + i + li->bdyAdjust, co->left + li->bdxAdjust);
+--- newt-0.52.2/newt.c.dwchar 2006-08-04 13:41:28.000000000 +0200
++++ newt-0.52.2/newt.c 2006-08-04 13:41:28.000000000 +0200
+@@ -184,12 +184,13 @@
+ void trim_string(char *title, int chrs)
+ {
+ char *p = title;
+- int ln = chrs;
++ int ln;
+ int x = 0,y = 0;
+ wchar_t tmp;
+ mbstate_t ps;
+
+ memset(&ps, 0, sizeof(ps));
++ ln = strlen(title);
+
+ while (*p) {
+ x = mbrtowc(&tmp, p, ln, &ps);
+@@ -198,12 +199,13 @@
+ return;
+ }
+ y = wcwidth(tmp);
+- if (y > ln) {
++ if (y > chrs) {
+ *p = '\0';
+ return;
+ } else {
+ p += x;
+- ln -= y;
++ ln -= x;
++ chrs -= y;
+ }
+ }
+ }
+@@ -638,10 +640,10 @@
+ currentWindow->height = height;
+ currentWindow->title = title ? strdup(title) : NULL;
+
+- currentWindow->buffer = malloc(sizeof(SLsmg_Char_Type) * (width + 3) * (height + 3));
++ currentWindow->buffer = malloc(sizeof(SLsmg_Char_Type) * (width + 5) * (height + 3));
+
+ row = top - 1;
+- col = left - 1;
++ col = left - 2;
+ /* clip to the current screen bounds - msw */
+ if (row < 0)
+ row = 0;
+@@ -655,8 +657,8 @@
+ for (j = 0; j < height + 3; j++, row++) {
+ SLsmg_gotorc(row, col);
+ SLsmg_read_raw(currentWindow->buffer + n,
+- currentWindow->width + 3);
+- n += currentWindow->width + 3;
++ currentWindow->width + 5);
++ n += currentWindow->width + 5;
+ }
+
+ newtTrashScreen();
+@@ -732,7 +734,7 @@
+ row = col = 0;
+
+ row = currentWindow->top - 1;
+- col = currentWindow->left - 1;
++ col = currentWindow->left - 2;
+ if (row < 0)
+ row = 0;
+ if (col < 0)
+@@ -740,8 +742,8 @@
+ for (j = 0; j < currentWindow->height + 3; j++, row++) {
+ SLsmg_gotorc(row, col);
+ SLsmg_write_raw(currentWindow->buffer + n,
+- currentWindow->width + 3);
+- n += currentWindow->width + 3;
++ currentWindow->width + 5);
++ n += currentWindow->width + 5;
+ }
+
+ free(currentWindow->buffer);
diff --git a/dev-libs/newt/files/newt-0.52.2-focus.patch b/dev-libs/newt/files/newt-0.52.2-focus.patch
new file mode 100644
index 000000000000..01af66c192b0
--- /dev/null
+++ b/dev-libs/newt/files/newt-0.52.2-focus.patch
@@ -0,0 +1,236 @@
+--- newt-0.52.2/checkboxtree.c.focus 2006-06-08 17:05:42.000000000 +0200
++++ newt-0.52.2/checkboxtree.c 2006-06-08 17:05:42.000000000 +0200
+@@ -25,6 +25,7 @@
+ int sbAdjust;
+ int curWidth;
+ int userHasSetWidth;
++ int isActive;
+ char * seq;
+ char * result;
+ };
+@@ -341,6 +342,7 @@
+ co->width = 0;
+ co->isMapped = 0;
+ ct->curWidth = 0;
++ ct->isActive = 0;
+ ct->userHasSetWidth = 0;
+ ct->itemlist = NULL;
+ ct->firstItem = NULL;
+@@ -462,12 +464,7 @@
+
+ while (*item && i < co->height) {
+ newtGotorc(co->top + i, co->left);
+- if (*item == *ct->currItem) {
+- SLsmg_set_color(NEWT_COLORSET_ACTLISTBOX);
+- currRow = co->top + i;
+- } else
+- SLsmg_set_color(NEWT_COLORSET_LISTBOX);
+-
++ SLsmg_set_color(NEWT_COLORSET_LISTBOX);
+ for (j = 0; j < (*item)->depth; j++)
+ SLsmg_write_string(" ");
+
+@@ -479,7 +476,7 @@
+ } else {
+ if (ct->flags & NEWT_CHECKBOXTREE_HIDE_BOX) {
+ if ((*item)->selected)
+- SLsmg_set_color(NEWT_COLORSET_ACTLISTBOX);
++ SLsmg_set_color(NEWT_COLORSET_SELLISTBOX);
+ SLsmg_write_string(" ");
+ } else {
+ char tmp[5];
+@@ -487,12 +484,15 @@
+ SLsmg_write_string(tmp);
+ }
+ }
++ if (*item == *ct->currItem) {
++ SLsmg_set_color(ct->isActive ?
++ NEWT_COLORSET_ACTSELLISTBOX : NEWT_COLORSET_ACTLISTBOX);
++ currRow = co->top + i;
++ }
+
+ SLsmg_write_nstring((*item)->text, co->width - 4 -
+ (3 * (*item)->depth));
+
+- SLsmg_set_color(NEWT_COLORSET_LISTBOX);
+-
+ item++;
+ i++;
+ }
+@@ -688,11 +688,13 @@
+ break;
+
+ case EV_FOCUS:
++ ct->isActive = 1;
+ ctDraw(co);
+ er.result = ER_SWALLOWED;
+ break;
+
+ case EV_UNFOCUS:
++ ct->isActive = 0;
+ ctDraw(co);
+ er.result = ER_SWALLOWED;
+ break;
+--- newt-0.52.2/textbox.c.focus 2005-09-30 16:05:55.000000000 +0200
++++ newt-0.52.2/textbox.c 2006-06-08 17:50:19.000000000 +0200
+@@ -15,9 +15,10 @@
+ char *blankline;
+ int linesAlloced;
+ int doWrap;
+- newtComponent sb;
++ newtComponent sb_act, sb;
+ int topLine;
+ int textWidth;
++ int isActive;
+ };
+
+ static char * expandTabs(const char * text);
+@@ -43,8 +44,10 @@
+ struct textbox * tb = co->data;
+
+ co->isMapped = isMapped;
+- if (tb->sb)
++ if (tb->sb) {
+ tb->sb->ops->mapped(tb->sb, isMapped);
++ tb->sb_act->ops->mapped(tb->sb_act, isMapped);
++ }
+ }
+
+ static void textboxPlace(newtComponent co, int newLeft, int newTop) {
+@@ -53,8 +56,10 @@
+ co->top = newTop;
+ co->left = newLeft;
+
+- if (tb->sb)
++ if (tb->sb) {
+ tb->sb->ops->place(tb->sb, co->left + co->width - 1, co->top);
++ tb->sb_act->ops->place(tb->sb_act, co->left + co->width - 1, co->top);
++ }
+ }
+
+ void newtTextboxSetHeight(newtComponent co, int height) {
+@@ -107,16 +112,20 @@
+ tb->lines = NULL;
+ tb->topLine = 0;
+ tb->textWidth = width;
++ tb->isActive = 0;
+ tb->blankline = malloc(width+1);
+ memset(tb->blankline,' ',width);
+ tb->blankline[width] = '\0';
+
+ if (flags & NEWT_FLAG_SCROLL) {
+ co->width += 2;
++ tb->sb_act = newtVerticalScrollbar(co->left + co->width - 1, co->top,
++ co->height, COLORSET_ACTTEXTBOX, COLORSET_TEXTBOX);
+ tb->sb = newtVerticalScrollbar(co->left + co->width - 1, co->top,
+ co->height, COLORSET_TEXTBOX, COLORSET_TEXTBOX);
++ co->takesFocus = 1;
+ } else {
+- tb->sb = NULL;
++ tb->sb_act = tb->sb = NULL;
+ }
+
+ return co;
+@@ -342,8 +351,13 @@
+
+ if (tb->sb) {
+ size = tb->numLines - c->height;
+- newtScrollbarSet(tb->sb, tb->topLine, size ? size : 0);
+- tb->sb->ops->draw(tb->sb);
++ if (tb->isActive) {
++ newtScrollbarSet(tb->sb_act, tb->topLine, size ? size : 0);
++ tb->sb_act->ops->draw(tb->sb_act);
++ } else {
++ newtScrollbarSet(tb->sb, tb->topLine, size ? size : 0);
++ tb->sb->ops->draw(tb->sb);
++ }
+ }
+
+ SLsmg_set_color(NEWT_COLORSET_TEXTBOX);
+@@ -363,7 +377,11 @@
+
+ er.result = ER_IGNORED;
+
+- if (ev.when == EV_EARLY && ev.event == EV_KEYPRESS && tb->sb) {
++ if (!tb->sb || ev.when == EV_EARLY || ev.when == EV_LATE)
++ return er;
++
++ switch(ev.event) {
++ case EV_KEYPRESS:
+ newtTrashScreen();
+ switch (ev.u.key) {
+ case NEWT_KEY_UP:
+@@ -395,8 +413,8 @@
+ er.result = ER_SWALLOWED;
+ break;
+ }
+- }
+- if (ev.when == EV_EARLY && ev.event == EV_MOUSE && tb->sb) {
++ break;
++ case EV_MOUSE:
+ /* Top scroll arrow */
+ if (ev.u.mouse.x == co->width && ev.u.mouse.y == co->top) {
+ if (tb->topLine) tb->topLine--;
+@@ -412,6 +430,17 @@
+
+ er.result = ER_SWALLOWED;
+ }
++ break;
++ case EV_FOCUS:
++ tb->isActive = 1;
++ textboxDraw(co);
++ er.result = ER_SWALLOWED;
++ break;
++ case EV_UNFOCUS:
++ tb->isActive = 0;
++ textboxDraw(co);
++ er.result = ER_SWALLOWED;
++ break;
+ }
+ return er;
+ }
+--- newt-0.52.2/listbox.c.focus 2005-09-30 16:05:55.000000000 +0200
++++ newt-0.52.2/listbox.c 2006-06-08 17:05:42.000000000 +0200
+@@ -518,7 +518,7 @@
+
+ newtGotorc(co->top + i + li->bdyAdjust, co->left + li->bdxAdjust);
+ if(j + i == li->currItem) {
+- if(item->isSelected)
++ if(li->isActive)
+ SLsmg_set_color(NEWT_COLORSET_ACTSELLISTBOX);
+ else
+ SLsmg_set_color(NEWT_COLORSET_ACTLISTBOX);
+@@ -529,6 +529,12 @@
+
+ SLsmg_write_nstring(item->text, li->curWidth);
+
++ if (li->flags & NEWT_FLAG_MULTIPLE) {
++ newtGotorc(co->top + i + li->bdyAdjust, co->left + li->bdxAdjust);
++ SLsmg_set_color(item->isSelected ?
++ NEWT_COLORSET_SELLISTBOX : NEWT_COLORSET_LISTBOX);
++ SLsmg_write_nstring(item->text, 1);
++ }
+ }
+ newtGotorc(co->top + (li->currItem - li->startShowItem) + li->bdyAdjust,
+ co->left + li->bdxAdjust);
+--- newt-0.52.2/form.c.focus 2005-09-21 11:32:01.000000000 +0200
++++ newt-0.52.2/form.c 2006-06-27 14:40:19.000000000 +0200
+@@ -1027,8 +1027,17 @@
+ }
+ }
+
+- if (key == NEWT_KEY_F1 && form->helpTag && form->helpCb)
++ if (key == NEWT_KEY_F1 && form->helpTag && form->helpCb) {
++ if (form->currComp != -1) {
++ ev.event = EV_UNFOCUS;
++ sendEvent(form->elements[form->currComp].co, ev);
++ }
+ form->helpCb(co, form->helpTag);
++ if (form->currComp != -1) {
++ ev.event = EV_FOCUS;
++ sendEvent(form->elements[form->currComp].co, ev);
++ }
++ }
+
+ if (!done) {
+ ev.event = EV_KEYPRESS;
diff --git a/dev-libs/newt/files/newt-0.52.2-notcl.patch b/dev-libs/newt/files/newt-0.52.2-notcl.patch
new file mode 100644
index 000000000000..46f581b6c6f4
--- /dev/null
+++ b/dev-libs/newt/files/newt-0.52.2-notcl.patch
@@ -0,0 +1,45 @@
+--- newt-0.52.2/Makefile.in.notcl 2005-11-22 09:39:14.000000000 +0100
++++ newt-0.52.2/Makefile.in 2006-01-17 02:50:07.000000000 +0100
+@@ -14,7 +14,7 @@
+
+ WHIPTCLSO=whiptcl.so
+
+-PROGS = test whiptail $(WHIPTCLSO) testgrid testtree showchars showkey
++PROGS = test whiptail testgrid testtree showchars showkey
+ TESTOBJS = test.o
+ NDIALOGOBJS = whiptail.o dialogboxes.o
+ WHIPTCLOBJS = whiptcl.o dialogboxes.o
+@@ -78,15 +78,15 @@
+ whiptail: $(NDIALOGOBJS) $(LIBNEWTSH)
+ $(CC) -g -o whiptail $(NDIALOGOBJS) -L . -lnewt $(LIBS) -lpopt
+
+-whiptcl.so: $(WHIPTCLOBJS) $(LIBNEWTSH)
+- $(CC) -shared $(SHCFLAGS) -o whiptcl.so $(WHIPTCLOBJS) -L . -lnewt $(LIBTCL) -lslang -lpopt -lm
++#whiptcl.so: $(WHIPTCLOBJS) $(LIBNEWTSH)
++# $(CC) -shared $(SHCFLAGS) -o whiptcl.so $(WHIPTCLOBJS) -L . -lnewt $(LIBTCL) -lslang -lpopt -lm
+
+ # Ensure dialogboxes is compiled -fPIC
+ dialogboxes.o: dialogboxes.c
+ $(CC) $(CFLAGS) $(SHCFLAGS) -c dialogboxes.c
+
+-whiptcl.o: whiptcl.c
+- $(CC) -I/usr/include/tcl8.4 $(SHCFLAGS) $(CFLAGS) -c whiptcl.c
++#whiptcl.o: whiptcl.c
++# $(CC) -I/usr/include/tcl8.4 $(SHCFLAGS) $(CFLAGS) -c whiptcl.c
+
+
+ $(LIBNEWT): $(LIBOBJS)
+@@ -129,11 +129,11 @@
+ install -m 644 $(LIBNEWT) $(instroot)/$(libdir)
+ install -m 755 whiptail $(instroot)/$(bindir)
+
+-install-sh: sharedlib $(WHIPTCLSO) _snackmodule.so
++install-sh: sharedlib _snackmodule.so
+ [ -d $(instroot)/$(libdir) ] || install -m 755 -d $(instroot)/$(libdir)
+ install -m 755 $(LIBNEWTSH) $(instroot)/$(libdir)
+ ln -sf $(LIBNEWTSH) $(instroot)/$(libdir)/libnewt.so
+- [ -n "$(WHIPTCLSO)" ] && install -m 755 whiptcl.so $(instroot)/$(libdir) || :
++# [ -n "$(WHIPTCLSO)" ] && install -m 755 whiptcl.so $(instroot)/$(libdir) || :
+ for ver in $(PYTHONVERS) ; do \
+ [ -d $(instroot)/$(libdir)/$$ver/site-packages ] || install -m 755 -d $(instroot)/$(libdir)/$$ver/site-packages ;\
+ install -m 755 $$ver/_snackmodule.so $(instroot)/$(libdir)/$$ver/site-packages ;\
diff --git a/dev-libs/newt/files/newt-0.52.2-pgupdown-crash.patch b/dev-libs/newt/files/newt-0.52.2-pgupdown-crash.patch
new file mode 100644
index 000000000000..f0fc646c8da3
--- /dev/null
+++ b/dev-libs/newt/files/newt-0.52.2-pgupdown-crash.patch
@@ -0,0 +1,37 @@
+--- newt-0.52.2/checkboxtree.c.pgupdown-crash 2005-09-30 16:05:55.000000000 +0200
++++ newt-0.52.2/checkboxtree.c 2006-01-17 23:40:19.000000000 +0100
+@@ -536,6 +536,18 @@
+ free(co);
+ }
+
++static void ctEnsureLimits( struct CheckboxTree *ct ) {
++ struct items **listEnd = ct->flatList + ct->flatCount - 1;
++ if (ct->firstItem < ct->flatList)
++ ct->firstItem = ct->flatList;
++ if (ct->currItem < ct->flatList)
++ ct->currItem = ct->flatList;
++ if (ct->firstItem > listEnd) {
++ ct->firstItem = listEnd;
++ ct->currItem = listEnd;
++ }
++}
++
+ struct eventResult ctEvent(newtComponent co, struct event ev) {
+ struct CheckboxTree * ct = co->data;
+ struct eventResult er;
+@@ -647,6 +659,7 @@
+ ct->currItem -= co->height;
+ ct->firstItem -= co->height;
+ }
++ ctEnsureLimits( ct );
+
+ ctDraw(co);
+ if(co->callback) co->callback(co, co->callbackData);
+@@ -663,6 +676,7 @@
+ ct->currItem += co->height;
+ ct->firstItem += co->height;
+ }
++ ctEnsureLimits( ct );
+
+ ctDraw(co);
+ if(co->callback) co->callback(co, co->callbackData);
diff --git a/dev-libs/newt/files/newt-0.52.2-pyexample.patch b/dev-libs/newt/files/newt-0.52.2-pyexample.patch
new file mode 100644
index 000000000000..65d115bd25cf
--- /dev/null
+++ b/dev-libs/newt/files/newt-0.52.2-pyexample.patch
@@ -0,0 +1,10 @@
+--- newt-0.52.2/popcorn.py.pyexample 2000-05-16 18:54:02.000000000 +0200
++++ newt-0.52.2/popcorn.py 2006-06-27 15:34:44.000000000 +0200
+@@ -4,7 +4,6 @@
+ import sys
+
+ def help(screen, text):
+- raise ValueError, "foo"
+ ButtonChoiceWindow(screen, "Help", text, help = "Help on help")
+
+ t = TextboxReflowed(25, "Some text which needs to be wrapped at a good place.")
diff --git a/dev-libs/newt/files/newt-0.52.2-screensize.patch b/dev-libs/newt/files/newt-0.52.2-screensize.patch
new file mode 100644
index 000000000000..0e00a01e0cd4
--- /dev/null
+++ b/dev-libs/newt/files/newt-0.52.2-screensize.patch
@@ -0,0 +1,49 @@
+--- newt-0.52.2/newt.h.screensize 2005-09-21 11:32:01.000000000 +0200
++++ newt-0.52.2/newt.h 2006-05-31 15:09:39.000000000 +0200
+@@ -115,7 +115,7 @@
+ void newtClearKeyBuffer(void);
+ void newtDelay(unsigned int usecs);
+ /* top, left are *not* counting the border */
+-int newtOpenWindow(unsigned int left,unsigned int top,
++int newtOpenWindow(int left,int top,
+ unsigned int width,unsigned int height,
+ const char * title);
+ int newtCenteredWindow(unsigned int width,unsigned int height, const char * title);
+--- newt-0.52.2/newt.c.screensize 2005-09-30 16:13:16.000000000 +0200
++++ newt-0.52.2/newt.c 2006-05-31 15:12:48.000000000 +0200
+@@ -610,14 +610,14 @@
+
+ /**
+ * Open a new window.
+- * @param left. unsigned int Size; _not_ including border
+- * @param top: unsigned int size, _not_ including border
++ * @param left. int Size; _not_ including border
++ * @param top: int size, _not_ including border
+ * @param width unsigned int
+ * @param height unsigned int
+ * @param title - title string
+ * @return zero on success (currently no errors reported)
+ */
+-int newtOpenWindow(unsigned int left, unsigned int top,
++int newtOpenWindow(int left, int top,
+ unsigned int width, unsigned int height,
+ const char * title) {
+ int j, row, col;
+@@ -708,14 +708,14 @@
+ */
+ int newtCenteredWindow(unsigned int width,unsigned int height,
+ const char * title) {
+- unsigned int top, left;
++ int top, left;
+
+- top = (SLtt_Screen_Rows - height) / 2;
++ top = (int)(SLtt_Screen_Rows - height) / 2;
+
+ /* I don't know why, but this seems to look better */
+ if ((SLtt_Screen_Rows % 2) && (top % 2)) top--;
+
+- left = (SLtt_Screen_Cols - width) / 2;
++ left = (int)(SLtt_Screen_Cols - width) / 2;
+
+ newtOpenWindow(left, top, width, height, title);
+
diff --git a/dev-libs/newt/files/newt-0.52.2-scrollbars.patch b/dev-libs/newt/files/newt-0.52.2-scrollbars.patch
new file mode 100644
index 000000000000..9cf8542fbfb9
--- /dev/null
+++ b/dev-libs/newt/files/newt-0.52.2-scrollbars.patch
@@ -0,0 +1,21 @@
+diff -ru newt-0.51.6/scrollbar.c newt-0.51.6-new/scrollbar.c
+--- newt-0.51.6/scrollbar.c 2002-06-26 22:17:46.000000000 -0400
++++ newt-0.51.6-new/scrollbar.c 2005-08-06 22:33:00.000000000 -0400
+@@ -47,7 +47,7 @@
+ sb = malloc(sizeof(*sb));
+ co->data = sb;
+
+- if (!strcmp(getenv("TERM"), "linux") && height >= 2) {
++ if (height >= 2) {
+ sb->arrows = 1;
+ sb->curr = 1;
+ } else {
+@@ -100,7 +100,7 @@
+
+ static void sbDrawThumb(newtComponent co, int isOn) {
+ struct scrollbar * sb = co->data;
+- SLtt_Char_Type ch = isOn ? '#' : SLSMG_CKBRD_CHAR;
++ SLtt_Char_Type ch = isOn ? SLSMG_BLOCK_CHAR : SLSMG_CKBRD_CHAR;
+
+ if (!co->isMapped) return;
+
diff --git a/dev-libs/newt/newt-0.52.2.ebuild b/dev-libs/newt/newt-0.52.2.ebuild
new file mode 100644
index 000000000000..0cf9921a1a57
--- /dev/null
+++ b/dev-libs/newt/newt-0.52.2.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/newt/newt-0.52.2.ebuild,v 1.1 2006/09/09 20:20:41 dberkholz Exp $
+
+inherit python toolchain-funcs eutils rpm
+
+# Revision of the RPM. Shouldn't affect us, as we're just grabbing the source
+# tarball out of it
+RPMREV="9"
+
+DESCRIPTION="Redhat's Newt windowing toolkit development files"
+HOMEPAGE="http://www.redhat.com/"
+SRC_URI="mirror://fedora/development/source/SRPMS/${P}-${RPMREV}.src.rpm"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="gpm tcl"
+
+RDEPEND="=sys-libs/slang-1*
+ >=dev-libs/popt-1.6
+ dev-lang/python
+ elibc_uclibc? ( sys-libs/ncurses )
+ gpm? ( sys-libs/gpm )
+ tcl? ( =dev-lang/tcl-8.4* )"
+DEPEND="${RDEPEND}"
+
+src_unpack() {
+ rpm_src_unpack
+ cd "${S}"
+
+ # bug 73850
+ if use elibc_uclibc; then
+ sed -i -e 's:-lslang:-lslang -lncurses:g' ${S}/Makefile.in
+ fi
+
+ epatch "${FILESDIR}"/${P}-scrollbars.patch
+ epatch "${FILESDIR}"/${P}-pgupdown-crash.patch
+ epatch "${FILESDIR}"/${P}-screensize.patch
+ epatch "${FILESDIR}"/${P}-cbtpos.patch
+ epatch "${FILESDIR}"/${P}-focus.patch
+ epatch "${FILESDIR}"/${P}-cursor.patch
+ epatch "${FILESDIR}"/${P}-colors.patch
+ epatch "${FILESDIR}"/${P}-pyexample.patch
+ epatch "${FILESDIR}"/${P}-dwchar.patch
+
+ if ! use tcl; then
+ epatch "${FILESDIR}"/${P}-notcl.patch
+ fi
+}
+
+src_compile() {
+ python_version
+
+ econf \
+ $(use_with gpm gpm-support) \
+ || die
+
+ # not parallel safe
+ emake \
+ PYTHONVERS="python${PYVER}" \
+ RPM_OPT_FLAGS="${CFLAGS}" \
+ || die "emake failed"
+}
+
+src_install () {
+ python_version
+ # the RPM_OPT_FLAGS="ERROR" is there to catch a build error
+ # if it fails, that means something in src_compile() didn't build properly
+ # not parallel safe
+ emake \
+ prefix="${D}/usr" \
+ PYTHONVERS="python${PYVER}" \
+ RPM_OPT_FLAGS="ERROR" \
+ install || die "make install failed"
+ dodoc CHANGES peanuts.py popcorn.py tutorial.sgml
+ doman whiptail.1
+ SOMINOR=$(get_version_component_range 2 ${PV})
+ dosym libnewt.so.${PV} /usr/$(get_libdir)/libnewt.so.0.${SOMINOR}
+}