Change of plugins build and fix of efl-assist build issue 48/33148/8
authortaeyoon <taeyoon0.lee@samsung.com>
Tue, 6 Jan 2015 08:48:05 +0000 (17:48 +0900)
committertaeyoon <taeyoon0.lee@samsung.com>
Tue, 27 Jan 2015 08:04:58 +0000 (17:04 +0900)
  - Removal plugins build dependency on profiles (COMMON, MOBILE, ...)
  - Plugins build just by '%define [plugin_name] 1' in spec file
  - Fix build issue by efl-assist include file

Change-Id: Iaa84885464540bfc6b29bedd4ed9e3be511f0dcb

build/tizen/Makefile.am
build/tizen/adaptor/Makefile.am
build/tizen/configure.ac
build/tizen/plugins/Makefile.am
packaging/dali-adaptor-mobile.spec
packaging/dali-adaptor-tv.spec
packaging/dali-adaptor-wearable.spec
packaging/dali-adaptor.spec

index b784654..d740d96 100644 (file)
 
 SUBDIRS = adaptor
 
-if ! LITE_PROFILE
-if ! WEARABLE_PROFILE
-if ! UBUNTU_PROFILE
+if USE_PLUGIN
 SUBDIRS += plugins
 endif
-endif
-endif
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = dali.pc
index d029920..7b1bbc1 100644 (file)
@@ -145,14 +145,12 @@ adaptor_internal_src_files = $(adaptor_common_internal_src_files) \
 endif
 
 # Feedback Plugin
-if ! LITE_PROFILE
-if ! WEARABLE_PROFILE
+if USE_FEEDBACK
 plugin_themes_dir = ../../../adaptors/common/feedback
 dali_plugin_theme_files = $(plugin_themes_dir)/default-feedback-theme.json
 dalifeedbackthemedir = ${dataReadOnlyDir}/themes/feedback-themes/
 dalifeedbacktheme_DATA = ${dali_plugin_theme_files}
 endif
-endif
 
 if TURBO_JPEG_IS_ON
   slp_platform_abstraction_src_files += $(slp_turbo_jpeg_loader)
@@ -292,7 +290,9 @@ libdali_adaptor_la_CXXFLAGS += $(HAPTIC_CFLAGS)
 endif
 
 if WEARABLE_PROFILE
-libdali_adaptor_la_CXXFLAGS += $(HAPTIC_CFLAGS)
+libdali_adaptor_la_CXXFLAGS += \
+                      $(HAPTIC_CFLAGS) \
+                      $(EFL_ASSIST_CFLAGS)
 endif
 
 if TV_PROFILE
index 3356b03..3e89258 100644 (file)
@@ -59,7 +59,22 @@ PKG_CHECK_EXISTS(bullet, [
 
 AC_SUBST(BULLET_CFLAGS)
 AC_SUBST(BULLET_LIBS)
-AM_CONDITIONAL([USE_BULLET], [test x$BULLET = xyes])
+
+AC_ARG_ENABLE([bullet],
+              [AC_HELP_STRING([ --enable-bullet],
+                              [Enable bullet plugin])],
+              [enable_bullet=yes],
+              [enable_bullet=no])
+
+
+AC_ARG_ENABLE([feedback],
+              [AC_HELP_STRING([ --enable-feedback],
+                              [Enable feedback plugin])],
+              [enable_feedback=yes],
+              [enable_feedback=no])
+
+AM_CONDITIONAL([USE_BULLET], [test x$BULLET = xyes && test x$enable_bullet = xyes])
+AM_CONDITIONAL([USE_FEEDBACK], [test x$enable_feedback = xyes])
 
 DALI_ADAPTOR_CFLAGS=-DPLATFORM_SLP
 
@@ -138,13 +153,10 @@ AM_CONDITIONAL([WAYLAND], [test x$enable_wayland = xyes])
 
 if test "x$enable_profile" = "xCOMMON"; then
 PKG_CHECK_MODULES(OPENGLES20, glesv2 egl)
-PKG_CHECK_MODULES(HAPTIC, haptic)
 fi
 
 if test "x$enable_profile" = "xMOBILE"; then
 PKG_CHECK_MODULES(OPENGLES20, opengl-es-20)
-PKG_CHECK_MODULES(DEVICED, deviced)
-enable_assimp=yes
 fi
 
 if test "x$enable_profile" = "xLITE"; then
@@ -157,7 +169,6 @@ fi
 
 if test "x$enable_profile" = "xTV"; then
 PKG_CHECK_MODULES(OPENGLES20, gles20)
-PKG_CHECK_MODULES(HAPTIC, haptic)
 fi
 
 if test "x$enable_profile" = "xUBUNTU"; then
@@ -165,19 +176,16 @@ PKG_CHECK_MODULES(OPENGLES20, glesv2 egl)
 else
 PKG_CHECK_MODULES(CAPI_APPFW_APPLICATION, capi-appfw-application)
 PKG_CHECK_MODULES(DLOG, dlog)
-PKG_CHECK_MODULES(FEEDBACK, feedback)
-PKG_CHECK_MODULES(MMFSOUND, mm-sound)
 PKG_CHECK_MODULES(SENSOR, sensor)
 PKG_CHECK_MODULES(TTS, tts)
 PKG_CHECK_MODULES(VCONF, vconf)
 PKG_CHECK_MODULES(CAPI_SYSTEM_SYSTEM_SETTINGS, capi-system-system-settings)
+fi
 
 if test "x$enable_profile" != "xTV"; then
 PKG_CHECK_MODULES(EFL_ASSIST, efl-assist)
 fi
 
-fi
-
 if test "x$enable_wayland" = "xyes"; then
 PKG_CHECK_MODULES(WAYLAND, [ecore-wayland egl wayland-egl wayland-client >= 1.2.0 xkbcommon],
                   [DALI_HAS_ECOREWL=yes],
@@ -191,6 +199,20 @@ PKG_CHECK_MODULES(X11, [x11],
                   [DALI_HAS_X11=no])
 fi
 
+if test "x$enable_feedback" = "xyes"; then
+
+if test "x$enable_profile" = "xCOMMON" || test "x$enable_profile" = "xTV"; then
+PKG_CHECK_MODULES(HAPTIC, haptic)
+fi
+
+if test "x$enable_profile" = "xMOBILE"; then
+PKG_CHECK_MODULES(DEVICED, deviced)
+fi
+
+PKG_CHECK_MODULES(FEEDBACK, feedback)
+PKG_CHECK_MODULES(MMFSOUND, mm-sound)
+fi
+
 if test "x$enable_assimp" = "xyes" ; then
   PKG_CHECK_MODULES(ASSIMP, assimp)
   ASSIMP_CFLAGS+=-DASSIMP_ENABLED
@@ -199,7 +221,6 @@ fi
 # Don't move this - it depends on the platform defaults above
 AM_CONDITIONAL([ASSIMP_ENABLED], [test x$enable_assimp = xyes])
 
-
 if test x$DALI_DATA_RW_DIR != x; then
   dataReadWriteDir=$DALI_DATA_RW_DIR
 else
@@ -254,7 +275,9 @@ AC_CONFIG_FILES([
  dali.pc
 ])
 
-if test "x$enable_profile" != "xLITE"; then
+AM_CONDITIONAL([USE_PLUGIN], [test x$enable_feedback = xyes || test x$enable_bullet = xyes])
+
+if test "x$enable_feedback" = "xyes" || test "x$enable_bullet" = "xyes"; then
 AC_CONFIG_FILES([
  plugins/Makefile
 ])
index cb4f2fe..1e5a561 100644 (file)
@@ -23,12 +23,17 @@ include ../../../plugins/file.list
 
 plugin_sounds_dir = ../../../plugins/sounds
 
-lib_LTLIBRARIES = libdali-feedback-plugin.la
+lib_LTLIBRARIES =
+
+if USE_FEEDBACK
+lib_LTLIBRARIES += libdali-feedback-plugin.la
+endif
 
 if USE_BULLET
 lib_LTLIBRARIES += libdali-bullet-plugin.la
 endif
 
+if USE_FEEDBACK
 dalisounddir = ${dataReadOnlyDir}/plugins/sounds/
 dalisound_DATA = ${dali_plugin_sound_files}
 
@@ -83,6 +88,9 @@ endif
 libdali_feedback_plugin_la_LIBADD += \
                       $(FEEDBACK_LIBS)
 
+endif
+
+if USE_BULLET
 
 # Bullet Physics
 libdali_bullet_plugin_la_SOURCES = \
@@ -103,3 +111,4 @@ libdali_bullet_plugin_la_LDFLAGS = \
                       -rdynamic
 
 libdali_bullet_plugin_la_DEPENDENCIES =
+endif
index 3f3ab94..1cf229c 100644 (file)
@@ -9,9 +9,9 @@ Source0:    %{name}-%{version}.tar.gz
 
 %define dali_profile MOBILE
 %define dali_mobile_profile 1
-%define dali_feedback_plugin 1
-%define dali_bullet_plugin 1
-%define dali_assimp_plugin 1
+%define dali_feedback_plugin 0
+%define dali_bullet_plugin 0
+%define dali_assimp_plugin 0
 
 Requires(post): /sbin/ldconfig
 Requires(postun): /sbin/ldconfig
@@ -44,7 +44,10 @@ BuildRequires:  pkgconfig(capi-system-system-settings)
 BuildRequires:  pkgconfig(libpng)
 BuildRequires:  pkgconfig(opengl-es-20)
 BuildRequires:  pkgconfig(efl-assist)
+
+%if 0%{?dali_assimp_plugin}
 BuildRequires:  pkgconfig(assimp)
+%endif
 
 %description
 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
@@ -67,10 +70,12 @@ Development components for the DALi Tizen Adaptor - public headers and package c
 %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
@@ -81,7 +86,9 @@ Feedback plugin to play haptic and audio feedback for Dali
 %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
@@ -126,7 +133,17 @@ 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-profile=%{dali_profile} --libdir=%{_libdir}
+%configure --with-jpeg-turbo --enable-gles=20 --enable-profile=%{dali_profile} \
+%if 0%{?dali_feedback_plugin}
+           --enable-feedback \
+%endif
+%if 0%{?dali_bullet_plugin}
+           --enable-bullet \
+%endif
+%if 0%{?dali_assimp_plugin}
+           --enable-assimp \
+%endif
+           --libdir=%{_libdir}
 
 make %{?jobs:-j%jobs}
 
index 37fd49e..a182c60 100644 (file)
@@ -7,6 +7,10 @@ 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_feedback_plugin 0
+%define dali_bullet_plugin 0
+%define dali_assimp_plugin 0
+
 Requires(post): /sbin/ldconfig
 Requires(postun): /sbin/ldconfig
 Requires:       boost-thread
@@ -38,6 +42,10 @@ BuildRequires:  pkgconfig(xdamage)
 BuildRequires:  pkgconfig(utilX)
 BuildRequires:  pkgconfig(gles20)
 
+%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
@@ -59,10 +67,12 @@ Development components for the DALi Tizen Adaptor - public headers and package c
 %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(haptic)
 BuildRequires:  libfeedback-devel
+%endif
 
 %description dali-feedback-plugin
 Feedback plugin to play haptic and audio feedback for Dali
@@ -73,7 +83,9 @@ Feedback plugin to play haptic and audio feedback for Dali
 %package dali-bullet-plugin
 Summary:    Plugin to provide physics
 Group:      System/Libraries
+%if 0%{?dali_bullet_plugin}
 BuildRequires:  pkgconfig(bullet)
+%endif
 
 %description dali-bullet-plugin
 Dynamics plugin to wrap the libBulletDynamics libraries
@@ -118,7 +130,17 @@ 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-profile=TV --libdir=%{_libdir}
+%configure --with-jpeg-turbo --enable-gles=20 --enable-profile=TV \
+%if 0%{?dali_feedback_plugin}
+           --enable-feedback \
+%endif
+%if 0%{?dali_bullet_plugin}
+           --enable-bullet \
+%endif
+%if 0%{?dali_assimp_plugin}
+           --enable-assimp \
+%endif
+           --libdir=%{_libdir}
 
 make %{?jobs:-j%jobs}
 
@@ -158,13 +180,17 @@ chown 5000:5000 %{user_font_cache_dir}
 chown 5000:5000 %{user_shader_cache_dir}
 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
@@ -181,13 +207,17 @@ exit 0
 /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
 
 
 ##############################
@@ -209,12 +239,16 @@ exit 0
 %{dev_include_path}/dali/*
 %{_libdir}/pkgconfig/dali*.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 72f34df..fcc7b1c 100644 (file)
@@ -9,6 +9,8 @@ Source0:    %{name}-%{version}.tar.gz
 
 %define dali_profile WEARABLE
 %define dali_wearable_profile 1
+%define dali_feedback_plugin 0
+%define dali_assimp_plugin 0
 
 Requires(post): /sbin/ldconfig
 Requires(postun): /sbin/ldconfig
@@ -42,6 +44,10 @@ BuildRequires:  pkgconfig(libpng)
 BuildRequires:  pkgconfig(gles20)
 BuildRequires:  pkgconfig(efl-assist)
 
+%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
@@ -63,10 +69,12 @@ Development components for the DALi Tizen Adaptor - public headers and package c
 %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
@@ -111,7 +119,14 @@ 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-profile=%{dali_profile} --libdir=%{_libdir}
+%configure --with-jpeg-turbo --enable-gles=20 --enable-profile=%{dali_profile} \
+%if 0%{?dali_feedback_plugin}
+           --enable-feedback \
+%endif
+%if 0%{?dali_assimp_plugin}
+           --enable-assimp \
+%endif
+           --libdir=%{_libdir}
 
 make %{?jobs:-j%jobs}
 
index 62850e9..6334ba9 100644 (file)
@@ -9,6 +9,10 @@ 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_feedback_plugin 0
+%define dali_bullet_plugin 0
+%define dali_assimp_plugin 0
+
 Requires(post): /sbin/ldconfig
 Requires(postun): /sbin/ldconfig
 Requires:       boost-thread
@@ -49,6 +53,10 @@ BuildRequires:  pkgconfig(utilX)
 BuildRequires:  pkgconfig(gles20)
 %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
@@ -70,10 +78,12 @@ Development components for the DALi Tizen Adaptor - public headers and package c
 %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(haptic)
 BuildRequires:  libfeedback-devel
+%endif
 
 %description dali-feedback-plugin
 Feedback plugin to play haptic and audio feedback for Dali
@@ -84,7 +94,9 @@ Feedback plugin to play haptic and audio feedback for Dali
 %package dali-bullet-plugin
 Summary:    Plugin to provide physics
 Group:      System/Libraries
+%if 0%{?dali_bullet_plugin}
 BuildRequires:  pkgconfig(bullet)
+%endif
 
 %description dali-bullet-plugin
 Dynamics plugin to wrap the libBulletDynamics libraries
@@ -127,7 +139,19 @@ configure_flags="--enable-wayland"
 
 libtoolize --force
 cd %{_builddir}/%{name}-%{version}/build/tizen && autoreconf --install
-cd %{_builddir}/%{name}-%{version}/build/tizen && CXXFLAGS=$CXXFLAGS LDFLAGS=$LDFLAGS DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}" FONT_PRELOADED_PATH="%{font_preloaded_path}" FONT_DOWNLOADED_PATH="%{font_downloaded_path}" FONT_APPLICATION_PATH="%{font_application_path}" FONT_CONFIGURATION_FILE="%{font_configuration_file}" %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=20 --enable-profile=COMMON $configure_flags --libdir=%{_libdir}
+cd %{_builddir}/%{name}-%{version}/build/tizen && CXXFLAGS=$CXXFLAGS LDFLAGS=$LDFLAGS DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}" FONT_PRELOADED_PATH="%{font_preloaded_path}" FONT_DOWNLOADED_PATH="%{font_downloaded_path}" FONT_APPLICATION_PATH="%{font_application_path}" FONT_CONFIGURATION_FILE="%{font_configuration_file}"
+
+%configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=20 --enable-profile=COMMON \
+%if 0%{?dali_feedback_plugin}
+           --enable-feedback \
+%endif
+%if 0%{?dali_bullet_plugin}
+           --enable-bullet \
+%endif
+%if 0%{?dali_assimp_plugin}
+           --enable-assimp \
+%endif
+           $configure_flags --libdir=%{_libdir}
 
 make %{?jobs:-j%jobs}
 
@@ -167,13 +191,17 @@ chown 5000:5000 %{user_font_cache_dir}
 chown 5000:5000 %{user_shader_cache_dir}
 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
@@ -190,14 +218,17 @@ exit 0
 /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
@@ -218,12 +249,16 @@ exit 0
 %{dev_include_path}/dali/*
 %{_libdir}/pkgconfig/dali*.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