summaryrefslogtreecommitdiffstats
path: root/util/webkit/mkdist-webkit
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2009-03-23 09:18:55 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-03-23 09:18:55 (GMT)
commite5fcad302d86d316390c6b0f62759a067313e8a9 (patch)
treec2afbf6f1066b6ce261f14341cf6d310e5595bc1 /util/webkit/mkdist-webkit
downloadQt-e5fcad302d86d316390c6b0f62759a067313e8a9.zip
Qt-e5fcad302d86d316390c6b0f62759a067313e8a9.tar.gz
Qt-e5fcad302d86d316390c6b0f62759a067313e8a9.tar.bz2
Long live Qt 4.5!
Diffstat (limited to 'util/webkit/mkdist-webkit')
-rwxr-xr-xutil/webkit/mkdist-webkit314
1 files changed, 314 insertions, 0 deletions
diff --git a/util/webkit/mkdist-webkit b/util/webkit/mkdist-webkit
new file mode 100755
index 0000000..1268b5e
--- /dev/null
+++ b/util/webkit/mkdist-webkit
@@ -0,0 +1,314 @@
+#!/bin/bash
+
+repository="git://git.dev.troll.no/webkit-mirror"
+tag="qtwebkit-merged-into-qt-4-4"
+
+excluded_directories="LayoutTests JavaScriptGlue WebKitLibraries WebKitSite WebKitTools WebCore/platform/cf WebCore/platform/gtk WebCore/platform/chromium"
+excluded_directories="$excluded_directories PageLoadTests"
+excluded_directories="$excluded_directories BugsSite"
+excluded_directories="$excluded_directories PlanetWebKit"
+excluded_directories="$excluded_directories SunSpider"
+excluded_directories="$excluded_directories WebKitExamplePlugins"
+
+excluded_directories="$excluded_directories symbols.filter"
+excluded_directories="$excluded_directories JavaScriptCore/Makefile"
+excluded_directories="$excluded_directories Makefile"
+excluded_directories="$excluded_directories Makefile.shared"
+excluded_directories="$excluded_directories GNUmakefile.am"
+excluded_directories="$excluded_directories WebCore/Makefile"
+excluded_directories="$excluded_directories WebKit/Makefile"
+
+excluded_directories="$excluded_directories JavaScriptCore/GNUmakefile.am"
+excluded_directories="$excluded_directories JavaScriptCore/Configurations"
+excluded_directories="$excluded_directories JavaScriptCore/JavaScriptCore.exp"
+excluded_directories="$excluded_directories JavaScriptCore/JavaScriptCore.xcodeproj"
+excluded_directories="$excluded_directories JavaScriptCore/tests"
+excluded_directories="$excluded_directories JavaScriptCore/API/tests"
+excluded_directories="$excluded_directories JavaScriptCore/JavaScriptCore.vcproj"
+excluded_directories="$excluded_directories JavaScriptCore/wtf/wx"
+excluded_directories="$excluded_directories JavaScriptCore/wtf/gtk"
+excluded_directories="$excluded_directories JavaScriptCore/wtf/mac"
+excluded_directories="$excluded_directories JavaScriptCore/wtf/win"
+
+excluded_directories="$excluded_directories WebCore/WebCore.vcproj"
+excluded_directories="$excluded_directories WebCore/DerivedSources.make"
+excluded_directories="$excluded_directories WebCore/GNUmakefile.am"
+excluded_directories="$excluded_directories WebCore/WebCore.base.exp"
+excluded_directories="$excluded_directories WebCore/WebCore.xcodeproj"
+excluded_directories="$excluded_directories WebCore/Configurations"
+
+excluded_directories="$excluded_directories WebCore/bridge/objc"
+excluded_directories="$excluded_directories WebCore/bridge/testbindings.pro"
+excluded_directories="$excluded_directories WebCore/bindings/objc"
+
+excluded_directories="$excluded_directories JavaScriptCore/icu"
+
+excluded_directories="$excluded_directories WebCore/icu"
+# remove CollatorICU from SOURCES in JavaScriptCore.pri first
+#excluded_directories="$excluded_directories JavaScriptCore/wtf/unicode/icu"
+
+excluded_directories="$excluded_directories WebCore/loader/mac"
+excluded_directories="$excluded_directories WebCore/loader/win"
+
+excluded_directories="$excluded_directories WebCore/page/gtk"
+excluded_directories="$excluded_directories WebCore/page/mac"
+excluded_directories="$excluded_directories WebCore/page/wx"
+
+excluded_directories="$excluded_directories WebCore/history/mac"
+
+excluded_directories="$excluded_directories WebCore/editing/mac"
+excluded_directories="$excluded_directories WebCore/editing/wx"
+
+excluded_directories="$excluded_directories WebCore/platform/text/wx"
+excluded_directories="$excluded_directories WebCore/platform/text/gtk"
+
+
+excluded_directories="$excluded_directories WebCore/manual-tests"
+
+excluded_directories="$excluded_directories WebCore/platform/network/cf"
+excluded_directories="$excluded_directories WebCore/platform/network/curl"
+excluded_directories="$excluded_directories WebCore/platform/network/mac"
+excluded_directories="$excluded_directories WebCore/platform/network/win"
+excluded_directories="$excluded_directories WebCore/platform/network/soup"
+
+excluded_directories="$excluded_directories WebCore/platform/graphics/cg"
+excluded_directories="$excluded_directories WebCore/platform/graphics/cairo"
+excluded_directories="$excluded_directories WebCore/platform/graphics/gtk"
+excluded_directories="$excluded_directories WebCore/platform/graphics/wx"
+excluded_directories="$excluded_directories WebCore/platform/graphics/mac"
+excluded_directories="$excluded_directories WebCore/platform/graphics/win"
+excluded_directories="$excluded_directories WebCore/platform/graphics/skia"
+
+excluded_directories="$excluded_directories WebCore/platform/image-decoders/bmp"
+excluded_directories="$excluded_directories WebCore/platform/image-decoders/gif"
+excluded_directories="$excluded_directories WebCore/platform/image-decoders/zlib"
+excluded_directories="$excluded_directories WebCore/platform/image-decoders/png"
+excluded_directories="$excluded_directories WebCore/platform/image-decoders/ico"
+excluded_directories="$excluded_directories WebCore/platform/image-decoders/jpeg"
+excluded_directories="$excluded_directories WebCore/platform/image-decoders/xbm"
+
+excluded_directories="$excluded_directories WebCore/plugins/wx"
+excluded_directories="$excluded_directories WebCore/plugins/gtk"
+
+excluded_directories="$excluded_directories WebCore/platform/symbian WebCore/platform/wx"
+excluded_directories="$excluded_directories WebKit/gtk"
+excluded_directories="$excluded_directories WebKit/win"
+excluded_directories="$excluded_directories WebKit/mac"
+excluded_directories="$excluded_directories WebKit/wx"
+excluded_directories="$excluded_directories WebKit/cf"
+
+excluded_directories="$excluded_directories WebCore/svg/graphics/cg"
+excluded_directories="$excluded_directories WebCore/svg/graphics/cairo"
+excluded_directories="$excluded_directories WebCore/svg/graphics/filters/cg"
+excluded_directories="$excluded_directories WebCore/svg/graphics/mac"
+
+excluded_directories="$excluded_directories WebKit/English.lproj WebKit/WebKit.xcodeproj"
+excluded_directories="$excluded_directories WebCore/English.lproj"
+
+exclude_with_exceptions_list="WebCore/platform/win/:WebCore/platform/win/SystemTimeWin.cpp"
+
+files_to_remove=""
+files_to_remove="$files_to_remove WebKit/qt/Api/qwebnetworkinterface.cpp"
+files_to_remove="$files_to_remove WebKit/qt/Api/qwebnetworkinterface.h"
+files_to_remove="$files_to_remove WebKit/qt/Api/qwebnetworkinterface_p.h"
+files_to_remove="$files_to_remove WebKit/qt/Api/qcookiejar.h"
+files_to_remove="$files_to_remove WebKit/qt/Api/qcookiejar.cpp"
+
+files_to_remove="$files_to_remove WebCore/rendering/RenderThemeMac.mm"
+files_to_remove="$files_to_remove acinclude.m4"
+files_to_remove="$files_to_remove autogen.sh"
+files_to_remove="$files_to_remove configure.ac"
+
+files_to_remove="$files_to_remove WebKit.pro"
+
+files_to_remove="$files_to_remove JavaScriptCore/jsc.pro"
+
+files_to_remove="$files_to_remove WebKit/qt/QtLauncher/QtLauncher.pro"
+files_to_remove="$files_to_remove WebKit/qt/QtLauncher/main.cpp"
+
+files_to_remove="$files_to_remove JavaScriptCore/AllInOneFile.cpp"
+files_to_remove="$files_to_remove JavaScriptCore/JavaScriptCore.scons"
+files_to_remove="$files_to_remove JavaScriptCore/JavaScriptCoreSources.bkl"
+files_to_remove="$files_to_remove JavaScriptCore/SConstruct"
+files_to_remove="$files_to_remove JavaScriptCore/jscore.bkl"
+
+files_to_remove="$files_to_remove WebCore/SConstruct"
+files_to_remove="$files_to_remove WebCore/WebCore.scons"
+files_to_remove="$files_to_remove WebCore/WebCoreSources.bkl"
+files_to_remove="$files_to_remove WebCore/webcore-base.bkl"
+files_to_remove="$files_to_remove WebCore/webcore-wx.bkl"
+
+if [ $# -eq 1 ]; then
+ tag=$1
+fi
+
+if [ $# -eq 2 ]; then
+ repository=$1
+ tag=$2
+fi
+
+die() {
+ echo $*
+ exit 1
+}
+
+require_clean_work_tree() {
+ # test if working tree is dirty
+ git rev-parse --verify HEAD > /dev/null &&
+ git update-index --refresh &&
+ git diff-files --quiet &&
+ git diff-index --cached --quiet HEAD ||
+ die "Working tree is dirty"
+}
+
+which qmake >/dev/null 2>/dev/null
+if [ "$?" != 0 ]; then
+ die "abort: Could not locate qmake in your PATH"
+fi
+
+test -z "$(git rev-parse --show-cdup)" || {
+ exit=$?
+ echo >&2 "You need to run this command from the toplevel of the working tree."
+ exit $exit
+}
+
+echo "checking working tree"
+require_clean_work_tree
+
+revCount=`git ls-remote $repository | grep $tag | awk '{print $1}' | wc -l`
+if [ "$revCount" != 1 ]; then
+ die "Cannot parse $tag into a revision. It seems ambiguous".
+fi
+
+rev=`git ls-remote $repository | grep -E "^.+$tag$" | awk '{print $1}'`
+
+tarball=`mktemp /tmp/webkit-snapshot.tar` || exit 1
+echo "creating $tarball"
+
+echo "archiving webkit from $repository $tag ( $rev )"
+
+git archive --remote=$repository $rev > $tarball || exit 1
+
+echo "removing unwanted files and directories"
+for dir in $excluded_directories; do
+ echo " removing $dir"
+ tar --delete --file=$tarball $dir
+done
+
+for item in $exclude_with_exceptions_list; do
+ dir=`echo $item | awk -F : '{print $1}'`
+ include=`echo $item | awk -F : '{print $2}'`
+ echo " removing $dir except $include"
+ files=`tar --list --file=$tarball $dir | grep -v -E "^$dir\$" | grep -v $include`
+ tar --delete --file=$tarball $files
+done
+
+for file in $files_to_remove; do
+ echo " removing $file"
+ tar --delete --file=$tarball $file
+done
+
+echo "done!"
+
+srcdir=src/3rdparty/webkit
+absSrcDir=$PWD/$srcdir
+localDiff=
+lastImportRevison=
+
+echo "replacing $srcdir"
+if [ -d $srcdir ]; then
+ lastImportRevison=`tail -n 1 src/3rdparty/webkit/VERSION`
+ git ls-files $srcdir | xargs rm
+ git ls-files -z src/3rdparty/webkit | git update-index --force-remove -z --stdin
+ lastImport=`git rev-list --max-count=1 HEAD -- src/3rdparty/webkit/VERSION`
+ changes=`git rev-list --no-merges --reverse $lastImport.. -- src/3rdparty/webkit`
+ localDiff=/tmp/webkit_patch
+ echo -n>$localDiff
+ for change in $changes; do
+ echo "Saving commit $change"
+ git show -p --stat "--pretty=format:%nFrom %H Mon Sep 17 00:00:00 2001%nFrom: %an <%ae>%nDate: %ad%nSubject: Re-apply change $change by %an%n%n%s%n%b%n" $change -- src/3rdparty/webkit >> $localDiff
+ echo "-- " >> $localDiff
+ echo "1.2.3" >> $localDiff
+ echo >> $localDiff
+ done
+ if [ -s $localDiff ]; then
+ echo "Saved locally applied patches to $localDiff"
+ else
+ localDiff=""
+ fi
+else
+ mkdir -p $srcdir
+fi
+
+(cd $srcdir && tar xf $tarball)
+git add $srcdir
+
+echo "generating extra sources"
+(
+ for proj in JavaScriptCore WebCore; do
+ cd $absSrcDir/$proj &&
+ rm -rf tmp &&
+ mkdir tmp &&
+ cd tmp &&
+ mkdir -p ../generated &&
+ qmake -o Makefile QT_CONFIG+=phonon GENERATED_SOURCES_DIR=`pwd`/../generated OUTPUT_DIR=`pwd` ../$proj.pro &&
+ make generated_files &&
+ perl -pi -e "s,$absSrcDir/,,g" ../generated/*.cpp ../generated/*.h &&
+ git add ../generated &&
+ cd .. &&
+ rm -rf tmp &&
+ cd ..
+ done
+)
+rm -rf $srcdir/WebKitBuild
+
+cat >$srcdir/VERSION <<EOT
+This is a snapshot of the Qt port of WebKit from
+
+ git://code.staikos.net/webkit
+
+The commit imported was from the
+
+ $tag branch/tag
+
+and has the sha1 checksum
+
+ $rev
+EOT
+git add $srcdir/VERSION
+
+git diff-files --name-only -z | git update-index --remove -z --stdin
+
+echo "removing $tarball"
+rm -f $tarball
+
+cat >commitlog.txt <<EOT
+Updated WebKit from $repository to $tag ( $rev )
+EOT
+
+if [ -d "$repository/.git" -a -n "$lastImportRevison" ]; then
+ echo >>commitlog.txt
+ echo "Changes in WebKit since the last update:" >>commitlog.txt
+ echo >>commitlog.txt
+ git --git-dir=$repository/.git ls-files | egrep "ChangeLog$" | xargs git --git-dir=$repository/.git diff $lastImportRevison $rev -- | sed -n -e "s,^\+\(.*\),\1,p" >>commitlog.txt
+fi
+
+echo "Changes:"
+echo
+git --no-pager diff --name-status --cached $srcdir
+
+echo
+echo "Wrote commitlog.txt. Use with"
+echo
+echo " git commit -e -F commitlog.txt"
+echo
+echo "to commit your changes"
+
+if [ -n "$localDiff" ]; then
+ echo
+ echo "The changes that were locally stored in Perforce are now stored as a git patch in $localDiff"
+ echo "You may want to appy them with"
+ echo
+ echo " git am -3 $localDiff"
+ echo
+fi