changeset 13400:71e59c2d8715

1168 want a libtermcap that does not force libcurses Reviewed by: Garrett D'Amore <garrett@nexenta.com> Reviewed by: Albert Lee <trisk@nexenta.com> Reviewed by: Igor Kozhukhov <igor.kozhukhov@nexenta.com> Approved by: Garrett D'Amore <garrett@nexenta.com>
author Gordon Ross <gwr@nexenta.com>
date Fri, 15 Jul 2011 10:20:38 -0400
parents a1d28d03839f
children 246e68923cc8
files usr/src/Targetdirs usr/src/cmd/mdb/Makefile.mdb usr/src/lib/Makefile usr/src/lib/libcurses/Makefile.com usr/src/lib/libcurses/amd64/Makefile usr/src/lib/libcurses/sparcv9/Makefile usr/src/lib/libtermcap/Makefile usr/src/lib/libtermcap/Makefile.com usr/src/lib/libtermcap/amd64/Makefile usr/src/lib/libtermcap/common/llib-ltermcap usr/src/lib/libtermcap/common/mapfile-vers usr/src/lib/libtermcap/common/termcap.h usr/src/lib/libtermcap/i386/Makefile usr/src/lib/libtermcap/sparc/Makefile usr/src/lib/libtermcap/sparcv9/Makefile usr/src/man/man3lib/libcurses.3lib usr/src/pkg/manifests/developer-library-lint.mf usr/src/pkg/manifests/system-header.mf usr/src/pkg/manifests/system-library.mf
diffstat 19 files changed, 426 insertions(+), 126 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/Targetdirs	Thu May 12 03:21:34 2011 +0400
+++ b/usr/src/Targetdirs	Fri Jul 15 10:20:38 2011 -0400
@@ -21,6 +21,7 @@
 #
 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
 # Copyright 2011, Richard Lowe
+# Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
 #
 
 #
@@ -754,9 +755,9 @@
 $(ROOT)/usr/ccs/lib/libtermlib.so:=	REALPATH=../../../lib/libcurses.so.1
 $(ROOT)/usr/ccs/lib/llib-ltermlib:= 	REALPATH=../../../lib/llib-lcurses
 $(ROOT)/usr/ccs/lib/llib-ltermlib.ln:= 	REALPATH=../../../lib/llib-lcurses.ln
-$(ROOT)/usr/ccs/lib/libtermcap.so:=	REALPATH=../../../lib/libcurses.so.1
-$(ROOT)/usr/ccs/lib/llib-ltermcap:= 	REALPATH=../../../lib/llib-lcurses
-$(ROOT)/usr/ccs/lib/llib-ltermcap.ln:= 	REALPATH=../../../lib/llib-lcurses.ln
+$(ROOT)/usr/ccs/lib/libtermcap.so:=	REALPATH=../../../lib/libtermcap.so.1
+$(ROOT)/usr/ccs/lib/llib-ltermcap:= 	REALPATH=../../../lib/llib-ltermcap
+$(ROOT)/usr/ccs/lib/llib-ltermcap.ln:= 	REALPATH=../../../lib/llib-ltermcap.ln
 $(ROOT)/usr/ccs/lib/values-Xa.o:=	REALPATH=../../lib/values-Xa.o
 $(ROOT)/usr/ccs/lib/values-Xc.o:=	REALPATH=../../lib/values-Xc.o
 $(ROOT)/usr/ccs/lib/values-Xs.o:=	REALPATH=../../lib/values-Xs.o
@@ -799,9 +800,9 @@
 $(ROOT)/usr/ccs/lib/$(MACH64)/llib-ltermlib.ln:= \
 	REALPATH=../../../../lib/$(MACH64)/llib-lcurses.ln
 $(ROOT)/usr/ccs/lib/$(MACH64)/libtermcap.so:= \
-	REALPATH=../../../../lib/$(MACH64)/libcurses.so.1
+	REALPATH=../../../../lib/$(MACH64)/libtermcap.so.1
 $(ROOT)/usr/ccs/lib/$(MACH64)/llib-ltermcap.ln:= \
-	REALPATH=../../../../lib/$(MACH64)/llib-lcurses.ln
+	REALPATH=../../../../lib/$(MACH64)/llib-ltermcap.ln
 $(ROOT)/usr/ccs/lib/$(MACH64)/values-Xa.o:= \
 	REALPATH=../../../lib/$(MACH64)/values-Xa.o
 $(ROOT)/usr/ccs/lib/$(MACH64)/values-Xc.o:= \
@@ -1009,8 +1010,8 @@
 $(ROOT)/usr/lib/libsocket.so:=		REALPATH=../../lib/libsocket.so.1
 $(ROOT)/usr/lib/libsysevent.so.1:=	REALPATH=../../lib/libsysevent.so.1
 $(ROOT)/usr/lib/libsysevent.so:=	REALPATH=../../lib/libsysevent.so.1
-$(ROOT)/usr/lib/libtermcap.so.1:=	REALPATH=../../lib/libcurses.so.1
-$(ROOT)/usr/lib/libtermcap.so:=		REALPATH=../../lib/libcurses.so.1
+$(ROOT)/usr/lib/libtermcap.so.1:=	REALPATH=../../lib/libtermcap.so.1
+$(ROOT)/usr/lib/libtermcap.so:=		REALPATH=../../lib/libtermcap.so.1
 $(ROOT)/usr/lib/libtermlib.so.1:=	REALPATH=../../lib/libcurses.so.1
 $(ROOT)/usr/lib/libtermlib.so:=		REALPATH=../../lib/libcurses.so.1
 $(ROOT)/usr/lib/libthread.so.1:=	REALPATH=../../lib/libthread.so.1
@@ -1113,8 +1114,8 @@
 $(ROOT)/usr/lib/llib-lsocket:=		REALPATH=../../lib/llib-lsocket
 $(ROOT)/usr/lib/llib-lsysevent.ln:=	REALPATH=../../lib/llib-lsysevent.ln
 $(ROOT)/usr/lib/llib-lsysevent:=	REALPATH=../../lib/llib-lsysevent
-$(ROOT)/usr/lib/llib-ltermcap.ln:=	REALPATH=../../lib/llib-lcurses.ln
-$(ROOT)/usr/lib/llib-ltermcap:=		REALPATH=../../lib/llib-lcurses
+$(ROOT)/usr/lib/llib-ltermcap.ln:=	REALPATH=../../lib/llib-ltermcap.ln
+$(ROOT)/usr/lib/llib-ltermcap:=		REALPATH=../../lib/llib-ltermcap
 $(ROOT)/usr/lib/llib-ltermlib.ln:=	REALPATH=../../lib/llib-lcurses.ln
 $(ROOT)/usr/lib/llib-ltermlib:=		REALPATH=../../lib/llib-lcurses
 $(ROOT)/usr/lib/llib-lthread.ln:=	REALPATH=../../lib/llib-lthread.ln
@@ -1332,9 +1333,9 @@
 $(ROOT)/usr/lib/$(MACH64)/libsysevent.so:= \
 	REALPATH=../../../lib/$(MACH64)/libsysevent.so.1
 $(ROOT)/usr/lib/$(MACH64)/libtermcap.so.1:= \
-	REALPATH=../../../lib/$(MACH64)/libcurses.so.1
+	REALPATH=../../../lib/$(MACH64)/libtermcap.so.1
 $(ROOT)/usr/lib/$(MACH64)/libtermcap.so:= \
-	REALPATH=../../../lib/$(MACH64)/libcurses.so.1
+	REALPATH=../../../lib/$(MACH64)/libtermcap.so.1
 $(ROOT)/usr/lib/$(MACH64)/libtermlib.so.1:= \
 	REALPATH=../../../lib/$(MACH64)/libcurses.so.1
 $(ROOT)/usr/lib/$(MACH64)/libtermlib.so:= \
@@ -1401,8 +1402,6 @@
 	REALPATH=../../../lib/$(MACH64)/llib-lctf.ln
 $(ROOT)/usr/lib/$(MACH64)/llib-lcurses.ln:= \
 	REALPATH=../../../lib/$(MACH64)/llib-lcurses.ln
-$(ROOT)/usr/lib/$(MACH64)/llib-lcurses:= \
-	REALPATH=../../../lib/$(MACH64)/llib-lcurses
 $(ROOT)/usr/lib/$(MACH64)/llib-ldevice.ln:= \
 	REALPATH=../../../lib/$(MACH64)/llib-ldevice.ln
 $(ROOT)/usr/lib/$(MACH64)/llib-ldevid.ln:= \
@@ -1458,13 +1457,9 @@
 $(ROOT)/usr/lib/$(MACH64)/llib-lsysevent.ln:= \
 	REALPATH=../../../lib/$(MACH64)/llib-lsysevent.ln
 $(ROOT)/usr/lib/$(MACH64)/llib-ltermcap.ln:= \
-	REALPATH=../../../lib/$(MACH64)/llib-lcurses.ln
-$(ROOT)/usr/lib/$(MACH64)/llib-ltermcap:= \
-	REALPATH=../../../lib/$(MACH64)/llib-lcurses
+	REALPATH=../../../lib/$(MACH64)/llib-ltermcap.ln
 $(ROOT)/usr/lib/$(MACH64)/llib-ltermlib.ln:= \
 	REALPATH=../../../lib/$(MACH64)/llib-lcurses.ln
-$(ROOT)/usr/lib/$(MACH64)/llib-ltermlib:= \
-	REALPATH=../../../lib/$(MACH64)/llib-lcurses
 $(ROOT)/usr/lib/$(MACH64)/llib-lthread.ln:= \
 	REALPATH=../../../lib/$(MACH64)/llib-lthread.ln
 $(ROOT)/usr/lib/$(MACH64)/llib-lthread_db.ln:= \
@@ -1879,7 +1874,6 @@
 	/usr/lib/$(MACH64)/llib-lcmdutils.ln \
 	/usr/lib/$(MACH64)/llib-lcontract.ln \
 	/usr/lib/$(MACH64)/llib-lctf.ln \
-	/usr/lib/$(MACH64)/llib-lcurses \
 	/usr/lib/$(MACH64)/llib-lcurses.ln \
 	/usr/lib/$(MACH64)/llib-ldevice.ln \
 	/usr/lib/$(MACH64)/llib-ldevid.ln \
--- a/usr/src/cmd/mdb/Makefile.mdb	Thu May 12 03:21:34 2011 +0400
+++ b/usr/src/cmd/mdb/Makefile.mdb	Fri Jul 15 10:20:38 2011 -0400
@@ -19,6 +19,7 @@
 # CDDL HEADER END
 #
 #
+# Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
@@ -90,7 +91,7 @@
 C99MODE=	-xc99=%all
 C99LMODE=	-Xc99=%all
 
-LDLIBS += -ltermcap -lkvm -lproc -lrtld_db -lctf -lumem -ldisasm -lscf
+LDLIBS += -lcurses -lkvm -lproc -lrtld_db -lctf -lumem -ldisasm -lscf
 
 #
 # -erroff=E_INCONS_ARG_DECL2 works around a problem where lint gets confused
--- a/usr/src/lib/Makefile	Thu May 12 03:21:34 2011 +0400
+++ b/usr/src/lib/Makefile	Fri Jul 15 10:20:38 2011 -0400
@@ -19,6 +19,7 @@
 # CDDL HEADER END
 #
 
+# Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
 
 include ../Makefile.master
@@ -85,6 +86,7 @@
 	libdtrace		\
 	libdtrace_jni		\
 	libcurses		\
+	libtermcap		\
 	libgen			\
 	libgss			\
 	libpam			\
@@ -387,6 +389,7 @@
 	libcpc		\
 	libctf		\
 	libcurses	\
+	libtermcap	\
 	libcryptoutil	\
 	libdevice	\
 	libdevid	\
@@ -621,6 +624,7 @@
 		libbrand libpool libscf
 libproc:	../cmd/sgs/librtld_db ../cmd/sgs/libelf libctf
 libproject:	libpool libproc libsecdb
+libtermcap:	libcurses
 libtsnet:	libnsl libtsol libsecdb
 libwrap:	libnsl libsocket
 libwanboot:	libnvpair libresolv libnsl libsocket libdevinfo libinetutil \
--- a/usr/src/lib/libcurses/Makefile.com	Thu May 12 03:21:34 2011 +0400
+++ b/usr/src/lib/libcurses/Makefile.com	Fri Jul 15 10:20:38 2011 -0400
@@ -19,11 +19,10 @@
 # CDDL HEADER END
 #
 #
+# Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
 # Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
 
 LIBRARY=	libcurses.a
 VERS=	.1
@@ -145,12 +144,6 @@
 LINTOUT=	lint.out
 LINTSRC=	$(LINTLIB:%.ln=%)
 
-ROOTLINTDIR=	$(ROOTLIBDIR)
-ROOTLINT=	$(LINTSRC:%=$(ROOTLINTDIR)/%)
-ROOTLINTDIR64=	$(ROOTLIBDIR64)
-ROOTLINT64=	$(LINTSRC:%=$(ROOTLINTDIR64)/%)
-ROOTLINKS64=	$(ROOTLIBDIR64)/$(LIBLINKS)
-
 CLEANFILES +=	$(LINTOUT) $(LINTLIB)
 
 CFLAGS	+=	$(CCVERBOSE)
@@ -168,52 +161,53 @@
 #
 CLOBBERFILES=	libcurses.so libcurses.so$(VERS)
 
-.KEEP_STATE:
-
 all: $(LIBS)
 
 lint: lintcheck
 
-# install rule for 32-bit libcurses.a
-$(ROOTLIBDIR)/%.a: %.a
-	$(INS.file)
-		cd $(ROOTLIBDIR); \
-		$(RM) libtermlib.a libtermcap.a; \
-		ln libcurses.a libtermlib.a; \
-		ln libcurses.a libtermcap.a;
+#
+# Install rules for libtermlib.so links.
+# Augments the rule in Makefile.targ
+#
+$(ROOTLIBDIR)/$(LIBLINKS) := INS.liblink= \
+	$(RM) $@; $(SYMLINK) $(LIBLINKPATH)$(LIBLINKS)$(VERS) $@; \
+	cd $(ROOTLIBDIR); \
+		$(RM) libtermlib.so libtermlib.so$(VERS); \
+		$(SYMLINK) libcurses.so$(VERS) libtermlib.so$(VERS); \
+		$(SYMLINK) libtermlib.so$(VERS) libtermlib.so;
+
+$(ROOTLIBDIR64)/$(LIBLINKS) := INS.liblink64= \
+	$(RM) $@; $(SYMLINK) $(LIBLINKPATH)$(LIBLINKS)$(VERS) $@; \
+	cd $(ROOTLIBDIR64); \
+		$(RM) libtermlib.so libtermlib.so$(VERS);\
+		$(SYMLINK) libcurses.so$(VERS) libtermlib.so$(VERS); \
+		$(SYMLINK) libtermlib.so$(VERS) libtermlib.so;
 
-# install rules for 32-bit libcurses.so in /usr/lib
-$(ROOTLINKS) := INS.liblink= \
-	$(RM) $@; $(SYMLINK) $(LIBLINKPATH)$(LIBLINKS)$(VERS) $@; \
-		cd $(ROOTLIBDIR); \
-		$(RM) libtermlib.so$(VERS) libtermcap.so$(VERS); \
-		$(RM) libtermlib.so libtermcap.so; \
-		$(SYMLINK) libcurses.so$(VERS) libtermlib.so$(VERS); \
-		$(SYMLINK) libcurses.so$(VERS) libtermcap.so$(VERS); \
-		$(SYMLINK) libtermlib.so$(VERS) libtermlib.so; \
-		$(SYMLINK) libtermcap.so$(VERS) libtermcap.so;
+#
+# Install rules for libtermlib.ln links.
+# Augments a pattern rule in Makefile.targ
+#
+$(ROOTLIBDIR)/$(LINTLIB) := INS.file= \
+	-$(RM) $@; $(INS) -s -m $(FILEMODE) -f $(@D) $(LINTLIB); \
+	cd $(ROOTLIBDIR); \
+		$(RM) llib-ltermlib.ln ; \
+		$(SYMLINK) ./llib-lcurses.ln llib-ltermlib.ln;
 
-# install rule for lint library target
+$(ROOTLIBDIR64)/$(LINTLIB) := INS.file= \
+	-$(RM) $@; $(INS) -s -m $(FILEMODE) -f $(@D) $(LINTLIB); \
+	cd $(ROOTLIBDIR64); \
+		$(RM) llib-ltermlib.ln ; \
+		$(SYMLINK) ./llib-lcurses.ln llib-ltermlib.ln;
+
+#
+# Install rule for the lint source, which is installed only in
+# the default library dir, not MACH64 etc.
+#
 $(ROOTLINTDIR)/%: ../screen/%
 	$(INS.file)
 	cd $(ROOTLINTDIR); \
-		$(RM) llib-ltermcap llib-ltermlib ; \
-		$(SYMLINK) ./llib-lcurses llib-ltermcap; \
-		$(SYMLINK) ./llib-lcurses llib-ltermlib; \
-		$(RM) llib-ltermcap.ln llib-ltermlib.ln ; \
-		$(SYMLINK) ./llib-lcurses.ln llib-ltermcap.ln; \
-		$(SYMLINK) ./llib-lcurses.ln llib-ltermlib.ln;
-
-# install rule for 64 bit lint library target
-$(ROOTLINTDIR64)/%: ../screen/%
-	$(INS.file)
-	cd $(ROOTLINTDIR64); \
-		$(RM) llib-ltermcap llib-ltermlib ; \
-		$(SYMLINK) ./llib-lcurses llib-ltermcap; \
-		$(SYMLINK) ./llib-lcurses llib-ltermlib; \
-		$(RM) llib-ltermcap.ln llib-ltermlib.ln ; \
-		$(SYMLINK) ./llib-lcurses.ln llib-ltermcap.ln; \
-		$(SYMLINK) ./llib-lcurses.ln llib-ltermlib.ln;
+		$(RM) llib-ltermlib ; \
+		$(SYMLINK) ./llib-lcurses llib-ltermlib;
 
 #
 # Include library targets
--- a/usr/src/lib/libcurses/amd64/Makefile	Thu May 12 03:21:34 2011 +0400
+++ b/usr/src/lib/libcurses/amd64/Makefile	Fri Jul 15 10:20:38 2011 -0400
@@ -19,26 +19,16 @@
 # CDDL HEADER END
 #
 #
+# Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
 # Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
 
 include ../Makefile.com
 include ../../Makefile.lib.64
 
 .KEEP_STATE:
 
-$(ROOTLIBDIR64)/$(LIBLINKS) := INS.liblink64 = \
-	-$(RM) $@; \
-	cd $(ROOTLIBDIR64); \
-	$(RM) libtermlib.so$(VERS) libtermcap.so$(VERS);\
-	$(RM) libtermlib.so libtermcap.so; \
-	$(SYMLINK) $(LIBLINKS)$(VERS) $(LIBLINKS); \
-	$(SYMLINK) libcurses.so$(VERS) libtermlib.so$(VERS); \
-	$(SYMLINK) libcurses.so$(VERS) libtermcap.so$(VERS); \
-	$(SYMLINK) libtermcap.so$(VERS) libtermcap.so; \
-	$(SYMLINK) libtermlib.so$(VERS) libtermlib.so
+all: $(LIBS)
 
-install: all $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTLINT64)
+install: all $(ROOTLIBS64) $(ROOTLINKS64)
--- a/usr/src/lib/libcurses/sparcv9/Makefile	Thu May 12 03:21:34 2011 +0400
+++ b/usr/src/lib/libcurses/sparcv9/Makefile	Fri Jul 15 10:20:38 2011 -0400
@@ -19,26 +19,16 @@
 # CDDL HEADER END
 #
 #
+# Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
 # Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
 
 include ../Makefile.com
 include ../../Makefile.lib.64
 
 .KEEP_STATE:
 
-$(ROOTLIBDIR64)/$(LIBLINKS) := INS.liblink64 = \
-	-$(RM) $@; \
-	cd $(ROOTLIBDIR64); \
-	$(RM) libtermlib.so$(VERS) libtermcap.so$(VERS);\
-	$(RM) libtermlib.so libtermcap.so; \
-	$(SYMLINK) $(LIBLINKS)$(VERS) $(LIBLINKS); \
-	$(SYMLINK) libcurses.so$(VERS) libtermlib.so$(VERS); \
-	$(SYMLINK) libcurses.so$(VERS) libtermcap.so$(VERS); \
-	$(SYMLINK) libtermcap.so$(VERS) libtermcap.so; \
-	$(SYMLINK) libtermlib.so$(VERS) libtermlib.so
+all: $(LIBS)
 
-install: all $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTLINT64)
+install: all $(ROOTLIBS64) $(ROOTLINKS64)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libtermcap/Makefile	Fri Jul 15 10:20:38 2011 -0400
@@ -0,0 +1,44 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
+#
+
+
+include		../Makefile.lib
+
+HDRS =		termcap.h
+HDRDIR=		common
+SUBDIRS=	$(MACH)
+$(BUILD64)SUBDIRS += $(MACH64)
+
+all :=		TARGET= all
+clean :=	TARGET= clean
+clobber :=	TARGET= clobber
+install :=	TARGET= install
+
+.KEEP_STATE:
+
+all clean clobber install: $(SUBDIRS)
+
+lint:
+
+install_h: $(ROOTHDRS)
+
+check: $(CHECKHDRS)
+
+$(SUBDIRS): FRC
+	@cd $@; pwd; $(MAKE) $(TARGET)
+
+FRC:
+
+include ../Makefile.targ
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libtermcap/Makefile.com	Fri Jul 15 10:20:38 2011 -0400
@@ -0,0 +1,23 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
+#
+
+# install this library in the root filesystem
+include ../../Makefile.rootfs
+
+LIBRARY =	libtermcap.a
+VERS =		.1
+LIBS +=		$(LINTLIB)
+
+DYNFLAGS +=	$(ZLOADFLTR)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libtermcap/amd64/Makefile	Fri Jul 15 10:20:38 2011 -0400
@@ -0,0 +1,22 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
+#
+
+include		$(SRC)/lib/Makefile.filter.com
+include		../Makefile.com
+include		$(SRC)/lib/Makefile.lib.64
+
+install:	$(ROOTLIBS64) $(ROOTLINKS64)
+
+include		$(SRC)/lib/Makefile.filter.targ
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libtermcap/common/llib-ltermcap	Fri Jul 15 10:20:38 2011 -0400
@@ -0,0 +1,16 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source.  A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
+ */
+
+#include <termcap.h>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libtermcap/common/mapfile-vers	Fri Jul 15 10:20:38 2011 -0400
@@ -0,0 +1,73 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
+#
+
+#
+# MAPFILE HEADER START
+#
+# WARNING:  STOP NOW.  DO NOT MODIFY THIS FILE.
+# Object versioning must comply with the rules detailed in
+#
+#	usr/src/lib/README.mapfiles
+#
+# You should not be making modifications here until you've read the most current
+# copy of that file. If you need help, contact a gatekeeper for guidance.
+#
+# MAPFILE HEADER END
+#
+
+$mapfile_version 2
+
+#
+# This is a mapfile that defines a filter for libcurses so that
+# libraries such as libreadline can link with this and NOT force
+# the choice of which curses library will be used.  The NODIRECT
+# flag lets other libraries earlier in the link order provide the
+# symbols below, in which case those will be used by all calls
+# to these functions _instead_ of the libcurses ones.  Cool, eh?
+#
+
+SYMBOL_VERSION ILLUMOS_0.1 {
+    global:
+
+$if _ELF32
+	BC		{ TYPE = COMMON; SIZE = 4; FLAGS = NODIRECT;
+			  FILTER = libcurses.so.1; };
+	UP		{ TYPE = COMMON; SIZE = 4; FLAGS = NODIRECT;
+			  FILTER = libcurses.so.1; };
+$endif
+$if _ELF64
+	BC		{ TYPE = COMMON; SIZE = 8; FLAGS = NODIRECT;
+			  FILTER = libcurses.so.1; };
+	UP		{ TYPE = COMMON; SIZE = 8; FLAGS = NODIRECT;
+			  FILTER = libcurses.so.1; };
+$endif
+	PC		{ TYPE = COMMON; SIZE = 1; FLAGS = NODIRECT;
+			  FILTER = libcurses.so.1; };
+	ospeed		{ TYPE = COMMON; SIZE = 2; FLAGS = NODIRECT;
+			  FILTER = libcurses.so.1; };
+
+	tgetent		{ TYPE = FUNCTION; FLAGS = NODIRECT;
+			  FILTER = libcurses.so.1; };
+	tgetflag	{ TYPE = FUNCTION; FLAGS = NODIRECT;
+			  FILTER = libcurses.so.1 };
+	tgetnum		{ TYPE = FUNCTION; FLAGS = NODIRECT;
+			  FILTER = libcurses.so.1 };
+	tgetstr		{ TYPE = FUNCTION; FLAGS = NODIRECT;
+			  FILTER = libcurses.so.1 };
+	tgoto		{ TYPE = FUNCTION; FLAGS = NODIRECT;
+			  FILTER = libcurses.so.1 };
+	tputs		{ TYPE = FUNCTION; FLAGS = NODIRECT;
+			  FILTER = libcurses.so.1 };
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libtermcap/common/termcap.h	Fri Jul 15 10:20:38 2011 -0400
@@ -0,0 +1,53 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source.  A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
+ */
+
+#ifndef	_TERMCAP_H_
+#define	_TERMCAP_H_
+
+/*
+ * This declares the public functions exported by the
+ * "filter" library: libtermcap.  That exports only
+ * the traditional BSD-style functions and data.
+ *
+ * Note that the libtermcap filter library uses NODIRECT
+ * linker bindings when filtering what libcurses exports
+ * so that an application can link with an alternative
+ * curses library providing the symbols below, and those
+ * will be used instead of the ones in libcurses.
+ */
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+extern char PC, *UP, *BC;
+extern short ospeed;
+
+/*
+ * These are intentionally the same as term.h declares
+ * so the compiler won't bark if you include that too.
+ */
+extern int tgetent(char *, char *);
+extern int tgetflag(char *);
+extern int tgetnum(char *);
+extern char *tgetstr(char *, char **);
+extern char *tgoto(char *, int, int);
+extern int tputs(char *, int, int (*)(char));
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif	/* _TERMCAP_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libtermcap/i386/Makefile	Fri Jul 15 10:20:38 2011 -0400
@@ -0,0 +1,21 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
+#
+
+include		$(SRC)/lib/Makefile.filter.com
+include		../Makefile.com
+
+install:	$(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
+
+include		$(SRC)/lib/Makefile.filter.targ
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libtermcap/sparc/Makefile	Fri Jul 15 10:20:38 2011 -0400
@@ -0,0 +1,21 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
+#
+
+include		$(SRC)/lib/Makefile.filter.com
+include		../Makefile.com
+
+install:	$(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
+
+include		$(SRC)/lib/Makefile.filter.targ
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libtermcap/sparcv9/Makefile	Fri Jul 15 10:20:38 2011 -0400
@@ -0,0 +1,22 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
+#
+
+include		$(SRC)/lib/Makefile.filter.com
+include		../Makefile.com
+include		$(SRC)/lib/Makefile.lib.64
+
+install:	$(ROOTLIBS64) $(ROOTLINKS64)
+
+include		$(SRC)/lib/Makefile.filter.targ
--- a/usr/src/man/man3lib/libcurses.3lib	Thu May 12 03:21:34 2011 +0400
+++ b/usr/src/man/man3lib/libcurses.3lib	Fri Jul 15 10:20:38 2011 -0400
@@ -1,8 +1,22 @@
 '\" te
+.\" Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
 .\" Copyright (c) 2004, Sun Microsystems, Inc.  All Rights Reserved.
-.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
-.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
-.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.\"
+.\" The contents of this file are subject to the terms of the
+.\" Common Development and Distribution License (the "License").
+.\" You may not use this file except in compliance with the License.
+.\"
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+.\" or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions
+.\" and limitations under the License.
+.\"
+.\" When distributing Covered Code, include this CDDL HEADER in each
+.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+.\" If applicable, add the following below this CDDL HEADER, with the
+.\" fields enclosed by brackets "[]" replaced with your own identifying
+.\" information: Portions Copyright [yyyy] [name of copyright owner]
+.\"
 .TH libcurses 3LIB "24 Mar 2004" "SunOS 5.11" "Interface Libraries"
 .SH NAME
 libcurses, libtermcap, libtermlib \- screen handling and optimization library
@@ -15,10 +29,16 @@
 .SH DESCRIPTION
 .sp
 .LP
-Functions in the \fBlibcurses\fR library provide a terminal-independent method
-of updating character screens with reasonable optimization. The
-\fBlibtermcap\fR and \fBlibtermlib\fR libraries are identical to
-\fBlibcurses\fR and are maintained for backward compatibility.
+Functions in the \fBlibcurses\fR library provide a terminal-independent
+method of updating character screens with reasonable optimization.
+.LP
+The \fBlibtermcap\fR library is a "filter" on \fBlibcurses\fR
+that provides the traditional BSD-style termcap functions,
+and does so in a way that allows the consuming library or
+application to link with an alternate curses library.
+.LP
+The \fBlibtermlib\fR library is identical to \fBlibcurses\fR and
+is maintained for backward compatibility.
 .sp
 .LP
 See \fBlibcurses\fR(3XCURSES) for information about the curses library that
@@ -26,12 +46,11 @@
 .SH INTERFACES
 .sp
 .LP
-The shared objects \fBlibcurses.so.1\fR, \fBlibtermcap.so.1\fR, and
+The shared objects \fBlibcurses.so.1\fR and
 \fBlibtermlib.so.1\fR provide the public interfaces defined below. See
 \fBIntro\fR(3) for additional information on shared object interfaces.
 .sp
 
-.sp
 .TS
 tab();
 lw(2.75i) lw(2.75i) 
@@ -215,6 +234,24 @@
 \fBwvline\fR
 .TE
 
+.LP
+The shared object \fBlibtermcap.so.1\fR provides the traditional
+BSD-style interfaces defined below:
+.sp
+
+.TS
+tab();
+lw(2.75i) lw(2.75i) 
+lw(2.75i) lw(2.75i) 
+.
+\fBtgetent\fR
+\fBtgetflag\fR
+\fBtgetnum\fR
+\fBtgetstr\fR
+\fBtgoto\fR
+\fBtputs\fR
+.TE
+
 .SH FILES
 .sp
 .ne 2
--- a/usr/src/pkg/manifests/developer-library-lint.mf	Thu May 12 03:21:34 2011 +0400
+++ b/usr/src/pkg/manifests/developer-library-lint.mf	Fri Jul 15 10:20:38 2011 -0400
@@ -20,6 +20,7 @@
 #
 
 #
+# Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
 #
 
@@ -50,7 +51,6 @@
 file path=lib/$(ARCH64)/llib-lcontract.ln
 file path=lib/$(ARCH64)/llib-lcryptoutil.ln
 file path=lib/$(ARCH64)/llib-lctf.ln
-file path=lib/$(ARCH64)/llib-lcurses
 file path=lib/$(ARCH64)/llib-lcurses.ln
 file path=lib/$(ARCH64)/llib-ldevice.ln
 file path=lib/$(ARCH64)/llib-ldevid.ln
@@ -84,6 +84,7 @@
 file path=lib/$(ARCH64)/llib-lsendfile.ln
 file path=lib/$(ARCH64)/llib-lsocket.ln
 file path=lib/$(ARCH64)/llib-lsysevent.ln
+file path=lib/$(ARCH64)/llib-ltermcap.ln
 file path=lib/$(ARCH64)/llib-lthread.ln
 file path=lib/$(ARCH64)/llib-ltsnet.ln
 file path=lib/$(ARCH64)/llib-ltsol.ln
@@ -175,6 +176,8 @@
 file path=lib/llib-lsocket.ln
 file path=lib/llib-lsysevent
 file path=lib/llib-lsysevent.ln
+file path=lib/llib-ltermcap
+file path=lib/llib-ltermcap.ln
 file path=lib/llib-lthread
 file path=lib/llib-lthread.ln
 file path=lib/llib-ltsnet
@@ -337,14 +340,9 @@
 license cr_Sun license=cr_Sun
 license lic_CDDL license=lic_CDDL
 link path=lib/$(ARCH64)/llib-lposix4.ln target=./llib-lrt.ln
-link path=lib/$(ARCH64)/llib-ltermcap target=./llib-lcurses
-link path=lib/$(ARCH64)/llib-ltermcap.ln target=./llib-lcurses.ln
-link path=lib/$(ARCH64)/llib-ltermlib target=./llib-lcurses
 link path=lib/$(ARCH64)/llib-ltermlib.ln target=./llib-lcurses.ln
 link path=lib/llib-lposix4 target=./llib-lrt
 link path=lib/llib-lposix4.ln target=./llib-lrt.ln
-link path=lib/llib-ltermcap target=./llib-lcurses
-link path=lib/llib-ltermcap.ln target=./llib-lcurses.ln
 link path=lib/llib-ltermlib target=./llib-lcurses
 link path=lib/llib-ltermlib.ln target=./llib-lcurses.ln
 link path=usr/ccs/lib/$(ARCH64)/llib-lcurses.ln \
@@ -360,7 +358,7 @@
 link path=usr/ccs/lib/$(ARCH64)/llib-lpanel.ln \
     target=../../../lib/$(ARCH64)/llib-lpanel.ln
 link path=usr/ccs/lib/$(ARCH64)/llib-ltermcap.ln \
-    target=../../../../lib/$(ARCH64)/llib-lcurses.ln
+    target=../../../../lib/$(ARCH64)/llib-ltermcap.ln
 link path=usr/ccs/lib/$(ARCH64)/llib-ltermlib.ln \
     target=../../../../lib/$(ARCH64)/llib-lcurses.ln
 link path=usr/ccs/lib/$(ARCH64)/llib-ly.ln \
@@ -387,8 +385,8 @@
 link path=usr/ccs/lib/llib-lmenu.ln target=../../lib/llib-lmenu.ln
 link path=usr/ccs/lib/llib-lpanel target=../../lib/llib-lpanel
 link path=usr/ccs/lib/llib-lpanel.ln target=../../lib/llib-lpanel.ln
-link path=usr/ccs/lib/llib-ltermcap target=../../../lib/llib-lcurses
-link path=usr/ccs/lib/llib-ltermcap.ln target=../../../lib/llib-lcurses.ln
+link path=usr/ccs/lib/llib-ltermcap target=../../../lib/llib-ltermcap
+link path=usr/ccs/lib/llib-ltermcap.ln target=../../../lib/llib-ltermcap.ln
 link path=usr/ccs/lib/llib-ltermlib target=../../../lib/llib-lcurses
 link path=usr/ccs/lib/llib-ltermlib.ln target=../../../lib/llib-lcurses.ln
 link path=usr/ccs/lib/values-Xa.o target=../../lib/values-Xa.o
@@ -409,8 +407,6 @@
     target=../../../lib/$(ARCH64)/llib-lcontract.ln
 link path=usr/lib/$(ARCH64)/llib-lctf.ln \
     target=../../../lib/$(ARCH64)/llib-lctf.ln
-link path=usr/lib/$(ARCH64)/llib-lcurses \
-    target=../../../lib/$(ARCH64)/llib-lcurses
 link path=usr/lib/$(ARCH64)/llib-lcurses.ln \
     target=../../../lib/$(ARCH64)/llib-lcurses.ln
 link path=usr/lib/$(ARCH64)/llib-ldevice.ln \
@@ -467,12 +463,8 @@
     target=../../../lib/$(ARCH64)/llib-lsocket.ln
 link path=usr/lib/$(ARCH64)/llib-lsysevent.ln \
     target=../../../lib/$(ARCH64)/llib-lsysevent.ln
-link path=usr/lib/$(ARCH64)/llib-ltermcap \
-    target=../../../lib/$(ARCH64)/llib-lcurses
 link path=usr/lib/$(ARCH64)/llib-ltermcap.ln \
-    target=../../../lib/$(ARCH64)/llib-lcurses.ln
-link path=usr/lib/$(ARCH64)/llib-ltermlib \
-    target=../../../lib/$(ARCH64)/llib-lcurses
+    target=../../../lib/$(ARCH64)/llib-ltermcap.ln
 link path=usr/lib/$(ARCH64)/llib-ltermlib.ln \
     target=../../../lib/$(ARCH64)/llib-lcurses.ln
 link path=usr/lib/$(ARCH64)/llib-lthread.ln \
@@ -557,8 +549,8 @@
 link path=usr/lib/llib-lsocket.ln target=../../lib/llib-lsocket.ln
 link path=usr/lib/llib-lsysevent target=../../lib/llib-lsysevent
 link path=usr/lib/llib-lsysevent.ln target=../../lib/llib-lsysevent.ln
-link path=usr/lib/llib-ltermcap target=../../lib/llib-lcurses
-link path=usr/lib/llib-ltermcap.ln target=../../lib/llib-lcurses.ln
+link path=usr/lib/llib-ltermcap target=../../lib/llib-ltermcap
+link path=usr/lib/llib-ltermcap.ln target=../../lib/llib-ltermcap.ln
 link path=usr/lib/llib-ltermlib target=../../lib/llib-lcurses
 link path=usr/lib/llib-ltermlib.ln target=../../lib/llib-lcurses.ln
 link path=usr/lib/llib-lthread target=../../lib/llib-lthread
--- a/usr/src/pkg/manifests/system-header.mf	Thu May 12 03:21:34 2011 +0400
+++ b/usr/src/pkg/manifests/system-header.mf	Fri Jul 15 10:20:38 2011 -0400
@@ -20,6 +20,7 @@
 #
 
 #
+# Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
 #
 
@@ -1615,6 +1616,7 @@
 file path=usr/include/tar.h
 file path=usr/include/tcpd.h
 file path=usr/include/term.h
+file path=usr/include/termcap.h
 file path=usr/include/termio.h
 file path=usr/include/termios.h
 file path=usr/include/thread.h
--- a/usr/src/pkg/manifests/system-library.mf	Thu May 12 03:21:34 2011 +0400
+++ b/usr/src/pkg/manifests/system-library.mf	Fri Jul 15 10:20:38 2011 -0400
@@ -20,6 +20,7 @@
 #
 
 #
+# Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
 #
 
@@ -214,6 +215,7 @@
 file path=lib/$(ARCH64)/libsendfile.so.1
 file path=lib/$(ARCH64)/libsocket.so.1
 file path=lib/$(ARCH64)/libsysevent.so.1
+file path=lib/$(ARCH64)/libtermcap.so.1
 file path=lib/$(ARCH64)/libthread.so.1
 file path=lib/$(ARCH64)/libtsnet.so.1
 file path=lib/$(ARCH64)/libtsol.so.2
@@ -296,6 +298,7 @@
 file path=lib/libsendfile.so.1
 file path=lib/libsocket.so.1
 file path=lib/libsysevent.so.1
+file path=lib/libtermcap.so.1
 file path=lib/libthread.so.1
 file path=lib/libtsnet.so.1
 file path=lib/libtsol.so.2
@@ -624,7 +627,6 @@
 link path=lib/$(ARCH64)/libsocket.so target=libsocket.so.1
 link path=lib/$(ARCH64)/libsysevent.so target=libsysevent.so.1
 link path=lib/$(ARCH64)/libtermcap.so target=libtermcap.so.1
-link path=lib/$(ARCH64)/libtermcap.so.1 target=libcurses.so.1
 link path=lib/$(ARCH64)/libtermlib.so target=libtermlib.so.1
 link path=lib/$(ARCH64)/libtermlib.so.1 target=libcurses.so.1
 link path=lib/$(ARCH64)/libthread.so target=libthread.so.1
@@ -690,7 +692,6 @@
 link path=lib/libsocket.so target=libsocket.so.1
 link path=lib/libsysevent.so target=./libsysevent.so.1
 link path=lib/libtermcap.so target=libtermcap.so.1
-link path=lib/libtermcap.so.1 target=libcurses.so.1
 link path=lib/libtermlib.so target=libtermlib.so.1
 link path=lib/libtermlib.so.1 target=libcurses.so.1
 link path=lib/libthread.so target=libthread.so.1
@@ -718,7 +719,7 @@
 link path=usr/ccs/lib/$(ARCH64)/libpanel.so \
     target=../../../lib/$(ARCH64)/libpanel.so.1
 link path=usr/ccs/lib/$(ARCH64)/libtermcap.so \
-    target=../../../../lib/$(ARCH64)/libcurses.so.1
+    target=../../../../lib/$(ARCH64)/libtermcap.so.1
 link path=usr/ccs/lib/$(ARCH64)/libtermlib.so \
     target=../../../../lib/$(ARCH64)/libcurses.so.1
 link path=usr/ccs/lib/$(ARCH64)/liby.so \
@@ -730,7 +731,7 @@
 link path=usr/ccs/lib/libmalloc.so target=../../lib/libmalloc.so.1
 link path=usr/ccs/lib/libmenu.so target=../../lib/libmenu.so.1
 link path=usr/ccs/lib/libpanel.so target=../../lib/libpanel.so.1
-link path=usr/ccs/lib/libtermcap.so target=../../../lib/libcurses.so.1
+link path=usr/ccs/lib/libtermcap.so target=../../../lib/libtermcap.so.1
 link path=usr/ccs/lib/libtermlib.so target=../../../lib/libcurses.so.1
 link path=usr/ccs/lib/liby.so target=../../lib/liby.so.1
 link path=usr/lib/$(ARCH64)/libadm.so \
@@ -940,9 +941,9 @@
 link path=usr/lib/$(ARCH64)/libsysevent.so.1 \
     target=../../../lib/$(ARCH64)/libsysevent.so.1
 link path=usr/lib/$(ARCH64)/libtermcap.so \
-    target=../../../lib/$(ARCH64)/libcurses.so.1
+    target=../../../lib/$(ARCH64)/libtermcap.so.1
 link path=usr/lib/$(ARCH64)/libtermcap.so.1 \
-    target=../../../lib/$(ARCH64)/libcurses.so.1
+    target=../../../lib/$(ARCH64)/libtermcap.so.1
 link path=usr/lib/$(ARCH64)/libtermlib.so \
     target=../../../lib/$(ARCH64)/libcurses.so.1
 link path=usr/lib/$(ARCH64)/libtermlib.so.1 \
@@ -1139,8 +1140,8 @@
 link path=usr/lib/libsys.so target=./libsys.so.1
 link path=usr/lib/libsysevent.so target=../../lib/libsysevent.so.1
 link path=usr/lib/libsysevent.so.1 target=../../lib/libsysevent.so.1
-link path=usr/lib/libtermcap.so target=../../lib/libcurses.so.1
-link path=usr/lib/libtermcap.so.1 target=../../lib/libcurses.so.1
+link path=usr/lib/libtermcap.so target=../../lib/libtermcap.so.1
+link path=usr/lib/libtermcap.so.1 target=../../lib/libtermcap.so.1
 link path=usr/lib/libtermlib.so target=../../lib/libcurses.so.1
 link path=usr/lib/libtermlib.so.1 target=../../lib/libcurses.so.1
 link path=usr/lib/libthread.so target=../../lib/libthread.so.1