Wed Feb 27 17:36:34 2008 UTC ()
Teach termlib files about another possible native terminal library, tinfo.


(jlam)
diff -r1.2 -r1.3 pkgsrc/mk/termlib.buildlink3.mk
diff -r1.2 -r1.3 pkgsrc/mk/termlib.builtin.mk

cvs diff -r1.2 -r1.3 pkgsrc/mk/Attic/termlib.buildlink3.mk (expand / switch to unified diff)

--- pkgsrc/mk/Attic/termlib.buildlink3.mk 2008/02/27 06:10:25 1.2
+++ pkgsrc/mk/Attic/termlib.buildlink3.mk 2008/02/27 17:36:34 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: termlib.buildlink3.mk,v 1.2 2008/02/27 06:10:25 jlam Exp $ 1# $NetBSD: termlib.buildlink3.mk,v 1.3 2008/02/27 17:36:34 jlam Exp $
2# 2#
3# This Makefile fragment is meant to be included by packages that require 3# This Makefile fragment is meant to be included by packages that require
4# a basic termlib implementation. 4# a basic termlib implementation.
5# 5#
6# === Variables set by this file === 6# === Variables set by this file ===
7# 7#
8# TERMLIB_TYPE 8# TERMLIB_TYPE
9# The name of the selected termlib implementation. 9# The name of the selected termlib implementation.
10 10
11TERMLIB_BUILDLINK3_MK:= ${TERMLIB_BUILDLINK3_MK}+ 11TERMLIB_BUILDLINK3_MK:= ${TERMLIB_BUILDLINK3_MK}+
12 12
13.include "bsd.fast.prefs.mk" 13.include "bsd.fast.prefs.mk"
14 14
@@ -24,25 +24,26 @@ TERMLIB_TYPE= ${BUILTIN_LIBNAME.termlib} @@ -24,25 +24,26 @@ TERMLIB_TYPE= ${BUILTIN_LIBNAME.termlib}
24. else 24. else
25TERMLIB_TYPE= none 25TERMLIB_TYPE= none
26. endif 26. endif
27. else 27. else
28TERMLIB_TYPE= curses 28TERMLIB_TYPE= curses
29. endif 29. endif
30 30
31BUILD_DEFS+= TERMLIB_TYPE 31BUILD_DEFS+= TERMLIB_TYPE
32 32
33.endif # TERMLIB_BUILDLINK3_MK 33.endif # TERMLIB_BUILDLINK3_MK
34 34
35.if ${TERMLIB_TYPE} == "none" 35.if ${TERMLIB_TYPE} == "none"
36PKG_FAIL_REASON= "No usable terminal library found on the system." 36PKG_FAIL_REASON= "No usable terminal library found on the system."
37.elif (${TERMLIB_TYPE} == "termcap") 37.elif (${TERMLIB_TYPE} == "termcap") || \
 38 (${TERMLIB_TYPE} == "tinfo")
38BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ntermlib} 39BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ntermlib}
39BUILDLINK_PACKAGES+= termlib 40BUILDLINK_PACKAGES+= termlib
40BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}termlib 41BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}termlib
41BUILDLINK_LIBNAME.termlib?= termcap 42BUILDLINK_LIBNAME.termlib?= ${BUILTIN_LIBNAME.termlib}
42BUILDLINK_LDADD.termlib?= ${BUILDLINK_LIBNAME.termlib:S/^/-l/} 43BUILDLINK_LDADD.termlib?= ${BUILDLINK_LIBNAME.termlib:S/^/-l/}
43BUILDLINK_BUILTIN_MK.termlib= ../../mk/termlib.builtin.mk 44BUILDLINK_BUILTIN_MK.termlib= ../../mk/termlib.builtin.mk
44.elif ${TERMLIB_TYPE} == "curses" 45.elif ${TERMLIB_TYPE} == "curses"
45. include "../../mk/curses.buildlink3.mk" 46. include "../../mk/curses.buildlink3.mk"
46BUILDLINK_LIBNAME.termlib?= ${BUILDLINK_LIBNAME.curses} 47BUILDLINK_LIBNAME.termlib?= ${BUILDLINK_LIBNAME.curses}
47BUILDLINK_LDADD.termlib?= ${BUILDLINK_LDADD.curses} 48BUILDLINK_LDADD.termlib?= ${BUILDLINK_LDADD.curses}
48.endif 49.endif

cvs diff -r1.2 -r1.3 pkgsrc/mk/Attic/termlib.builtin.mk (expand / switch to unified diff)

--- pkgsrc/mk/Attic/termlib.builtin.mk 2008/02/27 15:26:34 1.2
+++ pkgsrc/mk/Attic/termlib.builtin.mk 2008/02/27 17:36:34 1.3
@@ -1,52 +1,55 @@ @@ -1,52 +1,55 @@
1# $NetBSD: termlib.builtin.mk,v 1.2 2008/02/27 15:26:34 jlam Exp $ 1# $NetBSD: termlib.builtin.mk,v 1.3 2008/02/27 17:36:34 jlam Exp $
2 2
3BUILTIN_PKG:= termlib 3BUILTIN_PKG:= termlib
4 4
5BUILTIN_FIND_LIBS:= termcap curses 5BUILTIN_FIND_LIBS:= termcap tinfo curses
6 6
7.include "buildlink3/bsd.builtin.mk" 7.include "buildlink3/bsd.builtin.mk"
8 8
9### 9###
10### Determine if there is a built-in implementation of the package and 10### Determine if there is a built-in implementation of the package and
11### set IS_BUILTIN.<pkg> appropriately ("yes" or "no"). 11### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
12### 12###
13.if !defined(IS_BUILTIN.termlib) 13.if !defined(IS_BUILTIN.termlib)
14IS_BUILTIN.termlib= no 14IS_BUILTIN.termlib= no
15. if !empty(BUILTIN_LIB_FOUND.termcap:M[yY][eE][sS]) || \ 15. if !empty(BUILTIN_LIB_FOUND.termcap:M[yY][eE][sS]) || \
 16 !empty(BUILTIN_LIB_FOUND.tinfo:M[yY][eE][sS]) || \
16 !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS]) 17 !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS])
17IS_BUILTIN.termlib= yes 18IS_BUILTIN.termlib= yes
18. endif 19. endif
19.endif 20.endif
20MAKEVARS+= IS_BUILTIN.termlib 21MAKEVARS+= IS_BUILTIN.termlib
21 22
22### 23###
23### Determine whether we should use the built-in implementation if it 24### Determine whether we should use the built-in implementation if it
24### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no"). 25### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
25### 26###
26.if !defined(USE_BUILTIN.termlib) 27.if !defined(USE_BUILTIN.termlib)
27. if ${PREFER.termlib} == "pkgsrc" 28. if ${PREFER.termlib} == "pkgsrc"
28USE_BUILTIN.termlib= no 29USE_BUILTIN.termlib= no
29. else 30. else
30USE_BUILTIN.termlib= ${IS_BUILTIN.termlib} 31USE_BUILTIN.termlib= ${IS_BUILTIN.termlib}
31. endif # PREFER.termlib 32. endif # PREFER.termlib
32.endif 33.endif
33MAKEVARS+= USE_BUILTIN.termlib 34MAKEVARS+= USE_BUILTIN.termlib
34 35
35# Define BUILTIN_LIBNAME.termlib to be the base name of the built-in 36# Define BUILTIN_LIBNAME.termlib to be the base name of the built-in
36# terminal library. 37# terminal library.
37# 38#
38.if !empty(BUILTIN_LIB_FOUND.termcap:M[yY][eE][sS]) 39.if !empty(BUILTIN_LIB_FOUND.termcap:M[yY][eE][sS])
39BUILTIN_LIBNAME.termlib= termcap 40BUILTIN_LIBNAME.termlib= termcap
 41.elif !empty(BUILTIN_LIB_FOUND.tinfo:M[yY][eE][sS])
 42BUILTIN_LIBNAME.termlib= tinfo
40.elif !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS]) 43.elif !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS])
41BUILTIN_LIBNAME.termlib= curses 44BUILTIN_LIBNAME.termlib= curses
42.endif 45.endif
43 46
44### 47###
45### The section below only applies if we are not including this file 48### The section below only applies if we are not including this file
46### solely to determine whether a built-in implementation exists. 49### solely to determine whether a built-in implementation exists.
47### 50###
48CHECK_BUILTIN.termlib?= no 51CHECK_BUILTIN.termlib?= no
49.if !empty(CHECK_BUILTIN.termlib:M[nN][oO]) 52.if !empty(CHECK_BUILTIN.termlib:M[nN][oO])
50 53
51. if !empty(USE_BUILTIN.termlib:M[yY][eE][sS]) 54. if !empty(USE_BUILTIN.termlib:M[yY][eE][sS])
52BUILDLINK_LIBNAME.termlib= ${BUILTIN_LIBNAME.termlib} 55BUILDLINK_LIBNAME.termlib= ${BUILTIN_LIBNAME.termlib}