diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2007-01-28 21:55:55 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2007-01-28 21:55:55 +0000 |
commit | f1ea1119da3f6758982119ff82bce4dc96a5531d (patch) | |
tree | b4a140d2c3eae6345d941cee49453153eaeadf4b /devel/djgpp-gcc/scripts/pre-patch | |
parent | Headers and Libraries for DJGPP cross-development. (diff) |
FSF gcc-4.1 for DJGPP cross-development
WWW: http://www.delorie.com/djgpp/
PR: ports/108470
Submitted by: Peter Johnson <johnson.peter at gmail.com>
Notes
Notes:
svn path=/head/; revision=183576
Diffstat (limited to 'devel/djgpp-gcc/scripts/pre-patch')
-rw-r--r-- | devel/djgpp-gcc/scripts/pre-patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/devel/djgpp-gcc/scripts/pre-patch b/devel/djgpp-gcc/scripts/pre-patch new file mode 100644 index 000000000000..c2ed7046d5bd --- /dev/null +++ b/devel/djgpp-gcc/scripts/pre-patch @@ -0,0 +1,37 @@ +#! /bin/sh + +# +# Apply DJGPP related diffs and copy files +# + +for x in `(cd ${WRKDIR}/diffs/source && find . -type f | sed -e 's/\.\///g')`; do + case $x in + *.diff | *.diff.in) + cd $top + diff=${WRKDIR}/$x; + fname=`echo $x | sed -e 's/\.diff//g'` + echo "Applying patch to gcc/$fname ..." + if [ -f $gcc_dir/$fname ] ; then + cp -f $gcc_dir/$fname $gcc_dir/${fname}~1 + if ! ${PATCH} --quiet $gcc_dir/$fname <${WRKDIR}/diffs/source/$x ; then + echo "Failed to apply patch for $gcc_dir/$fname" +# exit 1 + fi + else + echo "File $gcc_dir/$fname is not found" + fi + ;; + readme.DJGPP) + ;; + *~*) + ;; + *) + echo Copying $x + mkdir -p `dirname $gcc_dir/$x` + if ! cp -fv ${WRKDIR}/diffs/source/$x $gcc_dir/$x ; then + echo "Failed to copy diffs/source/$x to $gcc_dir/$x" + exit 1 + fi + ;; + esac +done |