This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cygport patch: Add PATCHOPTS


The attached patch adds the ability to pass patch options to cygport prep command.

Example: Set original timestamps from patch file (like g-b-s does):

PATCHOPTS+="-Z"

Christian

diff -ur origsrc/cygport-0.2.7/bin/cygport.in src/cygport-0.2.7/bin/cygport.in
--- origsrc/cygport-0.2.7/bin/cygport.in	2006-12-25 06:42:04.000000000 +0100
+++ src/cygport-0.2.7/bin/cygport.in	2007-01-04 21:12:28.109375000 +0100
@@ -529,10 +529,10 @@
 
 		while (( patchlevel <= 3 ))
 		do
-			if patch -N -s --dry-run -p${patchlevel} -i ${patchfile} &> /dev/null
+			if patch ${PATCHOPTS} -s --dry-run -p${patchlevel} -i ${patchfile} &> /dev/null
 			then
 				inform "applying patch ${patchfile##*/}:";
-				patch -N -p${patchlevel} -i ${patchfile} || error "patch ${patchfile##*/} failed"
+				patch ${PATCHOPTS} -p${patchlevel} -i ${patchfile} || error "patch ${patchfile##*/} failed"
 				break;
 			else
 				if (( patchlevel == 3 ))
@@ -1558,6 +1558,7 @@
 declare -x F77FLAGS="-O2 -pipe ";
 declare -x GCJFLAGS="-O2 -pipe ";
 declare -x LDFLAGS="";
+declare    PATCHOPTS="-N "
 declare    MAKEOPTS="-j2 "
 
 source ${_privdatadir}/mirrors || warning "could not read mirrors file"

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]