summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2008-02-27 06:14:23 +0000
committerjlam <jlam@pkgsrc.org>2008-02-27 06:14:23 +0000
commit70c7f36d9943ac736f19824fe03a14c5a3427a6d (patch)
treeb43b2ecc49659779b4916d89c5a163d2512cd711 /devel
parent02629b7349f729b562b5f21762c64706c0f91a34 (diff)
downloadpkgsrc-70c7f36d9943ac736f19824fe03a14c5a3427a6d.tar.gz
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 (limited to 'devel')
-rw-r--r--devel/ncurses/builtin.mk34
1 files changed, 20 insertions, 14 deletions
diff --git a/devel/ncurses/builtin.mk b/devel/ncurses/builtin.mk
index 63d23ec0924..2a543cea722 100644
--- a/devel/ncurses/builtin.mk
+++ b/devel/ncurses/builtin.mk
@@ -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 @@ USE_BUILTIN.ncurses= no
. 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 @@ CHECK_BUILTIN.ncurses?= no
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