]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
ncurses: Update to 5.9.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 19 Aug 2012 22:12:28 +0000 (00:12 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 19 Aug 2012 22:12:28 +0000 (00:12 +0200)
lfs/ncurses
src/patches/ncurses-5.5-fixes-1.patch [deleted file]

index 3c7be4d0e85b3637949aec567eaf0273d7df2dde..1c0fb04271b87bb1209b2f43a3fe1796069232e0 100644 (file)
@@ -24,7 +24,7 @@
 
 include Config
 
-VER        = 5.5
+VER        = 5.9
 
 THISAPP    = ncurses-$(VER)
 DL_FILE    = $(THISAPP).tar.gz
@@ -35,19 +35,26 @@ DIR_APP    = $(DIR_SRC)/$(THISAPP)
 #
 ifeq "$(ROOT)" ""
   TARGET = $(DIR_INFO)/$(THISAPP)
-  EXTRA_CONFIG = --prefix=/usr --with-shared \
-       --without-debug --enable-widec --disable-nls
-  EXTRA_MAKE =
-  EXTRA_INSTALL =
+  PREFIX = /usr
 else
   TARGET = $(DIR_INFO)/$(THISAPP)-tools
-  EXTRA_CONFIG = --prefix=/tools --with-shared \
-    --without-debug --without-ada --enable-overwrite \
-    --disable-nls
-  EXTRA_MAKE = 
-  EXTRA_INSTALL = 
+  PREFIX = /tools
 endif
 
+EXTRA_CONFIG += \
+       --prefix=$(PREFIX) \
+       --with-shared \
+       --without-debug \
+       --without-ada \
+       --with-ospeed=unsigned \
+       --with-chtype=long \
+       --enable-hard-tabs \
+       --enable-xmc-glitch \
+       --enable-colorfgbg \
+       --enable-overwrite \
+       --with-termlib=tinfo \
+       --disable-nls
+
 ###############################################################################
 # Top-level Rules
 ###############################################################################
@@ -56,7 +63,7 @@ objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = e73c1ac10b4bfc46db43b2ddfd6244ef
+$(DL_FILE)_MD5 = 8cb9c412e5f2d96bc6f459aa8c6282a1
 
 install : $(TARGET)
 
@@ -86,25 +93,35 @@ $(subst %,%_MD5,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
-       cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/ncurses-5.5-fixes-1.patch
-       cd $(DIR_APP) && ./configure $(EXTRA_CONFIG)
-       cd $(DIR_APP) && make $(EXTRA_MAKE)  #$(MAKETUNING) # Causes an error!
-       cd $(DIR_APP) && make $(EXTRA_INSTALL) install
-ifeq "$(ROOT)" ""
-       chmod -v 755 /usr/lib/*.5.5
-       chmod -v 644 /usr/lib/libncurses++w.a
-       mv -v /usr/lib/libncursesw.so.5* /lib
-       ln -sfv ../../lib/libncursesw.so.5 /usr/lib/libncursesw.so
-       cd $(DIR_APP) && for lib in curses ncurses form panel menu ; do \
-           rm -vf /usr/lib/lib$${lib}.so ; \
-           echo "INPUT(-l$${lib}w)" >/usr/lib/lib$${lib}.so ; \
-           ln -sfv lib$${lib}w.a /usr/lib/lib$${lib}.a ; \
+       cd $(DIR_APP) && mkdir -pv narrowc widec
+
+       # Build narrowc version.
+       cd $(DIR_APP)/narrowc && ln -svf ../configure .
+       cd $(DIR_APP)/narrowc && ./configure $(EXTRA_CONFIG) --with-ticlib
+       cd $(DIR_APP)/narrowc && make libs
+       cd $(DIR_APP)/narrowc && make -C progs
+
+       # Build widec version.
+       cd $(DIR_APP)/widec && ln -svf ../configure .
+       cd $(DIR_APP)/widec && ./configure $(EXTRA_CONFIG) \
+               --enable-widec --without-progs
+       cd $(DIR_APP)/widec && make libs
+
+       # Install everything.
+       cd $(DIR_APP) && make -C narrowc install.{libs,progs,data}
+       rm -vf $(PREFIX)/lib/libtinfo.*
+       cd $(DIR_APP) && make -C widec install.{libs,includes,man}
+
+       # don't require -ltinfo when linking with --no-add-needed
+       for l in $(PREFIX)/lib/libncurses{,w}.so; do \
+               soname=$$(basename $$(readlink $$l)); \
+               rm -f $$l; \
+               echo "INPUT($$soname -ltinfo)" > $$l; \
        done
-       ln -sfv libncurses++w.a /usr/lib/libncurses++.a4
-       echo "INPUT(-lncursesw)" >/usr/lib/libcursesw.so
-       ln -sfv libncurses.so /usr/lib/libcurses.so
-       ln -sfv libncursesw.a /usr/lib/libcursesw.a
-       ln -sfv libncurses.a /usr/lib/libcurses.a
-endif
+
+       rm -vf $(PREFIX)/lib/libcurses{,w}.so
+       echo "INPUT(-lncurses)" > $(PREFIX)/lib/libcurses.so
+       echo "INPUT(-lncursesw)" > $(PREFIX)/lib/libcursesw.so
+       echo "INPUT(-ltinfo)" > $(PREFIX)/lib/libtermcap.so
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
diff --git a/src/patches/ncurses-5.5-fixes-1.patch b/src/patches/ncurses-5.5-fixes-1.patch
deleted file mode 100644 (file)
index 73e084d..0000000
+++ /dev/null
@@ -1,225 +0,0 @@
-Submitted by: Alexander E. Patrakov
-Date: 2005-12-07
-Initial Package Version: 5.5
-Upstream Status: Backport
-Origin: Cherry-picked from ftp://invisible-island.net/ncurses/5.5/*.gz
-Description: Fixes the following bugs:
-
-* memory leak in keyname()
-* mishandling of overlapped wide characters, http://bugs.debian.org/316663
-* problems with line-drawing characters on cygwin, http://bugs.debian.org/338234
-* mishandling of EINTR in tcgetattr/tcsetattr, http://bugs.debian.org/339518
-* mishandling of single-column multibyte characters, http://bugs.debian.org/341661
-
---- ncurses-5.5-20051015+/ncurses/base/MKkeyname.awk   2005-04-30 19:26:25.000000000 +0000
-+++ ncurses-5.5-20051022/ncurses/base/MKkeyname.awk    2005-10-22 19:01:23.000000000 +0000
-@@ -97,6 +97,7 @@
-       print "                                         break;"
-       print "                                 }"
-       print "                         }"
-+      print "                         free(bound);"
-       print "                         if (result != 0)"
-       print "                                 break;"
-       print "                 }"
---- ncurses-5.5-20051022+/ncurses/base/lib_addch.c     2005-03-27 16:52:16.000000000 +0000
-+++ ncurses-5.5-20051029/ncurses/base/lib_addch.c      2005-10-30 00:51:36.000000000 +0000
-@@ -315,7 +315,7 @@
-            * setup though.
-            */
-           for (i = 0; i < len; ++i) {
--              if (isWidecBase(win->_line[y].text[i])) {
-+              if (isWidecBase(win->_line[y].text[x + i])) {
-                   break;
-               } else if (isWidecExt(win->_line[y].text[x + i])) {
-                   for (j = i; x + j <= win->_maxx; ++j) {
-@@ -334,7 +334,9 @@
-           for (i = 0; i < len; ++i) {
-               NCURSES_CH_T value = ch;
-               SetWidecExt(value, i);
--              TR(TRACE_VIRTPUT, ("multicolumn %d:%d", i + 1, len));
-+              TR(TRACE_VIRTPUT, ("multicolumn %d:%d (%d,%d)",
-+                                 i + 1, len,
-+                                 win->_begy + y, win->_begx + x));
-               line->text[x] = value;
-               CHANGED_CELL(line, x);
-               ++x;
---- ncurses-5.5-20051022+/ncurses/base/lib_bkgd.c      2005-04-16 18:03:48.000000000 +0000
-+++ ncurses-5.5-20051029/ncurses/base/lib_bkgd.c       2005-10-30 00:41:09.000000000 +0000
-@@ -131,11 +131,11 @@
-       for (y = 0; y <= win->_maxy; y++) {
-           for (x = 0; x <= win->_maxx; x++) {
--              if (CharEq(win->_line[y].text[x], old_bkgrnd))
-+              if (CharEq(win->_line[y].text[x], old_bkgrnd)) {
-                   win->_line[y].text[x] = win->_nc_bkgd;
--              else {
-+              } else {
-                   NCURSES_CH_T wch = win->_line[y].text[x];
--                  RemAttr(wch, (~A_ALTCHARSET));
-+                  RemAttr(wch, (~(A_ALTCHARSET | A_CHARTEXT)));
-                   win->_line[y].text[x] = _nc_render(win, wch);
-               }
-           }
---- ncurses-5.5-20051022+/ncurses/base/lib_erase.c     2001-12-19 01:06:13.000000000 +0000
-+++ ncurses-5.5-20051029/ncurses/base/lib_erase.c      2005-10-30 00:36:36.000000000 +0000
-@@ -58,6 +59,24 @@
-           start = win->_line[y].text;
-           end = &start[win->_maxx];
-+          /*
-+           * If this is a derived window, we have to handle the case where
-+           * a multicolumn character extends into the window that we are
-+           * erasing.
-+           */
-+          if_WIDEC({
-+              if (isWidecExt(start[0])) {
-+                  int x = (win->_parent != 0) ? (win->_begx) : 0;
-+                  while (x-- > 0) {
-+                      if (isWidecBase(start[-1])) {
-+                          --start;
-+                          break;
-+                      }
-+                      --start;
-+                  }
-+              }
-+          });
-+
-           for (sp = start; sp <= end; sp++)
-               *sp = blank;
---- ncurses-5.5-20051029+/misc/terminfo.src    2005-10-26 23:21:06.000000000 +0000
-+++ ncurses-5.5-20051112/misc/terminfo.src     2005-11-12 23:01:03.000000000 +0000
-@@ -4731,32 +4731,35 @@
- #   civis [make cursor invisible] causes everything to stackdump? \E[?25l\E[?1c
- #   ech   [erase characters param] broken \E[%p1%dX
- #   kcbt  [back-tab key] not implemented in cygwin?  \E[Z
-+#
-+# 2005/11/12 -TD
-+#     Remove cbt since it does not work in current cygwin
-+#     Add 'mir' and 'in' flags based on tack
- cygwin|ansi emulation for Cygwin, 
--      am, hs, in, msgr, xon, 
-+      am, hs, mir, msgr, xon, 
-       colors#8, it#8, pairs#64, 
-       acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376, 
--      bel=^G, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[J, cr=^M, 
--      cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B, 
--      cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, 
--      cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, 
--      dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, fsl=^G, 
--      home=\E[H, hpa=\E[%i%p1%dG, ht=^I, ich=\E[%p1%d@, 
--      ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, invis=\E[8m, 
--      kb2=\E[G, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, 
--      kcuu1=\E[A, kdch1=\E[3~, kend=\E[4~, kf1=\E[[A, 
--      kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, 
--      kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, 
--      kf18=\E[32~, kf19=\E[33~, kf2=\E[[B, kf20=\E[34~, 
--      kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, kf6=\E[17~, kf7=\E[18~, 
--      kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kich1=\E[2~, 
--      knp=\E[6~, kpp=\E[5~, kspd=^Z, nel=^M^J, op=\E[39;49m, 
--      rc=\E8, rev=\E[7m, ri=\EM, rmacs=\E[10m, 
--      rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmpch=\E[10m, 
--      rmso=\E[27m, rmul=\E[24m, rs1=\Ec\E]R, sc=\E7, 
--      setab=\E[4%p1%dm, setaf=\E[3%p1%dm, 
-+      bel=^G, bold=\E[1m, clear=\E[H\E[J, cr=^M, cub=\E[%p1%dD, 
-+      cub1=^H, cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, 
-+      cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, 
-+      cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, 
-+      dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, fsl=^G, home=\E[H, 
-+      hpa=\E[%i%p1%dG, ht=^I, ich=\E[%p1%d@, ich1=\E[@, 
-+      il=\E[%p1%dL, il1=\E[L, ind=^J, invis=\E[8m, kb2=\E[G, 
-+      kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, 
-+      kdch1=\E[3~, kend=\E[4~, kf1=\E[[A, kf10=\E[21~, 
-+      kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, 
-+      kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, 
-+      kf19=\E[33~, kf2=\E[[B, kf20=\E[34~, kf3=\E[[C, kf4=\E[[D, 
-+      kf5=\E[[E, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, 
-+      khome=\E[1~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, kspd=^Z, 
-+      nel=^M^J, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM, 
-+      rmacs=\E[10m, rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, 
-+      rmpch=\E[10m, rmso=\E[27m, rmul=\E[24m, rs1=\Ec\E]R, 
-+      sc=\E7, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, 
-       sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m, 
--      sgr0=\E[0;10m, smacs=\E11m, smcup=\E7\E[?47h, smir=\E[4h, 
--      smpch=\E[11m, smso=\E[7m, smul=\E[4m, tsl=\E];, 
-+      sgr0=\E[0;10m, smacs=\E[11m, smcup=\E7\E[?47h, 
-+      smir=\E[4h, smpch=\E[11m, smso=\E[7m, smul=\E[4m, tsl=\E];, 
-       u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?6c, u9=\E[c, 
-       vpa=\E[%i%p1%dd, 
---- ncurses-5.5-20051112+/ncurses/tinfo/lib_ttyflags.c 2003-05-17 23:50:37.000000000 +0000
-+++ ncurses-5.5-20051119/ncurses/tinfo/lib_ttyflags.c  2005-11-19 20:36:23.000000000 +0000
-@@ -59,28 +59,51 @@
- NCURSES_EXPORT(int)
- _nc_get_tty_mode(TTY * buf)
- {
--    if (cur_term == 0
--      || GET_TTY(cur_term->Filedes, buf) != 0) {
--      memset(buf, 0, sizeof(*buf));
--      return (ERR);
-+    int result = OK;
-+
-+    if (cur_term == 0) {
-+      result = ERR;
-+    } else {
-+      for (;;) {
-+          if (GET_TTY(cur_term->Filedes, buf) != 0) {
-+              if (errno == EINTR)
-+                  continue;
-+              result = ERR;
-+          }
-+          break;
-+      }
-     }
-+
-+    if (result == ERR)
-+      memset(buf, 0, sizeof(*buf));
-+
-     TR(TRACE_BITS, ("_nc_get_tty_mode(%d): %s",
-                   cur_term->Filedes, _nc_trace_ttymode(buf)));
--    return (OK);
-+    return (result);
- }
- NCURSES_EXPORT(int)
- _nc_set_tty_mode(TTY * buf)
- {
--    if (cur_term == 0
--      || SET_TTY(cur_term->Filedes, buf) != 0) {
--      if ((errno == ENOTTY) && (SP != 0))
--          SP->_notty = TRUE;
--      return (ERR);
-+    int result = OK;
-+
-+    if (cur_term == 0) {
-+      result = ERR;
-+    } else {
-+      for (;;) {
-+          if (SET_TTY(cur_term->Filedes, buf) != 0) {
-+              if (errno == EINTR)
-+                  continue;
-+              if ((errno == ENOTTY) && (SP != 0))
-+                  SP->_notty = TRUE;
-+              result = ERR;
-+          }
-+          break;
-+      }
-     }
-     TR(TRACE_BITS, ("_nc_set_tty_mode(%d): %s",
-                   cur_term->Filedes, _nc_trace_ttymode(buf)));
--    return (OK);
-+    return (result);
- }
- NCURSES_EXPORT(int)
---- ncurses-5.5-20051126+/ncurses/widechar/lib_ins_wch.c       2005-09-17 19:25:13.000000000 +0000
-+++ ncurses-5.5-20051203/ncurses/widechar/lib_ins_wch.c        2005-12-03 20:24:19.000000000 +0000
-@@ -117,7 +117,7 @@
-           for (cp = wstr; *cp && ((cp - wstr) < n); cp++) {
-               int len = wcwidth(*cp);
--              if (len != 1) {
-+              if (len != 1 || !is8bits(*cp)) {
-                   cchar_t tmp_cchar;
-                   wchar_t tmp_wchar = *cp;
-                   memset(&tmp_cchar, 0, sizeof(tmp_cchar));