aboutsummaryrefslogtreecommitdiff
path: root/admin/ar-lib
diff options
context:
space:
mode:
authorEnji Cooper <ngie@FreeBSD.org>2026-08-17 09:41:49 +0000
committerEnji Cooper <ngie@FreeBSD.org>2026-08-17 09:41:49 +0000
commit0c9bf043d6892725fd76cd2026949405c9381663 (patch)
tree076723db8845ca592088620dde4d293fedb9dbfe /admin/ar-lib
parentcd355e3667c67b15d9850bacb416b13486e22c24 (diff)
vendor/atf: import atf-0.24-rc1vendor/atf/atf-0.24-rc1
This release candidate will likely serve as the actual upstream release tag for version 0.24, but for now it should be considered a release-candidate worthy tag as this code has not gone through a full FreeBSD test suite run or been built with `make tinderbox` yet on all supported architectures. Obtained from: https://github.com/freebsd/atf/releases/tag/atf-0.24-rc1
Diffstat (limited to 'admin/ar-lib')
-rwxr-xr-xadmin/ar-lib40
1 files changed, 30 insertions, 10 deletions
diff --git a/admin/ar-lib b/admin/ar-lib
index fe2301e71a86..d0a7b5c8a548 100755
--- a/admin/ar-lib
+++ b/admin/ar-lib
@@ -2,9 +2,9 @@
# Wrapper for Microsoft lib.exe
me=ar-lib
-scriptversion=2012-03-01.08; # UTC
+scriptversion=2025-02-03.05; # UTC
-# Copyright (C) 2010-2013 Free Software Foundation, Inc.
+# Copyright (C) 2010-2025 Free Software Foundation, Inc.
# Written by Peter Rosin <peda@lysator.liu.se>.
#
# This program is free software; you can redistribute it and/or modify
@@ -18,7 +18,7 @@ scriptversion=2012-03-01.08; # UTC
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -51,9 +51,20 @@ func_file_conv ()
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
- file_conv=mingw
+ if test -n "$MSYSTEM" && (cygpath --version) >/dev/null 2>&1; then
+ # MSYS2 environment.
+ file_conv=cygwin
+ else
+ # Original MinGW environment.
+ file_conv=mingw
+ fi
+ ;;
+ MSYS*)
+ # Old MSYS environment, or MSYS2 with 32-bit MSYS2 shell.
+ file_conv=cygwin
;;
CYGWIN*)
+ # Cygwin environment.
file_conv=cygwin
;;
*)
@@ -66,7 +77,7 @@ func_file_conv ()
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin)
- file=`cygpath -m "$file" || echo "$file"`
+ file=`cygpath -w "$file" || echo "$file"`
;;
wine)
file=`winepath -w "$file" || echo "$file"`
@@ -105,11 +116,15 @@ case $1 in
Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
Members may be specified in a file named with @FILE.
+
+Report bugs to <bug-automake@gnu.org>.
+GNU Automake home page: <https://www.gnu.org/software/automake/>.
+General help using GNU software: <https://www.gnu.org/gethelp/>.
EOF
exit $?
;;
-v | --v*)
- echo "$me, version $scriptversion"
+ echo "$me (GNU Automake) $scriptversion"
exit $?
;;
esac
@@ -135,6 +150,10 @@ do
AR="$AR $1"
shift
;;
+ -nologo | -NOLOGO)
+ # We always invoke AR with -nologo, so don't need to add it again.
+ shift
+ ;;
*)
action=$1
shift
@@ -224,10 +243,11 @@ elif test -n "$extract"; then
esac
done
else
- $AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
- do
- $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
- done
+ $AR -NOLOGO -LIST "$archive" | tr -d '\r' | sed -e 's/\\/\\\\/g' \
+ | while read member
+ do
+ $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
+ done
fi
elif test -n "$quick$replace"; then