This patch adds initial build system support for Tizen 3.0 for TV profile.
Due to missing, or sometimes broken multimedia support in the current repos
the current build disables support for it.
The code has been run tested on odroid board.
Change-Id: I9de86728cca255565b31972025db585831176487
Signed-off-by: Piotr Tworek <p.tworek@samsung.com>
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
# "|| :" means "or always succeeding built-in command"
PROFILE_NAME=$(echo "$@" | grep -Po "(?<=\-P\s)[^\s]*" || :)
-if [ "$PROFILE_NAME" == "" ]; then
- PROFILE_NAME=tztv_v2.2.1_prehawk
- PROFILE_FLAG="-P $PROFILE_NAME"
+TIZEN_VERSION="chromium_efl_tizen_version 2.2.1"
+if [ "$PROFILE_NAME" == "tztv_v3.0" ]; then
+ TIZEN_VERSION="chromium_efl_tizen_version 3.0"
+else
+ PROFILE_NAME="tztv_v2.2.1_prehawk"
fi
-TIZEN_VERSION="chromium_efl_tizen_version 2.2.1"
+PROFILE_FLAG="-P $PROFILE_NAME"
if [ "$USE_GLOBAL_GBS_CONF" == "" ]; then
CONF_FLAG="--conf ${SCRIPTDIR}/gbs.conf"
fi
+EXTRA_PACK_OPTS="--extra-packs python-base-x86-arm,python-x86-arm,python-xml-x86-arm"
+if [ "$PROFILE_NAME" == "tztv_v3.0" ]; then
+ EXTRA_PACK_OPTS=""
+fi
+
gbs $CONF_FLAG build $PROFILE_FLAG -A armv7l --incremental \
- --extra-packs python-base-x86-arm,python-x86-arm,python-xml-x86-arm \
+ --define 'TIZEN_PROFILE_TV 1' \
+ ${EXTRA_PACK_OPTS} \
--define "${TIZEN_VERSION}" "$@"
${SCRIPTDIR}/apply_patches.sh -r ${SCRIPTDIR}/patches
echo "Error: File:$1 Line:$2"
exit 1
}
+
+function findElementInArray() {
+ local elm
+ for elm in "${@:2}"; do
+ [[ "$elm" = "$1" ]] && return 0;
+ done
+ return 1;
+}
# which added new API (player_get_content_video_size).
# If this package will be merged, I'll change this codes
url = http://10.251.52.177/tizenrepo/tv_repo/supplement_tv_prehawk_player
+
+###############################################
+##
+## Tizen v3.0 for TV
+##
+
+[obs.tizen]
+url = https://api.tizen.org
+
+[profile.tztv_v3.0]
+obs = obs.tizen
+repos = repo.supplement, repo.tv_arm-x11
+buildroot=~/GBS-ROOT-3.0-TV
+
+# mirrored from http://download.tizen.org/snapshots/tizen/tv
+[repo.tv_arm-x11]
+url = http://10.251.52.177/tizenrepo/tv_repo/tizen-tv_v3.0/repos/arm-x11/packages
+
+[repo.supplement]
+url = http://10.251.52.177/tizenrepo/tv_repo/supplement_odroid_chromium_tizen_v3.0
trap 'error_report $0 $LINENO' ERR SIGINT SIGTERM SIGQUIT
host_arch=$(getHostArch)
+supported_targets=("mobile" "tv" "desktop")
+
if [ -z "$GYP_GENERATOR_OUTPUT" ]; then
GYP_GENERATOR_OUTPUT=${TOPDIR}/"out.${host_arch}"
fi
# Otherwise we are called by gbs whch already passes the correct building_for_* flag.
if [ "$__GYP_CHROMIUMEFL_TARGET" == "desktop" ]; then
target=desktop
-elif echo "$@" | grep -cq '\-\Dbuilding_for_tizen_mobile=1'; then
- target=mobile
- buildType=gbs
-elif echo "$@" | grep -cq '\-\Dbuilding_for_tizen_tv=1'; then
- target=tv
- buildType=gbs
+fi
+
+while [[ $# > 0 ]]; do
+ case "$1" in
+ -Dbuilding_for_tizen_*=1)
+ buildType="gbs"
+ target=$(echo $1 | sed -e 's#-Dbuilding_for_tizen_\([a-z]*\)\=1#\1#')
+ ;;
+ -Dchromium_efl_tizen_version=*)
+ tizen_version=$(echo $1 | sed -e 's#-Dchromium_efl_tizen_version\=\([0-9.]*\)#\1#')
+ ;;
+ esac
+ shift;
+done
+
+findElementInArray "$target" "${supported_targets[@]}"
+if [[ $? == 1 ]]; then
+ echo "Unsupported target: $target"
+ exit 1
fi
if [ "$__GYP_CHROMIUMEFL_TARGET" == "crosscompile" ]; then
COMMON_GYP_PARAMETERS="
-Duse_libjpeg_turbo=1
-Dproprietary_codecs=1
- -Dtizen_multimedia_support=1
-Duse_aura=0
-Duse_efl=1
-Duse_gnome_keyring=0
COMMON_GYP_PARAMETERS+="-Dchromium_efl_library_type=static_library"
fi
+# FIXME: 3.0 does not have any support for multimedia, yet
+if [ "$tizen_version" == "3.0" ]; then
+ COMMON_GYP_PARAMETERS+="-Dtizen_multimedia_support=0"
+else
+ COMMON_GYP_PARAMETERS+="-Dtizen_multimedia_support=1"
+fi
+
add_desktop_flags() {
ADDITIONAL_GYP_PARAMETERS+="-Dbuilding_for_tizen=0
-Dclang=${USE_CLANG}
{
'target_name': 'gstreamer',
'type': 'none',
+ 'variables': {
+ 'dependent_pkgs': [
+ 'glib-2.0',
+ ],
+ },
'conditions': [
- ['building_for_tizen_mobile==1', {
+ ['chromium_efl_tizen_version == "3.0"', {
'variables': {
'dependent_pkgs': [
- 'glib-2.0',
'gstreamer-1.0',
'gstreamer-base-1.0',
'gstreamer-app-1.0',
'gstreamer-video-1.0',
],
},
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags <(dependent_pkgs))',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other <(dependent_pkgs))',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l <(dependent_pkgs))',
- ],
- },
- }],
- ['building_for_tizen_tv==1 or building_for_tizen==0', {
+ },
+ { # for Tizen v2.X
'variables': {
'dependent_pkgs': [
- 'glib-2.0',
- 'gstreamer-0.10',
- 'gstreamer-base-0.10',
- 'gstreamer-app-0.10',
- 'gstreamer-pbutils-0.10',
- 'gstreamer-interfaces-0.10',
- 'gstreamer-video-0.10',
- ],
- },
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags <(dependent_pkgs))',
+ 'gstreamer-0.10',
+ 'gstreamer-base-0.10',
+ 'gstreamer-app-0.10',
+ 'gstreamer-pbutils-0.10',
+ 'gstreamer-interfaces-0.10',
+ 'gstreamer-video-0.10',
],
},
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other <(dependent_pkgs))',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l <(dependent_pkgs))',
- ],
- },
- }],
+ }]
],
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags <(dependent_pkgs))',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other <(dependent_pkgs))',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l <(dependent_pkgs))',
+ ],
+ },
},
], # targets
'capi-system-info',
'capi-system-device',
'capi-location-manager',
- 'capi-media-audio-io',
- 'capi-media-camera',
- 'capi-media-player',
'vconf',
'libtbm',
'libdri2',
'libdrm',
- 'gles20',
+ 'glesv2',
'ui-gadget-1',
'feedback',
'tts',
],
},
}],
+ ['tizen_multimedia_support==1', {
+ 'variables': {
+ 'dependent_pkgs': [
+ 'capi-media-audio-io',
+ 'capi-media-camera',
+ 'capi-media-player',
+ ],
+ },
+ }],
['building_for_tizen_tv==1 and tizen_multimedia_support==1', {
'variables': {
'dependent_pkgs': [
['exclude', 'x11_event_source_libevent\\.cc$'],
['exclude', 'x11_types\\.cc$'],
],
+ # FIXME(youngsoo): Needs to find out how Tizen v2.X works without this definition.
+ # It needed due to various std header wrappers in impl.
+ # Those headers are included directly from src code.
+ 'include_dirs': [
+ '<(chrome_src_dir)/../impl',
+ ],
'target_conditions': [
['_target_name=="content_renderer" and use_efl==1', {
'sources': [
'TIZEN_LEGACY_V_2_2_1=1',
],
}],
+ ['chromium_efl_tizen_version=="3.0"', {
+ 'defines': [
+ 'TIZEN_V_3_0=1',
+ ],
+ }],
],
'sources/': [
['exclude', 'browser/device_sensors/data_fetcher_shared_memory_default.cc$'],
BuildRequires: pkgconfig(efl-assist)
BuildRequires: pkgconfig(ttrace)
BuildRequires: pkgconfig(capi-network-connection)
-BuildRequires: pkgconfig(capi-system-sensor)
-BuildRequires: pkgconfig(gstreamer-1.0)
-BuildRequires: pkgconfig(gstreamer-plugins-base-1.0)
-BuildRequires: pkgconfig(gstreamer-app-1.0)
%else # TIZEN_PROFILE_TV
BuildRequires: pkgconfig(audio-session-mgr)
BuildRequires: pkgconfig(mm-session)
+%endif
+%if "%{?chromium_efl_tizen_version:%{chromium_efl_tizen_version}}%{!?chromium_efl_tizen_version:0}" == "3.0"
+BuildRequires: pkgconfig(gstreamer-1.0)
+BuildRequires: pkgconfig(gstreamer-plugins-base-1.0)
+BuildRequires: pkgconfig(gstreamer-app-1.0)
+%else # for Tizen v2.X
BuildRequires: pkgconfig(gstreamer-0.10)
BuildRequires: pkgconfig(gstreamer-plugins-base-0.10)
BuildRequires: pkgconfig(gstreamer-app-0.10)