summaryrefslogtreecommitdiff
path: root/devel/ncurses
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-11-26 23:16:35 +0000
committerjlam <jlam@pkgsrc.org>2004-11-26 23:16:35 +0000
commit9a38f17ac4ac4a152bb4da0ae7795af4b17d3b50 (patch)
treec191761e56da1a8b1b18d652c65ecad3e41024b9 /devel/ncurses
parent2453beca4536e49295d46ee6ab56c580107ad2c4 (diff)
downloadpkgsrc-9a38f17ac4ac4a152bb4da0ae7795af4b17d3b50.tar.gz
Standardize how we search for libraries in builtin.mk files. We define
_BLNK_LIB_FOUND.<lib> to "yes" or "no" depending on whether -l<lib> is found in the base system.
Diffstat (limited to 'devel/ncurses')
-rw-r--r--devel/ncurses/builtin.mk21
1 files changed, 13 insertions, 8 deletions
diff --git a/devel/ncurses/builtin.mk b/devel/ncurses/builtin.mk
index 6b9edd8adb9..2abce9070d9 100644
--- a/devel/ncurses/builtin.mk
+++ b/devel/ncurses/builtin.mk
@@ -1,20 +1,25 @@
-# $NetBSD: builtin.mk,v 1.4 2004/10/13 20:10:31 tv Exp $
+# $NetBSD: builtin.mk,v 1.5 2004/11/26 23:16:35 jlam Exp $
-.if !defined(_BLNK_LIBNCURSES_FOUND)
-_BLNK_LIBNCURSES_FOUND!= \
- if [ "`${ECHO} /usr/lib/libncurses.*`" = "/usr/lib/libncurses.*" ]; then \
+.for _lib_ in ncurses
+. if !defined(_BLNK_LIB_FOUND.${_lib_})
+_BLNK_LIB_FOUND.${_lib_}!= \
+ if ${TEST} "`${ECHO} /usr/lib/lib${_lib_}.*`" = "/usr/lib/lib${_lib_}.*"; then \
+ ${ECHO} "no"; \
+ elif ${TEST} "`${ECHO} /lib/lib${_lib_}.*`" = "/lib/lib${_lib_}.*"; then \
${ECHO} "no"; \
else \
${ECHO} "yes"; \
fi
-BUILDLINK_VARS+= _BLNK_LIBNCURSES_FOUND
-.endif
+BUILDLINK_VARS+= _BLNK_LIB_FOUND.${_lib_}
+. endif
+.endfor
+.undef _lib_
_NCURSES_H= /usr/include/curses.h
.if !defined(IS_BUILTIN.ncurses)
IS_BUILTIN.ncurses= no
-. if !empty(_BLNK_LIBNCURSES_FOUND:M[yY][eE][sS])
+. if !empty(_BLNK_LIB_FOUND.ncurses:M[yY][eE][sS])
IS_BUILTIN.ncurses= yes
. elif exists(${_NCURSES_H})
IS_BUILTIN.ncurses!= \
@@ -100,7 +105,7 @@ CHECK_BUILTIN.ncurses?= no
.if !empty(USE_BUILTIN.ncurses:M[yY][eE][sS])
. include "../../mk/bsd.prefs.mk"
-. if !empty(_BLNK_LIBNCURSES_FOUND:M[nN][oO]) || ${OPSYS} == "Interix"
+. if !empty(_BLNK_LIB_FOUND.ncurses:M[nN][oO]) || ${OPSYS} == "Interix"
BUILDLINK_TRANSFORM.ncurses+= -e "s|/curses\.h|/ncurses.h|g"
BUILDLINK_TRANSFORM+= l:ncurses:curses
. endif