summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRusty Lynch <rusty.lynch@intel.com>2013-10-08 18:00:43 -0700
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>2013-10-21 15:04:18 -0700
commitc18cc4261b73409252b1faea7598d9c7be268972 (patch)
treee137a9ef3bc92c92c1574c81d4b08f0771db521d
parentf992f69bc83e84078100a500d021f705834e38ff (diff)
downloadaul-1-c18cc4261b73409252b1faea7598d9c7be268972.tar.gz
aul-1-c18cc4261b73409252b1faea7598d9c7be268972.tar.bz2
aul-1-c18cc4261b73409252b1faea7598d9c7be268972.zip
Add wayland support
Change-Id: If9dc1879e63e53e5f938207abaed2099e3e285b5 Signed-off-by: Rusty Lynch <rusty.lynch@intel.com>
-rwxr-xr-xCMakeLists.txt10
-rwxr-xr-xam_daemon/amd_key.c13
-rwxr-xr-xam_daemon/amd_main.c16
-rwxr-xr-xpackaging/aul.spec15
4 files changed, 45 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4dbb1ce2..e09a8d68 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,7 +20,15 @@ MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
# Set required packages
INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED dlog ecore x11 libprivilege-control app-checker rua glib-2.0 ecore-x ecore-input evas vconf pkgmgr-info app2sd 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 app2sd privacy-manager-client)
+ELSE()
+ 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 app2sd privacy-manager-client)
+ENDIF(WITH_WAYLAND)
+
pkg_check_modules(libpkgs REQUIRED dlog bundle dbus-glib-1 ail xdgmime app-checker libsmack)
PKG_CHECK_MODULES(PKGS REQUIRED glib-2.0 gio-2.0 dlog bundle)
diff --git a/am_daemon/amd_key.c b/am_daemon/amd_key.c
index 5a4b0388..47258894 100755
--- a/am_daemon/amd_key.c
+++ b/am_daemon/amd_key.c
@@ -19,11 +19,16 @@
*
*/
-#include <Ecore_X.h>
-#include <Ecore_Input.h>
-#include <utilX.h>
#include <Ecore.h>
#include <Evas.h>
+#include <Ecore_Input.h>
+#ifdef X11
+#include <Ecore_X.h>
+#include <utilX.h>
+#endif
+#ifdef WAYLAND
+#include <Ecore_Wayland.h>
+#endif
#include <aul.h>
#include <glib.h>
@@ -166,6 +171,7 @@ int _unregister_key_event(int pid)
int _key_init()
{
+#ifdef X11
key_info.win = ecore_x_window_input_new(0, 0, 0, 1, 1);
if (!key_info.win) {
_D("Failed to create hidden window");
@@ -192,6 +198,7 @@ int _key_init()
if (!key_info.key_down) {
_D("Failed to register a key down event handler");
}
+#endif // X11
return 0;
}
diff --git a/am_daemon/amd_main.c b/am_daemon/amd_main.c
index 75bf298c..31ad99f6 100755
--- a/am_daemon/amd_main.c
+++ b/am_daemon/amd_main.c
@@ -23,11 +23,16 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include <Ecore_X.h>
-#include <Ecore_Input.h>
-#include <utilX.h>
#include <Ecore.h>
+#include <Ecore_Input.h>
#include <Evas.h>
+#ifdef X11
+#include <Ecore_X.h>
+#include <utilX.h>
+#endif
+#ifdef WAYLAND
+#include <Ecore_Wayland.h>
+#endif
#include <aul.h>
#include <vconf.h>
#include <app-checker-server.h>
@@ -254,7 +259,12 @@ static int __init()
ecore_init();
evas_init();
ecore_event_init();
+#ifdef X11
ecore_x_init(NULL);
+#endif
+#ifdef WAYLAND
+ ecore_wl_init(NULL);
+#endif
appinfo_init(&amd.af);
cgutil_create(MOUNT_PATH, AGENT_PATH, &amd.cg);
diff --git a/packaging/aul.spec b/packaging/aul.spec
index 280edb59..746c1e20 100755
--- a/packaging/aul.spec
+++ b/packaging/aul.spec
@@ -1,3 +1,5 @@
+%bcond_with wayland
+
Name: aul
Summary: App utility library
Version: 0.0.282
@@ -27,7 +29,11 @@ BuildRequires: pkgconfig(libprivilege-control)
BuildRequires: pkgconfig(app-checker)
BuildRequires: pkgconfig(app-checker-server)
BuildRequires: pkgconfig(rua)
+%if %{with wayland}
+BuildRequires: pkgconfig(ecore-wayland)
+%else
BuildRequires: pkgconfig(ecore-x)
+%endif
BuildRequires: pkgconfig(ecore-input)
BuildRequires: pkgconfig(utilX)
BuildRequires: pkgconfig(vconf)
@@ -57,7 +63,11 @@ Application utility library (devel)
CFLAGS="%{optflags} -D__emul__"; export CFLAGS
%endif
-%cmake .
+%if %{with wayland}
+%cmake . -DWITH_WAYLAND=On
+%else
+%cmake . -DWITH_WAYLAND=Off
+%endif
make %{?jobs:-j%jobs}
@@ -104,7 +114,8 @@ if [ $1 == 1 ]; then
systemctl restart ac.service
fi
-%postun -p /sbin/ldconfig
+%postun
+/sbin/ldconfig
systemctl daemon-reload
%files