pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk With the SORT=gsort hack for Interix, all hell brea...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/eaa6fc023953
branches:  trunk
changeset: 491713:eaa6fc023953
user:      tv <tv%pkgsrc.org@localhost>
date:      Mon Mar 28 15:04:07 2005 +0000

description:
With the SORT=gsort hack for Interix, all hell breaks loose on pkg_add
because pkginstall encodes it into its scripts.  sigh.

Hack around this.  For bulk builds on Interix only, use gsort for "tflat";
use the system-supplied sort for the rest of the build.

diffstat:

 mk/bulk/bsd.bulk-pkg.mk |  15 +++++++++++----
 mk/platform/Interix.mk  |   5 +----
 2 files changed, 12 insertions(+), 8 deletions(-)

diffs (61 lines):

diff -r c4245c7898c6 -r eaa6fc023953 mk/bulk/bsd.bulk-pkg.mk
--- a/mk/bulk/bsd.bulk-pkg.mk   Mon Mar 28 14:57:36 2005 +0000
+++ b/mk/bulk/bsd.bulk-pkg.mk   Mon Mar 28 15:04:07 2005 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.bulk-pkg.mk,v 1.77 2005/03/24 16:47:34 tv Exp $
+#      $NetBSD: bsd.bulk-pkg.mk,v 1.78 2005/03/28 15:04:07 tv Exp $
 
 #
 # Copyright (c) 1999, 2000 Hubert Feyrer <hubertf%NetBSD.org@localhost>
@@ -45,6 +45,13 @@
 LS?=   ls
 WC?=   wc
 
+# A sort(1) capable of very long lines is needed for full builds in "tflat".
+# Some platforms (namely, Interix) may not provide one, so override here.
+.if ${OPSYS} == "Interix"
+_SORT=                 ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}sort
+.endif
+_SORT?=                        ${SORT}
+
 # This variable is set to 'yes' by the pkgsrc/mk/bulk/build script.  It enables
 # the use of several cache files (DEPENDSTREEFILE, DEPENDSFILE, SUPPORTSFILE,
 # and INDEXFILE) for speeding up the processing of dependencies.  If we're not
@@ -184,15 +191,15 @@
                }} END{ \
                for(pkg in pkgs) {if( pkg in listed ) {} else{ print pkg " " pkg;}} \
                }' \
-               ${BULK_DBFILE} | ${SORT} -u > ${DEPENDSTREEFILE}
+               ${BULK_DBFILE} | ${_SORT} -u > ${DEPENDSTREEFILE}
        @${ECHO_MSG} "BULK> Extracting package name <=> package directory cross reference file"
        ${AWK} '/^index/ {print $$2 " " $$3 " "}' ${BULK_DBFILE} > ${INDEXFILE}
 .endif
        @${ECHO_MSG} "BULK> Sorting build order."
        ${TSORT} ${DEPENDSTREEFILE} > ${ORDERFILE}
        @${ECHO_MSG} "BULK> Generating up and down dependency files."
-       ${SETENV} SORT=${SORT:Q} ${AWK} -f ${PKGSRCDIR}/mk/bulk/tflat up ${DEPENDSTREEFILE} > ${SUPPORTSFILE}
-       ${SETENV} SORT=${SORT:Q} ${AWK} -f ${PKGSRCDIR}/mk/bulk/tflat down ${DEPENDSTREEFILE} > ${DEPENDSFILE}
+       ${SETENV} SORT=${_SORT:Q} ${AWK} -f ${PKGSRCDIR}/mk/bulk/tflat up ${DEPENDSTREEFILE} > ${SUPPORTSFILE}
+       ${SETENV} SORT=${_SORT:Q} ${AWK} -f ${PKGSRCDIR}/mk/bulk/tflat down ${DEPENDSTREEFILE} > ${DEPENDSFILE}
 
 # remove the bulk cache files
 clean-bulk-cache:
diff -r c4245c7898c6 -r eaa6fc023953 mk/platform/Interix.mk
--- a/mk/platform/Interix.mk    Mon Mar 28 14:57:36 2005 +0000
+++ b/mk/platform/Interix.mk    Mon Mar 28 15:04:07 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Interix.mk,v 1.29 2005/03/24 16:21:48 tv Exp $
+# $NetBSD: Interix.mk,v 1.30 2005/03/28 15:04:07 tv Exp $
 #
 # Variable definitions for the Interix operating system.
 
@@ -47,9 +47,6 @@
 .if exists(${LOCALBASE}/bin/gtar)
 GTAR?=         ${LOCALBASE}/bin/gtar
 .endif
-.if exists(${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}sort)
-SORT?=         ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}sort
-.endif
 
 AWK?=          /usr/contrib/bin/gawk
 BASENAME?=     /bin/basename



Home | Main Index | Thread Index | Old Index