PTREL-546 fix: enable wayland build
authorJuan Zhao <juan.j.zhao@intel.com>
Tue, 17 Dec 2013 09:33:38 +0000 (17:33 +0800)
committerEduardo Lima (Etrunko) <eduardo.lima@intel.com>
Mon, 10 Feb 2014 22:27:23 +0000 (20:27 -0200)
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 elementary package.

Change-Id: I761ef5a9b03493fe7e867282d4d3cd2a812d7482
Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
Conflicts:
packaging/elementary.spec

packaging/elementary.spec

index c6da41c..ffabc77 100644 (file)
@@ -1,3 +1,5 @@
+%bcond_with wayland
+%bcond_with x
 Name:           elementary
 Version:        1.7.8
 Release:        2 
@@ -11,6 +13,14 @@ BuildRequires:  pkgconfig(ecore)
 BuildRequires:  pkgconfig(ecore-evas)
 BuildRequires:  pkgconfig(ecore-file)
 BuildRequires:  pkgconfig(ecore-imf)
+%if %{with wayland}
+BuildRequires:  pkgconfig(ecore-wayland)
+%endif
+%if %{with x}
+BuildRequires:  pkgconfig(ecore-x)
+BuildRequires:  pkgconfig(x11)
+%endif
+BuildRequires:  pkgconfig(edbus)
 BuildRequires:  pkgconfig(edje)
 BuildRequires:  pkgconfig(eet)
 BuildRequires:  pkgconfig(efreet)
@@ -18,7 +28,6 @@ BuildRequires:  pkgconfig(eina)
 BuildRequires:  pkgconfig(evas)
 BuildRequires:  pkgconfig(emotion)
 BuildRequires:  pkgconfig(ethumb_client)
-BuildRequires:  pkgconfig(x11)
 BuildRequires:  eet-tools
 
 %description
@@ -59,7 +68,15 @@ cp %{SOURCE1001} .
 
 %build
 
-%autogen --disable-static --enable-build-examples
+%reconfigure --disable-static \
+%if %{with wayland}
+         --enable-ecore-wayland \
+%endif
+%if !%{with x}
+         --disable-ecore-x \
+%endif
+         --enable-build-examples
+
 make %{?_smp_mflags}
 
 %install