init wayland support. 13/13413/6 accepted/tizen/generic accepted/tizen/ivi accepted/tizen/mobile accepted/tizen_generic accepted/tizen_ivi_panda accepted/tizen_ivi_release tizen_ivi_release accepted/tizen/generic/20140114.095645 accepted/tizen/generic/20140312.091821 accepted/tizen/ivi/20140110.223927 accepted/tizen/ivi/panda/20140312.093539 accepted/tizen/ivi/release/20140312.044259 accepted/tizen/ivi/release/20140312.104114 accepted/tizen/mobile/20140113.182020 submit/tizen/20140110.215130 submit/tizen/20140312.070641 submit/tizen_ivi_release/20140312.044451 submit/tizen_ivi_release/20140312.071107
authorwangfei <feix.w.wang@intel.com>
Thu, 9 Jan 2014 06:51:58 +0000 (01:51 -0500)
committerwangfei <feix.w.wang@intel.com>
Thu, 9 Jan 2014 06:55:52 +0000 (01:55 -0500)
The display server based on X or Wayland, is now a choice of different profile in Tizen 3.0.
Basically and consistently, two macros were used "with wayland" and "with x".
Below summarize the combination of the macros:

| wayland |  x  | meaning
|---------------------------
|   0     |  1  | pure X11 platform(no wayland)
|   1     |  0  | pure wayland platform (no X11)
|   1     |  1  | wayland but X compatibility
|   0     |  0  | no X and no wayland

This method unifies the meaning and usage. Deploy this method to aul-1 package.
Currently we need "pure wayland platform (no X11)" status,so "with wayland" and "with x" are
defined into "1" and "0" in build.conf file.If you need other status of above illustration,
please change values of "with x" and "with wayland" in your build.conf file.

Signed-off-by: wangfei <feix.w.wang@intel.com>
Change-Id: I50cbee1ae458ac49bd0ffc839f65f4c7fb11ac9b

CMakeLists.txt [changed mode: 0755->0644]
launchpad_src/launchpad.c [changed mode: 0755->0644]
packaging/aul.spec [changed mode: 0755->0644]
src/key.c [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index a1acf64..e3232e5
@@ -19,14 +19,14 @@ MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
 
 # Set required packages
 INCLUDE(FindPkgConfig)
-
+SET(AUL-1_PKG_CHECK_MODULES dlog ecore libprivilege-control app-checker rua glib-2.0 ecore-input evas vconf pkgmgr-info privacy-manager-client)
 OPTION(WITH_WAYLAND "Build with wayland" OFF)
 IF(WITH_WAYLAND)
     ADD_DEFINITIONS("-DWAYLAND")
-    pkg_check_modules(pkgs REQUIRED dlog ecore x11 libprivilege-control app-checker rua glib-2.0 ecore-wayland ecore-input evas vconf pkgmgr-info privacy-manager-client)
-ELSE()
+    pkg_check_modules(pkgs REQUIRED ${AUL-1_PKG_CHECK_MODULES} ecore-wayland)
+ELSE(WITH_WAYLAND)
     ADD_DEFINITIONS("-DX11")
-    pkg_check_modules(pkgs REQUIRED dlog ecore x11 libprivilege-control app-checker rua glib-2.0 ecore-x ecore-input evas vconf pkgmgr-info privacy-manager-client)
+    pkg_check_modules(pkgs REQUIRED  ${AUL-1_PKG_CHECK_MODULES} x11 ecore-x)
 ENDIF(WITH_WAYLAND)
 
 pkg_check_modules(libpkgs REQUIRED dlog bundle dbus-glib-1 ail xdgmime app-checker libsmack)
@@ -100,10 +100,16 @@ SET_TARGET_PROPERTIES(aul PROPERTIES VERSION ${VERSION})
 
 # launchpad(old avatar) daemon
 SET(AVATAR_NAME "launchpad_preloading_preinitializing_daemon")
+IF (WITH_WAYLAND)
+add_executable(${AVATAR_NAME}
+        launchpad_src/launchpad.c
+        )
+ELSE(WITH_WAYLAND)
 add_executable(${AVATAR_NAME}
        launchpad_src/launchpad.c
        launchpad_src/util_x.c
        )
+ENDIF(WITH_WAYLAND)
 
 MESSAGE("       "${pkgs_LDFLAGS})
 target_link_libraries(${AVATAR_NAME} aul_mods aul ${pkgs_LDFLAGS} ${LIB_DL})
@@ -120,7 +126,12 @@ add_executable(amd
                am_daemon/amd_launch.c
                am_daemon/amd_status.c
                 )
-target_link_libraries(amd aul_mods app-checker-server rua glib-2.0 bundle ail aul utilX ${pkgs_LDFLAGS})
+SET(AUL-1_LINK_LIBRARY amd aul_mods app-checker-server rua glib-2.0 bundle ail aul)
+IF (WITH_WAYLAND)
+target_link_libraries(${AUL-1_LINK_LIBRARY} ${pkgs_LDFLAGS})
+ELSE(WITH_WAYLAND)
+target_link_libraries(${AUL-1_LINK_LIBRARY} utilX ${pkgs_LDFLAGS})
+ENDIF(WITH_WAYLAND)
 
 SET(REL_AGENT daemon-manager-release-agent)
 ADD_EXECUTABLE(${REL_AGENT} agent/${REL_AGENT}.c)
old mode 100755 (executable)
new mode 100644 (file)
index 314ddf9..565d163
@@ -27,7 +27,9 @@
 #include <stdio.h>
 #include <string.h>
 #include <dlfcn.h>
+#ifdef X11
 #include <X11/Xlib.h>
+#endif
 #include <sys/types.h>
 #include <signal.h>
 #include <dirent.h>
old mode 100755 (executable)
new mode 100644 (file)
index 846eee1..8f80d8f
@@ -1,4 +1,5 @@
 %bcond_with wayland
+%bcond_with x
 
 Name:       aul
 Summary:    App utility library
@@ -20,7 +21,6 @@ Requires(preun): /usr/bin/systemctl
 BuildRequires:  cmake
 BuildRequires:  pkgconfig(dbus-glib-1)
 BuildRequires:  pkgconfig(sqlite3)
-BuildRequires:  pkgconfig(x11)
 BuildRequires:  pkgconfig(ecore)
 BuildRequires:  pkgconfig(bundle)
 BuildRequires:  pkgconfig(dlog)
@@ -32,11 +32,13 @@ BuildRequires:  pkgconfig(app-checker-server)
 BuildRequires:  pkgconfig(rua)
 %if %{with wayland}
 BuildRequires:  pkgconfig(ecore-wayland)
-%else
+%endif
+%if %{with x}
 BuildRequires:  pkgconfig(ecore-x)
+BuildRequires:  pkgconfig(x11)
+BuildRequires:  pkgconfig(utilX)
 %endif
 BuildRequires:  pkgconfig(ecore-input)
-BuildRequires:  pkgconfig(utilX)
 BuildRequires:  pkgconfig(vconf)
 BuildRequires:  pkgconfig(pkgmgr-info)
 BuildRequires:  pkgconfig(libsmack)
old mode 100755 (executable)
new mode 100644 (file)
index da44d65..a94f03c
--- a/src/key.c
+++ b/src/key.c
@@ -23,7 +23,9 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
+#ifdef X11
 #include <utilX.h>
+#endif
 #include <glib.h>
 #include <poll.h>
 #include <bundle.h>