* Add buildlink.mk file to link appropriate libraries and headers into

${BUILDLINK_INCDIR} and ${BUILDLINK_LIBDIR}, to be used by other packages.

* Use buildlink.mk files to get dependencies and to prevent unintended
  linking against installed libraries or finding installed headers except
  for those that are explicitly linked into ${BUILDLINK_INCDIR} and
  ${BUILDLINK_LIBDIR}.

* Don't prototype history functions directly, but use
  <readline/history.h> to pull them in.  This allows us to use libedit's
  readline emulation.

* Change from USE_PERL5 to a build dependency on perl -- it's only used to
  generate a header file during the build.
This commit is contained in:
jlam 2001-05-31 22:52:17 +00:00
parent 3d1ca8b38d
commit df38dc73b1
4 changed files with 95 additions and 5 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.5 2001/04/27 19:02:59 phil Exp $
# $NetBSD: Makefile,v 1.6 2001/05/31 22:52:17 jlam Exp $
#
DISTNAME= rpc2-1.10
@ -10,14 +10,23 @@ MAINTAINER= phil@cs.wwu.edu
HOMEPAGE= http://www.coda.cs.cmu.edu/
COMMENT= CMU (Coda) remote procedure call package
DEPENDS+= lwp>=1.6:../../devel/lwp
DEPENDS+= readline>=4.0:../../devel/readline
BUILD_DEPENDS+= perl>=${PERL5_REQD}:../../lang/perl5
GNU_CONFIGURE= YES
USE_LIBTOOL= YES
USE_GMAKE= YES
USE_PERL5= YES
LTCONFIG_OVERRIDE= ${WRKSRC}/ltconfig
.include "../../devel/lwp/buildlink.mk"
.include "../../devel/readline/buildlink.mk"
CONFIGURE_ENV+= ac_cv_search_tgetent="-ltermcap"
CONFIGURE_ENV+= PERL=${PERL5}
CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}"
CPPFLAGS+= -I${BUILDLINK_INCDIR}
LDFLAGS+= -L${BUILDLINK_LIBDIR}
pre-configure: ${BUILDLINK_TARGETS}
.include "../../mk/bsd.pkg.mk"

64
devel/rpc2/buildlink.mk Normal file
View file

@ -0,0 +1,64 @@
# $NetBSD: buildlink.mk,v 1.1 2001/05/31 22:52:17 jlam Exp $
#
# This Makefile fragment is included by packages that use rpc2.
#
# To use this Makefile fragment, simply:
#
# (1) Optionally define RPC2_REQD to the version of rpc2 desired.
# (2) Include this Makefile fragment in the package Makefile,
# (3) Optionally define BUILDLINK_INCDIR and BUILDLINK_LIBDIR,
# (4) Add ${BUILDLINK_TARGETS} to the prerequisite targets for pre-configure,
# (5) Add ${BUILDLINK_INCDIR} to the front of the C preprocessor's header
# search path, and
# (6) Add ${BUILDLINK_LIBDIR} to the front of the linker's library search
# path.
.if !defined(RPC2_BUILDLINK_MK)
RPC2_BUILDLINK_MK= # defined
.include "../../devel/lwp/buildlink.mk"
RPC2_REQD?= 1.10
DEPENDS+= rpc2>=${RPC2_REQD}:../../devel/rpc2
RPC2_HEADERS= ${LOCALBASE}/include/rpc2/*
RPC2_LIBS= ${LOCALBASE}/lib/libfail.*
RPC2_LIBS+= ${LOCALBASE}/lib/librpc2.*
RPC2_LIBS+= ${LOCALBASE}/lib/libse.*
BUILDLINK_INCDIR?= ${WRKDIR}/include
BUILDLINK_LIBDIR?= ${WRKDIR}/lib
BUILDLINK_TARGETS+= link-rpc2-headers
BUILDLINK_TARGETS+= link-rpc2-libs
# This target links the headers into ${BUILDLINK_INCDIR}, which should
# be searched first by the C preprocessor.
#
link-rpc2-headers:
@${ECHO} "Linking rpc2 headers into ${BUILDLINK_INCDIR}."
@${MKDIR} ${BUILDLINK_INCDIR}/rpc2
@${RM} -f ${BUILDLINK_INCDIR}/rpc2/*
@for inc in ${RPC2_HEADERS}; do \
dest=${BUILDLINK_INCDIR}/rpc2/`${BASENAME} $${inc}`; \
if [ -f $${inc} ]; then \
${RM} -f $${dest}; \
${LN} -sf $${inc} $${dest}; \
fi; \
done
# This target links the libraries into ${BUILDLINK_LIBDIR}, which should
# be searched first by the linker.
#
link-rpc2-libs:
@${ECHO} "Linking rpc2 libraries into ${BUILDLINK_LIBDIR}."
@${MKDIR} ${BUILDLINK_LIBDIR}
@for lib in ${RPC2_LIBS}; do \
dest=${BUILDLINK_LIBDIR}/`${BASENAME} $${lib}`; \
if [ -f $${lib} ]; then \
${RM} -f $${dest}; \
${LN} -sf $${lib} $${dest}; \
fi; \
done
.endif # RPC2_BUILDLINK_MK

View file

@ -1,4 +1,5 @@
$NetBSD: distinfo,v 1.3 2001/04/27 19:02:59 phil Exp $
$NetBSD: distinfo,v 1.4 2001/05/31 22:52:17 jlam Exp $
SHA1 (rpc2-1.10.tar.gz) = 51872b9c03ef9838de768ffe693d282836e00448
Size (rpc2-1.10.tar.gz) = 377723 bytes
SHA1 (patch-aa) = 11de3e9740bc749f725347b2d6da85210c8091cd

View file

@ -0,0 +1,16 @@
$NetBSD: patch-aa,v 1.1 2001/05/31 22:52:17 jlam Exp $
--- fail/parser.c.orig Mon Jan 31 17:23:07 2000
+++ fail/parser.c Wed May 30 14:40:41 2001
@@ -30,10 +30,7 @@
#define READLINE_LIBRARY
#include <readline/readline.h>
-
-extern void using_history();
-extern void stifle_history(int);
-extern void add_history(char *);
+#include <readline/history.h>
#ifdef __cplusplus
}