summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2008-02-27 21:32:45 +0000
committerjlam <jlam@pkgsrc.org>2008-02-27 21:32:45 +0000
commitb97840c07003c71796fed8191df6acd7430248ad (patch)
tree4df64a26e77e3cfa706e239c1981ac8787dad444
parentf52a62d5ad6a27854cbc7f0b3c1bd8f2504de0ac (diff)
downloadpkgsrc-b97840c07003c71796fed8191df6acd7430248ad.tar.gz
If FOO is empty, then ${FOO:S/^/-l/} has a value of "-l". This is not
what we want. Instead, use another pattern to strip away lone "-l" in BUILDLINK_LDADD.*.
-rw-r--r--devel/ncurses/buildlink3.mk5
-rw-r--r--devel/pdcurses/buildlink3.mk7
-rw-r--r--mk/curses.buildlink3.mk4
-rw-r--r--mk/termlib.buildlink3.mk4
4 files changed, 11 insertions, 9 deletions
diff --git a/devel/ncurses/buildlink3.mk b/devel/ncurses/buildlink3.mk
index 0b80496084f..ba66ad0c8c6 100644
--- a/devel/ncurses/buildlink3.mk
+++ b/devel/ncurses/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.31 2008/02/27 06:10:25 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.32 2008/02/27 21:32:45 jlam Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
NCURSES_BUILDLINK3_MK:= ${NCURSES_BUILDLINK3_MK}+
@@ -15,8 +15,9 @@ BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}ncurses
BUILDLINK_API_DEPENDS.ncurses+= ncurses>=5.3nb1
BUILDLINK_ABI_DEPENDS.ncurses+= ncurses>=5.4nb1
BUILDLINK_PKGSRCDIR.ncurses?= ../../devel/ncurses
+
BUILDLINK_LIBNAME.ncurses= ncurses
-BUILDLINK_LDADD.ncurses?= ${BUILDLINK_LIBNAME.ncurses:S/^/-l/}
+BUILDLINK_LDADD.ncurses?= ${BUILDLINK_LIBNAME.ncurses:S/^/-l/:S/^-l$//}
# Many packages expect the ncurses headers and libraries to be usable as
# <curses.h> and -lcurses.
diff --git a/devel/pdcurses/buildlink3.mk b/devel/pdcurses/buildlink3.mk
index 177d05bc5e5..42042b44d5b 100644
--- a/devel/pdcurses/buildlink3.mk
+++ b/devel/pdcurses/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.4 2008/02/27 06:10:25 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.5 2008/02/27 21:32:45 jlam Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
PDCURSES_BUILDLINK3_MK:= ${PDCURSES_BUILDLINK3_MK}+
@@ -14,8 +14,9 @@ BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}pdcurses
.if !empty(PDCURSES_BUILDLINK3_MK:M+)
BUILDLINK_API_DEPENDS.pdcurses+= pdcurses>=3.3
BUILDLINK_PKGSRCDIR.pdcurses?= ../../devel/pdcurses
-BUILDLINK_LIBNAME.pdcurses= XCurses
-BUILDLINK_LDADD.pdcurses?= ${BUILDLINK_LIBNAME.pdcurses:S/^/-l/}
+
+BUILDLINK_LIBNAME.pdcurses= XCurses
+BUILDLINK_LDADD.pdcurses?= ${BUILDLINK_LIBNAME.pdcurses:S/^/-l/:S/^-l$//}
# _PKG_USE_CURSES is defined by curses.buildlink3.mk to indicate that
# the headers and libraries should be usable as <curses.h> and -lcurses.
diff --git a/mk/curses.buildlink3.mk b/mk/curses.buildlink3.mk
index 179262fc1d6..8db09bdb590 100644
--- a/mk/curses.buildlink3.mk
+++ b/mk/curses.buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: curses.buildlink3.mk,v 1.10 2008/02/27 15:26:34 jlam Exp $
+# $NetBSD: curses.buildlink3.mk,v 1.11 2008/02/27 21:32:45 jlam Exp $
#
# This Makefile fragment is meant to be included by packages that require
# any curses implementation instead of one particular one. The available
@@ -87,7 +87,7 @@ PKG_FAIL_REASON= \
BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ncurses}
BUILDLINK_PACKAGES+= curses
BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}curses
-BUILDLINK_LDADD.curses?= ${BUILDLINK_LIBNAME.curses:S/^/-l/}
+BUILDLINK_LDADD.curses?= ${BUILDLINK_LIBNAME.curses:S/^/-l/:S/^-l$//}
BUILDLINK_BUILTIN_MK.curses= ../../mk/curses.builtin.mk
.elif ${CURSES_TYPE} == "ncurses"
USE_NCURSES= yes
diff --git a/mk/termlib.buildlink3.mk b/mk/termlib.buildlink3.mk
index 0c97ead5bbc..98dc7549652 100644
--- a/mk/termlib.buildlink3.mk
+++ b/mk/termlib.buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: termlib.buildlink3.mk,v 1.3 2008/02/27 17:36:34 jlam Exp $
+# $NetBSD: termlib.buildlink3.mk,v 1.4 2008/02/27 21:32:45 jlam Exp $
#
# This Makefile fragment is meant to be included by packages that require
# a basic termlib implementation.
@@ -40,7 +40,7 @@ BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ntermlib}
BUILDLINK_PACKAGES+= termlib
BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}termlib
BUILDLINK_LIBNAME.termlib?= ${BUILTIN_LIBNAME.termlib}
-BUILDLINK_LDADD.termlib?= ${BUILDLINK_LIBNAME.termlib:S/^/-l/}
+BUILDLINK_LDADD.termlib?= ${BUILDLINK_LIBNAME.termlib:S/^/-l/:S/^-l$//}
BUILDLINK_BUILTIN_MK.termlib= ../../mk/termlib.builtin.mk
.elif ${TERMLIB_TYPE} == "curses"
. include "../../mk/curses.buildlink3.mk"