Add recipe for mapviewer 77/7877/2
authorToshi Umemura <toshihiro.umemura@itage.co.jp>
Mon, 19 Dec 2016 09:10:59 +0000 (18:10 +0900)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tue, 27 Dec 2016 14:54:43 +0000 (14:54 +0000)
This patch addes recipe for mapviewer.
mapviewer is a child application which communicates
with navigation app on homescreen. In CES2017 demo
this app is launched at virtual screen next to homescreen.
(invisible on homescreen) Mapviewer dislay on virtual screen is
transported to meter cluster side via ethernet.
That will be shown at center of meter cluster with 384x368.

window manager tries to change the position to be sent to a cluster
after systemd execute LayerManagerControl set surface.
In order to avoid this sleep is added as a tentative solution.

Change-Id: I903ef19b2550b01e1c90e8960d1edda01b46297d

Signed-off-by: ynakamura <ynakamura@jp.adit-jv.com>
Signed-off-by: Naoto Yamaguchi <i33399_YAMAGUCHI@aisin-aw.co.jp>
recipes-demo-hmi/navigation/mapviewer/mapviewer.service [new file with mode: 0644]
recipes-demo-hmi/navigation/mapviewer_%.bbappend [new file with mode: 0644]
recipes-demo-hmi/navigation/mapviewer_git.bb [new file with mode: 0644]
recipes-demo-hmi/navigation/navigation_git.bb
recipes-platform/images/agl-demo-platform.bb

diff --git a/recipes-demo-hmi/navigation/mapviewer/mapviewer.service b/recipes-demo-hmi/navigation/mapviewer/mapviewer.service
new file mode 100644 (file)
index 0000000..5a78843
--- /dev/null
@@ -0,0 +1,25 @@
+[Unit]
+Conflicts=getty@tty1.service
+After=weston.service
+
+# map viewr is a child application which can work with navigation.
+# This app requires mapdata. It has to be stored at /var/mapdata/navi_data_UK .
+# currently the position to be shown is 384x368 surface on screen 1 for CES2017 cluster demo.
+
+[Service]
+Environment=NAVI_DATA_DIR=/var/mapdata/navi_data_UK/japan_TR9 XDG_RUNTIME_DIR=/run/user/0
+ExecStartPre=/bin/sleep 5
+ExecStart=/usr/bin/mapview
+ExecStartPost=/usr/bin/LayerManagerControl create layer 1000 1920 1080
+ExecStartPost=/usr/bin/LayerManagerControl set layer 1000 render order 0x1000000 
+ExecStartPost=/usr/bin/LayerManagerControl set surface 0x1000000 source region 0 0 384 368
+ExecStartPost=/usr/bin/LayerManagerControl set surface 0x000000 destination region 0 0 384 368
+ExecStartPost=/usr/bin/LayerManagerControl set screen 1 render order 1000
+ExecStartPost=/usr/bin/LayerManagerControl set layer 1000 visibility 1
+ExecStartPost=/usr/bin/LayerManagerControl set surface 0x1000000 visibility 1
+
+ExecStop=/usr/bin/killall -s KILL mapview
+Type=simple
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-demo-hmi/navigation/mapviewer_%.bbappend b/recipes-demo-hmi/navigation/mapviewer_%.bbappend
new file mode 100644 (file)
index 0000000..3049a67
--- /dev/null
@@ -0,0 +1,20 @@
+FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
+
+SRC_URI_append = "\
+    file://mapviewer.service \
+    "
+
+inherit systemd
+
+SYSTEMD_PACKAGES = "${PN}"
+
+do_install_append() {
+    # Install systemd unit files
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -m 644 -p -D ${WORKDIR}/mapviewer.service ${D}${systemd_system_unitdir}/mapviewer.service
+    fi
+}
+
+FILES_${PN} += " \
+    ${systemd_system_unitdir}/mapviewer.service \
+    "
diff --git a/recipes-demo-hmi/navigation/mapviewer_git.bb b/recipes-demo-hmi/navigation/mapviewer_git.bb
new file mode 100644 (file)
index 0000000..0078f3a
--- /dev/null
@@ -0,0 +1,21 @@
+LICENSE="GPLv2"
+LIC_FILES_CHKSUM="file://LICENSE;md5=3595e9c703a847d990664d2b396a9df0 \
+                  file://COPYING;md5=947b2d60ca3872e172034438e9801200"
+
+DEPENDS = " \
+          glib-2.0 freetype sqlite3 wayland zlib expat openssl virtual/libgles2 virtual/libgl virtual/egl \
+          wayland \
+          "
+
+RDEPENDS_${PN} = " navigation "
+
+SRCREV="348edb91ab6ea94e0d60c5a1789e1e9c2ae961c6"
+SRC_URI="git://github.com/AGLExport/mapviwer.git"
+
+# To avoid C++ library link failure
+SECURITY_CFLAGS = ""
+
+inherit autotools pkgconfig
+
+S = "${WORKDIR}/git"
+
index 290def0..97ba1f3 100644 (file)
@@ -9,7 +9,7 @@ DEPENDS = " \
 
 RDEPENDS_${PN} = " flite openjtalk "
 
-SRCREV="292c7f5abad2da32a9dc0d0314ba6aa8673fa052"
+SRCREV="1b7218335b5b7a5312e3611138c70c49a27a3b9f"
 SRC_URI="git://github.com/AGLExport/gpsnavi.git \
          file://flite.in \
          file://jtalk.in \
index 7313a95..f0ee0b1 100644 (file)
@@ -71,6 +71,7 @@ IMAGE_INSTALL_append = " \
     climatecontrolplugin \
     navigation \
     poiapp \
+    mapviewer \
     ${IMAGE_MOST_HVAC} \
     ${IMAGE_AGL_APPS} \
     ${IMAGE_TTF_FONTS} \