pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/48089: Some platform do not support type command.
The following reply was made to PR pkg/48089; it has been noted by GNATS.
From: "OBATA Akio" <obache%netbsd.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: pkg/48089: Some platform do not support type command.
Date: Wed, 14 Aug 2013 14:20:10 +0900
Could you try following patch?
Index: devel/bmake/files/boot-strap
===================================================================
RCS file: /cvsroot/pkgsrc/devel/bmake/files/boot-strap,v
retrieving revision 1.10
diff -u -r1.10 boot-strap
--- devel/bmake/files/boot-strap 18 Jun 2011 22:39:46 -0000 1.10
+++ devel/bmake/files/boot-strap 14 Aug 2013 05:17:51 -0000
@@ -236,6 +236,18 @@
no_path $* && eval ${2:-PATH}="$__p${__p:+:}$1"
}
+find_prog () {
+ saved_IFS="$IFS"
+ IFS=":"
+ for p in $PATH; do
+ if [ -x "$p/$1" ]; then
+ echo "$p/$1"
+ break;
+ fi
+ done
+ IFS="$saved_IFS";
+}
+
srcdir=`GetDir /bmake "$srcdir" "$2" "$Mydir" ./bmake* "$Mydir"/../bmake*`
[ -d "${srcdir:-/dev/null}" ] || Usage
@@ -310,7 +322,7 @@
esac
fi
# make sure test below uses the same diff that configure did
-TOOL_DIFF=`type diff | sed 's,[()],,g;s,^[^/][^/]*,,;q'`
+TOOL_DIFF=`find_prog diff`
export MAKESYSPATH TOOL_DIFF
if [ "$mksrc" ]; then
$objdir/bmake test || exit 1
Index: devel/bmake/files/unit-tests/modts
===================================================================
RCS file: /cvsroot/pkgsrc/devel/bmake/files/unit-tests/modts,v
retrieving revision 1.2
diff -u -r1.2 modts
--- devel/bmake/files/unit-tests/modts 18 Jun 2011 22:39:46 -0000 1.2
+++ devel/bmake/files/unit-tests/modts 14 Aug 2013 05:17:52 -0000
@@ -12,9 +12,9 @@
# Use print or printf iff they are builtin.
# XXX note that this causes problems, when make decides
# there is no need to use a shell, so avoid where possible.
-.if ${type print 2> /dev/null || echo:L:sh:Mbuiltin} != ""
+.if ${(type print) 2> /dev/null || echo:L:sh:Mbuiltin} != ""
PRINT= print -r --
-.elif ${type printf 2> /dev/null || echo:L:sh:Mbuiltin} != ""
+.elif ${(type printf) 2> /dev/null || echo:L:sh:Mbuiltin} != ""
PRINT= printf '%s\n'
.else
PRINT= echo
Home |
Main Index |
Thread Index |
Old Index