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")
# -----------------------------------------------------------------------------
# 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)
+2013-11-26 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 Ryosuke Niwa.
+
+ * CMakeLists.txt:
+ * Source/CMakeLists.txt:
+ * Source/cmake/FindEGL.cmake:
+ * Source/cmake/FindOpenGLES2.cmake: Added.
+ * Source/cmake/OptionsCommon.cmake:
+ * Source/cmake/OptionsNix.cmake: Added.
+
2013-11-25 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] E_DBus should be an optional
add_subdirectory(JavaScriptCore)
+if ("${PORT}" STREQUAL "Nix")
+ add_subdirectory(Platform)
+endif ()
+
if (ENABLE_API_TESTS)
add_subdirectory(cmake/gtest)
endif ()
# -----------------------------------------------------------------------------
# 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 ()
--- /dev/null
+WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
+
+include_directories(${Platform_INCLUDES})
+add_library(Platform STATIC ${Platform_SOURCES})
+set_target_properties(Platform PROPERTIES FOLDER "Platform")
+2013-11-26 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 Ryosuke Niwa.
+
+ * CMakeLists.txt: Added.
+ * PlatformNix.cmake: Added.
+
2013-11-07 Denis Nomiyama <d.nomiyama@samsung.com>
[GTK] Glyphs in vertical text tests are rotated 90 degrees clockwise
--- /dev/null
+set(Platform_INCLUDES
+ nix
+ ${CMAKE_BINARY_DIR} # For cmakeconfig.h
+ ${WEBCORE_DIR}/platform/graphics/ # For IntRect.h
+ ${WTF_DIR} # For config.h
+)
+
+set(Platform_HEADERS
+ nix/public/AudioDevice.h
+ nix/public/Canvas.h
+ nix/public/Color.h
+ nix/public/Common.h
+ nix/public/FFTFrame.h
+ nix/public/Gamepad.h
+ nix/public/Gamepads.h
+ nix/public/MediaPlayer.h
+ nix/public/MultiChannelPCMData.h
+ nix/public/Platform.h
+ nix/public/Rect.h
+ nix/public/Size.h
+ nix/public/ThemeEngine.h
+)
+
+set(Platform_SOURCES
+ nix/src/DefaultWebThemeEngine.cpp
+ nix/src/Platform.cpp
+)
+
+install(FILES ${Platform_HEADERS} DESTINATION include/${WebKit2_OUTPUT_NAME}-${PROJECT_VERSION_MAJOR}/NixPlatform)
+2013-11-26 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 Ryosuke Niwa.
+
+ * wtf/FeatureDefines.h:
+ * wtf/Platform.h:
+ * wtf/PlatformNix.cmake: Added.
+
2013-11-26 Drew Yao <ayao@apple.com>
ASSERT_WITH_SECURITY_IMPLICATION should crash in a distinct way.
#endif /* PLATFORM(WIN_CAIRO) */
+/* --------- NIX port (Unix) --------- */
+#if PLATFORM(NIX)
+#include "nix/FeatureDefinesNix.h"
+#endif /* PLATFORM(NIX) */
+
/* --------- EFL port (Unix) --------- */
#if PLATFORM(EFL)
#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)
--- /dev/null
+list(APPEND WTF_SOURCES
+ gobject/GOwnPtr.cpp
+ gobject/GRefPtr.cpp
+ gobject/GlibUtilities.cpp
+
+ gtk/MainThreadGtk.cpp
+)
+
+list(APPEND WTF_LIBRARIES
+ pthread
+ ${GLIB_LIBRARIES}
+ ${GLIB_GIO_LIBRARIES}
+ ${ZLIB_LIBRARIES}
+)
+
+list(APPEND WTF_INCLUDE_DIRECTORIES
+ ${GLIB_INCLUDE_DIRS}
+)
"${THIRDPARTY_DIR}/ANGLE/include/GLSLANG"
"${WEBCORE_DIR}/platform/graphics/gpu"
)
- if (OPENGL_FOUND)
+ # Nix may use either OpenGL or OpenGLES2 headers, so we handle this at PlatformNix.cmake.
+ if (OPENGL_FOUND AND NOT PORT STREQUAL "Nix")
list(APPEND WebCore_INCLUDE_DIRECTORIES
${OPENGL_INCLUDE_DIR}
)
list(APPEND WebCore_LIBRARIES
${OPENGL_gl_LIBRARY}
)
- elseif (OPENGLES2_FOUND)
+ elseif (OPENGLES2_FOUND AND NOT PORT STREQUAL "Nix")
list(APPEND WebCore_INCLUDE_DIRECTORIES
${OPENGLES2_INCLUDE_DIR}
)
+2013-11-26 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 Ryosuke Niwa.
+
+ No new tests needed.
+
+ * CMakeLists.txt:
+ * PlatformNix.cmake: Added.
+
2013-11-26 Tim Horton <timothy_horton@apple.com>
Don't parent the TileController root layer in two places
--- /dev/null
+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/nix"
+ "${WEBCORE_DIR}/platform/graphics/opengl"
+ "${WEBCORE_DIR}/platform/graphics/opentype"
+ "${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
+ css/WebKitCSSArrayFunctionValue.cpp
+ css/WebKitCSSMatFunctionValue.cpp
+ css/WebKitCSSMatrix.cpp
+ css/WebKitCSSMixFunctionValue.cpp
+
+ editing/SmartReplaceICU.cpp
+
+ html/shadow/MediaControlsNix.cpp
+
+ page/TouchAdjustment.cpp
+
+ page/nix/EventHandlerNix.cpp
+
+ platform/ContextMenuItemNone.cpp
+ platform/ContextMenuNone.cpp
+ platform/Cursor.cpp
+ platform/LocalizedStrings.cpp
+ platform/PlatformStrategies.cpp
+
+ platform/cairo/WidgetBackingStoreCairo.cpp
+
+ platform/graphics/ImageSource.cpp
+ platform/graphics/OpenGLShims.cpp
+ platform/graphics/WOFFFileFormat.cpp
+
+ platform/graphics/cairo/BitmapImageCairo.cpp
+ platform/graphics/cairo/CairoUtilities.cpp
+ platform/graphics/cairo/DrawingBufferCairo.cpp
+ platform/graphics/cairo/FontCairo.cpp
+ platform/graphics/cairo/FontCairoHarfbuzzNG.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/graphics/filters/CustomFilterMeshGenerator.cpp
+ platform/graphics/filters/CustomFilterValidatedProgram.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/nix/IconNix.cpp
+ platform/graphics/nix/ImageNix.cpp
+
+ platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
+ platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
+
+ platform/graphics/opentype/OpenTypeVerticalData.cpp
+
+ platform/graphics/texmap/GraphicsLayerTextureMapper.cpp
+ platform/graphics/texmap/TextureMapperGL.cpp
+ platform/graphics/texmap/TextureMapperShaderProgram.cpp
+
+ platform/gtk/EventLoopGtk.cpp
+ platform/gtk/LoggingGtk.cpp
+ platform/gtk/SharedBufferGtk.cpp
+
+ platform/image-decoders/ImageDecoder.cpp
+
+ platform/image-decoders/bmp/BMPImageDecoder.cpp
+ platform/image-decoders/bmp/BMPImageReader.cpp
+
+ platform/image-decoders/cairo/ImageDecoderCairo.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/nix/CursorNix.cpp
+ platform/nix/DragDataNix.cpp
+ platform/nix/DragImageNix.cpp
+ platform/nix/GamepadsNix.cpp
+ platform/nix/LanguageNix.cpp
+ platform/nix/LocalizedStringsNix.cpp
+ platform/nix/NixKeyboardUtilities.cpp
+ platform/nix/PasteboardNix.cpp
+ platform/nix/PlatformKeyboardEventNix.cpp
+ platform/nix/PlatformScreenNix.cpp
+ platform/nix/RenderThemeNix.cpp
+ platform/nix/ScrollbarThemeNix.cpp
+ platform/nix/SoundNix.cpp
+ platform/nix/WidgetNix.cpp
+
+ platform/nix/support/MultiChannelPCMData.cpp
+
+ platform/text/LocaleNone.cpp
+
+ platform/text/nix/TextBreakIteratorInternalICUNix.cpp
+
+ plugins/PluginDatabase.cpp
+ plugins/PluginDebug.cpp
+ plugins/PluginPackage.cpp
+ plugins/PluginPackageNone.cpp
+ plugins/PluginStream.cpp
+ plugins/PluginView.cpp
+ plugins/PluginViewNone.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/GLContext.cpp
+ platform/graphics/GraphicsContext3DPrivate.cpp
+
+ platform/graphics/cairo/GraphicsContext3DCairo.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/GLTransportSurface.cpp
+ platform/graphics/surfaces/GraphicsSurface.cpp
+
+ platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp
+
+ platform/graphics/surfaces/glx/GLXContext.cpp
+ platform/graphics/surfaces/glx/GLXSurface.cpp
+ platform/graphics/surfaces/glx/X11Helper.cpp
+ )
+ list(APPEND WebCore_LIBRARIES ${X11_X11_LIB} ${X11_Xcomposite_LIB} ${X11_Xrender_LIB})
+
+ if (ENABLE_MEDIA_STREAM)
+ list(APPEND WebCore_LIBRARIES ${X11_Xext_LIB})
+ endif ()
+endif ()
+
+if (ENABLE_BATTERY_STATUS)
+ list(APPEND WebCore_INCLUDE_DIRECTORIES ${DBUS_INCLUDE_DIRS})
+ list(APPEND WebCore_LIBRARIES ${DBUS_LIBRARIES})
+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}
+ ${GLIB_GIO_LIBRARIES}
+ ${GLIB_GMODULE_LIBRARIES}
+ ${GLIB_GOBJECT_LIBRARIES}
+ ${GLIB_LIBRARIES}
+ ${HARFBUZZ_LIBRARIES}
+ ${JPEG_LIBRARY}
+ ${LIBXML2_LIBRARIES}
+ ${LIBXSLT_LIBRARIES}
+ ${PNG_LIBRARY}
+ ${SQLITE_LIBRARIES}
+ ${ZLIB_LIBRARIES}
+ Platform
+)
+
+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 (WTF_USE_CURL)
+ list(APPEND WebCore_INCLUDE_DIRECTORIES
+ "${WEBCORE_DIR}/platform/network/curl"
+ )
+
+ list(APPEND WebCore_SOURCES
+ platform/network/NetworkStorageSessionStub.cpp
+
+ platform/network/curl/CookieDatabaseBackingStore.cpp
+ platform/network/curl/CookieJarCurl.cpp
+ platform/network/curl/CookieManager.cpp
+ platform/network/curl/CookieNode.cpp
+ platform/network/curl/CookieStorageCurl.cpp
+ platform/network/curl/CredentialStorageCurl.cpp
+ platform/network/curl/DNSCurl.cpp
+ platform/network/curl/FormDataStreamCurl.cpp
+ platform/network/curl/MultipartHandle.cpp
+ platform/network/curl/ParsedCookie.cpp
+ platform/network/curl/ProxyServerCurl.cpp
+ platform/network/curl/ResourceHandleCurl.cpp
+ platform/network/curl/ResourceHandleManager.cpp
+ platform/network/curl/SocketStreamHandleCurl.cpp
+ platform/network/curl/SynchronousLoaderClientCurl.cpp
+ )
+
+ list(APPEND WebCore_LIBRARIES
+ ${CURL_LIBRARIES}
+ )
+else ()
+ list(APPEND WebCore_SOURCES
+ loader/soup/CachedRawResourceSoup.cpp
+ loader/soup/SubresourceLoaderSoup.cpp
+
+ 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
+ platform/network/soup/SynchronousLoaderClientSoup.cpp
+
+ # Uncomment it after https://bugs.webkit.org/show_bug.cgi?id=118598 is fixed and merged to Nix.
+ # platform/soup/SharedBufferSoup.cpp
+ )
+
+ list(APPEND WebCore_INCLUDE_DIRECTORIES
+ "${WEBCORE_DIR}/platform/network/soup"
+ ${LIBSOUP_INCLUDE_DIRS}
+ )
+
+ list(APPEND WebCore_LIBRARIES
+ ${LIBSOUP_LIBRARIES}
+ )
+endif ()
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(EGL DEFAULT_MSG EGL_INCLUDE_DIR EGL_LIBRARY)
+
+if (PORT STREQUAL "Nix")
+ mark_as_advanced(EGL_INCLUDE_DIR EGL_LIBRARY)
+endif ()
--- /dev/null
+# 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)
-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)
--- /dev/null
+# 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 0)
+set(ENABLE_WEBKIT 0)
+set(ENABLE_WEBKIT2 1)
+
+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)
+
+# Variable 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 ON)
+
+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()
+
+
+
+2013-11-26 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 Ryosuke Niwa.
+
+ * Scripts/build-webkit:
+ * 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):
+ (determineIsNix):
+ (isNix):
+ (isAppleWebKit):
+ (launcherPath):
+ (launcherName):
+ (checkRequiredSystemConfig):
+ (copyInspectorFrontendFiles):
+ (jhbuildWrapperPrefixIfNeeded):
+ (buildCMakeProjectOrExit):
+ (cmakeBasedPortName):
+ * Scripts/webkitpy/common/config/ports.py:
+ (DeprecatedPort.port):
+ (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.
+
2013-11-26 Ryosuke Niwa <rniwa@webkit.org>
Record subtest values in Dromaeo tests
# Copyright (C) 2009 Google Inc. All rights reserved.
# Copyright (C) 2010 moiji-mobile.com All rights reserved.
# Copyright (C) 2011 Research In Motion Limited. All rights reserved.
+# Copyright (C) 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
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);
my $noWebKit2 = 0;
my $coverageSupport = 0;
my $startTime = time();
+my $curl = 0;
+my $opengles2 = 0;
my @features = getFeatureOptionList();
+# 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\]\$\\|^#define WTF_USE_\\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'});
--blackberry Build the BlackBerry port on Mac/Linux
--efl Build the EFL port
+ --nix Build the Nix port
--gtk Build the GTK+ port
--wincairo Build using Cairo (rather than CoreGraphics) on Windows
--wince Build the WinCE port
--no-webkit1 Omit WebKit1 code from the build (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 = (
'no-webkit1' => \$noWebKit1,
'no-webkit2' => \$noWebKit2,
'coverage' => \$coverageSupport,
+ 'curl' => \$curl,
+ 'opengles2' => \$opengles2,
);
# Build usage text and options list from features
@projects = ("Source/WebInspectorUI");
}
+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+/;
--- /dev/null
+#!/usr/bin/perl -w
+# Copyright (C) 2012 Intel Corporation. All rights reserved.
+# 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:
+#
+# * 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());
#!/usr/bin/perl -w
# Copyright (C) 2010 Google Inc. All rights reserved.
# Copyright (C) 2013 Apple Inc. All rights reserved.
+# Copyright (C) 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
push(@ARGV, "--gtk");
} elsif (isEfl()) {
push(@ARGV, "--efl");
+} elsif (isNix()) {
+ push(@ARGV, "--nix");
} elsif (isWinCairo()) {
push(@ARGV, "--wincairo");
}
#!/usr/bin/perl -w
# Copyright (C) 2011 Igalia S.L.
# Copyright (C) 2012 Intel Corporation
+# Copyright (C) 2013 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
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";
if ($platformGtk) {
$platform = "gtk";
}
+ if ($platformNix) {
+ $platform = "nix";
+ }
}
sub getMD5HashForFile($)
chdir(relativeScriptsDir() . "/../jhbuild") or die $!;
-my %prettyPlatform = ( "efl" => "EFL", "gtk" => "GTK+" );
+my %prettyPlatform = ( "efl" => "EFL", "gtk" => "GTK+", "nix" => "Nix" );
if (-e getJhbuildPath() && jhbuildConfigurationChanged()) {
cleanJhbuild();
--- /dev/null
+#!/usr/bin/perl -w
+# Copyright (C) 2012 Intel Corporation
+# Copyright (C) 2012, 2013 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", @ARGV) == 0 or die $!;
# Copyright (C) 2005, 2006, 2007, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
# Copyright (C) 2009 Google Inc. All rights reserved.
# Copyright (C) 2011 Research In Motion Limited. All rights reserved.
+# Copyright (C) 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
my $isWinCairo;
my $isWin64;
my $isEfl;
+my $isNix;
my $isBlackBerry;
my $isInspectorFrontend;
my $isWK2;
$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 \"([^"]+)\"/) {
}
}
- 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;
push(@args, '--64-bit') if (isWin64());
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();
sub jscProductDir
{
my $productDir = productDir();
- $productDir .= "/bin" if isEfl();
+ $productDir .= "/bin" if (isEfl() || isNix());
$productDir .= "/Programs" if isGtk();
return $productDir;
}
return "$configurationProductDir/lib/libewebkit.so";
}
+ if (isNix()) {
+ return "$configurationProductDir/lib/libWebKitNix.so";
+ }
if (isWinCE()) {
return "$configurationProductDir/$libraryName";
}
return $isEfl;
}
+sub determineIsNix()
+{
+ return if defined($isNix);
+ $isNix = checkForArgumentAndRemoveFromARGV("--nix");
+}
+
+sub isNix()
+{
+ determineIsNix();
+ return $isNix;
+}
sub isGtk()
{
determineIsGtk();
sub isAppleWebKit()
{
- return !(isGtk() or isEfl() or isWinCE() or isBlackBerry());
+ return !(isGtk() or isEfl() or isWinCE() or isBlackBerry() or isNix());
}
sub isAppleMacWebKit()
sub launcherPath()
{
my $relativeScriptsPath = relativeScriptsDir();
- if (isGtk() || isEfl() || isWinCE()) {
+ if (isGtk() || isEfl() || isWinCE() || isNix()) {
return "$relativeScriptsPath/run-launcher";
} elsif (isAppleWebKit()) {
return "$relativeScriptsPath/run-safari";
return "EWebLauncher/MiniBrowser";
} elsif (isWinCE()) {
return "WinCELauncher";
+ } elsif (isNix()) {
+ return "MiniBrowser";
}
}
print "most likely fail. The latest Xcode is available from the App Store.\n";
print "*************************************************************\n";
}
- } elsif (isGtk() or isEfl() or isWindows()) {
+ } elsif (isGtk() or isEfl() or isWindows() or isNix()) {
my @cmds = qw(bison gperf flex);
my @missing = ();
my $oldPath = $ENV{PATH};
}
} elsif (isAppleWinWebKit() || isWinCairo()) {
$inspectorResourcesDirPath = $productDir . "/WebKit.resources/inspector";
- } elsif (isGtk()) {
+ } elsif (isGtk() || isNix()) {
my $prefix = $ENV{"WebKitInstallationPrefix"};
$inspectorResourcesDirPath = (defined($prefix) ? $prefix : "/usr/share") . "/webkit-1.0/webinspector";
} elsif (isEfl()) {
push(@prefix, "--efl");
} elsif (isGtk()) {
push(@prefix, "--gtk");
+ } elsif (isNix()) {
+ push(@prefix, "--nix");
}
push(@prefix, "run");
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;
return "BlackBerry" if isBlackBerry();
return "Efl" if isEfl();
return "WinCE" if isWinCE();
+ return "Nix" if isNix();
return "";
}
# Copyright (C) 2009, Google Inc. All rights reserved.
+# Copyright (C) 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
"qt-wk2": QtWK2Port,
"efl": EflPort,
"efl-wk2": EflWK2Port,
+ "nix": NixPort,
}
default_port = {
"Windows": WinPort,
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
# Copyright (C) 2010 Google Inc. All rights reserved.
# Copyright (C) 2013 Apple Inc. All rights reserved.
+# Copyright (C) 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
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')),
class PortFactory(object):
PORT_CLASSES = (
'efl.EflPort',
+ 'nix.NixPort',
'gtk.GtkPort',
'mac.MacPort',
'mock_drt.MockDRTPort',
--- /dev/null
+# 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, 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:
+#
+# * 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', 'jhbuild', 'jhbuild-wrapper'), '--nix', 'run']
+
+ self.set_option_default('wrapper', ' '.join(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'])
--- /dev/null
+# 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)
# Copyright (C) 2011 Igalia S.L.
# Copyright (C) 2012 Gustavo Noronha Silva <gns@gnome.org>
# Copyright (C) 2012 Intel Corporation
+# Copyright (C) 2012, 2013 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
return "efl";
if '--gtk' in sys.argv:
return "gtk";
+ if '--nix' in sys.argv:
+ return "nix";
raise ValueError('No platform specified for jhbuild-wrapper.')
--- /dev/null
+#!/usr/bin/env python
+# Copyright (C) 2011 Igalia S.L.
+# Copyright (C) 2012, 2013 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))
--- /dev/null
+<?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"/>
+ <repository type="tarball" name="savannah.org"
+ href="http://download.savannah.gnu.org"/>
+ <repository type="git" name="git.github.com"
+ href="git://github.com"/>
+
+ <autotools id="cairo" autogen-sh="configure"
+ makeargs="CFLAGS=-fno-lto CXXFLAGS=-fno-lto LDFLAGS=-fno-lto">
+ <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"/>
+ </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"/>
+ </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"/>
+ </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"/>
+ </autotools>
+
+ <autotools id="freetype6" autogen-sh="configure">
+ <branch module="releases/freetype/freetype-2.4.2.tar.bz2" version="2.4.2"
+ repo="savannah.org"
+ hash="sha256:9a987aef8c50d9bcfdfdc9f012f8bd0de6095cc1a5524e62c1a037deb8dacbfe"/>
+ </autotools>
+
+ <autotools id="glib"
+ autogen-sh="configure"
+ autogenargs="--disable-dtrace">
+ <dependencies>
+ <dep package="libffi"/>
+ </dependencies>
+ <branch module="/pub/GNOME/sources/glib/2.38/glib-2.38.0.tar.xz" version="2.38.0"
+ repo="ftp.gnome.org"
+ hash="sha256:7513a7de5e814ccb48206340a8773ea523d6a7bf04dc74565de69b899bc2ff32"/>
+ </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"/>
+ </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"/>
+ </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"/>
+ </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"/>
+ </autotools>
+
+</moduleset>
--- /dev/null
+#!/usr/bin/env python
+# Copyright (C) 2011 Igalia S.L.
+# Copyright (C) 2012 Intel Corporation
+# Copyright (C) 2012, 2013 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
+import os
+
+__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