pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc Always create a ${TOOLS_DIR}/bin/rpcgen to wrap the re...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/207df4245c3c
branches:  trunk
changeset: 485690:207df4245c3c
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Sat Dec 18 19:24:26 2004 +0000

description:
Always create a ${TOOLS_DIR}/bin/rpcgen to wrap the real rpcgen.
The wrapper will correctly set the CPP environment variable to a
stat((2)able path to a C preprocessor, then rely on the PATH to
find and invoke the real rpcgen.

Remove NO_EXPORT_CPP in package Makefiles where it was used just to
avoid problems with rpcgen.  The build system now just does the right
thing automatically without needing package-specific knowledge.

This fixes PR pkg/27272.

diffstat:

 ham/hamlib/Makefile      |   3 +--
 mail/drac/Makefile       |   3 +--
 mk/tools.mk              |  23 ++++++++++++++++++++++-
 net/tcl-scotty/Makefile  |   3 +--
 security/cfs/Makefile    |   3 +--
 security/dsniff/Makefile |   3 +--
 security/nfsbug/Makefile |   3 +--
 7 files changed, 28 insertions(+), 13 deletions(-)

diffs (139 lines):

diff -r 9bacb28700ad -r 207df4245c3c ham/hamlib/Makefile
--- a/ham/hamlib/Makefile       Sat Dec 18 19:05:54 2004 +0000
+++ b/ham/hamlib/Makefile       Sat Dec 18 19:24:26 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2004/11/23 11:21:07 wulf Exp $
+# $NetBSD: Makefile,v 1.12 2004/12/18 19:24:26 jlam Exp $
 #
 
 DISTNAME=      hamlib-1.2.3
@@ -14,7 +14,6 @@
 USE_GNU_TOOLS+=        make
 GNU_CONFIGURE= yes
 USE_LIBTOOL=   yes
-NO_EXPORT_CPP= yes
 
 CONFIGURE_ARGS+=--without-tcl-binding \
                --without-perl-binding
diff -r 9bacb28700ad -r 207df4245c3c mail/drac/Makefile
--- a/mail/drac/Makefile        Sat Dec 18 19:05:54 2004 +0000
+++ b/mail/drac/Makefile        Sat Dec 18 19:24:26 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2004/04/25 01:05:18 wiz Exp $
+# $NetBSD: Makefile,v 1.13 2004/12/18 19:24:26 jlam Exp $
 #
 
 DISTNAME=      drac
@@ -14,7 +14,6 @@
 WRKSRC=                ${WRKDIR}
 DIST_SUBDIR=   ${PKGNAME_NOREV}
 USE_BUILDLINK3=        YES
-NO_EXPORT_CPP= YES
 
 MAKE_ENV+=     MKDIR="${MKDIR}"
 MAKE_ENV+=     INSTALL="${INSTALL}"
diff -r 9bacb28700ad -r 207df4245c3c mk/tools.mk
--- a/mk/tools.mk       Sat Dec 18 19:05:54 2004 +0000
+++ b/mk/tools.mk       Sat Dec 18 19:24:26 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: tools.mk,v 1.46 2004/11/02 22:24:35 wiz Exp $
+# $NetBSD: tools.mk,v 1.47 2004/12/18 19:24:26 jlam Exp $
 #
 # This Makefile creates a ${TOOLS_DIR} directory and populates the bin
 # subdir with tools that hide the ones outside of ${TOOLS_DIR}.
@@ -391,6 +391,27 @@
        fi
 .endif
 
+# Always create a ${TOOLS_DIR}/bin/rpcgen to wrap the real rpcgen.
+# The wrapper will correctly set the CPP environment variable to a
+# stat((2)able path to a C preprocessor, then rely on the PATH to
+# find and invoke the real rpcgen.
+#
+override-tools: ${TOOLS_DIR}/bin/rpcgen
+.if !target(${TOOLS_DIR}/bin/rpcgen)
+${TOOLS_DIR}/bin/rpcgen:
+       ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
+       ${_PKG_SILENT}${_PKG_DEBUG}                                     \
+       ( ${ECHO} '#!${TOOLS_SHELL}';                                   \
+         ${ECHO} 'wrapperlog="$${TOOLS_WRAPPER_LOG-${_TOOLS_WRAP_LOG}}"'; \
+         ${ECHO} 'CPP="${WRAPPER_BINDIR}/cpp"; export CPP';            \
+         PATH=`${ECHO} "${PATH}" | ${SED} -e "s,.*${.TARGET:H}:,,"`;   \
+         ${ECHO} "PATH=\"$$PATH\"; export PATH";                       \
+         ${ECHO} '${ECHO} "<.> rpcgen $$*" >> $$wrapperlog';           \
+         ${ECHO} 'rpcgen "$$@"';                                       \
+       ) > ${.TARGET}
+       ${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${.TARGET}
+.endif
+
 .if defined(USE_TBL) && !empty(USE_TBL:M[yY][eE][sS])
 .  if exists(/usr/bin/tbl)
 _TOOLS_PROGNAME.tbl=   /usr/bin/tbl
diff -r 9bacb28700ad -r 207df4245c3c net/tcl-scotty/Makefile
--- a/net/tcl-scotty/Makefile   Sat Dec 18 19:05:54 2004 +0000
+++ b/net/tcl-scotty/Makefile   Sat Dec 18 19:24:26 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 2004/10/03 00:18:00 tv Exp $
+# $NetBSD: Makefile,v 1.17 2004/12/18 19:24:26 jlam Exp $
 #
 
 DISTNAME=      scotty-${DIST_VERS}
@@ -26,7 +26,6 @@
 CONFIGURE_ENV+=        TARGET=scotty
 
 USE_LIBTOOL=   yes
-NO_EXPORT_CPP= yes
 
 .include "../../lang/tcl/buildlink3.mk"
 
diff -r 9bacb28700ad -r 207df4245c3c security/cfs/Makefile
--- a/security/cfs/Makefile     Sat Dec 18 19:05:54 2004 +0000
+++ b/security/cfs/Makefile     Sat Dec 18 19:24:26 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.20 2004/12/03 15:15:07 wiz Exp $
+# $NetBSD: Makefile,v 1.21 2004/12/18 19:24:26 jlam Exp $
 
 DISTNAME=              cfs-1.4.1
 PKGREVISION=           3
@@ -11,7 +11,6 @@
 
 USE_BUILDLINK3=                YES
 USE_PKGINSTALL=                YES
-NO_EXPORT_CPP=         YES
 
 CRYPTO=                        # defined
 
diff -r 9bacb28700ad -r 207df4245c3c security/dsniff/Makefile
--- a/security/dsniff/Makefile  Sat Dec 18 19:05:54 2004 +0000
+++ b/security/dsniff/Makefile  Sat Dec 18 19:24:26 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.20 2004/10/03 00:18:08 tv Exp $
+# $NetBSD: Makefile,v 1.21 2004/12/18 19:24:26 jlam Exp $
 # $OpenBSD: Makefile,v 1.13 2000/06/19 18:38:55 dugsong Exp $
 
 DISTNAME=      dsniff-2.3
@@ -13,7 +13,6 @@
 USE_BUILDLINK3=        yes
 GNU_CONFIGURE= yes
 USE_X11=       yes
-NO_EXPORT_CPP= yes
 
 .include "../../net/libpcap/buildlink3.mk"
 .include "../../devel/libnet/buildlink3.mk"
diff -r 9bacb28700ad -r 207df4245c3c security/nfsbug/Makefile
--- a/security/nfsbug/Makefile  Sat Dec 18 19:05:54 2004 +0000
+++ b/security/nfsbug/Makefile  Sat Dec 18 19:24:26 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2004/10/01 10:37:33 grant Exp $
+# $NetBSD: Makefile,v 1.12 2004/12/18 19:24:26 jlam Exp $
 
 DISTNAME=      nfsshell-1.0
 CATEGORIES=    net security
@@ -13,7 +13,6 @@
 WRKSRC=                ${WRKDIR}/nfsbug
 
 USE_BUILDLINK3=        yes
-NO_EXPORT_CPP= yes     # needed since we use rpcgen
 
 # Only works on 1.5B or greater on most platforms but will work on any x86
 # since struct pmap didn't get exposed through vm.h there.



Home | Main Index | Thread Index | Old Index