ports/sysutils/debootstrap/files/patch-debootstrap
Dmitry Marakasov 45219c9f98 - Update to 1.0.82
PR:		212519
Submitted by:	lifanov@mail.lifanov.com (maintainer)
2016-09-09 14:23:32 +00:00

38 lines
1 KiB
Text

--- debootstrap.orig 2016-09-09 12:32:15 UTC
+++ debootstrap
@@ -14,7 +14,7 @@ if [ -z "$DEBOOTSTRAP_DIR" ]; then
if [ -x /debootstrap/debootstrap ]; then
DEBOOTSTRAP_DIR=/debootstrap
else
- DEBOOTSTRAP_DIR=/usr/share/debootstrap
+ DEBOOTSTRAP_DIR=%%DATADIR%%
fi
fi
@@ -409,13 +409,7 @@ fi
###########################################################################
-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"
@@ -437,6 +431,11 @@ if [ -z "$HOST_OS" ]; then
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