[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/perl-Newt/devel newt-perl-1.08-debian.patch, NONE, 1.1 newt-perl-1.08-fix.patch, NONE, 1.1 newt-perl-1.08-lang.patch, NONE, 1.1 newt-perl-1.08-typemap.patch, NONE, 1.1 newt-perl-1.08-xs.patch, NONE, 1.1 perl-Newt.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2



Author: jorton

Update of /cvs/extras/rpms/perl-Newt/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20085/devel

Modified Files:
	.cvsignore sources 
Added Files:
	newt-perl-1.08-debian.patch newt-perl-1.08-fix.patch 
	newt-perl-1.08-lang.patch newt-perl-1.08-typemap.patch 
	newt-perl-1.08-xs.patch perl-Newt.spec 
Log Message:
- import of perl-Newt, the package previously known as newt-perl


newt-perl-1.08-debian.patch:

--- NEW FILE newt-perl-1.08-debian.patch ---
--- libnewt-perl-1.08.orig/examples/install
+++ libnewt-perl-1.08/examples/install
@@ -10,7 +10,7 @@
 		"Blah, blah");
 
 my $i = 1;
-my $alert = Newt::Panel(1, 2, 'Instalation')
+my $alert = Newt::Panel(1, 2, 'Installation')
   ->Add(0, 0, Newt::Label('Installation complete'), 0, 0, 0, 0, 1)
   ->Add(0, 1, OK_BUTTON);
 my $label = Newt::Label('Starting installation...');
--- libnewt-perl-1.08.orig/MANIFEST
+++ libnewt-perl-1.08/MANIFEST
@@ -6,31 +6,4 @@
 Newt.xs
 test.pl
 typemap
-newtlib/CHANGES
-newtlib/COPYING
-newtlib/Makefile.PL
-newtlib/button.c
-newtlib/buttonbar.c
-newtlib/checkbox.c
-newtlib/dialogboxes.c
-newtlib/dialogboxes.h
-newtlib/entry.c
-newtlib/form.c
-newtlib/grid.c
-newtlib/label.c
-newtlib/listbox.c
-newtlib/newt.c
-newtlib/newt.h
-newtlib/newt_pr.h
-newtlib/scale.c
-newtlib/scrollbar.c
-newtlib/showchars.c
-newtlib/showkey.c
-newtlib/test.c
-newtlib/testgrid.c
-newtlib/textbox.c
-newtlib/tutorial.sgml
-newtlib/whiptail.c
-newtlib/whiptcl.c
-newtlib/windows.c
 examples/install
--- libnewt-perl-1.08.orig/Newt.pm
+++ libnewt-perl-1.08/Newt.pm
@@ -18,6 +18,8 @@
 	NEWT_ANCHOR_LEFT
 	NEWT_ANCHOR_RIGHT
 	NEWT_ANCHOR_TOP
+	NEWT_ARG_APPEND
+	NEWT_ARG_LAST
 	NEWT_COLORSET_ACTBUTTON
 	NEWT_COLORSET_ACTCHECKBOX
 	NEWT_COLORSET_ACTLISTBOX
@@ -39,6 +41,7 @@
 	NEWT_COLORSET_SELLISTBOX
 	NEWT_COLORSET_SHADOW
 	NEWT_COLORSET_TEXTBOX
+	NEWT_COLORSET_THREEDBOX
 	NEWT_COLORSET_TITLE
 	NEWT_COLORSET_WINDOW
 	NEWT_ENTRY_DISABLED
@@ -47,12 +50,12 @@
 	NEWT_ENTRY_SCROLL
 	NEWT_FD_READ
 	NEWT_FD_WRITE
-	NEWT_FLAG_DISABLED
 	NEWT_FLAG_BORDER
+	NEWT_FLAG_CHECKBOX
+	NEWT_FLAG_DISABLED
 	NEWT_FLAG_HIDDEN
 	NEWT_FLAG_MULTIPLE
 	NEWT_FLAG_NOF12
-	NEWT_FLAG_NOSCROLL
 	NEWT_FLAG_RETURNEXIT
 	NEWT_FLAG_SCROLL
 	NEWT_FLAG_SELECTED
@@ -79,6 +82,7 @@
 	NEWT_KEY_F8
 	NEWT_KEY_F9
 	NEWT_KEY_HOME
+	NEWT_KEY_INSERT
 	NEWT_KEY_LEFT
 	NEWT_KEY_PGDN
 	NEWT_KEY_PGUP
@@ -95,12 +99,14 @@
 	NEWT_EXIT_HOTKEY
 	NEWT_EXIT_COMPONENT
 	NEWT_EXIT_FOREADY		
-        OK_BUTTON
-        CANCEL_BUTTON
-        QUIT_BUTTON
-        BACK_BUTTON
-        OK_CANCEL_PANEL
-        OK_BACK_PANEL        
+	OK_BUTTON
+	CANCEL_BUTTON
+	QUIT_BUTTON
+	BACK_BUTTON
+	OK_CANCEL_PANEL
+	OK_BACK_PANEL        
+	newtGridDestroy
+	newtListboxAddEntry
 );
 
 %EXPORT_TAGS = (exits => [qw(NEWT_EXIT_HOTKEY 
@@ -125,6 +131,7 @@
 			    NEWT_KEY_F8
 			    NEWT_KEY_F9
 			    NEWT_KEY_HOME
+			    NEWT_KEY_INSERT
 			    NEWT_KEY_LEFT
 			    NEWT_KEY_PGDN
 			    NEWT_KEY_PGUP
@@ -139,6 +146,8 @@
 				NEWT_ANCHOR_LEFT
 				NEWT_ANCHOR_RIGHT
 				NEWT_ANCHOR_TOP)],
+		argss => [qw(NEWT_ARG_APPEND
+			     NEWT_ARG_LAST)],
 		colorsets => [qw(NEWT_COLORSET_ACTBUTTON
 				 NEWT_COLORSET_ACTCHECKBOX
 				 NEWT_COLORSET_ACTLISTBOX
@@ -160,10 +169,12 @@
 				 NEWT_COLORSET_SELLISTBOX
 				 NEWT_COLORSET_SHADOW
 				 NEWT_COLORSET_TEXTBOX
+				 NEWT_COLORSET_THREEDBOX
 				 NEWT_COLORSET_TITLE
 				 NEWT_COLORSET_WINDOW)],
 		flags => [qw(NEWT_FLAG_DISABLED
 			     NEWT_FLAG_BORDER
+			     NEWT_FLAG_CHECKBOX
 			     NEWT_FLAG_HIDDEN
 			     NEWT_FLAG_MULTIPLE
 			     NEWT_FLAG_NOF12
@@ -787,7 +798,7 @@
 
 =head1 NAME
 
-Newt - Perl bindings for RedHat newt library
+Newt - Perl bindings for Red Hat newt library
 
 =head1 SYNOPSIS
 
@@ -802,9 +813,9 @@
 
 =head1 DESCRIPTION
 
-The Newt module implements perl bindings for the RedHat newt windowing
+The Newt module implements perl bindings for the Red Hat newt windowing
 system, a terminal-based window and widget library for writing
-applications with a simple, but user friendly, interface.
+applications with a simple, but user-friendly, interface.
 
 =head1 Basic Newt functions
 
@@ -937,7 +948,7 @@
 actual tag for that component.
 
 In general when the return value of any method of a component isn't
-described the method returns the component itself to allow contructions
+described the method returns the component itself to allow constructions
 like:
 
     $panel
@@ -1029,12 +1040,12 @@
 
 =head2 Checkboxes
 
-Newt checkboxes are peculiar, since may have more than two
+Newt checkboxes are peculiar, since they may have more than two
 states. To create a normal one (checked or unchecked), do this:
 
     $check = Newt::Checkbox("Normal checkbox");
 
-But you can create, for example, a checkbox that switches form not
+But you can create, for example, a checkbox that switches from not
 checked to checked with an asterisk and then to checked with an 'M':
 
     $check = Newt::Checkbox("Normal checkbox", " ", " *M");
@@ -1175,14 +1186,14 @@
 All the arguments are simply concatenated using the double quote
 operator.
 
-The flags that can be passed to the cronstuctor are the following:
+The flags that can be passed to the constructor are the following:
 
 =over
 
 =item C<NEWT_FLAG_WRAP>
 
 All text in the textbox should be wrapped to fit the width of the
-textbox. If this flag is not specified, each newline delimited line in
+textbox. If this flag is not specified, each newline-delimited line in
 the text is truncated if it is too long to fit.
 
 When Newt wraps text, it tries not to break lines on spaces or
@@ -1191,7 +1202,7 @@
 
 =item C<NEWT_FLAG_SCROLL>
 
-The text shoud be scrollable. When this option is used, the scrollbar
+The text should be scrollable. When this option is used, the scrollbar
 which is added increases the width of the area used by the textbox by
 2 characters.
 
@@ -1238,13 +1249,13 @@
 final textbox, the width and flex values for the text (which are
 identical to the parameters passed to C<Newt::Reflow()>, and the flags
 for the textbox (which are the same as the flags for
-C<Newt::Textbox(). This function does not let you limit the height of
-the textbox, however, making limiting its use to contructing
+C<Newt::Textbox()>. This function does not let you limit the height of
+the textbox, however, making limiting its use to constructing
 textboxes which do not need to scroll.
 
 To find out how tall the textbox created by C<Newt::TextboxReflowed()> is, 
 use C<Newt::GetNumLines()>, which returns the number of lines in the
-textbox. For textboxes created by C<Newt::TextboxReflowed()>/, this is
+textbox. For textboxes created by C<Newt::TextboxReflowed()>, this is
 always the same as the height of the textbox.
 
 Please note that the order of the parameters of Newt::ReflowText and 
@@ -1270,7 +1281,7 @@
 C<$normalColorset> is often C<NEWT_COLORSET_WINDOW> and
 C<$thumbColorset> C<NEWT_COLORSET_ACTCHECKBOX>.
 
-If you do not want to bother with colors, you can ommit the last two
+If you do not want to bother with colors, you can omit the last two
 parameters and let Newt use the defaults.
 
 As the scrollbar is normally updated by the component it is mated with,
@@ -1285,7 +1296,7 @@
 
     $panel = Newt::Panel(2, 3, "Panel example");
 
-When run, panesl are centered by default, but you can specify a
+When run, panels are centered by default, but you can specify a
 position relative to the topleft corner of the screen by appending two
 optional integers:
 
@@ -1372,7 +1383,7 @@
 component or a key that causes the panel to exit. Sometimes is useful
 to present the interface to the user without blocking the execution of
 code. This can be done by only drawing the panel, not running it. It
-is easy to show an advance status for a lengthy operation liek this:
+is easy to show an advance status for a lengthy operation like this:
 
    $i = 1;
    foreach (@items) {
@@ -1392,7 +1403,7 @@
 =head1 Constants
 
 You can import all the constants exported by this package as needed
-qor using several predefined tags, with the folowing syntax:
+or using several predefined tags, with the following syntax:
 
     use Newt qw(:exits :keys);
 
@@ -1419,8 +1430,8 @@
 =item macros 
 
 macros to make useful buttons and panels: OK_BUTTON, CANCEL_BUTTON,
-QUIT_BUTTON, BACK_BUTTON, OK_CANCEL_PANEL, OK_BACK_PANEL. this macros
-only create componetnts which are properly tagged.
+QUIT_BUTTON, BACK_BUTTON, OK_CANCEL_PANEL, OK_BACK_PANEL. This macros
+only create components which are properly tagged.
 
 =back
 
@@ -1436,17 +1447,17 @@
 
 =head1 SEE ALSO
 
-I<Writing programs using Newt>, by Eric Troan.
+I<Writing programs using Newt>, by Erik Troan.
 
 =head1 THANKS TO
 
-Eric Troan, for writing this useful library. Thanks for his tutorial,
+Erik Troan, for writing this useful library. Thanks for his tutorial,
 too, from where I stole complete paragraphs for this documentation,
 I'm afraid.
 
 =head1 AUTHOR
 
-The original author of the RedHat newt library is Erik Troan,
+The original author of the Red Hat newt library is Erik Troan,
 <I<ewt redhat com>> The author of this Perl bindings is Alejandro
 Escalante Medina, <I<amedina msg com mx>>
 
--- libnewt-perl-1.08.orig/Newt.xs
+++ libnewt-perl-1.08/Newt.xs
@@ -8,7 +8,7 @@
 }
 #endif
 
-#include "newtlib/newt.h"
+#include <newt.h>
 
 static int
 entryfilter_cb(co, cv, ch, cursor)
@@ -136,6 +136,18 @@
 #else
 	    goto not_there;
 #endif
+	if (strEQ(name, "NEWT_ARG_APPEND"))
+#ifdef NEWT_ARG_APPEND
+	    return NEWT_ARG_APPEND;
+#else
+	    goto not_there;
+#endif
+	if (strEQ(name, "NEWT_ARG_LAST"))
+#ifdef NEWT_ARG_LAST
+	    return NEWT_ARG_LAST;
+#else
+	    goto not_there;
+#endif
 	if (strEQ(name, "NEWT_COLORSET_ACTBUTTON"))
 #ifdef NEWT_COLORSET_ACTBUTTON
 	    return NEWT_COLORSET_ACTBUTTON;
@@ -262,6 +274,12 @@
 #else
 	    goto not_there;
 #endif
+	if (strEQ(name, "NEWT_COLORSET_THREEDBOX"))
+#ifdef NEWT_COLORSET_THREEDBOX
+	    return NEWT_COLORSET_THREEDBOX;
+#else
+	    goto not_there;
+#endif
 	if (strEQ(name, "NEWT_COLORSET_TITLE"))
 #ifdef NEWT_COLORSET_TITLE
 	    return NEWT_COLORSET_TITLE;
@@ -316,6 +334,12 @@
 #else
 	    goto not_there;
 #endif
+	if (strEQ(name, "NEWT_FLAG_CHECKBOX"))
+#ifdef NEWT_FLAG_CHECKBOX
+	    return NEWT_FLAG_CHECKBOX;
+#else
+	    goto not_there;
+#endif
 	if (strEQ(name, "NEWT_FLAG_DISABLED"))
 #ifdef NEWT_FLAG_DISABLED
 	    return NEWT_FLAG_DISABLED;
@@ -496,6 +520,12 @@
 #else
 	    goto not_there;
 #endif
+	if (strEQ(name, "NEWT_KEY_INSERT"))
+#ifdef NEWT_KEY_INSERT
+	    return NEWT_KEY_INSERT;
+#else
+	    goto not_there;
+#endif
 	if (strEQ(name, "NEWT_KEY_LEFT"))
 #ifdef NEWT_KEY_LEFT
 	    return NEWT_KEY_LEFT;
@@ -720,12 +754,14 @@
 void
 newtSuspend()
 
+ # something is probably wrong below.
 void
-newtSetSuspendCallback(cv)
+newtSetSuspendCallback(cv, data)
 	SV *cv;
+	SV *data
 	CODE:
 		perl_suspend_cb = newSVsv(cv);
-		newtSetSuspendCallback(suspend_cb);
+		newtSetSuspendCallback(suspend_cb, data);
 
 void
 newtResume()
@@ -945,6 +981,70 @@
 	int	sense
 
 newtComponent
+newtCheckboxTree(left, top, height, flags)
+	int	left
+	int	top
+	int	height
+	int	flags
+
+newtComponent
+newtCheckboxTreeMulti(left, top, height, seq, flags)
+	int	left
+	int	top
+	int	height
+	char *	seq
+	int	flags
+
+void
+newtCheckboxTreeGetSelection(co, numitems)
+	newtComponent	co
+	PREINIT:
+		int i;
+		int numitems = 0;
+		void **array;
+	PPCODE:
+		array = newtListboxGetSelection(co, &numitems);
+		for(i = 0; i < numitems; i++) {
+			XPUSHs(sv_2mortal(newSVsv((SV *)array[i])));
+		}
+
+void
+newtCheckboxTreeGetMultiSelection(co, numitems, seqnum)
+	newtComponent	co
+	char	seqnum
+	PREINIT:
+		int i;
+		int numitems = 0;
+		void **array;
+	PPCODE:
+		array = newtListboxGetSelection(co, &numitems);
+		for(i = 0; i < numitems; i++) {
+			XPUSHs(sv_2mortal(newSVsv((SV *)array[i])));
+		}
+
+int
+newtCheckboxTreeAddItem(co, text, data, flags, index, ...)
+	newtComponent	co
+	char *	text
+	void *	data
+	int	flags
+	int	index
+
+int
+newtCheckboxTreeAddArray(co, text, data, flags, indexes, ...)
+	newtComponent	co
+	char *	text
+	void *	data
+	int	flags
+	int *	indexes
+
+int *
+newtCheckboxTreeFindItem(co, data)
+	newtComponent	co
+	void *	data
+	
+
+newtComponent
 newtTextboxReflowed(left, top, text, width, flexDown, flexUp, flags)
 	int	left
 	int	top
@@ -1087,6 +1187,12 @@
 char *
 newtEntryGetValue(co)
 	newtComponent	co
+
+void
+newtEntrySetFlags(co, flags, sense)
+	newtComponent	co
+	int	flags
+	enum newtFlagsSense	sense
 
 newtComponent
 newtScale(left, top, width, fullValue)
--- libnewt-perl-1.08.orig/Makefile.PL
+++ libnewt-perl-1.08/Makefile.PL
@@ -3,14 +3,6 @@
 # the contents of the Makefile that is written.
 WriteMakefile(
     'NAME'	=> 'Newt',
-    'LIBS'	=> ['-lslang '],   # e.g., '-lm' 
+    'LIBS'	=> ['-lnewt'],  # e.g. ['-lm']
     'VERSION_FROM' => 'Newt.pm', # finds $VERSION
-    'MYEXTLIB'  => 'newtlib/libnewt$(LIB_EXT)',
 );
-
-sub MY::postamble {
-  '
-$(MYEXTLIB): newtlib/Makefile
-	cd newtlib && $(MAKE) $(PASTHRU)
-';
-}
--- libnewt-perl-1.08.orig/ChangeLog
+++ libnewt-perl-1.08/ChangeLog
@@ -1,9 +1,9 @@
 Fri Nov  6 18:45:51 1998  Alejandro Escalante Medina  <amedina msg com mx>
 
-	* Newt.pm: Flat $panel->{refs} before ->Run to make posible to find
+	* Newt.pm: Flat $panel->{refs} before ->Run to make possible to find
 	a component in a subpanel.
 	Made all methods returns $self when makes sense.
-	Some changes in Textboxes, labels, etc.  to allow lists, hopes anything break.
+	Some changes in Textboxes, labels, etc. to allow lists, hopes anything break.
 	Made the window system usable and add Hide method to panel;
 
 	* Newt.xs: Fixed path for newt.h
@@ -33,16 +33,16 @@
 
 Fri Oct 30 18:49:16 1998  Alejandro Escalante Medina  <amedina msg com mx>
 
-	* Newt.pm: Rewrote radiogrups to use grids only. No forms, sorry.
+	* Newt.pm: Rewrote radiogroups to use grids only. No forms, sorry.
 	Fixed some minor typos.
 	Changed $VERSION to be more perl-module compliant. this changes
 	version number, sorry again.
 
 Fri Oct 30 18:37:11 1998  Alejandro Escalante Medina  <amedina msg com mx>
 
-	* Newt.pm: Rewrote radiogrups to use grids only. No forms, sorry.
-	Fixed some minot typos (Textbox::Set() and one more).
-	Changed $VERSION to be more perl-module compliant. this changes
+	* Newt.pm: Rewrote radiogroups to use grids only. No forms, sorry.
+	Fixed some minor typos (Textbox::Set() and one more).
+	Changed $VERSION to be more perl-module compliant. This changes
 	version number, sorry again.
 
 Fri Oct 30 18:28:34 1998  Alejandro Escalante Medina  <amedina msg com mx>
@@ -51,7 +51,7 @@
 
 Fri Oct 30 18:21:50 1998  Alejandro Escalante Medina  <amedina msg com mx>
 
-	* Newt.pm: Rewrote radiogrups to use grids only. No forms, sorry.
+	* Newt.pm: Rewrote radiogroups to use grids only. No forms, sorry.
 	Fixed some minot typos (Textbox::Set() and one more).
 	Changed $VERSION to be more perl-module compliant. this changes
 	version number, sorry again.
@@ -71,7 +71,7 @@
 
 Mon Oct 26 18:04:51 1998  Alejandro Escalante Medina  <amedina msg com mx>
 
-	* test.pl: Changes to test new radiogrupo funcionality
+	* test.pl: Changes to test new radiogroups funcionality
 
 	* Newt.pm: Added DESTROY to forms
 	Made Radiogroups derive from panels
--- libnewt-perl-1.08.orig/README
+++ libnewt-perl-1.08/README
@@ -3,7 +3,7 @@
 Description
 
 Newt is a perl library built on top of Red Hat's newt C library for
-text screen widgets. It allows a perl programer to build simple but
+text screen widgets. It allows a perl programmer to build simple but
 effective text-mode user interfaces with little effort.
 
 It is very usable because it has complete support for all widgets
--- libnewt-perl-1.08.orig/test.pl.debian
+++ libnewt-perl-1.08/test.pl
@@ -24,7 +24,7 @@
   Newt::Resume();
 }
 
-Newt::SetSuspendCallback(\&suspend_cb);
+Newt::SetSuspendCallback(\&suspend_cb, data);
 
 # Panel example
 Newt::Init();
@@ -38,7 +38,7 @@
 $ok = Newt::Button("Ok", 0);
 $ok->Tag("OK");
 $li = Newt::Listbox(5, NEWT_FLAG_SCROLL | NEWT_FLAG_BORDER | NEWT_FLAG_MULTIPLE);
-$li->Add('Red', 'Blue', 'Yellow', 'Gray', 'Green');
+$li->Append('Red', 'Blue', 'Yellow', 'Gray', 'Green');
 $panel1 = Newt::Panel(2, 4, "Panel example");
 $panel1->AddHotKey(NEWT_KEY_F11);
 $panel2 = Newt::Panel(1, 2, "Second panel");

newt-perl-1.08-fix.patch:

--- NEW FILE newt-perl-1.08-fix.patch ---
--- Newt-1.08/Newt.xs.fix	Fri Nov  6 18:34:52 1998
+++ Newt-1.08/Newt.xs	Mon Dec 17 16:13:22 2001
@@ -412,6 +412,12 @@
 #else
 	    goto not_there;
 #endif
+	if (strEQ(name, "NEWT_KEY_ESCAPE"))
+#ifdef NEWT_KEY_ESCAPE
+	    return NEWT_KEY_ESCAPE;
+#else
+	    goto not_there;
+#endif
 	if (strEQ(name, "NEWT_KEY_EXTRA_BASE"))
 #ifdef NEWT_KEY_EXTRA_BASE
 	    return NEWT_KEY_EXTRA_BASE;
--- Newt-1.08/Newt.pm.fix	Tue Jun 12 14:42:39 2001
+++ Newt-1.08/Newt.pm	Tue Jun 12 17:26:57 2001
@@ -68,6 +68,7 @@
 	NEWT_KEY_DOWN
 	NEWT_KEY_END
 	NEWT_KEY_ENTER
+	NEWT_KEY_ESCAPE
 	NEWT_KEY_EXTRA_BASE
 	NEWT_KEY_F1
 	NEWT_KEY_F10
@@ -117,6 +118,7 @@
 			    NEWT_KEY_DOWN
 			    NEWT_KEY_END
 			    NEWT_KEY_ENTER
+			    NEWT_KEY_ESCAPE
 			    NEWT_KEY_EXTRA_BASE
 			    NEWT_KEY_F1
 			    NEWT_KEY_F10
@@ -454,7 +456,7 @@
 sub Newt::Component::TakesFocus {
   my ($self, $yesorno) = @_;
 
-  Newt::newtComponentTakesFocus(self->{co}, $yesorno);
+  Newt::newtComponentTakesFocus($self->{co}, $yesorno);
   $self;
 }
 
@@ -514,12 +516,25 @@
   $self;
 }
 
+sub Newt::Form::Focus {
+  my ($self, $comp) = @_;
+
+  Newt::newtFormSetCurrent($self->{co}, $comp->{co});
+  $self;
+}
+
 sub Newt::Form::Run {
   my $self = shift;
 
   return Newt::newtFormRun($self->{co});
 }
 
+sub Newt::Form::GetCurrent {
+  my $self = shift;
+
+  return Newt::newtFormGetCurrent($self->{co});
+}
+
 sub Newt::Form::DESTROY {
   my $self = shift;
   
@@ -593,7 +608,7 @@
 
 ########################### Newt::Listbox
 
-sub Newt::Listbox::Add {
+sub Newt::Listbox::Append {
   my $self = shift;
 
   foreach (@_) {

newt-perl-1.08-lang.patch:

--- NEW FILE newt-perl-1.08-lang.patch ---

The AUTOLOAD function in Newt.pm looks at strerror(errno) to see
whether the constant() function (in Newt.xs) has returned EINVAL.

strerror(errno) is returned in the locale's language, so won't
always match /Invalid/.  constant() should never fail with
EINVAL anyway, so just ignore this case.

--- Newt-1.08/Newt.pm.lang	2003-07-31 12:01:52.000000000 +0100
+++ Newt-1.08/Newt.pm	2003-07-31 12:02:26.000000000 +0100
@@ -220,13 +220,8 @@
   croak "& not defined" if $constname eq 'constant';
   my $val = constant($constname, @_ ? $_[0] : 0);
   if ($! != 0) {
-    if ($! =~ /Invalid/) {
       $AutoLoader::AUTOLOAD = $AUTOLOAD;
       goto &AutoLoader::AUTOLOAD;
-    }
-    else {
-      croak "Your vendor has not defined Newt macro $constname";
-    }
   }
   *$AUTOLOAD = sub { $val };
   goto &$AUTOLOAD;

newt-perl-1.08-typemap.patch:

--- NEW FILE newt-perl-1.08-typemap.patch ---
--- Newt-1.08/typemap.valist	Thu Oct  8 18:02:18 1998
+++ Newt-1.08/typemap	Tue Jun 12 14:43:18 2001
@@ -23,9 +23,7 @@
 struct newtExitStruct *				T_PTROBJ
 struct newtWinEntry *				T_PTROBJ
 newtSuspendCallback				T_PTROBJ
-va_list						T_PTROBJ
 newtEntryFilter					T_PTROBJ
 newtComponent *					T_PTROBJ
-__gnuc_va_list					T_PTROBJ
 unsigned long long				T_PTROBJ
-enum newtFlagsSense				T_PTROBJ
+enum newtFlagsSense				T_IV

newt-perl-1.08-xs.patch:

--- NEW FILE newt-perl-1.08-xs.patch ---
--- Newt-1.08/Newt.xs.exes	2006-11-15 16:18:19.000000000 +0000
+++ Newt-1.08/Newt.xs	2006-11-15 16:20:20.000000000 +0000
@@ -64,14 +64,6 @@
 		perl_call_sv(perl_suspend_cb, G_DISCARD | G_NOARGS);	
 }
 
-static int
-not_here(s)
-char *s;
-{
-    croak("%s not implemented on this architecture", s);
-    return -1;
-}
-
 static double
 constant(name, arg)
 char *name;
@@ -94,12 +86,6 @@
     case 'G':
 	break;
     case 'H':
-	if (strEQ(name, "H_NEWT"))
-#ifdef H_NEWT
-	    return H_NEWT;
-#else
-	    goto not_there;
-#endif
 	break;
     case 'I':
 	break;
@@ -706,10 +692,6 @@
 	int		arg
 
 
-void
-va_end(arg0)
-	__gnuc_va_list	arg0
-
 int
 newtInit()
 
@@ -720,10 +702,6 @@
 newtCls()
 
 void
-newtResizeScreen(redraw)
-	int	redraw
-
-void
 newtWaitForKey()
 
 void
@@ -857,11 +835,6 @@
 newtRadioGetCurrent(setMember)
 	newtComponent	setMember
 
-void
-newtGetScreenSize(cols, rows)
-	int *	cols
-	int *	rows
-
 newtComponent
 newtLabel(left, top, text)
 	int	left
@@ -894,13 +867,11 @@
 	int	height
 	int	flags
 
-long
+SV *
 newtListboxGetCurrent(co)
 	newtComponent	co
-	CODE:
-		RETVAL = (long) newtListboxGetCurrent(co);
-	OUTPUT:
-		RETVAL
+	PPCODE:
+		XPUSHs(sv_2mortal(newSVsv((SV *)newtListboxGetCurrent(co))));
 
 void
 newtListboxSetCurrent(co, num)
@@ -927,25 +898,48 @@
 newtListboxSetData(co, num, data)
 	newtComponent	co
 	int	num
-	void *	data
+	SV *    data
+	PREINIT:
+	char *  text;
+	void *  old;
+	PPCODE:
+		newtListboxGetEntry(co, num, &text, &old);
+		if (old) SvREFCNT_dec((SV *) old);
+		newtListboxSetData(co, num, data);
+		SvREFCNT_inc(data);
 
 int
 newtListboxAppendEntry(co, text, data)
 	newtComponent	co
 	char *	text
 	SV *	data
-	
+	CODE:
+		RETVAL = newtListboxAppendEntry(co, text, data);
+		if (!RETVAL) SvREFCNT_inc(data);
+	OUTPUT:
+		RETVAL
+
 int
 newtListboxInsertEntry(co, text, data, key)
 	newtComponent	co
 	char *	text
 	SV *	data
 	SV *	key
+	CODE:
+		RETVAL = newtListboxInsertEntry(co, text, data, key);
+		if (!RETVAL) SvREFCNT_inc(data);
+	OUTPUT:
+		RETVAL
 
 int
 newtListboxDeleteEntry(co, data)
 	newtComponent	co
 	SV *	data
+	CODE:
+		RETVAL = newtListboxDeleteEntry(co, data);
+		if (!RETVAL) SvREFCNT_dec(data);
+	OUTPUT:
+		RETVAL
 
 
 void
@@ -979,8 +973,8 @@
 void
 newtListboxSelectItem(co, key, sense)
 	newtComponent	co
-	void *	key
-	int	sense
+	SV *	key
+	enum newtFlagsSense	sense
 
 newtComponent
 newtCheckboxTree(left, top, height, flags)
@@ -1094,9 +1088,14 @@
 newtFormSetSize(co)
 	newtComponent	co
 
-newtComponent
+void
 newtFormGetCurrent(co)
 	newtComponent	co
+	PREINIT:
+		SV sv; /* joe: do I need this? just copying newtFormRun */
+	PPCODE:
+		XPUSHs(sv_2mortal(sv_setref_pv(newSViv(0), "newtComponent",
+				 (void*)newtFormGetCurrent(co))));
 
 void
 newtFormSetBackground(co, color)
@@ -1313,12 +1312,6 @@
 	int	recurse
 
 newtGrid
-newtButtonBarv(button1, b1comp, args)
-	char *	button1
-	newtComponent *	b1comp
-	va_list	args
-
-newtGrid
 newtButtonBar(button1, b1comp, ...)
 	char *	button1
 	newtComponent *	b1comp
@@ -1329,13 +1322,6 @@
 	char *	buttonText
 	char *	text
 
-void
-newtWinMessagev(title, buttonText, text, argv)
-	char *	title
-	char *	buttonText
-	char *	text
-	va_list	argv
-
 int
 newtWinChoice(title, button1, button2, text, ...)
 	char *	title


--- NEW FILE perl-Newt.spec ---
Summary: Perl bindings for the Newt library
Name: perl-Newt
Version: 1.08
Release: 16
Group: System Environment/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
URL: http://search.cpan.org/~amedina/Newt-1.08/
Source: http://search.cpan.org/CPAN/authors/id/A/AM/AMEDINA/Newt-1.08.tar.gz
Patch0: newt-perl-1.08-debian.patch
Patch1: newt-perl-1.08-typemap.patch
Patch2: newt-perl-1.08-fix.patch
Patch3: newt-perl-1.08-xs.patch
Patch4: newt-perl-1.08-lang.patch
BuildRequires: newt-devel, perl-devel
Obsoletes: newt-perl < 1.08-15
Provides: newt-perl = %{version}-%{release}
Requires: %(eval `perl -V:version`; echo "perl(:MODULE_COMPAT_$version)")
License: GPL or Artistic

%description
This package provides Perl bindings for the Newt widget
library, which provides a color text mode user interface.

%prep
%setup -q -n Newt-%{version}
%patch0 -p1 -b .debian
%patch1 -p1 -b .valist
%patch2 -p1 -b .fix
%patch3 -p1 -b .exes
%patch4 -p1 -b .lang
rm -rf newtlib

%build
perl Makefile.PL PREFIX=%{_prefix} INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
make

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

find $RPM_BUILD_ROOT \( -name perllocal.pod -o -name .packlist \) -exec rm -v {} \;
find $RPM_BUILD_ROOT -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null ';'
chmod -R u+w $RPM_BUILD_ROOT/*

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr (-,root,root)
%doc ChangeLog README
%{perl_vendorarch}/Newt.pm
%{perl_vendorarch}/auto/Newt
%{_mandir}/man3/Newt*

%changelog
* Tue Mar  6 2007 Joe Orton <jorton redhat com> 1.08-15
- rename to perl-Newt; Obsolete and Provide newt-perl (#226196)

* Thu Mar  1 2007 Joe Orton <jorton redhat com> 1.08-14
- various cleanups (Jason Tibbs, #226196)
- require perl-devel

* Tue Feb 27 2007 Joe Orton <jorton redhat com> 1.08-13
- clean up URL, Source, BuildRoot, BuildRequires

* Thu Dec 14 2006 Joe Orton <jorton redhat com> 1.08-12
- fix test.pl (Charlie Brady, #181674)

* Thu Dec 14 2006 Joe Orton <jorton redhat com> 1.08-11
- fix directory ownership (#216610)

* Wed Nov 15 2006 Joe Orton <jorton redhat com> 1.08-10
- fix compiler warnings (#155977)

* Wed Jul 12 2006 Jesse Keating <jkeating redhat com> - 1.08-9.2.2
- rebuild

* Fri Feb 10 2006 Jesse Keating <jkeating redhat com> - 1.08-9.2.1
- bump again for double-long bug on ppc(64)

* Tue Feb 07 2006 Jesse Keating <jkeating redhat com> - 1.08-9.2
- rebuilt for new gcc4.1 snapshot and glibc changes

* Fri Dec 09 2005 Jesse Keating <jkeating redhat com>
- rebuilt

* Tue Sep 27 2005 Petr Rockai <prockai redhat com> - 1.08-9
- rebuild against newt 0.52.0

* Fri Mar  4 2005 Joe Orton <jorton redhat com> 1.08-8
- rebuild

* Tue Aug 17 2004 Joe Orton <jorton redhat com> 1.08-7
- add perl MODULE_COMPAT requirement

* Mon Aug 16 2004 Joe Orton <jorton redhat com> 1.08-6
- rebuild

* Mon Sep  8 2003 Joe Orton <jorton redhat com> 1.08-5
- fix issue with non-English LANG setting (#67735)

* Tue Aug  5 2003 Joe Orton <jorton redhat com> 1.08-4
- rebuild

* Thu May  9 2002 Joe Orton <jorton redhat com> 1.08-3
- add newt requirement

* Wed Apr 03 2002 Gary Benson <gbenson redhat com> 1.08-2
- tweak perl dependency as suggested by cturner redhat com

* Wed Mar 20 2002 Gary Benson <gbenson redhat com>
- make like all the other perl modules we ship (bind to perl version,
  use perl dependency finding scripts, build filelist automatically).
- include documentation
- build against perl 5.6.1

* Thu Jan 10 2002 Joe Orton <jorton redhat com>
- Adapted for RHL

* Tue Sep 11 2001 Mark Cox <mjc redhat com>
- Change paths to new layout

* Mon Jun 11 2001 Joe Orton <jorton redhat com>
- Initial revision.


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/perl-Newt/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	22 May 2007 15:51:40 -0000	1.1
+++ .cvsignore	24 May 2007 13:12:48 -0000	1.2
@@ -0,0 +1 @@
+Newt-1.08.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/perl-Newt/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	22 May 2007 15:51:40 -0000	1.1
+++ sources	24 May 2007 13:12:48 -0000	1.2
@@ -0,0 +1 @@
+462f3fabc05ec5dd4a2d554c01568bdf  Newt-1.08.tar.gz


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]