[darwinbuild-changes] [130] trunk/darwinbuild/darwinbuild

source_changes at macosforge.org source_changes at macosforge.org
Wed Oct 4 01:49:12 PDT 2006


Revision: 130
          http://trac.macosforge.org/projects/darwinbuild/changeset/130
Author:   ssen
Date:     2006-10-04 01:49:11 -0700 (Wed, 04 Oct 2006)

Log Message:
-----------
Query the DB for patch files, download them from
source_sites, and apply them

Modified Paths:
--------------
    trunk/darwinbuild/darwinbuild

Modified: trunk/darwinbuild/darwinbuild
===================================================================
--- trunk/darwinbuild/darwinbuild	2005-07-30 16:08:24 UTC (rev 129)
+++ trunk/darwinbuild/darwinbuild	2006-10-04 08:49:11 UTC (rev 130)
@@ -77,10 +77,6 @@
 ### to create the root using the Xcode installation on the host system.
 ###
 ### 
-### TODO
-###     - Extract patch information from darwinxref
-###		- Generate Xcode root from host system
-###
 
 PREFIX=/usr/local
 XREFDB=.build/xref.db
@@ -345,7 +341,12 @@
 else
 	filename="$project.tar.gz"
 fi
+patchfilenames=$($PREFIX/bin/darwinxref patchfiles $projnam)
+#echo "patchfiles are $patchfilenames"
 Download "$SourceCache" "$filename" "$($PREFIX/bin/darwinxref source_sites $projnam)"
+for p in $patchfilenames; do
+    Download "$SourceCache" "$p" "$($PREFIX/bin/darwinxref source_sites $projnam)"    
+done
 
 ### If we are doing a -fetch, stop here.
 if [ "$action" == "fetch" ]; then
@@ -412,6 +413,8 @@
 else
 	tar xzf "$SourceCache/$filename"
 fi
+
+# you can avoid registering patches in the DB by using "xnu-792--patches.tar.gz"
 if [ -r "$SourceCache/$project-patches.tar.gz" ]; then
 	tar xzf "$SourceCache/$project-patches.tar.gz"
 fi
@@ -425,6 +428,19 @@
 	echo "*** Applying Patches ..."
 	cat $REAL_SRCROOT/../$project-patches/* | patch -p0
 fi
+for patchfile in $patchfilenames; do
+	echo "*** Applying Patch $patchfile ..."
+	if [ -r "$SourceCache/$patchfile" ]; then
+	    case $patchfile in
+		*.patch)
+		    patch --posix -l -p0 < "$SourceCache/$patchfile"
+		    ;;
+		*)
+		    echo "Don't know how to apply $patchfile"
+		    ;;
+	    esac
+	fi
+done
 
 ### If we are doing a -source, stop here.
 if [ "$action" == "source" ]; then

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/darwinbuild-changes/attachments/20061004/3df56f10/attachment.html


More information about the darwinbuild-changes mailing list