Use host build deps for desktop build by default 83/317983/6
authorInsoon Kim <is46.kim@samsung.com>
Mon, 6 Jan 2025 07:13:56 +0000 (16:13 +0900)
committerInsoon Kim <is46.kim@samsung.com>
Thu, 16 Jan 2025 07:32:25 +0000 (07:32 +0000)
Change-Id: If38901cbbe0758379448df713f2f43e5b133a95b
Signed-off-by: Insoon Kim <is46.kim@samsung.com>
tizen_src/build/build_desktop.sh
tizen_src/build/common.sh
tizen_src/build/config/compiler/BUILD.gn
tizen_src/build/jhbuild/jhbuild.modules [changed mode: 0755->0644]

index 8459b1d6409b0f32141c9098188d0d2f859405f3..d522c1af35bbf2659ab1667a428c0f904ddf96d9 100755 (executable)
@@ -9,7 +9,6 @@ host_arch=$(getHostArch)
 
 parseHostBuildScriptParams desktop $@
 
-JHBUILD_STAMPFILE=""
 if [ -z "$GN_GENERATOR_OUTPUT" ]; then
   if [ $BUILD_CHROME == 1 ]; then
     export GN_GENERATOR_OUTPUT=${TOPDIR}/"out.chrome.${host_arch}"
@@ -17,47 +16,53 @@ if [ -z "$GN_GENERATOR_OUTPUT" ]; then
     export GN_GENERATOR_OUTPUT=${TOPDIR}/"out.${host_arch}"
   fi
 fi
-JHBUILD_STAMPFILE="${GN_GENERATOR_OUTPUT}/Dependencies/Root/jhbuild.stamp"
 
-forceJHBuildIfNeeded() {
+JHBUILD_DEPS=""
+buildLocalDepsWithJhbuild() {
+  JHBUILD_STAMPFILE=""
+  JHBUILD_STAMPFILE="${GN_GENERATOR_OUTPUT}/Dependencies/Root/jhbuild.stamp"
+
+  # forceJHBuildIfNeeded
   if [[ $FORCE_JHBUILD == 1 ]]; then
     rm -f $JHBUILD_STAMPFILE
-    return
-  fi
-
   # Check if anything in jhbuild is more recent than stamp file.
-  if [ $(find $SCRIPTDIR/jhbuild -type f -newer $JHBUILD_STAMPFILE -print | wc -l) != "0" ]; then
+  elif [ $(find $SCRIPTDIR/jhbuild -type f -newer $JHBUILD_STAMPFILE -print | wc -l) != "0" ]; then
     rm -f $JHBUILD_STAMPFILE
   fi
-}
-
-forceJHBuildIfNeeded
 
-JHBUILD_DEPS=""
-JHBUILD_DEPS="${GN_GENERATOR_OUTPUT}/Dependencies/Root"
-if [ "${host_arch}" == "x64" ]; then
-  _LIBDIR=lib64
-elif [ "${host_arch}" == "ia32" ]; then
-  _LIBDIR=lib
-fi
-export PKG_CONFIG_PATH="${JHBUILD_DEPS}/${_LIBDIR}/pkgconfig"
+  # Build local Dependencies with jhbuild
+  JHBUILD_DEPS="${GN_GENERATOR_OUTPUT}/Dependencies/Root"
+  if [ "${host_arch}" == "x64" ]; then
+    _LIBDIR=lib64
+  elif [ "${host_arch}" == "ia32" ]; then
+    _LIBDIR=lib
+  fi
+  export PKG_CONFIG_PATH="${JHBUILD_DEPS}/${_LIBDIR}/pkgconfig"
 
-if [ ! -f "$JHBUILD_STAMPFILE" ]; then
-  jhbuild --no-interact -f ${SCRIPTDIR}/jhbuild/jhbuildrc
+  if [ ! -f "$JHBUILD_STAMPFILE" ]; then
+    jhbuild --no-interact -f ${SCRIPTDIR}/jhbuild/jhbuildrc build
 
-  if [[ $? == 0 ]]; then
-    echo "Yay! jhbuild done!" > $JHBUILD_STAMPFILE
+    if [[ $? == 0 ]]; then
+      echo "Yay! jhbuild done!" > $JHBUILD_STAMPFILE
+    else
+      echo "jhbuild failed."
+      exit -1
+    fi
   fi
-fi
+}
 
 export __GN_CHROMIUMEFL_TARGET=desktop
 
 export C_INCLUDE_PATH="${SCRIPTDIR}/desktop/tizen_include:$C_INCLUDE_PATH"
 export CPLUS_INCLUDE_PATH="${SCRIPTDIR}/desktop/tizen_include:$CPLUS_INCLUDE_PATH"
 
-hostGnChromiumEfl "deps_include_path=\"${JHBUILD_DEPS}/include\" deps_lib_path=\"${JHBUILD_DEPS}/${_LIBDIR}\""
-
-export LD_LIBRARY_PATH="${JHBUILD_DEPS}/${_LIBDIR}:$LD_LIBRARY_PATH"
-export PATH="${JHBUILD_DEPS}/bin:$PATH"
+__HOST_GN_ARG=""
+if [[ $USE_LOCAL_JHBUILD_DEPS == 1 ]]; then
+  buildLocalDepsWithJhbuild
+  export LD_LIBRARY_PATH="${JHBUILD_DEPS}/${_LIBDIR}:$LD_LIBRARY_PATH"
+  export PATH="${JHBUILD_DEPS}/bin:$PATH"
+  __HOST_GN_ARG="deps_include_path=\"${JHBUILD_DEPS}/include\" deps_lib_path=\"${JHBUILD_DEPS}/${_LIBDIR}\""
+fi
+hostGnChromiumEfl $__HOST_GN_ARG
 
 hostNinja desktop
index 0f53fd1caa38fc6ce3eb666c26279eaafdf64d03..738441a573270bc2b4897373ff2dda99d869626e 100755 (executable)
@@ -87,6 +87,7 @@ OPTIONS:
    --debug               Build debug version of chromium-efl (out.${host_arch}/Debug instead of out.${host_arch}/Release)
    -jN                   Set number of jobs, just like with make or ninja
    --skip-ninja          Skip ninja step
+   --local-deps          Build using local dependency built by jhbuild
 
 examples:
 $0 --ccache
@@ -108,6 +109,7 @@ function parseHostBuildScriptParams() {
   trap 'undoReplacedGn $1' SIGINT
   export USE_CCACHE=0
   export USE_CLANG=1
+  export USE_LOCAL_JHBUILD_DEPS=0
   export FORCE_JHBUILD=0
   export SKIP_NINJA=0
   export BUILD_EWK_UNITTESTS=0
@@ -138,6 +140,12 @@ function parseHostBuildScriptParams() {
       --disable-build-chrome)
         export BUILD_CHROME=0
         ;;
+      --host-deps)
+        export USE_LOCAL_JHBUILD_DEPS=0
+        ;;
+      --local-deps)
+        export USE_LOCAL_JHBUILD_DEPS=1
+        ;;
       --force-jhbuild)
         export FORCE_JHBUILD=1
         ;;
index b484dc3470433df226c148c12f5633bacfd9c19e..743c0c87092b925b3fff4b41ca095c519b7e9f42 100644 (file)
@@ -6,13 +6,8 @@ import("//build/config/features.gni")
 import("//tizen_src/build/config/tizen_features.gni")
 
 declare_args() {
-  if (is_tizen) {
-    deps_include_path = "/usr/include"
-    deps_lib_path = "/usr/lib"
-  } else {
-    deps_include_path = ""
-    deps_lib_path = ""
-  }
+  deps_include_path = "/usr/include"
+  deps_lib_path = "/usr/lib"
 }
 
 config("tizen_default_include_dirs") {
old mode 100755 (executable)
new mode 100644 (file)
index a4f163e..3ab7050
@@ -6,11 +6,13 @@
   <metamodule id="chromeefl-dependencies">
     <dependencies>
       <dep package="efl"/>
+      <!--
       <dep package="elementary"/>
       <dep package="glib"/>
       <dep package="glib-networking"/>
       <dep package="libpng"/>
       <dep package="zlib"/>
+      -->
     </dependencies>
   </metamodule>
 
   <!-- The long and scary "enable-i-really" option is needed to build EFL with disable-pulseaudio and disable-physics options.
        Apparently EFL configure script considers such configuration unsupported. Still we don't need audio or physics support
        in EFL and building extra libraries just to satisfy dependencies we don't need is pointless. -->
-  <autotools id="efl" autogen-sh="configure"
-             autogenargs="--with-x11=xlib --with-opengl=es --with-glib=yes --disable-pulseaudio --disable-physics --enable-egl
-                          --enable-i-really-know-what-i-am-doing-and-that-this-will-probably-break-things-and-i-will-fix-them-myself-and-send-patches-abb">
-    <branch module="rel/libs/efl/efl-1.17.0.tar.xz" version="1.17.0"
+  <meson id="efl" mesonargs="-Dpulseaudio=false -Dbuild-examples=false -Dglib=true">
+    <branch module="rel/libs/efl/efl-1.25.1.tar.xz" version="1.25.1"
             repo="download.enlightenment.org"
-            hash="sha256:c13540bad764d014fea2c079fad8fcca62e5c229994d43aa4eb692d2c9b73afe"
-            md5sum="c7cf8478edff3f1342e5f664b347c13c">
+            hash="sha256:351ca0211ca000234527a503585f039f985607ec9439e34b49d8b8bbf35a7e6b">
     </branch>
-    <dependencies>
-      <dep package="glib"/>
-    </dependencies>
-  </autotools>
+  </meson>
 
   <autotools id="elementary" autogen-sh="configure"
              autogenargs="--enable-ecore-x --enable-egl --enable-i-really-know-what-i-am-doing-and-that-this-will-probably-break-things-and-i-will-fix-them-myself-and-send-patches-abb">