You've already forked macports-base
mirror of
https://github.com/macports/macports-base.git
synced 2026-07-12 18:18:43 -07:00
Submitted by: dluke Reviewed by: jberry, oleg Approved by: oleg Sense for gnutar in autoconf and use it in preference to tar. Check also if --no-same-owner is available and use it if so. git-svn-id: https://svn.macports.org/repository/macports/trunk/base@11844 d073be05-634f-4543-b044-5fe20cf6d1d6
This commit is contained in:
Vendored
+13
@@ -428,3 +428,16 @@ AC_DEFUN([OD_PATH_SCAN],[
|
||||
prefix=$oldprefix
|
||||
])
|
||||
|
||||
dnl This macro tests for tar support of --no-same-owner
|
||||
AC_DEFUN([OD_TAR_NO_SAME_OWNER],[
|
||||
AC_CHECK_PROG(TAR_CMD, [gnutar], [gnutar], [tar])
|
||||
AC_MSG_CHECKING([for tar --no-same-owner support])
|
||||
[no_same_owner_support=`$TAR_CMD --help 2>&1 | grep no-same-owner`]
|
||||
if test -z "$no_same_owner_support" ; then
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
TAR_CMD="$TAR_CMD --no-same-owner"
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
@@ -312,7 +312,7 @@ ac_includes_default="\
|
||||
# include <unistd.h>
|
||||
#endif"
|
||||
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE LN_S CURL CVS CFLAGS_QUICHEEATERS MTREE subdirs REPLACEMENT_PROGS DPORTSDIR PORTCONFIGDIR DSTUSR DSTGRP DSTMODE CPP EGREP MD5_LIBS X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_INCLUDES TCLSH TCL_PACKAGE_DIR INCLUDES CFLAGS_DEBUG CFLAGS_OPTIMIZE TCL_DEFS STLIB_LD SHLIB_LD SHLIB_CFLAGS SHLIB_LDFLAGS SHLIB_SUFFIX TCL_CC prefix_expanded PORTCONFIGDIR_EXPANDED localstatedir_expanded LIBOBJS LTLIBOBJS'
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE LN_S CURL CVS TAR_CMD CFLAGS_QUICHEEATERS MTREE subdirs REPLACEMENT_PROGS DPORTSDIR PORTCONFIGDIR DSTUSR DSTGRP DSTMODE CPP EGREP MD5_LIBS X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_INCLUDES TCLSH TCL_PACKAGE_DIR INCLUDES CFLAGS_DEBUG CFLAGS_OPTIMIZE TCL_DEFS STLIB_LD SHLIB_LD SHLIB_CFLAGS SHLIB_LDFLAGS SHLIB_SUFFIX TCL_CC prefix_expanded PORTCONFIGDIR_EXPANDED localstatedir_expanded LIBOBJS LTLIBOBJS'
|
||||
ac_subst_files=''
|
||||
|
||||
# Initialize some variables set by options.
|
||||
@@ -2498,6 +2498,57 @@ echo "${ECHO_T}no" >&6
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
# Extract the first word of "gnutar", so it can be a program name with args.
|
||||
set dummy gnutar; ac_word=$2
|
||||
echo "$as_me:$LINENO: checking for $ac_word" >&5
|
||||
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
|
||||
if test "${ac_cv_prog_TAR_CMD+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
if test -n "$TAR_CMD"; then
|
||||
ac_cv_prog_TAR_CMD="$TAR_CMD" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_TAR_CMD="gnutar"
|
||||
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
test -z "$ac_cv_prog_TAR_CMD" && ac_cv_prog_TAR_CMD="tar"
|
||||
fi
|
||||
fi
|
||||
TAR_CMD=$ac_cv_prog_TAR_CMD
|
||||
if test -n "$TAR_CMD"; then
|
||||
echo "$as_me:$LINENO: result: $TAR_CMD" >&5
|
||||
echo "${ECHO_T}$TAR_CMD" >&6
|
||||
else
|
||||
echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6
|
||||
fi
|
||||
|
||||
echo "$as_me:$LINENO: checking for tar --no-same-owner support" >&5
|
||||
echo $ECHO_N "checking for tar --no-same-owner support... $ECHO_C" >&6
|
||||
no_same_owner_support=`$TAR_CMD --help 2>&1 | grep no-same-owner`
|
||||
if test -z "$no_same_owner_support" ; then
|
||||
echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6
|
||||
else
|
||||
echo "$as_me:$LINENO: result: yes" >&5
|
||||
echo "${ECHO_T}yes" >&6
|
||||
TAR_CMD="$TAR_CMD --no-same-owner"
|
||||
fi
|
||||
|
||||
|
||||
# Quiche eaters options.
|
||||
if test x$GCC = xyes; then
|
||||
CFLAGS_QUICHEEATERS='-W -Wall -pedantic'
|
||||
@@ -7644,6 +7695,7 @@ s,@SET_MAKE@,$SET_MAKE,;t t
|
||||
s,@LN_S@,$LN_S,;t t
|
||||
s,@CURL@,$CURL,;t t
|
||||
s,@CVS@,$CVS,;t t
|
||||
s,@TAR_CMD@,$TAR_CMD,;t t
|
||||
s,@CFLAGS_QUICHEEATERS@,$CFLAGS_QUICHEEATERS,;t t
|
||||
s,@MTREE@,$MTREE,;t t
|
||||
s,@subdirs@,$subdirs,;t t
|
||||
|
||||
@@ -16,6 +16,9 @@ AC_PROG_LN_S
|
||||
AC_PATH_PROG(CURL, [curl], [])
|
||||
AC_PATH_PROG(CVS, [cvs], [])
|
||||
|
||||
AC_SUBST(TAR_CMD)
|
||||
OD_TAR_NO_SAME_OWNER
|
||||
|
||||
# Quiche eaters options.
|
||||
if test x$GCC = xyes; then
|
||||
CFLAGS_QUICHEEATERS='-W -Wall -pedantic'
|
||||
|
||||
@@ -32,4 +32,5 @@ package provide port 1.0
|
||||
namespace eval portutil::autoconf {
|
||||
variable curl_path "@CURL@"
|
||||
variable cvs_path "@CVS@"
|
||||
variable tar_command "@TAR_CMD@"
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ default extract.only {[disttagclean $distfiles]}
|
||||
default extract.dir {${workpath}}
|
||||
default extract.cmd gzip
|
||||
default extract.pre_args -dc
|
||||
default extract.post_args {{| tar --no-same-owner -xf -}}
|
||||
default extract.post_args {"| ${portutil::autoconf::tar_command} -xf -"}
|
||||
|
||||
set_ui_prefix
|
||||
|
||||
|
||||
Reference in New Issue
Block a user