WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-118367-20130705103758.patch (text/plain), 69.72 KB, created by
Marcelo Lira
on 2013-07-05 06:40:07 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Marcelo Lira
Created:
2013-07-05 06:40:07 PDT
Size:
69.72 KB
patch
obsolete
>Subversion Revision: 152297 >diff --git a/Source/Platform/ChangeLog b/Source/Platform/ChangeLog >index ecb85887df278ea08e8835f0eb2812d2a1e1733d..4111da339411839c242b5a02297474b4bc4dca1d 100644 >--- a/Source/Platform/ChangeLog >+++ b/Source/Platform/ChangeLog >@@ -1,3 +1,13 @@ >+2013-07-05 Marcelo Lira <marcelo.lira@openbossa.org> >+ >+ Nix upstreaming - Adding build files and supporting scripts >+ https://bugs.webkit.org/show_bug.cgi?id=118367 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * CMakeLists.txt: Added. >+ * PlatformNix.cmake: Added. >+ > 2013-06-14 Zan Dobersek <zdobersek@igalia.com> > > Unreviewed GTK build fix. >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 61ce9f93aa9451036030c13b78828d39ea690073..330aa2e9370a8d250a0e648c4893031277476d11 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,14 @@ >+2013-07-05 Marcelo Lira <marcelo.lira@openbossa.org> >+ >+ Nix upstreaming - Adding build files and supporting scripts >+ https://bugs.webkit.org/show_bug.cgi?id=118367 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * wtf/FeatureDefines.h: >+ * wtf/Platform.h: >+ * wtf/PlatformNix.cmake: Added. >+ > 2013-07-02 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> > > Avoid code duplication inside String::append() >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 35c9a82820b1fd07b98a515a1bb63df81a78d610..44ee31e859d497d44d4f9154ef55a4bfaef37c07 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,15 @@ >+2013-07-05 Marcelo Lira <marcelo.lira@openbossa.org> >+ >+ Nix upstreaming - Adding build files and supporting scripts >+ https://bugs.webkit.org/show_bug.cgi?id=118367 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No new tests (OOPS!). >+ >+ * CMakeLists.txt: >+ * PlatformNix.cmake: Added. >+ > 2013-07-02 peavo@outlook.com <peavo@outlook.com> > > [Curl] Crash after download. >diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt >index 3736eea17a45ef4a1d752164fa925a2b87f8aaa4..268ba2e248da679a8f3ef10b1e79f9159785e1ed 100644 >--- a/Source/CMakeLists.txt >+++ b/Source/CMakeLists.txt >@@ -5,6 +5,10 @@ add_subdirectory(WTF) > > add_subdirectory(JavaScriptCore) > >+if ("${PORT}" STREQUAL "Nix") >+ add_subdirectory(Platform) >+endif () >+ > if (ENABLE_API_TESTS) > add_subdirectory(cmake/gtest) > endif () >@@ -26,6 +30,13 @@ WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS() > # ----------------------------------------------------------------------------- > # Set compiler flags for all targets > # ----------------------------------------------------------------------------- >+if ("${PORT}" STREQUAL "Nix") >+ if (NOT DISABLE_STRICT_BUILD) >+ set(ADDITIONAL_FLAGS ENABLE_WERROR) >+ endif () >+ WEBKIT_SET_EXTRA_COMPILER_FLAGS(Platform ${ADDITIONAL_FLAGS}) >+endif () >+ > if (${PORT} STREQUAL "Efl") > set(ADDITIONAL_FLAGS ENABLE_WERROR) > endif () >diff --git a/Source/Platform/CMakeLists.txt b/Source/Platform/CMakeLists.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..faf7cab9e383e5826f8e18c43bc5c49064b7af42 >--- /dev/null >+++ b/Source/Platform/CMakeLists.txt >@@ -0,0 +1,5 @@ >+WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS() >+ >+include_directories(${Platform_INCLUDES}) >+add_library(Platform STATIC ${Platform_SOURCES}) >+set_target_properties(Platform PROPERTIES FOLDER "Platform") >diff --git a/Source/Platform/PlatformNix.cmake b/Source/Platform/PlatformNix.cmake >new file mode 100644 >index 0000000000000000000000000000000000000000..52de705f31976d8a1a2fc6a4907fcd81030c624b >--- /dev/null >+++ b/Source/Platform/PlatformNix.cmake >@@ -0,0 +1,29 @@ >+set(Platform_INCLUDES >+ nix >+ ${WEBCORE_DIR}/platform/graphics/ # For IntRect.h >+ ${WTF_DIR} # For config.h >+ ${CMAKE_BINARY_DIR} # For cmakeconfig.h >+) >+ >+set(Platform_HEADERS >+ nix/public/Platform.h >+ nix/public/WebColor.h >+ nix/public/WebFFTFrame.h >+ nix/public/WebRect.h >+ nix/public/WebSize.h >+ nix/public/WebThemeEngine.h >+ nix/public/WebAudioBus.h >+ nix/public/WebAudioDevice.h >+ nix/public/WebCommon.h >+ nix/public/WebData.h >+ nix/public/WebGamepads.h >+ nix/public/WebGamepad.h >+ nix/public/WebVector.h >+) >+ >+set(Platform_SOURCES >+ nix/src/Platform.cpp >+ nix/src/DefaultWebThemeEngine.cpp >+) >+ >+install(FILES ${Platform_HEADERS} DESTINATION include/${WebKit2_OUTPUT_NAME}-${PROJECT_VERSION_MAJOR}/NixPlatform) >diff --git a/Source/WTF/wtf/FeatureDefines.h b/Source/WTF/wtf/FeatureDefines.h >index 7329c95f545c0e4f85230a2364c6ed6d61b9922b..2a020482bf067a8511dcd9a40b694b348a22f0cf 100644 >--- a/Source/WTF/wtf/FeatureDefines.h >+++ b/Source/WTF/wtf/FeatureDefines.h >@@ -235,6 +235,11 @@ > > #endif /* PLATFORM(WIN_CAIRO) */ > >+/* --------- NIX port (Unix) --------- */ >+#if PLATFORM(NIX) >+#include "nix/FeatureDefinesNix.h" >+#endif /* PLATFORM(NIX) */ >+ > /* --------- EFL port (Unix) --------- */ > #if PLATFORM(EFL) > >diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h >index 1c2d2398d39ac79e1c59af1a562298f1b5985eaa..526e620d57596d794d811268275a6b5fd331b9ff 100644 >--- a/Source/WTF/wtf/Platform.h >+++ b/Source/WTF/wtf/Platform.h >@@ -446,6 +446,8 @@ > #define WTF_PLATFORM_GTK 1 > #elif defined(BUILDING_BLACKBERRY__) > #define WTF_PLATFORM_BLACKBERRY 1 >+#elif defined(BUILDING_NIX__) >+#include "nix/PlatformNix.h" > #elif OS(DARWIN) > #define WTF_PLATFORM_MAC 1 > #elif OS(WINDOWS) >diff --git a/Source/WTF/wtf/PlatformNix.cmake b/Source/WTF/wtf/PlatformNix.cmake >new file mode 100644 >index 0000000000000000000000000000000000000000..f732e60816cb820c19e54352ebe56eeaf189f2da >--- /dev/null >+++ b/Source/WTF/wtf/PlatformNix.cmake >@@ -0,0 +1,16 @@ >+list(APPEND WTF_SOURCES >+ gtk/MainThreadGtk.cpp >+ gobject/GOwnPtr.cpp >+ gobject/GRefPtr.cpp >+ gobject/GlibUtilities.cpp >+) >+ >+list(APPEND WTF_LIBRARIES >+ pthread >+ ${GLIB_LIBRARIES} >+ ${GLIB_GIO_LIBRARIES} >+) >+ >+list(APPEND WTF_INCLUDE_DIRECTORIES >+ ${GLIB_INCLUDE_DIRS} >+) >diff --git a/Source/WebCore/CMakeLists.txt b/Source/WebCore/CMakeLists.txt >index bf8875a5708e371199f8097b29e69a5adc4f2ab6..f8890dcc43f76bc95ada8fa5d4baf4bf24e89b7d 100644 >--- a/Source/WebCore/CMakeLists.txt >+++ b/Source/WebCore/CMakeLists.txt >@@ -2838,16 +2838,18 @@ endif () > > if (WTF_USE_3D_GRAPHICS) > list(APPEND WebCore_INCLUDE_DIRECTORIES >- ${OPENGL_INCLUDE_DIR} > "${THIRDPARTY_DIR}/ANGLE/src" > "${THIRDPARTY_DIR}/ANGLE/include" > "${THIRDPARTY_DIR}/ANGLE/include/KHR" > "${THIRDPARTY_DIR}/ANGLE/include/GLSLANG" > "${WEBCORE_DIR}/platform/graphics/gpu" > ) >- list(APPEND WebCore_LIBRARIES >- ${OPENGL_gl_LIBRARY} >- ) >+ >+ # Nix may use either OpenGL or OpenGLES2 headers, so we handle this at PlatformNix.cmake. >+ if (NOT PORT STREQUAL "Nix") >+ list(APPEND WebCore_INCLUDE_DIRECTORIES ${OPENGL_INCLUDE_DIR}) >+ list(APPEND WebCore_LIBRARIES ${OPENGL_gl_LIBRARY}) >+ endif () > > if (BISON_VERSION EQUAL "2.5") > # Bison 2.5 can not compile generated glslang. >diff --git a/Source/WebCore/PlatformNix.cmake b/Source/WebCore/PlatformNix.cmake >new file mode 100644 >index 0000000000000000000000000000000000000000..a1b44bcb0d0c2d575b09150cf0a2314fc6921154 >--- /dev/null >+++ b/Source/WebCore/PlatformNix.cmake >@@ -0,0 +1,265 @@ >+list(APPEND WebCore_INCLUDE_DIRECTORIES >+ "${WEBCORE_DIR}/platform/nix" >+ "${WEBCORE_DIR}/platform/cairo" >+ "${WEBCORE_DIR}/platform/graphics/cairo" >+ "${WEBCORE_DIR}/platform/graphics/freetype" >+ "${WEBCORE_DIR}/platform/graphics/glx" >+ "${WEBCORE_DIR}/platform/graphics/harfbuzz/" >+ "${WEBCORE_DIR}/platform/graphics/harfbuzz/ng" >+ "${WEBCORE_DIR}/platform/graphics/opengl" >+ "${WEBCORE_DIR}/platform/graphics/surfaces" >+ "${WEBCORE_DIR}/platform/graphics/texmap" >+ "${WEBCORE_DIR}/platform/linux" >+ "${WEBCORE_DIR}/platform/mediastream/gstreamer" >+ "${PLATFORM_DIR}/nix/" >+) >+ >+list(APPEND WebCore_SOURCES >+ page/TouchAdjustment.cpp >+ >+ page/nix/EventHandlerNix.cpp >+ platform/Cursor.cpp >+ platform/ContextMenuNone.cpp >+ platform/ContextMenuItemNone.cpp >+ platform/nix/CursorNix.cpp >+ platform/nix/DragDataNix.cpp >+ platform/nix/DragImageNix.cpp >+ platform/nix/NixKeyboardUtilities.cpp >+ platform/nix/ErrorsNix.cpp >+ platform/gtk/EventLoopGtk.cpp >+ platform/nix/FileSystemNix.cpp >+ platform/nix/LanguageNix.cpp >+ platform/nix/LocalizedStringsNix.cpp >+ platform/gtk/LoggingGtk.cpp >+ platform/nix/MIMETypeRegistryNix.cpp >+ platform/nix/PasteboardNix.cpp >+ platform/nix/PlatformScreenNix.cpp >+ platform/nix/PlatformKeyboardEventNix.cpp >+ platform/nix/RenderThemeNix.cpp >+ platform/nix/RunLoopNix.cpp >+ platform/nix/ScrollbarThemeNix.cpp >+ platform/gtk/SharedBufferGtk.cpp >+ platform/nix/SoundNix.cpp >+ platform/nix/SharedTimerNix.cpp >+ platform/nix/TemporaryLinkStubs.cpp >+ platform/nix/WidgetNix.cpp >+ >+ platform/cairo/WidgetBackingStoreCairo.cpp >+ platform/graphics/cairo/BitmapImageCairo.cpp >+ platform/graphics/cairo/CairoUtilities.cpp >+ platform/graphics/cairo/FontCairo.cpp >+ platform/graphics/cairo/GradientCairo.cpp >+ platform/graphics/cairo/GraphicsContextCairo.cpp >+ platform/graphics/cairo/ImageBufferCairo.cpp >+ platform/graphics/cairo/ImageCairo.cpp >+ platform/graphics/cairo/IntRectCairo.cpp >+ platform/graphics/cairo/OwnPtrCairo.cpp >+ platform/graphics/cairo/PathCairo.cpp >+ platform/graphics/cairo/PatternCairo.cpp >+ platform/graphics/cairo/PlatformContextCairo.cpp >+ platform/graphics/cairo/PlatformPathCairo.cpp >+ platform/graphics/cairo/RefPtrCairo.cpp >+ platform/graphics/cairo/TileCairo.cpp >+ platform/graphics/cairo/TiledBackingStoreBackendCairo.cpp >+ platform/graphics/cairo/TransformationMatrixCairo.cpp >+ >+ platform/image-decoders/cairo/ImageDecoderCairo.cpp >+ >+ platform/graphics/WOFFFileFormat.cpp >+ platform/graphics/cairo/FontCairoHarfbuzzNG.cpp >+ platform/graphics/freetype/FontCacheFreeType.cpp >+ platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp >+ platform/graphics/freetype/FontPlatformDataFreeType.cpp >+ platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp >+ platform/graphics/freetype/SimpleFontDataFreeType.cpp >+ platform/graphics/harfbuzz/HarfBuzzFace.cpp >+ platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp >+ platform/graphics/harfbuzz/HarfBuzzShaper.cpp >+ >+ platform/graphics/ImageSource.cpp >+ platform/graphics/cairo/DrawingBufferCairo.cpp >+ platform/graphics/nix/IconNix.cpp >+ platform/graphics/nix/ImageNix.cpp >+ platform/graphics/OpenGLShims.cpp >+ platform/graphics/opengl/Extensions3DOpenGLCommon.cpp >+ platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp >+ platform/graphics/texmap/TextureMapperGL.cpp >+ platform/graphics/texmap/TextureMapperShaderProgram.cpp >+ platform/graphics/texmap/GraphicsLayerTextureMapper.cpp >+ >+ platform/graphics/filters/CustomFilterMeshGenerator.cpp >+ platform/graphics/filters/CustomFilterValidatedProgram.cpp >+ >+ platform/image-decoders/ImageDecoder.cpp >+ platform/image-decoders/bmp/BMPImageDecoder.cpp >+ platform/image-decoders/bmp/BMPImageReader.cpp >+ platform/image-decoders/gif/GIFImageDecoder.cpp >+ platform/image-decoders/gif/GIFImageReader.cpp >+ platform/image-decoders/ico/ICOImageDecoder.cpp >+ platform/image-decoders/jpeg/JPEGImageDecoder.cpp >+ platform/image-decoders/png/PNGImageDecoder.cpp >+ platform/image-decoders/webp/WEBPImageDecoder.cpp >+ platform/linux/GamepadDeviceLinux.cpp >+ platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp >+ platform/PlatformStrategies.cpp >+ platform/text/nix/TextBreakIteratorInternalICUNix.cpp >+ >+ plugins/PluginDatabase.cpp >+ plugins/PluginDebug.cpp >+ plugins/PluginPackage.cpp >+ plugins/PluginStream.cpp >+ plugins/PluginView.cpp >+ plugins/PluginPackageNone.cpp >+ plugins/PluginViewNone.cpp >+ >+ editing/SmartReplaceICU.cpp >+ platform/text/LocaleNone.cpp >+ >+ platform/nix/support/WebAudioBus.cpp >+ platform/nix/support/WebData.cpp >+ >+ css/WebKitCSSArrayFunctionValue.cpp >+ css/WebKitCSSMixFunctionValue.cpp >+ css/WebKitCSSMatrix.cpp >+ css/WebKitCSSMatFunctionValue.cpp >+ rendering/style/StyleCachedShader.cpp >+ rendering/style/StyleCustomFilterProgram.cpp >+ rendering/style/StyleCustomFilterProgramCache.cpp >+) >+ >+if (WTF_USE_OPENGL_ES_2) >+ list(APPEND WebCore_SOURCES >+ platform/graphics/opengl/Extensions3DOpenGLES.cpp >+ platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp >+ ) >+ list(INSERT WebCore_INCLUDE_DIRECTORIES 0 ${OPENGLES2_INCLUDE_DIRS}) >+ list(APPEND WebCore_LIBRARIES ${OPENGLES2_LIBRARIES}) >+ add_definitions(${OPENGLES2_DEFINITIONS}) >+else () >+ list(APPEND WebCore_SOURCES >+ platform/graphics/opengl/Extensions3DOpenGL.cpp >+ platform/graphics/opengl/GraphicsContext3DOpenGL.cpp >+ ) >+ list(APPEND WebCore_LIBRARIES >+ ${OPENGL_gl_LIBRARY} >+ ) >+endif () >+ >+if (WTF_USE_EGL) >+ list(INSERT WebCore_INCLUDE_DIRECTORIES 0 >+ platform/graphics/egl >+ ${EGL_INCLUDE_DIR} >+ ) >+ list(APPEND WebCore_SOURCES >+ platform/graphics/cairo/GLContext.cpp >+ platform/graphics/cairo/GraphicsContext3DCairo.cpp >+ platform/graphics/cairo/GraphicsContext3DPrivate.cpp >+ platform/graphics/egl/GLContextFromCurrentEGL.cpp >+ ) >+ list(APPEND WebCore_LIBRARIES ${EGL_LIBRARY}) >+else () >+ list(APPEND WebCore_INCLUDE_DIRECTORIES >+ platform/graphics/surfaces/glx >+ platform/graphics/surfaces/efl >+ ${X11_X11_INCLUDE_PATH} >+ ) >+ list(APPEND WebCore_SOURCES >+ platform/graphics/efl/GraphicsContext3DEfl.cpp >+ platform/graphics/efl/GraphicsContext3DPrivate.cpp >+ platform/graphics/opengl/GLPlatformContext.cpp >+ platform/graphics/opengl/GLPlatformSurface.cpp >+ platform/graphics/surfaces/efl/GLTransportSurface.cpp >+ platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp >+ platform/graphics/surfaces/GraphicsSurface.cpp >+ >+ platform/graphics/surfaces/glx/X11Helper.cpp >+ platform/graphics/surfaces/glx/GLXContext.cpp >+ platform/graphics/surfaces/glx/GLXSurface.cpp >+ ) >+ list(APPEND WebCore_LIBRARIES ${X11_X11_LIB} ${X11_Xcomposite_LIB} ${X11_Xrender_LIB}) >+endif () >+ >+list(APPEND WebCore_USER_AGENT_STYLE_SHEETS >+ ${WEBCORE_DIR}/css/mediaControlsNix.css >+ ${WEBCORE_DIR}/css/mediaControlsNixFullscreen.css >+) >+ >+list(APPEND WebCore_LIBRARIES >+ ${CAIRO_LIBRARIES} >+ ${FONTCONFIG_LIBRARIES} >+ ${FREETYPE_LIBRARIES} >+ ${JPEG_LIBRARY} >+ ${LIBXML2_LIBRARIES} >+ ${LIBXSLT_LIBRARIES} >+ ${PNG_LIBRARY} >+ ${SQLITE_LIBRARIES} >+ ${GLIB_LIBRARIES} >+ ${GLIB_GIO_LIBRARIES} >+ ${GLIB_GMODULE_LIBRARIES} >+ ${GLIB_GOBJECT_LIBRARIES} >+ ${ZLIB_LIBRARIES} >+ Platform >+ ${HARFBUZZ_LIBRARIES} >+) >+ >+list(APPEND WebCore_INCLUDE_DIRECTORIES >+ ${FONTCONFIG_INCLUDE_DIR} >+ ${CAIRO_INCLUDE_DIRS} >+ ${FREETYPE_INCLUDE_DIRS} >+ ${LIBXML2_INCLUDE_DIR} >+ ${LIBXSLT_INCLUDE_DIR} >+ ${SQLITE_INCLUDE_DIR} >+ ${GLIB_INCLUDE_DIRS} >+ ${ZLIB_INCLUDE_DIRS} >+ ${HARFBUZZ_INCLUDE_DIRS} >+) >+ >+add_definitions(-DDATA_DIR="${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}") >+ >+if (ENABLE_WEB_AUDIO) >+ list(APPEND WebCore_INCLUDE_DIRECTORIES >+ "${WEBCORE_DIR}/platform/audio/nix" >+ ) >+ list(APPEND WebCore_SOURCES >+ platform/audio/nix/AudioBusNix.cpp >+ platform/audio/nix/AudioDestinationNix.cpp >+ platform/audio/nix/FFTFrameNix.cpp >+ ) >+ set(WEB_AUDIO_DIR ${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}/webaudio/resources) >+ file(GLOB WEB_AUDIO_DATA "${WEBCORE_DIR}/platform/audio/resources/*.wav") >+ install(FILES ${WEB_AUDIO_DATA} DESTINATION ${WEB_AUDIO_DIR}) >+ add_definitions(-DUNINSTALLED_AUDIO_RESOURCES_DIR="${WEBCORE_DIR}/platform/audio/resources") >+endif () >+ >+if (ENABLE_GAMEPAD) >+ list(APPEND WebCore_SOURCES >+ platform/nix/GamepadsNix.cpp >+ ) >+endif () >+ >+list(APPEND WebCore_SOURCES >+ platform/network/soup/AuthenticationChallengeSoup.cpp >+ platform/network/soup/CookieJarSoup.cpp >+ platform/network/soup/CookieStorageSoup.cpp >+ platform/network/soup/CredentialStorageSoup.cpp >+ platform/network/soup/DNSSoup.cpp >+ platform/network/soup/GOwnPtrSoup.cpp >+ platform/network/soup/NetworkStorageSessionSoup.cpp >+ platform/network/soup/ProxyResolverSoup.cpp >+ platform/network/soup/ProxyServerSoup.cpp >+ platform/network/soup/ResourceErrorSoup.cpp >+ platform/network/soup/ResourceHandleSoup.cpp >+ platform/network/soup/ResourceRequestSoup.cpp >+ platform/network/soup/ResourceResponseSoup.cpp >+ platform/network/soup/SocketStreamHandleSoup.cpp >+ platform/network/soup/SoupURIUtils.cpp >+) >+ >+list(APPEND WebCore_INCLUDE_DIRECTORIES >+ "${WEBCORE_DIR}/platform/network/soup" >+ ${LIBSOUP_INCLUDE_DIRS} >+) >+ >+list(APPEND WebCore_LIBRARIES >+ ${LIBSOUP_LIBRARIES} >+) >diff --git a/Source/cmake/FindEGL.cmake b/Source/cmake/FindEGL.cmake >index 526c5ba0856288c8324bbf54f6d17ec5178c6eb9..06de556a85a17a20aab09a1fc59159e98028fa8b 100644 >--- a/Source/cmake/FindEGL.cmake >+++ b/Source/cmake/FindEGL.cmake >@@ -34,4 +34,6 @@ set(EGL_NAMES ${EGL_NAMES} egl EGL) > find_library(EGL_LIBRARY NAMES ${EGL_NAMES}) > > include(FindPackageHandleStandardArgs) >-FIND_PACKAGE_HANDLE_STANDARD_ARGS(EGL DEFAULT_MSG EGL_INCLUDE_DIR EGL_LIBRARY) >+find_package_handle_standard_args(EGL DEFAULT_MSG EGL_INCLUDE_DIR EGL_LIBRARY) >+ >+mark_as_advanced(EGL_INCLUDE_DIR EGL_LIBRARY) >diff --git a/Source/cmake/FindOpenGLES2.cmake b/Source/cmake/FindOpenGLES2.cmake >new file mode 100644 >index 0000000000000000000000000000000000000000..db69b8d2d114b5b713b764ce0865a3d750d772ed >--- /dev/null >+++ b/Source/cmake/FindOpenGLES2.cmake >@@ -0,0 +1,25 @@ >+# Try to find OpenGLES2. Once done this will define: >+# OPENGLES2_FOUND >+# OPENGLES2_INCLUDE_DIRS >+# OPENGLES2_LIBRARIES >+# OPENGLES2_DEFINITIONS >+ >+find_package(PkgConfig) >+ >+pkg_check_modules(PC_OPENGLES2 glesv2) >+ >+if (PC_OPENGLES2_FOUND) >+ set(OPENGLES2_INCLUDE_DIRS ${PC_OPENGLES2_INCLUDE_DIRS}) >+ set(OPENGLES2_DEFINITIONS ${PC_OPENGLES2_CFLAGS_OTHER}) >+else () >+ find_path(OPENGLES2_INCLUDE_DIRS NAMES GLES2/gl2.h) >+endif () >+ >+find_library(OPENGLES2_LIBRARIES GLESv2 >+ HINTS ${PC_OPENGLES2_LIBRARY_DIRS} ${PC_OPENGLES2_LIBDIR} >+) >+ >+include(FindPackageHandleStandardArgs) >+find_package_handle_standard_args(OpenGLES2 DEFAULT_MSG OPENGLES2_LIBRARIES OPENGLES2_INCLUDE_DIRS) >+ >+mark_as_advanced(OPENGLES2_INCLUDE_DIRS OPENGLES2_LIBRARY) >diff --git a/Source/cmake/OptionsCommon.cmake b/Source/cmake/OptionsCommon.cmake >index 0acbcfc7d319ebf01ef968def5c09431d2b3d54d..294e22857da10924905ca08962c9075cccf54c54 100644 >--- a/Source/cmake/OptionsCommon.cmake >+++ b/Source/cmake/OptionsCommon.cmake >@@ -1,8 +1,16 @@ >-add_definitions(-DBUILDING_WITH_CMAKE=1) >-add_definitions(-DHAVE_CONFIG_H=1) >+# Nix doesn't use cmakeconfig.h >+if (NOT PORT STREQUAL "Nix") >+ add_definitions(-DBUILDING_WITH_CMAKE=1) >+ add_definitions(-DHAVE_CONFIG_H=1) >+endif () >+ > > if (WTF_OS_UNIX) > add_definitions(-DXP_UNIX) >+ #TODO: check for X11 target >+ if (NOT PORT STREQUAL "Nix") >+ add_definitions(-DMOZ_X11) >+ endif () > endif (WTF_OS_UNIX) > > # CODE_GENERATOR_PREPROCESSOR_WITH_LINEMARKERS only matters with GCC >= 4.7.0. Since this >diff --git a/Source/cmake/OptionsNix.cmake b/Source/cmake/OptionsNix.cmake >new file mode 100644 >index 0000000000000000000000000000000000000000..dc1a823c7795c535de01692d9ccecf244f1b056d >--- /dev/null >+++ b/Source/cmake/OptionsNix.cmake >@@ -0,0 +1,148 @@ >+# Nix uses a different way to set/unset default features based on WK bug 110717 (not yet landed). >+# So the implementation, i.e. the next two macros, was moved to here to keep a minimal as possible >+# interference on other ports until some day when/if bug 110717 get landed. >+ >+# Compute and set default values for feature defines >+macro(WEBKIT_OPTION_DEFAULTS _port) >+ # Use the preprocessor to get the default values for feature defines >+ EXEC_PROGRAM("gcc -E -P -dM -DBUILDING_${_port}__ -I ${CMAKE_SOURCE_DIR}/Source/WTF ${CMAKE_SOURCE_DIR}/Source/WTF/wtf/Platform.h | grep '^#define ENABLE_\\w\\+ [01]$' | cut -d' ' -f2-3 | sort" OUTPUT_VARIABLE DEFINITIONS) >+ string(REGEX MATCHALL "([^\n]+|[^\n]+$)" DEFINITIONS_LIST ${DEFINITIONS}) >+ >+ foreach (DEFINITION ${DEFINITIONS_LIST}) >+ string(REGEX REPLACE "^([^ ]+) ([^ ]+)$" "\\1" DEFINITION_NAME "${DEFINITION}") >+ string(REGEX REPLACE "^([^ ]+) ([^ ]+)$" "\\2" DEFINITION_VALUE "${DEFINITION}") >+ WEBKIT_OPTION_DEFINE(${DEFINITION_NAME} "Toggle ${DEFINITION_NAME}" ${DEFINITION_VALUE}) >+ option(${DEFINITION_NAME} "Toggle ${DEFINITION_NAME}" ${DEFINITION_VALUE}) >+ endforeach () >+endmacro() >+ >+# Show WebKit options summary and add -DFOOBAR to each option with a value different from the default value. >+macro(PROCESS_WEBKIT_OPTIONS) >+ message(STATUS "Enabled features:") >+ >+ set(_MAX_FEATURE_LENGTH 0) >+ foreach (_name ${_WEBKIT_AVAILABLE_OPTIONS}) >+ string(LENGTH ${_name} _NAME_LENGTH) >+ if (_NAME_LENGTH GREATER _MAX_FEATURE_LENGTH) >+ set(_MAX_FEATURE_LENGTH ${_NAME_LENGTH}) >+ endif () >+ endforeach () >+ >+ set(_SHOULD_PRINT_POINTS OFF) >+ foreach (_name ${_WEBKIT_AVAILABLE_OPTIONS}) >+ string(LENGTH ${_name} _NAME_LENGTH) >+ >+ set(_MESSAGE " ${_name} ") >+ >+ if (_SHOULD_PRINT_POINTS) >+ foreach (IGNORE RANGE ${_NAME_LENGTH} ${_MAX_FEATURE_LENGTH}) >+ set(_MESSAGE "${_MESSAGE} ") >+ endforeach () >+ set(_SHOULD_PRINT_POINTS OFF) >+ else () >+ foreach (IGNORE RANGE ${_NAME_LENGTH} ${_MAX_FEATURE_LENGTH}) >+ set(_MESSAGE "${_MESSAGE}.") >+ endforeach () >+ set(_SHOULD_PRINT_POINTS ON) >+ endif () >+ >+ if (${_name}) >+ list(APPEND FEATURE_DEFINES ${_name}) >+ set(FEATURE_DEFINES_WITH_SPACE_SEPARATOR "${FEATURE_DEFINES_WITH_SPACE_SEPARATOR} ${_name}") >+ endif () >+ >+ set(_MESSAGE "${_MESSAGE} ${${_name}}") >+ message(STATUS "${_MESSAGE}") >+ endforeach () >+ >+ # Add add_definitions to values different from the defaults >+ foreach (_name ${_WEBKIT_AVAILABLE_OPTIONS}) >+ # Convert values from ON/OFF to 1/0 because >+ # CMake says "1 EQUAL ON" is false. >+ if (${_WEBKIT_AVAILABLE_OPTIONS_INITALVALUE_${_name}}) >+ set(_a 1) >+ else () >+ set(_a 0) >+ endif () >+ if (${${_name}}) >+ set(_b 1) >+ else () >+ set(_b 0) >+ endif () >+ if (NOT _a EQUAL _b) >+ add_definitions("-D${_name}=${_b}") >+ endif () >+ endforeach () >+endmacro() >+ >+ >+set(PROJECT_VERSION_MAJOR 0) >+set(PROJECT_VERSION_MINOR 1) >+set(PROJECT_VERSION_PATCH 0) >+set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}) >+ >+if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") >+ # Use -femit-struct-debug-baseonly to reduce the size of WebCore static library >+ set(CMAKE_CXX_FLAGS_DEBUG "-g -femit-struct-debug-baseonly" CACHE STRING "Flags used by the compiler during debug builds." FORCE) >+endif () >+ >+set(SHARED_CORE OFF) >+set(ENABLE_WEBKIT OFF) >+set(ENABLE_WEBKIT2 OFF) >+set(ENABLE_TOOLS OFF) >+ >+set(WebKit2_OUTPUT_NAME WebKitNix) >+ >+add_definitions(-DBUILDING_NIX__=1) >+ >+find_package(Cairo 1.12.8 REQUIRED) >+find_package(Fontconfig 2.8.0 REQUIRED) >+find_package(Freetype REQUIRED) >+find_package(GLIB 2.36.0 REQUIRED COMPONENTS gio gobject gmodule gthread) >+find_package(HarfBuzz) >+find_package(ICU REQUIRED) >+find_package(JPEG REQUIRED) >+find_package(LibXml2 2.6 REQUIRED) >+find_package(LibXslt 1.1.7 REQUIRED) >+find_package(PNG REQUIRED) >+find_package(Sqlite REQUIRED) >+find_package(Threads REQUIRED) >+find_package(ZLIB REQUIRED) >+ >+# Variables that must exists on CMake space >+# to keep common CMake files working as desired for us >+set(WTF_USE_ICU_UNICODE ON) >+set(WTF_USE_LEVELDB ON) >+set(ENABLE_API_TESTS OFF) >+ >+WEBKIT_OPTION_DEFAULTS("NIX") >+WEBKIT_OPTION_DEFINE(WTF_USE_OPENGL_ES_2 "Use EGL + OpenGLES2" OFF) >+WEBKIT_OPTION_DEFINE(WTF_USE_CURL "Use libCurl as network backend" OFF) >+ >+if (WTF_USE_CURL) >+ find_package(CURL REQUIRED) >+ set(REQUIRED_NETWORK libcurl) >+else () >+ find_package(LibSoup 2.42.0 REQUIRED) >+ set(REQUIRED_NETWORK libsoup-2.4) >+endif () >+ >+if (WTF_USE_OPENGL_ES_2) >+ find_package(OpenGLES2 REQUIRED) >+ find_package(EGL REQUIRED) >+ set(WTF_USE_EGL ON) >+ add_definitions(-DWTF_USE_OPENGL_ES_2=1) >+else () >+ find_package(X11 REQUIRED) >+ find_package(OpenGL REQUIRED) >+ add_definitions(-DHAVE_GLX=1) >+endif () >+ >+if (NOT ENABLE_SVG) >+ set(ENABLE_SVG_FONTS OFF) >+endif () >+ >+PROCESS_WEBKIT_OPTIONS() >+ >+ >+ >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 386693c51371ea37ede30670b3e8c7fef0a3c006..2e82a4e1f7cc3d4af6d1d67d4a2d5bd29f9e4fac 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,78 @@ >+2013-07-05 Marcelo Lira <marcelo.lira@openbossa.org> >+ >+ Nix upstreaming - Adding build files and supporting scripts >+ https://bugs.webkit.org/show_bug.cgi?id=118367 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Scripts/build-dumprendertree: >+ * Scripts/build-webkit: >+ * Scripts/build-webkittestrunner: >+ * Scripts/run-javascriptcore-tests: >+ * Scripts/run-launcher: >+ * Scripts/run-nix-tests: Added. >+ * Scripts/run-webkit-tests: >+ * Scripts/update-webkit-libs-jhbuild: >+ * Scripts/update-webkitnix-libs: Added. >+ * Scripts/webkitdirs.pm: >+ (determineArchitecture): >+ (argumentsForConfiguration): >+ (jscProductDir): >+ (builtDylibPathForName): >+ (determineIsQt): >+ (determineIsNix): >+ (isNix): >+ (isAppleWebKit): >+ (launcherPath): >+ (launcherName): >+ (checkRequiredSystemConfig): >+ (copyInspectorFrontendFiles): >+ (jhbuildWrapperPrefixIfNeeded): >+ (buildCMakeProjectOrExit): >+ (cmakeBasedPortName): >+ * Scripts/webkitpy/common/config/ports.py: >+ (DeprecatedPort.port): >+ (DeprecatedPort.makeArgs): >+ (EflWK2Port.build_webkit_command): >+ (NixPort): >+ (NixPort.build_webkit_command): >+ * Scripts/webkitpy/port/factory.py: >+ (platform_options): >+ (PortFactory): >+ * Scripts/webkitpy/port/nix.py: Added. >+ (NixPort): >+ (NixPort._wk2_port_name): >+ (NixPort.determine_full_port_name): >+ (NixPort.__init__): >+ (NixPort._port_flag_for_scripts): >+ (NixPort.setup_test_run): >+ (NixPort.setup_environ_for_server): >+ (NixPort.default_timeout_ms): >+ (NixPort.clean_up_test_run): >+ (NixPort._generate_all_test_configurations): >+ (NixPort._path_to_driver): >+ (NixPort._path_to_image_diff): >+ (NixPort._image_diff_command): >+ (NixPort._search_paths): >+ (NixPort.show_results_html_file): >+ (NixPort._port_specific_expectations_files): >+ (NixPort.default_baseline_search_path): >+ * Scripts/webkitpy/port/nix_unittest.py: Added. >+ (NixPortTest): >+ (NixPortTest._assert_search_path): >+ (NixPortTest._assert_expectations_files): >+ (NixPortTest.test_baseline_search_path): >+ (NixPortTest.test_expectations_files): >+ (NixPortTest.test_default_timeout_ms): >+ * jhbuild/jhbuild-wrapper: >+ (determine_platform): >+ * nix/common.py: Added. >+ (script_path): >+ (top_level_path): >+ * nix/jhbuild.modules: Added. >+ * nix/jhbuildrc: Added. >+ * nix/run-with-jhbuild: Added. >+ > 2013-07-02 Byungwoo Lee <bw80.lee@samsung.com> > > Fix WebKitTestRunner crashes. >diff --git a/Tools/Scripts/build-dumprendertree b/Tools/Scripts/build-dumprendertree >index 1ff75f7d3bc08fbaaa7f35f89693da9d826375e5..91f54821eac688353ff294af95a0bb7788a91491 100755 >--- a/Tools/Scripts/build-dumprendertree >+++ b/Tools/Scripts/build-dumprendertree >@@ -70,7 +70,7 @@ if (isAppleMacWebKit()) { > } elsif (isAppleWinWebKit()) { > my $drtSolutionPath = "DumpRenderTree.vcxproj/DumpRenderTree.sln"; > $result = buildVisualStudioProject($drtSolutionPath, $clean); >-} elsif (isQt() || isGtk() || isEfl()) { >+} elsif (isQt() || isGtk() || isEfl() || isNix()) { > # Qt, Gtk and EFL build everything in one shot. No need to build anything here. > $result = 0; > } else { >diff --git a/Tools/Scripts/build-webkit b/Tools/Scripts/build-webkit >index 87c504330a9dd6544479785c518bfc1284879781..010a008d45d22e6906fb517ca377951cc6ba1cd8 100755 >--- a/Tools/Scripts/build-webkit >+++ b/Tools/Scripts/build-webkit >@@ -36,7 +36,7 @@ use File::Basename; > use File::Find; > use File::Spec; > use FindBin; >-use Getopt::Long qw(:config pass_through); >+use Getopt::Long qw(:config pass_through no_auto_abbrev); > use lib $FindBin::Bin; > use webkitdirs; > use webkitperl::FeatureList qw(getFeatureOptionList); >@@ -62,6 +62,8 @@ my $noWebKit1 = 0; > my $noWebKit2 = 0; > my $coverageSupport = 0; > my $startTime = time(); >+my $curl = 0; >+my $opengles2 = 0; > > my @features = getFeatureOptionList(); > >@@ -87,6 +89,38 @@ if (isQt()) { > } > } > >+# Update defaults for the Nix port >+if (isNix()) { >+ # Instead of use FeatureList.pm to list enabled features, tell the compiler to >+ # parse Source/WTF/wtf/Platform.h and get the default values of all feature flags >+ # from the result. >+ my $portDefine = "BUILDING_".uc(cmakeBasedPortName())."__"; >+ my $definitions = `gcc -E -P -dM -D$portDefine -I Source/WTF Source/WTF/wtf/Platform.h | grep '^#define ENABLE_\\w\\+ \[01\]\$' | cut -d' ' -f2-3`; >+ >+ my %featureDefaults; >+ foreach (split(/\n/, $definitions)) { >+ my @macroDefinition = split(/ /); >+ $featureDefaults{$macroDefinition[0]} = $macroDefinition[1]; >+ } >+ >+ @features = (); >+ foreach (sort keys %featureDefaults) { >+ next if (!/^ENABLE/); >+ my $optionName = lc $_; >+ $optionName =~ s/^enable_//; >+ $optionName =~ s/_/-/g; >+ my $descName = $optionName; >+ $descName =~ s/-/ /g; >+ >+ push @features, { >+ option => $optionName, >+ desc => "Toggle $descName support", >+ define => $_, >+ default => $featureDefaults{$_} >+ }; >+ } >+} >+ > # Additional environment parameters > push @ARGV, split(/ /, $ENV{'BUILD_WEBKIT_ARGS'}) if ($ENV{'BUILD_WEBKIT_ARGS'}); > >@@ -116,6 +150,7 @@ Usage: $programName [options] [options to pass to build system] > > --blackberry Build the BlackBerry port on Mac/Linux > --efl Build the EFL port >+ --nix Build the Nix port > --gtk Build the GTK+ port > --qt Build the Qt port > --wincairo Build using Cairo (rather than CoreGraphics) on Windows >@@ -137,6 +172,9 @@ Usage: $programName [options] [options to pass to build system] > --no-webkit1 Omit WebKit1 code from the build (Qt/EFL/GTK only) > --no-webkit2 Omit WebKit2 code from the build > >+ --curl Use libCurl as network backend (Nix only) >+ --opengles2 Use EGL and OpenGLES2 instead of GLX (Nix only) >+ > EOF > > my %options = ( >@@ -152,6 +190,8 @@ my %options = ( > 'no-webkit1' => \$noWebKit1, > 'no-webkit2' => \$noWebKit2, > 'coverage' => \$coverageSupport, >+ 'curl' => \$curl, >+ 'opengles2' => \$opengles2, > ); > > # Build usage text and options list from features >@@ -274,6 +314,24 @@ if (isInspectorFrontend()) { > > my $result = 0; > >+if (isNix()) { >+ if ($noWebKit2) { >+ print STDERR "Nix is a WebKit2 port, you can't disable WebKit2 on it!\n"; >+ exit 1; >+ } >+ >+ # By default we build using all of the available CPUs. >+ $makeArgs .= ($makeArgs ? " " : "") . "-j" . numberOfCPUs() if $makeArgs !~ /-j\s*\d+/; >+ $cmakeArgs = "-DWTF_USE_CURL=ON " . $cmakeArgs if $curl; >+ $cmakeArgs = "-DWTF_USE_OPENGL_ES_2=ON " . $cmakeArgs if $opengles2; >+ >+ # We remove CMakeCache to avoid the bots to reuse cached flags when >+ # we enable new features. This forces a reconfiguration. >+ removeCMakeCache(); >+ >+ buildCMakeProjectOrExit($clean, "Nix", $prefixPath, $makeArgs, (cmakeBasedPortArguments(), cMakeArgsFromFeatures()), $cmakeArgs); >+} >+ > if (isEfl()) { > # By default we build using all of the available CPUs. > $makeArgs .= ($makeArgs ? " " : "") . "-j" . numberOfCPUs() if $makeArgs !~ /-j\s*\d+/; >diff --git a/Tools/Scripts/build-webkittestrunner b/Tools/Scripts/build-webkittestrunner >index e5b23545b77e6e78b4ce4169f4287a85c4bb5c29..c8a342b90614543a6c4128f84ce0137c166505b5 100755 >--- a/Tools/Scripts/build-webkittestrunner >+++ b/Tools/Scripts/build-webkittestrunner >@@ -63,7 +63,7 @@ if (isAppleMacWebKit()) { > $result = buildXCodeProject("WebKitTestRunner", $clean, XcodeOptions(), @ARGV); > } elsif (isAppleWinWebKit()) { > $result = buildVisualStudioProject("WebKitTestRunner.sln", $clean); >-} elsif (isQt() || isGtk() || isEfl()) { >+} elsif (isQt() || isGtk() || isEfl() || isNix()) { > # Qt and GTK+ build everything in one shot. No need to build anything here. > $result = 0; > } else { >diff --git a/Tools/Scripts/run-javascriptcore-tests b/Tools/Scripts/run-javascriptcore-tests >index 8b79f25147879a644d8825d3ca5cb558848e70c7..44829ff8a438a809e360140eef2f4b96916f7b85 100755 >--- a/Tools/Scripts/run-javascriptcore-tests >+++ b/Tools/Scripts/run-javascriptcore-tests >@@ -57,6 +57,10 @@ my @testsToSkip = ( > "ecma/Date/15.9.5.14.js", > "ecma/Date/15.9.5.31-1.js", > "ecma/Date/15.9.5.34-1.js", >+ # Tests failing when running in BRT timezone >+ "ecma/Date/15.9.5.28-1.js", >+ "ecma/Date/15.9.5.29-1.js", >+ "ecma/Date/15.9.5.35-1.js", > ); > > my $jsDriverArgs = "-L " . join(" ", @testsToSkip); >diff --git a/Tools/Scripts/run-launcher b/Tools/Scripts/run-launcher >index 66886fe0b1974b23193841dc7c97e38198b899c7..e839b5ac34f9151c9e4b0ce6dfc72e2ae5daf72b 100755 >--- a/Tools/Scripts/run-launcher >+++ b/Tools/Scripts/run-launcher >@@ -73,6 +73,12 @@ if (isQt()) { > unshift(@ARGV, ("--gtk", "run")); > } > >+ if (isNix()) { >+ unshift(@ARGV, catdir($launcherPath, "bin", "MiniBrowser")); >+ $launcherPath = catdir(sourceDir(), "Tools", "jhbuild", "jhbuild-wrapper"); >+ unshift(@ARGV, ("--nix", "run")); >+ } >+ > if (isEfl()) { > if (isWK2()) { > unshift(@ARGV, catdir($launcherPath, "bin", "MiniBrowser")); >diff --git a/Tools/Scripts/run-nix-tests b/Tools/Scripts/run-nix-tests >new file mode 100644 >index 0000000000000000000000000000000000000000..6798e109347129fdeeae0ed9e5e6e8ca4a46e4f8 >--- /dev/null >+++ b/Tools/Scripts/run-nix-tests >@@ -0,0 +1,44 @@ >+#!/usr/bin/perl -w >+# Copyright (C) 2012 Intel Corporation. All rights reserved. >+# Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). >+# >+# Redistribution and use in source and binary forms, with or without >+# modification, are permitted provided that the following conditions are >+# met: >+# >+# * Redistributions of source code must retain the above copyright >+# notice, this list of conditions and the following disclaimer. >+# * 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. >+# * Neither the name of Intel Corporation nor the names of its >+# contributors may be used to endorse or promote products derived from >+# this software without specific prior written permission. >+# >+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >+# "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 THE COPYRIGHT >+# OWNER 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. >+ >+use strict; >+use FindBin; >+use lib $FindBin::Bin; >+use webkitdirs; >+ >+setConfiguration(); >+ >+# Manually add this for jhbuildWrapperPrefixIfNeeded(). >+push(@ARGV, "--nix"); >+ >+# Tell CTest to dump gtest output in case of failure. >+$ENV{CTEST_OUTPUT_ON_FAILURE} = "1"; >+ >+buildCMakeProjectOrExit(0, "Nix", undef, "test", cmakeBasedPortArguments()); >diff --git a/Tools/Scripts/run-webkit-tests b/Tools/Scripts/run-webkit-tests >index fd507e49a9ae3a763573b7d004498398a45c18a6..dc6ffbda15ed1bfff3ec6e9c9727d1ab22975b70 100755 >--- a/Tools/Scripts/run-webkit-tests >+++ b/Tools/Scripts/run-webkit-tests >@@ -90,6 +90,8 @@ if (isQt()) { > push(@ARGV, "--gtk"); > } elsif (isEfl()) { > push(@ARGV, "--efl"); >+} elsif (isNix()) { >+ push(@ARGV, "--nix"); > } elsif (isWinCairo()) { > push(@ARGV, "--wincairo"); > } >diff --git a/Tools/Scripts/update-webkit-libs-jhbuild b/Tools/Scripts/update-webkit-libs-jhbuild >index a1488876a95afc0c84d0ce22fa646245e4d98852..a0775ab1a30ac788a759994ef77883ec65f2ca64 100755 >--- a/Tools/Scripts/update-webkit-libs-jhbuild >+++ b/Tools/Scripts/update-webkit-libs-jhbuild >@@ -23,15 +23,17 @@ use Getopt::Long; > > my $platformEfl = 0; > my $platformGtk = 0; >+my $platformNix = 0; > > my $getOptionsResult = GetOptions( > 'efl' => \$platformEfl, >- 'gtk' => \$platformGtk >+ 'gtk' => \$platformGtk, >+ 'nix' => \$platformNix > ); > > my $platform = ""; > if (!$getOptionsResult) { >- die "No platform specified for " . basename($0) .". Use --gtk or --efl.\n"; >+ die "No platform specified for " . basename($0) .". Use --gtk, --efl or --nix.\n"; > } else { > if ($platformEfl) { > $platform = "efl"; >@@ -39,6 +41,9 @@ if (!$getOptionsResult) { > if ($platformGtk) { > $platform = "gtk"; > } >+ if ($platformNix) { >+ $platform = "nix"; >+ } > } > > sub getMD5HashForFile($) >@@ -118,7 +123,7 @@ delete $ENV{AR_FLAGS} if exists $ENV{AR_FLAGS}; > > chdir(relativeScriptsDir() . "/../jhbuild") or die $!; > >-my %prettyPlatform = ( "efl" => "EFL", "gtk" => "GTK+" ); >+my %prettyPlatform = ( "efl" => "EFL", "gtk" => "GTK+", "nix" => "Nix" ); > > if (-e getJhbuildPath() && jhbuildConfigurationChanged()) { > cleanJhbuild(); >diff --git a/Tools/Scripts/update-webkitnix-libs b/Tools/Scripts/update-webkitnix-libs >new file mode 100644 >index 0000000000000000000000000000000000000000..53f36bdaf71e98f6a28875a94c2c4b3c2bceea35 >--- /dev/null >+++ b/Tools/Scripts/update-webkitnix-libs >@@ -0,0 +1,24 @@ >+#!/usr/bin/perl -w >+# Copyright (C) 2012 Intel Corporation >+# Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). >+# >+# This library is free software; you can redistribute it and/or >+# modify it under the terms of the GNU Lesser General Public >+# License as published by the Free Software Foundation; either >+# version 2 of the License, or (at your option) any later version. >+# >+# This library is distributed in the hope that it will be useful, >+# but WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >+# Lesser General Public License for more details. >+# >+# You should have received a copy of the GNU Lesser General Public >+# License along with this library; if not, write to the Free Software >+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA >+ >+use FindBin; >+use lib $FindBin::Bin; >+use webkitdirs; >+ >+my $scriptsDir = relativeScriptsDir(); >+system("perl", "$scriptsDir/update-webkit-libs-jhbuild", "--nix") == 0 or die $!; >diff --git a/Tools/Scripts/webkitdirs.pm b/Tools/Scripts/webkitdirs.pm >index 58980d72f470315ee34a7daf8658c1d2ae0abedc..9407d5e8c289cd2878015c9d6caa536b007996e4 100755 >--- a/Tools/Scripts/webkitdirs.pm >+++ b/Tools/Scripts/webkitdirs.pm >@@ -95,6 +95,7 @@ my $isGtk; > my $isWinCE; > my $isWinCairo; > my $isEfl; >+my $isNix; > my $isBlackBerry; > my $isInspectorFrontend; > my $isWK2; >@@ -317,7 +318,7 @@ sub determineArchitecture > $architecture = 'armv7'; > } > } >- } elsif (isEfl()) { >+ } elsif (isEfl() || isNix()) { > my $host_processor = ""; > $host_processor = `cmake --system-information | grep CMAKE_SYSTEM_PROCESSOR`; > if ($host_processor =~ m/^CMAKE_SYSTEM_PROCESSOR \"([^"]+)\"/) { >@@ -327,13 +328,13 @@ sub determineArchitecture > } > } > >- if (!$architecture && (isGtk() || isAppleMacWebKit() || isEfl())) { >+ if (!$architecture && (isGtk() || isAppleMacWebKit() || isEfl() || isNix())) { > # Fall back to output of `arch', if it is present. > $architecture = `arch`; > chomp $architecture; > } > >- if (!$architecture && (isGtk() || isAppleMacWebKit() || isEfl())) { >+ if (!$architecture && (isGtk() || isAppleMacWebKit() || isEfl() || isNix())) { > # Fall back to output of `uname -m', if it is present. > $architecture = `uname -m`; > chomp $architecture; >@@ -382,6 +383,7 @@ sub argumentsForConfiguration() > push(@args, '--qt') if isQt(); > push(@args, '--gtk') if isGtk(); > push(@args, '--efl') if isEfl(); >+ push(@args, '--nix') if isNix(); > push(@args, '--wincairo') if isWinCairo(); > push(@args, '--wince') if isWinCE(); > push(@args, '--blackberry') if isBlackBerry(); >@@ -525,7 +527,7 @@ sub productDir > sub jscProductDir > { > my $productDir = productDir(); >- $productDir .= "/bin" if (isQt() || isEfl()); >+ $productDir .= "/bin" if (isQt() || isEfl() || isNix()); > $productDir .= "/Programs" if isGtk(); > > return $productDir; >@@ -841,6 +843,9 @@ sub builtDylibPathForName > } > return "$configurationProductDir/lib/libewebkit.so"; > } >+ if (isNix()) { >+ return "$configurationProductDir/lib/libWebKitNix.so"; >+ } > if (isWinCE()) { > return "$configurationProductDir/$libraryName"; > } >@@ -984,8 +989,8 @@ sub determineIsQt() > return; > } > >- # The presence of QTDIR only means Qt if --gtk or --efl or --blackberry or --wincairo are not on the command-line >- if (isGtk() || isEfl() || isBlackBerry() || isWinCairo()) { >+ if (isGtk() || isEfl() || isBlackBerry() || isWinCairo() || isNix()) { >+ # The presence of QTDIR only means Qt if --gtk or --efl or --blackberry or --wincairo or --nix are not on the command-line > $isQt = 0; > return; > } >@@ -1136,6 +1141,17 @@ sub isEfl() > return $isEfl; > } > >+sub determineIsNix() >+{ >+ return if defined($isNix); >+ $isNix = checkForArgumentAndRemoveFromARGV("--nix"); >+} >+ >+sub isNix() >+{ >+ determineIsNix(); >+ return $isNix; >+} > sub isGtk() > { > determineIsGtk(); >@@ -1274,7 +1290,7 @@ sub isCrossCompilation() > > sub isAppleWebKit() > { >- return !(isQt() or isGtk() or isEfl() or isWinCE() or isBlackBerry()); >+ return !(isQt() or isGtk() or isEfl() or isWinCE() or isBlackBerry() or isNix()); > } > > sub isAppleMacWebKit() >@@ -1449,7 +1465,7 @@ sub relativeScriptsDir() > sub launcherPath() > { > my $relativeScriptsPath = relativeScriptsDir(); >- if (isGtk() || isQt() || isEfl() || isWinCE()) { >+ if (isGtk() || isQt() || isEfl() || isWinCE() || isNix()) { > return "$relativeScriptsPath/run-launcher"; > } elsif (isAppleWebKit()) { > return "$relativeScriptsPath/run-safari"; >@@ -1468,6 +1484,8 @@ sub launcherName() > return "EWebLauncher/MiniBrowser"; > } elsif (isWinCE()) { > return "WinCELauncher"; >+ } elsif (isNix()) { >+ return "MiniBrowser"; > } > } > >@@ -1494,7 +1512,7 @@ sub checkRequiredSystemConfig > print "http://developer.apple.com/tools/xcode\n"; > print "*************************************************************\n"; > } >- } elsif (isGtk() or isQt() or isEfl()) { >+ } elsif (isGtk() or isQt() or isEfl() or isNix()) { > my @cmds = qw(bison gperf); > if (isQt() and isWindows()) { > push @cmds, "win_flex"; >@@ -1689,7 +1707,7 @@ sub copyInspectorFrontendFiles > $inspectorResourcesDirPath = $productDir . "/WebCore.framework/Resources/inspector"; > } elsif (isAppleWinWebKit()) { > $inspectorResourcesDirPath = $productDir . "/WebKit.resources/inspector"; >- } elsif (isQt() || isGtk()) { >+ } elsif (isQt() || isGtk() || isNix()) { > my $prefix = $ENV{"WebKitInstallationPrefix"}; > $inspectorResourcesDirPath = (defined($prefix) ? $prefix : "/usr/share") . "/webkit-1.0/webinspector"; > } elsif (isEfl()) { >@@ -2035,6 +2053,8 @@ sub jhbuildWrapperPrefixIfNeeded() > push(@prefix, "--efl"); > } elsif (isGtk()) { > push(@prefix, "--gtk"); >+ } elsif (isNix()) { >+ push(@prefix, "--nix"); > } > push(@prefix, "run"); > >@@ -2129,6 +2149,9 @@ sub buildCMakeProjectOrExit($$$$@) > system("perl", "$sourceDir/Tools/Scripts/update-webkitefl-libs") == 0 or die $!; > } > >+ if (isNix() && checkForArgumentAndRemoveFromARGV("--update-nix")) { >+ system("perl", "$sourceDir/Tools/Scripts/update-webkitnix-libs") == 0 or die $!; >+ } > > $returnCode = exitStatus(generateBuildSystemFromCMakeProject($port, $prefixPath, @cmakeArgs)); > exit($returnCode) if $returnCode; >@@ -2152,6 +2175,7 @@ sub cmakeBasedPortName() > return "BlackBerry" if isBlackBerry(); > return "Efl" if isEfl(); > return "WinCE" if isWinCE(); >+ return "Nix" if isNix(); > return ""; > } > >diff --git a/Tools/Scripts/webkitpy/common/config/ports.py b/Tools/Scripts/webkitpy/common/config/ports.py >index 0c20dae5124a27d57b86e7dac52f734cc5664f97..3c6bcb4c70c35a31267578728492aea8c0f56d73 100644 >--- a/Tools/Scripts/webkitpy/common/config/ports.py >+++ b/Tools/Scripts/webkitpy/common/config/ports.py >@@ -70,6 +70,7 @@ class DeprecatedPort(object): > "qt-wk2": QtWK2Port, > "efl": EflPort, > "efl-wk2": EflWK2Port, >+ "nix": NixPort, > } > default_port = { > "Windows": WinPort, >@@ -81,7 +82,7 @@ class DeprecatedPort(object): > def makeArgs(self): > # FIXME: This shouldn't use a static Executive(). > args = '--makeargs="-j%s"' % Executive().cpu_count() >- if os.environ.has_key('MAKEFLAGS'): >+ if 'MAKEFLAGS' in os.environ: > args = '--makeargs="%s"' % os.environ['MAKEFLAGS'] > return args > >@@ -230,3 +231,14 @@ class EflWK2Port(DeprecatedPort): > command.append("--no-webkit1") > command.append(super(EflWK2Port, self).makeArgs()) > return command >+ >+ >+class NixPort(DeprecatedPort): >+ port_flag_name = "nix" >+ >+ def build_webkit_command(self, build_style=None): >+ command = super(NixPort, self).build_webkit_command(build_style=build_style) >+ command.append("--nix") >+ command.append("--update-nix") >+ command.append(super(NixPort, self).makeArgs()) >+ return command >diff --git a/Tools/Scripts/webkitpy/port/factory.py b/Tools/Scripts/webkitpy/port/factory.py >index e9f1465630077c2d1d764e29ba464a53bc41e66e..8039159e06a231fb07ffe6758deaa5b85117ce2a 100644 >--- a/Tools/Scripts/webkitpy/port/factory.py >+++ b/Tools/Scripts/webkitpy/port/factory.py >@@ -42,6 +42,8 @@ def platform_options(use_globs=False): > optparse.make_option('--efl', action='store_const', dest='platform', > const=('efl*' if use_globs else 'efl'), > help=('Alias for --platform=efl*' if use_globs else 'Alias for --platform=efl')), >+ optparse.make_option('--nix', action='store_const', dest='platform', >+ const=('nix'), help=('Alias for --platform=nix')), > optparse.make_option('--gtk', action='store_const', dest='platform', > const=('gtk*' if use_globs else 'gtk'), > help=('Alias for --platform=gtk*' if use_globs else 'Alias for --platform=gtk')), >@@ -75,6 +77,7 @@ def _builder_options(builder_name): > class PortFactory(object): > PORT_CLASSES = ( > 'efl.EflPort', >+ 'nix.NixPort', > 'gtk.GtkPort', > 'mac.MacPort', > 'mock_drt.MockDRTPort', >diff --git a/Tools/Scripts/webkitpy/port/nix.py b/Tools/Scripts/webkitpy/port/nix.py >new file mode 100644 >index 0000000000000000000000000000000000000000..091b5e18fe3348f9fff1bf627d52911cc63a5e48 >--- /dev/null >+++ b/Tools/Scripts/webkitpy/port/nix.py >@@ -0,0 +1,119 @@ >+# Copyright (C) 2011 ProFUSION Embedded Systems. All rights reserved. >+# Copyright (C) 2011 Samsung Electronics. All rights reserved. >+# Copyright (C) 2012 Intel Corporation >+# Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). >+# >+# Redistribution and use in source and binary forms, with or without >+# modification, are permitted provided that the following conditions are >+# met: >+# >+# * Redistributions of source code must retain the above copyright >+# notice, this list of conditions and the following disclaimer. >+# * 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS >+# "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 THE COPYRIGHT >+# OWNER 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. >+ >+"""WebKit Nix implementation of the Port interface.""" >+ >+import os >+ >+from webkitpy.layout_tests.models.test_configuration import TestConfiguration >+from webkitpy.port.base import Port >+from webkitpy.port.pulseaudio_sanitizer import PulseAudioSanitizer >+ >+ >+class NixPort(Port): >+ port_name = 'nix' >+ >+ def _wk2_port_name(self): >+ return 'nix' >+ >+ @classmethod >+ def determine_full_port_name(cls, host, options, port_name): >+ """Determine the port name based on host and options values.""" >+ # Currently the only "port" instance supported by Nix is "nix". Reimplementing >+ # this method avoids changing port name to nix-wk2, which is the default >+ # behavior in base.py. >+ return port_name >+ >+ def __init__(self, *args, **kwargs): >+ super(NixPort, self).__init__(*args, **kwargs) >+ >+ self._jhbuild_wrapper_path = self.path_from_webkit_base('Tools', 'nix', 'run-with-jhbuild') >+ >+ self.set_option_default('wrapper', self._jhbuild_wrapper_path) >+ self.set_option_default('webkit_test_runner', True) >+ self.webprocess_cmd_prefix = self.get_option('webprocess_cmd_prefix') >+ >+ self._pulseaudio_sanitizer = PulseAudioSanitizer() >+ >+ def _port_flag_for_scripts(self): >+ return "--nix" >+ >+ def setup_test_run(self): >+ self._pulseaudio_sanitizer.unload_pulseaudio_module() >+ >+ def setup_environ_for_server(self, server_name=None): >+ env = super(NixPort, self).setup_environ_for_server(server_name) >+ # If DISPLAY environment variable is unset in the system >+ # e.g. on build bot, remove DISPLAY variable from the dictionary >+ if not 'DISPLAY' in os.environ: >+ del env['DISPLAY'] >+ env['TEST_RUNNER_INJECTED_BUNDLE_FILENAME'] = self._build_path('lib', 'libTestRunnerInjectedBundle.so') >+ env['TEST_RUNNER_PLUGIN_PATH'] = self._build_path('lib') >+ if self.webprocess_cmd_prefix: >+ env['WEB_PROCESS_CMD_PREFIX'] = self.webprocess_cmd_prefix >+ >+ return env >+ >+ def default_timeout_ms(self): >+ # Tests run considerably slower under gdb >+ # or valgrind. >+ if self.get_option('webprocess_cmd_prefix'): >+ return 350 * 1000 >+ return super(NixPort, self).default_timeout_ms() >+ >+ def clean_up_test_run(self): >+ super(NixPort, self).clean_up_test_run() >+ self._pulseaudio_sanitizer.restore_pulseaudio_module() >+ >+ def _generate_all_test_configurations(self): >+ return [TestConfiguration(version=self._version, architecture='x86', build_type=build_type) for build_type in self.ALL_BUILD_TYPES] >+ >+ def _path_to_driver(self): >+ return self._build_path('bin', self.driver_name()) >+ >+ def _path_to_image_diff(self): >+ return self._build_path('bin', 'ImageDiff') >+ >+ def _image_diff_command(self, *args, **kwargs): >+ return [self._jhbuild_wrapper_path] + super(NixPort, self)._image_diff_command(*args, **kwargs) >+ >+ def _search_paths(self): >+ return [self.port_name] >+ >+ def show_results_html_file(self, results_filename): >+ run_launcher_args = ["file://%s" % results_filename] >+ self._run_script("run-launcher", run_launcher_args) >+ >+ def _port_specific_expectations_files(self): >+ paths = self._search_paths() >+ if self.get_option('webkit_test_runner'): >+ paths.append('wk2') >+ return list(([self._filesystem.join(self._webkit_baseline_path(p), 'TestExpectations') for p in paths])) >+ >+ def default_baseline_search_path(self): >+ return map(self._webkit_baseline_path, ['nix', 'wk2']) >diff --git a/Tools/Scripts/webkitpy/port/nix_unittest.py b/Tools/Scripts/webkitpy/port/nix_unittest.py >new file mode 100644 >index 0000000000000000000000000000000000000000..eb9fdb968da9c9d635ef982be87b72750180c9e1 >--- /dev/null >+++ b/Tools/Scripts/webkitpy/port/nix_unittest.py >@@ -0,0 +1,68 @@ >+# Copyright (C) 2012-2013 Nokia Corporation and/or its subsidiary(-ies). >+# >+# 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 THE COPYRIGHT HOLDERS ``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 THE COPYRIGHT HOLDERS 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. >+ >+import unittest2 as unittest >+import os >+from copy import deepcopy >+ >+from webkitpy.common.system.executive_mock import MockExecutive, MockExecutive2 >+from webkitpy.common.system.outputcapture import OutputCapture >+from webkitpy.common.system.systemhost_mock import MockSystemHost >+from webkitpy.port import port_testcase >+from webkitpy.port.nix import NixPort >+from webkitpy.tool.mocktool import MockOptions >+ >+ >+class NixPortTest(port_testcase.PortTestCase): >+ port_name = 'nix' >+ port_maker = NixPort >+ search_paths_cases = [ >+ {'search_paths': ['nix', 'wk2'], 'os_name':'linux'}] >+ expectation_files_cases = [ >+ {'search_paths': ['', 'nix', 'wk2'], 'os_name':'linux'}] >+ >+ def _assert_search_path(self, search_paths, os_name): >+ host = MockSystemHost(os_name=os_name) >+ port = self.make_port(port_name=self.port_name, host=host, options=MockOptions(webkit_test_runner=True)) >+ absolute_search_paths = map(port._webkit_baseline_path, search_paths) >+ >+ unittest.TestCase.assertEqual(self, port.baseline_search_path(), absolute_search_paths) >+ >+ def _assert_expectations_files(self, search_paths, os_name): >+ host = MockSystemHost(os_name=os_name) >+ port = self.make_port(port_name=self.port_name, host=host, options=MockOptions(webkit_test_runner=True)) >+ unittest.TestCase.assertEqual(self, port.expectations_files(), search_paths) >+ >+ def test_baseline_search_path(self): >+ for case in self.search_paths_cases: >+ self._assert_search_path(**case) >+ >+ def test_expectations_files(self): >+ for case in self.expectation_files_cases: >+ expectations_case = deepcopy(case) >+ expectations_case['search_paths'] = map(lambda path: '/mock-checkout/LayoutTests/TestExpectations' if not path else '/mock-checkout/LayoutTests/platform/%s/TestExpectations' % (path), expectations_case['search_paths']) >+ self._assert_expectations_files(**expectations_case) >+ >+ def test_default_timeout_ms(self): >+ unittest.TestCase.assertEqual(self, self.make_port(options=MockOptions(configuration='Release')).default_timeout_ms(), 80000) >+ unittest.TestCase.assertEqual(self, self.make_port(options=MockOptions(configuration='Debug')).default_timeout_ms(), 80000) >diff --git a/Tools/jhbuild/jhbuild-wrapper b/Tools/jhbuild/jhbuild-wrapper >index 9d3a87b44aa8190daaa4c537aa28c6c42f72595f..a3a755bf2b5ff3a17c6f4faf50dc15ab361486da 100755 >--- a/Tools/jhbuild/jhbuild-wrapper >+++ b/Tools/jhbuild/jhbuild-wrapper >@@ -95,6 +95,8 @@ def determine_platform(): > return "efl"; > if '--gtk' in sys.argv: > return "gtk"; >+ if '--nix' in sys.argv: >+ return "nix"; > raise ValueError('No platform specified for jhbuild-wrapper.') > > >diff --git a/Tools/nix/common.py b/Tools/nix/common.py >new file mode 100644 >index 0000000000000000000000000000000000000000..ef8357e378e8b93d98a15ecd36971dbd000276c4 >--- /dev/null >+++ b/Tools/nix/common.py >@@ -0,0 +1,32 @@ >+#!/usr/bin/env python >+# Copyright (C) 2011 Igalia S.L. >+# Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). >+# >+# This library is free software; you can redistribute it and/or >+# modify it under the terms of the GNU Lesser General Public >+# License as published by the Free Software Foundation; either >+# version 2 of the License, or (at your option) any later version. >+# >+# This library is distributed in the hope that it will be useful, >+# but WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >+# Lesser General Public License for more details. >+# >+# You should have received a copy of the GNU Lesser General Public >+# License along with this library; if not, write to the Free Software >+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA >+ >+import os >+ >+script_dir = None >+ >+ >+def script_path(*args): >+ global script_dir >+ if not script_dir: >+ script_dir = os.path.join(os.path.dirname(__file__), '..', 'Scripts') >+ return os.path.join(*(script_dir,) + args) >+ >+ >+def top_level_path(*args): >+ return os.path.join(*((script_path('..', '..'),) + args)) >diff --git a/Tools/nix/jhbuild.modules b/Tools/nix/jhbuild.modules >new file mode 100644 >index 0000000000000000000000000000000000000000..8798c0e51394ee9b2fdec7f571836cfce59ce085 >--- /dev/null >+++ b/Tools/nix/jhbuild.modules >@@ -0,0 +1,127 @@ >+<?xml version="1.0"?> >+<!DOCTYPE moduleset SYSTEM "moduleset.dtd"> >+<?xml-stylesheet type="text/xsl" href="moduleset.xsl"?> >+<moduleset> >+ >+ <metamodule id="webkitnix-testing-dependencies"> >+ <dependencies> >+ <dep package="cairo"/> >+ <dep package="fonts"/> >+ <dep package="fontconfig"/> >+ <dep package="freetype6"/> >+ <dep package="harfbuzz"/> >+ <dep package="glib"/> >+ <dep package="glib-networking"/> >+ <dep package="libsoup"/> >+ </dependencies> >+ </metamodule> >+ >+ <repository type="tarball" name="github.com" >+ href="https://github.com"/> >+ <repository type="tarball" name="sourceware.org" >+ href="ftp://sourceware.org"/> >+ <repository type="tarball" name="ftp.gnome.org" >+ href="http://ftp.gnome.org"/> >+ <repository type="git" name="git.gnome.org" >+ href="git://git.gnome.org/"/> >+ <repository type="tarball" name="cairographics.org" >+ href="http://cairographics.org"/> >+ <repository type="tarball" name="freedesktop.org" >+ href="http://www.freedesktop.org"/> >+ >+ <autotools id="cairo" autogen-sh="configure"> >+ <dependencies> >+ <dep package="fontconfig"/> >+ <dep package="pixman"/> >+ </dependencies> >+ <branch module="releases/cairo-1.12.8.tar.xz" version="1.12.8" >+ repo="cairographics.org" >+ hash="sha256:8fbb6fc66117ab4100bad830cb4479497e53c6f3facb98bf05c8d298554ebdd9" >+ md5sum="8b3dcade859c44fb7e56fc68edfe9a45"> >+ </branch> >+ </autotools> >+ >+ <autotools id="pixman" autogen-sh="configure" >+ autogenargs="--enable-gtk=no"> >+ <branch module="snapshots/pixman-0.29.2.tar.gz" version="0.29.2" >+ repo="cairographics.org" >+ hash="sha256:4c4e92143a4557a4617b80caf0a58ccb012d8293741e75389037cd5133b335db" >+ md5sum="8f5795ea98cadd7b7f12e4b373500eef"> >+ </branch> >+ </autotools> >+ >+ <autotools id="fonts" >+ skip-autogen="true"> >+ <branch module="downloads/mrobinson/webkitgtk-test-fonts/webkitgtk-test-fonts-0.0.3.tar.gz" version="0.0.3" >+ repo="github.com" >+ hash="sha256:4a0a01f00855997cdcc7201f164b33a4e4144e8eadf40a5e542a1c448e035de5" >+ md5sum="10e74de1a8ba961d9037994d427b1dd2" size="16981642"> >+ </branch> >+ </autotools> >+ >+ <autotools id="libffi" autogen-sh="configure"> >+ <branch module="/pub/libffi/libffi-3.0.11.tar.gz" version="3.0.11" >+ repo="sourceware.org" >+ hash="sha256:70bfb01356360089aa97d3e71e3edf05d195599fd822e922e50d46a0055a6283" >+ md5sum="f69b9693227d976835b4857b1ba7d0e3"/> >+ </autotools> >+ >+ <tarball id="freetype6"> >+ <source href="download.savannah.gnu.org/releases/freetype/freetype-2.4.2.tar.bz2" version="2.4.2" >+ hash="sha256:9a987aef8c50d9bcfdfdc9f012f8bd0de6095cc1a5524e62c1a037deb8dacbfe" >+ md5sum="647ee8ed266f9a4117c8d0a4855b3d3e" /> >+ </tarball> >+ >+ <autotools id="glib" >+ autogen-sh="configure" >+ autogenargs="--disable-dtrace"> >+ <dependencies> >+ <dep package="libffi"/> >+ </dependencies> >+ <branch module="/pub/GNOME/sources/glib/2.36/glib-2.36.0.tar.xz" version="2.36.0" >+ repo="ftp.gnome.org" >+ hash="sha256:455a8abe8692c5174bcc7ffa15b96a7521a2f2f9fb47594405927c35cb9bb227"/> >+ </autotools> >+ >+ <autotools id="glib-networking"> >+ <dependencies> >+ <dep package="glib"/> >+ </dependencies> >+ <branch module="/pub/GNOME/sources/glib-networking/2.33/glib-networking-2.33.2.tar.xz" version="2.33.2" >+ repo="ftp.gnome.org" >+ hash="sha256:e298cff3935eb752be290bbf734e457f1870bdb5370ee292606e6040a82074e7" >+ md5sum="5abb364f2a0babe2ec1e3a6d59f69043"/> >+ </autotools> >+ >+ <autotools id="libsoup" >+ autogenargs="--without-gnome --disable-introspection"> >+ <dependencies> >+ <dep package="glib-networking"/> >+ </dependencies> >+ <branch module="/pub/GNOME/sources/libsoup/2.42/libsoup-2.42.0.tar.xz" version="2.42.0" >+ repo="ftp.gnome.org" >+ hash="sha256:9e0e7eb5d3f7401ccf521fbc289fc1fa0923b7c7833729e2ed7696f7b848893e" >+ md5sum="a632a38d2983c2a88679672d00940128"/> >+ </autotools> >+ >+ <autotools id="fontconfig" autogen-sh="configure"> >+ <dependencies> >+ <dep package="freetype6"/> >+ </dependencies> >+ <branch module="software/fontconfig/release/fontconfig-2.8.0.tar.gz" version="2.8.0" >+ repo="freedesktop.org" >+ hash="sha256:fa2a1c6eea654d9fce7a4b1220f10c99cdec848dccaf1625c01f076b31382335" >+ md5sum="77e15a92006ddc2adbb06f840d591c0e"> >+ </branch> >+ </autotools> >+ >+ <autotools id="harfbuzz" autogen-sh="configure"> >+ <branch module="software/harfbuzz/release/harfbuzz-0.9.14.tar.bz2" version="0.9.14" >+ checkoutdir="harfbuzz-0.9.14" >+ repo="freedesktop.org" >+ hash="sha256:d07c0ffdbbbfdfbb6c65e73fe9c76466e87dbf04b094cbd0abf5fd7d571a4004" >+ md5sum="7e1990b79060e98e2d31f677a0ac9eed"> >+ </branch> >+ </autotools> >+ >+</moduleset> >diff --git a/Tools/nix/jhbuildrc b/Tools/nix/jhbuildrc >new file mode 100644 >index 0000000000000000000000000000000000000000..3fd3b9b84fd0a966b950124943eff06602a188a1 >--- /dev/null >+++ b/Tools/nix/jhbuildrc >@@ -0,0 +1,71 @@ >+#!/usr/bin/env python >+# Copyright (C) 2011 Igalia S.L. >+# Copyright (C) 2012 Intel Corporation >+# Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). >+# >+# This library is free software; you can redistribute it and/or >+# modify it under the terms of the GNU Lesser General Public >+# License as published by the Free Software Foundation; either >+# version 2 of the License, or (at your option) any later version. >+# >+# This library is distributed in the hope that it will be useful, >+# but WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >+# Lesser General Public License for more details. >+# >+# You should have received a copy of the GNU Lesser General Public >+# License along with this library; if not, write to the Free Software >+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA >+ >+import multiprocessing >+import sys >+ >+__nix_tools_directory = os.path.abspath(os.path.dirname(__file__)) >+sys.path = [__nix_tools_directory] + sys.path >+import common >+ >+build_policy = 'updated' >+ >+# FIXME: move shared parts into ../jhbuild folder. >+ >+__moduleset_file_uri = 'file://' + os.path.join(__nix_tools_directory, 'jhbuild.modules') >+__extra_modulesets = os.environ.get("WEBKIT_EXTRA_MODULESETS", "").split(",") >+moduleset = [ __moduleset_file_uri, ] >+if __extra_modulesets != ['']: >+ moduleset.extend(__extra_modulesets) >+ >+__extra_modules = os.environ.get("WEBKIT_EXTRA_MODULES", "").split(",") >+modules = [ 'webkitnix-testing-dependencies', ] >+if __extra_modules != ['']: >+ modules.extend(__extra_modules) >+ >+if os.environ.has_key('WEBKIT_OUTPUTDIR'): >+ checkoutroot = os.path.abspath(os.path.join(os.environ['WEBKIT_OUTPUTDIR'], 'Dependencies', 'Source')) >+ prefix = os.path.abspath(os.path.join(os.environ['WEBKIT_OUTPUTDIR'], 'Dependencies', 'Root')) >+else: >+ checkoutroot = os.path.abspath(common.top_level_path('WebKitBuild','Dependencies', 'Source')) >+ prefix = os.path.abspath(common.top_level_path('WebKitBuild','Dependencies', 'Root')) >+ >+nonotify = True >+notrayicon = True >+if 'MAKEFLAGS' not in os.environ: >+ os.environ['MAKEFLAGS'] = '-j%d' % multiprocessing.cpu_count() >+ >+# Use system libraries while building. >+if use_lib64: >+ _libdir = 'lib64' >+else: >+ _libdir = 'lib' >+addpath('PKG_CONFIG_PATH', os.path.join(os.sep, 'usr', _libdir, 'pkgconfig')) >+addpath('PKG_CONFIG_PATH', os.path.join(os.sep, 'usr', 'share', 'pkgconfig')) >+ >+addpath('XDG_DATA_DIRS', '/usr/share') >+addpath('XDG_CONFIG_DIRS', '/etc/xdg') >+ >+# Avoid overlapping search path CMAKE warning on 64bit systems. >+if (use_lib64): >+ addpath('CMAKE_PREFIX_PATH', os.path.join(os.sep, prefix, 'lib64')) >+else: >+ addpath('CMAKE_PREFIX_PATH', prefix) >+ >+partial_build = False >diff --git a/Tools/nix/run-with-jhbuild b/Tools/nix/run-with-jhbuild >new file mode 100644 >index 0000000000000000000000000000000000000000..859f2e285470e93396e88fa7a03a4ea115677e20 >--- /dev/null >+++ b/Tools/nix/run-with-jhbuild >@@ -0,0 +1,26 @@ >+#!/usr/bin/env python >+# Copyright (C) 2011 Igalia S.L. >+# Copyright (C) 2012 Intel Corporation >+# Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). >+# >+# This library is free software; you can redistribute it and/or >+# modify it under the terms of the GNU Lesser General Public >+# License as published by the Free Software Foundation; either >+# version 2 of the License, or (at your option) any later version. >+# >+# This library is distributed in the hope that it will be useful, >+# but WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >+# Lesser General Public License for more details. >+# >+# You should have received a copy of the GNU Lesser General Public >+# License along with this library; if not, write to the Free Software >+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA >+ >+import common >+import os >+import sys >+ >+ >+jhbuild_wrapper = common.top_level_path('Tools', 'jhbuild', 'jhbuild-wrapper') >+os.execve(jhbuild_wrapper, [jhbuild_wrapper, '--nix', 'run'] + sys.argv[1:], os.environ) >diff --git a/CMakeLists.txt b/CMakeLists.txt >index 281f94a507568274c7d416e4bc6ce331f1f8258e..bfc49d82fc5cee9007e7db8b0a18fe2937557b45 100644 >--- a/CMakeLists.txt >+++ b/CMakeLists.txt >@@ -10,6 +10,7 @@ set(WEBCORE_DIR "${CMAKE_SOURCE_DIR}/Source/WebCore") > set(WEBKIT_DIR "${CMAKE_SOURCE_DIR}/Source/WebKit") > set(WEBKIT2_DIR "${CMAKE_SOURCE_DIR}/Source/WebKit2") > set(THIRDPARTY_DIR "${CMAKE_SOURCE_DIR}/Source/ThirdParty") >+set(PLATFORM_DIR "${CMAKE_SOURCE_DIR}/Source/Platform") > > set(TOOLS_DIR "${CMAKE_SOURCE_DIR}/Tools") > >@@ -39,7 +40,7 @@ include(WebKitFeatures) > # ----------------------------------------------------------------------------- > # Determine which port will be built > # ----------------------------------------------------------------------------- >-set(ALL_PORTS Efl WinCE BlackBerry GTK) >+set(ALL_PORTS Efl WinCE BlackBerry GTK Nix) > set(PORT "NOPORT" CACHE STRING "choose which WebKit port to build (one of ${ALL_PORTS})") > > list(FIND ALL_PORTS ${PORT} RET) >diff --git a/ChangeLog b/ChangeLog >index 5d2eab60e2b223134d07fbb9bd3181bd370e0857..cea27ceada6979e099ad5493444ef824e40851f8 100644 >--- a/ChangeLog >+++ b/ChangeLog >@@ -1,3 +1,17 @@ >+2013-07-05 Marcelo Lira <marcelo.lira@openbossa.org> >+ >+ Nix upstreaming - Adding build files and supporting scripts >+ https://bugs.webkit.org/show_bug.cgi?id=118367 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * CMakeLists.txt: >+ * Source/CMakeLists.txt: >+ * Source/cmake/FindEGL.cmake: >+ * Source/cmake/FindOpenGLES2.cmake: Added. >+ * Source/cmake/OptionsCommon.cmake: >+ * Source/cmake/OptionsNix.cmake: Added. >+ > 2013-07-01 Gustavo Noronha Silva <gustavo.noronha@collabora.com> > > [GTK] Remove unsupported AC backends
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 118367
:
206019
|
206146
|
206691
|
215523
|
217833
|
217858