From 7d20bf842564762791d98c06fdd661c120af8588 Mon Sep 17 00:00:00 2001 From: naddy Date: Mon, 7 Jun 2004 14:43:39 +0000 Subject: [PATCH] * use the published libreadline interface to get the screen size (fixes build) * sync patches --- .../octave/patches/patch-libcruft_Makefile_in | 14 ++++---- .../patches/patch-liboctave_oct-term_cc | 34 +++++++++++++++++++ math/octave/patches/patch-src_sysdep_cc | 11 +++--- 3 files changed, 47 insertions(+), 12 deletions(-) create mode 100644 math/octave/patches/patch-liboctave_oct-term_cc diff --git a/math/octave/patches/patch-libcruft_Makefile_in b/math/octave/patches/patch-libcruft_Makefile_in index 9f27d136888..726615c9954 100644 --- a/math/octave/patches/patch-libcruft_Makefile_in +++ b/math/octave/patches/patch-libcruft_Makefile_in @@ -1,6 +1,6 @@ -$OpenBSD: patch-libcruft_Makefile_in,v 1.1.1.1 2001/07/15 18:07:16 naddy Exp $ ---- libcruft/Makefile.in.orig Thu Nov 12 00:27:35 1998 -+++ libcruft/Makefile.in Fri Jul 13 00:23:01 2001 +$OpenBSD: patch-libcruft_Makefile_in,v 1.2 2004/06/07 14:43:39 naddy Exp $ +--- libcruft/Makefile.in.orig 1998-11-12 00:27:35.000000000 +0100 ++++ libcruft/Makefile.in 2004-06-05 21:08:03.000000000 +0200 @@ -37,7 +37,7 @@ ifeq ($(SHARED_LIBS), true) BINDISTLIBS = libcruft/libcruft.$(SHLEXT) endif @@ -10,14 +10,14 @@ $OpenBSD: patch-libcruft_Makefile_in,v 1.1.1.1 2001/07/15 18:07:16 naddy Exp $ .PHONY: all $(SUBDIRS): -@@ -76,6 +76,10 @@ endif - +@@ -77,6 +77,10 @@ endif libcruft.$(SHLEXT): $(CRUFT_PICOBJ) $(SH_LD) $(SH_LDFLAGS) -o $@ $^ -+ + +libcruft.$(LIBEXT): $(CRUFT_OBJ) + $(AR) $(ARFLAGS) $@ $^ + $(RANLIB) $@ - ++ $(CRUFT_OBJ): + check: all diff --git a/math/octave/patches/patch-liboctave_oct-term_cc b/math/octave/patches/patch-liboctave_oct-term_cc new file mode 100644 index 00000000000..623a4058392 --- /dev/null +++ b/math/octave/patches/patch-liboctave_oct-term_cc @@ -0,0 +1,34 @@ +$OpenBSD: patch-liboctave_oct-term_cc,v 1.1 2004/06/07 14:43:39 naddy Exp $ +--- liboctave/oct-term.cc.orig 1996-03-03 02:16:15.000000000 +0100 ++++ liboctave/oct-term.cc 2004-06-06 20:57:32.000000000 +0200 +@@ -26,6 +26,10 @@ Software Foundation, 59 Temple Place - S + + #include "oct-term.h" + ++#if defined (USE_READLINE) ++extern "C" int rl_get_screen_size(int *, int *); ++#endif ++ + // For now, use the variables from readline. It already handles + // SIGWINCH, so these values have a good chance of being correct even + // if the window changes size (they will be wrong if, for example, the +@@ -36,7 +40,8 @@ int + terminal_columns (void) + { + #if defined (USE_READLINE) +- extern int screenwidth; ++ int screenheight, screenwidth; ++ rl_get_screen_size(&screenheight, &screenwidth); + return screenwidth > 0 ? screenwidth : 80; + #else + // XXX FIXME XXX +@@ -48,7 +53,8 @@ int + terminal_rows (void) + { + #if defined (USE_READLINE) +- extern int screenheight; ++ int screenheight, screenwidth; ++ rl_get_screen_size(&screenheight, &screenwidth); + return screenheight > 0 ? screenheight : 24; + #else + // XXX FIXME XXX diff --git a/math/octave/patches/patch-src_sysdep_cc b/math/octave/patches/patch-src_sysdep_cc index d4c9be44439..2b422d491dd 100644 --- a/math/octave/patches/patch-src_sysdep_cc +++ b/math/octave/patches/patch-src_sysdep_cc @@ -1,7 +1,7 @@ -$OpenBSD: patch-src_sysdep_cc,v 1.1.1.1 2001/07/15 18:07:16 naddy Exp $ ---- src/sysdep.cc.orig Thu Oct 21 09:04:08 1999 -+++ src/sysdep.cc Fri Jul 13 00:23:01 2001 -@@ -110,7 +110,11 @@ BSD_init (void) +$OpenBSD: patch-src_sysdep_cc,v 1.2 2004/06/07 14:43:39 naddy Exp $ +--- src/sysdep.cc.orig 1999-10-21 09:04:08.000000000 +0200 ++++ src/sysdep.cc 2004-06-05 21:08:03.000000000 +0200 +@@ -110,8 +110,12 @@ BSD_init (void) { #if defined (HAVE_FLOATINGPOINT_H) // Disable trapping on common exceptions. @@ -9,7 +9,8 @@ $OpenBSD: patch-src_sysdep_cc,v 1.1.1.1 2001/07/15 18:07:16 naddy Exp $ + fpsetmask (~(FP_X_OFL|FP_X_INV|FP_X_DZ|FP_X_UFL|FP_X_IMP)); +#else fpsetmask (~(FP_X_OFL|FP_X_INV|FP_X_DZ|FP_X_DNML|FP_X_UFL|FP_X_IMP)); -+#endif #endif ++#endif } #endif +