pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk Reverse PATH order in many places: instead of appen...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4b5886fec0ce
branches:  trunk
changeset: 487220:4b5886fec0ce
user:      jmmv <jmmv%pkgsrc.org@localhost>
date:      Tue Jan 11 13:39:19 2005 +0000

description:
Reverse PATH order in many places: instead of appending ${LOCALBASE}/bin
and ${X11BASE}/bin to the current PATH, _prepend_ them.  This way we will
pick our own binaries in favour of the system ones, in the cases where
conflicts exist.  Also add a PREPEND_PATH for ${LOCALBASE}/bin.

This should fix several packages on non-NetBSD systems.  For example,
ispell-spanish under Linux comes to mind, as it was using the 'ispell'
binary from /usr/bin instead of the one in /usr/pkg/bin to get its
configuration information.

Ideally, buildlink could handle this as it does for libraries, hidding
unexpected binaries ;-)

No objections in tech-pkg@ (or packages@; I don't remember the exact
list where I asked).

diffstat:

 mk/bsd.pkg.mk |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (45 lines):

diff -r 3c0716d06098 -r 4b5886fec0ce mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk     Tue Jan 11 13:38:45 2005 +0000
+++ b/mk/bsd.pkg.mk     Tue Jan 11 13:39:19 2005 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.pkg.mk,v 1.1554 2005/01/10 18:34:48 jlam Exp $
+#      $NetBSD: bsd.pkg.mk,v 1.1555 2005/01/11 13:39:19 jmmv Exp $
 #
 # This file is in the public domain.
 #
@@ -164,6 +164,8 @@
 PKG_FAIL_REASON+=      "PLIST_TYPE must be \`\`static'' for \`\`overwrite'' packages."
 .endif
 
+PREPEND_PATH+=         ${LOCALBASE}/bin
+
 .if defined(USE_IMAKE)
 PREPEND_PATH+=         ${X11BASE}/bin
 USE_X11BASE?=          implied
@@ -468,7 +470,7 @@
 
 MAKE_FLAGS?=
 MAKEFILE?=             Makefile
-MAKE_ENV+=             PATH=${PATH}:${LOCALBASE}/bin:${X11BASE}/bin
+MAKE_ENV+=             PATH=${LOCALBASE}/bin:${X11BASE}/bin:${PATH}
 MAKE_ENV+=             PREFIX=${PREFIX} LOCALBASE=${LOCALBASE}
 MAKE_ENV+=             X11BASE=${X11BASE} CFLAGS="${CFLAGS}"
 MAKE_ENV+=             CPPFLAGS="${CPPFLAGS}" FFLAGS="${FFLAGS}"
@@ -1109,7 +1111,7 @@
 
 CONFIGURE_DIRS?=       ${WRKSRC}
 CONFIGURE_SCRIPT?=     ./configure
-CONFIGURE_ENV+=                PATH=${PATH}:${LOCALBASE}/bin:${X11BASE}/bin
+CONFIGURE_ENV+=                PATH=${LOCALBASE}/bin:${X11BASE}/bin:${PATH}
 
 .if defined(GNU_CONFIGURE)
 #
@@ -1186,7 +1188,7 @@
 
 # Passed to most of script invocations
 SCRIPTS_ENV+= CURDIR=${.CURDIR} DISTDIR=${DISTDIR}                     \
-       PATH=${PATH}:${LOCALBASE}/bin:${X11BASE}/bin                    \
+       PATH=${LOCALBASE}/bin:${X11BASE}/bin:${PATH}                    \
        WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR}          \
        SCRIPTDIR=${SCRIPTDIR} FILESDIR=${FILESDIR}                     \
        _PKGSRCDIR=${_PKGSRCDIR} PKGSRCDIR=${PKGSRCDIR} DEPENDS="${DEPENDS}" \



Home | Main Index | Thread Index | Old Index