pkgsrc/devel/readline/buildlink3.mk
jlam 1085bc0ee0 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.
2004-11-15 14:56:36 +00:00

44 lines
1.4 KiB
Makefile

# $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
BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nreadline}
BUILDLINK_PACKAGES+= readline
.if !empty(READLINE_BUILDLINK3_MK:M+)
BUILDLINK_DEPENDS.readline+= readline>=2.2
BUILDLINK_RECOMMENDED.readline+= readline>=5.0
BUILDLINK_PKGSRCDIR.readline?= ../../devel/readline
BUILDLINK_FILES.readline+= include/history.h
BUILDLINK_FILES.readline+= include/readline.h
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/+$//}