commit 3d3ba271f332d3f389076bc3a29a15ab8b9558ad
parent 5b9616d3dc6bfb2dd8efda8f8a76c3422a482dcc
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Tue, 24 Jun 2014 17:44:43 +0200
add termcap (gdb dep)
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
Diffstat:
6 files changed, 119 insertions(+), 0 deletions(-)
diff --git a/termcap/checksums b/termcap/checksums
@@ -0,0 +1 @@
+2bc2829af05a942e6041e9f2de7c9c50e466cd525f056c58c4f664b0e39012d901276737b7c2576450613694f16ae6b195e22913d8835aa345b5d88faddb0b69 termcap-1.3.1.tar.gz
diff --git a/termcap/depsinc.mk b/termcap/depsinc.mk
@@ -0,0 +1,10 @@
+<$termcap_DEPDIR/v.mk
+
+termcap_libdir = ${termcap_DEPDIR}/termcap-$v
+termcap_includedir = ${termcap_DEPDIR}/termcap-$v
+
+termcap_CFLAGS = -I${termcap_includedir}
+termcap_LDFLAGS = -L${termcap_libdir}
+
+DEPS_CFLAGS = $DEPS_CFLAGS ${termcap_CFLAGS}
+DEPS_LDFLAGS = $DEPS_LDFLAGS ${termcap_LDFLAGS} -ltermcap
diff --git a/termcap/mkfile b/termcap/mkfile
@@ -0,0 +1,9 @@
+<$mkbuild/mk.3rdparty
+
+<v.mk
+src = termcap-$v
+url = http://ftp.gnu.org/gnu/termcap/termcap-$v.tar.gz
+mkfile = ../termcap.mk
+
+patches = \
+ ../termcap.patch
diff --git a/termcap/termcap.mk b/termcap/termcap.mk
@@ -0,0 +1,18 @@
+LIB = libtermcap.a
+
+libtermcap_a_OBJ = \
+ termcap.o \
+ tparam.o \
+ version.o
+LOCAL_CFLAGS = -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DTERMCAP_FILE=\"/etc/termcap\"
+
+INSTALL_OTHER1_DIR = \
+ include
+
+INSTALL_OTHER1 = \
+ termcap.h
+
+<$mkbuild/mk.default
+
+DEPS_CFLAGS =
+DEPS_LDFLAGS =
diff --git a/termcap/termcap.patch b/termcap/termcap.patch
@@ -0,0 +1,80 @@
+--- termcap-1.3.1.org/Makefile.in 1995-08-17 00:54:29.000000000 +0000
++++ termcap-1.3.1/Makefile.in 2012-10-13 03:13:56.988000002 +0000
+@@ -24,8 +24,8 @@
+ AR = ar
+ RANLIB = @RANLIB@
+
+-INSTALL = @INSTALL@
+-INSTALL_DATA = @INSTALL_DATA@
++INSTALL = install -D
++INSTALL_DATA = $(INSTALL) -m 644
+
+ MAKEINFO = makeinfo
+
+@@ -42,12 +42,6 @@
+ # Directory in which to install termcap.h.
+ includedir = $(prefix)/include
+
+-# Directory in which to optionally also install termcap.h,
+-# so compilers besides gcc can find it by default.
+-# If it is empty or not defined, termcap.h will only be installed in
+-# includedir.
+-oldincludedir = /usr/include
+-
+ # Directory in which to install the documentation info files.
+ infodir = $(prefix)/info
+
+@@ -72,13 +66,10 @@
+ $(CC) -c $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) $(CFLAGS) $<
+
+ install: all installdirs @installdata@
+- $(INSTALL_DATA) libtermcap.a $(libdir)/libtermcap.a
+- -$(RANLIB) $(libdir)/libtermcap.a
+- cd $(srcdir); $(INSTALL_DATA) termcap.h $(includedir)/termcap.h
+- -cd $(srcdir); test -z "$(oldincludedir)" || \
+- $(INSTALL_DATA) termcap.h $(oldincludedir)/termcap.h
++ $(INSTALL_DATA) libtermcap.a $(DESTDIR)$(libdir)/libtermcap.a
++ cd $(srcdir); $(INSTALL_DATA) termcap.h $(DESTDIR)$(includedir)/termcap.h
+ cd $(srcdir); for f in termcap.info*; \
+- do $(INSTALL_DATA) $$f $(infodir)/$$f; done
++ do $(INSTALL_DATA) $$f $(DESTDIR)$(infodir)/$$f; done
+
+ uninstall: @uninstalldata@
+ rm -f $(libdir)/libtermcap.a $(includedir)/termcap.h
+--- termcap-1.3.1.org/termcap.h 1995-07-26 18:09:50.000000000 +0000
++++ termcap-1.3.1/termcap.h 2012-10-13 03:17:18.366000002 +0000
+@@ -18,6 +18,9 @@
+ #ifndef _TERMCAP_H
+ #define _TERMCAP_H 1
+
++/* prevent ncurses headers from defining different prototypes */
++#define NCURSES_TERMCAP_H_incl
++
+ #if __STDC__
+
+ extern int tgetent (char *buffer, const char *termtype);
+--- termcap-1.3.1.org/tparam.c
++++ termcap-1.3.1/tparam.c
+@@ -17,21 +17,14 @@
+ Boston, MA 02111-1307, USA. */
+
+ /* Emacs config.h may rename various library functions such as malloc. */
+-#ifdef HAVE_CONFIG_H
+-#include <config.h>
+-#endif
+
+ #ifdef emacs
+ #include "lisp.h" /* for xmalloc */
+ #else
+
+-#ifdef STDC_HEADERS
+ #include <stdlib.h>
+ #include <string.h>
+-#else
+-char *malloc ();
+-char *realloc ();
+-#endif
++#include <unistd.h>
+
+ /* Do this after the include, in case string.h prototypes bcopy. */
+ #if (defined(HAVE_STRING_H) || defined(STDC_HEADERS)) && !defined(bcopy)
diff --git a/termcap/v.mk b/termcap/v.mk
@@ -0,0 +1 @@
+v = 1.3.1