Add Tizen-platform Chromium build system.
authorPiotr Tworek <p.tworek@samsung.com>
Tue, 1 Apr 2014 14:45:26 +0000 (16:45 +0200)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
Packaging and building of standalone chromium-efl project.

This patch includes all the prebuild scripts and .gyp files.

Change-Id: I0aeecba40a744e0a0f845fc0769cbc007a4baa3d

Conflicts:

src/build/common.gypi

25 files changed:
tizen_src/.gitignore [new file with mode: 0644]
tizen_src/README.md [new file with mode: 0644]
tizen_src/VERSION [new file with mode: 0644]
tizen_src/build/common.sh [new file with mode: 0644]
tizen_src/build/envsetup.sh [new file with mode: 0644]
tizen_src/build/gyp_chromiumefl [new file with mode: 0755]
tizen_src/build/jhbuild/jhbuild.modules [new file with mode: 0644]
tizen_src/build/jhbuild/jhbuildrc [new file with mode: 0644]
tizen_src/build/prebuild.sh [new file with mode: 0755]
tizen_src/build/prebuild/gold [new file with mode: 0755]
tizen_src/build/prebuild/ld [new file with mode: 0755]
tizen_src/build/prebuild/ninja [new file with mode: 0755]
tizen_src/build/prebuild_desktop.sh [new file with mode: 0755]
tizen_src/build/prebuild_mobile.sh [new file with mode: 0755]
tizen_src/build/prebuild_tv.sh [new file with mode: 0755]
tizen_src/build/restore_gyp.sh [new file with mode: 0755]
tizen_src/build/system_deps_mobile.sh [new file with mode: 0644]
tizen_src/build/system_deps_tv.sh [new file with mode: 0644]
tizen_src/impl/chromium-efl.filter [new file with mode: 0644]
tizen_src/impl/chromium-efl.gyp [new file with mode: 0644]
tizen_src/impl/chromium-efl.gypi [new file with mode: 0644]
tizen_src/packaging/chromium-efl.spec [new file with mode: 0644]
tizen_src/packaging/org.tizen.chromium-efl.manifest [new file with mode: 0644]
tizen_src/pkgconfig/chromium-efl.pc.in [new file with mode: 0644]
tizen_src/scripts/update-chromium-version.sh [new file with mode: 0755]

diff --git a/tizen_src/.gitignore b/tizen_src/.gitignore
new file mode 100644 (file)
index 0000000..ee5e76b
--- /dev/null
@@ -0,0 +1,6 @@
+*.o
+*.orig
+/*.list
+/out.*
+/packaging/*.tar.gz
+/build/TARGET
diff --git a/tizen_src/README.md b/tizen_src/README.md
new file mode 100644 (file)
index 0000000..bedf83d
--- /dev/null
@@ -0,0 +1,85 @@
+chromium-efl
+==========
+
+chromium-efl is a Chromium/Blink engine port to tizen/efl platform. The port
+implements Chromium/Blink platform APIs, but does not expose a public API to
+be used by the embedder
+
+Building
+----------
+
+### For Desktop build
+
+    $ source ./build/prebuild.sh desktop (optional : run only if build setting changed)
+    $ ninja -C <outdir>
+      : where <outdir> = out.x64/Release or out.x64/Debug (if 64-bit machine)
+
+### For Mobile build
+Before Tizen build You need to install GBS.
+Please refer to (https://developer.tizen.org/help/index.jsp?topic=%2Forg.tizen.
+platform.development%2Fhtml%2Fplatform_dev_env%2Fgit_build_system.htm)
+
+1. set repo urls in your gbs.conf as follows:
+    [general]
+    profile = profile.tizenmb
+
+    [profile.tizenmb]
+    user = <your id>
+    passwdx =
+    obs = obs.tizenmb
+    # The order is IMPORTANT!
+    repos = repo.tizenmb_supplement, repo.tizenmb_base
+
+    [obs.tizenmb]
+    url = http://slp-build.sec.samsung.net:81
+    # base repo
+
+    [repo.tizenmb_base]
+    url = http://10.251.52.177/tizenrepo/jpn-dcm/Redwood8974JPNDCM_20131218.006
+
+    # Supplementary repo for additional rpms packages required in gbs build
+    [repo.tizenmb_supplement]
+    url = http://10.251.52.177/tizenrepo/jpn-dcm/supplement
+
+2. Build
+    $ ./build/prebuild.sh mobile  (optional : run only if build setting changed)
+    $ gbs build -A armv7l --incremental --include-all [--clean]
+      [--define '_debug_mode 1']   excute debug build (default : release)
+      [--define '_skip_gyp 1']     skip gyp generate  (default : gyp generate)
+
+### For TV build
+Before Tizen build You need to install GBS.
+Please refer to (https://developer.tizen.org/help/index.jsp?topic=%2Forg.tizen.
+platform.development%2Fhtml%2Fplatform_dev_env%2Fgit_build_system.htm)
+
+1. set repo urls in your gbs.conf as follows:
+    [general]
+    profile = profile.tizentv
+
+    [profile.tizentv]
+    user = <your id>
+    passwdx =
+    obs = obs.tizentv
+    # The order is IMPORTANT!
+    repos = repo.tizentv_supplement, repo.tizentv, repo.tizen
+
+    [obs.tizentv]
+    url = https://168.219.241.168/api
+    user = obs_view
+    passwdx = obs_viewer
+
+    [repo.tizentv]
+    url = http://168.219.241.168/snapshots/tztv-2.2/profile/latest
+
+    [repo.tizen]
+    url = http://168.219.241.168/tizen-rsa/2.2.0_RC11_R1/tizen-2.2_20130717.6/
+
+    # Supplementary repo for additional rpms packages required in gbs build
+    [repo.tizentv_supplement]
+    url = http://10.251.52.177/tizenrepo/jpn-dcm/supplement_tv
+
+2. Build
+    $ ./build/prebuild.sh tv      (optional : run only if build setting changed)
+    $ gbs build -A armv7l --incremental --include-all [--clean]
+      [--define '_debug_mode 1']   excute debug build (default : release)
+      [--define '_skip_gyp 1']     skip gyp generate  (default : gyp generate)
diff --git a/tizen_src/VERSION b/tizen_src/VERSION
new file mode 100644 (file)
index 0000000..4c15a6c
--- /dev/null
@@ -0,0 +1 @@
+Chromium upsteam version: 34.0.1847.76
diff --git a/tizen_src/build/common.sh b/tizen_src/build/common.sh
new file mode 100644 (file)
index 0000000..ce1a347
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+pushd `dirname ${BASH_SOURCE[0]}` > /dev/null
+SCRIPT_PATH=`pwd -L`
+popd > /dev/null
+
+PROJECT_ROOT_PATH="${SCRIPT_PATH}/.."
+if [[ -z "${CHROME_SRC}" ]]; then
+  # If $CHROME_SRC was not set, assume src subfolder in project directory is CHROME_SRC.
+  export CHROME_SRC="${PROJECT_ROOT_PATH}/src"
+fi
+
+function applyPatch {
+  directory=$1
+  shift
+  patchfile=$1
+  shift
+  echo Applying $patchfile in $directory
+  pushd "$directory" > /dev/null
+  patch -p1 $@ < "$patchfile"
+  popd > /dev/null
+}
+
diff --git a/tizen_src/build/envsetup.sh b/tizen_src/build/envsetup.sh
new file mode 100644 (file)
index 0000000..1c7cf19
--- /dev/null
@@ -0,0 +1,197 @@
+#!/bin/bash
+
+if [ ! -z ${BASH_SOURCE[0]} ]; then
+  _ARGV0=${BASH_SOURCE[0]}
+else
+  _ARGV0=$0
+fi
+
+if [ "${BUILDING_WITH_GBS}" = 1 ]; then
+  TOP_DIR=$(pwd -P)
+else
+  _SCRIPT=$(readlink -f $_ARGV0)
+  _SCRIPT_DIR=$(dirname $_SCRIPT)
+  TOP_DIR="${_SCRIPT_DIR}/../"
+fi
+
+setup_jhbuild_deps() {
+  export JHBUILD_DEPS="${TOP_DIR}/${GYP_GENERATOR_OUTPUT}/Dependencies/Root"
+  if [ -d "$JHBUILD_DEPS" ] ; then
+    if [ ${host_arch} = 'x64' ]; then
+      _LIBDIR=lib64
+    elif [ ${host_arch} = 'ia32' ]; then
+      _LIBDIR=lib
+    fi
+    export PKG_CONFIG_PATH="${JHBUILD_DEPS}/${_LIBDIR}/pkgconfig"
+    export LD_LIBRARY_PATH="${JHBUILD_DEPS}/${_LIBDIR}"
+    export PATH="$PATH:${JHBUILD_DEPS}/bin"
+  fi
+}
+
+if [[ -z "${CHROME_SRC}" ]]; then
+  # If $CHROME_SRC was not set, assume src subfolder in current directory is CHROME_SRC.
+  export CHROME_SRC="${TOP_DIR}/src"
+fi
+
+if [ "$CHROMIUM_TIZEN_CROSSCOMPILE" = 1 ] ; then
+  if [ "x"$TIZEN_SDK_PATH = "x" ]; then
+    TIZEN_SDK_PATH="$HOME/tizen-sdk"
+  fi
+  if [ "x"$GBS_ROOT_PATH = "x" ]; then
+    GBS_ROOT_PATH="$HOME/GBS-ROOT"
+  fi
+
+  export CROSSTOOLROOT="${TIZEN_SDK_PATH}"/tools/arm-linux-gnueabi-gcc-4.5
+  export CROSSTOOLLIBEXEC=$CROSSTOOLROOT/libexec/gcc/arm-linux-gnueabi/4.5.4
+  export CROSSTOOLBIN=$CROSSTOOLROOT/bin
+  export CROSSTOOL=$CROSSTOOLBIN/arm-linux-gnueabi
+  export CXX_target=$CROSSTOOL-g++
+  export CC_target=$CROSSTOOL-gcc
+  export AR_target=$CROSSTOOL-ar
+  export AS_target=$CROSSTOOL-as
+  export RANLIB_target=$CROSSTOOL-ranlib
+  export CXX_host=g++
+  export CC_host=gcc
+  export AR_host=ar
+  export AS_host=as
+  export RANLIB_host=ranlib
+  export PATH=$CROSSTOOLBIN:$PATH
+
+  export SYSROOTDIR="${GBS_ROOT_PATH}"/local/BUILD-ROOTS/scratch.armv7l.0
+  export GYP_CROSSCOMPILE=1
+  toolchain_target=arm-linux-gnueabi-gcc-4.5
+  toolchain_path="${TIZEN_SDK_PATH}"/tools/arm-linux-gnueabi-gcc-4.5/bin
+  export PKG_CONFIG_PATH=/usr/lib
+else
+  export GYP_CROSSCOMPILE=0
+  export SYSROOTDIR="\"\""
+fi
+
+export GYP_GENERATORS=ninja
+host_os=$(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')
+host_arch=$(uname -m | sed -e \
+        's/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/')
+python_ver=$(python --version  2>&1 | sed -e 's/Python \([0-9]\+\.[0-9]\+\)\.[0-9]\+/\1/')
+
+DEFINES="OS=linux"
+DEFINES+=" host_os=${host_os} host_arch=${host_arch} python_ver=${python_ver}"
+DEFINES+=" use_libjpeg_turbo=0 use_kerberos=0 enable_automation=0 remoting=0"
+DEFINES+=" enable_google_now=0 enable_language_detection=0 proprietary_codecs=1"
+DEFINES+=" use_cups=0 use_xi2_mt=2 toolkit_uses_gtk=0 use_aura=1"
+
+# System dependencies
+if [ -e "${TOP_DIR}/build/TARGET" ]; then
+  if [ $(cat "${TOP_DIR}/build/TARGET") = "mobile" ]; then
+    . build/system_deps_mobile.sh
+  else # tv
+    . build/system_deps_tv.sh
+  fi
+  DEFINES+=" $SYSTEM_DEPS"
+fi
+
+if [ $host_arch = "arm" -o "$CHROMIUM_TIZEN_CROSSCOMPILE" = 1 ] ; then
+  target_arch="arm"
+  DEFINES+=" sysroot=${SYSROOTDIR}"
+  DEFINES+=" target_arch=arm armv7=1 arm_thumb=1 arm_neon=1"
+fi
+
+# Add prebuild folder with prebuild build tools for arm for GBS build.
+if [ $host_arch = "arm" ] ; then
+  export PATH=${TOP_DIR}/build/prebuild:$PATH
+fi
+
+#  toolkit_views=1
+
+# component=shared results in strange link errors. Probably something to fix upstream.
+GYP_DEFINES_NO_SHARED=$(echo $GYP_DEFINES | sed 's|component=shared_library||g')
+export GYP_DEFINES="${GYP_DEFINES_NO_SHARED}"
+export GYP_GENERATOR_OUTPUT="out.${host_arch}"
+
+# Use jhbuild dependencies.
+setup_jhbuild_deps
+
+if [ "${BUILDING_WITH_GBS}" = 1 -o "${CHROMIUM_TIZEN_CROSSCOMPILE}" = 1 ]; then
+  DEFINES+=" building_for_tizen=1"
+  # get Target Name and add Flag to GYP_DEFINES
+  if [ -e "${TOP_DIR}/build/TARGET" ]; then
+    if [ $(cat "${TOP_DIR}/build/TARGET") = "mobile" ]; then
+      DEFINES+=" building_for_tizen_mobile=1"
+      DEFINES+=" building_for_tizen_tv=0"
+    else # tv
+      DEFINES+=" building_for_tizen_tv=1"
+      DEFINES+=" building_for_tizen_mobile=0"
+    fi
+  else
+    DEFINES+=" building_for_tizen_mobile=0"
+    DEFINES+=" building_for_tizen_tv=0"
+  fi
+else
+  DEFINES+=" building_for_tizen=0"
+  DEFINES+=" building_for_tizen_mobile=0"
+  DEFINES+=" building_for_tizen_tv=0"
+fi
+
+export GYP_DEFINES="${DEFINES} ${GYP_DEFINES}"
+
+# Fetches EFL build dependencies using jhbuild.
+efl_jhbuild() {
+  jhbuild --no-interact -f ${TOP_DIR}/build/jhbuild/jhbuildrc
+  if [ $? -eq 0 ]; then
+    setup_jhbuild_deps
+  fi
+}
+
+# Performs a gyp_chromium run to convert gyp->Makefile for android code.
+gyp_chromiumefl() {
+  # This is just a simple wrapper of gyp_chromium, please don't add anything
+  # in this function.
+  echo "GYP_GENERATORS set to '$GYP_GENERATORS'"
+  (
+    "${TOP_DIR}/build/gyp_chromiumefl" "$@"
+  )
+}
+
+if [ "$target_arch" = "arm" ] ; then
+  export EFLWV_APP_PATH=/usr/bin
+  export EFLWV_LIB_PATH=/usr/lib
+  export CHROMIUM_DIR=/usr/share/org.tizen.chromium-efl/
+  export STRIP_BIN=${TIZEN_SDK_PATH}/tools/arm-linux-gnueabi-gcc-4.5/arm-linux-gnueabi/bin/strip
+  export SDB_BIN=${TIZEN_SDK_PATH}/tools/sdb
+
+  tizen_deploy_file() {
+    echo "Processing $1"
+    ${STRIP_BIN} -o /tmp/$1 $1
+    ${SDB_BIN} push /tmp/$1 $2/$1
+    rm -f /tmp/$1
+  }
+
+  determine_output_folder() {
+    if [ $# -eq 0 ]; then
+      return
+    fi
+    if [ "$1" = "release" -o "$1" = "r" ]; then
+      OUTPUT_FOLDER=${TOP_DIR}/${GYP_GENERATOR_OUTPUT}/Release
+    elif [ "$1" = "debug" -o "$1" = "d" ]; then
+      OUTPUT_FOLDER=${TOP_DIR}/${GYP_GENERATOR_OUTPUT}/Debug
+    fi
+  }
+
+  tizen_deploy() {
+    determine_output_folder $@
+    if [ ! -d "$OUTPUT_FOLDER" ]; then
+      echo "Usage: tizen_deploy r[elease] | d[ebug]"
+      return
+    fi
+
+    ${SDB_BIN} shell mount -o remount,rw /
+    pushd ${OUTPUT_FOLDER}/lib
+    SHARED=`ls -1 *.so`
+    for K in ${SHARED} ; do
+      tizen_deploy_file ${K} ${EFLWV_LIB_PATH}
+    done
+    popd
+    pushd ${OUTPUT_FOLDER}
+    ${SDB_BIN} push content_shell.pak ${CHROMIUM_DIR}/
+    popd
+  }
+fi
diff --git a/tizen_src/build/gyp_chromiumefl b/tizen_src/build/gyp_chromiumefl
new file mode 100755 (executable)
index 0000000..336f136
--- /dev/null
@@ -0,0 +1,160 @@
+#!/usr/bin/env python
+
+import glob
+import os
+import subprocess
+import sys
+
+top_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
+chrome_src = os.environ.get('CHROME_SRC')
+if chrome_src:
+  chrome_src = os.path.abspath(chrome_src)
+if not chrome_src or not os.path.isdir(chrome_src):
+  chrome_src = os.path.join(top_dir, 'src')
+  print 'CHROME_SRC not set, falling back to ' + chrome_src
+
+script_dir = os.path.abspath(os.path.join(chrome_src, 'build'))
+if not os.path.isdir(script_dir):
+  print script_dir + " is not a valid directory"
+  sys.exit(1)
+root_dir = top_dir
+impl_dir = os.path.join(top_dir, 'impl')
+
+sys.path.insert(0, script_dir)
+import gyp_helper
+sys.path.insert(0, os.path.join(chrome_src, 'tools', 'gyp', 'pylib'))
+import gyp
+
+# Add paths so that pymod_do_main(...) can import files.
+sys.path.insert(1, os.path.join(chrome_src, 'tools', 'generate_shim_headers'))
+sys.path.insert(1, os.path.join(chrome_src, 'tools', 'grit'))
+
+sys.path.insert(1, os.path.join(chrome_src, 'third_party', 'WebKit',
+    'Source', 'core', 'core.gyp', 'scripts'))
+# Remove the above and keep the line below once we require a newer specific
+# Chromium revision.
+sys.path.insert(1, os.path.join(chrome_src, 'third_party', 'WebKit',
+    'Source', 'build', 'scripts'))
+sys.path.insert(1, os.path.join(chrome_src, 'chrome', 'tools', 'build'))
+
+import repack_locales
+
+def additional_include_files(args=[]):
+  """
+  Returns a list of additional (.gypi) files to include, without
+  duplicating ones that are already specified on the command line.
+  """
+  # Determine the include files specified on the command line.
+  # This doesn't cover all the different option formats you can use,
+  # but it's mainly intended to avoid duplicating flags on the automatic
+  # makefile regeneration which only uses this format.
+  specified_includes = set()
+  for arg in args:
+    if arg.startswith('-I') and len(arg) > 2:
+      specified_includes.add(os.path.realpath(arg[2:]))
+
+  result = []
+  def AddInclude(path):
+    if os.path.realpath(path) not in specified_includes:
+      result.append(path)
+
+  # Always include common.gypi.
+  AddInclude(os.path.join(script_dir, 'common.gypi'))
+
+  # Used for additional build tweaks such as file exclusions
+  AddInclude(os.path.join(top_dir, 'impl', 'chromium-efl.gypi'))
+
+  # Optionally add supplemental .gypi files if present.
+  supplements = glob.glob(os.path.join(chrome_src, '*', 'supplement.gypi'))
+  for supplement in supplements:
+    AddInclude(supplement)
+
+  return result
+
+def get_output_dir():
+  outdir = os.environ.get("GYP_GENERATOR_OUTPUT")
+  if not outdir:
+    outdir = os.path.join(root_dir, "out")
+  if not os.path.isdir(outdir):
+    os.mkdir(outdir)
+  if not os.path.isdir(outdir):
+    print "cannot create outdir: " + outdir
+    sys.exit(1)
+
+  return outdir
+
+if __name__ == '__main__':
+  args = sys.argv[1:]
+
+  # On Mac we want to override CXX and CC that is provided with
+  # the Chromium GYP environment.
+  if sys.platform.startswith('darwin'):
+    os.environ['CXX'] = 'clang++'
+    os.environ['CC'] = 'clang'
+
+  gyp_helper.apply_chromium_gyp_env()
+
+  # This could give false positives since it doesn't actually do real option
+  # parsing.  Oh well.
+  gyp_file_specified = False
+  for arg in args:
+    if arg.endswith('.gyp'):
+      gyp_file_specified = True
+      break
+
+  if not gyp_file_specified:
+      args.append(os.path.join(root_dir, 'impl', 'chromium-efl.gyp'))
+
+  args.extend(['-I' + i for i in additional_include_files(args)])
+
+  # On Mac we want to build in x64 mode. And we want to use libc++.
+  # Even though we are not on linux, it seems we specifically have to disable linux_use_tcmalloc.
+  if sys.platform in ('darwin',):
+      args.extend(['-D', 'host_arch=x64', '-D', 'use_libcpp=1', '-D', 'linux_use_tcmalloc=0'])
+
+  # There shouldn't be a circular dependency relationship between .gyp files,
+  # but in Chromium's .gyp files, on non-Mac platforms, circular relationships
+  # currently exist.  The check for circular dependencies is currently
+  # bypassed on other platforms, but is left enabled on the Mac, where a
+  # violation of the rule causes Xcode to misbehave badly.
+  # TODO(mark): Find and kill remaining circular dependencies, and remove this
+  # option.  http://crbug.com/35878.
+  # TODO(tc): Fix circular dependencies in ChromiumOS then add linux2 to the
+  # list.
+  if sys.platform not in ('darwin',):
+    args.append('--no-circular-check')
+
+  args.extend(['-D', 'webkit_src_dir=' + chrome_src + '/third_party/WebKit'])
+  # the top_level source directory is the first common ancestor of our module and the chromium source tree for the build to be sane.
+  # commonprefix works on a character basis, so it might return a phony common prefix (not the common parent directory we expect),
+  toplevel= os.path.commonprefix([root_dir, chrome_src])
+  if not os.path.exists(toplevel):
+    toplevel = os.path.join(toplevel, os.pardir)
+  args.extend(["--toplevel-dir=" + toplevel])
+  # Chromium specific Hack: for Chromium to build, the depth has to be set to the chromium src dir.
+  args.extend(["--depth=" + chrome_src])
+  args.extend(['-D', 'chrome_src_dir=' + chrome_src])
+  args.extend(['-D', 'efl_impl_dir=' + impl_dir])
+  # Tweak the output location and format (hardcode ninja for now)
+  args.extend(['--generator-output', os.path.abspath(get_output_dir())])
+  args.extend(['-Goutput_dir='+ os.path.abspath(get_output_dir())])
+  args.extend(['--format=ninja'])
+  args.append("--check")
+
+  # gyp on gbs fails with multiprocessing.SemLock() not implemented
+  # disabling parallel gyp for gbs
+  gbs_build = os.environ.get('BUILDING_WITH_GBS')
+  if gbs_build:
+    args.append("--no-parallel")
+
+  # for debug
+  print args
+
+
+  ###################################
+
+  print 'Updating projects from gyp files...'
+  #sys.stdout.flush()
+
+  # Off we go...
+  sys.exit(gyp.main(args))
diff --git a/tizen_src/build/jhbuild/jhbuild.modules b/tizen_src/build/jhbuild/jhbuild.modules
new file mode 100644 (file)
index 0000000..9404447
--- /dev/null
@@ -0,0 +1,104 @@
+<?xml version="1.0"?>
+<!DOCTYPE moduleset SYSTEM "moduleset.dtd">
+<?xml-stylesheet type="text/xsl" href="moduleset.xsl"?>
+<moduleset>
+
+  <metamodule id="chromeefl-dependencies">
+    <dependencies>
+      <dep package="ecore"/>
+      <dep package="evas"/>
+      <dep package="eina"/>
+      <dep package="eet"/>
+      <dep package="elm"/>
+    </dependencies>
+  </metamodule>
+
+  <repository type="tarball" name="download.enlightenment.org"
+      href="http://download.enlightenment.org"/>
+  <repository type="tarball" name="ftp.gnome.org"
+      href="http://ftp.gnome.org"/>
+
+  <autotools id="eina" autogen-sh="configure">
+    <branch module="releases/eina-1.7.5.tar.bz2" version="1.7.5"
+            repo="download.enlightenment.org"
+            hash="sha256:fc08c8aa3a225e3a42793afbf109788ab003de7595a542607a6a65694d08a44d"
+            md5sum="ea505aa52729de68ed6c00e1e45c3c50">
+    </branch>
+  </autotools>
+
+  <autotools id="eet" autogen-sh="configure">
+    <branch module="releases/eet-1.7.5.tar.bz2" version="1.7.5"
+            repo="download.enlightenment.org"
+            hash="sha256:c79cc6e5d3304ae5761307c266835c4d8337cc0418ea43ace8c915b2d329427b"
+            md5sum="ec3fffbeff0be2699aeed1ed4377ee9d">
+    </branch>
+    <dependencies>
+      <dep package="eina"/>
+    </dependencies>
+  </autotools>
+
+  <autotools id="evas" autogen-sh="configure"
+             autogenargs="--enable-gl-xlib --disable-wayland-shm --disable-wayland-egl">
+    <branch module="releases/evas-1.7.5.tar.bz2" version="1.7.5"
+            repo="download.enlightenment.org"
+            hash="sha256:70b350a970b2086787622845896f3e54de278fe698b8069796fd752e70427374"
+            md5sum="2c965b836128a839292161d4ca89380d">
+    </branch>
+    <dependencies>
+      <dep package="eet"/>
+    </dependencies>
+  </autotools>
+
+  <autotools id="ecore" autogen-sh="configure"
+             autogenargs="--enable-ecore-evas-opengl-x11">
+    <branch module="releases/ecore-1.7.5.tar.bz2" version="1.7.5"
+            repo="download.enlightenment.org"
+            hash="sha256:4bbaba2153db0c356d13c45adfbcc90c7118abd112d0817581417e708d6a9222"
+            md5sum="9ea98367ec40f7121ea61948bb395553">
+    </branch>
+    <dependencies>
+      <dep package="eina"/>
+      <dep package="evas"/>
+    </dependencies>
+  </autotools>
+
+  <autotools id="embryo" autogen-sh="configure">
+    <branch module="releases/embryo-1.7.5.tar.bz2" version="1.7.5"
+            repo="download.enlightenment.org"
+            hash="sha256:a946d6b4e6aa94b39537aa6746f4653d9235d8b9ca3a0dc0734df07482d28e80">
+    </branch>
+    <dependencies>
+      <dep package="eina"/>
+      <dep package="evas"/>
+      <dep package="ecore"/>
+    </dependencies>
+  </autotools>
+
+  <autotools id="edje" autogen-sh="configure">
+    <branch module="releases/edje-1.7.5.tar.bz2" version="1.7.5"
+            repo="download.enlightenment.org"
+            hash="sha256:c7b329ac6548378c1c74e9cdf60a34c33f4fdc2d8224577d6a9ea4b90c915ec3">
+    </branch>
+    <dependencies>
+      <dep package="eina"/>
+      <dep package="evas"/>
+      <dep package="ecore"/>
+      <dep package="embryo"/>
+    </dependencies>
+  </autotools>
+
+  <autotools id="elm" autogen-sh="configure">
+    <branch module="releases/elementary-1.7.5.tar.bz2" version="1.7.5"
+            repo="download.enlightenment.org"
+            hash="sha256:898a4a7f8135c65359d4271ccab593b8a0b10d85fb6fd2d0cabea76152278b21">
+    </branch>
+    <dependencies>
+      <dep package="eet"/>
+      <dep package="eina"/>
+      <dep package="evas"/>
+      <dep package="ecore"/>
+      <dep package="edje"/>
+    </dependencies>
+  </autotools>
+
+</moduleset>
diff --git a/tizen_src/build/jhbuild/jhbuildrc b/tizen_src/build/jhbuild/jhbuildrc
new file mode 100644 (file)
index 0000000..6ae610c
--- /dev/null
@@ -0,0 +1,53 @@
+#!/usr/bin/env python
+# Copyright (C) 2013 Samsung Electronics
+#
+# 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
+
+__efl_build_directory = os.path.abspath(os.path.dirname(__file__))
+sys.path = [__efl_build_directory] + sys.path
+
+build_policy = 'updated'
+
+__moduleset_file_uri = 'file://' + os.path.join(__efl_build_directory, 'jhbuild.modules')
+moduleset = [ __moduleset_file_uri, ]
+
+__extra_modules = os.environ.get("WEBKIT_EXTRA_MODULES", "").split(",")
+modules = [ 'chromeefl-dependencies', ]
+
+outdir = os.environ.get('GYP_GENERATOR_OUTPUT', 'out')
+
+checkoutroot = os.path.abspath(os.path.join(outdir,'Dependencies', 'Source'))
+prefix = os.path.abspath(os.path.join(outdir,'Dependencies', 'Root'))
+
+del outdir
+
+nonotify = True
+notrayicon = True
+
+if 'NUMBER_OF_PROCESSORS' in os.environ:
+    jobs = os.environ['NUMBER_OF_PROCESSORS']
+
+# Use system libraries while building.
+if use_lib64:
+    _libdir = 'lib64'
+else:
+    _libdir = 'lib'
+
+partial_build = False
+
diff --git a/tizen_src/build/prebuild.sh b/tizen_src/build/prebuild.sh
new file mode 100755 (executable)
index 0000000..2ebcc15
--- /dev/null
@@ -0,0 +1,94 @@
+#!/bin/bash
+
+# set build configuration for desktop|mobile|tv
+export SCRIPT_PATH=$(readlink -f ${BASH_SOURCE[0]})
+export SCRIPT_DIR=$(dirname $SCRIPT_PATH)
+export EFL_WEBVIEW_DIR="${SCRIPT_DIR}/../"
+export CHROME_SRC="${EFL_WEBVIEW_DIR}/src"
+
+# set desktop build configuration
+prepare_desktop_build () {
+  echo "set 'desktop' build configuration..."
+  echo "desktop" > "${EFL_WEBVIEW_DIR}/build/TARGET"
+
+  # restore gyp files
+  . ./build/restore_gyp.sh
+
+  # excute prebuild for desktop
+  . ./build/prebuild_desktop.sh
+
+  # usage ninja build for desktop
+  echo "### Usage ninja build for desktop"
+  echo "    $ ninja -C <outdir>"
+  echo "      where <outdir> : ${GYP_GENERATOR_OUTPUT}/Release (if Release mode) "
+  echo "                     : ${GYP_GENERATOR_OUTPUT}/Debug (if Debug mode)"
+}
+
+# set mobile build configuration
+prepare_mobile_build () {
+  echo "set 'mobile' build configuration..."
+  echo "mobile" > "${EFL_WEBVIEW_DIR}/build/TARGET"
+
+  # restore gyp files
+  . ./build/restore_gyp.sh
+
+  # excute prebuild for tizen mobile
+  . ./build/prebuild_mobile.sh
+
+  # usage gbs build for tizen mobile
+  echo "### Usage GBS build for mobile (using .gbs.conf for mobile)"
+  echo "    $ gbs build -A armv7l --incremental --include-all [--clean]"
+  echo "      [--define '_debug_mode 1']   excute debug build (default : release)"
+  echo "      [--define '_skip_gyp 1']     skip gyp generate  (default : gyp generate)"
+}
+
+# set tv build configuration
+prepare_tv_build () {
+  echo "set 'tv' build configuration..."
+  echo "tv" > "${EFL_WEBVIEW_DIR}/build/TARGET"
+
+  # restore gyp files
+  . ./build/restore_gyp.sh
+
+  # excute prebuild for tizen tv
+  . ./build/prebuild_tv.sh
+
+  # usage gbs build for tizen tv
+  echo "### Usage GBS build for tv (using .gbs.conf for tv)"
+  echo "    $ gbs build -A armv7l --incremental --include-all [--clean]"
+  echo "      [--define '_debug_mode 1']   excute debug build (default : release)"
+  echo "      [--define '_skip_gyp 1']     skip gyp generate  (default : gyp generate)"
+}
+
+# print out usage
+usage_prebuild () {
+  echo "### Unknown target name. (Only use desktop | mobile | tv)"
+  echo "    $ ./build/prebuild.sh [desktop | mobile | tv]"
+}
+
+# excute build configuration from get options
+while true
+do
+  case $1 in
+    desktop)
+      prepare_desktop_build
+      break
+      ;;
+    mobile)
+      prepare_mobile_build
+      break
+      ;;
+    tv)
+      prepare_tv_build
+      break
+      ;;
+    *)
+      if [ -z $1 ]; then
+        prepare_mobile_build
+      else
+        usage_prebuild
+      fi
+      break
+      ;;
+  esac
+done
diff --git a/tizen_src/build/prebuild/gold b/tizen_src/build/prebuild/gold
new file mode 100755 (executable)
index 0000000..b5bdfe3
Binary files /dev/null and b/tizen_src/build/prebuild/gold differ
diff --git a/tizen_src/build/prebuild/ld b/tizen_src/build/prebuild/ld
new file mode 100755 (executable)
index 0000000..5e01d6a
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/sh
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Wrapper script named "ld" that either executes gold or the system linker.
+
+# The gold binaries are built on 64-bit Ubuntu Lucid and 32-bit Ubuntu Lucid,
+# for x86_64 and i686, respectively.
+# Note that we do not use "uname -m" because it prints the kernel architecture,
+# which can cause failures on 64-bit kernels with 32-bit userlands.
+
+base_dir=$(dirname "$0")
+host_arch=$(uname -m | sed -e \
+        's/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/')
+if [ "$host_arch" == "arm" ]; then
+    exec $base_dir/gold64 "$@"
+else
+    echo Arm gold linker used on on non-arm architecture.
+    exit 1
+fi
diff --git a/tizen_src/build/prebuild/ninja b/tizen_src/build/prebuild/ninja
new file mode 100755 (executable)
index 0000000..cb4c3ec
Binary files /dev/null and b/tizen_src/build/prebuild/ninja differ
diff --git a/tizen_src/build/prebuild_desktop.sh b/tizen_src/build/prebuild_desktop.sh
new file mode 100755 (executable)
index 0000000..12f4393
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+# excute environment setup
+. `dirname ${BASH_SOURCE[0]}`/envsetup.sh
+
+# excute efl_jhbuild
+efl_jhbuild
+
+# excute efl_gyp
+gyp_chromiumefl
diff --git a/tizen_src/build/prebuild_mobile.sh b/tizen_src/build/prebuild_mobile.sh
new file mode 100755 (executable)
index 0000000..e728d5e
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+# source common functions and vars
+. `dirname ${BASH_SOURCE[0]}`/common.sh
+
+# Unbundle system dependencies to make sure they are not built.
+. `dirname ${BASH_SOURCE[0]}`/system_deps_mobile.sh
+$CHROME_SRC/build/linux/unbundle/replace_gyp_files.py $(echo $SYSTEM_DEPS | sed -e 's/use_system_/-Duse_system_/g')
diff --git a/tizen_src/build/prebuild_tv.sh b/tizen_src/build/prebuild_tv.sh
new file mode 100755 (executable)
index 0000000..8bdf17d
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+# source common functions and vars
+. `dirname ${BASH_SOURCE[0]}`/common.sh
+
+# Unbundle system dependencies to make sure they are not built.
+. `dirname ${BASH_SOURCE[0]}`/system_deps_tv.sh
+$CHROME_SRC/build/linux/unbundle/replace_gyp_files.py $(echo $SYSTEM_DEPS | sed -e 's/use_system_/-Duse_system_/g')
diff --git a/tizen_src/build/restore_gyp.sh b/tizen_src/build/restore_gyp.sh
new file mode 100755 (executable)
index 0000000..bd1a20f
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+# changed gyp files ($CHROME_SRC/build/linux/unbundle/replace_gyp_files.py)
+# REPLACEMENTS = {
+#   'use_system_expat': 'third_party/expat/expat.gyp',
+#   'use_system_ffmpeg': 'third_party/ffmpeg/ffmpeg.gyp',
+#   'use_system_flac': 'third_party/flac/flac.gyp',
+#   'use_system_harfbuzz': 'third_party/harfbuzz-ng/harfbuzz.gyp',
+#   'use_system_icu': 'third_party/icu/icu.gyp',
+#   'use_system_jsoncpp': 'third_party/jsoncpp/jsoncpp.gyp',
+#   'use_system_libevent': 'third_party/libevent/libevent.gyp',
+#   'use_system_libjpeg': 'third_party/libjpeg/libjpeg.gyp',
+#   'use_system_libpng': 'third_party/libpng/libpng.gyp',
+#   'use_system_libusb': 'third_party/libusb/libusb.gyp',
+#   'use_system_libvpx': 'third_party/libvpx/libvpx.gyp',
+#   'use_system_libwebp': 'third_party/libwebp/libwebp.gyp',
+#   'use_system_libxml': 'third_party/libxml/libxml.gyp',
+#   'use_system_libxslt': 'third_party/libxslt/libxslt.gyp',
+#   'use_system_openssl': 'third_party/openssl/openssl.gyp',
+#   'use_system_opus': 'third_party/opus/opus.gyp',
+#   'use_system_re2': 'third_party/re2/re2.gyp',
+#   'use_system_snappy': 'third_party/snappy/snappy.gyp',
+#   'use_system_speex': 'third_party/speex/speex.gyp',
+#   'use_system_sqlite': 'third_party/sqlite/sqlite.gyp',
+#   'use_system_v8': 'v8/tools/gyp/v8.gyp',
+#   'use_system_zlib': 'third_party/zlib/zlib.gyp',
+# }
+
+# get changed gyp files, above data
+CHANGE_GYP_PATH="third_party/expat/expat.gyp third_party/ffmpeg/ffmpeg.gyp third_party/flac/flac.gyp third_party/harfbuzz-ng/harfbuzz.gyp third_party/icu/icu.gyp third_party/jsoncpp/jsoncpp.gyp third_party/libevent/libevent.gyp third_party/libjpeg/libjpeg.gyp third_party/libpng/libpng.gyp third_party/libusb/libusb.gyp third_party/libvpx/libvpx.gyp third_party/libwebp/libwebp.gyp third_party/libxml/libxml.gyp third_party/libxslt/libxslt.gyp third_party/openssl/openssl.gyp third_party/opus/opus.gyp third_party/re2/re2.gyp third_party/snappy/snappy.gyp third_party/speex/speex.gyp third_party/sqlite/sqlite.gyp v8/tools/gyp/v8.gyp third_party/zlib/zlib.gyp"
+
+# move chromium root directory
+pushd ${CHROME_SRC} > /dev/null
+
+# git checkout each gyp files
+git checkout -- ${CHANGE_GYP_PATH}
+
+# move origin directory
+popd > /dev/null
diff --git a/tizen_src/build/system_deps_mobile.sh b/tizen_src/build/system_deps_mobile.sh
new file mode 100644 (file)
index 0000000..86c6ab0
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+# Dependencies we want to use from the system.
+# no system ffmpeg
+# no system jsoncpp
+# no system libevent
+
+# can't use use_system_sqlite=1 because of the bug:
+# https://code.google.com/p/chromium/issues/detail?id=22208
+
+# can't use use_system_protobuf=1 because 11
+# symbol lookup error: /usr/lib/libchromium-efl.so: undefined symbol: _ZNK6google8protobuf7Message11GetTypeNameEv
+SYSTEM_DEPS="use_alsa=0
+             use_system_libjpeg=1
+             use_system_flac=1
+             use_system_expat=1
+             use_system_harfbuzz=1
+             use_system_libpng=1
+             use_system_libusb=1
+             use_system_libxml=1
+             use_system_libxslt=1
+             use_system_speex=1
+             use_system_zlib=1
+             use_system_minizip=1
+             use_system_icu=1
+             use_system_libexif=1
+             use_system_bzip2=1
+             use_system_nspr=1
+             use_system_vpx=1
+             "
diff --git a/tizen_src/build/system_deps_tv.sh b/tizen_src/build/system_deps_tv.sh
new file mode 100644 (file)
index 0000000..0484e6b
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+#Dependencies we want to use from the system.
+SYSTEM_DEPS="use_alsa=0 use_system_libjpeg=1 use_system_flac=1 use_system_expat=1 use_system_harfbuzz=1 use_system_libpng=1 use_system_libusb=1 use_system_libxml=1 use_system_libxslt=1 use_system_speex=1 use_system_zlib=1 use_system_minizip=1"
diff --git a/tizen_src/impl/chromium-efl.filter b/tizen_src/impl/chromium-efl.filter
new file mode 100644 (file)
index 0000000..3e1247a
--- /dev/null
@@ -0,0 +1,20 @@
+{
+  global:
+    extern "C++" {
+      EWebView::*;
+      EWebContext::*;
+      content::NotificationControllerEfl::*;
+      ewk_ipc_*;
+    };
+
+    # ContentMain constructor
+    _ZN7content11ContentMainEiPPKcPNS_19ContentMainDelegateE;
+    # vtables for WebProcessContentMainDelegateEfl and ContentMainDelegate
+    _ZTVN7content32WebProcessContentMainDelegateEflE;
+    _ZTVN7content19ContentMainDelegateE;
+
+# TODO: hide all symbols not needed by the embedding API and efl_webprocess
+#  local:
+#    *;
+};
+
diff --git a/tizen_src/impl/chromium-efl.gyp b/tizen_src/impl/chromium-efl.gyp
new file mode 100644 (file)
index 0000000..7fb67b2
--- /dev/null
@@ -0,0 +1,92 @@
+{
+  'variables': {
+    'data_dir%': '/usr/share/chromium-efl/',
+    'exe_dir%': '/usr/lib/chromium-efl/',
+    'edje_compiler%': 'edje_cc',
+  },
+
+  'targets': [{
+    'target_name': 'chromium-efl',
+    'type': 'shared_library',
+    'includes': [
+      # NOTE: gyp includes need to be relative
+      '../src/skia/skia_common.gypi',
+    ],
+    'include_dirs': [
+      '.',
+      '<(chrome_src_dir)',
+      '<(chrome_src_dir)/third_party/WebKit', # [M34] without this, build errors occur due to #include path changes in M34. for example, see WebFrame.h.
+      '<(chrome_src_dir)/third_party/skia/include/core',
+      # XXX: This should be fixed, no ewk api headers should be required by the chromium-efl port
+      '../ewk_api_headers',
+      '../ewk_api_headers/public',
+
+      '<(PRODUCT_DIR)/gen',
+      '<(SHARED_INTERMEDIATE_DIR)',
+      '<(SHARED_INTERMEDIATE_DIR)/webkit/',
+    ],
+    'dependencies': [
+      '<(chrome_src_dir)/base/allocator/allocator.gyp:allocator',
+      '<(chrome_src_dir)/content/content.gyp:content',
+      '<(chrome_src_dir)/content/content.gyp:content_app_browser',
+      '<(chrome_src_dir)/content/content_shell_and_tests.gyp:content_shell_resources',
+      '<(chrome_src_dir)/content/content_shell_and_tests.gyp:content_shell_pak',
+      '<(chrome_src_dir)/components/components.gyp:visitedlink_browser',
+      '<(chrome_src_dir)/components/components.gyp:visitedlink_renderer',
+      '<(chrome_src_dir)/third_party/icu/icu.gyp:icuuc',
+    ],
+    'defines': [
+      'CHROMIUMCORE_IMPLEMENTATION=1',
+      'DATA_DIR="<(data_dir)"',
+      'EXE_DIR="<(exe_dir)"',
+    ],
+    'sources': [
+    ],
+    'cflags!': [
+      # Symbol visibility controled by chromium-efl.filter
+      '-fvisibility=hidden',
+    ],
+    'link_settings': {
+      'ldflags': [
+        '-Wl,--no-undefined',
+        '-Wl,--version-script,<(efl_impl_dir)/chromium-efl.filter',
+        '-rdynamic',
+      ],
+      'conditions': [
+        ['_toolset=="target"', {
+          'libraries': [ '<!($(echo ${CXX_target:-g++}) -print-libgcc-file-name)', ]
+        }],
+      ],
+    },
+    'rules': [{
+        'rule_name': 'edje_resources',
+        'message': 'Compiling edje files <(RULE_INPUT_NAME)',
+        'extension': 'edc',
+        'outputs': [
+          '<(PRODUCT_DIR)/resources/<(RULE_INPUT_ROOT).edj',
+        ],
+        'action': [
+          '<(edje_compiler)',
+          '-id', 'resource/images',
+          '<(RULE_INPUT_PATH)',
+          '<(PRODUCT_DIR)/resources/<(RULE_INPUT_ROOT).edj',
+        ],
+    }], #rules
+  },
+  {
+    'target_name': 'efl_webprocess',
+    'defines': [
+      'DATA_DIR="<(data_dir)"',
+      'EXE_DIR="<(exe_dir)"',
+    ],
+    'type': 'executable',
+    'include_dirs': [
+      '.',
+      '../ewk_api_headers',
+    ],
+    'dependencies': [
+      'chromium-efl',
+    ],
+  },
+  ],
+}
diff --git a/tizen_src/impl/chromium-efl.gypi b/tizen_src/impl/chromium-efl.gypi
new file mode 100644 (file)
index 0000000..e1fa6f2
--- /dev/null
@@ -0,0 +1,96 @@
+{
+  'variables': {
+    '__GCC_VERSION%': '<!(gcc -dumpversion)',
+    'conditions': [
+      ['sysroot!=""', {
+        'pkg-config': '<(chrome_src_dir)/build/linux/pkg-config-wrapper <(sysroot) <(target_arch)',
+      }, {
+        'pkg-config': 'pkg-config'
+      }],
+    ],
+  },
+  'target_defaults': {
+    'defines': [
+      'COMPONENT_BUILD=1',
+      'SKIA_DLL=1',
+      'TIZEN_ENGINE_SUPPORT=1',
+      'BUILDING_V8_SHARED=1',
+      'V8_SHARED=1',
+      'ENABLE_ORIENTATION_EVENTS=1'
+    ],
+    'cflags': [
+      '<!@(<(pkg-config) --cflags ecore)',
+      '<!@(<(pkg-config) --cflags ecore-x)',
+      '<!@(<(pkg-config) --cflags ecore-evas)',
+      '<!@(<(pkg-config) --cflags ecore-input)',
+      '<!@(<(pkg-config) --cflags ecore-imf-evas)',
+      '<!@(<(pkg-config) --cflags evas)',
+      '<!@(<(pkg-config) --cflags elementary)',
+    ],
+    'link_settings': {
+      'ldflags': [
+        '<!@(<(pkg-config) --libs-only-L --libs-only-other ecore)',
+        '<!@(<(pkg-config) --libs-only-L --libs-only-other ecore-x)',
+        '<!@(<(pkg-config) --libs-only-L --libs-only-other ecore-evas)',
+        '<!@(<(pkg-config) --libs-only-L --libs-only-other ecore-input)',
+        '<!@(<(pkg-config) --libs-only-L --libs-only-other ecore-imf-evas)',
+        '<!@(<(pkg-config) --libs-only-L --libs-only-other evas)',
+        '<!@(<(pkg-config) --libs-only-L --libs-only-other elementary)',
+      ],
+      'libraries': [
+        '<!@(<(pkg-config) --libs-only-l ecore)',
+        '<!@(<(pkg-config) --libs-only-l ecore-x)',
+        '<!@(<(pkg-config) --libs-only-l ecore-evas)',
+        '<!@(<(pkg-config) --libs-only-l ecore-input)',
+        '<!@(<(pkg-config) --libs-only-l ecore-imf-evas)',
+        '<!@(<(pkg-config) --libs-only-l evas)',
+        '<!@(<(pkg-config) --libs-only-l elementary)',
+      ],
+    },
+    # use_aura is enabled but clipboard_efl.cc implements clipboard.
+    'sources/': [
+      ['exclude', 'browser/renderer_host/native_web_keyboard_event_aura\\.cc$'],
+      ['exclude', 'browser/renderer_host/render_widget_host_view_aura\\.cc$'],
+      ['exclude', 'browser/web_contents/web_contents_view_aura\\.cc$'],
+    ],
+    'conditions': [
+       ['building_for_tizen==1', {
+         'defines': [
+         'OS_TIZEN=1',
+         # For GCC 4.5.3 bundled arm.h has a bug and don't define __ARM_PCS when it should.
+         # Force define this flag for the whole chromium on gbs gcc 4.5.3.
+         # Non-arm builds will ingore it in any case.
+         '__ARM_PCS',
+         ],
+         'sources/': [
+           ['exclude', 'browser/device_sensors/data_fetcher_shared_memory_default.cc$'],
+         ],
+         'cflags': [
+            '<!@(<(pkg-config) --cflags capi-system-sensor)',
+            '<!@(<(pkg-config) --cflags capi-location-manager)',
+         ],
+         'link_settings': {
+           'ldflags': [
+             '<!@(<(pkg-config) --libs-only-L --libs-only-other capi-system-sensor)',
+             '<!@(<(pkg-config) --libs-only-L --libs-only-other capi-location-manager)',
+           ],
+           'libraries': [
+             '<!@(<(pkg-config) --libs-only-l capi-system-sensor)',
+             '<!@(<(pkg-config) --libs-only-l capi-location-manager)',
+           ],
+         },
+      }, {
+        'sources/': [
+          ['exclude', 'browser/device_sensors/data_fetcher_impl_tizen\\.(cc|h)$'],
+          ['exclude', 'browser/device_sensors/data_fetcher_shared_memory_tizen\\.cc$'],
+        ],
+      }],
+      ['building_for_tizen_mobile==1', {
+         'defines': ['OS_TIZEN_MOBILE=1'],
+      }],
+      ['building_for_tizen_tv==1', {
+       'defines': ['OS_TIZEN_TV=1'],
+      }],
+    ],
+  },
+}
diff --git a/tizen_src/packaging/chromium-efl.spec b/tizen_src/packaging/chromium-efl.spec
new file mode 100644 (file)
index 0000000..2735e80
--- /dev/null
@@ -0,0 +1,184 @@
+Name: org.tizen.chromium-efl
+Summary: Chromium EFL
+# Set by by scripts/update-chromium-version.sh
+%define ChromiumVersion 34.1847.76
+%define Week 19
+Version: %{ChromiumVersion}.%{Week}
+Release: 1
+Group: Applications/Internet
+License: LGPLv2.1 or BSD
+
+Source0: %{name}-%{version}.tar.gz
+
+Requires(post): /sbin/ldconfig
+Requires(post): xkeyboard-config
+Requires(postun): /sbin/ldconfig
+BuildRequires: which, vi, python, python-xml, bison, flex, gperf, gettext, perl, edje-bin
+BuildRequires: libjpeg-turbo-devel, expat-devel, libasound-devel, libhaptic, libcap-devel
+BuildRequires: pkgconfig(libpulse)
+BuildRequires: pkgconfig(recordproto)
+BuildRequires: pkgconfig(nss)
+BuildRequires: pkgconfig(gconf-2.0)
+BuildRequires: pkgconfig(libpci)
+BuildRequires: pkgconfig(pangocairo)
+BuildRequires: pkgconfig(libudev)
+BuildRequires: pkgconfig(fontconfig)
+BuildRequires: pkgconfig(freetype2)
+BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(harfbuzz)
+BuildRequires: pkgconfig(icu-i18n)
+BuildRequires: pkgconfig(openssl)
+BuildRequires: pkgconfig(libxml-2.0)
+BuildRequires: pkgconfig(libxslt)
+BuildRequires: pkgconfig(sqlite3)
+BuildRequires: pkgconfig(capi-system-sensor)
+BuildRequires: pkgconfig(capi-location-manager)
+BuildRequires: pkgconfig(location)
+BuildRequires: pkgconfig(gles20)
+BuildRequires: pkgconfig(libpng12)
+BuildRequires: pkgconfig(libusb-1.0)
+BuildRequires: pkgconfig(speex)
+BuildRequires: pkgconfig(flac)
+BuildRequires: pkgconfig(minizip)
+BuildRequires: pkgconfig(xrandr)
+BuildRequires: pkgconfig(xcomposite)
+BuildRequires: pkgconfig(xext)
+BuildRequires: pkgconfig(xi)
+BuildRequires: pkgconfig(xt)
+BuildRequires: pkgconfig(xfixes)
+BuildRequires: pkgconfig(xtst)
+BuildRequires: pkgconfig(xdamage)
+BuildRequires: pkgconfig(xcursor)
+BuildRequires: pkgconfig(libdrm)
+BuildRequires: pkgconfig(ecore)
+BuildRequires: pkgconfig(evas)
+BuildRequires: pkgconfig(ecore-x)
+BuildRequires: pkgconfig(ecore-evas)
+BuildRequires: pkgconfig(ecore-input)
+BuildRequires: pkgconfig(ecore-imf-evas)
+BuildRequires: pkgconfig(elementary)
+BuildRequires: pkgconfig(libexif)
+BuildRequires: pkgconfig(nspr)
+BuildRequires: pkgconfig(zlib)
+%if %{!?TIZEN_PROFILE_TV:1}%{?TIZEN_PROFILE_TV:0}
+BuildRequires: bzip2-devel
+BuildRequires: pkgconfig(vpx)
+%endif
+
+%description
+Browser Engine based on Chromium EFL (Shared Library)
+
+%package devel
+Summary: Chromium EFL
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+%description devel
+Browser Engine dev library based on Chromium EFL (developement files)
+
+# Directory for internal chromium executable components
+%global CHROMIUM_EXE_DIR %{_libdir}/%{name}
+# Constant read only data used by chromium-efl port
+%global CHROMIUM_DATA_DIR %{_datadir}/%{name}
+
+%prep
+%setup -q
+
+%build
+
+# workaround for new nss library : search it in /usr/lib first, rather than /lib (system nss)
+export LD_RUN_PATH=%{_libdir}
+#/usr/lib
+export BUILDING_WITH_GBS=1
+
+# Temporary workaround
+%ifarch %{arm}
+export CFLAGS="$(echo $CFLAGS | sed 's/-mfpu=[a-zA-Z0-9-]*/-mfpu=neon/g')"
+export CXXFLAGS="$(echo $CXXFLAGS | sed 's/-mfpu=[a-zA-Z0-9-]*/-mfpu=neon/g')"
+export FFLAGS="$(echo $FFLAGS | sed 's/-mfpu=[a-zA-Z0-9-]*/-mfpu=neon/g')"
+%else
+export CFLAGS="$(echo $CFLAGS | sed 's/-Wl,--as-needed//g')"
+export CXXFLAGS="$(echo $CXXFLAGS | sed 's/-Wl,--as-needed//g')"
+%endif
+
+%if 0%{?nodebug}
+CFLAGS=$(echo $CFLAGS | sed 's/ -g / /')
+CXXFLAGS=$(echo $CXXFLAGS | sed 's/ -g / /')
+%endif
+
+%ifarch %{arm}
+%define EFL_TARGET arm
+%else
+%if 0%{?simulator}
+%define EFL_TARGET emulator
+%else
+%define EFL_TARGET i386
+%endif
+%endif
+
+#TODO: This hardcoding should go
+%define INSTALL_ROOT /home/abuild/rpmbuild/BUILDROOT/%{name}-%{version}-%{release}.arm
+
+. ./build/envsetup.sh
+
+#set build mode
+%if 0%{?_debug_mode}
+%global OUTPUT_FOLDER out.%{EFL_TARGET}/Debug
+# Building the RPM in the GBS chroot fails with errors such as
+#   /usr/lib/gcc/i586-tizen-linux/4.7/../../../../i586-tizen-linux/bin/ld:
+#       failed to set dynamic section sizes: Memory exhausted
+# For now, work around it by passing a GNU ld-specific flag that optimizes the
+# linker for memory usage.
+export LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
+%else
+%global OUTPUT_FOLDER out.%{EFL_TARGET}/Release
+%endif
+export OUTPUT_FOLDER=%{OUTPUT_FOLDER}
+
+#gyp generate
+%if %{?_skip_gyp:0}%{!?_skip_gyp:1}
+gyp_chromiumefl \
+  -Dexe_dir="%{CHROMIUM_EXE_DIR}" \
+  -Ddata_dir="%{CHROMIUM_DATA_DIR}"
+%endif
+
+ninja %{_smp_mflags} -C"%{OUTPUT_FOLDER}"
+
+%install
+install -d "%{INSTALL_ROOT}"%{_sysconfdir}/smack/accesses2.d
+install -d "%{INSTALL_ROOT}"%{_libdir}/pkgconfig
+install -d "%{INSTALL_ROOT}"%{_includedir}/v8
+install -d "%{INSTALL_ROOT}%{CHROMIUM_EXE_DIR}"
+install -d "%{INSTALL_ROOT}%{CHROMIUM_DATA_DIR}"/themes
+
+# Generate pkg-confg file
+sed -e 's#?VERSION?#%{version}#' pkgconfig/chromium-efl.pc.in > "%{OUTPUT_FOLDER}"/chromium-efl.pc
+
+install -m 0755 "%{OUTPUT_FOLDER}"/lib/libchromium-efl.so    "%{INSTALL_ROOT}"%{_libdir}
+
+install -m 0755 "%{OUTPUT_FOLDER}"/libffmpegsumo.so  "%{INSTALL_ROOT}%{CHROMIUM_EXE_DIR}"
+install -m 0755 "%{OUTPUT_FOLDER}"/efl_webprocess    "%{INSTALL_ROOT}%{CHROMIUM_EXE_DIR}"
+install -m 0755 "%{OUTPUT_FOLDER}"/content_shell.pak "%{INSTALL_ROOT}%{CHROMIUM_EXE_DIR}"
+install -m 0644 "%{OUTPUT_FOLDER}"/resources/*.edj   "%{INSTALL_ROOT}%{CHROMIUM_DATA_DIR}"/themes
+
+install -m 0644 "%{OUTPUT_FOLDER}"/*.pc              "%{INSTALL_ROOT}"%{_libdir}/pkgconfig/
+install -m 0644 src/v8/include/*.h                   "%{INSTALL_ROOT}"%{_includedir}/v8/
+
+%post
+# apply smack rule
+smack_reload.sh
+
+%postun
+
+%files
+%manifest packaging/%{name}.manifest
+%defattr(-,root,root,-)
+%{_libdir}/libchromium-efl.so
+%{CHROMIUM_EXE_DIR}/efl_webprocess
+%{CHROMIUM_EXE_DIR}/libffmpegsumo.so
+%{CHROMIUM_EXE_DIR}/content_shell.pak
+%{CHROMIUM_DATA_DIR}/themes/*.edj
+
+%files devel
+%defattr(-,root,root,-)
+%{_includedir}/v8/*
+%{_libdir}/pkgconfig/*.pc
diff --git a/tizen_src/packaging/org.tizen.chromium-efl.manifest b/tizen_src/packaging/org.tizen.chromium-efl.manifest
new file mode 100644 (file)
index 0000000..b3a74e7
--- /dev/null
@@ -0,0 +1,27 @@
+<manifest>
+  <define>
+    <domain name="chromium-efl" policy="shared" />
+    <permit>
+      <smack permit="com.samsung.app-tray" type="rwx" />
+      <smack permit="e17" type="rwx" />
+      <smack permit="system::use_internet" type="w" />
+    </permit>
+    <request>
+      <smack request="ail::db" type="rw" />
+      <smack request="dbus" type="rwx" />
+      <smack request="com.samsung.indicator" type="rw" />
+      <smack request="system::vconf" type="rwxat" />
+      <smack request="system::media" type="rwxat" />
+      <smack request="system::share" type="rwxat" />
+      <smack request="system::use_internet" type="rw" />
+      <smack request="system::homedir" type="rwxat" />
+      <smack request="xorg" type="rw" />
+    </request>
+  </define>
+  <request>
+    <domain name="_"/>
+  </request>
+  <assign>
+    <filesystem path="/usr/lib/org.tizen.chromium-efl/efl_webprocess" label="chromium-efl" exec_label="chromium-efl"/>
+  </assign>
+</manifest>
diff --git a/tizen_src/pkgconfig/chromium-efl.pc.in b/tizen_src/pkgconfig/chromium-efl.pc.in
new file mode 100644 (file)
index 0000000..eb33e87
--- /dev/null
@@ -0,0 +1,10 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${prefix}/lib
+includedir=${prefix}/include
+
+Name: chromium-efl
+Description: Chromium EFL port
+Version: ?VERSION?
+Libs: -L${libdir} -lchromium-efl
+Cflags: -I${includedir}/v8
diff --git a/tizen_src/scripts/update-chromium-version.sh b/tizen_src/scripts/update-chromium-version.sh
new file mode 100755 (executable)
index 0000000..91d1509
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+_SCRIPT=$(readlink -f $0)
+_DIR=$(dirname $_SCRIPT)
+_TOP_DIR="$_DIR/.."
+_CHROMIUM_DIR="$_TOP_DIR/src"
+
+source $_CHROMIUM_DIR/chrome/VERSION
+
+_VERSION_BASE=$MAJOR.$BUILD.$PATCH
+_VERSION_FULL=$MAJOR.$MINOR.$BUILD.$PATCH
+
+sed -i -e "s#\(%define ChromiumVersion\ \)[[:digit:].]*#\1${_VERSION_BASE}#" $_TOP_DIR/packaging/chromium-efl.spec
+printf "Chromium upsteam version: $_VERSION_FULL\n" > $_TOP_DIR/VERSION