diff options
author | jlam <jlam@pkgsrc.org> | 2004-11-15 14:56:36 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-11-15 14:56:36 +0000 |
commit | 1085bc0ee080fc8732a5e324721612d89c846981 (patch) | |
tree | f45be3a3dd24df5bbf4145c2071de1827909533a | |
parent | d1383b985f2193a827763dc6ab4b452b26e3be06 (diff) | |
download | pkgsrc-1085bc0ee080fc8732a5e324721612d89c846981.tar.gz |
Add a new variable BROKEN_READLINE_DETECTION which should be set to
yes/no by a package Makefile, depending on whether the configure
process properly detects the additional libraries needed to link
against -lreadline (typically, you need either "-lreadline -ltermcap",
or "-lreadline -lcurses" to properly link against -lreadline). If this
variable is set to "yes", then we automatically expand "-lreadline" into
"-lreadline -l<termcap functions library>". BROKEN_READLINE_DETECTION
defaults to "no".
Set BROKEN_READLINE_DETECTION to "yes" in security/heimdal and remove
the custom logic that did the same work.
-rw-r--r-- | devel/readline/buildlink3.mk | 19 | ||||
-rw-r--r-- | security/heimdal/Makefile | 14 |
2 files changed, 22 insertions, 11 deletions
diff --git a/devel/readline/buildlink3.mk b/devel/readline/buildlink3.mk index dbb130a6b90..d470c3e7469 100644 --- a/devel/readline/buildlink3.mk +++ b/devel/readline/buildlink3.mk @@ -1,8 +1,10 @@ -# $NetBSD: buildlink3.mk,v 1.19 2004/11/14 06:16:49 jlam Exp $ +# $NetBSD: buildlink3.mk,v 1.20 2004/11/15 14:56:36 jlam Exp $ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ READLINE_BUILDLINK3_MK:= ${READLINE_BUILDLINK3_MK}+ +.include "../../mk/bsd.prefs.mk" + .if !empty(BUILDLINK_DEPTH:M+) BUILDLINK_DEPENDS+= readline .endif @@ -22,6 +24,21 @@ BUILDLINK_TRANSFORM.readline= \ -e "s|include/history\.h|include/readline/history.h|g" \ -e "s|include/readline\.h|include/readline/readline.h|g" +# Many GNU configure scripts don't check for the correct termcap library +# when testing for -lreadline. If BROKEN_READLINE_DETECTION is set to +# "yes", then automatically add the right one. +# +BROKEN_READLINE_DETECTION?= no +. if !empty(BROKEN_READLINE_DETECTION:M[yY][eE][sS]) +BUILDLINK_RL_TERMLIB.Linux= curses +BUILDLINK_RL_TERMLIB.*= termcap +. if defined(BUILDLINK_RL_TERMLIB.${OPSYS}) +BUILDLINK_RL_TERMLIB?= ${BUILDLINK_RL_TERMLIB.${OPSYS}} +. else +BUILDLINK_RL_TERMLIB?= ${BUILDLINK_RL_TERMLIB.*} +. endif +BUILDLINK_TRANSFORM+= l:readline:readline:${BUILDLINK_RL_TERMLIB} +. endif .endif # READLINE_BUILDLINK3_MK BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} diff --git a/security/heimdal/Makefile b/security/heimdal/Makefile index ae417a78e25..135199c0784 100644 --- a/security/heimdal/Makefile +++ b/security/heimdal/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.26 2004/11/09 19:48:52 jlam Exp $ +# $NetBSD: Makefile,v 1.27 2004/11/15 14:56:36 jlam Exp $ DISTNAME= heimdal-0.6.3 PKGREVISION= 1 @@ -30,18 +30,12 @@ CONFIGURE_ARGS+= --without-krb4 .include "../../mk/bsd.prefs.mk" # Heimdal's configure script expects to find the readline.h header as -# <readline.h>. Also, the configure script checks for some libraries -# in the wrong order, since -lreadline also needs either -ltermcap, -# -lcurses, -lncurses in the link command to resolve all symbols used -# in the readline library. +# <readline.h>. # +CONFIGURE_ARGS+= --with-readline=${BUILDLINK_PREFIX.readline} BUILDLINK_INCDIRS.readline= include/readline -BUILDLINK_TRANSFORM+= l:readline:readline:${READLINE_TERMLIB} +BROKEN_READLINE_DETECTION= yes .include "../../devel/readline/buildlink3.mk" -CONFIGURE_ARGS+= --with-readline=${BUILDLINK_PREFIX.readline} -OPSYSVARS+= READLINE_TERMLIB -READLINE_TERMLIB.Linux= curses -READLINE_TERMLIB.*= termcap CONFIGURE_ARGS+= --with-openssl=${SSLBASE} .include "../../security/openssl/buildlink3.mk" |