pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk Define BUILTIN_LIBNAME.* outside of the CHECK_BUILT...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/94437c1d80e3
branches:  trunk
changeset: 539075:94437c1d80e3
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Wed Feb 27 06:14:23 2008 +0000

description:
Define BUILTIN_LIBNAME.* outside of the CHECK_BUILTIN.*-protected
section to be the name of the built-in library if USE_BUILTIN.* is
"yes".  These variables can be used in other builtin.mk files.

diffstat:

 devel/ncurses/builtin.mk |  34 ++++++++++++++++++++--------------
 mk/curses.builtin.mk     |  15 ++++++++++-----
 2 files changed, 30 insertions(+), 19 deletions(-)

diffs (91 lines):

diff -r 43c84f1ea96e -r 94437c1d80e3 devel/ncurses/builtin.mk
--- a/devel/ncurses/builtin.mk  Wed Feb 27 06:10:25 2008 +0000
+++ b/devel/ncurses/builtin.mk  Wed Feb 27 06:14:23 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.17 2008/02/27 04:47:02 jlam Exp $
+# $NetBSD: builtin.mk,v 1.18 2008/02/27 06:14:23 jlam Exp $
 
 BUILTIN_PKG:=  ncurses
 
@@ -100,6 +100,25 @@
 .  endif
 .endif
 
+# Define BUILTIN_LIBNAME.ncurses to be the built-in ncurses library
+# only if we're using the built-in ncurses.
+#
+.if !empty(USE_BUILTIN.ncurses:M[yY][eE][sS])
+.  if !empty(BUILTIN_LIB_FOUND.ncurses:M[nN][oO]) && \
+      !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS])
+BUILTIN_LIBNAME.ncurses=       curses
+.  endif
+#
+# On Interix, there is a libncurses.a and a libcurses.so but strangely,
+# no libncurses.so.  We want to link against the shared library, so
+# turn "-lncurses" into "-lcurses".
+#
+.  if (${OPSYS} == "Interix") && \
+      !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS])
+BUILTIN_LIBNAME.ncurses=       curses
+.  endif
+.endif
+
 ###
 ### The section below only applies if we are not including this file
 ### solely to determine whether a built-in implementation exists.
@@ -109,19 +128,6 @@
 
 BUILDLINK_TRANSFORM+=          l:ncurses:${BUILDLINK_LIBNAME.ncurses}
 .  if !empty(USE_BUILTIN.ncurses:M[yY][eE][sS])
-.    if !empty(BUILTIN_LIB_FOUND.ncurses:M[nN][oO]) && \
-       !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS])
-BUILDLINK_LIBNAME.ncurses=     curses
-.    endif
-#
-# On Interix, there is a libncurses.a and a libcurses.so but strangely,
-# no libncurses.so.  We want to link against the shared library, so
-# turn "-lncurses" into "-lcurses".
-#
-.    if (${OPSYS} == "Interix") && \
-       !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS])
-BUILDLINK_LIBNAME.ncurses=     curses
-.    endif
 BUILDLINK_TARGETS+=            buildlink-curses-ncurses-h
 BUILDLINK_TARGETS+=            buildlink-ncurses-extra-includes
 .  endif
diff -r 43c84f1ea96e -r 94437c1d80e3 mk/curses.builtin.mk
--- a/mk/curses.builtin.mk      Wed Feb 27 06:10:25 2008 +0000
+++ b/mk/curses.builtin.mk      Wed Feb 27 06:14:23 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: curses.builtin.mk,v 1.3 2008/02/27 04:47:02 jlam Exp $
+# $NetBSD: curses.builtin.mk,v 1.4 2008/02/27 06:14:23 jlam Exp $
 
 BUILTIN_PKG:=  curses
 
@@ -46,6 +46,15 @@
 .endif
 MAKEVARS+=     USE_BUILTIN.curses
 
+# Define BUILTIN_LIBNAME.curses to be the built-in curses library only if
+# we're using the built-in curses.
+#
+.if !empty(USE_BUILTIN.curses:M[yY][eE][sS])
+.  if !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS])
+BUILTIN_LIBNAME.curses=                curses
+.  endif
+.endif
+
 ###
 ### The section below only applies if we are not including this file
 ### solely to determine whether a built-in implementation exists.
@@ -57,10 +66,6 @@
 .    if exists(${H_CURSES})
 BUILDLINK_INCDIRS.curses?=     ${H_CURSES:H:S/^${BUILDLINK_PREFIX.curses}\///}
 .    endif
-.    if !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS])
-BUILDLINK_LIBNAME.curses=      curses
-BUILDLINK_LDADD.curses?=       -l${BUILDLINK_LIBNAME.curses}
-.    endif
 .  endif
 
 .endif # CHECK_BUILTIN.curses



Home | Main Index | Thread Index | Old Index