pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc Add a new variable BROKEN_READLINE_DETECTION which sho...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a94bc7fcab26
branches:  trunk
changeset: 483587:a94bc7fcab26
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Mon Nov 15 14:56:36 2004 +0000

description:
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.

diffstat:

 devel/readline/buildlink3.mk |  19 ++++++++++++++++++-
 security/heimdal/Makefile    |  14 ++++----------
 2 files changed, 22 insertions(+), 11 deletions(-)

diffs (68 lines):

diff -r 18900a24f1cf -r a94bc7fcab26 devel/readline/buildlink3.mk
--- a/devel/readline/buildlink3.mk      Mon Nov 15 14:48:18 2004 +0000
+++ b/devel/readline/buildlink3.mk      Mon Nov 15 14:56:36 2004 +0000
@@ -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 @@
        -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 -r 18900a24f1cf -r a94bc7fcab26 security/heimdal/Makefile
--- a/security/heimdal/Makefile Mon Nov 15 14:48:18 2004 +0000
+++ b/security/heimdal/Makefile Mon Nov 15 14:56:36 2004 +0000
@@ -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 @@
 .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"



Home | Main Index | Thread Index | Old Index