summaryrefslogtreecommitdiff
path: root/devel/rpc2
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-05-31 22:52:17 +0000
committerjlam <jlam@pkgsrc.org>2001-05-31 22:52:17 +0000
commitdf38dc73b141337c84b7a2567a0f94877c7741f8 (patch)
treea9bb5dd2102dbbbe9cd5392e589ae410caa6f84e /devel/rpc2
parent3d1ca8b38d3af41dc1385a29aeee92553943e011 (diff)
downloadpkgsrc-df38dc73b141337c84b7a2567a0f94877c7741f8.tar.gz
* 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.
Diffstat (limited to 'devel/rpc2')
-rw-r--r--devel/rpc2/Makefile17
-rw-r--r--devel/rpc2/buildlink.mk64
-rw-r--r--devel/rpc2/distinfo3
-rw-r--r--devel/rpc2/patches/patch-aa16
4 files changed, 95 insertions, 5 deletions
diff --git a/devel/rpc2/Makefile b/devel/rpc2/Makefile
index 2b152da9369..4fb6e4f9dfa 100644
--- a/devel/rpc2/Makefile
+++ b/devel/rpc2/Makefile
@@ -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"
diff --git a/devel/rpc2/buildlink.mk b/devel/rpc2/buildlink.mk
new file mode 100644
index 00000000000..d16ed445b70
--- /dev/null
+++ b/devel/rpc2/buildlink.mk
@@ -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
diff --git a/devel/rpc2/distinfo b/devel/rpc2/distinfo
index 83e059a9459..6b6720e1aa9 100644
--- a/devel/rpc2/distinfo
+++ b/devel/rpc2/distinfo
@@ -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
diff --git a/devel/rpc2/patches/patch-aa b/devel/rpc2/patches/patch-aa
new file mode 100644
index 00000000000..6fea31c838e
--- /dev/null
+++ b/devel/rpc2/patches/patch-aa
@@ -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
+ }