Update of /cvsroot/fink/dists/10.7/stable/main/finkinfo/libs In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv2282
Added Files: libnewt0-shlibs.info libnewt0-shlibs.patch Log Message: New port bring whiptail to fink a lightweight dialog replacement --- NEW FILE: libnewt0-shlibs.info --- Package: libnewt0-shlibs Version: 0.52.15 Revision: 1.1 ### Source: mirror:debian:pool/main/n/newt/newt_%v.orig.tar.gz Source-MD5: 343ee3a0fd0eacdb7c508a1e1cfabf65 SourceDirectory: newt-%v ### BuildDepends: << fink (>= 0.28), slang2, popt, gettext-tools, libgettext8-dev, tcltk-dev, python33, autoconf2.6, automake1.11 << # sgmltools-lite, Depends: << slang2-shlibs, libgettext8-shlibs << ### PatchFile: %n.patch PatchFile-MD5: 805e321c9ed21bcbda35090f6b6ffc36 PatchScript: << sed -e 's,@FINKPREFIX@,%p,g' %{PatchFile} | patch -p1 # Debian Patches patch -p1 < fink/patches/endianness.patch patch -p1 < fink/patches/tcl8x.patch patch -p1 < fink/patches/python_memory_allocation.patch patch -p1 < fink/patches/escape_key.patch patch -p1 < fink/patches/python_init_once.patch patch -p1 < fink/patches/messagebox_escape.patch patch -p1 < fink/patches/python3.patch patch -p1 < fink/patches/compiler-warnings.patch perl -pi -e 's, -shared \$, -bundle \$,g' Makefile.in perl -pi -e 's, --shared \$\$PLDFLAGS, -bundle \$\$PLDFLAGS,g' Makefile.in perl -pi -e 's,Tcl_setResult,Tcl_SetResult,g' whiptcl.c perl -pi -e 's,LIBTCL = .TCL_LIB_FLAG.,LIBTCL = -ltcl,g' Makefile.in perl -pi -e 's,PYTHONVERS = .PYTHONVERS.,PYTHONVERS = python3.3,g' Makefile.in perl -pi -e 's, -I/usr/include/slang,,g' Makefile.in perl -pi -e 's,SONAME = .SONAME.,SONAME = 0,g' Makefile.in perl -pi -e 's,LIBNEWTSH = libnewt\.so\.\$\(VERSION\),LIBNEWTSH = libnewt\.\$\(VERSION\)\.dylib,g' Makefile.in perl -pi -e 's,LIBNEWTSONAME = libnewt\.so\.\$\(SONAME\),LIBNEWTSONAME = libnewt\.\$\(SONAME\)\.dylib,g' Makefile.in perl -pi -e 's;SHLIBFLAGS=$;SHLIBFLAGS=-dynamiclib -compatibility_version 1 -current_version 1 -install_name %p/lib/\$\(LIBNEWTSONAME\);g' Makefile.in perl -pi -e 's,libnewt\.so,libnewt\.dylib,g' Makefile.in ### Fix things to work in fink root perl -pi -e 's,/usr,%p,' *.py newt.spec nls.h << ConfigureParams: << --without-gpm-support \ --with-colorsfile=%p/etc/newt/palette << CompileScript: << # Nasty hack. why is it necessary? cp %p/share/automake-1.11/install-sh ./install-sh #./autogen.sh ./configure %c make #sgmltools --backend html tutorial.sgml # ar cqv libnewt_pic.a shared/*.o << InstallScript: << make install DESTDIR=%d # examples install -d -m 755 examples install -m 644 testtree.c test.c testgrid.c examples for v in python3.3; do \ install -d -m 755 %i/lib/$v/dist-packages; \ install -m 755 snack.py $v/* %i/lib/$v/dist-packages; \ done install -m 644 libnewt.a %i/lib install -d -m 755 %i/etc/newt install -m 644 %b/fink/palette.original %i/etc/newt/ << ### Shlibs: << %p/lib/libnewt.0.dylib 1.0.0 libnewt0-shlibs (>= 0.52.10-1.1) << ### PostInstScript: << set -e case "$1" in configure) # Install alternatives update-alternatives --install %p/etc/newt/palette newt-palette %p/etc/newt/palette.original 20 ;; esac << ConfFiles: %p/etc/newt/palette.original DocFiles: CHANGES COPYING Description: Not Erik's Windowing Toolkit DescDetail: << Newt is a windowing toolkit for text mode built from the slang library. It allows color text mode applications to easily use stackable windows, push buttons, check boxes, radio buttons, lists, entry fields, labels, and displayable text. Scrollbars are supported, and forms may be nested to provide extra functionality. This package contains the shared library for programs that have been built with newt. << SplitOff: << Package: libnewt-dev BuildDependsOnly: true Depends: << %N (= %v-%r) << Files: << include lib/libnewt.{a,dylib} lib/pkgconfig << DocFiles: CHANGES COPYING newt.spec examples Description: Developer's toolkit for newt windowing library DescDetail: << These are the header files and libraries for developing applications which use newt. Newt is a windowing toolkit for text mode, which provides many widgets and stackable windows. << << SplitOff2: << Package: newt-tcl Depends: << %N (= %v-%r), tcltk, tcltk-shlibs, popt-shlibs, libgettext8-shlibs << Files: << lib/whiptcl.so << DocFiles: CHANGES COPYING Description: NEWT module for Tcl DescDetail: << This module allows you to build a text UI for your Tcl scripts using newt. << << SplitOff3: << Package: newt-py33 Depends: << %N (= %v-%r) << Files: << lib/python3.3 << DocFiles: CHANGES COPYING Description: NEWT module for Python3 DescDetail: << This module allows you to built a text UI for your Python3 scripts using newt. << << SplitOff5: << Package: whiptail Depends: << %N (= %v-%r), slang2-shlibs, libgettext8-shlibs, popt-shlibs << Files: << bin share/man << DocFiles: CHANGES COPYING Description: Displays user-friendly dialog boxes from shell scripts DescDetail: << Whiptail is a "dialog" replacement using newt instead of ncurses. It provides a method of displaying several different types of dialog boxes from shell scripts. This allows a developer of a script to interact with the user in a much friendlier manner. << << License: GPL Maintainer: Justin F. Halett <the...@lists.sourceforge.net> Homepage: https://fedorahosted.org/newt/ --- NEW FILE: libnewt0-shlibs.patch --- diff -ruN newt-0.52.15.orig/fink/palette.original newt-0.52.15/fink/palette.original --- newt-0.52.15.orig/fink/palette.original 1969-12-31 17:00:00.000000000 -0700 +++ newt-0.52.15/fink/palette.original 2013-05-28 14:05:11.000000000 -0600 @@ -0,0 +1,2 @@ + + diff -ruN newt-0.52.15.orig/fink/patches/compiler-warnings.patch newt-0.52.15/fink/patches/compiler-warnings.patch --- newt-0.52.15.orig/fink/patches/compiler-warnings.patch 1969-12-31 17:00:00.000000000 -0700 +++ newt-0.52.15/fink/patches/compiler-warnings.patch 2013-05-28 13:32:16.000000000 -0600 @@ -0,0 +1,121 @@ +Index: newt-0.52.15/newt.c +=================================================================== +--- newt-0.52.15.orig/newt.c 2013-05-15 15:00:08.000000000 +0100 ++++ newt-0.52.15/newt.c 2013-05-15 15:11:45.000000000 +0100 +@@ -1,5 +1,6 @@ + #include "config.h" + ++#define ENABLE_SLFUTURE_CONST 1 + #include <slang.h> + #include <stdio.h> + #include <stdlib.h> +Index: newt-0.52.15/whiptcl.c +=================================================================== +--- newt-0.52.15.orig/whiptcl.c 2013-03-25 14:16:36.000000000 +0000 ++++ newt-0.52.15/whiptcl.c 2013-05-15 15:23:38.000000000 +0100 +@@ -137,45 +137,44 @@ + + if (arg < -1) { + /* this could buffer oveflow, bug we're not setuid so I don't care */ +- interp->result = malloc(200); +- interp->freeProc = TCL_DYNAMIC; +- sprintf(interp->result, "%s: %s\n", ++ char *result = Tcl_Alloc(200); ++ sprintf(result, "%s: %s\n", + poptBadOption(optCon, POPT_BADOPTION_NOALIAS), + poptStrerror(arg)); +- ++ Tcl_SetResult(interp, result, TCL_DYNAMIC); + return TCL_ERROR; + } + + if (mode == MODE_NONE) { +- interp->result = "no dialog mode was specified"; ++ Tcl_SetResult(interp, "no dialog mode was specified", TCL_STATIC); + return TCL_ERROR; + } else if (rc) { +- interp->result = "multiple modes were specified"; ++ Tcl_SetResult(interp, "multiple modes were specified", TCL_STATIC); + return TCL_ERROR; + } + + if (!(text = poptGetArg(optCon))) { +- interp->result = "missing text parameter"; ++ Tcl_SetResult(interp, "missing text parameter", TCL_STATIC); + return TCL_ERROR; + } + + if (!(nextArg = poptGetArg(optCon))) { +- interp->result = "height missing"; ++ Tcl_setResult(interp,"height missing", TCL_STATIC); + return TCL_ERROR; + } + height = strtoul(nextArg, &end, 10); + if (*end) { +- interp->result = "height is not a number"; ++ Tcl_SetResult(interp,"height is not a number", TCL_STATIC); + return TCL_ERROR; + } + + if (!(nextArg = poptGetArg(optCon))) { +- interp->result = "width missing"; ++ Tcl_SetResult(interp, "width missing", TCL_STATIC); + return TCL_ERROR; + } + width = strtoul(nextArg, &end, 10); + if (*end) { +- interp->result = "width is not a number"; ++ Tcl_SetResult(interp, "width is not a number", TCL_STATIC); + return TCL_ERROR; + } + +@@ -195,36 +194,28 @@ + + case MODE_YESNO: + rc = messageBox(text, height, width, MSGBOX_YESNO, flags); +- if (rc == DLG_OKAY) +- interp->result = "yes"; +- else +- interp->result = "no"; ++ Tcl_SetResult( interp, rc == DLG_OKAY ? "yes " : "no" , TCL_STATIC); + if (rc == DLG_ERROR) rc = 0; + break; + + case MODE_INPUTBOX: + rc = inputBox(text, height, width, optCon, flags, &result); + if (rc ==DLG_OKAY) { +- interp->result = result; +- interp->freeProc = TCL_DYNAMIC; ++ Tcl_SetResult( interp, result, TCL_DYNAMIC); + } + break; + + case MODE_MENU: + rc = listBox(text, height, width, optCon, flags, default_item, &result); + if (rc==DLG_OKAY) { +- interp->result = result; +- interp->freeProc = TCL_DYNAMIC; ++ Tcl_SetResult(interp, result, TCL_DYNAMIC); + } + break; + + case MODE_RADIOLIST: + rc = checkList(text, height, width, optCon, 1, flags, &selections); + if (rc==DLG_OKAY) { +- interp->result = selections[0]; +- interp->freeProc = TCL_DYNAMIC; +- +- free(selections); ++ Tcl_SetResult( interp, selections[0], TCL_DYNAMIC); + } + break; + +@@ -247,7 +238,7 @@ + newtPopWindow(); + + if (rc == DLG_ERROR) { +- interp->result = "bad paramter for whiptcl dialog box"; ++ Tcl_SetResult(interp, "bad paramter for whiptcl dialog box", TCL_STATIC); + return TCL_ERROR; + } + diff -ruN newt-0.52.15.orig/fink/patches/endianness.patch newt-0.52.15/fink/patches/endianness.patch --- newt-0.52.15.orig/fink/patches/endianness.patch 1969-12-31 17:00:00.000000000 -0700 +++ newt-0.52.15/fink/patches/endianness.patch 2013-05-28 13:31:27.000000000 -0600 @@ -0,0 +1,18 @@ +Author: Alastair McKinstry <mckins...@debian.org> +Description: Force .mo files to all be little-endian so that the libnewt package can be M-A: same +Last-Updated: 2013-05-14 +Forwarded: no + +Index: newt-0.52.15/po/Makefile +=================================================================== +--- newt-0.52.15.orig/po/Makefile 2013-03-25 14:16:36.000000000 +0000 ++++ newt-0.52.15/po/Makefile 2013-05-14 18:41:36.000000000 +0100 +@@ -41,7 +41,7 @@ + report: + @for cat in $(CATALOGS); do \ + echo -n "$$cat: "; \ +- msgfmt -v --statistics -o /dev/null $$cat; \ ++ msgfmt --endianness little -v --statistics -o /dev/null $$cat; \ + done + + clean: diff -ruN newt-0.52.15.orig/fink/patches/escape_key.patch newt-0.52.15/fink/patches/escape_key.patch --- newt-0.52.15.orig/fink/patches/escape_key.patch 1969-12-31 17:00:00.000000000 -0700 +++ newt-0.52.15/fink/patches/escape_key.patch 2013-05-28 13:46:19.000000000 -0600 @@ -0,0 +1,17 @@ +Author: Julien-externe BLACHE <julien-externe.bla...@edf.fr> +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584098 +Description: Fix to allow ESC key to work in whiptail. +Last-Updated: 2010-06-21 +Forwarded: no + +diff -ruN newt-0.52.11-old/form.c newt-0.52.11/form.c +--- newt-0.52.11-old/form.c 2009-09-24 16:03:09.000000000 +0100 ++++ newt-0.52.11/form.c 2010-06-21 13:09:31.000000000 +0100 +@@ -473,6 +473,7 @@ + if (!(form->flags & NEWT_FLAG_NOF12)) { + newtFormAddHotKey(co, NEWT_KEY_F12); + } ++ newtFormAddHotKey (co, NEWT_KEY_ESCAPE); + + if (vertBar) + form->vertBar = vertBar; diff -ruN newt-0.52.15.orig/fink/patches/messagebox_escape.patch newt-0.52.15/fink/patches/messagebox_escape.patch --- newt-0.52.15.orig/fink/patches/messagebox_escape.patch 1969-12-31 17:00:00.000000000 -0700 +++ newt-0.52.15/fink/patches/messagebox_escape.patch 2013-05-28 13:29:08.000000000 -0600 @@ -0,0 +1,19 @@ +Author: Alastair McKinstry <mckins...@debian.org> +Description: Fix for bug: incorrect result given for <no> selected by ESC pressed in whiptail +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=#665784 +Last-Updated: 2012-05-16 +Forwarded: no + +Index: newt-0.52.14/dialogboxes.c +=================================================================== +--- newt-0.52.14.orig/dialogboxes.c 2012-05-16 12:15:50.000000000 +0100 ++++ newt-0.52.14/dialogboxes.c 2012-05-16 12:16:29.000000000 +0100 +@@ -568,7 +568,7 @@ + + answer = newtFormGetCurrent(form); + +- if (answer == no) ++ if ((rc == DLG_OKAY) && (answer == no)) + return DLG_CANCEL; + } + else { diff -ruN newt-0.52.15.orig/fink/patches/python3.patch newt-0.52.15/fink/patches/python3.patch --- newt-0.52.15.orig/fink/patches/python3.patch 1969-12-31 17:00:00.000000000 -0700 +++ newt-0.52.15/fink/patches/python3.patch 2013-05-28 13:47:01.000000000 -0600 @@ -0,0 +1,496 @@ +Author: Matthias Klose +Description: Patches for python3 support. +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=691240 +Last-Updated: 2013-05-15 +Forwarded: no + +Index: newt-0.52.15/peanuts.py +=================================================================== +--- newt-0.52.15.orig/peanuts.py 2013-05-15 16:05:52.000000000 +0100 ++++ newt-0.52.15/peanuts.py 2013-05-15 16:05:52.000000000 +0100 +@@ -2,6 +2,7 @@ + + # Demo program to show use of python-newt module + ++from __future__ import absolute_import, print_function, unicode_literals + from snack import * + + screen = SnackScreen() +@@ -38,8 +39,8 @@ + + screen.finish() + +-print result +-print "listbox:", li.current() +-print "rb:", rb.getSelection() +-print "bb:", bb.buttonPressed(result) +-print "checkboxtree:", ct.getSelection() ++print(result) ++print("listbox:", li.current()) ++print("rb:", rb.getSelection()) ++print("bb:", bb.buttonPressed(result)) ++print("checkboxtree:", ct.getSelection()) +Index: newt-0.52.15/popcorn.py +=================================================================== +--- newt-0.52.15.orig/popcorn.py 2013-05-15 16:05:52.000000000 +0100 ++++ newt-0.52.15/popcorn.py 2013-05-15 16:05:52.000000000 +0100 +@@ -1,5 +1,6 @@ + #!/usr/bin/python + ++from __future__ import absolute_import, print_function, unicode_literals + from snack import * + import sys + +@@ -45,7 +46,7 @@ + r2 = SingleRadioButton("Radio 2", r1) + + def something(): +- print hello ++ print(hello) + + screen = SnackScreen() + +@@ -99,14 +100,14 @@ + + screen.finish() + +-print "val", e.value() +-print "check", cb.value() +-print "r1", r1.selected() +-print "listbox", li.current() ++print("val", e.value()) ++print("check", cb.value()) ++print("r1", r1.selected()) ++print("listbox", li.current()) + # returns a tuple of the wrapped text, the actual width, and the actual height +-print res ++print(res) + +-print foo +-print 'lbcw', lbcw +-print "ct selected", ct.getSelection() +-print "ct current", ct.getCurrent() ++print(foo) ++print('lbcw', lbcw) ++print("ct selected", ct.getSelection()) ++print("ct current", ct.getCurrent()) +Index: newt-0.52.15/snackmodule.c +=================================================================== +--- newt-0.52.15.orig/snackmodule.c 2013-05-15 16:05:52.000000000 +0100 ++++ newt-0.52.15/snackmodule.c 2013-05-15 16:05:52.000000000 +0100 +@@ -12,10 +12,24 @@ + #include <unistd.h> + + #include "Python.h" ++#include "structmember.h" + #include "nls.h" + #include "newt.h" + #include "newt_pr.h" + ++#if PY_MAJOR_VERSION >= 3 ++ #define PyInt_FromLong PyLong_FromLong ++ #define PyInt_AsLong PyLong_AsLong ++ #define PyString_FromString PyUnicode_FromString ++ #define MOD_ERROR_VAL NULL ++ #define MOD_SUCCESS_VAL(val) val ++ #define MOD_INIT(name) PyMODINIT_FUNC PyInit_##name(void) ++#else ++ #define MOD_ERROR_VAL ++ #define MOD_SUCCESS_VAL(val) ++ #define MOD_INIT(name) void init##name(void) ++#endif ++ + typedef struct snackWidget_s snackWidget; + typedef struct snackGrid_s snackGrid; + typedef struct snackForm_s snackForm; +@@ -68,6 +82,8 @@ + static PyObject * ternaryWindow(PyObject * s, PyObject * args); + static snackWidget * checkboxTreeWidget(PyObject * s, PyObject * args, PyObject * kwargs); + static PyObject * pywstrlen(PyObject * s, PyObject * args); ++static PyObject * widget_get_checkboxValue(PyObject *self, void *closure); ++static PyObject * widget_get_radioValue(PyObject *self, void *closure); + + static PyMethodDef snackModuleMethods[] = { + { "button", (PyCFunction) buttonWidget, METH_VARARGS, NULL }, +@@ -107,12 +123,31 @@ + { NULL } + } ; + ++#if PY_MAJOR_VERSION >= 3 ++static struct PyModuleDef moduledef = { ++ PyModuleDef_HEAD_INIT, ++ "_snack", /* m_name */ ++ NULL, /* m_doc */ ++ -1, /* m_size */ ++ snackModuleMethods, /* m_methods */ ++ NULL, /* m_reload */ ++ NULL, /* m_traverse */ ++ NULL, /* m_clear */ ++ NULL, /* m_free */ ++ }; ++#endif ++ ++static struct PyGetSetDef widget_getset[] = { ++ { "checkboxValue", widget_get_checkboxValue, 0, NULL, NULL }, ++ { "radioValue", widget_get_radioValue, 0, NULL, NULL }, ++ { NULL } ++}; ++ + struct snackGrid_s { + PyObject_HEAD + newtGrid grid; + } ; + +-static PyObject * gridGetAttr(PyObject * s, char * name); + static PyObject * gridPlace(snackGrid * s, PyObject * args); + static PyObject * gridSetField(snackGrid * s, PyObject * args); + +@@ -123,20 +158,34 @@ + }; + + static PyTypeObject snackGridType = { +- PyObject_HEAD_INIT(&PyType_Type) +- 0, /* ob_size */ ++ PyVarObject_HEAD_INIT(&PyType_Type, 0) + "snackgrid", /* tp_name */ + sizeof(snackGrid), /* tp_size */ + 0, /* tp_itemsize */ + emptyDestructor, /* tp_dealloc */ + 0, /* tp_print */ +- gridGetAttr, /* tp_getattr */ ++ 0, /* tp_getattr */ + 0, /* tp_setattr */ + 0, /* tp_compare */ + 0, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ ++ 0, /* tp_hash */ ++ 0, /* tp_call */ ++ 0, /* tp_str */ ++ PyObject_GenericGetAttr, /* tp_getattro */ ++ 0, /* tp_setattro */ ++ 0, /* tp_as_buffer */ ++ Py_TPFLAGS_DEFAULT, /* tp_flags */ ++ 0, /* tp_doc */ ++ 0, /* tp_traverse */ ++ 0, /* tp_clear */ ++ 0, /* tp_richcompare */ ++ 0, /* tp_weaklistoffset */ ++ 0, /* tp_iter */ ++ 0, /* tp_iternext */ ++ gridMethods /* tp_methods */ + }; + + struct snackForm_s { +@@ -144,7 +193,6 @@ + newtComponent fo; + } ; + +-static PyObject * formGetAttr(PyObject * s, char * name); + static PyObject * formAdd(snackForm * s, PyObject * args); + static PyObject * formDraw(snackForm * s, PyObject * args); + static PyObject * formRun(snackForm * s, PyObject * args); +@@ -165,20 +213,34 @@ + }; + + static PyTypeObject snackFormType = { +- PyObject_HEAD_INIT(&PyType_Type) +- 0, /* ob_size */ ++ PyVarObject_HEAD_INIT(&PyType_Type, 0) + "snackform", /* tp_name */ + sizeof(snackForm), /* tp_size */ + 0, /* tp_itemsize */ + emptyDestructor, /* tp_dealloc */ + 0, /* tp_print */ +- formGetAttr, /* tp_getattr */ ++ 0, /* tp_getattr */ + 0, /* tp_setattr */ + 0, /* tp_compare */ + 0, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ ++ 0, /* tp_hash */ ++ 0, /* tp_call */ ++ 0, /* tp_str */ ++ PyObject_GenericGetAttr, /* tp_getattro */ ++ 0, /* tp_setattro */ ++ 0, /* tp_as_buffer */ ++ Py_TPFLAGS_DEFAULT, /* tp_flags */ ++ 0, /* tp_doc */ ++ 0, /* tp_traverse */ ++ 0, /* tp_clear */ ++ 0, /* tp_richcompare */ ++ 0, /* tp_weaklistoffset */ ++ 0, /* tp_iter */ ++ 0, /* tp_iternext */ ++ formMethods /* tp_methods */ + }; + + struct snackWidget_s { +@@ -191,7 +253,6 @@ + } ; + + static PyObject * widgetAddCallback(snackWidget * s, PyObject * args); +-static PyObject * widgetGetAttr(PyObject * s, char * name); + static void widgetDestructor(PyObject * s); + static PyObject * widgetEntrySetValue(snackWidget * s, PyObject * args); + static PyObject * widgetLabelText(snackWidget * s, PyObject * args); +@@ -255,21 +316,43 @@ + { NULL } + }; + ++static PyMemberDef widget_members[] = { ++ { "key" , T_INT, offsetof(snackWidget, co), 0, NULL }, ++ { "entryValue", T_STRING, offsetof(snackWidget, apointer), 0, NULL }, ++ { NULL } ++}; ++ + static PyTypeObject snackWidgetType = { +- PyObject_HEAD_INIT(&PyType_Type) +- 0, /* ob_size */ ++ PyVarObject_HEAD_INIT(&PyType_Type, 0) + "snackwidget", /* tp_name */ + sizeof(snackWidget), /* tp_size */ + 0, /* tp_itemsize */ + widgetDestructor, /* tp_dealloc */ + 0, /* tp_print */ +- widgetGetAttr, /* tp_getattr */ ++ 0, /* tp_getattr */ + 0, /* tp_setattr */ + 0, /* tp_compare */ + 0, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ ++ 0, /* tp_hash */ ++ 0, /* tp_call */ ++ 0, /* tp_str */ ++ PyObject_GenericGetAttr, /* tp_getattro */ ++ 0, /* tp_setattro */ ++ 0, /* tp_as_buffer */ ++ Py_TPFLAGS_DEFAULT, /* tp_flags */ ++ 0, /* tp_doc */ ++ 0, /* tp_traverse */ ++ 0, /* tp_clear */ ++ 0, /* tp_richcompare */ ++ 0, /* tp_weaklistoffset */ ++ 0, /* tp_iter */ ++ 0, /* tp_iternext */ ++ widgetMethods, /* tp_methods */ ++ widget_members, /* tp_members */ ++ widget_getset /* tp_getset */ + }; + + static snackWidget * snackWidgetNew (void) { +@@ -863,10 +946,6 @@ + return grid; + } + +-static PyObject * gridGetAttr(PyObject * s, char * name) { +- return Py_FindMethod(gridMethods, s, name); +-} +- + static PyObject * gridPlace(snackGrid * grid, PyObject * args) { + int x, y; + +@@ -890,7 +969,7 @@ + &anchorFlags, &growFlags)) + return NULL; + +- if (w->ob_type == &snackWidgetType) { ++ if (Py_TYPE(w) == &snackWidgetType) { + newtGridSetField(grid->grid, x, y, NEWT_GRID_COMPONENT, + w->co, pLeft, pTop, pRight, pBottom, anchorFlags, + growFlags); +@@ -905,10 +984,6 @@ + return Py_None; + } + +-static PyObject * formGetAttr(PyObject * s, char * name) { +- return Py_FindMethod(formMethods, s, name); +-} +- + static PyObject * formDraw(snackForm * s, PyObject * args) { + newtDrawForm(s->fo); + +@@ -1000,20 +1075,18 @@ + return Py_None; + } + +-static PyObject * widgetGetAttr(PyObject * s, char * name) { +- snackWidget * w = (snackWidget *) s; ++static PyObject * widget_get_checkboxValue(PyObject *self, void *closure) ++{ ++ snackWidget *w = (snackWidget *)self; + +- if (!strcmp(name, "key")) { +- return Py_BuildValue("i", w->co); +- } else if (!strcmp(name, "entryValue")) { +- return Py_BuildValue("s", w->apointer); +- } else if (!strcmp(name, "checkboxValue")) { + return Py_BuildValue("i", w->achar == ' ' ? 0 : 1); +- } else if (!strcmp(name, "radioValue")) { +- return Py_BuildValue("i", newtRadioGetCurrent(w->co)); +- } ++} ++ ++static PyObject * widget_get_radioValue(PyObject *self, void *closure) ++{ ++ snackWidget *w = (snackWidget *)self; + +- return Py_FindMethod(widgetMethods, s, name); ++ return Py_BuildValue("i", newtRadioGetCurrent(w->co)); + } + + static void widgetDestructor(PyObject * o) { +@@ -1355,10 +1428,19 @@ + Py_DECREF(o); + } + +-void init_snack(void) { ++MOD_INIT(_snack) ++{ + PyObject * d, * m; + ++#if PY_MAJOR_VERSION >= 3 ++ m = PyModule_Create(&moduledef); ++#else + m = Py_InitModule("_snack", snackModuleMethods); ++#endif ++ ++ if (! m) ++ return MOD_ERROR_VAL; ++ + d = PyModule_GetDict(m); + + setitemstring_decref(d, "ANCHOR_LEFT", PyInt_FromLong(NEWT_ANCHOR_LEFT)); +@@ -1435,4 +1517,6 @@ + setitemstring_decref(d, "COLORSET_COMPACTBUTTON", PyInt_FromLong(NEWT_COLORSET_COMPACTBUTTON)); + setitemstring_decref(d, "COLORSET_ACTSELLISTBOX", PyInt_FromLong(NEWT_COLORSET_ACTSELLISTBOX)); + setitemstring_decref(d, "COLORSET_SELLISTBOX", PyInt_FromLong(NEWT_COLORSET_SELLISTBOX)); ++ ++ return MOD_SUCCESS_VAL(m); + } +Index: newt-0.52.15/snack.py +=================================================================== +--- newt-0.52.15.orig/snack.py 2013-05-15 16:05:52.000000000 +0100 ++++ newt-0.52.15/snack.py 2013-05-15 16:05:52.000000000 +0100 +@@ -39,9 +39,11 @@ + - EntryWindow + """ + ++ ++from __future__ import absolute_import, print_function, unicode_literals + import _snack +-import types + import string ++import sys + + from _snack import FLAG_DISABLED, FLAGS_SET, FLAGS_RESET, FLAGS_TOGGLE, FD_READ, FD_WRITE, FD_EXCEPT + +@@ -304,7 +306,7 @@ + "INSERT": _snack.KEY_INSERT, + " " : ord(" ") } + +-for n in hotkeys.keys(): ++for n in list(hotkeys.keys()): + hotkeys[hotkeys[n]] = n + for o,c in [ (ord(c),c) for c in string.ascii_letters+string.digits ]: + hotkeys[c] = o +@@ -328,14 +330,14 @@ + self.w.addhotkey(hotkeys[keyname]) + + def add(self, widget): +- if widget.__dict__.has_key('hotkeys'): ++ if 'hotkeys' in widget.__dict__: + for key in widget.hotkeys.keys(): + self.addHotKey(key) + +- if widget.__dict__.has_key('gridmembers'): ++ if 'gridmembers' in widget.__dict__: + for w in widget.gridmembers: + self.add(w) +- elif widget.__dict__.has_key('w'): ++ elif 'w' in widget.__dict__: + self.trans[widget.w.key] = widget + return self.w.add(widget.w) + return None +@@ -408,14 +410,14 @@ + if (growy): + gridFlags = gridFlags | _snack.GRID_GROWY + +- if (what.__dict__.has_key('g')): ++ if 'g' in what.__dict__: + return self.g.setfield(col, row, what.g, padding, anchorFlags, + gridFlags) + else: + return self.g.setfield(col, row, what.w, padding, anchorFlags) + + def __init__(self, *args): +- self.g = apply(_snack.grid, args) ++ self.g = _snack.grid(*args) + self.gridmembers = [] + + colorsets = { "ROOT" : _snack.COLORSET_ROOT, +@@ -604,9 +606,9 @@ + self.item = 0 + Grid.__init__(self, len(buttonlist), 1) + for blist in buttonlist: +- if (type(blist) == types.StringType): ++ if isinstance(blist, str if sys.version >= '3' else basestring): + title = blist +- value = string.lower(blist) ++ value = blist.lower() + elif len(blist) == 2: + (title, value) = blist + else: +@@ -622,7 +624,7 @@ + self.item = self.item + 1 + + def buttonPressed(self, result): +- if self.hotkeys.has_key(result): ++ if result in self.hotkeys: + return self.hotkeys[result] + + for (button, value) in self.list: +@@ -657,7 +659,7 @@ + self.form_created = 0 + args = list(args) + args[:0] = [self] +- apply(Grid.__init__, tuple(args)) ++ Grid.__init__(*tuple(args)) + + def add(self, widget, col, row, padding = (0, 0, 0, 0), + anchorLeft = 0, anchorTop = 0, anchorRight = 0, +@@ -713,7 +715,7 @@ + """ + def __init__(self, screen, title, *args): + myargs = (self, screen, title, None) + args +- apply(GridFormHelp.__init__, myargs) ++ GridFormHelp.__init__(*myargs) + + class CheckboxTree(Widget): + """ CheckboxTree combo widget, +@@ -788,7 +790,7 @@ + l = Listbox(height, scroll = scroll, returnExit = 1) + count = 0 + for item in items: +- if (type(item) == types.TupleType): ++ if type(item) == tuple: + (text, key) = item + else: + text = item +@@ -848,9 +850,9 @@ + count = 0 + entryList = [] + for n in prompts: +- if (type(n) == types.TupleType): ++ if type(n) == tuple: + (n, e) = n +- if (type(e) in types.StringTypes): ++ if isinstance(e, str if sys.version >= '3' else basestring): + e = Entry(entryWidth, e) + else: + e = Entry(entryWidth) diff -ruN newt-0.52.15.orig/fink/patches/python_init_once.patch newt-0.52.15/fink/patches/python_init_once.patch --- newt-0.52.15.orig/fink/patches/python_init_once.patch 1969-12-31 17:00:00.000000000 -0700 +++ newt-0.52.15/fink/patches/python_init_once.patch 2013-05-28 13:26:54.000000000 -0600 @@ -0,0 +1,26 @@ +Author: Alastair McKinstry <mckins...@debian.org> +Description: newtInit() should only be called once +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=557960 +Forwarded: no +Last-Updated: 2011-12-04 + +Index: newt-0.52.15/snackmodule.c +=================================================================== +--- newt-0.52.15.orig/snackmodule.c 2013-05-15 16:05:12.000000000 +0100 ++++ newt-0.52.15/snackmodule.c 2013-05-15 16:05:12.000000000 +0100 +@@ -286,10 +286,14 @@ + } + + static PyObject * initScreen(PyObject * s, PyObject * args) { ++ static int init_newt = 1; + suspend.cb = NULL; + suspend.data = NULL; + +- newtInit(); ++ if (init_newt) { ++ newtInit(); ++ init_newt = 0; ++ } + newtCls(); + + Py_INCREF(Py_None); diff -ruN newt-0.52.15.orig/fink/patches/python_memory_allocation.patch newt-0.52.15/fink/patches/python_memory_allocation.patch --- newt-0.52.15.orig/fink/patches/python_memory_allocation.patch 1969-12-31 17:00:00.000000000 -0700 +++ newt-0.52.15/fink/patches/python_memory_allocation.patch 2013-05-28 13:26:34.000000000 -0600 @@ -0,0 +1,37 @@ +Author: Thomas Viehmann <t...@beamnet.de> +Description: Fix for python memory handling +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=445392 +Last-Updated: 2009-04-20 +Forwarded: no + +Index: newt-0.52.15/snackmodule.c +=================================================================== +--- newt-0.52.15.orig/snackmodule.c 2013-05-14 16:35:23.000000000 +0100 ++++ newt-0.52.15/snackmodule.c 2013-05-14 16:35:50.000000000 +0100 +@@ -275,7 +275,7 @@ + static snackWidget * snackWidgetNew (void) { + snackWidget * widget; + +- widget = PyObject_NEW(snackWidget, &snackWidgetType); ++ widget = PyObject_New(snackWidget, &snackWidgetType); + if (!widget) + return NULL; + +@@ -841,7 +841,7 @@ + if (help == Py_None) + help = NULL; + +- form = PyObject_NEW(snackForm, &snackFormType); ++ form = PyObject_New(snackForm, &snackFormType); + form->fo = newtForm(NULL, help, 0); + + return form; +@@ -853,7 +853,7 @@ + + if (!PyArg_ParseTuple(args, "ii", &cols, &rows)) return NULL; + +- grid = PyObject_NEW(snackGrid, &snackGridType); ++ grid = PyObject_New(snackGrid, &snackGridType); + grid->grid = newtCreateGrid(cols, rows); + + return grid; diff -ruN newt-0.52.15.orig/fink/patches/tcl8x.patch newt-0.52.15/fink/patches/tcl8x.patch --- newt-0.52.15.orig/fink/patches/tcl8x.patch 1969-12-31 17:00:00.000000000 -0700 +++ newt-0.52.15/fink/patches/tcl8x.patch 2013-05-28 14:29:08.000000000 -0600 @@ -0,0 +1,18 @@ +Author: Alastair McKinstry <mckins...@debian.org> +Description: For tcl, build and ship whiptcl.so +Forwarded: no +Last-Updated: 2011-12-03 + +Index: newt-0.52.14/Makefile.in +=================================================================== +--- newt-0.52.14.orig/Makefile.in 2011-12-03 09:48:35.000000000 +0000 ++++ newt-0.52.14/Makefile.in 2011-12-03 09:48:56.000000000 +0000 +@@ -59,7 +59,7 @@ + TARGET=depend $(PROGS) + endif + +-all: $(TARGET) _snackmodule.so ++all: $(TARGET) _snackmodule.so whiptcl.so + + test: test.o $(LIBNEWT) + $(CC) -g -o test test.o $(LIBNEWT) $(LDFLAGS) $(LIBS) diff -ruN newt-0.52.15.orig/fink/test-newt.sh newt-0.52.15/fink/test-newt.sh --- newt-0.52.15.orig/fink/test-newt.sh 1969-12-31 17:00:00.000000000 -0700 +++ newt-0.52.15/fink/test-newt.sh 2013-05-28 14:32:20.000000000 -0600 @@ -0,0 +1,9 @@ +#!/bin/bash +# the following should work +set -x + +whiptail --msgbox 'hoge a You are a normal test' 10 20 +whiptail --msgbox 'hoge a You are a normal test' 10 20 +whiptail --msgbox ha 1 4 +whiptail --msgbox ha 1 5 + ------------------------------------------------------------------------------ Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET Get 100% visibility into your production application - at no cost. Code-level diagnostics for performance bottlenecks with <2% overhead Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap1 _______________________________________________ Fink-commits mailing list Fink-commits@lists.sourceforge.net http://news.gmane.org/gmane.os.apple.fink.cvs