freebsd-ports/sysutils/debootstrap/files/patch-debootstrap
William Grzybowski 05f0f17d3a sysutils/debootstrap: update to 1.0.61
- Add LICENSE (GPLv2)

PR:		193238
Submitted by:	maintainer
2014-09-15 16:36:17 +00:00

46 lines
1.3 KiB
Text

--- debootstrap.orig 2014-02-07 15:25:58 UTC
+++ debootstrap
@@ -13,7 +13,7 @@
if [ -x /debootstrap/debootstrap ]; then
DEBOOTSTRAP_DIR=/debootstrap
else
- DEBOOTSTRAP_DIR=/usr/share/debootstrap
+ DEBOOTSTRAP_DIR=%%DATADIR%%
fi
fi
@@ -397,13 +397,7 @@
###########################################################################
-if in_path dpkg && \
- dpkg --print-architecture >/dev/null 2>&1; then
- HOST_ARCH=`/usr/bin/dpkg --print-architecture`
-elif in_path udpkg && \
- udpkg --print-architecture >/dev/null 2>&1; then
- HOST_ARCH=`/usr/bin/udpkg --print-architecture`
-elif [ -e $DEBOOTSTRAP_DIR/arch ]; then
+if [ -e $DEBOOTSTRAP_DIR/arch ]; then
HOST_ARCH=`cat $DEBOOTSTRAP_DIR/arch`
fi
HOST_OS="$HOST_ARCH"
@@ -425,6 +419,11 @@
esac
fi
+if [ "$HOST_OS" = "freebsd" -a -z "$HOST_ARCH" ]; then
+ HOST_ARCH=kfreebsd-`/sbin/sysctl -n hw.machine_arch`
+ EXTRACTOR_OVERRIDE=ar
+fi
+
if [ -z "$ARCH" ]; then
ARCH=$HOST_ARCH
fi
@@ -621,7 +620,6 @@
if ! am_doing_phase second_stage; then
cp "$0" "$TARGET/debootstrap/debootstrap"
cp $DEBOOTSTRAP_DIR/functions "$TARGET/debootstrap/functions"
- cp $DEBOOTSTRAP_DIR/devices.tar.gz "$TARGET/debootstrap/devices.tar.gz"
cp $SCRIPT "$TARGET/debootstrap/suite-script"
echo "$ARCH" >"$TARGET/debootstrap/arch"
echo "$SUITE" >"$TARGET/debootstrap/suite"