[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

kevino at webkit.org kevino at webkit.org
Wed Dec 22 12:10:35 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 289ba9cc67bbb18bd7df498b25b7d65fc2525d80
Author: kevino at webkit.org <kevino at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Aug 16 19:12:19 2010 +0000

    [wx] Build fix, do not build WebCore as a convenience library as this leads to
    errors in the Win build w/export symbols and causes problems with DOM bindings
    debugging in gdb.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65445 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/ChangeLog b/ChangeLog
index 33edad9..755109e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-08-16  Kevin Ollivier  <kevino at theolliviers.com>
+
+        [wx] Build fix, do not build WebCore as a convenience library as this leads to
+        errors in the Win build w/export symbols and causes problems with DOM bindings
+        debugging in gdb. 
+
+        * wscript: Copied from WebCore/wscript.
+
 2010-08-15  Ryuan Choi  <ryuan.choi at samsung.com>
 
         Reviewed by Antonio Gomes.
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 7f8b59f..1b0a7ea 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,11 @@
+2010-08-16  Kevin Ollivier  <kevino at theolliviers.com>
+
+        [wx] Build fix, do not build WebCore as a convenience library as this leads to
+        errors in the Win build w/export symbols and causes problems with DOM bindings
+        debugging in gdb. 
+
+        * wscript:
+
 2010-08-16  Leandro Pereira  <leandro at profusion.mobi>
 
         [EFL] Build fix after r65366.
diff --git a/JavaScriptCore/wscript b/JavaScriptCore/wscript
index 6fc2dc4..e50b18d 100644
--- a/JavaScriptCore/wscript
+++ b/JavaScriptCore/wscript
@@ -42,35 +42,6 @@ if building_on_win32:
 else:
     jscore_excludes.append('JSStringRefBSTR.cpp')
     jscore_excludes.extend(get_excludes(jscore_dir, ['*Win.cpp']))
-
-def generate_jscore_derived_sources():
-    # build the derived sources
-    js_dir = jscore_dir
-    if building_on_win32:
-        js_dir = get_output('cygpath --unix "%s"' % js_dir)
-    derived_sources_dir = os.path.join(jscore_dir, 'DerivedSources')
-    if not os.path.exists(derived_sources_dir):
-        os.mkdir(derived_sources_dir)
-
-    olddir = os.getcwd()
-    os.chdir(derived_sources_dir)
-
-    # DerivedSources.make expects Cygwin (i.e. Unix-style) python, so use that instead.
-    if building_on_win32:
-        oldpath = os.environ["PATH"]
-        os.environ["PATH"] = "/usr/bin" + os.pathsep + os.environ["PATH"]
-    command = 'make -f %s/DerivedSources.make JavaScriptCore=%s BUILT_PRODUCTS_DIR=%s all FEATURE_DEFINES="%s"' % (js_dir, js_dir, js_dir, ' '.join(feature_defines))
-    os.system(command)
-    if building_on_win32:
-        os.environ["PATH"] = oldpath
-    os.chdir(olddir)
-
-def set_options(opt):
-    common_set_options(opt)
-
-def configure(conf):
-    common_configure(conf)
-    generate_jscore_derived_sources()
     
 def build(bld):
     import Options
@@ -91,9 +62,8 @@ def build(bld):
         uselib_local = '',
         install_path = output_dir)
 
-    jscore.find_sources_in_dirs(full_dirs, excludes = jscore_excludes)  
-
-        
+    jscore.find_sources_in_dirs(full_dirs, excludes = jscore_excludes)
+    
     obj = bld.new_task_gen(
         features = 'cxx cprogram',
         includes = '. .. assembler DerivedSources ForwardingHeaders ' + ' '.join(includes),
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 52a9ea7..316c954 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,11 @@
+2010-08-16  Kevin Ollivier  <kevino at theolliviers.com>
+
+        [wx] Build fix, do not build WebCore as a convenience library as this leads to
+        errors in the Win build w/export symbols and causes problems with DOM bindings
+        debugging in gdb.
+
+        * wscript: Removed.
+
 2010-08-16  Ilya Tikhonovsky  <loislo at chromium.org>
 
         Reviewed by Adam Roben.
diff --git a/WebCore/wscript b/WebCore/wscript
deleted file mode 100644
index 97c2461..0000000
--- a/WebCore/wscript
+++ /dev/null
@@ -1,241 +0,0 @@
-#! /usr/bin/env python
-
-# Copyright (C) 2009 Kevin Ollivier  All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
-# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
-#
-# WebCore build script for the waf build system
-
-from settings import *
-
-webcore_sources = {}
-
-if build_port == "wx":
-    webcore_sources['wx'] = ['platform/KillRingNone.cpp', 'bindings/cpp/WebDOMEventTarget.cpp']  
-
-    if building_on_win32:
-        # make sure platform/wx comes after this so we get the right
-        # FontPlatformData.h
-        webcore_dirs.extend(['platform/wx/wxcode/win', 'plugins/win'])
-        webcore_sources['wx-win'] = [
-               'platform/graphics/win/TransformationMatrixWin.cpp',
-               # wxTimer on Windows has a bug that causes it to eat crashes in callbacks
-               # so we need to use the Win port's implementation until the wx bug fix is
-               # widely available (it was fixed in 2.8.10).
-               'platform/win/SharedTimerWin.cpp',
-               'platform/win/WebCoreInstanceHandle.cpp',
-               # Use the Windows plugin architecture
-               'plugins/win/PluginDataWin.cpp',
-               'plugins/win/PluginDatabaseWin.cpp',
-               'plugins/win/PluginMessageThrottlerWin.cpp',
-               'plugins/win/PluginPackageWin.cpp',
-               'plugins/win/PluginViewWin.cpp',
-        ]
-    elif sys.platform.startswith('darwin'):
-        webcore_dirs.append('plugins/mac')
-        webcore_dirs.append('platform/wx/wxcode/mac/carbon')
-        webcore_dirs.append('platform/mac')
-        webcore_dirs.append('platform/text/mac')
-        webcore_sources['wx-mac'] = [
-               'platform/mac/PurgeableBufferMac.cpp',
-               'platform/mac/WebCoreNSStringExtras.mm',
-               'platform/mac/WebCoreSystemInterface.mm',
-               'platform/graphics/cg/FloatSizeCG.cpp',
-               'platform/graphics/mac/ComplexTextController.cpp',
-               'platform/graphics/mac/ComplexTextControllerCoreText.cpp',
-               'platform/graphics/mac/ComplexTextControllerATSUI.cpp',
-               'platform/graphics/mac/GlyphPageTreeNodeMac.cpp',
-               'platform/graphics/mac/SimpleFontDataATSUI.mm',
-               'platform/graphics/mac/SimpleFontDataCoreText.cpp',
-               'platform/graphics/wx/FontPlatformDataWxMac.mm',
-               'platform/text/mac/ShapeArabic.c',
-               'platform/wx/wxcode/mac/carbon/fontprops.mm',
-               'plugins/mac/PluginPackageMac.cpp',
-               'plugins/mac/PluginViewMac.mm'
-        ]
-    else:
-        webcore_sources['wx-gtk'] = [
-               'plugins/PluginViewNone.cpp',
-               'plugins/PluginPackageNone.cpp'
-        ]
-        webcore_dirs.append('platform/wx/wxcode/gtk')
-        
-import TaskGen
-from TaskGen import taskgen, feature, after
-import Task, ccroot
-
-def generate_webcore_derived_sources():
-    # build the derived sources
-    derived_sources_dir = os.path.join(webcore_dir, 'DerivedSources')
-    wc_dir = webcore_dir
-    if building_on_win32:
-        wc_dir = get_output('cygpath --unix "%s"' % wc_dir)
-    if not os.path.exists(derived_sources_dir):
-        os.mkdir(derived_sources_dir)
-
-    olddir = os.getcwd()
-    os.chdir(derived_sources_dir)
-
-    os.system('make -f %s/DerivedSources.make WebCore=%s SOURCE_ROOT=%s all FEATURE_DEFINES="%s"' % (wc_dir, wc_dir, wc_dir, ' '.join(feature_defines)))
-    os.chdir(olddir)
-
-def set_options(opt):
-    common_set_options(opt)
-
-def configure(conf):
-    common_configure(conf)
-    generate_webcore_derived_sources()
-    if sys.platform.startswith('win'):
-        graphics_dir = os.path.join(wk_root, 'WebCore', 'platform', 'graphics')
-        # HACK ALERT: MSVC automatically adds the source file's directory as the first entry in the
-        # path. Unfortunately, that means when compiling these files we will end up including
-        # win/FontPlatformData.h, which breaks wx compilation. So we copy the files to the wx dir.
-        for afile in ['UniscribeController.h', 'UniscribeController.cpp', 'GlyphPageTreeNodeCairoWin.cpp']:
-            shutil.copy(os.path.join(graphics_dir, 'win', afile), os.path.join(graphics_dir, 'wx'))
-
-def build(bld):
-    import Options
-    
-    import TaskGen
-
-    if sys.platform.startswith('darwin'):
-        TaskGen.task_gen.mappings['.mm'] = TaskGen.task_gen.mappings['.cxx']
-        TaskGen.task_gen.mappings['.m'] = TaskGen.task_gen.mappings['.cxx']
-    
-    wk_includes = ['.', '..', 'DerivedSources',
-                wk_root, 
-                os.path.join(wk_root, 'JavaScriptCore'),
-                os.path.join(wk_root, 'JavaScriptCore', 'wtf', 'text'),
-                os.path.join(wk_root, 'WebCore'),
-                os.path.join(wk_root, 'WebKit/wx'),
-                'platform/image-decoders',
-                'platform/win',
-                'platform/wx/wxcode',
-                'workers',
-        ]
-
-    features = [build_port]
-    exclude_patterns = ['*AllInOne.cpp', '*Brew.cpp', '*CFNet.cpp', '*Chromium*.cpp', 
-            '*Efl.cpp', '*Gtk.cpp', '*Haiku.cpp', '*Mac.cpp', '*None.cpp', '*Qt.cpp', '*Safari.cpp',
-            'test*bindings.*', '*Wince.cpp', "WebDOMCanvas*.cpp", "WebDOMSVG*.cpp"]
-    if build_port == 'wx':
-        features.append('curl')
-        if not building_on_win32:
-            exclude_patterns.append('*Win.cpp')
-        
-    if sys.platform.startswith('darwin'):
-        features.append('cf')
-        bld.install_files(os.path.join(output_dir, 'WebCore'), 'platform/mac/WebCoreSystemInterface.h')
-    else:
-        exclude_patterns.append('*CF.cpp')
-
-    full_dirs = get_dirs_for_features(webcore_dir, features=features, dirs=webcore_dirs)
-
-    jscore_dir = os.path.join(wk_root, 'JavaScriptCore')
-    for item in os.listdir(jscore_dir):
-        fullpath = os.path.join(jscore_dir, item)
-        if os.path.isdir(fullpath) and not item == "os-win32" and not item == 'icu':
-            wk_includes.append(fullpath)
-
-    wk_includes.append(os.path.join(jscore_dir, 'wtf', 'unicode'))
-    wk_includes.append(os.path.join(jscore_dir, 'wtf', 'unicode', 'icu'))
-    wk_includes += common_includes + full_dirs
-    if sys.platform.startswith('darwin'):
-        wk_includes.append(os.path.join(webcore_dir, 'icu'))
-
-    cxxflags = []
-    if building_on_win32:
-        cxxflags.append('/FIWebCorePrefix.h')
-    else:
-        cxxflags.extend(['-include', 'WebCorePrefix.h'])
-
-    webcore = bld.new_task_gen(
-        features = 'cc cxx cstaticlib',
-        includes = ' '.join(wk_includes),
-        source = ' '.join(flattenSources(webcore_sources.values())),
-        cxxflags = cxxflags,
-        defines = ['WXMAKINGDLL_WEBKIT'],
-        target = 'webcore',
-        uselib = 'WX ICU XML XSLT CURL SQLITE3 ' + get_config(),
-        uselib_local = '',
-        install_path = output_dir,
-        )
-        
-    excludes = []
-    
-    if build_port == 'wx':
-        excludes = get_excludes(webcore_dir, exclude_patterns)
-        excludes.extend(['UserStyleSheetLoader.cpp', 'RenderMediaControls.cpp'])
-
-        # intermediate sources
-        excludes.append('CSSValueKeywords.cpp')
-        excludes.append('CSSPropertyNames.cpp')
-        excludes.append('tokenizer.cpp')
-
-        # FIXME: these three require headers that I can't seem to find in trunk.
-        # Investigate how to resolve these issues.
-        excludes.append('JSAbstractView.cpp')
-        excludes.append('JSPositionCallback.cpp')
-        excludes.append('JSInspectorController.cpp')
-        
-        # The bindings generator seems to think these are ref-counted, while they aren't in trunk.
-        excludes.append('JSElementTimeControl.cpp')
-        excludes.append('JSSVGAnimatedPathData.cpp')
-        excludes.append('JSSVGAnimatedPoints.cpp')
-        excludes.append('JSSVGExternalResourcesRequired.cpp')
-        excludes.append('JSSVGFilterPrimitiveStandardAttributes.cpp')
-        excludes.append('JSSVGLocatable.cpp')
-        excludes.append('JSSVGStyleTable.cpp')
-        excludes.append('JSSVGTests.cpp')
-        excludes.append('JSSVGStylable.cpp')
-        excludes.append('JSSVGZoomAndPan.cpp')
-        
-        # These are files that expect methods not in the base C++ class, usually XYZAnimated methods.
-        excludes.append('JSSVGFitToViewBox.cpp')
-        excludes.append('JSSVGLangSpace.cpp')
-        excludes.append('JSSVGTransformable.cpp')
-        excludes.append('JSSVGURIReference.cpp')
-        
-        # These are C++ DOM Bindings that won't compile because they look for things not in trunk.
-        excludes.append('WebDOMEventTarget.cpp')
-        excludes.append('WebDOMAbstractView.cpp')
-        excludes.append('WebDOMBlobBuilder.cpp')
-        excludes.append('WebDOMEventListenerCustom.cpp')
-        excludes.append('WebDOMElementTimeControl.cpp')
-        excludes.append('WebDOMImageData.cpp')
-        excludes.append('WebDOMInspectorBackend.cpp')
-        excludes.append('WebDOMScriptProfile.cpp')
-        excludes.append('WebDOMScriptProfileNode.cpp')
-        excludes.append('WebNativeEventListener.cpp')
-        
-        if building_on_win32:
-            excludes.append('SharedTimerWx.cpp')
-            excludes.append('RenderThemeWin.cpp')
-            excludes.append('KeyEventWin.cpp')
-            
-        if building_on_win32 or sys.platform.startswith('darwin'):
-            excludes.append('GlyphMapWx.cpp')
-        excludes.append('AuthenticationCF.cpp')
-        excludes.append('LoaderRunLoopCF.cpp')
-        excludes.append('ResourceErrorCF.cpp')
-        
-    webcore.find_sources_in_dirs(full_dirs, excludes = excludes, exts=['.c', '.cpp'])
diff --git a/WebKit/wx/ChangeLog b/WebKit/wx/ChangeLog
index 3e78070..342edea 100644
--- a/WebKit/wx/ChangeLog
+++ b/WebKit/wx/ChangeLog
@@ -1,5 +1,14 @@
 2010-08-16  Kevin Ollivier  <kevino at theolliviers.com>
 
+        [wx] Build fix, do not build WebCore as a convenience library as this leads to
+        errors in the Win build w/export symbols and causes problems with DOM bindings
+        debugging in gdb.
+        
+        * WebKitDefines.h:
+        * bindings/python/wscript:
+
+2010-08-16  Kevin Ollivier  <kevino at theolliviers.com>
+
         wxMSW build fix. Don't build the Python DOM bindings until we get the export issues
         sorted out.
 
diff --git a/WebKit/wx/WebKitDefines.h b/WebKit/wx/WebKitDefines.h
index 67ad868..66e4216 100644
--- a/WebKit/wx/WebKitDefines.h
+++ b/WebKit/wx/WebKitDefines.h
@@ -34,7 +34,7 @@
 #define WXDLLIMPEXP_WEBKIT __attribute__ ((visibility("default")))
 #elif defined(WXMAKINGDLL_WEBKIT)
 #define WXDLLIMPEXP_WEBKIT WXEXPORT
-#elif defined(WXUSINGDLL_WEBKIT)
+#else
 #define WXDLLIMPEXP_WEBKIT WXIMPORT
 #endif
 
diff --git a/WebKit/wx/bindings/python/wscript b/WebKit/wx/bindings/python/wscript
index 617a839..cd07836 100644
--- a/WebKit/wx/bindings/python/wscript
+++ b/WebKit/wx/bindings/python/wscript
@@ -53,15 +53,6 @@ def wxpy_swig_include():
             return fullpath
             
     return ''
-
-def set_options(opt):
-    common_set_options(opt)
-
-def configure(conf):
-    if Options.options.wxpython:
-        common_configure(conf)
-        conf.check_tool('swig', tooldir='.')
-        conf.check_swig_version('1.3.29')
     
 def build(bld):
     if Options.options.wxpython:
@@ -94,9 +85,9 @@ def build(bld):
             swig_flags = ' '.join(wx_swig_args),
             defines = defines,
             target = '_webview',
-            uselib = 'WX CURL ICU XSLT XML SQLITE3 WXWEBKIT ' + get_config(),
+            uselib = 'WX CURL ICU XSLT XML SQLITE3 ' + get_config(),
             
             libpath = [output_dir],
-            uselib_local = '',
+            uselib_local = 'wxwebkit',
             install_path = output_dir
             )
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index ba306ef..beca330 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,15 @@
+2010-08-16  Kevin Ollivier  <kevino at theolliviers.com>
+
+        [wx] Build fix, do not build WebCore as a convenience library as this leads to
+        errors in the Win build w/export symbols and causes problems with DOM bindings
+        debugging in gdb.
+
+        * DumpRenderTree/wscript:
+        * Scripts/build-webkit:
+        * wx/browser/wscript:
+        * wx/build/settings.py:
+        * wx/build/waf_extensions.py:
+
 2010-08-16  Dan Bernstein  <mitz at apple.com>
 
         Build fix.
diff --git a/WebKitTools/DumpRenderTree/wscript b/WebKitTools/DumpRenderTree/wscript
index 75d208f..4aaedb4 100644
--- a/WebKitTools/DumpRenderTree/wscript
+++ b/WebKitTools/DumpRenderTree/wscript
@@ -58,8 +58,8 @@ def build(bld):
         includes = ' '.join(include_paths),
         source = sources,
         target = 'DumpRenderTree',
-        uselib = 'JSCORE ICU WXWEBKIT WX ' + get_config(),
+        uselib = 'ICU WX ' + get_config(),
         libpath = [output_dir],
-        uselib_local = '',
+        uselib_local = 'jscore wxwebkit',
         install_path = output_dir)
         
diff --git a/WebKitTools/Scripts/build-webkit b/WebKitTools/Scripts/build-webkit
index 3b8dd9c..b12fc42 100755
--- a/WebKitTools/Scripts/build-webkit
+++ b/WebKitTools/Scripts/build-webkit
@@ -404,9 +404,13 @@ if (isInspectorFrontend()) {
 
 if (isWx()) {
     downloadWafIfNeeded();
-    push @projects, 'WebKitTools/DumpRenderTree';
-    push @projects, 'WebKitTools/wx/browser';
-    push @projects, 'WebKit/wx/bindings/python';
+    @options = ();
+    if (defined($makeArgs)) {
+        @options = split(/ /, $makeArgs);
+    }
+    @projects = ();
+    my $result = buildWafProject('.', $clean, @options);
+    exit exitStatus($result) if exitStatus($result);
 }
 
 if (isChromium()) {
@@ -439,16 +443,6 @@ for my $dir (@projects) {
         if ($dir eq "WebKit") {
             $result = buildVisualStudioProject("win/WebKit.vcproj/WebKit.sln", $clean);
         }
-    } elsif (isWx()) {
-        @options = ();
-        if (defined($makeArgs)) {
-            @options = split(/ /, $makeArgs);
-        }
-        if ($dir eq "WebKit" && isWx()) {
-            chdir 'wx' or die;
-        }
-            
-        $result = buildWafProject($dir, $clean, @options);
     }
 
     if (exitStatus($result)) {
diff --git a/WebKitTools/wx/browser/wscript b/WebKitTools/wx/browser/wscript
index bd2640c..8c22cf6 100644
--- a/WebKitTools/wx/browser/wscript
+++ b/WebKitTools/wx/browser/wscript
@@ -46,9 +46,9 @@ def build(bld):
         includes = ' '.join(include_paths),
         source = 'browser.cpp',
         target = 'wxBrowser',
-        uselib = 'WX CURL ICU XSLT XML WXWEBKIT ' + get_config(),
+        uselib = 'WX CURL ICU XSLT XML ' + get_config(),
         libpath = [output_dir],
-        uselib_local = '',
+        uselib_local = 'wxwebkit',
         install_path = output_dir)
         
     if sys.platform.startswith('darwin'):
diff --git a/WebKitTools/wx/build/settings.py b/WebKitTools/wx/build/settings.py
index 302beb6..74d9789 100644
--- a/WebKitTools/wx/build/settings.py
+++ b/WebKitTools/wx/build/settings.py
@@ -97,56 +97,56 @@ jscore_dirs = [
 ]
 
 webcore_dirs = [
-    'accessibility',
-    'bindings',
-    'bindings/cpp',
-    'bindings/generic',
-    'bindings/js',
-    'bridge', 
-    'bridge/c',
-    'bridge/jsc',
-    'css',
-    'DerivedSources',
-    'dom',
-    'dom/default',
-    'editing', 
-    'history', 
-    'html',
-    'html/canvas',
-    'inspector', 
-    'loader', 
-    'loader/appcache', 
-    'loader/archive', 
-    'loader/icon',
-    'notifications',
-    'page',
-    'page/animation', 
-    'platform', 
-    'platform/animation', 
-    'platform/graphics',
-    'platform/graphics/filters',
-    'platform/graphics/transforms',
-    'platform/image-decoders',
-    'platform/image-decoders/bmp', 
-    'platform/image-decoders/gif', 
-    'platform/image-decoders/ico', 
-    'platform/image-decoders/jpeg', 
-    'platform/image-decoders/png',
-    'platform/mock',
-    'platform/network', 
-    'platform/sql', 
-    'platform/text',
-    'platform/text/transcoder',
-    'plugins', 
-    'rendering', 
-    'rendering/style', 
-    'storage',
-    'svg',
-    'svg/animation',
-    'svg/graphics',
-    'svg/graphics/filters',
-    'websockets', 
-    'xml'
+    'WebCore/accessibility',
+    'WebCore/bindings',
+    'WebCore/bindings/cpp',
+    'WebCore/bindings/generic',
+    'WebCore/bindings/js',
+    'WebCore/bridge', 
+    'WebCore/bridge/c',
+    'WebCore/bridge/jsc',
+    'WebCore/css',
+    'WebCore/DerivedSources',
+    'WebCore/dom',
+    'WebCore/dom/default',
+    'WebCore/editing', 
+    'WebCore/history', 
+    'WebCore/html',
+    'WebCore/html/canvas',
+    'WebCore/inspector', 
+    'WebCore/loader', 
+    'WebCore/loader/appcache', 
+    'WebCore/loader/archive', 
+    'WebCore/loader/icon',
+    'WebCore/notifications',
+    'WebCore/page',
+    'WebCore/page/animation', 
+    'WebCore/platform', 
+    'WebCore/platform/animation', 
+    'WebCore/platform/graphics',
+    'WebCore/platform/graphics/filters',
+    'WebCore/platform/graphics/transforms',
+    'WebCore/platform/image-decoders',
+    'WebCore/platform/image-decoders/bmp', 
+    'WebCore/platform/image-decoders/gif', 
+    'WebCore/platform/image-decoders/ico', 
+    'WebCore/platform/image-decoders/jpeg', 
+    'WebCore/platform/image-decoders/png',
+    'WebCore/platform/mock',
+    'WebCore/platform/network', 
+    'WebCore/platform/sql', 
+    'WebCore/platform/text',
+    'WebCore/platform/text/transcoder',
+    'WebCore/plugins', 
+    'WebCore/rendering', 
+    'WebCore/rendering/style', 
+    'WebCore/storage',
+    'WebCore/svg',
+    'WebCore/svg/animation',
+    'WebCore/svg/graphics',
+    'WebCore/svg/graphics/filters',
+    'WebCore/websockets', 
+    'WebCore/xml'
 ]
 
 config = get_config(wk_root)
@@ -289,9 +289,6 @@ def common_configure(conf):
     
         conf.env.append_value('CXXDEFINES', ['BUILDING_WX__=1', 'JS_NO_EXPORT'])
 
-        conf.env['LIB_WXWEBKIT'] = ['wxwebkit']
-        conf.env['CXXDEFINES_WXWEBKIT'] = ['WXUSINGDLL_WEBKIT']
-
         if building_on_win32:
             conf.env.append_value('LIBPATH', os.path.join(msvclibs_dir, 'lib'))
             # wx settings
@@ -303,22 +300,8 @@ def common_configure(conf):
             conf.env['LIB_WX'] = wxlibs
             conf.env['LIBPATH_WX'] = wxlibpaths
 
-    if building_on_win32:
-        conf.env['LIB_JSCORE'] = [libprefix + 'jscore']
-        conf.env['LIB_WEBCORE'] = [libprefix + 'webcore']
-    elif sys.platform.startswith('darwin'):
-        conf.env['LINKFLAGS_JSCORE'] = ['-Wl,-force_load,%s' % os.path.join(output_dir, 'libjscore.a')]
-        conf.env['LINKFLAGS_WEBCORE'] = ['-Wl,-force_load,%s' % os.path.join(output_dir, 'libwebcore.a')]
-    else:
-        conf.env['LINKFLAGS_JSCORE'] = ['-Wl,-whole-archive', '-ljscore', '-Wl,-no-whole-archive']
-        conf.env['LINKFLAGS_WEBCORE'] = ['-Wl,-whole-archive', '-lwebcore', '-Wl,-no-whole-archive']
-
     if sys.platform.startswith('darwin'):
         conf.env['LIB_ICU'] = ['icucore']
-        # Apple does not ship the ICU headers with Mac OS X, so WebKit includes a copy of 3.2 headers
-        conf.env.append_value('CPPPATH_JSCORE', os.path.join(jscore_dir, 'icu'))
-        
-        conf.env.append_value('CPPPATH_WEBCORE', os.path.join(webcore_dir, 'icu'))
     
         conf.env.append_value('CPPPATH', wklibs_dir)
         conf.env.append_value('LIBPATH', wklibs_dir)
@@ -340,12 +323,12 @@ def common_configure(conf):
         sdk_version = min_version
         if min_version == "10.4":
             sdk_version += "u"
-            conf.env.append_value('LIB_WEBCORE', ['WebKitSystemInterfaceTiger'])
+            conf.env.append_value('LIB_WKINTERFACE', ['WebKitSystemInterfaceTiger'])
         else:
             # NOTE: There is a WebKitSystemInterfaceSnowLeopard, but when we use that
             # on 10.6, we get a strange missing symbol error, and this library seems to
             # work fine for wx's purposes.
-            conf.env.append_value('LIB_WEBCORE', ['WebKitSystemInterfaceLeopard'])
+            conf.env.append_value('LIB_WKINTERFACE', ['WebKitSystemInterfaceLeopard'])
         
         sdkroot = '/Developer/SDKs/MacOSX%s.sdk' % sdk_version
         sdkflags = ['-arch', 'i386', '-isysroot', sdkroot]
diff --git a/WebKitTools/wx/build/waf_extensions.py b/WebKitTools/wx/build/waf_extensions.py
index 6816441..f50f264 100644
--- a/WebKitTools/wx/build/waf_extensions.py
+++ b/WebKitTools/wx/build/waf_extensions.py
@@ -35,7 +35,12 @@ def exec_command(s, **kw):
     if sys.platform.startswith('win') and len(' '.join(s)) > 32000:
         import tempfile
         (fd, filename) = tempfile.mkstemp()
-        os.write(fd, ' '.join(s[1:]))
+        t = []
+        for i in s:
+            if i.find(" ") != -1:
+                i = '"%s"' % i
+            t.append(i)
+        os.write(fd, ' '.join(t[1:]))
         os.close(fd)
         
         s = [s[0], '@' + filename]
diff --git a/wscript b/wscript
new file mode 100644
index 0000000..3fac8e2
--- /dev/null
+++ b/wscript
@@ -0,0 +1,312 @@
+#! /usr/bin/env python
+
+# Copyright (C) 2009 Kevin Ollivier  All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+#
+# WebCore build script for the waf build system
+
+import Options
+
+from settings import *
+
+webcore_dirs.extend(['WebKit/wx', 'WebKit/wx/WebKitSupport'])
+
+wk_includes = ['.', 'WebCore', 'WebCore/DerivedSources',
+                os.path.join(wk_root, 'JavaScriptCore'),
+                os.path.join(wk_root, 'JavaScriptCore', 'wtf', 'text'),
+                os.path.join(wk_root, 'WebCore'),
+                os.path.join(wk_root, 'WebKit/wx'),
+                os.path.join(output_dir),
+                'WebCore/platform/image-decoders',
+                'WebCore/platform/win',
+                'WebCore/platform/wx/wxcode',
+                'WebCore/workers',
+        ]
+
+if sys.platform.startswith("win"):
+    wk_includes.append(os.path.join(wk_root, 'WebCore','platform','win'))
+
+windows_deps = [
+                'lib/pthreadVC2.dll',
+                'bin/icuuc40.dll', 'bin/icudt40.dll', 'bin/icuin40.dll',
+                'bin/libcurl.dll', 'bin/libeay32.dll', 'bin/ssleay32.dll', 'bin/zlib1.dll',
+                'lib/sqlite3.dll', 'bin/libxml2.dll', 'bin/libxslt.dll', 'bin/iconv.dll',
+                ]
+
+webcore_sources = {}
+
+if build_port == "wx":
+    webcore_sources['wx'] = ['WebCore/platform/KillRingNone.cpp', 'WebCore/bindings/cpp/WebDOMEventTarget.cpp']  
+
+    if building_on_win32:
+        # make sure platform/wx comes after this so we get the right
+        # FontPlatformData.h
+        webcore_dirs.extend(['WebCore/platform/wx/wxcode/win', 'WebCore/plugins/win'])
+        webcore_sources['wx-win'] = [
+               'WebCore/platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp',
+               'WebCore/platform/graphics/win/TransformationMatrixWin.cpp',
+               # wxTimer on Windows has a bug that causes it to eat crashes in callbacks
+               # so we need to use the Win port's implementation until the wx bug fix is
+               # widely available (it was fixed in 2.8.10).
+               'WebCore/platform/win/SharedTimerWin.cpp',
+               'WebCore/platform/win/WebCoreInstanceHandle.cpp',
+               # Use the Windows plugin architecture
+               #'WebCore/plugins/win/PluginDataWin.cpp',
+               'WebCore/plugins/win/PluginDatabaseWin.cpp',
+               'WebCore/plugins/win/PluginMessageThrottlerWin.cpp',
+               'WebCore/plugins/win/PluginPackageWin.cpp',
+               'WebCore/plugins/win/PluginViewWin.cpp',
+        ]
+    elif sys.platform.startswith('darwin'):
+        webcore_dirs.append('WebCore/plugins/mac')
+        webcore_dirs.append('WebCore/platform/wx/wxcode/mac/carbon')
+        webcore_dirs.append('WebCore/platform/mac')
+        webcore_dirs.append('WebCore/platform/text/mac')
+        webcore_sources['wx-mac'] = [
+               'WebCore/platform/mac/PurgeableBufferMac.cpp',
+               'WebCore/platform/mac/WebCoreNSStringExtras.mm',
+               'WebCore/platform/mac/WebCoreSystemInterface.mm',
+               'WebCore/platform/graphics/cg/FloatSizeCG.cpp',
+               'WebCore/platform/graphics/mac/ComplexTextController.cpp',
+               'WebCore/platform/graphics/mac/ComplexTextControllerCoreText.cpp',
+               'WebCore/platform/graphics/mac/ComplexTextControllerATSUI.cpp',
+               'WebCore/platform/graphics/mac/GlyphPageTreeNodeMac.cpp',
+               'WebCore/platform/graphics/mac/SimpleFontDataATSUI.mm',
+               'WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp',
+               'WebCore/platform/graphics/wx/FontPlatformDataWxMac.mm',
+               'WebCore/platform/text/mac/ShapeArabic.c',
+               'WebCore/platform/wx/wxcode/mac/carbon/fontprops.mm',
+               'WebCore/plugins/mac/PluginPackageMac.cpp',
+               'WebCore/plugins/mac/PluginViewMac.mm'
+        ]
+    else:
+        webcore_sources['wx-gtk'] = [
+               'WebCore/plugins/PluginViewNone.cpp',
+               'WebCore/plugins/PluginPackageNone.cpp'
+        ]
+        webcore_dirs.append('WebCore/platform/wx/wxcode/gtk')
+        
+import TaskGen
+from TaskGen import taskgen, feature, after
+import Task, ccroot
+
+def generate_webcore_derived_sources():
+    # build the derived sources
+    derived_sources_dir = os.path.join(webcore_dir, 'DerivedSources')
+    wc_dir = webcore_dir
+    if building_on_win32:
+        wc_dir = get_output('cygpath --unix "%s"' % wc_dir)
+    if not os.path.exists(derived_sources_dir):
+        os.mkdir(derived_sources_dir)
+
+    olddir = os.getcwd()
+    os.chdir(derived_sources_dir)
+    
+    # DerivedSources.make expects Cygwin (i.e. Unix-style) python, so use that instead.
+    if building_on_win32:
+        oldpath = os.environ["PATH"]
+        os.environ["PATH"] = "/usr/bin" + os.pathsep + os.environ["PATH"]
+    os.system('make -f %s/DerivedSources.make WebCore=%s SOURCE_ROOT=%s all FEATURE_DEFINES="%s"' % (wc_dir, wc_dir, wc_dir, ' '.join(feature_defines)))
+    if building_on_win32:
+        os.environ["PATH"] = oldpath
+    os.chdir(olddir)
+
+def generate_jscore_derived_sources():
+    # build the derived sources
+    js_dir = jscore_dir
+    if building_on_win32:
+        js_dir = get_output('cygpath --unix "%s"' % js_dir)
+    derived_sources_dir = os.path.join(jscore_dir, 'DerivedSources')
+    if not os.path.exists(derived_sources_dir):
+        os.mkdir(derived_sources_dir)
+
+    olddir = os.getcwd()
+    os.chdir(derived_sources_dir)
+
+    # DerivedSources.make expects Cygwin (i.e. Unix-style) python, so use that instead.
+    if building_on_win32:
+        oldpath = os.environ["PATH"]
+        os.environ["PATH"] = "/usr/bin" + os.pathsep + os.environ["PATH"]
+    command = 'make -f %s/DerivedSources.make JavaScriptCore=%s BUILT_PRODUCTS_DIR=%s all FEATURE_DEFINES="%s"' % (js_dir, js_dir, js_dir, ' '.join(feature_defines))
+    os.system(command)
+    if building_on_win32:
+        os.environ["PATH"] = oldpath
+    os.chdir(olddir)
+
+def set_options(opt):
+    common_set_options(opt)
+
+def configure(conf):
+    common_configure(conf)
+    generate_jscore_derived_sources()
+    generate_webcore_derived_sources()
+    if sys.platform.startswith('win'):
+        graphics_dir = os.path.join(wk_root, 'WebCore', 'platform', 'graphics')
+        # HACK ALERT: MSVC automatically adds the source file's directory as the first entry in the
+        # path. Unfortunately, that means when compiling these files we will end up including
+        # win/FontPlatformData.h, which breaks wx compilation. So we copy the files to the wx dir.
+        for afile in ['UniscribeController.h', 'UniscribeController.cpp', 'GlyphPageTreeNodeCairoWin.cpp']:
+            shutil.copy(os.path.join(graphics_dir, 'win', afile), os.path.join(graphics_dir, 'wx'))
+
+    webcore_out_dir = os.path.join(output_dir, 'WebCore')
+    if not os.path.exists(webcore_out_dir):
+        os.makedirs(webcore_out_dir)
+    shutil.copy('WebCore/platform/mac/WebCoreSystemInterface.h', os.path.join(output_dir, 'WebCore', 'WebCoreSystemInterface.h'))
+    jscore_out_dir = os.path.join(output_dir, 'JavaScriptCore')
+    if not os.path.exists(jscore_out_dir):
+        os.makedirs(jscore_out_dir)
+    for api_file in glob.glob(os.path.join(jscore_dir, 'API/*.h')):
+        shutil.copy(api_file, os.path.join(jscore_out_dir, os.path.basename(api_file)))
+
+    if Options.options.wxpython:
+        common_configure(conf)
+        conf.check_tool('swig', tooldir='WebKit/wx/bindings/python')
+        conf.check_swig_version('1.3.29')
+
+def build(bld):  
+    import TaskGen
+    global wk_includes
+
+    bld.add_subdirs('JavaScriptCore')
+
+    if sys.platform.startswith('darwin'):
+        TaskGen.task_gen.mappings['.mm'] = TaskGen.task_gen.mappings['.cxx']
+        TaskGen.task_gen.mappings['.m'] = TaskGen.task_gen.mappings['.cxx']
+
+    features = [build_port]
+    exclude_patterns = ['*AllInOne.cpp', '*Brew.cpp', '*CFNet.cpp', '*Chromium*.cpp', 
+            '*Efl.cpp', '*Gtk.cpp', '*Haiku.cpp', '*Mac.cpp', '*None.cpp', '*Qt.cpp', '*Safari.cpp',
+            'test*bindings.*', '*Wince.cpp', "WebDOMCanvas*.cpp", "WebDOMSVG*.cpp"]
+    if build_port == 'wx':
+        features.append('curl')
+        exclude_patterns.append('*Win.cpp')
+        
+    if sys.platform.startswith('darwin'):
+        features.append('cf')
+        
+    else:
+        exclude_patterns.append('*CF.cpp')
+
+    full_dirs = get_dirs_for_features(wk_root, features=features, dirs=webcore_dirs)
+
+    jscore_dir = os.path.join(wk_root, 'JavaScriptCore')
+    for item in os.listdir(jscore_dir):
+        fullpath = os.path.join(jscore_dir, item)
+        if os.path.isdir(fullpath) and not item == "os-win32" and not item == 'icu':
+            wk_includes.append(fullpath)
+
+    wk_includes.append(os.path.join(jscore_dir, 'wtf', 'unicode'))
+    wk_includes.append(os.path.join(jscore_dir, 'wtf', 'unicode', 'icu'))
+    wk_includes += common_includes + full_dirs
+    if sys.platform.startswith('darwin'):
+        wk_includes.append(os.path.join(webcore_dir, 'icu'))
+
+    cxxflags = []
+    if building_on_win32:
+        cxxflags.append('/FIWebCorePrefix.h')
+    else:
+        cxxflags.extend(['-include', 'WebCorePrefix.h'])
+
+    webcore = bld.new_task_gen(
+        features = 'cc cxx cshlib',
+        includes = ' '.join(wk_includes),
+        source = ' '.join(flattenSources(webcore_sources.values())),
+        cxxflags = cxxflags,
+        defines = ['WXMAKINGDLL_WEBKIT', 'BUILDING_WebCore'],
+        libpath = [output_dir],
+        target = 'wxwebkit',
+        uselib = 'WX ICU XML XSLT CURL SQLITE3 WKINTERFACE ' + get_config(),
+        uselib_local = 'jscore',
+        install_path = output_dir,
+        )
+        
+    excludes = []
+    
+    if build_port == 'wx':
+        excludes = get_excludes(webcore_dir, exclude_patterns)
+        excludes.extend(['UserStyleSheetLoader.cpp', 'RenderMediaControls.cpp'])
+
+        # intermediate sources
+        excludes.append('ColorData.cpp')
+        excludes.append('CSSValueKeywords.cpp')
+        excludes.append('CSSPropertyNames.cpp')
+        excludes.append('DocTypeStrings.cpp')
+        excludes.append('HTMLEntityNames.cpp')
+        excludes.append('tokenizer.cpp')
+
+        # FIXME: these three require headers that I can't seem to find in trunk.
+        # Investigate how to resolve these issues.
+        excludes.append('JSAbstractView.cpp')
+        excludes.append('JSPositionCallback.cpp')
+        excludes.append('JSInspectorController.cpp')
+        
+        # The bindings generator seems to think these are ref-counted, while they aren't in trunk.
+        excludes.append('JSElementTimeControl.cpp')
+        excludes.append('JSSVGAnimatedPathData.cpp')
+        excludes.append('JSSVGAnimatedPoints.cpp')
+        excludes.append('JSSVGExternalResourcesRequired.cpp')
+        excludes.append('JSSVGFilterPrimitiveStandardAttributes.cpp')
+        excludes.append('JSSVGLocatable.cpp')
+        excludes.append('JSSVGStyleTable.cpp')
+        excludes.append('JSSVGTests.cpp')
+        excludes.append('JSSVGStylable.cpp')
+        excludes.append('JSSVGZoomAndPan.cpp')
+        
+        # These are files that expect methods not in the base C++ class, usually XYZAnimated methods.
+        excludes.append('JSSVGFitToViewBox.cpp')
+        excludes.append('JSSVGLangSpace.cpp')
+        excludes.append('JSSVGTransformable.cpp')
+        excludes.append('JSSVGURIReference.cpp')
+        
+        # These are C++ DOM Bindings that won't compile because they look for things not in trunk.
+        excludes.append('WebDOMEventTarget.cpp')
+        excludes.append('WebDOMAbstractView.cpp')
+        excludes.append('WebDOMBlobBuilder.cpp')
+        excludes.append('WebDOMEventListenerCustom.cpp')
+        excludes.append('WebDOMElementTimeControl.cpp')
+        excludes.append('WebDOMImageData.cpp')
+        excludes.append('WebDOMInspectorBackend.cpp')
+        excludes.append('WebDOMScriptProfile.cpp')
+        excludes.append('WebDOMScriptProfileNode.cpp')
+        excludes.append('WebNativeEventListener.cpp')
+        
+        if building_on_win32:
+            excludes.append('SharedTimerWx.cpp')
+            excludes.append('RenderThemeWin.cpp')
+            excludes.append('KeyEventWin.cpp')
+            
+        if building_on_win32 or sys.platform.startswith('darwin'):
+            excludes.append('GlyphMapWx.cpp')
+        excludes.append('AuthenticationCF.cpp')
+        excludes.append('LoaderRunLoopCF.cpp')
+        excludes.append('ResourceErrorCF.cpp')
+        
+        if sys.platform.startswith('darwin'):
+            webcore.includes += ' WebKit/mac/WebCoreSupport WebCore/platform/mac'
+            webcore.source += " WebKit/mac/WebCoreSupport/WebSystemInterface.mm"
+            
+    webcore.find_sources_in_dirs(full_dirs, excludes = excludes, exts=['.c', '.cpp'])
+
+    bld.add_group()
+    
+    bld.add_subdirs(['WebKitTools/DumpRenderTree', 'WebKitTools/wx/browser', 'WebKit/wx/bindings/python'])

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list