From 08f4a97c56da001b30764994ffaf487b62b6f826 Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Sat, 25 Feb 2017 14:06:32 +0900 Subject: [PATCH] [M67 Dev][EFL] Set up build environment The gn build is supported by default: $ ./tizen_src/build/build_desktop.sh The followings are included in this: [Build] Use GN by default instead of GYP https://review.tizen.org/gerrit/#/c/116494/ [Build] Move tizen_src/packaging/ directory to top https://review.tizen.org/gerrit/#/c/116944/ [A&O] Revise replace_gn_files.py to support multiple replacements https://review.tizen.org/gerrit/#/c/128811/ fixup! [A&O] Revise replace_gn_files.py to support multiple replacements https://review.tizen.org/gerrit/#/c/129273/ Upgrade version of efl, elementary https://review.tizen.org/gerrit/#/c/161190/ Remove the apply_patches.sh calls https://review.tizen.org/gerrit/#/c/171551/ Change-Id: Id2e9c444434ed7ba5b6557920d111fc802364d71 Signed-off-by: Youngsoo Choi --- build/linux/unbundle/replace_gn_files.py | 45 +- .../chromium-efl-libs.manifest | 0 .../packaging => packaging}/chromium-efl-libs.spec | 0 .../packaging => packaging}/chromium-efl.manifest | 0 .../packaging => packaging}/chromium-efl.spec | 38 +- .../chromium-efl_v3.0.manifest | 0 .../chromium-ewktest.manifest | 0 .../packaging => packaging}/content_shell.in | 0 .../packaging => packaging}/crosswalk-bin.spec | 0 {tizen_src/packaging => packaging}/manifest.xml | 0 .../packaging => packaging}/print-chromium-deps.py | 0 tizen_src/build/apply_patches.sh | 41 - tizen_src/build/build_desktop.sh | 37 +- tizen_src/build/common.sh | 16 +- tizen_src/build/cross_build_mobile.sh | 2 - tizen_src/build/cross_build_tv.sh | 2 - tizen_src/build/gn_chromiumefl | 3 - tizen_src/build/gn_chromiumefl.sh | 47 +- tizen_src/build/jhbuild/jhbuild.modules | 58 +- tizen_src/build/jhbuild/jhbuildrc | 5 +- ...do-not-build-several-chromium-dependencies.diff | 919 --------------------- .../build/patches/gn_build_is_tizen_on_ffmpeg.diff | 100 --- .../build/patches/hotfix_enable_content_shell.diff | 41 - .../build/patches/hotfix_m53_2785_include_py.diff | 22 - .../patches/hotfix_m53_2785_render_view_impl.diff | 35 - tizen_src/build/patches/info.txt | 4 - 26 files changed, 120 insertions(+), 1295 deletions(-) rename {tizen_src/packaging => packaging}/chromium-efl-libs.manifest (100%) rename {tizen_src/packaging => packaging}/chromium-efl-libs.spec (100%) rename {tizen_src/packaging => packaging}/chromium-efl.manifest (100%) rename {tizen_src/packaging => packaging}/chromium-efl.spec (96%) rename {tizen_src/packaging => packaging}/chromium-efl_v3.0.manifest (100%) rename {tizen_src/packaging => packaging}/chromium-ewktest.manifest (100%) rename {tizen_src/packaging => packaging}/content_shell.in (100%) rename {tizen_src/packaging => packaging}/crosswalk-bin.spec (100%) rename {tizen_src/packaging => packaging}/manifest.xml (100%) rename {tizen_src/packaging => packaging}/print-chromium-deps.py (100%) delete mode 100755 tizen_src/build/apply_patches.sh delete mode 100644 tizen_src/build/patches/crosswalk/crosswalk-do-not-build-several-chromium-dependencies.diff delete mode 100644 tizen_src/build/patches/gn_build_is_tizen_on_ffmpeg.diff delete mode 100644 tizen_src/build/patches/hotfix_enable_content_shell.diff delete mode 100644 tizen_src/build/patches/hotfix_m53_2785_include_py.diff delete mode 100644 tizen_src/build/patches/hotfix_m53_2785_render_view_impl.diff delete mode 100644 tizen_src/build/patches/info.txt diff --git a/build/linux/unbundle/replace_gn_files.py b/build/linux/unbundle/replace_gn_files.py index d4d07f2..8ef6e3d 100755 --- a/build/linux/unbundle/replace_gn_files.py +++ b/build/linux/unbundle/replace_gn_files.py @@ -58,18 +58,45 @@ def DoMain(argv): handled_libraries.add(lib) if args.undo: - # Restore original file, and also remove the backup. - # This is meant to restore the source tree to its original state. - os.rename(os.path.join(source_tree_root, path + '.orig'), - os.path.join(source_tree_root, path)) + try: + # Restore original file, and also remove the backup. + # This is meant to restore the source tree to its original state. + os.rename(os.path.join(source_tree_root, path + '.orig'), + os.path.join(source_tree_root, path)) + except OSError: + # .orig file may be not created (when we skip fetching the target + # library due to unexpected termination), so just ignore the error. + pass else: - # Create a backup copy for --undo. - shutil.copyfile(os.path.join(source_tree_root, path), - os.path.join(source_tree_root, path + '.orig')) + try: + # Create a backup copy for --undo. + shutil.copyfile(os.path.join(source_tree_root, path), + os.path.join(source_tree_root, path + '.orig')) + except IOError: + # This exception may happen when the target directory does not exist, + # which is the case when we skip fetching the third_party library due to unexpected + # termination. To proceed even in such case, let's create directory forcibly + # to have the configuration file copied. + target_dir = os.path.dirname(os.path.join(source_tree_root, path)) + if not os.path.isdir(target_dir): + try: + os.makedirs(target_dir) + except OSError, e: + if e.errno != errno.EEXIST: + raise # Copy the GN file from directory of this script to target path. - shutil.copyfile(os.path.join(my_dirname, '%s.gn' % lib), - os.path.join(source_tree_root, path)) + src = os.path.join(my_dirname, '%s.gn' % lib) + dst = os.path.join(source_tree_root, path) + print('** use system %s library **' % lib) + print(' From %s\n To %s' % (src, dst)) + shutil.copyfile(src, dst) + src = os.path.join(my_dirname, '%s' % lib) + # Copy the additional configuration files from directory of this script to target path. + if os.path.isdir(src): + dst = os.path.join(source_tree_root, 'third_party') + os.system("cp -rf " + src + " " + dst) + print(' From %s\n To %s' % (src, dst)) unhandled_libraries = set(args.system_libraries) - handled_libraries if unhandled_libraries: diff --git a/tizen_src/packaging/chromium-efl-libs.manifest b/packaging/chromium-efl-libs.manifest similarity index 100% rename from tizen_src/packaging/chromium-efl-libs.manifest rename to packaging/chromium-efl-libs.manifest diff --git a/tizen_src/packaging/chromium-efl-libs.spec b/packaging/chromium-efl-libs.spec similarity index 100% rename from tizen_src/packaging/chromium-efl-libs.spec rename to packaging/chromium-efl-libs.spec diff --git a/tizen_src/packaging/chromium-efl.manifest b/packaging/chromium-efl.manifest similarity index 100% rename from tizen_src/packaging/chromium-efl.manifest rename to packaging/chromium-efl.manifest diff --git a/tizen_src/packaging/chromium-efl.spec b/packaging/chromium-efl.spec similarity index 96% rename from tizen_src/packaging/chromium-efl.spec rename to packaging/chromium-efl.spec index a64108c..25148f0 100644 --- a/tizen_src/packaging/chromium-efl.spec +++ b/packaging/chromium-efl.spec @@ -270,10 +270,6 @@ Chromium EFL unit test utilities %setup -q %build - -tizen_src/build/apply_patches.sh -trap 'tizen_src/build/apply_patches.sh -r' EXIT - # architecture related configuration + neon temporary workaround %if %{?_skip_ninja:0}%{!?_skip_ninja:1} %ifarch %{arm} aarch64 @@ -305,14 +301,11 @@ trap 'tizen_src/build/apply_patches.sh -r' EXIT # The variable chromium-efl_tizen_version and _repository are essentially needed for build. # Therefore, if the variable is not defined, it explicitly raises exception here. %define OUTPUT_BASE_FOLDER out.tz_v%{chromium_efl_tizen_version}.%{OUTPUT_BUILD_PROFILE_TARGET}.%{_repository} -export GYP_GENERATOR_OUTPUT=$PWD/%{OUTPUT_BASE_FOLDER} + +export GN_GENERATOR_OUTPUT=$PWD/%{OUTPUT_BASE_FOLDER} #set build mode -%if 0%{?_debug_mode} - %global OUTPUT_FOLDER %{OUTPUT_BASE_FOLDER}/Debug -%else - %global OUTPUT_FOLDER %{OUTPUT_BASE_FOLDER}/Release -%endif +%global OUTPUT_FOLDER %{OUTPUT_BASE_FOLDER} %global XWALK_GEN %{OUTPUT_FOLDER}/xwalk_gen if type ccache &> /dev/null; then @@ -329,25 +322,26 @@ fi cp -a LICENSE "%{XWALK_GEN}"/LICENSE.chromium %endif -#gyp generate -%if %{?_skip_gyp:0}%{!?_skip_gyp:1} -#run standard gyp_chromiumefl wrapper - ./tizen_src/build/gyp_chromiumefl.sh \ - -Dexe_dir="%{CHROMIUM_EXE_DIR}" \ - -Ddata_dir="%{CHROMIUM_DATA_DIR}" \ - -Dedje_dir="%{CHROMIUM_DATA_DIR}"/themes \ - -Dlocale_dir="%{CHROMIUM_LOCALE_DIR}" \ +#gn generate +#run standard gn_chromiumefl wrapper + ./tizen_src/build/gn_chromiumefl.sh \ + "building_for_tizen_%{OUTPUT_BUILD_PROFILE_TARGET}=true" \ + "data_dir=\"%{CHROMIUM_DATA_DIR}\"" \ + "edje_dir=\"%{CHROMIUM_DATA_DIR}/themes\"" \ + "exe_dir=\"%{CHROMIUM_EXE_DIR}\"" \ + "locale_dir=\"%{CHROMIUM_LOCALE_DIR}\"" \ + "tizen_%{OUTPUT_BUILD_PROFILE_TARGET}=true" \ %if 0%{?_remove_webcore_debug_symbols:1} - -Dremove_webcore_debug_symbols=1 \ + "remove_webcore_debug_symbols=true" \ %endif %if 0%{?chromium_efl_tizen_version:1} - -Dchromium_efl_tizen_version=%{chromium_efl_tizen_version} \ + "chromium_efl_tizen_version=%{gn_chromium_efl_tizen_version}" \ %endif %if "%{?_with_wayland}" == "1" - -Duse_wayland=1 \ + "use_wayland=true" \ %endif %if "%{?_repository}" == "emulator" || "%{?_repository}" == "emulator32-x11" - -Dtizen_emulator_support=1 \ + "tizen_emulator_support=true" \ %endif %if 0%{?build_xwalk} --xwalk \ diff --git a/tizen_src/packaging/chromium-efl_v3.0.manifest b/packaging/chromium-efl_v3.0.manifest similarity index 100% rename from tizen_src/packaging/chromium-efl_v3.0.manifest rename to packaging/chromium-efl_v3.0.manifest diff --git a/tizen_src/packaging/chromium-ewktest.manifest b/packaging/chromium-ewktest.manifest similarity index 100% rename from tizen_src/packaging/chromium-ewktest.manifest rename to packaging/chromium-ewktest.manifest diff --git a/tizen_src/packaging/content_shell.in b/packaging/content_shell.in similarity index 100% rename from tizen_src/packaging/content_shell.in rename to packaging/content_shell.in diff --git a/tizen_src/packaging/crosswalk-bin.spec b/packaging/crosswalk-bin.spec similarity index 100% rename from tizen_src/packaging/crosswalk-bin.spec rename to packaging/crosswalk-bin.spec diff --git a/tizen_src/packaging/manifest.xml b/packaging/manifest.xml similarity index 100% rename from tizen_src/packaging/manifest.xml rename to packaging/manifest.xml diff --git a/tizen_src/packaging/print-chromium-deps.py b/packaging/print-chromium-deps.py similarity index 100% rename from tizen_src/packaging/print-chromium-deps.py rename to packaging/print-chromium-deps.py diff --git a/tizen_src/build/apply_patches.sh b/tizen_src/build/apply_patches.sh deleted file mode 100755 index 002e8e9..0000000 --- a/tizen_src/build/apply_patches.sh +++ /dev/null @@ -1,41 +0,0 @@ -. $(dirname $0)/common.sh - -function silentApply() { - PATCH=$(readlink -f $1) - patch -d ${CHROME_SRC} --forward --reject-file=- -p1 -i $PATCH >/dev/null - if [ "$?" -gt 0 ]; then - >&2 echo "failed applying $1" - fi -} - -function silentDeapply() { - PATCH=$(readlink -f $1) - pushd ${CHROME_SRC} > /dev/null - patch --forward --reject-file=- -p1 --dry-run -i $PATCH >/dev/null - RET=$? - if [ "$RET" -gt 1 ]; then - >&2 echo "failed deapplying $1" - elif [ "$RET" == "1" ]; then - # exit status 1 means it's already applied so we revert - patch -p1 -R --reject-file=- -i $PATCH >/dev/null - fi - popd > /dev/null -} - -echo "$@" | grep -q "\-r" && REVERSE=1 -echo "$@" | grep -q "\-\-crosswalk-bin" && CROSSWALK_BIN=1 - -patchdir=${TOPDIR}/tizen_src/build/patches -patchset=$patchdir/*.diff - -if [ "$CROSSWALK_BIN" == "1" ]; then - patchset+=" $patchdir/crosswalk/*.diff" -fi - -for patch in $patchset ; do - if [ -z "$REVERSE" ]; then - silentApply $patch - else - silentDeapply $patch - fi -done diff --git a/tizen_src/build/build_desktop.sh b/tizen_src/build/build_desktop.sh index 1e9463f..3ae7e8d 100755 --- a/tizen_src/build/build_desktop.sh +++ b/tizen_src/build/build_desktop.sh @@ -10,17 +10,10 @@ host_arch=$(getHostArch) parseHostBuildScriptParams desktop $@ JHBUILD_STAMPFILE="" -if [ "$USE_GN" ]; then - if [ -z "$GN_GENERATOR_OUTPUT" ]; then - export GN_GENERATOR_OUTPUT=${TOPDIR}/"out.${host_arch}" - fi - JHBUILD_STAMPFILE="${GN_GENERATOR_OUTPUT}/Dependencies/Root/jhbuild.stamp" -else - if [ -z "$GYP_GENERATOR_OUTPUT" ]; then - export GYP_GENERATOR_OUTPUT=${TOPDIR}/"out.${host_arch}" - fi - JHBUILD_STAMPFILE="${GYP_GENERATOR_OUTPUT}/Dependencies/Root/jhbuild.stamp" +if [ -z "$GN_GENERATOR_OUTPUT" ]; then + export GN_GENERATOR_OUTPUT=${TOPDIR}/"out.${host_arch}" fi +JHBUILD_STAMPFILE="${GN_GENERATOR_OUTPUT}/Dependencies/Root/jhbuild.stamp" forceJHBuildIfNeeded() { if [[ $FORCE_JHBUILD == 1 ]]; then @@ -37,11 +30,7 @@ forceJHBuildIfNeeded() { forceJHBuildIfNeeded JHBUILD_DEPS="" -if [ "$USE_GN" ]; then - JHBUILD_DEPS="${GN_GENERATOR_OUTPUT}/Dependencies/Root" -else - JHBUILD_DEPS="${GYP_GENERATOR_OUTPUT}/Dependencies/Root" -fi +JHBUILD_DEPS="${GN_GENERATOR_OUTPUT}/Dependencies/Root" if [ "${host_arch}" == "x64" ]; then _LIBDIR=lib64 elif [ "${host_arch}" == "ia32" ]; then @@ -57,13 +46,7 @@ if [ ! -f "$JHBUILD_STAMPFILE" ]; then fi fi -${SCRIPTDIR}/apply_patches.sh ${SCRIPTDIR}/patches - -if [ "$USE_GN" ]; then - export __GN_CHROMIUMEFL_TARGET=desktop -else - export __GYP_CHROMIUMEFL_TARGET=desktop -fi +export __GN_CHROMIUMEFL_TARGET=desktop #export BUILD_DEPENDENCIES_LIB_PATH="${JHBUILD_DEPS}/${_LIBDIR}" #export BUILD_DEPENDENCIES_INCLUDE_PATH="${JHBUILD_DEPS}/include" @@ -75,17 +58,11 @@ fi #done #deps_include_path="$deps_include_path\"" -if [ "$USE_GN" ]; then - #hostGnChromiumEfl "deps_include_path=$deps_include_path deps_lib_path=\"${JHBUILD_DEPS}/${_LIBDIR}\"" - hostGnChromiumEfl "deps_include_path=\"${JHBUILD_DEPS}/include\" deps_lib_path=\"${JHBUILD_DEPS}/${_LIBDIR}\"" +#hostGnChromiumEfl "deps_include_path=$deps_include_path deps_lib_path=\"${JHBUILD_DEPS}/${_LIBDIR}\"" +hostGnChromiumEfl "deps_include_path=\"${JHBUILD_DEPS}/include\" deps_lib_path=\"${JHBUILD_DEPS}/${_LIBDIR}\"" # deps_efl_pc_path=\"${JHBUILD_DEPS}/Source/efl-1.16.0/pc\" -else - hostGypChromiumEfl -fi export LD_LIBRARY_PATH="${JHBUILD_DEPS}/${_LIBDIR}:$LD_LIBRARY_PATH" export PATH="${JHBUILD_DEPS}/bin:$PATH" hostNinja desktop - -${SCRIPTDIR}/apply_patches.sh -r ${SCRIPTDIR}/patches diff --git a/tizen_src/build/common.sh b/tizen_src/build/common.sh index 1f029d4..22f66a6 100755 --- a/tizen_src/build/common.sh +++ b/tizen_src/build/common.sh @@ -78,9 +78,6 @@ function parseHostBuildScriptParams() { --skip-gyp) export SKIP_GYP=1 ;; - --use-gn) - export USE_GN=1 - ;; --skip-gn) export SKIP_GN=1 ;; @@ -177,12 +174,8 @@ function hostNinja() { if [[ $BUILD_CHROMEDRIVER == 1 ]]; then TARGETS="$TARGETS chromedriver" fi - if [ "$USE_GN" ]; then - export BUILD_SUBDIRECTORY="" - BUILDDIR=${GN_GENERATOR_OUTPUT}/${BUILD_SUBDIRECTORY} - else - BUILDDIR=${GYP_GENERATOR_OUTPUT}/${BUILD_SUBDIRECTORY} - fi + export BUILD_SUBDIRECTORY="" + BUILDDIR=${GN_GENERATOR_OUTPUT}/${BUILD_SUBDIRECTORY} ninja -C $BUILDDIR ${JOBS} ${TARGETS} fi } @@ -278,11 +271,6 @@ function setupAndExecuteTargetBuild() { count=$(( $count + 1 )) ARGS[$count]="_skip_gyp 1" ;; - --use-gn) - ARGS[$count]=--define - count=$(( $count + 1 )) - ARGS[$count]="_use_gn 1" - ;; --skip-gn) ARGS[$count]=--define count=$(( $count + 1 )) diff --git a/tizen_src/build/cross_build_mobile.sh b/tizen_src/build/cross_build_mobile.sh index 6e1a448..a19ba14 100755 --- a/tizen_src/build/cross_build_mobile.sh +++ b/tizen_src/build/cross_build_mobile.sh @@ -20,12 +20,10 @@ function rollbackGbsSysrootChanges() { function preBuild() { adaptGbsSysrootToCrossCompilation $1 - ${SCRIPTDIR}/apply_patches.sh } function postBuild() { rollbackGbsSysrootChanges $1 - ${SCRIPTDIR}/apply_patches.sh -r } if [ -z "$GYP_GENERATOR_OUTPUT" ]; then diff --git a/tizen_src/build/cross_build_tv.sh b/tizen_src/build/cross_build_tv.sh index b7e34f0..0246cd4 100755 --- a/tizen_src/build/cross_build_tv.sh +++ b/tizen_src/build/cross_build_tv.sh @@ -20,12 +20,10 @@ function rollbackGbsSysrootChanges() { function preBuild() { adaptGbsSysrootToCrossCompilation $1 - ${SCRIPTDIR}/apply_patches.sh } function postBuild() { rollbackGbsSysrootChanges $1 - ${SCRIPTDIR}/apply_patches.sh -r } if [ -z "$GYP_GENERATOR_OUTPUT" ]; then diff --git a/tizen_src/build/gn_chromiumefl b/tizen_src/build/gn_chromiumefl index 52d6101..e2e47ee 100755 --- a/tizen_src/build/gn_chromiumefl +++ b/tizen_src/build/gn_chromiumefl @@ -125,9 +125,6 @@ if __name__ == '__main__': args[arg] += " gcc_version=49" # It should be in condition for arm target - args.append("--defines=USE_EFL") - args.append("-v") - buildtools_path = os.environ.get('CHROMIUM_BUILDTOOLS_PATH') host_arch = os.environ.get('HOST_ARCH') if not buildtools_path: diff --git a/tizen_src/build/gn_chromiumefl.sh b/tizen_src/build/gn_chromiumefl.sh index 03d27b3..11f95c4 100755 --- a/tizen_src/build/gn_chromiumefl.sh +++ b/tizen_src/build/gn_chromiumefl.sh @@ -201,39 +201,6 @@ add_gbs_flags() { # it is used for gbs and added target_cpu also. ADDITIONAL_GN_PARAMETERS+="target_cpu=\"${host_arch}\" " - # sysroot="" - #" - #no-parallel=true - #" - # TODO(b.kelemen): ideally crosscompile should also support system libs. - # Unfortunately the gbs root doesn't contain everything chromium needs. -# SYSTEM_DEPS="-Duse_system_expat=true -# -Duse_system_libjpeg=false -# -Duse_system_libpng=true -# -Duse_system_libusb=true -# -Duse_system_libxml=true -# -Duse_system_libxslt=true -# -Duse_system_re2=true -# -Duse_system_zlib=true -# " - SYSTEM_DEPS="" #"--system-libraries - #libxml - #" - - # [M50_2661] Temporary using the icu of internal chformium instead of system. - # The icu of system doesn't support utrie2.h - # FIXME: http://suprem.sec.samsung.net/jira/browse/TWF-967 -# SYSTEM_DEPS+="-Duse_system_icu=false -# " - - if [ "$target" == "mobile" ]; then -# SYSTEM_DEPS+="-Duse_system_bzip2=true -# -Duse_system_libexif=true -# -Duse_system_nspr=true -# " - SYSTEM_DEPS+=" - " - fi } add_cross_flags() { @@ -264,10 +231,12 @@ else add_cross_flags fi fi - if [ "$SYSTEM_DEPS" != "" ]; then - #replacing original files with correct ones according to $SYSTEM_DEPS - $TOPDIR/build/linux/unbundle/replace_gn_files.py $SYSTEM_DEPS - fi +fi + +if [ "$SYSTEM_DEPS" != "" ]; then + echo "** use system lib : replace **" + #replacing original files with correct ones according to $SYSTEM_DEPS + $TOPDIR/build/linux/unbundle/replace_gn_files.py $SYSTEM_DEPS fi _GN_ARGS=" @@ -285,6 +254,9 @@ printf "GN_ARGUMENTS:\n" for arg in $_GN_ARGS; do printf " * ${arg##-D}\n" done +for arg in $SYSTEM_DEPS; do + printf " * ${arg##-D}\n" +done if [ -f "${TOPDIR}/BUILD_.gn" ]; then rm "${TOPDIR}/BUILD.gn" @@ -301,6 +273,7 @@ ret=$? mv ${TOPDIR}/BUILD_.gn ${TOPDIR}/BUILD.gn if [ "$SYSTEM_DEPS" != "" ]; then + echo "** use system lib : undo **" # Restore gn files to their original states not to mess up the tree permanently. $TOPDIR/build/linux/unbundle/replace_gn_files.py --undo $SYSTEM_DEPS fi diff --git a/tizen_src/build/jhbuild/jhbuild.modules b/tizen_src/build/jhbuild/jhbuild.modules index 6fb88ef..d30a2ab 100755 --- a/tizen_src/build/jhbuild/jhbuild.modules +++ b/tizen_src/build/jhbuild/jhbuild.modules @@ -27,18 +27,56 @@ + href="http://sourceware.org"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + hash="sha256:c13540bad764d014fea2c079fad8fcca62e5c229994d43aa4eb692d2c9b73afe" + md5sum="c7cf8478edff3f1342e5f664b347c13c"> @@ -46,11 +84,11 @@ - + + hash="sha256:6a6a5883939eab8d87179c7980c0dbd6b53d82bf460a161045a891694d036b2b" + md5sum="5d25c429e34da44e6b4ba27cd91ade4d"> diff --git a/tizen_src/build/jhbuild/jhbuildrc b/tizen_src/build/jhbuild/jhbuildrc index 8a90c1b..337f39f 100644 --- a/tizen_src/build/jhbuild/jhbuildrc +++ b/tizen_src/build/jhbuild/jhbuildrc @@ -30,10 +30,7 @@ moduleset = [ __moduleset_file_uri, ] __extra_modules = os.environ.get("WEBKIT_EXTRA_MODULES", "").split(",") modules = [ 'chromeefl-dependencies', ] -if os.environ['USE_GN']: - outdir = os.environ.get('GN_GENERATOR_OUTPUT', 'out') -else: - outdir = os.environ.get('GYP_GENERATOR_OUTPUT', 'out') +outdir = os.environ.get('GN_GENERATOR_OUTPUT', 'out') checkoutroot = os.path.abspath(os.path.join(outdir,'Dependencies', 'Source')) prefix = os.path.abspath(os.path.join(outdir,'Dependencies', 'Root')) diff --git a/tizen_src/build/patches/crosswalk/crosswalk-do-not-build-several-chromium-dependencies.diff b/tizen_src/build/patches/crosswalk/crosswalk-do-not-build-several-chromium-dependencies.diff deleted file mode 100644 index 7f9e74d..0000000 --- a/tizen_src/build/patches/crosswalk/crosswalk-do-not-build-several-chromium-dependencies.diff +++ /dev/null @@ -1,919 +0,0 @@ -Author: Raphael Kubo da Costa - -This patch is part of a hack to allow us to split Crosswalk into two separate -packages, crosswalk-libs (with Chromium shared libraries and all dependencies -required by Crosswalk itself) and crosswalk-bin (with the Crosswalk binaries). - -If passes "--define build_libs 0" to the spec file, crosswalk-libs will not be -built and we assume it is already installed. This patch is then applied to the -source tree to make big targets that used to consume a lot of time and CPU by -generating and building a lot of files do nothing but pass "-l" to -the linker. In other words, we cheat the build system into thinking those -targets do not need to build anything. - -Not all targets can be converted like this, and keeping the patch up-to-date -across Chromium releases requires manual intervention. Some rules of thumb: - -* Only targets whose original type is '<(component)' or 'shared_library' can be - converted like this. 'static_library' targets are expected to remain static - (technically it is possible to convert them, but then the hack gets even - bigger and there is no guarantee that a certain target is expected to work as - a shared library in the first place). If they are part of a shared library we - have converted they will not need to be built at all, and if a target in - Crosswalk itself requires them the static library will need to exist anyway. - -* 'direct_dependent_settings' need to be maintained, as targets that depend on - a converted one still need include paths and other things specified there. - -* 'export_depent_settings' and 'all_dependent_settings' need to be preserved - for the same reason: a target that depends on the converted one may still - need other libraries that it does not depend on directly. Consequently, this - means that a certain amount of targets in 'dependencies' also need to be - kept, since a target must be in the 'dependencies' list to be in - '*_dependent_settings'. - -* 'actions' need to be removed from the original target, as otherwise there is - more than one target that generates the same files. - -* Some target dependencies may be needed even if they are not in one of the - '*_dependent_settings' lists. For example, targets that generate code, like - the mojo ones. - -* Some gyp files are trickier than others. contents.gyp and skia.gyp, for - example, get a lot of additional settings from the .gypi files that they - include. This all needs to be carefully examined when updating the patch. - -The best way to make sure the patch still works with a newer Chromium release -is to call `gbs build' with `--define build_bin 0' first so that only -crosswalk-libs is generated, then install/upgrade that package and finally call -`gbs build' with `--define build_libs 0' to build only crosswalk-bin. In the -best case, everything still builds and the total number of targets is still -similar to the previous count. If that is not the case, you need to check which -Crosswalk targets have started depending on others from Chromium and, if -possible, convert some of them. - -BUG=XWALK-2571 ---- src/base/base.gyp -+++ src/base/base.gyp -@@ -13,6 +13,74 @@ - 'targets': [ - { - 'target_name': 'base', -+ 'type': 'none', -+ 'toolsets': ['host', 'target'], -+ 'link_settings': { -+ 'libraries': [ -+ '-lbase', -+ ], -+ }, -+ # TODO(gregoryd): direct_dependent_settings should be shared with the -+ # 64-bit target, but it doesn't work due to a bug in gyp -+ 'direct_dependent_settings': { -+ 'include_dirs': [ -+ '..', -+ ], -+ }, -+ 'conditions': [ -+ ['use_glib==1 or <(use_ozone)==1', { -+ 'dependencies': [ -+ '../build/linux/system.gyp:glib', -+ ], -+ 'export_dependent_settings': [ -+ '../build/linux/system.gyp:glib', -+ ], -+ }], -+ ['OS == "linux"', { -+ 'link_settings': { -+ 'libraries': [ -+ # We need rt for clock_gettime(). -+ '-lrt', -+ # For 'native_library_linux.cc' -+ '-ldl', -+ ], -+ }, -+ }], -+ ], -+ }, -+ { -+ 'target_name': 'base_i18n', -+ 'type': 'none', -+ 'link_settings': { -+ 'libraries': [ -+ '-lbase_i18n', -+ ], -+ }, -+ 'dependencies': [ -+ 'base', -+ ], -+ 'export_dependent_settings': [ -+ 'base', -+ ], -+ }, -+ { -+ 'target_name': 'base_prefs', -+ 'type': 'none', -+ 'link_settings': { -+ 'libraries': [ -+ '-lbase_prefs', -+ ], -+ }, -+ 'dependencies': [ -+ 'base', -+ ], -+ 'export_dependent_settings': [ -+ 'base', -+ ], -+ }, -+ -+ { -+ 'target_name': 'base_original', - 'type': '<(component)', - 'toolsets': ['host', 'target'], - 'variables': { -@@ -256,7 +323,7 @@ - ], - }, - { -- 'target_name': 'base_i18n', -+ 'target_name': 'base_i18n_original', - 'type': '<(component)', - 'variables': { - 'enable_wexit_time_destructors': 1, -@@ -308,7 +375,7 @@ - ], - }, - { -- 'target_name': 'base_prefs', -+ 'target_name': 'base_prefs_original', - 'type': '<(component)', - 'variables': { - 'enable_wexit_time_destructors': 1, ---- src/cc/cc.gyp -+++ src/cc/cc.gyp -@@ -10,6 +10,21 @@ - { - # GN version: //cc - 'target_name': 'cc', -+ 'type': 'none', -+ 'link_settings': { -+ 'libraries': [ -+ '-lcc', -+ ], -+ }, -+ # Include src/gpu for gl2chromium.h. -+ 'dependencies': [ -+ '../third_party/khronos/khronos.gyp:khronos_headers', -+ ], -+ }, -+ -+ { -+ # GN version: //cc -+ 'target_name': 'cc_original', - 'type': '<(component)', - 'dependencies': [ - '<(DEPTH)/base/base.gyp:base', ---- src/content/content.gyp -+++ src/content/content.gyp -@@ -21,6 +21,69 @@ - }], - ], - }, -+ -+ 'targets': [ -+ { -+ # GN version: //content -+ 'target_name': 'content', -+ 'type': 'none', -+ 'link_settings': { -+ 'libraries': [ -+ '-lcontent', -+ ], -+ }, -+ -+ 'dependencies': [ -+ '../ui/accessibility/accessibility.gyp:ax_gen', -+ '../third_party/blink/public/blink_headers.gyp:blink_headers', -+ '../skia/skia.gyp:skia', -+ -+ '../device/battery/battery.gyp:device_battery_mojo_bindings', -+ '../device/vibration/vibration.gyp:device_vibration_mojo_bindings', -+ '../mojo/mojo_base.gyp:mojo_application_bindings', -+ '../mojo/mojo_base.gyp:mojo_environment_chromium', -+ '../third_party/mojo/mojo_edk.gyp:mojo_system_impl', -+ '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings', -+ 'content_common_mojo_bindings.gyp:content_common_mojo_bindings', -+ ], -+ 'export_dependent_settings': [ -+ '../ui/accessibility/accessibility.gyp:ax_gen', -+ # The public content API headers directly include Blink API headers, so we -+ # have to export the blink header settings so that relative paths in these -+ # headers resolve correctly. -+ '../third_party/blink/public/blink_headers.gyp:blink_headers', -+ # The public render_widget_host.h needs to re-export skia defines. -+ '../skia/skia.gyp:skia', -+ 'content_common_mojo_bindings.gyp:content_common_mojo_bindings', -+ ], -+ -+ 'actions': [ -+ { -+ 'action_name': 'generate_webkit_version', -+ 'inputs': [ -+ '<(script)', -+ '<(lastchange)', -+ '<(template)', -+ ], -+ 'outputs': [ -+ '<(SHARED_INTERMEDIATE_DIR)/webkit_version.h', -+ ], -+ 'action': ['python', -+ '<(script)', -+ '-f', '<(lastchange)', -+ '<(template)', -+ '<@(_outputs)', -+ ], -+ 'variables': { -+ 'script': '<(DEPTH)/build/util/version.py', -+ 'lastchange': '<(DEPTH)/build/util/LASTCHANGE.blink', -+ 'template': 'webkit_version.h.in', -+ }, -+ }, -+ ], -+ }, -+ ], -+ - 'conditions': [ - ['OS != "ios"', { - 'includes': [ -@@ -291,7 +349,7 @@ - 'targets': [ - { - # GN version: //content -- 'target_name': 'content', -+ 'target_name': 'content_original', - 'type': 'shared_library', - 'variables': { 'enable_wexit_time_destructors': 1, }, - 'dependencies': [ ---- src/content/content_common.gypi -+++ src/content/content_common.gypi -@@ -569,30 +569,6 @@ - '../ui/gl/gl.gyp:gl', - '../webkit/common/gpu/webkit_gpu.gyp:webkit_gpu', - ], -- 'actions': [ -- { -- 'action_name': 'generate_webkit_version', -- 'inputs': [ -- '<(script)', -- '<(lastchange)', -- '<(template)', -- ], -- 'outputs': [ -- '<(SHARED_INTERMEDIATE_DIR)/webkit_version.h', -- ], -- 'action': ['python', -- '<(script)', -- '-f', '<(lastchange)', -- '<(template)', -- '<@(_outputs)', -- ], -- 'variables': { -- 'script': '<(DEPTH)/build/util/version.py', -- 'lastchange': '<(DEPTH)/build/util/LASTCHANGE.blink', -- 'template': 'webkit_version.h.in', -- }, -- }, -- ], - }], - ['OS=="mac"', { - 'dependencies': [ ---- src/gpu/gpu.gyp -+++ src/gpu/gpu.gyp -@@ -11,6 +11,17 @@ - ], - 'targets': [ - { -+ # GN version: //gpu -+ 'target_name': 'gpu', -+ 'type': 'none', -+ 'link_settings': { -+ 'libraries': [ -+ '-lgpu', -+ ], -+ }, -+ }, -+ -+ { - # Library emulates GLES2 using command_buffers. - # GN version: //gpu/command_buffer/client:gles2_implementation - 'target_name': 'gles2_implementation', -@@ -522,7 +533,7 @@ - }, - { - # GN version: //gpu -- 'target_name': 'gpu', -+ 'target_name': 'gpu_original', - 'type': 'shared_library', - 'includes': [ - 'command_buffer_client.gypi', ---- src/media/media.gyp -+++ src/media/media.gyp -@@ -49,6 +49,22 @@ - { - # GN version: //media - 'target_name': 'media', -+ 'type': 'none', -+ 'link_settings': { -+ 'libraries': [ -+ '-lmedia', -+ ], -+ }, -+ 'direct_dependent_settings': { -+ 'include_dirs': [ -+ '..', -+ ], -+ }, -+ }, -+ -+ { -+ # GN version: //media -+ 'target_name': 'media_original', - 'type': '<(component)', - 'dependencies': [ - '../base/base.gyp:base', ---- src/third_party/mojo/mojo_edk.gyp -+++ src/third_party/mojo/mojo_edk.gyp -@@ -10,6 +10,21 @@ - { - # GN version: //mojo/edk/system - 'target_name': 'mojo_system_impl', -+ 'type': 'none', -+ 'link_settings': { -+ 'libraries': [ -+ '-lmojo_system_impl', -+ ], -+ }, -+ 'all_dependent_settings': { -+ # Ensures that dependent projects import the core functions on Windows. -+ 'defines': ['MOJO_USE_SYSTEM_IMPL'], -+ }, -+ }, -+ -+ { -+ # GN version: //mojo/edk/system -+ 'target_name': 'mojo_system_original', - 'type': '<(component)', - 'dependencies': [ - '../base/base.gyp:base', ---- src/net/net.gyp -+++ src/net/net.gyp -@@ -104,6 +104,41 @@ - }, - { - 'target_name': 'net', -+ 'type': 'none', -+ 'link_settings': { -+ 'libraries': [ -+ '-lnet', -+ ], -+ }, -+ 'dependencies': [ -+ '../base/base.gyp:base', -+ ], -+ 'export_dependent_settings': [ -+ '../base/base.gyp:base', -+ ], -+ 'conditions': [ -+ ['use_kerberos==1', { -+ 'conditions': [ -+ ['linux_link_kerberos==1', { -+ 'link_settings': { -+ 'ldflags': [ -+ '= 7 && arm_use_neon) { -+} else if ((current_cpu == "arm" || is_tizen) && arm_version >= 7 && arm_use_neon) { - ffmpeg_arch = "arm-neon" -+} else if (is_tizen) { -+ ffmpeg_arch = "arm" - } else { - ffmpeg_arch = current_cpu - } -@@ -61,6 +63,6 @@ os_config = current_os - if ((is_linux || is_chromeos) && is_msan) { - os_config = "linux-noasm" - disable_ffmpeg_asm = true --} else if (is_chromeos) { -+} else if (is_chromeos || is_tizen) { - os_config = "linux" - } diff --git a/tizen_src/build/patches/hotfix_enable_content_shell.diff b/tizen_src/build/patches/hotfix_enable_content_shell.diff deleted file mode 100644 index 16b5a6f..0000000 --- a/tizen_src/build/patches/hotfix_enable_content_shell.diff +++ /dev/null @@ -1,41 +0,0 @@ -diff --git a/third_party/mesa/src/chromium_gensrc/mesa/glcpp-parse.c b/third_party/mesa/src/chromium_gensrc/mesa/glcpp-parse.c -index 40ff9ff..c641ab0 100644 ---- a/third_party/mesa/src/chromium_gensrc/mesa/glcpp-parse.c -+++ b/third_party/mesa/src/chromium_gensrc/mesa/glcpp-parse.c -@@ -4005,12 +4005,12 @@ _glcpp_parser_expand_node (glcpp_parser_t *parser, - * unexpanded token. */ - char *str; - token_list_t *expansion; -- token_t *final; -+ token_t *final_token; - - str = ralloc_strdup (parser, token->value.str); -- final = _token_create_str (parser, OTHER, str); -+ final_token = _token_create_str (parser, OTHER, str); - expansion = _token_list_create (parser); -- _token_list_append (expansion, final); -+ _token_list_append (expansion, final_token); - *last = node; - return expansion; - } -diff --git a/third_party/mesa/src/src/glsl/glcpp/glcpp-parse.y b/third_party/mesa/src/src/glsl/glcpp/glcpp-parse.y -index 8025c06..a19dc15 100644 ---- a/third_party/mesa/src/src/glsl/glcpp/glcpp-parse.y -+++ b/third_party/mesa/src/src/glsl/glcpp/glcpp-parse.y -@@ -1538,12 +1538,12 @@ _glcpp_parser_expand_node (glcpp_parser_t *parser, - * unexpanded token. */ - char *str; - token_list_t *expansion; -- token_t *final; -+ token_t *final_token; - - str = ralloc_strdup (parser, token->value.str); -- final = _token_create_str (parser, OTHER, str); -+ final_token = _token_create_str (parser, OTHER, str); - expansion = _token_list_create (parser); -- _token_list_append (expansion, final); -+ _token_list_append (expansion, final_token); - *last = node; - return expansion; - } - diff --git a/tizen_src/build/patches/hotfix_m53_2785_include_py.diff b/tizen_src/build/patches/hotfix_m53_2785_include_py.diff deleted file mode 100644 index 3c4eaea..0000000 --- a/tizen_src/build/patches/hotfix_m53_2785_include_py.diff +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/tools/grit/grit/node/include.py b/tools/grit/grit/node/include.py -index 4bad785..94e5e7a 100755 ---- a/tools/grit/grit/node/include.py -+++ b/tools/grit/grit/node/include.py -@@ -100,10 +100,13 @@ class IncludeNode(base.Node): - # We only use rsyncable compression on Linux. - # We exclude ChromeOS since ChromeOS bots are Linux based but do not have - # the --rsyncable option built in for gzip. See crbug.com/617950. -- if sys.platform == 'linux2' and 'chromeos' not in self.GetRoot().defines: -- data = grit.format.gzip_string.GzipStringRsyncable(data) -- else: -- data = grit.format.gzip_string.GzipString(data) -+# [M53_2785] We cannot use the rsyncable compression since 'chromium-efl' do not -+# have the --rsyncable option built in for gzip. -+# FIXME: http://suprem.sec.samsung.net/jira/browse/TWF-2059 -+# if sys.platform == 'linux2' and 'chromeos' not in self.GetRoot().defines: -+# data = grit.format.gzip_string.GzipStringRsyncable(data) -+# else: -+ data = grit.format.gzip_string.GzipString(data) - data = self.RESERVED_HEADER[0] + data - elif data[:3] == self.RESERVED_HEADER: - # We are reserving these 3 bytes as the header for gzipped files in the diff --git a/tizen_src/build/patches/hotfix_m53_2785_render_view_impl.diff b/tizen_src/build/patches/hotfix_m53_2785_render_view_impl.diff deleted file mode 100644 index ac81acd..0000000 --- a/tizen_src/build/patches/hotfix_m53_2785_render_view_impl.diff +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc -index 140e2fc..426bd43 100644 ---- a/content/renderer/render_view_impl.cc -+++ b/content/renderer/render_view_impl.cc -@@ -208,6 +208,7 @@ - #endif - - #if defined(USE_EFL) -+#include "content/renderer/android/disambiguation_popup_helper.h" - #include "content/renderer/android/email_detector.h" - #include "content/renderer/android/phone_number_detector.h" - #include "ui/gfx/device_display_info_efl.h" -@@ -3272,6 +3273,12 @@ bool RenderViewImpl::didTapMultipleTargets( - // The touch_rect, target_rects and zoom_rect are in the outer viewport - // reference frame. - gfx::Rect zoom_rect; -+#if !defined(EWK_BRINGUP) -+// [M53_2785] The path of "DisambiguationPopupHelper::ComputeZoomAreaAndScaleFactor" -+// is changed to "content/renderer/android/disambiguation_popup_helper.h" -+// from "content/renderer/disambiguation_popup_helper.h". -+// It will be fixed by webview team. -+// FIXME: http://suprem.sec.samsung.net/jira/browse/TWF-2057 - float new_total_scale = - #if defined(S_TERRACE_SUPPORT) - DisambiguationPopupHelper::ComputeZoomAreaAndScaleFactor( -@@ -3285,6 +3292,9 @@ bool RenderViewImpl::didTapMultipleTargets( - gfx::Rect(webview()->mainFrame()->visibleContentRect()).size(), - device_scale_factor_ * webview()->pageScaleFactor(), &zoom_rect); - #endif -+#else -+ float new_total_scale; -+#endif // EWK_BRINGUP - if (!new_total_scale || zoom_rect.IsEmpty()) - return false; - diff --git a/tizen_src/build/patches/info.txt b/tizen_src/build/patches/info.txt deleted file mode 100644 index cf2416d..0000000 --- a/tizen_src/build/patches/info.txt +++ /dev/null @@ -1,4 +0,0 @@ -webrtc.diff - double slash (//) in include path leads to rpm error, fixed by patch - See: http://107.108.218.239/bugzilla/show_bug.cgi?id=6458 - TODO(b.kelemen): upstream -- 2.7.4