[58015] trunk/base

afb at macports.org afb at macports.org
Sun Sep 20 12:17:45 PDT 2009


Revision: 58015
          http://trac.macports.org/changeset/58015
Author:   afb at macports.org
Date:     2009-09-20 12:17:41 -0700 (Sun, 20 Sep 2009)
Log Message:
-----------
check for gnupatch too (if different from patch)

Modified Paths:
--------------
    trunk/base/aclocal.m4
    trunk/base/configure
    trunk/base/configure.ac
    trunk/base/src/port1.0/port_autoconf.tcl.in

Modified: trunk/base/aclocal.m4
===================================================================
--- trunk/base/aclocal.m4	2009-09-20 18:53:39 UTC (rev 58014)
+++ trunk/base/aclocal.m4	2009-09-20 19:17:41 UTC (rev 58015)
@@ -877,6 +877,22 @@
 	fi
 ])
 
+dnl This macro tests for GNU patch
+AC_DEFUN([MP_PATCH_GNU_VERSION],[
+	AC_PATH_PROG(PATCH, [patch])
+	AC_PATH_PROG(GNUPATCH, [gpatch])
+	
+	AC_MSG_CHECKING([for GNU (FSF) patch])
+	AS_IF([test -n "$GNUPATCH"], [PATCH_CMD=$GNUPATCH], [PATCH_CMD=$PATCH])
+	[fsf_version=`$PATCH_CMD --version 2>&1 | grep "Free Software Foundation"`]
+	if test -z "$fsf_version" ; then
+		AC_MSG_RESULT([none])
+	else
+		AC_MSG_RESULT([$PATCH_CMD])
+		GNUPATCH="$PATCH_CMD"
+	fi
+])
+
 #------------------------------------------------------------------------
 # MP_CHECK_READLINK_IS_P1003_1A --
 #

Modified: trunk/base/configure
===================================================================
--- trunk/base/configure	2009-09-20 18:53:39 UTC (rev 58014)
+++ trunk/base/configure	2009-09-20 19:17:41 UTC (rev 58015)
@@ -669,6 +669,7 @@
 MKBOM
 LSBOM
 BZIP2
+GNUPATCH
 GNUMAKE
 GNUTAR
 XCODEBUILD
@@ -5315,6 +5316,52 @@
   test -n "$GNUMAKE" && break
 done
 
+for ac_prog in gnupatch gpatch
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_GNUPATCH+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $GNUPATCH in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GNUPATCH="$GNUPATCH" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$PATH:/usr/local/bin"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_GNUPATCH="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+GNUPATCH=$ac_cv_path_GNUPATCH
+if test -n "$GNUPATCH"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNUPATCH" >&5
+$as_echo "$GNUPATCH" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$GNUPATCH" && break
+done
+
 # Extract the first word of "bzip2", so it can be a program name with args.
 set dummy bzip2; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -5747,6 +5794,105 @@
 	fi
 
 
+	# Extract the first word of "patch", so it can be a program name with args.
+set dummy patch; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_PATCH+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PATCH in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
+  ;;
+  *)
+  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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PATCH=$ac_cv_path_PATCH
+if test -n "$PATCH"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
+$as_echo "$PATCH" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+	# Extract the first word of "gpatch", so it can be a program name with args.
+set dummy gpatch; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_GNUPATCH+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $GNUPATCH in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GNUPATCH="$GNUPATCH" # Let the user override the test with a path.
+  ;;
+  *)
+  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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_GNUPATCH="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+GNUPATCH=$ac_cv_path_GNUPATCH
+if test -n "$GNUPATCH"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNUPATCH" >&5
+$as_echo "$GNUPATCH" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU (FSF) patch" >&5
+$as_echo_n "checking for GNU (FSF) patch... " >&6; }
+	if test -n "$GNUPATCH"; then :
+  PATCH_CMD=$GNUPATCH
+else
+  PATCH_CMD=$PATCH
+fi
+	fsf_version=`$PATCH_CMD --version 2>&1 | grep "Free Software Foundation"`
+	if test -z "$fsf_version" ; then
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; }
+	else
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH_CMD" >&5
+$as_echo "$PATCH_CMD" >&6; }
+		GNUPATCH="$PATCH_CMD"
+	fi
+
+
 # Quiche eaters options.
 if test x$GCC = xyes; then
 	CFLAGS_QUICHEEATERS='-W -Wall -pedantic'

Modified: trunk/base/configure.ac
===================================================================
--- trunk/base/configure.ac	2009-09-20 18:53:39 UTC (rev 58014)
+++ trunk/base/configure.ac	2009-09-20 19:17:41 UTC (rev 58015)
@@ -116,6 +116,7 @@
 AC_PATH_PROG(XCODEBUILD, [xcodebuild], [])
 AC_PATH_PROGS(GNUTAR, [gnutar gtar], [], [$PATH:/usr/local/bin])
 AC_PATH_PROGS(GNUMAKE, [gnumake gmake], [], [$PATH:/usr/local/bin])
+AC_PATH_PROGS(GNUPATCH, [gnupatch gpatch], [], [$PATH:/usr/local/bin])
 AC_PATH_PROG(BZIP2, [bzip2], [])
 AC_PATH_PROG(LSBOM, [lsbom], [])
 AC_PATH_PROG(MKBOM, [mkbom], [])
@@ -140,6 +141,7 @@
 
 MP_SED_EXTENDED_REGEXP
 MP_TAR_NO_SAME_OWNER
+MP_PATCH_GNU_VERSION
 
 # Quiche eaters options.
 if test x$GCC = xyes; then

Modified: trunk/base/src/port1.0/port_autoconf.tcl.in
===================================================================
--- trunk/base/src/port1.0/port_autoconf.tcl.in	2009-09-20 18:53:39 UTC (rev 58014)
+++ trunk/base/src/port1.0/port_autoconf.tcl.in	2009-09-20 19:17:41 UTC (rev 58015)
@@ -46,6 +46,7 @@
 	variable lipo_path "@LIPO@"
 	variable nice_path "@NICE@"
 	variable patch_path "@PATCH@"
+	variable gnupatch_path "@GNUPATCH@"
 	variable rmdir_path "@RMDIR@"
 	variable rsync_path "@RSYNC@"
 	variable unzip_path "@UNZIP@"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090920/031c0c8a/attachment.html>


More information about the macports-changes mailing list