Merge remote-tracking branch 'remotes/rsa/tizen_2.2' into tizen accepted/tizen/20131002.084327 accepted/tizen/20131002.170302 submit/tizen/20131002.075618
authorSoo-Hyun Choi <s.choi@hackerslab.eu>
Sun, 29 Sep 2013 07:51:25 +0000 (16:51 +0900)
committerSoo-Hyun Choi <s.choi@hackerslab.eu>
Sun, 29 Sep 2013 07:51:25 +0000 (16:51 +0900)
[Note] Rebase wrt-plugins-common

Conflicts:
CMakeLists.txt
packaging/wrt-plugins-common.spec
src/dispatch-event/dispatch_event_support.cpp
src/dispatch-event/dispatch_event_support.h
src/js-overlay/js_function_manager.cpp
src/plugin-loading/explorer.cpp
src/plugin-loading/plugin_container_support.cpp
src/plugin-loading/plugin_logic.cpp
src/plugins-ipc-message/ipc_message_support.cpp
src/plugins-ipc-message/ipc_message_support.h
src/standards/W3C/Widget/JSPreferences.cpp
src/standards/W3C/Widget/JSWidget.cpp
src/standards/W3C/Widget/plugin_initializer.cpp

Change-Id: I3bdd5d14c3e48bee7431523c93048a31d4244139

29 files changed:
CMakeLists.txt
packaging/wrt-plugins-common.changes [new file with mode: 0644]
packaging/wrt-plugins-common.manifest [new file with mode: 0644]
packaging/wrt-plugins-common.spec
pkgconfigs/wrt-plugin-loading.pc.in
pkgconfigs/wrt-plugins-api-support.pc.in
pkgconfigs/wrt-plugins-commons-javascript.pc.in
pkgconfigs/wrt-plugins-commons.pc.in
pkgconfigs/wrt-plugins-filesystem.pc.in
pkgconfigs/wrt-plugins-ipc-message.pc.in
pkgconfigs/wrt-plugins-plugin-manager.pc.in
pkgconfigs/wrt-plugins-widget-interface.pc.in
pkgconfigs/wrt-plugins-widgetdb.pc.in
pkgconfigs/wrt-popup-ace-runner.pc.in
pkgconfigs/wrt-popup-runner.pc.in
pkgconfigs/wrt-popup-wrt-runner.pc.in
src/CommonsJavaScript/Converter.cpp
src/CommonsJavaScript/Converter.h
src/dispatch-event/dispatch_event_support.cpp
src/plugin-loading/CMakeLists.txt
src/plugins-api-support/CMakeLists.txt
src/plugins-ipc-message/CMakeLists.txt
src/standards/W3C/Widget/CMakeLists.txt
src/wrt-popup/ace/popup-runner/CMakeLists.txt
src/wrt-popup/wrt/popup-bin/renderer/popup.h
src/wrt-popup/wrt/popup-bin/renderer/popup_renderer.cpp
src/wrt-popup/wrt/popup-runner/CMakeLists.txt
wrt-plugins-common.conf.in [new file with mode: 0644]
wrt-plugins-common.manifest [deleted file]

index dd78270..d88f711 100644 (file)
@@ -25,6 +25,7 @@ STRING(REGEX MATCH "([^.]*)" CMAKE_PROJECT_API_VERSION "${CMAKE_PROJECT_VERSION}
 include(FindPkgConfig)
 
 pkg_search_module(dpl REQUIRED dpl-efl>=0.2.21)
+pkg_search_module(wrt-commons-custom-handler-dao-ro REQUIRED wrt-commons-custom-handler-dao-ro)
 
 include_directories(
   ${dpl_INCLUDE_DIRS}
@@ -65,7 +66,8 @@ ELSE(DPL_LOG AND NOT CMAKE_BUILD_TYPE MATCHES "profiling")
 ENDIF(DPL_LOG AND NOT CMAKE_BUILD_TYPE MATCHES "profiling")
 
 MESSAGE(STATUS "WITH_TESTS: " ${WITH_TESTS})
-
+MESSAGE( "wrt-commons-custom-handler-dao-ro_CFLAGS_OTHER :  ${wrt-commons-custom-handler-dao-ro_CFLAGS_OTHER}")
+ADD_DEFINITIONS("${wrt-commons-custom-handler-dao-ro_CFLAGS_OTHER}")
 ADD_DEFINITIONS("-fPIC")
 ADD_DEFINITIONS("-fvisibility=default")         # mark all exported symbols as visible
 ADD_DEFINITIONS("-fPIC")                        # If supported for the target machine, emit position-independent code, suitable for dynamic linking and avoiding
@@ -78,6 +80,8 @@ ADD_DEFINITIONS("-Wno-deprecated")
 # GCC 4.7 changes the scheme of name lookup. Guide: http://gcc.gnu.org/gcc-4.7/porting_to.html
 ADD_DEFINITIONS("-fpermissive")
 
+ADD_DEFINITIONS("-DLIBDIR_PREFIX=\"${LIB_INSTALL_DIR}\"")
+
 ##############################################################################
 # CMake flags
 IF (DEVPKG)
@@ -90,7 +94,7 @@ ENDIF(DEVPKG)
 set(CONFIG_FILE_NAME "config.cmake")
 set(LIBS_COMMONS ${dpl_LDFLAGS} )
 
-set(DESTINATION_LIB_PREFIX lib)
+set(DESTINATION_LIB_PREFIX ${LIB_INSTALL_DIR})
 set(DESTINATION_HEADER_PREFIX include/${PROJECT_NAME})
 
 set(DESTINATION_HEADERS_NON_JS ${DESTINATION_HEADER_PREFIX}/Commons)
@@ -138,7 +142,7 @@ set(PKGCONFIG_DIR ${PROJECT_SOURCE_DIR}/pkgconfigs)
 macro(configure_and_install_pkg PKG_FILE)
     CONFIGURE_FILE(${PKGCONFIG_DIR}/${PKG_FILE}.in
                ${PKGCONFIG_DIR}/${PKG_FILE} @ONLY)
-    INSTALL(FILES ${PKGCONFIG_DIR}/${PKG_FILE} DESTINATION lib/pkgconfig)
+    INSTALL(FILES ${PKGCONFIG_DIR}/${PKG_FILE} DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
 endmacro(configure_and_install_pkg)
 
 configure_and_install_pkg(wrt-plugins-commons-javascript.pc)
@@ -157,6 +161,14 @@ configure_and_install_pkg(wrt-plugins-ipc-message.pc)
 configure_and_install_pkg(wrt-dispatch-event.pc)
 
 ################################################################################
+# ld configuration file
+
+CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/${PACKAGE_NAME}.conf.in
+               ${PROJECT_SOURCE_DIR}/${PACKAGE_NAME}.conf @ONLY)
+INSTALL(FILES ${PROJECT_SOURCE_DIR}/${PACKAGE_NAME}.conf DESTINATION /etc/ld.so.conf.d/)
+
+
+################################################################################
 # Cache
 
 set(PLATFORM "${PLATFORM}" CACHE STRING "Target platform" FORCE)
diff --git a/packaging/wrt-plugins-common.changes b/packaging/wrt-plugins-common.changes
new file mode 100644 (file)
index 0000000..619d52b
--- /dev/null
@@ -0,0 +1,13 @@
+* Mon Jul 01 2013 Baptiste DURAND <baptiste.durand@eurogiciel.fr> accepted/tizen/20130530.164848@06ce175
+- Clean Post section, add ld conf file.
+
+* Wed May 29 2013 Baptiste DURAND <baptiste.durand@eurogiciel.fr> accepted/tizen/20130524.043756@f5a6e99
+- Fix plugins load failure during plugins installation
+- Fix build error
+- Remove harcoded library path , change some variable type
+
+* Thu May 23 2013 Rusty Lynch <rusty.lynch@intel.com> accepted/tizen/20130522.164603@f814425
+- Add LIBDIR_PREFIX definition
+
+* Tue May 21 2013 Rusty Lynch <rusty.lynch@intel.com> submit/tizen/20130517.045654@b1b8621
+- Fix rpmlint errors
diff --git a/packaging/wrt-plugins-common.manifest b/packaging/wrt-plugins-common.manifest
new file mode 100644 (file)
index 0000000..017d22d
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+    <domain name="_"/>
+ </request>
+</manifest>
index 2346b85..0ccceb3 100644 (file)
@@ -1,12 +1,12 @@
-#git:framework/web/wrt-plugins-common
 Name:       wrt-plugins-common
-Summary:    wrt-plugins common library
+Summary:    WebRuntime common library
 Version:    0.3.112
 Release:    1
 Group:      Development/Libraries
-License:    Apache License, Version 2.0
+License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
-
+Source1001:    wrt-plugins-common.manifest
+URL:        https://review.tizen.org/git/?p=platform/framework/web/wrt-plugins-common.git;a=summary
 BuildRequires: cmake
 BuildRequires: pkgconfig(dpl-efl)
 BuildRequires: pkgconfig(wrt-plugins-types)
@@ -19,22 +19,24 @@ BuildRequires: pkgconfig(libpcrecpp)
 BuildRequires: pkgconfig(icu-i18n)
 BuildRequires: pkgconfig(libxml-2.0)
 BuildRequires: pkgconfig(cert-svc-vcore)
+Requires(post):  /sbin/ldconfig
+Requires(postun):  /sbin/ldconfig
 BuildRequires: pkgconfig(wrt-commons-widget-interface-dao)
-Requires:  ldconfig
 
 %description
 JavaScript plugins for WebRuntime
 
 %package devel
-Summary:    wrt-plugins-common library development headers
+Summary:    WebRuntime common library development headers
 Group:      Development/Libraries
 Requires:   %{name} = %{version}
 
 %description devel
-wrt-plugins common library development headers
+This package contains all needed header files for developing a WRT plugin
 
 %prep
 %setup -q
+cp %{SOURCE1001} .
 
 %define with_tests 0
 %if "%{WITH_TESTS}" == "ON" || "%{WITH_TESTS}" == "Y" || "%{WITH_TESTS}" == "YES" || "%{WITH_TESTS}" == "TRUE" || "%{WITH_TESTS}" == "1"
@@ -42,19 +44,17 @@ wrt-plugins common library development headers
 %endif
 
 %build
+export LDFLAGS+="-Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--hash-style=both"
 %if 0%{?tizen_build_binary_release_type_eng}
 export CFLAGS="$CFLAGS -DTIZEN_ENGINEER_MODE"
 export CXXFLAGS="$CXXFLAGS -DTIZEN_ENGINEER_MODE"
 export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE"
 %endif
 
-export LDFLAGS+="-Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--hash-style=both"
-
-cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}  \
-        -DDPL_LOG="ON"                     \
+%cmake . -DDPL_LOG="ON"                     \
         -DCMAKE_PROJECT_VERSION=%{version} \
         -DCMAKE_BUILD_TYPE=%{?build_type:%build_type} \
-        %{?WITH_TESTS:-DWITH_TESTS=%WITH_TESTS}
+           %{?WITH_TESTS:-DWITH_TESTS=%WITH_TESTS}
 make %{?jobs:-j%jobs}
 
 %install
@@ -69,9 +69,12 @@ rm -rf %{buildroot}
 mkdir -p %{_libdir}/wrt-plugins
 mkdir -p /usr/etc/wrt/injected-javascript
 touch /opt/share/widget/plugin-installation-required
+/sbin/ldconfig
+
+%postun -p /sbin/ldconfig
 
 %files
-%manifest wrt-plugins-common.manifest
+%manifest %{name}.manifest
 /usr/etc/wrt-plugins/config.dtd
 %{_libdir}/*.so
 %{_libdir}/*.so.*
@@ -88,7 +91,9 @@ touch /opt/share/widget/plugin-installation-required
     %attr(755,root,root) %{_bindir}/widgetdb_tests_prepare_db.sh
     %attr(755,root,root) %{_bindir}/wrt-plugins-common-tests-widgetdb
 %endif
+/etc/ld.so.conf.d/wrt-plugins-common.conf
 
 %files devel
+%manifest %{name}.manifest
 %{_includedir}/*
 %{_libdir}/pkgconfig/*
index 69b9f8f..37eaec2 100644 (file)
@@ -1,6 +1,6 @@
 prefix=/usr
 exec_prefix=${prefix}
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include
 
 Name: wrt-plugin-loading
index 579a085..6a7c1ed 100644 (file)
@@ -1,6 +1,6 @@
 prefix=/usr
 exec_prefix=${prefix}
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include
 
 Name: wrt-plugins-api-support
index b522b22..5052950 100644 (file)
@@ -1,7 +1,7 @@
 prefix=/usr
 project_name=@CMAKE_PROJECT_NAME@
 exec_prefix=${prefix}
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include/${project_name}
 
 Name: WrtDeviceApis commons with JavaScrpt dependencies
index e3c8c7a..bdce084 100644 (file)
@@ -1,7 +1,7 @@
 prefix=/usr
 project_name=@CMAKE_PROJECT_NAME@
 exec_prefix=${prefix}
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include/${project_name}
 
 Name: WrtDeviceApis commons
index 49563e1..3a9ef13 100644 (file)
@@ -1,7 +1,7 @@
 prefix=/usr
 project_name=@CMAKE_PROJECT_NAME@
 exec_prefix=${prefix}
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include/${project_name}
 
 Name: WebRuntime DeviceApis Filesystem module
index 8088720..162673e 100644 (file)
@@ -1,7 +1,7 @@
 prefix=/usr
 project_name=@CMAKE_PROJECT_NAME@
 exec_prefix=${prefix}
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include/${project_name}
 
 Name: wrt ipc message support
index c6a3faa..e43f2d7 100644 (file)
@@ -1,7 +1,7 @@
 prefix=/usr
 project_name=@CMAKE_PROJECT_NAME@
 exec_prefix=${prefix}
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include/${project_name}
 
 Name: WebRuntime DeviceApis Plugin Manager module
index 8792516..599ccd9 100644 (file)
@@ -1,7 +1,7 @@
 prefix=/usr
 project_name=@CMAKE_PROJECT_NAME@
 exec_prefix=${prefix}
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include/${project_name}
 
 Name: WebRuntime DeviceApis Widget Interface module
index 788423a..29e9257 100644 (file)
@@ -1,7 +1,7 @@
 prefix=/usr
 project_name=@CMAKE_PROJECT_NAME@
 exec_prefix=${prefix}
-libdir=${prefix}/lib/
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include/${project_name}
 
 Name: WebRuntime DeviceApis WidgetDB module
index ad9605e..8f52e83 100644 (file)
@@ -1,7 +1,7 @@
 prefix=/usr
 project_name=@CMAKE_PROJECT_NAME@
 exec_prefix=${prefix}
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include/${project_name}
 
 Name: wrt-popup-runner
index ad9605e..8f52e83 100644 (file)
@@ -1,7 +1,7 @@
 prefix=/usr
 project_name=@CMAKE_PROJECT_NAME@
 exec_prefix=${prefix}
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include/${project_name}
 
 Name: wrt-popup-runner
index a7b830f..2b2f6c7 100644 (file)
@@ -1,7 +1,7 @@
 prefix=/usr
 project_name=@CMAKE_PROJECT_NAME@
 exec_prefix=${prefix}
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include/${project_name}
 
 Name: wrt-popup-runner
index cdaed58..7e1dc9d 100644 (file)
@@ -119,12 +119,12 @@ std::string Converter::toString(long arg)
 {
     return toString_(arg);
 }
-
+#ifndef __x86_64__
 std::string Converter::toString(std::size_t arg)
 {
     return toString_(arg);
 }
-
+#endif
 std::string Converter::toString(const JSValueRef& arg)
 {
     return toString_(arg);
index ff196b6..b37383a 100644 (file)
@@ -141,8 +141,10 @@ class Converter : private DPL::Noncopyable
     std::string toString(unsigned long arg);
 
     std::string toString(long arg);
+#ifndef __x86_64__
 
     std::string toString(std::size_t arg);
+#endif  
 
     /**
      * Converts JSValueRef to STL string.
index d9b4d2b..2c3339b 100644 (file)
 #ifndef _DISPATCH_EVENT_SUPPORT_CPP_
 #define _DISPATCH_EVENT_SUPPORT_CPP_
 
+#include <string>
+#include <JavaScriptCore/JavaScript.h>
+#include <dpl/log/log.h>
+
 #include "dispatch_event_support.h"
 
 namespace DispatchEventSupport {
index fbcf48a..7b54c25 100644 (file)
@@ -68,7 +68,7 @@ target_link_libraries(${TARGET_PLUGIN_LOADING_LIB}
 )
 
 INSTALL(TARGETS ${TARGET_PLUGIN_LOADING_LIB}
-    DESTINATION lib
+    DESTINATION ${LIB_INSTALL_DIR}
     PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
     GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
 )
index 7a67b5e..77d5f45 100644 (file)
@@ -52,7 +52,7 @@ target_link_libraries(${TARGET_PLUGINS_API_SUPPORT}
 )
 
 INSTALL(TARGETS ${TARGET_PLUGINS_API_SUPPORT}
-    DESTINATION lib
+    DESTINATION ${LIB_INSTALL_DIR}
     PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
     GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
 )
index d3da03e..00d7cce 100644 (file)
@@ -50,7 +50,7 @@ target_link_libraries(${TARGET_PLUGINS_IPC_MESSAGE_LIB}
 )
 
 INSTALL(TARGETS ${TARGET_PLUGINS_IPC_MESSAGE_LIB}
-    DESTINATION lib
+    DESTINATION ${LIB_INSTALL_DIR}
     PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
     GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
 )
index a76454d..6623657 100644 (file)
@@ -46,4 +46,4 @@ target_link_libraries(${TARGET_NAME}
   wrt-dispatch-event
 )
 
-INSTALL(TARGETS ${TARGET_NAME} LIBRARY DESTINATION /usr/lib/wrt-plugins/w3c-widget-interface)
+INSTALL(TARGETS ${TARGET_NAME} LIBRARY DESTINATION ${LIB_INSTALL_DIR}/wrt-plugins/w3c-widget-interface)
index 4e5053c..86f58cf 100644 (file)
@@ -57,7 +57,7 @@ target_link_libraries(${TARGET_POPUP_ACE_RUNNER_LIB}
 )
 
 INSTALL(TARGETS ${TARGET_POPUP_ACE_RUNNER_LIB}
-    DESTINATION lib
+    DESTINATION ${LIB_INSTALL_DIR}
 )
 
 INSTALL(FILES ${WRT_POPUP_RUNNER_LIB_SRC_DIR}/popup-runner.h
index 149b7eb..1099df7 100644 (file)
@@ -35,7 +35,7 @@ namespace Popup {
 namespace Renderer {
 struct AnswerCallbackData
 {
-    int buttonAnswer;
+    intptr_t buttonAnswer;
     DPL::Optional<std::string> password;
     bool chackState;
 };
index 0703bda..e406c8d 100644 (file)
@@ -110,7 +110,7 @@ class PopupRenderer::Impl
         Assert(m_initialized);
         AnswerCallbackData answerData;
 
-        answerData.buttonAnswer = reinterpret_cast<int>(data);
+        answerData.buttonAnswer = reinterpret_cast<intptr_t>(data);
         answerData.chackState = m_checkState;
         answerData.password = m_password;
         m_current->ForwardAnswer(answerData);
index 0a8f45e..3c1aad9 100644 (file)
@@ -58,7 +58,7 @@ target_link_libraries(${TARGET_POPUP_WRT_RUNNER_LIB}
 )
 
 INSTALL(TARGETS ${TARGET_POPUP_WRT_RUNNER_LIB}
-    DESTINATION lib
+    DESTINATION ${LIB_INSTALL_DIR}
 )
 
 INSTALL(FILES ${WRT_POPUP_RUNNER_LIB_SRC_DIR}/PopupInvoker.h
diff --git a/wrt-plugins-common.conf.in b/wrt-plugins-common.conf.in
new file mode 100644 (file)
index 0000000..4f4792d
--- /dev/null
@@ -0,0 +1 @@
+@LIB_INSTALL_DIR@/wrt-plugins/w3c-widget-interface
diff --git a/wrt-plugins-common.manifest b/wrt-plugins-common.manifest
deleted file mode 100644 (file)
index 32dd898..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<manifest>
-  <define>
-    <domain name="wrt-plugins-common"/>
-  </define>
-  <assign>
-    <filesystem path="/usr/bin/wrt-popup-ace-runtime" label="wrt-popup-ace-runtime" exec_label="wrt-popup-ace-runtime"/>
-    <filesystem path="/usr/bin/wrt-popup-wrt-runtime" label="wrt-popup-wrt-runtime" exec_label="wrt-popup-wrt-runtime"/>
-  </assign>
-  <request>
-    <domain name="_"/>
-  </request>
-</manifest>