Ncurses and vim
This commit is contained in:
parent
d169157a6c
commit
0f3f85a981
@ -111,4 +111,17 @@ pushd build
|
||||
make || bail
|
||||
make install || bail
|
||||
popd
|
||||
if [ ! -d ncurses ]; then
|
||||
mkdir ncurses
|
||||
fi
|
||||
pushd ncurses
|
||||
$DIR/tarballs/ncurses-5.9/configure --prefix=$PREFIX/$TARGET --host=$TARGET --with-terminfo-dirs=/usr/share/terminfo --with-default-terminfo-dir=/usr/share/terminfo --without-tests || bail
|
||||
make || bail
|
||||
make install || bail
|
||||
popd
|
||||
pushd $DIR/tarballs/vim73
|
||||
ac_cv_sizeof_int=4 vim_cv_getcwd_broken=no vim_cv_memmove_handles_overlap=yes vim_cv_stat_ignores_slash=no vim_cv_tgetent=zero vim_cv_terminfo=yes vim_cv_toupper_broken=no vim_cv_tty_group=world ./configure --host=$TARGET --target=$TARGET --prefix=$PREFIX/$TARGET --with-tlib=ncurses --enable-gui=no --disable-gtktest --disable-xim --with-features=normal --disable-gpm --without-x --disable-netbeans --enable-multibyte
|
||||
make || bail
|
||||
cp src/vim $DIR/../hdd/bin/vim.xxx
|
||||
popd
|
||||
popd
|
||||
|
61
toolchain/patches/ncurses-5.9.patch
Normal file
61
toolchain/patches/ncurses-5.9.patch
Normal file
@ -0,0 +1,61 @@
|
||||
diff -rupN ncurses-5.9/config.sub ncurses.new/config.sub
|
||||
--- ncurses-5.9/config.sub 2010-09-10 15:25:58.000000000 -0700
|
||||
+++ ncurses.new/config.sub 2013-04-12 22:37:42.785340320 -0700
|
||||
@@ -1306,6 +1306,7 @@ case $os in
|
||||
| -sym* | -kopensolaris* \
|
||||
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
||||
| -aos* | -aros* \
|
||||
+ | -toaru* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
|
||||
diff -rupN ncurses-5.9/ncurses/tinfo/db_iterator.c ncurses.new/ncurses/tinfo/db_iterator.c
|
||||
--- ncurses-5.9/ncurses/tinfo/db_iterator.c 2010-12-25 15:00:25.000000000 -0800
|
||||
+++ ncurses.new/ncurses/tinfo/db_iterator.c 2013-04-12 22:37:41.749340355 -0700
|
||||
@@ -90,7 +90,7 @@ NCURSES_EXPORT(void)
|
||||
_nc_last_db(void)
|
||||
{
|
||||
if (ThisDbList != 0) {
|
||||
- FreeAndNull(ThisDbList);
|
||||
+ //FreeAndNull(ThisDbList);
|
||||
}
|
||||
ThisDbSize = 0;
|
||||
}
|
||||
diff -rupN ncurses-5.9/ncurses/tinfo/lib_termcap.c ncurses.new/ncurses/tinfo/lib_termcap.c
|
||||
--- ncurses-5.9/ncurses/tinfo/lib_termcap.c 2010-12-25 11:27:12.000000000 -0800
|
||||
+++ ncurses.new/ncurses/tinfo/lib_termcap.c 2013-04-12 22:37:41.761340355 -0700
|
||||
@@ -166,18 +172,23 @@ NCURSES_SP_NAME(tgetent) (NCURSES_SP_DCL
|
||||
if (backspace_if_not_bs != NULL)
|
||||
BC = backspace_if_not_bs;
|
||||
|
||||
+
|
||||
+#if 0
|
||||
if ((FIX_SGR0 = _nc_trim_sgr0(&(TerminalOf(SP_PARM)->type))) != 0) {
|
||||
if (!strcmp(FIX_SGR0, exit_attribute_mode)) {
|
||||
if (FIX_SGR0 != exit_attribute_mode) {
|
||||
+ fprintf(stderr, "gonna free fix_sgr\n");
|
||||
free(FIX_SGR0);
|
||||
}
|
||||
FIX_SGR0 = 0;
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
LAST_BUF = bufp;
|
||||
LAST_USE = TRUE;
|
||||
|
||||
SetNoPadding(SP_PARM);
|
||||
+
|
||||
(void) NCURSES_SP_NAME(baudrate) (NCURSES_SP_ARG); /* sets ospeed as a side-effect */
|
||||
|
||||
/* LINT_PREPRO
|
||||
diff -rupN ncurses-5.9/ncurses/tty/lib_twait.c ncurses.new/ncurses/tty/lib_twait.c
|
||||
--- ncurses-5.9/ncurses/tty/lib_twait.c 2010-12-25 15:43:58.000000000 -0800
|
||||
+++ ncurses.new/ncurses/tty/lib_twait.c 2013-04-12 22:37:41.709340355 -0700
|
||||
@@ -52,6 +52,7 @@
|
||||
#undef true
|
||||
#include <OS.h>
|
||||
#endif
|
||||
+# include <sys/time.h>
|
||||
|
||||
#if USE_FUNC_POLL
|
||||
# if HAVE_SYS_TIME_H
|
151
toolchain/patches/vim73.patch
Normal file
151
toolchain/patches/vim73.patch
Normal file
@ -0,0 +1,151 @@
|
||||
diff -rupN vim73/src/auto/configure vim73.new/src/auto/configure
|
||||
--- vim73/src/auto/configure 2010-08-13 07:17:15.000000000 -0700
|
||||
+++ vim73.new/src/auto/configure 2013-04-12 22:18:41.041376890 -0700
|
||||
@@ -316,7 +316,7 @@ $as_echo X"$as_dir" |
|
||||
test -d "$as_dir" && break
|
||||
done
|
||||
test -z "$as_dirs" || eval "mkdir $as_dirs"
|
||||
- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
|
||||
+ } || test -d "$as_dir"
|
||||
|
||||
|
||||
} # as_fn_mkdir_p
|
||||
@@ -11639,37 +11639,6 @@ _ACEOF
|
||||
|
||||
|
||||
|
||||
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uint32_t is 32 bits" >&5
|
||||
-$as_echo_n "checking uint32_t is 32 bits... " >&6; }
|
||||
-if test "$cross_compiling" = yes; then :
|
||||
- as_fn_error "could not compile program using uint32_t." "$LINENO" 5
|
||||
-else
|
||||
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
-/* end confdefs.h. */
|
||||
-
|
||||
-#ifdef HAVE_STDINT_H
|
||||
-# include <stdint.h>
|
||||
-#endif
|
||||
-#ifdef HAVE_INTTYPES_H
|
||||
-# include <inttypes.h>
|
||||
-#endif
|
||||
-main() {
|
||||
- uint32_t nr1 = (uint32_t)-1;
|
||||
- uint32_t nr2 = (uint32_t)0xffffffffUL;
|
||||
- if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) exit(1);
|
||||
- exit(0);
|
||||
-}
|
||||
-_ACEOF
|
||||
-if ac_fn_c_try_run "$LINENO"; then :
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
|
||||
-$as_echo "ok" >&6; }
|
||||
-else
|
||||
- as_fn_error "WRONG! uint32_t not defined correctly." "$LINENO" 5
|
||||
-fi
|
||||
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
||||
- conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
-fi
|
||||
-
|
||||
|
||||
|
||||
bcopy_test_prog='
|
||||
diff -rupN vim73/src/configure.in vim73.new/src/configure.in
|
||||
--- vim73/src/configure.in 2010-08-13 07:15:17.000000000 -0700
|
||||
+++ vim73.new/src/configure.in 2013-04-12 22:18:41.049376887 -0700
|
||||
@@ -3180,7 +3180,7 @@ main() {
|
||||
}],
|
||||
AC_MSG_RESULT(ok),
|
||||
AC_MSG_ERROR([WRONG! uint32_t not defined correctly.]),
|
||||
-AC_MSG_ERROR([could not compile program using uint32_t.]))
|
||||
+AC_MSG_RESULT([assuming ok]))
|
||||
|
||||
dnl Check for memmove() before bcopy(), makes memmove() be used when both are
|
||||
dnl present, fixes problem with incompatibility between Solaris 2.4 and 2.5.
|
||||
diff -rupN vim73/src/feature.h vim73.new/src/feature.h
|
||||
--- vim73/src/feature.h 2010-07-27 12:45:42.000000000 -0700
|
||||
+++ vim73.new/src/feature.h 2013-04-12 22:18:41.033376891 -0700
|
||||
@@ -1012,7 +1012,7 @@
|
||||
* +system Use system() instead of fork/exec for starting a
|
||||
* shell. Doesn't work for the GUI!
|
||||
*/
|
||||
-/* #define USE_SYSTEM */
|
||||
+#define USE_SYSTEM
|
||||
|
||||
/*
|
||||
* +X11 Unix only. Include code for xterm title saving and X
|
||||
@@ -1312,3 +1312,4 @@
|
||||
#ifdef FEAT_NORMAL
|
||||
# define FEAT_PERSISTENT_UNDO
|
||||
#endif
|
||||
+#define SYS_VIMRC_FILE "/etc/vimrc"
|
||||
diff -rupN vim73/src/fileio.c vim73.new/src/fileio.c
|
||||
--- vim73/src/fileio.c 2010-08-14 05:20:54.000000000 -0700
|
||||
+++ vim73.new/src/fileio.c 2013-04-12 22:18:41.049376887 -0700
|
||||
@@ -7362,6 +7362,9 @@ vim_tempname(extra_char)
|
||||
struct stat st;
|
||||
# endif
|
||||
|
||||
+ sprintf((char *)itmp, "/.vim-%ld", temp_count++);
|
||||
+ return vim_strsave(itmp);
|
||||
+
|
||||
/*
|
||||
* This will create a directory for private use by this instance of Vim.
|
||||
* This is done once, and the same directory is used for all temp files.
|
||||
diff -rupN vim73/src/Makefile vim73.new/src/Makefile
|
||||
--- vim73/src/Makefile 2010-08-15 05:56:15.000000000 -0700
|
||||
+++ vim73.new/src/Makefile 2013-04-12 22:18:41.041376890 -0700
|
||||
@@ -930,6 +930,9 @@ TOOLS = xxd/xxd$(EXEEXT)
|
||||
# directories. This directory must exist.
|
||||
#DESTDIR = ~/pkg/vim
|
||||
|
||||
+DESTDIR=/usr/share/vim
|
||||
+prefix=/usr
|
||||
+
|
||||
### Directory of the man pages
|
||||
MAN1DIR = /man1
|
||||
|
||||
diff -rupN vim73/src/os_unix.c vim73.new/src/os_unix.c
|
||||
--- vim73/src/os_unix.c 2010-08-08 06:14:04.000000000 -0700
|
||||
+++ vim73.new/src/os_unix.c 2013-04-12 22:18:41.049376887 -0700
|
||||
@@ -31,6 +31,33 @@
|
||||
|
||||
#include "vim.h"
|
||||
|
||||
+#define POLLIN 0x0001 /* There is data to read */
|
||||
+#define POLLPRI 0x0002 /* There is urgent data to read */
|
||||
+#define POLLOUT 0x0004 /* Writing now will not block */
|
||||
+#define POLLERR 0x0008 /* Error condition */
|
||||
+#define POLLHUP 0x0010 /* Hung up */
|
||||
+#define POLLNVAL 0x0020 /* Invalid request: fd not open */
|
||||
+
|
||||
+struct pollfd {
|
||||
+ int fd; /* file descriptor */
|
||||
+ short events; /* requested events */
|
||||
+ short revents; /* returned events */
|
||||
+};
|
||||
+
|
||||
+int poll(struct pollfd * ufds, long nfds, int timeout) {
|
||||
+ int fds = 0;
|
||||
+ int i = 0;
|
||||
+ for (i = 0; i < nfds; ++i) {
|
||||
+ int fd = ufds[i].fd;
|
||||
+ struct stat _stat;
|
||||
+ fstat(fd, &_stat);
|
||||
+ if (_stat.st_size) {
|
||||
+ fds++;
|
||||
+ }
|
||||
+ }
|
||||
+ return fds;
|
||||
+}
|
||||
+
|
||||
#ifdef FEAT_MZSCHEME
|
||||
# include "if_mzsch.h"
|
||||
#endif
|
||||
@@ -3161,6 +3188,8 @@ mch_settmode(tmode)
|
||||
/*
|
||||
* ~ICRNL enables typing ^V^M
|
||||
*/
|
||||
+ printf("\033[1560z");
|
||||
+ fflush(stdout);
|
||||
tnew.c_iflag &= ~ICRNL;
|
||||
tnew.c_lflag &= ~(ICANON | ECHO | ISIG | ECHOE
|
||||
# if defined(IEXTEN) && !defined(__MINT__)
|
@ -31,7 +31,9 @@ pushd "$DIR" > /dev/null
|
||||
grab "libpng" "https://github.com/downloads/klange/osdev" "libpng-1.5.13.tar.gz"
|
||||
grab "pixman" "http://www.cairographics.org/releases" "pixman-0.26.2.tar.gz"
|
||||
grab "cairo" "http://www.cairographics.org/releases" "cairo-1.12.2.tar.xz"
|
||||
grab "mesa" "ftp://ftp.freedesktop.org/pub/mesa/7.5.2/" "MesaLib-7.5.2.tar.gz"
|
||||
grab "mesa" "ftp://ftp.freedesktop.org/pub/mesa/7.5.2" "MesaLib-7.5.2.tar.gz"
|
||||
grab "ncurses" "ftp://invisible-island.net/ncurses" "ncurses-5.9.tar.gz"
|
||||
grab "vim" "ftp://ftp.vim.org/pub/vim/unix" "vim-7.3.tar.bz2"
|
||||
$INFO "wget" "Pulled source packages."
|
||||
rm -rf "binutils-2.22" "freetype-2.4.9" "gcc-4.6.0" "gmp-5.0.1" "libpng-1.5.13" "mpc-0.9" "mpfr-3.0.1" "newlib-1.19.0" "zlib-1.2.7" "pixman-0.28.2"
|
||||
$INFO "tar" "Decompressing..."
|
||||
@ -48,6 +50,8 @@ pushd "$DIR" > /dev/null
|
||||
deco "pixman" "pixman-0.26.2.tar.gz"
|
||||
deco "cairo" "cairo-1.12.2.tar.xz"
|
||||
deco "mesa" "MesaLib-7.5.2.tar.gz"
|
||||
deco "ncurses" "ncurses-5.9.tar.gz"
|
||||
deco "vim" "vim-7.3.tar.bz2"
|
||||
$INFO "tar" "Decompressed source packages."
|
||||
$INFO "patch" "Patching..."
|
||||
patc "gcc" "gcc-4.6.0"
|
||||
@ -61,6 +65,8 @@ pushd "$DIR" > /dev/null
|
||||
patc "pixman" "pixman-0.26.2"
|
||||
patc "cairo" "cairo-1.12.2"
|
||||
patc "mesa" "Mesa-7.5.2"
|
||||
patc "ncurses" "ncurses-5.9"
|
||||
patc "vim" "vim73"
|
||||
$INFO "patch" "Patched third-party software."
|
||||
$INFO "--" "Running additional bits..."
|
||||
#deleteUnusedGCC "gcc-4.6.0"
|
||||
|
Loading…
Reference in New Issue
Block a user