From 3336c54472e0479fec53f432ff042d01baa347b3 Mon Sep 17 00:00:00 2001
From: Yong-iL Joh <yong-il.joh@windriver.com>
Date: Mon, 17 Apr 2017 15:53:17 +0900
Subject: [PATCH] audiomanager: update to latest

Signed-off-by: Yong-iL Joh <yong-il.joh@windriver.com>
---
 .../audiomanagerplugins/fix_path.patch             | 26 ++++++++++++++++++++++
 .../audiomanager/audiomanagerplugins_7.4.bbappend  |  1 +
 .../audiomanager/audiomanager_7.4.bb               |  2 +-
 .../audiomanager/audiomanagerplugins_7.4.bb        | 10 ++-------
 4 files changed, 30 insertions(+), 9 deletions(-)
 create mode 100644 meta-ivi-test/recipes-multimedia/audiomanager/audiomanagerplugins/fix_path.patch

diff --git a/meta-ivi-test/recipes-multimedia/audiomanager/audiomanagerplugins/fix_path.patch b/meta-ivi-test/recipes-multimedia/audiomanager/audiomanagerplugins/fix_path.patch
new file mode 100644
index 0000000..0c1cd16
--- /dev/null
+++ b/meta-ivi-test/recipes-multimedia/audiomanager/audiomanagerplugins/fix_path.patch
@@ -0,0 +1,26 @@
+diff --git a/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusSignalTest.cpp b/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusSignalTest.cpp
+index 760c3bb..189146c 100644
+--- a/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusSignalTest.cpp
++++ b/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusSignalTest.cpp
+@@ -226,7 +226,7 @@ TEST_F(CAmCommandSenderDbusSignalTest,cbSourceAvailabilityChanged)
+ 
+     IAmCommandSend* (*createFunc)();
+     void* tempLibHandle = NULL;
+-    std::string libname("../plugins/libPluginCommandInterfaceDbus.so");
++    std::string libname("/usr/lib/audiomanager/command/libPluginCommandInterfaceDbus.so");
+     createFunc = getCreateFunction<IAmCommandSend*()>(libname, tempLibHandle);
+ 
+     if (!createFunc)
+diff --git a/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusTest.cpp b/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusTest.cpp
+index ecc4a64..723f9a1 100644
+--- a/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusTest.cpp
++++ b/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusTest.cpp
+@@ -183,7 +183,7 @@ TEST_F(CAmCommandSenderDbusTest, MessageTest)
+ 
+     IAmCommandSend* (*createFunc)();
+     void* tempLibHandle = NULL;
+-    std::string libname("../plugins/command/libPluginCommandInterfaceDbus.so");
++    std::string libname("/usr/lib/audiomanager/command/libPluginCommandInterfaceDbus.so");
+     createFunc = getCreateFunction<IAmCommandSend*()>(libname, tempLibHandle);
+ 
+     if (!createFunc)
diff --git a/meta-ivi-test/recipes-multimedia/audiomanager/audiomanagerplugins_7.4.bbappend b/meta-ivi-test/recipes-multimedia/audiomanager/audiomanagerplugins_7.4.bbappend
index 356808c..17de26b 100644
--- a/meta-ivi-test/recipes-multimedia/audiomanager/audiomanagerplugins_7.4.bbappend
+++ b/meta-ivi-test/recipes-multimedia/audiomanager/audiomanagerplugins_7.4.bbappend
@@ -1,5 +1,6 @@
 FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
 SRC_URI_append += " \
+    file://fix_path.patch \
     file://${BPN}_t-${PV}.inc \
     "
 
diff --git a/meta-ivi/recipes-multimedia/audiomanager/audiomanager_7.4.bb b/meta-ivi/recipes-multimedia/audiomanager/audiomanager_7.4.bb
index 907f771..da0d6a8 100644
--- a/meta-ivi/recipes-multimedia/audiomanager/audiomanager_7.4.bb
+++ b/meta-ivi/recipes-multimedia/audiomanager/audiomanager_7.4.bb
@@ -8,7 +8,7 @@ PR = "r1"
 
 DEPENDS = "common-api-c++-dbus dlt-daemon sqlite3 dbus node-state-manager"
 
-SRCREV = "fe056279dde92475f29a35f8c0c6c5a41dc59a8b"
+SRCREV = "71eab93f9cd67b2e0343700552adf988c420f174"
 SRC_URI = " \
     git://github.com/GENIVI/AudioManager.git;protocol=https \
     file://AudioManager.service \
diff --git a/meta-ivi/recipes-multimedia/audiomanager/audiomanagerplugins_7.4.bb b/meta-ivi/recipes-multimedia/audiomanager/audiomanagerplugins_7.4.bb
index 9b9bfdc..0610880 100644
--- a/meta-ivi/recipes-multimedia/audiomanager/audiomanagerplugins_7.4.bb
+++ b/meta-ivi/recipes-multimedia/audiomanager/audiomanagerplugins_7.4.bb
@@ -9,7 +9,7 @@ PR = "r1"
 DEPENDS = "audiomanager capicxx-core-native capicxx-dbus-native"
 RDEPENDS_${PN} += "libxml2"
 
-SRCREV = "cb5797de3df41f4661c3055b0ea1a3e677c293aa"
+SRCREV = "6a446908874b88b4d9c07cc16bbf4af9eba5df00"
 SRC_URI = " \
     git://github.com/GENIVI/AudioManagerPlugins.git;branch=master;protocol=https \
     file://AM-Genivi-Filtering-out-JDK-warnings-in-CAPI-script.patch \
@@ -23,6 +23,7 @@ EXTRA_OECMAKE = " \
     -DWITH_ROUTING_INTERFACE_CAPI=ON -DWITH_ROUTING_INTERFACE_DBUS=ON \
     -DWITH_ROUTING_INTERFACE_ASYNC=ON \
     -DWITH_GENERIC_CONTROLLER=ON \
+    -DCONFIG_PREFIX=/etc \
     "
 
 do_configure_prepend() {
@@ -30,17 +31,10 @@ do_configure_prepend() {
     perl -pi -e 's|include\(CMakeDependentOption\)|include\(CMakeDependentOption\)\ninclude_directories\(${PKG_CONFIG_SYSROOT_DIR}/usr/include/audiomanager/AudioManagerCore\)|' ${S}/CMakeLists.txt
     perl -pi -e 's|include\(CMakeDependentOption\)|include\(CMakeDependentOption\)\ninclude_directories\(${PKG_CONFIG_SYSROOT_DIR}/usr/include/audiomanager\)|' ${S}/CMakeLists.txt
 
-    perl -pi -e 's|\${CMAKE_INSTALL_PREFIX}/etc/controllerconf|/etc/controllerconf|' ${S}/PluginControlInterfaceGeneric/CMakeLists.txt
-
-    perl -pi -e 's|set\(LIBRARY_OUTPUT_PATH \${DEFAULT_PLUGIN_ROUTING_DIR}\)|set\(LIBRARY_OUTPUT_PATH ${B}\)|' ${S}/PluginRouting*/CMakeLists.txt
     perl -pi -e 's|COMMAND find "/usr/local/share/.*"|COMMAND find "\${PKG_CONFIG_SYSROOT_DIR}/../"|' ${S}/PluginRoutingInterfaceCAPI/cmake/CommonAPI.cmake
     perl -pi -e 's|COMMAND find "/usr/local/share/.*"|COMMAND find "\${PKG_CONFIG_SYSROOT_DIR}/../"|' ${S}/PluginCommandInterfaceCAPI/cmake/CommonAPI.cmake
 }
 
-do_configure_append() {
-    perl -pi -e 's|/\* #undef LIBRARY_OUTPUT_PATH \*/|#define LIBRARY_OUTPUT_PATH "/usr/lib/command"|' ${S}/PluginCommandInterfaceDbus/include/configCommandDbus.h
-}
-
 FILES_${PN} += " \
     ${libdir}/* \
     /usr/share/* \
-- 
1.9.1

