Removed spec file for old targets and updated compatibility options for build 01/51701/2
authorTom Robinson <tom.robinson@samsung.com>
Thu, 12 Nov 2015 10:45:27 +0000 (10:45 +0000)
committerTom Robinson <tom.robinson@samsung.com>
Thu, 12 Nov 2015 10:46:30 +0000 (02:46 -0800)
Change-Id: I3615d7741aab420d8585c64dcbf5e6851d82a017

adaptors/tizen/adaptor-impl-tizen.cpp
adaptors/tizen/framework-tizen.cpp
build/tizen/configure.ac
packaging/dali-adaptor-mobile.spec [deleted file]
packaging/dali-adaptor.spec

index ff2468e..4501365 100644 (file)
@@ -19,7 +19,7 @@
 #include <adaptor-impl.h>
 
 // EXTERNAL INCLUDES
-#ifdef OVER_TIZEN_SDK_2_2
+#ifndef TIZEN_SDK_2_2_COMPATIBILITY
 #include <app.h>
 #endif
 
@@ -34,14 +34,19 @@ namespace Adaptor
 
 void Adaptor::GetDataStoragePath( std::string& path)
 {
+#ifdef TIZEN_SDK_2_2_COMPATIBILITY
   path = "";
-#ifdef OVER_TIZEN_SDK_2_2
+#else
   char *pathInt = app_get_data_path();
   if ( pathInt )
   {
     path = pathInt;
     free( pathInt );
   }
+  else
+  {
+    path = "";
+  }
 #endif
 }
 
index 12b97cb..3ef3fa2 100644 (file)
 #include <bundle.h>
 #include <Ecore.h>
 
-#ifdef OVER_TIZEN_SDK_2_2
+#ifndef TIZEN_SDK_2_2_COMPATIBILITY
 #include <system_info.h>
 #include <app_control_internal.h>
-// To be removed when 2.2 is no longer supported.
-#ifndef TIZEN_2_2_COMPATIBILITY
 #include <bundle_internal.h>
 #endif
-#endif
 
 #include <dali/integration-api/debug.h>
 
@@ -82,7 +79,8 @@ struct Framework::Impl
     mEventCallback.terminate = AppTerminate;
     mEventCallback.pause = AppPause;
     mEventCallback.resume = AppResume;
-#ifndef OVER_TIZEN_SDK_2_2
+
+#ifdef TIZEN_SDK_2_2_COMPATIBILITY
     mEventCallback.service = AppService;
 
     mEventCallback.low_memory = NULL;
@@ -99,7 +97,6 @@ struct Framework::Impl
     ui_app_add_event_handler(&handlers[APP_EVENT_DEVICE_ORIENTATION_CHANGED], APP_EVENT_DEVICE_ORIENTATION_CHANGED, AppDeviceRotated, data);
     ui_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, AppLanguageChanged, data);
     ui_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, AppRegionChanged, data);
-
 #endif
 
     mCallbackManager = CallbackManager::New();
@@ -120,7 +117,7 @@ struct Framework::Impl
   CallbackBase* mAbortCallBack;
   CallbackManager *mCallbackManager;
 
-#ifndef OVER_TIZEN_SDK_2_2
+#ifdef TIZEN_SDK_2_2_COMPATIBILITY
   app_event_callback_s mEventCallback;
 #else
   ui_app_lifecycle_callback_s mEventCallback;
@@ -181,7 +178,7 @@ struct Framework::Impl
     }
   }
 
-#ifndef OVER_TIZEN_SDK_2_2
+#ifdef TIZEN_SDK_2_2_COMPATIBILITY
   /**
    * Called by AppCore when the application is launched from another module (e.g. homescreen).
    * @param[in] b the bundle data which the launcher module sent
@@ -211,9 +208,7 @@ struct Framework::Impl
   {
     static_cast<Framework*>(user_data)->AppStatusHandler(APP_DEVICE_ROTATED, NULL);
   }
-
 #else
-
   /**
    * Called by AppCore when the application is launched from another module (e.g. homescreen).
    * @param[in] b the bundle data which the launcher module sent
@@ -258,7 +253,6 @@ struct Framework::Impl
   {
     static_cast<Framework*>(user_data)->AppStatusHandler(APP_MEMORY_LOW, NULL);
   }
-
 #endif
 
 private:
@@ -281,7 +275,7 @@ Framework::Framework( Framework::Observer& observer, int *argc, char ***argv )
   mImpl(NULL)
 {
 
-#ifdef OVER_TIZEN_SDK_2_2
+#ifndef TIZEN_SDK_2_2_COMPATIBILITY
   bool featureFlag = true;
   system_info_get_platform_bool( "tizen.org/feature/opengles.version.2_0", &featureFlag );
 
@@ -310,9 +304,8 @@ void Framework::Run()
 {
   mRunning = true;
 
-#ifndef OVER_TIZEN_SDK_2_2
+#ifdef TIZEN_SDK_2_2_COMPATIBILITY
   app_efl_main(mArgc, mArgv, &mImpl->mEventCallback, this);
-
 #else
   int ret = ui_app_main(*mArgc, *mArgv, &mImpl->mEventCallback, this);
   if (ret != APP_ERROR_NONE)
@@ -326,7 +319,7 @@ void Framework::Run()
 
 void Framework::Quit()
 {
-#ifndef OVER_TIZEN_SDK_2_2
+#ifdef TIZEN_SDK_2_2_COMPATIBILITY
   app_efl_exit();
 #else
   ui_app_exit();
index 07c02ee..fbd863c 100644 (file)
@@ -155,12 +155,12 @@ else
   AC_MSG_NOTICE("build for node_js == no");
 fi
 
-
-AC_ARG_WITH([over-tizen_2_2],
-            [AC_HELP_STRING([--with-over-tizen_2_2],
-                            [Use tizen API over ver. 2.2])],
-            [with_over_tizen_2_2=yes],
-            [with_over_tizen_2_2=no])
+# Option to allow building with Tizen SDK 2.2
+AC_ARG_WITH([tizen-2-2-compatibility],
+            [AC_HELP_STRING([--with-tizen-2-2-compatibility],
+                            [Use Tizen SDK 2.2 compatibility])],
+            [with_tizen_2_2_compatibility=$withval],
+            [with_tizen_2_2_compatibility=no])
 
 # Tizen Profile options
 AC_ARG_ENABLE([profile],
@@ -169,13 +169,6 @@ AC_ARG_ENABLE([profile],
               [enable_profile=$enableval],
               [enable_profile=COMMON])
 
-# This allows building for tizen 2.2 devices.
-AC_ARG_WITH([tizen_2_2_compatibility],
-            [AC_HELP_STRING)[--with-tizen_2_2_compatibility],
-                            [Allow building for tizen 2.2 devices])],
-            [with_tizen_2_2_compatibility=yes],
-            [with_tizen_2_2_compatibility=no])
-
 # Ensure valid profile selected
 if test "x$enable_profile" != "xCOMMON" -a "x$enable_profile" != "xMOBILE" -a "x$enable_profile" != "xWEARABLE" -a "x$enable_profile" != "xTV" -a "x$enable_profile" != "xUBUNTU"; then
   AC_MSG_ERROR([$enable_profile is an invalid profile])
@@ -206,13 +199,8 @@ PKG_CHECK_MODULES(OPENGLES20, glesv2 egl)
 fi
 
 if test "x$enable_profile" = "xMOBILE"; then
-  # Allow building for 2.2 tizen devices.
-  if test "x$with_tizen_2_2_compatibility" = "xyes"; then
-    PKG_CHECK_MODULES(OPENGLES20, glesv2 egl)
-  else
-    PKG_CHECK_MODULES(OPENGLES20, gles20)
-  fi
-  enable_assimp=no
+PKG_CHECK_MODULES(OPENGLES20, gles20)
+enable_assimp=no
 fi
 
 if test "x$enable_profile" = "xLITE"; then
@@ -237,7 +225,7 @@ PKG_CHECK_MODULES(TTS, tts)
 PKG_CHECK_MODULES(VCONF, vconf)
 PKG_CHECK_MODULES(CAPI_SYSTEM_SYSTEM_SETTINGS, capi-system-system-settings)
 
-if test "x$with_over_tizen_2_2" = "xyes"; then
+if test "x$with_tizen_sdk_2_2_compatibility" = "xno"; then
 PKG_CHECK_MODULES(CAPI_SYSTEM_INFO, capi-system-info)
 fi
 
@@ -330,14 +318,13 @@ Configuration
   Profile:                          $enable_profile
   Data Dir (Read/Write):            $dataReadWriteDir
   Data Dir (Read Only):             $dataReadOnlyDir
-  OVERTIZEN2.2:                     $with_over_tizen_2_2
+  Tizen SDK 2.2 compatibility:      $with_tizen_2_2_compatibility
   EldBus:                           $eldbus_available
   Shader Binary Cache:              $enable_shaderbincache
   Build for Node.JS (LibUV)         $build_for_node_js
   Ecore Version At Least 1.13.0     $ecore_imf_1_13
   Network logging enabled:          $enable_networklogging
   Font config file:                 $fontConfigurationFile
-  Tizen 2.2 compatibility:          $with_tizen_2_2_compatibility
 "
 # optional output of node.js source path if we're building for node.js
 if test "x$build_for_node_js" != "xno"; then
diff --git a/packaging/dali-adaptor-mobile.spec b/packaging/dali-adaptor-mobile.spec
deleted file mode 100644 (file)
index a68794a..0000000
+++ /dev/null
@@ -1,297 +0,0 @@
-Name:       dali-adaptor
-Summary:    The DALi Tizen Adaptor
-Version:    1.1.9
-Release:    1
-Group:      System/Libraries
-License:    Apache-2.0
-URL:        https://review.tizen.org/git/?p=platform/core/uifw/dali-adaptor.git;a=summary
-Source0:    %{name}-%{version}.tar.gz
-
-%define dali_profile MOBILE
-%define dali_mobile_profile 1
-%define dali_feedback_plugin 0
-%define dali_bullet_plugin 0
-%define dali_assimp_plugin 0
-%define over_tizen_2_2 1
-
-%if 0%{?over_tizen_2_2}
-%define shaderbincache_flag ENABLE
-%endif
-
-Requires(post): /sbin/ldconfig
-Requires(postun): /sbin/ldconfig
-Requires:       giflib
-BuildRequires:  pkgconfig
-BuildRequires:  gawk
-BuildRequires:  pkgconfig(sensor)
-BuildRequires:  pkgconfig(aul)
-BuildRequires:  giflib-devel
-BuildRequires:  pkgconfig(xi)
-BuildRequires:  pkgconfig(fontconfig)
-BuildRequires:  pkgconfig(elementary)
-BuildRequires:  pkgconfig(capi-appfw-application)
-BuildRequires:  libjpeg-turbo-devel
-BuildRequires:  pkgconfig(evas)
-BuildRequires:  pkgconfig(xfixes)
-BuildRequires:  pkgconfig(xdamage)
-BuildRequires:  pkgconfig(utilX)
-BuildRequires:  dali-devel
-BuildRequires:  dali-integration-devel
-BuildRequires:  pkgconfig(vconf)
-BuildRequires:  tts-devel
-BuildRequires:  pkgconfig(dlog)
-BuildRequires:  libdrm-devel
-BuildRequires:  pkgconfig(libexif)
-BuildRequires:  pkgconfig(capi-system-system-settings)
-BuildRequires:  pkgconfig(libpng)
-BuildRequires:  pkgconfig(glesv2)
-BuildRequires:  pkgconfig(efl-assist)
-BuildRequires:  libcurl-devel
-BuildRequires:  pkgconfig(harfbuzz)
-BuildRequires:  fribidi-devel
-
-%if 0%{?over_tizen_2_2}
-BuildRequires:  pkgconfig(capi-system-info)
-%endif
-
-%if 0%{?dali_assimp_plugin}
-BuildRequires:  pkgconfig(assimp)
-%endif
-
-%description
-The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
-platform abstraction and application shell
-
-##############################
-# devel
-##############################
-%package devel
-Summary:    Development components for the DALi Tizen Adaptor
-Group:      Development/Building
-Requires:   %{name} = %{version}-%{release}
-Requires:   %{name}-integration-devel = %{version}-%{release}
-
-%description devel
-Development components for the DALi Tizen Adaptor - public headers and package configs
-
-##############################
-# integration-devel
-##############################
-%package integration-devel
-Summary:    Integration development package for the Adaptor
-Group:      Development/Building
-Requires:   %{name} = %{version}-%{release}
-
-%description integration-devel
-Integration development package for the Adaptor - headers for integrating with an adaptor library.
-
-##############################
-# Dali Feedback Plugin
-##############################
-%package dali-feedback-plugin
-Summary:    Plugin to play haptic and audio feedback for Dali
-Group:      System/Libraries
-%if 0%{?dali_feedback_plugin}
-Requires:       libdeviced
-BuildRequires:  pkgconfig(mm-sound)
-BuildRequires:  pkgconfig(deviced)
-BuildRequires:  libfeedback-devel
-%endif
-
-%description dali-feedback-plugin
-Feedback plugin to play haptic and audio feedback for Dali
-
-##############################
-# Dali Dynamics/Bullet Plugin
-##############################
-%package dali-bullet-plugin
-Summary:    Plugin to provide physics
-Group:      System/Libraries
-%if 0%{?dali_bullet_plugin}
-BuildRequires:  libbullet-devel
-%endif
-
-%description dali-bullet-plugin
-Dynamics plugin to wrap the libBulletDynamics libraries
-
-##############################
-# Preparation
-##############################
-%prep
-%setup -q
-%define dali_data_rw_dir         /opt/usr/share/dali/
-%define dali_data_ro_dir         /usr/share/dali/
-%define smack_rule_dir           /etc/smack/accesses2.d/
-%define user_shader_cache_dir    %{dali_data_ro_dir}/core/shaderbin/
-%define font_preloaded_path      /usr/share/fonts/
-%define font_downloaded_path     /opt/share/fonts/
-%define font_application_path    /usr/share/app_fonts/
-%define font_configuration_file  /opt/etc/fonts/conf.avail/99-slp.conf
-%define dali_plugin_sound_files  %{dali_data_ro_dir}/plugins/sounds/
-%define dali_plugin_theme_files  %{dali_data_ro_dir}/themes/feedback-themes/
-
-%define dev_include_path %{_includedir}
-
-##############################
-# Build
-##############################
-%build
-PREFIX+="/usr"
-CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
-LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
-
-%ifarch %{arm}
-CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
-%endif
-
-%if 0%{?over_tizen_2_2}
-CFLAGS+=" -DOVER_TIZEN_SDK_2_2"
-CXXFLAGS+=" -DOVER_TIZEN_SDK_2_2"
-%endif
-
-# Allow 2.2 builds to compile when using this spec file.
-CFLAGS+=" -DTIZEN_2_2_COMPATIBILITY"
-CXXFLAGS+=" -DTIZEN_2_2_COMPATIBILITY"
-
-libtoolize --force
-cd %{_builddir}/%{name}-%{version}/build/tizen
-autoreconf --install
-DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
-DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
-FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
-FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
-FONT_APPLICATION_PATH="%{font_application_path}" ; export FONT_APPLICATION_PATH
-FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
-
-%configure --with-jpeg-turbo --enable-gles=20 --enable-shaderbincache=%{shaderbincache_flag} --enable-profile=%{dali_profile} --with-tizen_2_2_compatibility \
-%if 0%{?dali_feedback_plugin}
-           --enable-feedback \
-%endif
-%if 0%{?dali_bullet_plugin}
-           --enable-bullet \
-%endif
-%if 0%{?dali_assimp_plugin}
-           --enable-assimp \
-%endif
-%if 0%{?over_tizen_2_2}
-           --with-over-tizen_2_2 \
-%endif
-           --libdir=%{_libdir}
-
-make %{?jobs:-j%jobs}
-
-##############################
-# Installation
-##############################
-%install
-rm -rf %{buildroot}
-cd build/tizen
-%make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
-
-##############################
-# Smack
-##############################
-mkdir -p %{buildroot}%{smack_rule_dir}
-cp -f %{_builddir}/%{name}-%{version}/%{name}.rule-mobile %{buildroot}%{smack_rule_dir}/%{name}.rule
-
-# LICENSE
-mkdir -p %{buildroot}/usr/share/license
-cp -af %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}/usr/share/license/%{name}
-
-##############################
-# Upgrade order:
-# 1 - Pre Install new package
-# 2 - Install new package
-# 3 - Post install new package
-# 4 - Pre uninstall old package
-# 5 - Remove files not overwritten by new package
-# 6 - Post uninstall old package
-##############################
-
-%pre
-exit 0
-
-##############################
-#  Post Install new package
-##############################
-%post
-/sbin/ldconfig
-exit 0
-
-%if 0%{?dali_feedback_plugin}
-%post dali-feedback-plugin
-/sbin/ldconfig
-exit 0
-%endif
-
-%if 0%{?dali_bullet_plugin}
-%post dali-bullet-plugin
-/sbin/ldconfig
-exit 0
-%endif
-
-##############################
-#   Pre Uninstall old package
-##############################
-%preun
-exit 0
-
-##############################
-#   Post Uninstall old package
-##############################
-%postun
-/sbin/ldconfig
-exit 0
-
-%if 0%{?dali_feedback_plugin}
-%postun dali-feedback-plugin
-/sbin/ldconfig
-exit 0
-%endif
-
-%if 0%{?dali_bullet_plugin}
-%postun dali-bullet-plugin
-/sbin/ldconfig
-exit 0
-%endif
-
-##############################
-# Files in Binary Packages
-##############################
-
-%files
-%manifest dali-adaptor.manifest-mobile
-%defattr(-,root,root,-)
-%{smack_rule_dir}/%{name}.rule
-%{_libdir}/libdali-adap*.so*
-%defattr(-,app,app,-)
-%dir %{user_shader_cache_dir}
-%{_bindir}/*
-%{_datadir}/license/%{name}
-
-%files devel
-%defattr(-,root,root,-)
-%{dev_include_path}/dali/dali.h
-%{dev_include_path}/dali/public-api/*
-%{dev_include_path}/dali/devel-api/*
-%{dev_include_path}/dali/doc/*
-%{_libdir}/pkgconfig/dali.pc
-
-%files integration-devel
-%defattr(-,root,root,-)
-%{dev_include_path}/dali/integration-api/adaptors/*
-%{_libdir}/pkgconfig/dali-adaptor-integration.pc
-
-%if 0%{?dali_feedback_plugin}
-%files dali-feedback-plugin
-%defattr(-,root,root,-)
-%{_libdir}/libdali-feedback-plugin.so*
-%{dali_plugin_sound_files}/*
-%{dali_plugin_theme_files}/*
-%endif
-
-%if 0%{?dali_bullet_plugin}
-%files dali-bullet-plugin
-%defattr(-,root,root,-)
-%{_libdir}/libdali-bullet-plugin.so*
-%endif
index 252e49b..8190634 100644 (file)
@@ -17,28 +17,25 @@ Source0:    %{name}-%{version}.tar.gz
 %if "%{profile}" == "mobile"
 %define dali_profile MOBILE
 %define dali_feedback_plugin 0
-%define over_tizen_2_2 1
 %define shaderbincache_flag DISABLE
 %endif
 
 %if "%{profile}" == "tv"
 %define dali_profile TV
 %define dali_feedback_plugin 0
-%define over_tizen_2_2 1
 %define shaderbincache_flag ENABLE
 %endif
 
 %if "%{profile}" == "wearable"
 %define dali_profile WEARABLE
 %define dali_feedback_plugin 0
-%define over_tizen_2_2 1
 %define shaderbincache_flag DISABLE
 %endif
 
 %if "%{profile}" == "common"
 %define dali_profile COMMON
 %define dali_feedback_plugin 0
-%define over_tizen_2_2 0
+%define tizen_2_2_compatibility 1
 %define shaderbincache_flag DISABLE
 %endif
 
@@ -69,7 +66,7 @@ BuildRequires:  pkgconfig(egl)
 BuildRequires:  libcurl-devel
 
 
-%if 0%{?over_tizen_2_2}
+%if 0%{?tizen_2_2_compatibility} != 1
 BuildRequires:  pkgconfig(capi-system-info)
 %endif
 
@@ -165,9 +162,9 @@ CXXFLAGS+=" -DWAYLAND"
 configure_flags="--enable-wayland"
 %endif
 
-%if 0%{?over_tizen_2_2}
-CFLAGS+=" -DOVER_TIZEN_SDK_2_2"
-CXXFLAGS+=" -DOVER_TIZEN_SDK_2_2"
+%if 0%{?tizen_2_2_compatibility}
+CFLAGS+=" -DTIZEN_SDK_2_2_COMPATIBILITY"
+CXXFLAGS+=" -DTIZEN_SDK_2_2_COMPATIBILITY"
 %endif
 
 libtoolize --force
@@ -185,8 +182,8 @@ FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION
 %if 0%{?dali_feedback_plugin}
            --enable-feedback \
 %endif
-%if 0%{?over_tizen_2_2}
-           --with-over-tizen_2_2 \
+%if 0%{?tizen_2_2_compatibility}
+           --with-tizen-2-2-compatibility \
 %endif
            $configure_flags --libdir=%{_libdir}