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.

Source/Platform:

* CMakeLists.txt: Added.
* PlatformNix.cmake: Added.

Source/WebCore:

No new tests needed.

* CMakeLists.txt:
* PlatformNix.cmake: Added.

Source/WTF:

* wtf/FeatureDefines.h:
* wtf/Platform.h:
* wtf/PlatformNix.cmake: Added.

Tools:

* 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.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 081e85fe
......@@ -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)
......
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
......
......@@ -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 ()
......
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
......
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.
......
......@@ -285,6 +285,11 @@
#endif /* PLATFORM(WIN_CAIRO) */
/* --------- NIX port (Unix) --------- */
#if PLATFORM(NIX)
#include "nix/FeatureDefinesNix.h"
#endif /* PLATFORM(NIX) */
/* --------- EFL port (Unix) --------- */
#if PLATFORM(EFL)
......
......@@ -452,6 +452,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)
......
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}
)
......@@ -2857,14 +2857,15 @@ if (WTF_USE_3D_GRAPHICS)
"${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
This diff is collapsed.
......@@ -35,3 +35,7 @@ find_library(EGL_LIBRARY NAMES ${EGL_NAMES})
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 ()
# 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)
......
# 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
......
......@@ -4,6 +4,7 @@
# 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
......@@ -36,7 +37,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,9 +63,43 @@ my $noWebKit1 = 0;
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'});
......@@ -94,6 +129,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
--wincairo Build using Cairo (rather than CoreGraphics) on Windows
--wince Build the WinCE port
......@@ -110,6 +146,9 @@ Usage: $programName [options] [options to pass to build system]
--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 = (
......@@ -125,6 +164,8 @@ my %options = (
'no-webkit1' => \$noWebKit1,
'no-webkit2' => \$noWebKit2,
'coverage' => \$coverageSupport,
'curl' => \$curl,
'opengles2' => \$opengles2,
);
# Build usage text and options list from features
......@@ -231,6 +272,24 @@ if (isInspectorFrontend()) {
@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+/;
......
#!/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
......@@ -80,6 +81,8 @@ if (isGtk()) {
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
......@@ -23,15 +24,17 @@ use Getopt::Long qw(:config pass_through);
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 +42,9 @@ if (!$getOptionsResult) {
if ($platformGtk) {
$platform = "gtk";
}
if ($platformNix) {
$platform = "nix";
}
}
sub getMD5HashForFile($)
......@@ -120,7 +126,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();
......
#!/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
......@@ -94,6 +95,7 @@ my $isWinCE;
my $isWinCairo;
my $isWin64;
my $isEfl;
my $isNix;
my $isBlackBerry;
my $isInspectorFrontend;
my $isWK2;
......@@ -314,7 +316,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 \"([^"]+)\"/) {
......@@ -324,13 +326,13 @@ sub determineArchitecture