summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2006-04-10 18:29:24 +0000
committerjoerg <joerg@pkgsrc.org>2006-04-10 18:29:24 +0000
commitb14c4dc764eba069ad09e0d6147bfef861aeec35 (patch)
tree0f52e374f08db081679496817ac8e3ea6c66d695 /bootstrap
parentc556a67ae05894ba37cab462c16400bebaa2f2ac (diff)
downloadpkgsrc-b14c4dc764eba069ad09e0d6147bfef861aeec35.tar.gz
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 (limited to 'bootstrap')
-rwxr-xr-xbootstrap/bootstrap40
-rwxr-xr-xbootstrap/mkbinarykit9
2 files changed, 33 insertions, 16 deletions
diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap
index 1b482b9d68e..d552ac0c9f2 100755
--- a/bootstrap/bootstrap
+++ b/bootstrap/bootstrap
@@ -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 @@ usage="Usage: $0 "'
[ --pkgdbdir <pkgdbdir> ]
[ --sysconfdir <sysconfdir> ]
[ --varbase <varbase> ]
+ [ --fetch-cmd <ftp command> ]
[ --ignore-case-check ]
[ --ignore-user-check ]
[ --preserve-path ]
@@ -259,6 +260,8 @@ while [ $# -gt 0 ]; do
--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 @@ DragonFly)
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 "(cd $wrkdir/bmake && env CPPFLAGS='$CPPFLAGS -I../../libnbcompat' LDFLA
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
+
+pkg_install_args="$pkg_install_args --with-ftp=$fetch_cmd"
-FETCH_CMD=$prefix/bin/ftp
+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 --git a/bootstrap/mkbinarykit b/bootstrap/mkbinarykit
index 208706a36ac..54a69f89656 100755
--- a/bootstrap/mkbinarykit
+++ b/bootstrap/mkbinarykit
@@ -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 @@ ignorecasecheck=no
ignoreusercheck=no
force=no
build=yes
+fetch_cmd=""
targetdir=`pwd`
wrkdir=work # default: relative to pkgsrc/bootstrap
@@ -78,6 +80,7 @@ while [ $# -gt 0 ]; do
--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 @@ fi
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