pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/bootstrap Allow overriding of the default FETCH_CMD wi...
details: https://anonhg.NetBSD.org/pkgsrc/rev/872c5764311c
branches: trunk
changeset: 511180:872c5764311c
user: joerg <joerg%pkgsrc.org@localhost>
date: Mon Apr 10 18:29:24 2006 +0000
description:
Allow overriding of the default FETCH_CMD with --fetch-cmd
for both bootstrap and mkbinarykit. When this is done or the
platform fragment of bootstrap specifies an explicit fetch_cmd,
tnftp is not built.
Use /usr/bin/ftp by default on DragonFly 1.4 and later.
diffstat:
bootstrap/bootstrap | 40 +++++++++++++++++++++++++++-------------
bootstrap/mkbinarykit | 9 ++++++---
2 files changed, 33 insertions(+), 16 deletions(-)
diffs (125 lines):
diff -r ddddc9ee6da2 -r 872c5764311c bootstrap/bootstrap
--- a/bootstrap/bootstrap Mon Apr 10 18:24:34 2006 +0000
+++ b/bootstrap/bootstrap Mon Apr 10 18:29:24 2006 +0000
@@ -1,6 +1,6 @@
#! /bin/sh
-# $NetBSD: bootstrap,v 1.48 2006/04/10 13:29:38 schwarz Exp $
+# $NetBSD: bootstrap,v 1.49 2006/04/10 18:29:24 joerg Exp $
#
#
# Copyright (c) 2001-2002 Alistair G. Crooks. All rights reserved.
@@ -53,6 +53,7 @@
[ --pkgdbdir <pkgdbdir> ]
[ --sysconfdir <sysconfdir> ]
[ --varbase <varbase> ]
+ [ --fetch-cmd <ftp command> ]
[ --ignore-case-check ]
[ --ignore-user-check ]
[ --preserve-path ]
@@ -259,6 +260,8 @@
--sysconfdir) sysconfdir="$2"; shift ;;
--varbase=*) varbase=`get_optarg "$1"` ;;
--varbase) varbase="$2"; shift ;;
+ --fetch-cmd=*) fetch_cmd=`get_optarg "$1"` ;;
+ --fetch-cmd) fetch_cmd="$a"; shift ;;
--ignore-case-check) ignorecasecheck=yes ;;
--ignore-user-check) ignoreusercheck=yes ;;
--preserve-path) preserve_path=yes ;;
@@ -313,6 +316,13 @@
check_prog tarprog tar
check_prog mtreeprog mtree
machine_arch=`uname -p`
+ case `uname -r` in
+ 1.0* | 1.1 | 1.1[^0-9]* | 1.2.* | 1.3.*)
+ ;;
+ *)
+ [ -z "$fetch_cmd" ] && fetch_cmd="/usr/bin/ftp"
+ ;;
+ esac
;;
FreeBSD)
root_group=wheel
@@ -699,20 +709,24 @@
run_cmd "$shprog $wrkdir/install-sh -c -o $user -g $group -m 755 $wrkdir/bmake/$opsys/bmake $prefix/bin/bmake"
#run_cmd "$shprog $wrkdir/install-sh -c -o $user -g $group -m 644 $wrkdir/bmake/$opsys/bmake.1 $prefix/man/man1/bmake.1"
-# bootstrap tnftp
-case "$DEBIAN" in
-yes)
- LIBS="-lncurses"
- ;;
-esac
-echo_msg "Installing tnftp"
-copy_src ../net/tnftp/files tnftp
-run_cmd "(cd $wrkdir/tnftp; env $BSTRAP_ENV $tnftpxenv $shprog ./configure --prefix=$prefix --sysconfdir=$sysconfdir && make && (cd src && make install))"
-pkg_install_args="$pkg_install_args --with-ftp=$prefix/bin/ftp"
+if [ -z "$fetch_cmd" ]; then
+ # bootstrap tnftp
+ fetch_cmd="$prefix/bin/ftp"
+ case "$DEBIAN" in
+ yes)
+ LIBS="-lncurses"
+ ;;
+ esac
+ echo_msg "Installing tnftp"
+ copy_src ../net/tnftp/files tnftp
+ run_cmd "(cd $wrkdir/tnftp; env $BSTRAP_ENV $shprog ./configure --prefix=$prefix --sysconfdir=$sysconfdir && make && (cd src && make install))"
+fi
-FETCH_CMD=$prefix/bin/ftp
+pkg_install_args="$pkg_install_args --with-ftp=$fetch_cmd"
+
+FETCH_CMD="$fetch_cmd"
export FETCH_CMD
-echo "FETCH_CMD=$prefix/bin/ftp" >> ${MKCONF_EXAMPLE}
+echo "FETCH_CMD=$fetch_cmd" >> ${MKCONF_EXAMPLE}
# bootstrap digest
echo_msg "Installing digest"
diff -r ddddc9ee6da2 -r 872c5764311c bootstrap/mkbinarykit
--- a/bootstrap/mkbinarykit Mon Apr 10 18:24:34 2006 +0000
+++ b/bootstrap/mkbinarykit Mon Apr 10 18:29:24 2006 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
-# $NetBSD: mkbinarykit,v 1.13 2006/04/09 13:39:52 joerg Exp $
+# $NetBSD: mkbinarykit,v 1.14 2006/04/10 18:29:24 joerg Exp $
#
# Make a binary bootstrap kit and place it in targetdir (or current
# working directory if not specified). The mk.conf.example file is
@@ -11,7 +11,8 @@
usage="Usage: $0 "'
[ --force ] [ --targetdir=<tar target dir> ] [ --mkconf=<target> ]
- [ --no-build ] [ --workdir=<work dir> ] [ bootstrap script arguments ]'
+ [ --no-build ] [ --workdir=<work dir> ] [ bootstrap script arguments ]
+ [ --fetch-cmd=<ftp command> ]'
opsys=`uname -s`
osrev=`uname -r`
@@ -26,6 +27,7 @@
ignoreusercheck=no
force=no
build=yes
+fetch_cmd=""
targetdir=`pwd`
wrkdir=work # default: relative to pkgsrc/bootstrap
@@ -78,6 +80,7 @@
--no-build) build=no ;;
--targetdir=*) targetdir=`echo $1 | $sedprog -e 's|--targetdir=||'` ;;
--prefix=*) prefix=`echo $1 | $sedprog -e 's|--prefix=||'` ;;
+ --fetch-cmd=*) fetch_cmd="$1" ;;
--mkconf=*) mkfile=`echo $1 | $sedprog -e 's|--mkconf=||'` ;;
--pkgdbdir=*) pkgdbdir=`echo $1 | $sedprog -e 's|--pkgdbdir=||'` ;;
--ignore-case-check) ignorecasecheck=yes ;;
@@ -103,7 +106,7 @@
if [ "$build" != "no" ]; then
# Bootstrap
- bootstrap_flags="--prefix=$prefix --pkgdbdir=$pkgdbdir --workdir=$wrkdir"
+ bootstrap_flags="--prefix=$prefix --pkgdbdir=$pkgdbdir --workdir=$wrkdir $fetch_cmd"
if [ "$ignorecasecheck" = "yes" ]; then
bootstrap_flags="$bootstrap_flags --ignore-case-check"
fi
Home |
Main Index |
Thread Index |
Old Index